Welcome, Guest ( Customer Panel | Login )

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

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.


VP-CART 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.

I've tested this and it works fine.


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)