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

removing the price 0.00 from product listing

Started by dulrich, October 16, 2017, 08:57:40 PM

Previous topic - Next topic

dulrich

Hi, I am hoping that I can remove the (0.00) directly under the Blurb both on the product page and on the product details page. the products have several options with prices so I can not enter a price in the product price field. I have tried to replace the 0.00 with text but that didn't work and removing the 0.00 and saving doesn't work either.

abantecart

You need to edit template file.

Here is the template:
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product_listing.tpl

You can add something like this after line 19:

if ( substr($product['price'],1) == '0.00' ) {
$product['price'] = 'FREE';
}

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

dulrich

Hi, I inserted the code but it did not change the storefront. Here are the modified lines, is this right? I changed free, to choose option below the added code starts on line 19

   if (!$display_price) {
         $item['price'] = '';
      }
if ( substr($product['price'],1) == '0.00' ) {
            $product['price'] = 'Choose Option Below';
         }
      $review = $button_write;
      if ($item['rating']) {
         $review = $item['rating'];

dulrich

Hi, I tried many variations on the code snippet which was recommended. None have made any change in the storefront. There must be some way to do this. Anyone have any ideas?

abantecart

Make sure you edit correct template selected in admin and correct tpl file
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

dulrich

I have been accessing the code through file manager in cpanel. I also used FTP once. If you are saying that I should be accessing it through the Abantecart admin could you tell me where to access that.

dulrich

What a shame, I did like Abantecart, to bad there is no tech support. I guess it is going to be Opencart. I have invested a lot of time and energy into this platform I wish I would have known that there was no support before I started.

Basara

Hi, dulrich.

There is a lot of options to get support. Forum is a free support from AbanteCart community. http://www.abantecart.com/contact-us

iangregson

I had the same problem my fix was
edit css file and make 0.00 price white so you cant see it
and increase total price a little

shawnlg777

For the Product page

FIND
<div class="productfilneprice">
<?php echo $price . $tax_message; ?>
</div>
                       
REPLACE WITH

<div class="productfilneprice">
<?php if ($displayprice == 0) {
echo "Call for Price";
} else {
echo $price . $tax_message;
} ?>
</div>

Forum Rules Code of conduct
AbanteCart.com 2010 -