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
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Negative Donations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bradrob
Starting Member

United Kingdom
14 Posts

Posted - March 12 2012 :  06:13:08  Show Profile  Visit bradrob's Homepage  Reply with Quote
Hi Guys

this will just be a quick fix for someone out there but i'm not sure where is best to put my code; The problem is that when you have donation products on the site if you put a negative figure in the amount it will reduce this from your bill and then allow the order to go through with the invalid reduction.

Does anyone know where i might put a validation for now allowing negative figures? thanks in advance for any help.

Brad

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - March 12 2012 :  12:52:54  Show Profile  Reply with Quote
Hi Brad,

I've just looked at the code for donation features and you're right, there is no check for a negative amount entered. If you open shopproductfeaturesprocess.asp and find the sub routine:
Sub ProcessUserPrice
Then find the line:
If not isnumeric(price) then
Add a negative check here so change the code to:
If not isnumeric(price) or isnumeric(price)<0 then
You may also want to change the wording of the error message that displays to alert that negative numbers cannot be entered.
getlang("LangUserPriceError")

I've tested this and it works fine.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000