Jump to content

Remove the discount percentage wrapper from product list?


Nexus85

Recommended Posts

./themes/classic/templates/catalog/_partials/miniatures/product.tpl

{if $flag.type !== 'discount'}

<li class="product-flag {$flag.type}">{$flag.label}</li>

{/if}

or

<li class="product-flag {$flag.type}" {if $flag.type == 'discount'}style="display:none;"{/if}>{$flag.label}</li>

 

 

 

 

 

Link to comment
Share on other sites

12 hours ago, Guest said:

./themes/classic/templates/catalog/_partials/miniatures/product.tpl

{if $flag.type !== 'discount'}

<li class="product-flag {$flag.type}">{$flag.label}</li>

{/if}

or

<li class="product-flag {$flag.type}" {if $flag.type == 'discount'}style="display:none;"{/if}>{$flag.label}</li>

 

 

 

 

 

Thank you! Works like a charm

Link to comment
Share on other sites

You gave a sample from the product list, I advised you to modify the product list.
If you want to make a change to the product detail, change the code in the file:

./themes/classic/templates/catalog/product.tpl

 

Link to comment
Share on other sites

and removal next to the price

./themes/classic/templates/catalog/_partials/product-prices.tpl

find

{if $product.has_discount}
            {if $product.discount_type === 'percentage'}
              <span class="discount discount-percentage">{l s='Save %percentage%' d='Shop.Theme.Catalog' sprintf=['%percentage%' => $product.discount_percentage_absolute]}</span>
            {else}
              <span class="discount discount-amount">
                  {l s='Save %amount%' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.discount_to_display]}
              </span>
            {/if}
          {/if}

change to

{if $product.has_discount}
            {if $product.discount_type === 'percentage'}
              <span class="discount discount-percentage" style="display:none !important;">{l s='Save %percentage%' d='Shop.Theme.Catalog' sprintf=['%percentage%' => $product.discount_percentage_absolute]}</span>
            {else}
              <span class="discount discount-amount" style="display:none !important;">
                  {l s='Save %amount%' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.discount_to_display]}
              </span>
            {/if}
          {/if}

 

Link to comment
Share on other sites

  • 1 year later...
On 11/30/2020 at 5:48 AM, Guest said:

./themes/classic/templates/catalog/_partials/miniatures/product.tpl

{if $flag.type !== 'discount'}

<li class="product-flag {$flag.type}">{$flag.label}</li>

{/if}

or

<li class="product-flag {$flag.type}" {if $flag.type == 'discount'}style="display:none;"{/if}>{$flag.label}</li>

 

 

 

 

 

where do i put this

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...