lcp2000 Posted August 15, 2015 Share Posted August 15, 2015 So, I have this code that displays a "FREE SHIPPING" ribbon on my product images on home page. Problem is, it wont display on the Quick View or Product Pages. On my product-list.tpl file I have (which works fine): <div class="product-image-container"> ...other code {* LCP *} {if isset($product.additional_shipping_cost) && $product.additional_shipping_cost == 0} <a class="free-shipping-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="free-shipping-label">{l s='Free'} <em class="icon-truck" id="icon-truck"></em> !</span> </a> {/if} {* /LCP *} ...other code If I add that same code to product.tpl I get a blank page: <!-- product img--> <div id="image-block" class="clearfix"> {if $product->new} <span class="new-box"> <span class="new-label">{l s='New'}</span> </span> {/if} {if $product->on_sale} <span class="sale-box no-print"> <span class="sale-label">{l s='Sale!'}</span> </span> {elseif $product->specificPrice && $product->specificPrice.reduction && $productPriceWithoutReduction > $productPrice} <span class="discount">{l s='Reduced price!'}</span> {/if} {* LCP *} {if isset($product.additional_shipping_cost) && $product.additional_shipping_cost == 0} <a class="free-shipping-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="free-shipping-label">{l s='Free'} <em class="icon-truck" id="icon-truck"></em> !</span> </a> {/if} {* /LCP *} ...other code I take it that "$product.additional_shipping_cost" is not yet set here? Don't know where to look from here... Anyone? You can refer to my other post HERE if you need to. Thanks, LCP Link to comment Share on other sites More sharing options...
razaro Posted August 15, 2015 Share Posted August 15, 2015 (edited) Try with this, use product-> as it is an object and remove link as it is not needed {* LCP *} {if isset($product->additional_shipping_cost) && $product->additional_shipping_cost == 0} <span class="free-shipping-label">{l s='Free'} <em class="icon-truck" id="icon-truck"></em> !</span> {/if} {* /LCP *} Edited August 15, 2015 by razaro (see edit history) 1 Link to comment Share on other sites More sharing options...
lcp2000 Posted August 15, 2015 Author Share Posted August 15, 2015 Awesome, thank you. Here's what I ended up with. Changed the link to a span so as to continue using the ribbon css {* LCP *} {if isset($product->additional_shipping_cost) && $product->additional_shipping_cost == 0} <span class="free-shipping-box"> <span class="free-shipping-label">{l s='Free'} <em class="icon-truck" id="icon-truck"></em> !</span> </span> {/if} {* /LCP *} Link to comment Share on other sites More sharing options...
nevresimdukkani Posted March 9, 2018 Share Posted March 9, 2018 Hi, How can we apply this or similar code to 1.7.3? Any ideas? 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