Skip to main content
Donna Sofia
Contributor I
Contributor I
August 10, 2024
Solved

Abandoned Cart email {{ event.extra.checkout_url|default:organization.url }} links to homepage

  • August 10, 2024
  • 3 replies
  • 1965 views

From the Klaviyo suggested flows i setup the abandoned cart email flow, triggered by the Shopify “Checkout Started” Event. 
However the preset dynamic link {{ event.extra.checkout_url|default:organization.url }} points the button to the homepage not the individual cart.

I also tried {{ event.extra.responsive_checkout_url|default:organization.url }} and static link {{ event.extra.checkout_url }}, they both point to the homepage not to the cart.

I have no idea now hot to setup the correct link to the cart? Thanks a lot:))))

    Best answer by bluesnapper

     Hi @Donna Sofia 

    I’ve had this issue before with Shopify with the standard checkout url redirecting to the home page even though it’s been working OK previously. I never really got to the bottom of it.

    However, adding this as the link to the return to checkout button works (provided to me by Klaviyo support):

    {% with event.extra.line_items as items %}{{ organization.url|trim_slash }}/cart/{% for item in items %}{{ item.variant_id }}:{{ item.quantity|floatformat:'0' }}{% if not forloop.last %},{% endif %}{% endfor %}{% endwith %}?checkout%5Bemail%5D={{ email }}

    Hope that helps

    Andy

    3 replies

    ArpitBanjara
    Principal User II
    Principal User II
    August 12, 2024

    Hey @Donna Sofia 

    This is indeed weird

    I would suggest reading this answer to a similar question someone had posted a while back

     

    I would suggest contacting klaviyo chat support if the issue still persists, and they would be able to look into this in more detail as you can share them a link to your template.

    I hope this helps and thank you for being part of the community

    Cheers

    Arpit

    Arpit Banjara - Lead Email Marketing Specialist at Flowium
    bluesnapper
    Partner
    Champion & Partner
    August 12, 2024

     Hi @Donna Sofia 

    I’ve had this issue before with Shopify with the standard checkout url redirecting to the home page even though it’s been working OK previously. I never really got to the bottom of it.

    However, adding this as the link to the return to checkout button works (provided to me by Klaviyo support):

    {% with event.extra.line_items as items %}{{ organization.url|trim_slash }}/cart/{% for item in items %}{{ item.variant_id }}:{{ item.quantity|floatformat:'0' }}{% if not forloop.last %},{% endif %}{% endfor %}{% endwith %}?checkout%5Bemail%5D={{ email }}

    Hope that helps

    Andy

    https://bluesnapper.com - Klaviyo Champion '24 & Partner
    Contributor I
    January 16, 2025

    Hi Andy, 

    I had the same issue as Donna and the link you provided has worked to fix it so thank you! 

    I was wondering if you knew of a way to integrate a coupon code into the link? Currently am using {{ event.extra.checkout_url }}?discount={% coupon_code 'CH10' %}, however this is still redirecting to my home page. 

    Thanks, 

    Sarah