Jump to content

Edit History

FerrA

FerrA

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>
    

 

FerrA

FerrA

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>
    

 

×
×
  • Create New...