View Single Post
Old 06-10-2014, 10:49 AM
The Little Shop of Chocs's Avatar
The Little Shop of Chocs The Little Shop of Chocs is offline
Join Date: Mar 2014
Posts: 9
Default Redirect to own page after clearing shopping bag


I'm having the same problem as these people*–

I have used this code – – to redirect my shopping cart buttons back to the front page of the website.

Here is the website –

The code works fine except for the 'continue shopping' button that appears on the 'your shopping bag is empty' page immediately after emptying the shopping bag. Clicking this takes you to the ecwid categories page and not the home page as I would like it to do.

If I navigate away from the page and then click the 'shopping bag' to bring it up again, the button then works as it should.

My understanding of the code is that a replacement button is made with the correct link (with the the class 'clone' added to it) and the original button removed. However, it does not do this when the page is first loaded after emptying the shopping bag. It is added on subsequent visits to this page.

I don't use the category page at all –*I want everything to go back to the homepage. It's only a minor thing but anyone emptying their shopping bag and then clicking 'continue shopping' is now effectively breaking the website.

Could you please tell me how to fix this so that 'continue shopping' button always goes back to the front page? Thanks.