Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Problems and bugs
 HandleGroupDiscount
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

manilow
VP-CART New User

France
134 Posts

Posted - April 23 2013 :  05:54:43  Show Profile  Visit manilow's Homepage  Reply with Quote
I set HandleGroupDiscount to "Yes" in the shop configuration and specified a product group in the groupfordiscount field in the quantitydiscounts table. This worked fine for the related products.

However, as soon as the number of items in the shopping cart exceeded the quantity1 value in the quantitydiscounts record with the lowest catalogid, the discount was applied to all items in the cart.

Looking closely to the HandleGroupDiscount subroutine, I''ve found the following line outquoted (around line 50) :

''if salescode = "" then exit sub

Apparently, the subroutine is executed even if no value is specified in the groupfordiscount field in the product record. In other words, all products with an empty groupfordiscount field are considered being a group. Than the shopping cart will apply the discounts according to the quantitydiscounts record with the lowest catalogid:

if trim(salescode) = "" then
lookupsql = "* from " & quantitypricetable & " where (groupfordiscount is null or groupfordiscount = '') order by id desc"


I had to reactivate the outquoted line mentioned above to make it work properly. Why has it been outquoted?

Thanks in advance for your comments.

Erik
www.AquaThermia.com

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - May 09 2013 :  22:53:03  Show Profile  Reply with Quote
hey eric, are u referring to the code in shopuserprice.asp or maybe in other file ?
Diego.
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - May 10 2013 :  02:47:34  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi Diego,

Thanks for your reply.

I indeed forgot to mention the file which is shopuserprice.asp.

Kind regards,

Erik
www.AquaThermia.com
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