Forums
This topic is locked
Pricing Coding with If Then (maybe)
Posted 25 Apr 2007 16:25:07
1
has voted
25 Apr 2007 16:25:07 Melissa Ferris posted:
I am creating an asp website for a flooring company. We have tons and tons of products and every week we are going to run weekly specials, but heres my question. I will have a regular price field, but I also want a sale price field, my dilemma, how do I make the shopping cart take the sale price if there is one, over the regular price? The only way I saw to get around this was just to make a field in my database where we can write "on Sale" that will appear over the price and then we just change the regular price, but I am sure people want to see regular price and then sale price. This is the template I have been given for the shopping cart program.<form method=POST action="www.cartmanager.net/cgi-bin/cart.cgi">
<input type=hidden name=additem value="cartid|itemname|itemcost|itemquantity
|itemno|itemhandling|itemshipmethod|itemweight|itemexempt|itemdiscount
|itemsilentpost|itemdropshipzip|itemESD|itemRecurring">
<input type=submit value="Add To Cart">
</form>
I am hoping this is really simple and I am just overcomplicating the issue. If you can help, I would greatly appreciate it.
Replies
Replied 25 Apr 2007 18:10:26
25 Apr 2007 18:10:26 Dimitris Kouris replied:
Hi Melissa,
One way to do this (i think), is to swich the prices based on the "sales day", if you know the sales day that is.
For example if your sales day is monday then the script should swich the normal price with the sales price.
A select case statment should do the job of the if, then, else statment.
Thats the theory any way!
One way to do this (i think), is to swich the prices based on the "sales day", if you know the sales day that is.
For example if your sales day is monday then the script should swich the normal price with the sales price.
A select case statment should do the job of the if, then, else statment.
Thats the theory any way!