I would like to change the destination of the “continue shopping” button in my shop. I already changed the path in the code of the underlined button and also the normal button and it only worked for the underlined button but not for the normal button. I use the sense theme.
Hey @yikess
You have reached the German community here but we can chat in English too, that’s no problem!
To change the destination of the “Continue Shopping” button in your Shopify Sense theme, you typically need to edit the theme’s code. The following steps are general process and I highly advise to do this first in a theme copy, not in the live theme.
-
Accessing the Theme Code:
- Log in to your Shopify admin.
- Go to Online Store > Themes.
- Find your Sense theme, click Actions, and then Edit code.
-
Finding the Relevant File:
- The “Continue Shopping” button’s behavior is often defined in a file related to the cart, such as
cart.liquidor a similar template or section file.
- The “Continue Shopping” button’s behavior is often defined in a file related to the cart, such as
-
Editing the Button’s Destination:
- Once you’ve located the code for the “Continue Shopping” button, you can change its path by modifying the
hrefattribute within the<a>tag that defines the button. For example, if the existing code looks something like<a href="/collections/all">Continue Shopping</a>, you can change the/collections/allpart to the desired path.
- Once you’ve located the code for the “Continue Shopping” button, you can change its path by modifying the
Given that you’ve already attempted to change the path and it worked for the underlined button but not the normal button, it’s possible that there are multiple instances or types of “Continue Shopping” buttons defined in different parts of the theme’s code. Consider these additional steps:
-
Check for Multiple Definitions: There might be more than one place in the theme where the “Continue Shopping” button is defined. This can include different files or different sections within the same file, especially if the theme has separate handling for mobile and desktop views or different states of the cart (empty vs. containing items).
-
Search the Entire Theme: Use the search function in the Shopify code editor (usually accessible with
Ctrl + ForCmd + F) to search for all instances of “Continue Shopping” or related URLs to ensure you’ve found all the references that need to be updated. -
Review Theme Documentation or Support: Some themes, including Sense, may have specific instructions or support forums where similar questions have been answered. Checking the theme’s documentation or reaching out to the theme developer for support can also provide theme-specific guidance.
If these steps do not resolve the issue, it could be helpful to review the theme’s documentation for any notes on this functionality or to reach out to Shopify’s support or the theme developer for more detailed assistance.
Here the resources for the above:
I looked for another place where to edit the code and was able to change the redirection. Thank you for your support!