How to change continue shopping link in venue them?

Hi,

I am trying to change continue shopping link to our home page but when you have items in cart and click on it, it stays on the product page. If the cart is empty and we click on it, it goes to home page. We are using modal cart.

It works fine if we use full page cart but not in modal cart.

Can someone please assist?

Hi @Decorfaure

This is Noah from PageFly - Shopify Page Builder App

Please change the code from your cart .liquid file to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: find the cart file, it should be "cart container.liquid " or “cart.liquid”. After that press Ctrl + F to search for this keyword : ajaxcart__continue
Step 3: Change the href property from “#” to your homepage url

Note: if you can’t find the file, please open the edit code > search for cart > take screenshot and let me take a look

Hope this can help you solve the issue

Best regards,

Noah | PageFly

Hi @Decorfaure , Double check your theme settings under cart/cart-drawer or product templates etc

To customize that it’s two separate areas of code you need to find.

One is when you are actually on the cart page which can probably be ignored main-cart.liquid or a similar name.

The other is when you put something in the cart on product pages , possibly in a snippet called cart-drawer.liquid cart-popup.liquid etc. Though the logic is possibly also within the main-cart section logic as well.

If you need this customization then contact me directly by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.

Thanks for your reply. Can’t find ajax cart but here is the code. As I mentioned, it takes to home page if we use full page cart but not in modal cart.

{{ 'cart.general.title' | t }}

{% if cart.item_count > 0 %}

{{ 'cart.label.product' | t }}

{{ 'cart.label.price' | t }}

{{ 'cart.label.quantity' | t }}

{{ 'cart.label.total' | t }}

{% for item in cart.items %}

{{ item.product.title }}

{% unless item.variant.title contains ‘Default’ %}

{{ item.variant.title }}

{% endunless %}

{% assign property_size = item.properties | size %}
{% if property_size > 0 %}
{% for p in item.properties %}
{% unless p.last == blank %}

{{ p.first }}

{% if p.last contains '/uploads/' %}

{{ p.last | split: '/' | last }}

{% else %}

{{ p.last }}

{% endif %} {% endunless %} {% endfor %} {% endif %}

{% if settings.cart_vendor_enable %}

{{ item.vendor }}

{% endif %}
{% if item.original_price != item.final_price %}
{{ item.original_price | money }}
{{ item.final_price | money }}
{% else %}
{{ item.final_price | money }} {%- if item.unit_price_measurement -%} {{ 'products.general.unit_price_label' | t }} {%- capture unit_price_separator -%} /{{ 'products.general.unit_price_separator' | t }}  {%- endcapture -%} {%- capture unit_price_base_unit -%} {%- if item.unit_price_measurement.reference_value != 1 -%} {{- item.unit_price_measurement.reference_value -}} {%- endif -%} {{ item.unit_price_measurement.reference_unit }} {%- endcapture -%} {{ item.unit_price | money }}{{- unit_price_separator -}}{{- unit_price_base_unit -}} {%- endif -%}
{% endif %}
{% if item.original_line_price != item.final_line_price %}
{{ item.original_line_price | money }}
{% if item.line_level_discount_allocations.size > 0 %}
{% for discount_allocation in item.line_level_discount_allocations %}

{{ discount_allocation.discount_application.title }} (-{{ discount_allocation.amount | money }})

{% endfor %}
{% endif %}
{{ item.final_line_price | money }}
{% else %}
{{ item.original_line_price | money }}
{% endif %}
{{ 'cart.general.remove' | t }}

{% endfor %}

{% if settings.cart_notes_enable %}

{{ 'cart.general.note' | t }} {{ note }}
{% endif %}
{%- if cart.cart_level_discount_applications != blank -%} {%- for discount_application in cart.cart_level_discount_applications -%}

{{ discount_application.title }} (-{{ discount_application.total_allocated_amount | money }})

{%- endfor -%} {%- endif -%}

{{ 'cart.general.subtotal' | t }} {{ cart.total_price | money }}

{{ 'cart.general.shipping_at_checkout' | t }}

{% if settings.cart_terms %}

{{ 'cart.general.cart_error' | t }} {{ settings.cart_terms_text }}
{% endif %}
{{ 'cart.general.update' | t }} {{ 'cart.general.checkout' | t }} {% if settings.cart_continue %} {{ 'cart.general.continue_shopping' | t }} {% endif %}
{% else %}
{{ 'cart.general.empty' | t }}
{{ 'cart.general.empty_link' | t }}
{% endif %}

Don’t paste the entire code of theme files, curate the exact thing in question or an area:

  1. Don’t expect people to read all that it’s a wall of unformatted text, minimize the amount of code being discussed. and use the code formatting buttons
  2. You only have license for the theme code on your store not to share it publicly. Use the 3 dots on your post to edit the post to remove as much code as possible.

You’d basically be looking through the files for “cart.general.continue_shopping” which is what puts the text in the button for the buttons in both scenarios.

@Decorfaure Can you help search for cart in the theme code like this screenshot?

Because seems like the code you paste above is the code for cart page not cart popup

Thanks for your message.

Please change this part {{ routes.root_url }} in this code

{% if settings.cart_continue %}
{{ 'cart.general.continue_shopping' | t }}
{% endif %}

To your homepage link

Hi,

Thanks for your reply. We have tried doing that. It works and goes to home page if cart is empty but if there are items in cart and we click on continue shopping, it stays at the item page.

You must change URL in ajax-cart-template.liquid file also.

Still not going back to home page when there are items in cart?

Hi,

There is no such file as “cart.general.continue_shopping”

Go to your Online store > Themes > Customize > Theme settings > Cart, inContinue shopping link, add your homepage link in Link

Option not there

Could I send request to access your store so I can check and solve it for you?

Sure, we have duplicated and created a TEST theme to solve it as we don’t want to mess up with live version.

1 Like

Please accept the request

Hi @Decorfaure Does the issue has been solved?