| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Displaying Discount | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I want to be able to show the normal retail price for each product, and then a price after the global store discount (30%) has been applied. What's the easiest way to do this? Of course I'd like the after discount price to be the most prominent one. |
|||||||
#3
|
|||||||
|
|||||||
![]() I'm guessing I should change /customer/main/products.tpl? A couple of further questions since I'm such a newbie:
What syntax do I use in constructing the {math} equation? And what variable do I use to grab the flat 30% discount from the discount I set up as applying on all purchases greater than $0.00? Code:
This bit of code: Code:
seems to be doing something similar to what I want... but I can't figure out how it is being invoked. |
|||||||
#4
|
|||||||||
|
|||||||||
![]() $products[product].price would be the product price.
Come to think of it using {math} may not be very good since it would put a load on the server, you'd better better of doing the calculations within the php and passing the variable onto smarty for display. http://smarty.php.net/ |
|||||||||
#5
|
|||||||
|
|||||||
![]() Okay, now I'm lost!
![]() So, what do I do to create the new smarty object, and where should I create it? This is my first time using smarty, so be gentle! |
|||||||
#7
|
|||||||
|
|||||||
![]() I just PMed ya!
|
|||||||
#8
|
|||||||
|
|||||||
![]() Okay, against my better judgement I hard coded the discount into the display to see what would happen:
Code:
And it resulted in the wrong price being displayed: Generic Comic Book This is a test item. -------------------------------------------------------------------------------- Our price: <s>$ 25.00</s> $ 17.20 |
|||||||
#9
|
|||||||||
|
|||||||||
![]() would you not just use the adv discount option in the modify products page for this one. Just enter your selling price and drop 30 in the Adv. discount (%) field ?
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#10
|
|||||||
|
|||||||
![]() I'd prefer not because the adv discount function rounds to the nearest dollar, and that is misleading and problematic when you are dealing with large volumes of low priced items like my business is.
|
|||||||
|
|||
X-Cart forums © 2001-2020
|