Jump to content

redirect back to homepage if customer sets shopping cart to 0 or removes product


Recommended Posts

Looking at shopping-cart.tpl I see there is a condition statement if cart is set to empty there is a

warning with the statement: "Your shopping cart is empty". Then the page stays there with just the yellow box warning statement.

I would like to remove that warning box and just have user redirected back to the site homepage.

If any one can provide html code to redirect that would be great!

Thanks,

Andy

Link to comment
Share on other sites

  • 3 months later...

For the express cart plugin you can do this by adding:

>.../* Default page */
>...Tools::redirect('index.php');


in express-order.php on line 456

Pretty sure it will be the same for the core system where you need to edit the shopping_cart.php to insert a redirect using Tools::redirect(); when directing the page from a recently emptied cart.

Link to comment
Share on other sites

  • 1 year later...

I would like to redirect the user to the index page if the cart is emptied. I am using a small simplified cart (blackwhite theme) and I don't know which file (or where) to make changes for that? If anybody knows that would be great! The suggested file above I can't find, have tried several others but as I don't know php it's very difficult for me.

Link to comment
Share on other sites

×
×
  • Create New...