FROM CACHE - de_header

buybutton.js redirect to full cart

Gelöst
tastisch
Neues Mitglied
1 0 0

We're using buybutton.js and want to get a redirect to the full version of the cart instead of redirecting directly to the checkout. The idea behind this is, that we can make use of shopify-plugins (i.e. recommended products). Any ideas/solutions?

1 AKZEPTIERTE LÖSUNG

Anerkannte Lösungen
Gabe
Shopify Staff
Shopify Staff
7458 1196 1936

Erfolg.

Hey @tastisch 

That's a great question and let's see what options there are.

You want to know if there is a way that you can generate a Buy Button URL to the cart instead of the checkout by generating a cart URL with products added from the Buy SDK, right?

Reasons for this are, as you say yourself, to be able to make use of shopify-plugins (i.e. recommended products), or even enhanced tracking as well as adding custom properties and attributes to your products before going to the checkout, is that right?

In the future we'll be looking at a better way of doing this so that we can send users straight to the cart or checkout. But for the time being it would be great to be able to generate a cart URL with products added from the Buy SDK.

There isn't currently a way to do this as far as I know. The checkout permalink does pre-load the cart, but it takes the user directly to the checkout. As far as I know, there's no way to force the user to return to the cart page. Additionally, checkout permalinks don't support line item properties at the moment. Depending on your solution, you might be able to extract the variant id and quantities from the cart, and build a hidden form and submit it like in this community thread.

Perhaps you can send the user to a custom page to add your custom properties and attributes, and then send them to the checkout page?

Gabe | Social Care @ Shopify
 - War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen! 
 - Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung 
 - Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog

Lösung in ursprünglichem Beitrag anzeigen

1 ANTWORT 1
Gabe
Shopify Staff
Shopify Staff
7458 1196 1936

Erfolg.

Hey @tastisch 

That's a great question and let's see what options there are.

You want to know if there is a way that you can generate a Buy Button URL to the cart instead of the checkout by generating a cart URL with products added from the Buy SDK, right?

Reasons for this are, as you say yourself, to be able to make use of shopify-plugins (i.e. recommended products), or even enhanced tracking as well as adding custom properties and attributes to your products before going to the checkout, is that right?

In the future we'll be looking at a better way of doing this so that we can send users straight to the cart or checkout. But for the time being it would be great to be able to generate a cart URL with products added from the Buy SDK.

There isn't currently a way to do this as far as I know. The checkout permalink does pre-load the cart, but it takes the user directly to the checkout. As far as I know, there's no way to force the user to return to the cart page. Additionally, checkout permalinks don't support line item properties at the moment. Depending on your solution, you might be able to extract the variant id and quantities from the cart, and build a hidden form and submit it like in this community thread.

Perhaps you can send the user to a custom page to add your custom properties and attributes, and then send them to the checkout page?

Gabe | Social Care @ Shopify
 - War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen! 
 - Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung 
 - Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog