Can I redirect clicking on this from the cart so that it redirects to my homepage?

Topic summary

Issue: The cart’s product title link was directing to the product page. The store owner wanted it to go to the homepage (one-product store) or be non-clickable.

Context: Shopify, likely the Dawn theme. The change involves editing a Liquid template (Shopify’s templating language).

Solution provided:

  • Edit theme code.
  • Open the main-cart-items.liquid file.
  • Replace instances of {{ item.url }} with {{ shop.url }} (there are two occurrences).
  • Save and test to ensure nothing else breaks.

Outcome: The change worked as intended. The cart item link now redirects to the homepage.

Status: Resolved. No further action requested.

Notes: A screenshot was shared for context, but the fix was purely code-based. Disabling the link entirely wasn’t pursued; instead, the link target was changed to the homepage.

Summarized with AI on December 25. AI used: gpt-5.

When I click it, it redirects to its product page which isn’t what I want it to really do.. I want it to go back to the homepage where my one product store really is. Is this possible or can I disable clicking on this product in the cart altogether?

I assume you’re using Dawn theme?

To link product title in cart line item to homepage instead of product page:

  1. Edit theme code
  2. Open main-cart-items.liquid
  3. Replace {{ item.url }} with {{ shop.url }}
    Note: there should be 2x replacements
  4. Hit save
  5. Test it works and didn’t break anything :upside_down_face:

It worked Thanks!

1 Like