FerrA Posted June 16, 2023 Share Posted June 16, 2023 Good evening guys, anyone tekll me how can I show the number of products in the cart and not they quantity? For example, if I add Apple iPod 10x quantity into cart, the number shown in the cart will be 10, but I want shown 1 and not 10. There is the code of file ps_shoppingcart.tpl of ps_shoppingcart module <div id="_desktop_cart"> <div class="blockcart cart-preview leo-blockcart show-leo-loading {if $cart.products_count > 0}active{else}inactive{/if}" data-refresh-url="{$refresh_url}" > <div class="header"> {if $cart.products_count > 0} <a rel="nofollow" aria-label="{l s='Shopping cart link containing %nbProducts% product(s)' sprintf=['%nbProducts%' => $cart.products_count] d='Shop.Theme.Checkout'}" href="{$cart_url}"> {/if} <span class="left"> <i class="icomoon icon-cart shopping-cart"></i> </span> <span class="right"> <span class="cart-text">{l s='Cart' d='Shop.Theme.Global'}</span> <span class="cart-count"> <span class="cart-products-count">{$cart.products_count}</span> <span class="totals-cart">{$cart.totals.total.value}</span> </span> </span> {if $cart.products_count > 0} </a> {/if} </div> </div> </div> Link to comment Share on other sites More sharing options...
ps8modules Posted June 16, 2023 Share Posted June 16, 2023 Hi: {count($cart.products)} Link to comment Share on other sites More sharing options...
FerrA Posted June 19, 2023 Author Share Posted June 19, 2023 Thank you so much guy 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