Change destination link "Continue Shopping" button in cart

Solved

Change destination link "Continue Shopping" button in cart

starscream911
Explorer
52 0 14

Hello! 

 

I want to change the destination of the "continue shopping" button from "products" to a chosen collection.

How can I achieve this? Theme Spotlight.

my website: www.elysiumreads.com 

Accepted Solution (1)
DaisyVo
Shopify Partner
4385 486 579

This is an accepted solution.

If you found it, please follow the guide I provide above

 

Please follow these steps to change the destination:


1. Go to `Cart.drawer.liquid`.
2. Find the code and replace the part within `{{...}}` with part of the URL after the domain you want to redirect to, as needed https://prnt.sc/JTShfanb_NGH 

 

Best,

 

Daisy 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 15 (15)

Moeed
Shopify Partner
7375 1996 2438

Hey @starscream911 

 

You will have to change the href link from your theme files if you wanna change the link, I'm not exactly sure about the file name but it should be something like cart.drawer.liquid. Feel free to let me know if you want me to help you out with that and I'll be more than happy to give you a helping hand.

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


starscream911
Explorer
52 0 14

Just tried it and it doesn't work. 

DaisyVo
Shopify Partner
4385 486 579

Hi @starscream911,

I hope you are doing well

 

I noticed that you want to change the link when clicking on the "Continue Shopping" button.

I checked on the cart page, and there are two instances:

  1. When the cart is empty, there's this button:
    Screenshot 1
    The code location is here:
    Screenshot 2

  2. When there is an item in the cart, there's this button:
    Screenshot 3
    The code location is here:
    Screenshot 4

Both instances are in the same file: main-cart-items.liquid.

To update the link to the desired collection:

  • Go to the specific collection you want to link to.
  • Copy the part of the URL after the domain, as shown here:
    Screenshot 5
  • Replace the current link in the code with the new one like this:
    Screenshot 6
  • Save the changes.

I hope this helps! Let me know if you have any questions!

 

Best regards,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
starscream911
Explorer
52 0 14

Hello! Did exactly as you told me, but it didn't work.

For some reason the link I paste do not work properly. Check screenshots.

clipboard_image_bbfa30d6a175ecd.jpgclipboard_image_da0f4bb03507d4f9.jpg

DaisyVo
Shopify Partner
4385 486 579

Hi @starscream911 

 

Could you please confirm if I’m editing the correct button? If I'm not mistaken, this is the "Continue" button you mentioned, correct? [Screenshot](https://prnt.sc/NqE9dEDO6w2H).

 

If that’s correct, please follow these steps to change the destination:
1. Go to `Cart.drawer.liquid`.
2. Find the code and replace the part within `{{...}}` with `/collections/all-products`, as needed https://prnt.sc/JTShfanb_NGH 

 

Hope this helps! Let me know if you have any questions.

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
starscream911
Explorer
52 0 14

Hello! 

I don't have code in this section, please check screenshot and suggest me something new.clipboard_image_3844c62bcfafaf4d.jpg

DaisyVo
Shopify Partner
4385 486 579

Hi @starscream911 
I see you have 2 cart-drawer.liquid file, could you please find it in the below cart-drawer.liquid?

 

DaisyVo_1-1730290458641.png

Best,

 

Daisy

 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
starscream911
Explorer
52 0 14

okay, cart-drawer.liquid. now what?

starscream911
Explorer
52 0 14

Hello! Can you respond please?

DaisyVo
Shopify Partner
4385 486 579

Hi @starscream911 

Do you find the same code here in the second cart-drawer.liquid? 

 

DaisyVo_0-1730292423925.png

 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
starscream911
Explorer
52 0 14

yes. what should i do now?

DaisyVo
Shopify Partner
4385 486 579

This is an accepted solution.

If you found it, please follow the guide I provide above

 

Please follow these steps to change the destination:


1. Go to `Cart.drawer.liquid`.
2. Find the code and replace the part within `{{...}}` with part of the URL after the domain you want to redirect to, as needed https://prnt.sc/JTShfanb_NGH 

 

Best,

 

Daisy 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
starscream911
Explorer
52 0 14

It worked. Thank you! 

Connor
Visitor
1 0 0

Hi there,

 

I just tried this, I changed:

<a href="{{ routes.all_products_collection_url }}" class="button">
{{ 'general.continue_shopping' | t }}
</a>

to:

<span class="svg-wrapper">
{{- 'icon-close.svg' | inline_asset_content -}}
</span>
</button>
<a href="https://uk.onetime.sport/" class="button">
{{ 'general.continue_shopping' | t }}
</a>

My continue shopping button on the thank you page still goes to https://store.onetime.sport/.

I'm using Dawn - any ideas.

Thanks for the help!

starscream911
Explorer
52 0 14

can you please answer me?