Author Topic: Remove 0.00 from product listing .. Solution  (Read 3121 times)

Offline iangregson

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Remove 0.00 from product listing .. Solution
« on: April 23, 2018, 01:11:35 PM »
I had the problem of listing a product with several options. As I had set the base price of 0.00 and the options at full option price it looked bad listing many products with 0.00
Several replies suggested amendments but sadly did not work
After much tinkering I have found the solution. It also works for items set as Call to Order.
the problem for me was trying to trap 0.00. Solution is trap £0.00 and other currencies used

product_listing.tpl      also change any blocks such as latest.tpl
Around Line 83
<div class="price">
                     <?php if ($product['special']) { ?>
                        <div class="pricenew"><?php echo $product['special'] . $tax_message; ?></div>
                        <div class="priceold"><?php echo $product['price'] ?></div>
                                       
                     
                     <?php } else if ($product['call_to_order']) { ?>
                         <div class="oneprice"><?php echo "Contact for Price" ?></div>                  
                     
                     <?php } else if ($product['price'] == "€0.00" or $product['price'] == "£0.00") { ?>
                         <div class="oneprice"><?php echo "Select Option" ?></div>

                     
                     
                     <?php } else { ?>
                         <div class="oneprice"><?php echo $product['price'] . $tax_message; ?></div>
                     <?php } ?>

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Remove 0.00 from product listing .. Solution
« Reply #1 on: April 25, 2018, 12:04:49 AM »
Thank you

 

Powered by SMFPacks Social Login Mod