PrabuSS Posted January 10, 2017 Share Posted January 10, 2017 (edited) Hi Unfortunately i cant hook the block cart module on my top header. So I decided to add some code on my header.tpl file to display number of cart items. Please help any one for how to write the code with cart count variable globally. Format will be like "cart(2) " Version : 1.6.1.7 Edited January 10, 2017 by Prabukaran (see edit history) Link to comment Share on other sites More sharing options...
BonPresta Posted January 10, 2017 Share Posted January 10, 2017 Hi Unfortunately i cant hook the block cart module on my top header. So I decided to add some code on my header.tpl file to display number of cart items. Please help any one for how to write the code with cart count variable globally. Format will be like "cart(2) " Version : 1.6.1.7 Hello, Try this code: <div class="shopping_cart"> <a href="{$link->getPageLink($order_process, true)|escape:'html':'UTF-8'}" title="{l s='View my shopping cart'}" rel="nofollow"> <b>{l s='Cart' mod='blockcart'}</b> <span class="ajax_cart_quantity{if $cart_qties == 0} unvisible{/if}">({$cart_qties})</span> <span class="ajax_cart_no_product{if $cart_qties > 0} unvisible{/if}">{l s='(empty)'}</span> </a> </div> Link to comment Share on other sites More sharing options...
PrabuSS Posted January 10, 2017 Author Share Posted January 10, 2017 Hi BonPresta Its working like a treat. Thanks a lot. Finally credits goes to you only 1 Link to comment Share on other sites More sharing options...
Riva Posted October 30, 2020 Share Posted October 30, 2020 for 1.7? 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