Awesome! In a real Shopify environment, clicking **Checkout** redirects the customer to a secure Shopify Checkout page.
Since we are designing custom pages, we can connect this basket to Shopify easily using one of these two methods:
Method 1: Shopify Buy Button JS SDK (Recommended)
We load the Shopify JavaScript SDK. When a user clicks checkout, our code makes a cart creation call with their product Shopify IDs, returns a redirect checkout URL, and navigates them directly to your Shopify domain checkout page.
Method 2: Shopify Storefront API
Using a GraphQL endpoint, we send the cart payload to Shopify and open the resulting checkout url. This allows you to have a fully custom, fast Pinterest-style storefront while Shopify handles the payment secure transactions!
Thank you for reviewing Vaish's Custom Studio Concept! ๐ธ