Jump to content

Can we hide the price having zero of products on its listing page


Pragati P

Recommended Posts

Hi Pragati, 

It seems that the image you have provided is of shipping methods.
If the shipping cost is 0, then to hide the shipping costs, you need to make the below modifications.
In the file at path - templates\checkout\_partials\steps\shipping.tpl,

Kindly, replace the below code-
<div class="col-sm-3 col-xs-12">
<span class="carrier-price">{$carrier.price}</span>
</div>

with the below code-
<div class="col-sm-3 col-xs-12" {if $carrier.price == 0}style="display: none;"{/if}>
<span class="carrier-price">{$carrier.price}</span>
</div>

Link to comment
Share on other sites

Il y a 23 heures, Fleckmyus a dit :

And for products, could you help us with what i need to modify in the template templates/catalog/_partials/miniatures/product.tpl ?

This template is for listing, not for individual product page.

Change

          {if $product.show_price}

by

          {if $product.show_price && $product.price_without_reduction>0}

 

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Prestashop Addict said:

This template is for listing, not for individual product page.

Change

          {if $product.show_price}

by

          {if $product.show_price && $product.price_without_reduction>0}

 

Perfect. Thank you for your support!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...