If cart is empty, the cart page will redirect to shop page in Shopify

Hura Product Showcase Builder

You want to redirect the cart page to collection page or any pages when the cart page is empty otherwise shows the cart page. It’s simple.

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, and then click Actions > Edit code.
  3. In the Templates directory, click cart.liquid.
  4. Insert below code to the top of this file.

You can replace “/collections/all” with any page URL.

Hura Theme Blocks

You may also like...

1 Response

  1. Rachel says:

    Thank you for this!! For some reason our Shopify’s normal empty cart language doesn’t show, this is an improvement.

    However, it takes a refresh to kick in after a customer empties their cart. Is there any way around this?

Leave a Reply

Your email address will not be published. Required fields are marked *