Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Quantity Discount Question

  1. #1
    jwallwork is offline Member
    Join Date
    Sep 2008
    Posts
    38

    Default Quantity Discount Question

    We have a client that wants to allow a discount based on the total quantity for all products using the same discount table. What's the best way to accomplish this? We have the source code (v.8) and fully expect to do customization.

    Thanks,

    John

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Can't this be done by the built-in Quantity Discount mechanism? What do you exactly mean when you say "discount based on the total quantity for all products
    using the same discount table"?

  3. #3
    jwallwork is offline Member
    Join Date
    Sep 2008
    Posts
    38

    Default

    Say you had a discount table called "hanger_discount", that took 10% for 100 or more Hangers.

    If Product A (Wooden Hangers) uses the "hanger_discount" table and the shopper has 50 of product A in there cart

    And Product B (Childrens Plastic Hangers) also used the discount table and the shopper has 50 of Producct B in there cart, then the sum of the quantity for the two products would be 100 and would meet the quantity level for both products to get 10% off.

    Hope that clarifies it.

    Please note that 50+50 was just a random number chosen, values could be 99 + 1, or 22+78, the important part is the sum of the quanties is >= to the discount limit.

    John

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    In v8 that's going to take changes in quite a few places in ShoppingCart.cs, as well as the aspdnsf_GetCartSubtotalAndTax stored procedure. You'll have to follow these directions before you can edit that.

    In version 9, all of that logic's been rewritten and consolidated, which would make that modification much easier. You might want to look into upgrading before taking on a project like that, as it'll be easier to upgrade later on if you're already on the newer codebase.