Jump to content

How to add a word "Item" or "Items" next to quantity in the cart block


Recommended Posts

Hello,

 

I have some little issues with my cart block on the top of the site page.

 

I want to add a text like Item or Items ( depending from quantity) next to quantity of cart in the cart block.

 

As far as I can understand, the modifications should be made in blockuserinfo.tpl ( please find below)

 

Currently I have what is on picture 1 and 2.

 

I want it to be like on picture 3 and 4.

 

And, also, I think there's some problems with javascript because when i reload the page or choose other page, it shows empty ( like in picture 5) for 1-2 seconds and then only the cart quantity( like in picture 1 and 2).

 

How can be this issues be resolved ?

 

I will really appreciate your help.

 

Thank you in advance.

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

<!-- Block user information module HEADER -->
<section class="blockuserinfo header-box">
		{if $logged}
			<a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log out' mod='blockuserinfo'}" class="logout" rel="tooltip" data-placement="bottom" data-original-title="first tooltip"><span><i class="icon-unlock"></i></span></a>
		{else}
			<a href="{$link->getPageLink('my-account', true)}" title="{l s='Login' mod='blockuserinfo'}" class="login" rel="tooltip" data-placement="bottom" data-original-title="first tooltip" ><span><i class="icon-lock"></i></span></a>
		{/if}
</section>

<section id="header_user" class="blockuserinfo-cart header-box">
		{if !$PS_CATALOG_MODE}
		<div id="shopping_cart">
        <a href="{$link->getPageLink($order_process, true)}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">
          <i class="opancart icon-double-angle-down"></i>
                <span class="shopping_cart_title">{l s='Cart' mod='blockuserinfo'}</span>
                <span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>
                <!--span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span>
                <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span-->
                 {*<span class="price ajax_cart_total{if $cart_qties == 0} hidden{/if}">
				{if $cart_qties > 0}
					{if $priceDisplay == 1}
						{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
						{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
					{else}
						{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
						{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}
					{/if}
				{/if}                  
                </span>*}
                <span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='(empty)' mod='blockuserinfo'}</span>
            </a>
		</div>
		{/if}
</section>

post-469651-0-50000000-1400418980_thumb.jpg

post-469651-0-74787600-1400418986_thumb.jpg

post-469651-0-15927300-1400418996_thumb.jpg

post-469651-0-39654600-1400419063_thumb.jpg

post-469651-0-58539300-1400419070_thumb.jpg

Edited by armenak (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...