PDA

View Full Version : Strike through


seahawkfan
10-23-06, 11:53 AM
Hello everyone,
I am trying to get a strike through to work on my cat and prod pages. I am using the following 2 codes. One to only show price if cost is greater than price and one to show only if price is greater than cost. I want the discount to work for the products that are discounted, but not show on the products that are not discounted as it shows a negative number.

%IF(Products.d.price GT Products.d.cost)% Price: %prodcostF%
%IFEND%
%IF(Products.d.cost GT Products.d.price)% %begin_costdiscount%
Retail: <strike>%prodcostF%</strike><br>
%end_costdiscount%
You save: %prcntsave%%<br>
Your Price: %prodpriceF%%IFEND%

My problem is that i can get this to work on the product pages but not on the cat pages.
Using Mive 4.23, cat, and prod page templates

Thanks in advance for any help

PCINET - Andreas
10-23-06, 03:44 PM
You need Vikingcoders CategoryTemplate (http://www.vikingcoders.com/store/merchant.mv?Screen=PROD&Store_Code=VC&Product_Code=BROK_CTGYTEMPLATES&affiliate=tomana) in order to have access to the product's properties. By placing your code in the header it can't work unless you add some additional code and cycle thru all products. This I wouldn't recommend because it could slow down your store to a crawl.

seahawkfan
10-24-06, 02:42 PM
Andreas, I actually have the Viking templates. But it still will not work. I have placed the code in the templates where the normal price would show

PCINET - Andreas
10-24-06, 03:09 PM
Rick,

Try the following conditions which btw are documented in the newtoken.txt (comes with the module).

<PRICING>

%begin_pricediscount%...%end_pricediscount% : displays if the calculated price is lower than the product price
%begin_costdiscount%...%end_costdiscount% : displays if the product price is lower than the product cost



FYI You don't need %OUI% in the main template in this case.

DesignExtend-MSI
10-24-06, 07:00 PM
Andreas, I actually have the Viking templates. But it still will not work. I have placed the code in the templates where the normal price would show

Here's a How To (http://www.designextend.com/de.mv?ARTID=t_strikethrough) on doing this...