Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Remove 0.00 from product listing .. Solution

Started by iangregson, April 23, 2018, 01:11:35 PM

Previous topic - Next topic

iangregson

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 } ?>

Basara


Forum Rules Code of conduct
AbanteCart.com 2010 -