Btt Posted January 5, 2017 Share Posted January 5, 2017 Hi there, I need to hide the "New" Label if the product is on "Sale". This is my tpl: {if isset($product.new) && $product.new == 1} <span class="new-box"> <span class="new-label label label-success">{l s='New'}</span> </span> {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <span class="sale-box"> <span class="sale-label label label-danger">{l s='Sale'}</span> </span> {/if} As you can see below i tried to edit this way but "New" Labels disappeared for all products even the one that aren't on Sale. if isset($product.new) && $product.new == 1 && !isset($product.on_sale)} <span class="new-box"> <span class="new-label label label-success">{l s='New'}</span> </span> {/if} Link to comment Share on other sites More sharing options...
yaniv14 Posted January 7, 2017 Share Posted January 7, 2017 Try: {if isset($product.new) && $product.new == 1} {if !isset($product.on_sale) || isset($product.on_sale) && !$product.on_sale} <span class="new-box"> <span class="new-label label label-success">{l s='New'}</span> </span> {/if} {/if} Link to comment Share on other sites More sharing options...
Btt Posted January 31, 2017 Author Share Posted January 31, 2017 Try: {if isset($product.new) && $product.new == 1} {if !isset($product.on_sale) || isset($product.on_sale) && !$product.on_sale} <span class="new-box"> <span class="new-label label label-success">{l s='New'}</span> </span> {/if} {/if} Thanks for the reply yaniv14 it works! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now