armenak Posted May 18, 2014 Share Posted May 18, 2014 (edited) 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> Edited May 18, 2014 by armenak (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts