Jump to content

Cart drop down not working after moving module


futurewebs

Recommended Posts

I have repositioned my 'Cart Block' module from the top of my 'displayTop' hook to the bottom and now for some reason the drop down effect has stopped working and the cart box is permanently down. I was wondering whether anyone could suggest why happended?

Any suggestions are most welcome, thanks in advance.
 

Link to comment
Share on other sites

I have repositioned my 'Cart Block' module from the top of my 'displayTop' hook to the bottom and now for some reason the drop down effect has stopped working and the cart box is permanently down. I was wondering whether anyone could suggest why happended?

 

Any suggestions are most welcome, thanks in advance.

 

please share url to your website

is hard to say what's going on without an access to front office

Link to comment
Share on other sites

Yes the cartblock module is hooked to displayTop. I also have another module within this hook called Shopping Cart Info. Here is the template file:

<div class="row">
    <!-- Block user information module HEADER -->
    <div class="span7">
                        <div class="shoppingCart">
            <ul id="header_nav">
                {if !$PS_CATALOG_MODE}
                    <li id="shopping_cart">
                        <a href="{$link->getPageLink($order_process, true)}" title="{l s='Your Shopping Cart' mod='wdshoppinginfo'}">
                            <span class="cart-ico"><img src="{$img_dir}/{if $sccop.trendy_theme !=''}{$sccop.trendy_theme}{else}default{/if}_cart.png" /></span>
                            <span class="top-cart">
                                <span class="shop-total"><span id="summary_products_quantity">Total Items: {$cart_qties}</span> {l s='Basket Total:' mod='wdshoppinginfo'}
                                <span class="ajax_cart_total{if $cart_qties == 0} tophidden{/if} price">
                                {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} tophidden{/if} price"> {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
                                        {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}</span>
                                </span>

                            </span>
                        </a>

                    </li>
                {/if}	
            </ul>
Link to comment
Share on other sites

Hi! how are you all! i am new to presta shop, i am having a problem with my website , my menu bar moved up under the logo and search bar in NIce & Clean theme. before it was ok, yesterday it moved up and i am trying to solve this problem, don't know how to do it, please help me to sort out this error, my website is about kids bunk bed.

 

please have a look and help me out,

 

 

thanks

 

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

 

Hi! how are you all! i am new to presta shop, i am having a problem with my website , my menu bar moved up under the logo and search bar in NIce & Clean theme. before it was ok, yesterday it moved up and i am trying to solve this problem, don't know how to do it, please help me to sort out this error, my website is http://www.brixton-beds.co.uk

please have a look and help me out,

thanks

 

 

it's enough to post this message in one thread, not everywhere.

Link to comment
Share on other sites

The Cart block was also in displayHeader but I noticed that my other 'Shopping Cart info' module wasn’t so I added it. Unfortunately it didn't fix anything   :(

I think the 'Shopping Cart info' module is the selector for the dropdown effect so I was wondering whether some jquery has been moved when I moved the module's? When I move the Cart block to the top of the displayTop hook it works but obviously is not in the right place.

Do you have any ideas what might of caused the 2 errors with the jquery you mentioned?

Link to comment
Share on other sites

Great it now disappears as it should, there are a few issues though. It doesn't hide unless you mouse out of the basket total at the top. I have also noticed that the product images and the total number of products don't appear unless you refresh the page. If we can fix these issues it would be prefect!

Link to comment
Share on other sites

Great it now disappears as it should, there are a few issues though. It doesn't hide unless you mouse out of the basket total at the top. I have also noticed that the product images and the total number of products don't appear unless you refresh the page. If we can fix these issues it would be prefect!

 

hello

i missed your replies here.

problem is probably related to json file that you've got in your cart directory. im not sure at all, can you please share contents of this file?

Link to comment
Share on other sites

Hi Vekia,

 

No problem, I managed to fix most of the issues yesterday. I found a mistake in the ajax-cart.js file on line 713, basically the wrong div activating the slider. This is what its like now:

	$("#cart_block").hover(
		function() {
			$('#shopping_cart a').css('border-radius', '3px 3px 0px 0px');
		},
		function() {
			$('#shopping_cart a').css('border-radius', '3px');
			setTimeout(function() {
				if (!shopping_cart.isHoveringOver())
					$("#cart_block").stop(true, true).slideUp(450);
			}, 200);
		}
	);

I also fixed the issue I was having with the cart numbers by using the following:

                                <span class="shop-total">
                                    {l s='Total Items:' mod='blockuserinfo'}
                                    <span class="ajax_cart_quantity{if $cart_qties == 0} tophidden{/if}">{$cart_qties}</span>
                                    <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='0' mod='blockcart'}</span>
                                    
                                    <a class="price-separator"></a>
    
                                    {l s='Total:' mod='wdshoppinginfo'}
                                    <span class="ajax_cart_total{if $cart_qties == 0} tophidden{/if} price">
                                        {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} tophidden{/if} price">
                                        {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
                                        {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
                                    </span>
								</span>

The only issue I am now having is with the product thumbnail image in the cart not refreshing automatically :(

 

Any thoughts would be most welcome :)

Link to comment
Share on other sites

This is the code I have for the cart including the image thumbnail which Im having problems with:

            <ul id="header_nav">
                {if !$PS_CATALOG_MODE}
                    <li id="shopping_cart">
                        <a href="{$link->getPageLink($order_process, true)}" title="{l s='Your Shopping Cart' mod='wdshoppinginfo'}">
                            <span class="cart-ico"><img src="{$img_dir}/{if $sccop.trendy_theme !=''}{$sccop.trendy_theme}{else}default{/if}_cart.png" /></span>
                            <span class="top-cart">
                                <span class="shop-total">
                                    {l s='Total Items:' mod='blockuserinfo'}
                                    <span class="ajax_cart_quantity{if $cart_qties == 0} tophidden{/if}">{$cart_qties}</span>
                                    <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='0' mod='blockcart'}</span>
                                    
                                    <a class="price-separator"></a>
    
                                    {l s='Total:' mod='wdshoppinginfo'}
                                    <span class="ajax_cart_total{if $cart_qties == 0} tophidden{/if} price">
                                        {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} tophidden{/if} price">
                                        {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
                                        {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
                                    </span>
								</span>
                                

                            </span>
                        </a>

                    </li>
                {/if}	
            </ul>
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...