AbanteCart Community

AbanteCart Development => Customization help => Topic started by: dulrich on October 16, 2017, 08:57:40 PM

Title: removing the price 0.00 from product listing
Post by: dulrich on October 16, 2017, 08:57:40 PM
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.
Title: Re: removing the price 0.00 from product listing
Post by: abantecart on October 20, 2017, 02:41:06 PM
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:
Code: [Select]
if ( substr($product['price'],1) == '0.00' ) {
$product['price'] = 'FREE';
}
Title: Re: removing the price 0.00 from product listing
Post by: dulrich on October 22, 2017, 05:45:57 PM
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'];
Title: Re: removing the price 0.00 from product listing
Post by: dulrich on November 03, 2017, 09:31:56 PM
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?
Title: Re: removing the price 0.00 from product listing
Post by: abantecart on November 04, 2017, 10:30:35 AM
Make sure you edit correct template selected in admin and correct tpl file
Title: Re: removing the price 0.00 from product listing
Post by: dulrich on November 04, 2017, 12:16:18 PM
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.
Title: Re: removing the price 0.00 from product listing
Post by: dulrich on November 12, 2017, 05:11:20 PM
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.
Title: Re: removing the price 0.00 from product listing
Post by: Basara on November 13, 2017, 01:07:21 AM
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
Title: Re: removing the price 0.00 from product listing
Post by: iangregson on April 27, 2018, 06:26:22 AM
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
Title: Re: removing the price 0.00 from product listing
Post by: shawnlg777 on October 10, 2018, 05:42:51 PM
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>