Jump to content

Close Window With Button In Block Cart Module


mlfrey

Recommended Posts

Could anyone tell me how to close the cart window with the Continue Shopping button in the cart (please see screen shot.) What code would I include in blockcart.tpl?  Currently for the button I have:

 

{if $order_process == 'order'}<a href="{$link->getPageLink("$order_process", true)}" class="button_mini" title="{l s='Cart' mod='blockcart'}">{l s='Continue Shopping' mod='blockcart'}</a>{/if}

 

Any help would be greatly appreciated! post-597350-0-75835000-1389222506_thumb.jpg

Link to comment
Share on other sites

This is Prestashop 1.5.6. The cart in this theme does not close on its own...you need to click the small arrow beside the word CART in the screenshot to make it close. However, I think this may confuse some customers, so I added the Continue Shopping button for them to click, close the cart and continue shopping on the same page. Any ideas to make this work?

Link to comment
Share on other sites

  • 2 years later...

Hello, since the topic hasn't been closed, I decided to report a bug on a page im working on at the moment.
http://www.masarnia-smakosz.pl

The block cart doesn't close when on mobile on tapping the top bar of the expanded cart. I added the 'continue shopping' button just to allow exiting the expanded cart.
I couldn't find neither solution for this behaviour nor it's cause. 

Link to comment
Share on other sites

Ahh The legendary support from the Prestashop team. I've been browsing forums and tinkering with the code to no satisfactory effect - still handn't found the bug causing block cart to remain expanded when on mobile. Tried so far:
assign 'collapsed' to smarty in blockcart.php - the cart remains open on refresh. 
disabling my custom css - it wasn't the culprit
disabling ajax cart functionality in the BO and writing some custom js to handle cart toggle - the page start with cart expanded (although in blockcart.php i stated:

if (isset($this->context->cookie->ajax_blockcart_display))
$this->smarty->assign('colapseExpandStatus', '$this->context->cookie->ajax_blockcart_display');
$this->smarty->assign('colapseExpandStatus', 'collapsed');
}

) - when collapsing cart, the cart indeed collapses, but the page reloads to expanded cart.

 

The arrow for closing the cart seems functional - it does change the display - but as i can see in firefox console, some other function is forcing the cart to remain expanded.

the site in question is www.masarnia-smakosz.pl

I would appreciate any input as im running out of ideas here.

Edited by jorgezar (see edit history)
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...