VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Quantity Based Discounts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

26 Posts

Posted - November 01 2006 :  10:06:18  Show Profile  Reply with Quote
I need to setup a pricing model as follows:-
Retail customers get the standard price and no discount regardless of quantity and Trade customers get a quantity based discount based on the quantity per manufacturer.

The first part I know how to do by adding the following to shopuserprice.asp:-
' Make quantity based discount only apply to trade customers
'dim customertype
'if lcase(customertype)<>"trade" then exit sub

I can see that grouping logic is supported in the discount based on categoryid or catalogid which could easily be modified to be the mfg field.

The problem I have is that the quantity based discounts are static not a percentage discount and are already specified in all the product records:-

1-9 (cprice2)
10-19 (cprice3)
20-49 (cprice4)
50-99 (cprice5)
100-199 (cprice6)
200-499 (cprice7)
500+ (cprice8)
If a quantity is specified and there is not a value specified in the price break on that quantity then the next price break down should be used
(ie if groupqty>500 and cprice8 <0 or null then custprice=cprice7, if cprice7 <0 or null then .... and so on until if cprice2 <0 or null then custprice=cprice)

Can anyone me some pointers on how to change from percentage based quantity discounts to "static" as detailed above.



4284 Posts

Posted - November 01 2006 :  15:43:42  Show Profile  Visit support's Homepage  Reply with Quote

You will need to modify your quantitydiscounts table so that each "discount" refers to the corresponding field in the products table.

eg. discount1=cprice2

You will then need to modify shopfileio.asp around line 1554.

By default, this section of code should look like:

If discpercent>=1 then
end if

Discpercent will contain the product table field name with the corresponding discount. - so you will need to add addtional code to look up this field in the products table to extract the correct discount.

If you require further assistance with this modification we can forward your request onto our development team for quote consideration.

Thank you.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000