View Single Post
  #20  
Old September 25th, 2014, 08:55 PM
stefan stefan is offline
 
Join Date: Feb 2008
Posts: 5,901
Default

Quote:
Originally Posted by yankeestonk View Post
did you see the question above this. ALL the products in my store show a price of zero when you go to product details. All of them, not just amazon. Can you tell anything messed up in the code for product details? I just had the site redesigned. the store that is being used it the saveongolf copy. Here is the product detail code. maybe you can tell?
With the code below you always display the sale price even if there's no sale price! And if there's no sale price 0 is displayed.

That's because the code below is missing the default if else clause.

PHP Code:
<div class="prc">
<
small>
<
span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span>
<
span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
</
small>
</
div
It should be this:

PHP Code:
<?php if ($product->saleprice &&  $product->saleprice $product->price) { ?>
  <div class="prc">
    <small>
      <span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span>
      <span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
    </small>
  </div>
<?php } else { ?>
  <div class="prc">
    <small>
      [product.currency mode='sign'][product.price]
    </small>
  </div>    
<?php ?>