Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: removing the price 0.00 from product listing  (Read 6670 times)

Offline dulrich

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-1
    • View Profile
removing the price 0.00 from product listing
« 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.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: removing the price 0.00 from product listing
« Reply #1 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';
}
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

Offline dulrich

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-1
    • View Profile
Re: removing the price 0.00 from product listing
« Reply #2 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'];

Offline dulrich

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-1
    • View Profile
Re: removing the price 0.00 from product listing
« Reply #3 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?

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: removing the price 0.00 from product listing
« Reply #4 on: November 04, 2017, 10:30:35 AM »
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

Offline dulrich

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-1
    • View Profile
Re: removing the price 0.00 from product listing
« Reply #5 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.

Offline dulrich

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-1
    • View Profile
Re: removing the price 0.00 from product listing
« Reply #6 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.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5772
  • Karma: +274/-2
    • View Profile
Re: removing the price 0.00 from product listing
« Reply #7 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

Offline iangregson

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: removing the price 0.00 from product listing
« Reply #8 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

Offline shawnlg777

  • Newbie
  • *
  • Posts: 20
  • Karma: +3/-0
    • View Profile
    • Lite House Media
Re: removing the price 0.00 from product listing
« Reply #9 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>

 

Powered by SMFPacks Social Login Mod