Jump to content

[SOLVED] Shopping CART problem - Text Change on Refresh


Recommended Posts

Hi all
There is a bug in my shopping cart (top right - red cart) - everytime I load/open a new page the text in the cart changes for a second and changes back to previous text again. It does this everytime a new page is loaded. What to do?
 

My site: http://www.buyzaaptv.dk

Also I have this question, but nobody answeard:  http://www.prestashop.com/forums/topic/296902-change-mobile-theme-for-ps-15x-on-leo-theme/?do=findComment&comment=1499596

 

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

Hi.

 

It looks like the information on the cart content (number of products) are not hidden when the page loads, so when the cart is being updated it detects the 0 quantity and hides those elements that should've been hidden by default.

 

 

 

Regards.

Robin.

The CartExpert Team

post-112081-0-62439200-1387467577_thumb.png

Edited by CartExpert.net (see edit history)
Link to comment
Share on other sites

Hi.

 

It looks like the information on the cart content (number of products) are not hidden when the page loads, so when the cart is being updated it detects the 0 quantity and hides those elements that should've been hidden by default.

 

 

 

Regards.

 

Robin.

 

The CartExpert Team

 

Thanks a lot for your respose, but where can I edit that? I have tried to find the code, but there is a lot of files. I am not sure where to look.

Link to comment
Share on other sites

Your blockuserinfo.tpl should contain this code part:

 

<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="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>

 

 

Regards.

Robin.

The CartExpert Team

Link to comment
Share on other sites

Your blockuserinfo.tpl should contain this code part:

 

<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="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>

 

 

Regards.

 

Robin.

 

The CartExpert Team

 

Thanks! I will try that and post my result as soon that I am done :)

Link to comment
Share on other sites

Your blockuserinfo.tpl should contain this code part:

 

<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="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>

 

 

Regards.

 

Robin.

 

The CartExpert Team

 

 

Hi again Robin

I've tried your solution. I just placed the code you wrote in the bottom of my blockuserinfo.tpl file.

But still the same error, and now there is also a text saying "(tom)" which means empty in the middle of the header. Have I missed something? 

Link to comment
Share on other sites

Your blockuserinfo.tpl should contain this code part:

 

<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="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>

 

 

Regards.

 

Robin.

 

The CartExpert Team

 

Thanks a lot! It's working perfectly. I just added the "hidden" text in the end of the if statements as shown in your solution with red :D 

 

Thanks again. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...