Welcome, Guest ( Customer Panel | Login )




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

robmac
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
'customertype=getsess("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.

Thanks

support
Administrator

4679 Posts

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

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:

discpercent=lookuprs(pricefield)
If discpercent>=1 then
discount=discpercent
else
discount=Price*discpercent
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.

Regards,
Michael
VPASP SUPPORT
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00