Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
In my Online Store, when my customer clicks the "buy now" button, a checkout should be created with some product variant line items. I have tried some APIs, but all of them do not work very well.
Before starting, some information should be kept in mind:
1. I am only talking about Online Store, the default channel.
2. the store installed an custom app which is created in Shopify Admin. the custom app is not created by Shopify Partner.
Solution 1 : Cart permalink
The trouble is : line item properites is not supported.
Solution 2: Storefront API CheckoutCreate
There are some troubles:
I just use my custom app to enhance the Online Store, if my custom app is treated as Online Store channel, those troubles would gone and Solution 2 would work well.
Solution 3: AJAX API about cart ?
I am going to try. But I am not sure this is a good solution, because :
So, what is the right way to implement the custom checkoutCreate function to enhance Online Store ?
I have the same issue, but I also need to keep track of which products came from my costume app.
I will try using the Shopify API to create a Shopify app to solve this, but not sure if it would produce the same outcome as solution 2.
did the third solution work for you?