Skip to main content
Solved

Abandoned cart flow : Magento 2 checkout reclaim URL send me to 404 error


Forum|alt.badge.img+2

In our abandoned cart workflow, I’m using {{ organization.url }}reclaim/checkout/cart?quote_id={{ event.QuoteID }} as the button link. When clicked, I’m getting a 404 error code page. We use Magento 2 for our website, so wondering why the Magento 2 dynamic cart rebuild link isn’t working.

Best answer by breeatnorthern

Hi @ngriffith!

In your Klaviyo account settings, check your organization URL. If the URL contains a slash at the end, it may be causing a double slash in the cart rebuild URL and is therefore rendering a 404.

Try the following, which includes an additional little piece of information within the variable that tells Klaviyo to remove the slash out of your URL when creating a customer’s rebuild cart link. You’ll notice it includes “|trim_slash” after the organization.url variable.

{{ organization.url|trim_slash }}/reclaim/checkout/cart?quote_id={{ event.Extra.QuoteID }}
 

Hope this solves it for you!

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Forum|alt.badge.img+4

Hi @ngriffith!

In your Klaviyo account settings, check your organization URL. If the URL contains a slash at the end, it may be causing a double slash in the cart rebuild URL and is therefore rendering a 404.

Try the following, which includes an additional little piece of information within the variable that tells Klaviyo to remove the slash out of your URL when creating a customer’s rebuild cart link. You’ll notice it includes “|trim_slash” after the organization.url variable.

{{ organization.url|trim_slash }}/reclaim/checkout/cart?quote_id={{ event.Extra.QuoteID }}
 

Hope this solves it for you!


David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • January 5, 2022

Hello @ngriffith,

Welcome to the Klaviyo Community!

From the URL you’ve shared, it looks like the 404 page may be caused by a syntax error as you’re missing a } at the end of your URL. I would suggest using the following URL and see if that helped alleviate the issue: {{ organization.url|trim_slash }}/reclaim/checkout/cart?quote_id={{ event.Extra.QuoteID }}

From my experience, if you’re still being returned to a 404 page, this may indicate an error between your Magento and Klaviyo integration. To resolve this, I recommend checking in your backend to ensure the two softwares are connected appropriately. You can also reach out to our Klaviyo Support Team to further see if there are any integration issues apparent within your Klaviyo account. 

One more additional note to keep in mind is that when previewing the email, the cart page you are brought to may be empty. This is an expected behavior if the user you were previewing the email as has since completed their purchase as I explained in the following Community post: 

I hope this helps!

David