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
 Product Discounts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jloberg
Starting Member

4 Posts

Posted - December 20 2006 :  01:09:16  Show Profile  Reply with Quote
I know the system is set up to take discount amounts uner 1.00 as a percentage.

I need to modify that and I found it in the shopfileio.asp;
If discpercent>=1 then
       discount=discpercent
  else    
       discount=Price*discpercent
  end if   

I changed the discpercent>=1 to discpercent>=0 and it works on the template page using [DISPLAY_QUANTITYDISCOUNTS], but it does not calculate in the shopping cart.

Many of the products I sell are sold in Qtys of 250 - 1000 and run $0.75 - $0.35, so the discount amounts are $.10 etc.

I know it has to be capable, just not sure which file is controlling the shopping cart.

Jerry

Edited by - jloberg on December 20 2006 01:59:35

jloberg
Starting Member

4 Posts

Posted - December 20 2006 :  01:52:08  Show Profile  Reply with Quote
Believe it or not, I already found a solution;
Modifying 2 files and a concept I was able to do small discounts (under 1) and another way to still do percentages;
In both the fileio.asp & shopuserprice.asp change as shown:
First here is the OLD code;
If discpercent>=1 then
       discount=discpercent
  else    
       discount=Price*discpercent
  end if    

Here is the NEW code;
If discpercent>=0 then
       discount=discpercent
  else    
       if discpercent>=-1 then
           discount=Price*discpercent*-1
       end if
  end if   

There are multiple occurrences in the shopuserprice.asp file.
How it works; ANY positive # (whole or with decimal) will be assumed to be a fixed amount off (based on your currency).
Any negative # will be considered a percentage, remember in math (computers) 100% is 1, 5% is .05.

I also built in a quick check to insure you do not give more than a 100% discount (-1);
If you want to give a $.50 discount enter .5
If you want to give a 50% discount enter -.5

Hope this relatively simple mod helps others!

Jerry

Edited by - jloberg on December 20 2006 05:37:02
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000