Liquid, JavaScript, Themes
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?
Gelöst! Zur Lösung
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
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
Shopify unterstützt die weltweit innovativsten Marken und Unternehmer:innen. Um Unterne...
By SarahF_Shopify Mar 25, 2024Was ist ein kleines Element eines Shopify Shops mit großer Wirkung? Ein Element ganz we...
By Kai Mar 14, 2024Was genau ist POD? Von T-Shirts bis hin zu Plakaten, Kaffeetassen, Wandmatten, alles was m...
By Kai Feb 29, 2024