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-ASP Shopping Cart Customer Forum

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

 All Forums
 VPCart Forum
 General help me questions
 Quantity based pricing problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

VP-ASP New User

52 Posts

Posted - May 17 2005 :  04:05:26  Show Profile  Visit Ronnie's Homepage  Reply with Quote
Hi folks
We sell cheap items with a discount on the number sold. VPASP works excellently for discounts of more than $1 per item but below this the system uses a percentage discount. When it uses the discount per item to work out the total for that product, there is a rounding of up to 5 cents per item. Obviously this is not good enough to show customers.
Anybody got a workaround that still allows the stock control to work.

Senior Member

United Kingdom
1898 Posts

Posted - May 17 2005 :  04:58:14  Show Profile  Visit devshb's Homepage  Reply with Quote
if the discount is less than 1, then it assumes that the discount is a percentage rather than a fixed amount.

eg a discount of "2" will be a $2 discount
a discount of "0.5" will be a 50% discount

so, to get round that problem, if it's less than $1, change it to use a corresponding pct discount rather than a fixed amount discount

if your product costs $5 and you want to discount it by $0.50, then use a discount of 0.1 to discount it by 10%

Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons
Go to Top of Page

VP-ASP New User

52 Posts

Posted - May 18 2005 :  04:48:34  Show Profile  Visit Ronnie's Homepage  Reply with Quote
Thanks Simon but I know that. It's what I said in my post. My problem is that when using a percentage discount that's very small, it gives me rounding errors when my customers buy a number of the products.
i.e the discount is only .00354768 % but when vpasp applies this to the produc and multiplies the price say 15 times, the total will be 5 cents away from the actual price.
The problem is we're setting the discount up on a total basis i.e I sell 1 x product for $5.95 buy you can buy 6 for 35.00 and work back the discount from there.
Here's an example
I sell 1 for $9.60 and 6 for $56.00 i.e discount per item of
With the rounding vpasp calculates it as $55.98.

See what I mean.
Thanks if you can shed any light on this

Go to Top of Page

VP-ASP Super User

304 Posts

Posted - May 21 2005 :  22:12:04  Show Profile  Reply with Quote
Hi Ronnie-

If you are confident that you never want to use the percent feature and just want it to always use a dollar (or cent amount if less than 1 dollar) discount amount, then you could disable the percent feature in the ASP code. It should be a pretty straight-forward mod to the ASP code. I could point you in the right direction for where this code is located as could others on the forum.

If you post this question to support (here: http://www.vpasp.com/virtprog/helpdesk) then they will likely tell you which code to change. In fact, it makes sense for you to contact them directly so they'll know that the feature operation isn't ideal for everyone.

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