When clicking on Add to Cart, can I redirect to a page instead of to the Cart ?

Highlighted
Shopify Partner
2 0 0

Hello everyone,

When a person is at a product page and clicks "Add to Cart", I want the click to add the product to the cart and at the same time redirect him to one of my custom pages. Currently it redirects to the Cart directly, as it is standard, and I know it is possible to redirect straight to ckeckout or not redirect at all, but I am digging into the code for a while now and can't find a way to redirect to a specific page within my store. Is there a way to do that? I am using the Brooklyn theme.

Will appreciate any help, thanks a lot!

0 Likes
Shopify Expert
2684 67 791

Hey Olga,

yes, it's possible if you do not use the Drawer cart, simply add the code similar to this inside your add to cart form:

 <input type="hidden" name="return_to" value="/collections/all" />

Put whatever URL you like into the value.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
I am away till Feb-15.
2 Likes
Highlighted
Shopify Partner
2 0 0

Yes, that totally works! Thank you so much for your help! 

0 Likes
Highlighted
New Member
2 0 0
Hello guys!
It's possível to make that tweak and also redirect the client to the Cart page on the second page?

I.e:

Page 1 - Click on ATC Button = product added to the Cart+redirect to Page 2
Page 2 - Click on ATC Button = product added to the Cart + redirect to the Cart.

---
Btw, can It be done to work Just with one specific product/tag?

Thanks!!
0 Likes
Highlighted
New Member
2 0 0

Where do I put this code? 

0 Likes
Highlighted
New Member
3 0 0

Hello,

I'm working on a similar problem using the Venture Theme. I've found variations upon what I need, but not an exact same request and I can't seem to make it happen!

We're a University bookstore and offer an on-campus "Smile" gift/treat delivery program. When someone orders an item from the "Smile" collection, we need to collect some information about the on-campus student they want it delivered to: name, dorm name, dorm room number and a card message. I'm totally open to any way of doing this, I'd just like a way to redirect them right onto the form page when they order a product from the "Smile" collection. 


Can you help me to automate the information collection process? What I need:

  1. When a customer adds "Smile" product to cart
  2. They should be redirected to a page where they can fill out a form

Would it be better 

  • When they add the product to the cart — then direct to a page, fill out the form, go back to the cart and pay
  • Upon finishing payment and clicking "pay now" they are redirected to the form

 

Last year I had a link to a page they had to divert to — they had to click on a link and go to for the form and, as you can imagine, people got confused and information didn't get collected and I expect we lost a lot of sales.

 

Thanks for any help!!

0 Likes