Change 'CONTINUE SHOPPING' link destination

Highlighted
Tourist
7 0 2

How do I change my 'CONTINUE SHOPPING' link destination. It currently links to the 'PRODUCTS' page but I would prefer it to link to the 'HOME' page.

I'm using the MINIMAL theme.

1 Like
Highlighted
Shopify Staff
Shopify Staff
47 0 13

Hello Chris! Paul here, from the Guru team.

I can definitely help you out with that! From your admin, you'll just want to head over to Online Store > Themes and then click on the "…" in the top right, and then "Edit HTML/CSS". From here, click on cart.liquid and look for the "continue shopping" code. For me it is around line 193, it might be different for you. If you're having trouble finding it, you can hit CTRL + F or CMD + F if you're on a Mac and type in "continue" to find the code. 

The piece you want to change is the "href = " part. You will want to delete everything between the quotation marks except for  " /". I took a screenshot here so you can see what it will look like!

https://screenshot.click/17-08-nsk5h-eql17.jpg

You can see I have:

href=" /"

This will link that button to the home page! Give a try!

Cheers!

8 Likes
Highlighted
Tourist
6 0 1

Thanks bro, Your tweet helped me to resolve this issue. 

 

 

0 Likes
Highlighted
Tourist
6 0 1

I'd be glad if you can share the steps to shift the search icon towards the cart icon. I'm using venture and by default there is lot of space between those two, I'm trying to align them together so the store do not leave an unprofessional impression on the users. 

 

0 Likes
Highlighted
Tourist
6 0 1

Hi. I had kind of the same queastion and I found the line in my ciode and changed so cuastomer is taken back to collections. But I'd like them to be taken back to the collection where they just came from. Say I have collections: coffee, chocolate and drinks. Customer selected a product from collection colled coffee. How can I take them back to 'coffee'? See my current code below:

 <a href="collections" class="btn btn--secondary cart__update cart__continue--large small--hide" >{{ 'cart.general.continue_shopping' | t }}</a>

So before I had "collections/all" and I changed it to "collections" which is better but not exactly what I want.

Thank you!

 

1 Like
Highlighted
New Member
1 0 0

Hey Paul,

 

I have the same question. the link will bring me to all products collections, but i want it to homepage. The only thing here is that i dont see a href="/" link.. But maybe thats because im using BROOKLYN template. can you help me out? 

 

<header class="section-header text-center">
<h1 class="text-center">{{ 'cart.general.title' | t }}</h1>
<hr class="hr--small">
<p class="cart--empty-message">{{ 'cart.general.empty' | t }}</p>
<p class="cart--continue-browsing">{{ 'cart.general.continue_browsing_html' | t: link: routes.all_products_collection_url }}</p>
<p class="cookie-message">{{ 'cart.general.cookies_required' | t }}</p>
</header>

 

kind regards,

Alida

0 Likes
Highlighted
Tourist
4 0 1

I know this is an older thread but I ran into the same issue so I figured I would share how I solved it in case it helps others.  I am using the TURBO theme, so the code might not be identical but the overall solution should be the same.

I went into the edit code > Section > cart-template.liquid file and did a search for "Continue" which lead me to the below section of code:

----------------original code-------------

{% if cart.item_count == 0 %}
<div class="sixteen columns">
<div class="section clearfix">
<div class="six columns offset-by-five medium-down--one-whole">
<p class="quote">{{ 'cart.general.continue_browsing_html' | t }}</p>

<a href="{% if cart.items.first.product.collections != blank %}{{ cart.items.first.product.collections.last.url }}{% else %}{{ routes.all_products_collection_url }}{% endif %}" class="action_button continue-button add_to_cart">{{ 'cart.general.continue_shopping_link_html' | t }}</a>
</div>
<br class="clear" />
</div>
</div>
{% else %}

----------------------------------------

In the middle you can see an a href with an if statement that basically says to either link customers to the original collection or to the all products collection.  I just replaced the tag for "all products collection" (red text) and swapped it out for the liquid tag for the default store url (home page URL), see below (red).

----------New Code-----------------

{% if cart.item_count == 0 %}
<div class="sixteen columns">
<div class="section clearfix">
<div class="six columns offset-by-five medium-down--one-whole">
<p class="quote">{{ 'cart.general.continue_browsing_html' | t }}</p>

<a href="{% if cart.items.first.product.collections != blank %}{{ cart.items.first.product.collections.last.url }}{% else %}{{ shop.url }}{% endif %}" class="action_button continue-button add_to_cart">{{ 'cart.general.continue_shopping_link_html' | t }}</a>
</div>
<br class="clear" />
</div>
</div>
{% else %}

---------------------------------

This solved it for me, so now when the cart is empty the CONTINUE SHOPPING button now links users to the home page. 

- Derrick

1 Like
Highlighted
New Member
1 0 0

Hello, I have a canopy template. I can't find the code in the cart.liquid file to change the destination from all products to the home page. 

Thank you

0 Likes
Highlighted
New Member
1 0 0

Thanks so much for sharing, it was driving me nuts!!

I had to change it in two place for the Minimal theme and used your tips! It works and now I can move on to the next

-Amber

0 Likes
Highlighted
New Member
1 0 1

I'm using the Simple theme, and I wanted to change from all the products to the Collections, as we keep out of stock products in the system for when they come back again. The nature of our business is that we have a lot of rotation, and special editions and so have as many things out of stock as in stock at one time. So we needed the continue shopping just to go back to the Collections page. Here is what I did:

Go to THEMES. Click on Actions drop down and select Edit code. Click on cart-template.liquid.


Now find:  (near the top)

{% if cart.item_count > 0 %}
<div class="cart-header">
<h1 class="cart-header__title">{{ 'cart.general.title' | t }}</h1>
<a href="/collections/all"

Remove the /all so that it just shows:  <a href="/collections"

That does the trick and takes you from the cart page to the collections page from the Continue Shopping link. 

1 Like