Continue Shopping...

While it’s great to add an item to the cart, then automatically go to the cart to see what you’ve put in it, sometimes you’d prefer to stay at the current product. Essentially, add the product and encourage the customer to continue shopping.

This post is not a full fledged tutorial about this topic as you can do all kinds of cool stuff with Javascript (AJAX), this article is intended to give you a quick and easy way to stay put after adding a product to the cart. Plus, it doesn’t rely on Javascript.

All we’re going to do is add a single line of code INSIDE the cart form in product.liquid. So, open product.liquid and locate the opening form tag…

<form action="/cart/add" method="post">

and add the following line immediately beneath it…

<input type="hidden" name="return_to" value="back" />

Save. If you watch the URL while adding the product to the cart, you’ll see it quickly add the product then return to the current product URL. Obviously, to really make this effective you’d want to notify the user that the product has been added and encourage them to continue shopping, but this is a start.

Posted by Jared Burns on August 22, 2007.
Krop creative jobs
Auction Ads increase your site's income

About Vogue

Subscribe

Recent Weblog Entries

Best Sellers