Headless commerce and custom storefronts with Shopify APIs and SDKs
Hi,
I added a JS to make a bar on top of the store, using admin app. As a result, I got my bar with text inside of it. However, the goal is not merely have text but to make a free shipping application. Like the attached image.
To do that, I need to collect information from the checkout, I believe I must have one end point from the frontstore to access the check-out, so I need to make a request to graphql for inserting data in my Script.
The problem I am facing is that I have do an authentication on the server to obtain the data on the checkout, regardless this information is public (I believe so), as far as my understanding the customer can access the information of the total price that is in the cart.
Is there any possibility to explain me how I can do this?
Nothing in these links below are relevant to my question:
https://shopify.dev/docs/storefront-api/getting-started
https://shopify.dev/tutorials/create-a-checkout-with-storefront-api
PS: I got 403 error in the fetch for the graphql, after it was added it to my store.
code: Url: https://testezarbo.myshopify.com/api/2020-04/graphql.json
fetch(url, { | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify( '{ shop { name } }' ), | |
}) |
Hello!
If your goal is to check the total amount of the current cart, you can use Shopify's AJAX Cart API here: https://shopify.dev/docs/themes/ajax-api/reference/cart#get-cart-js - it doesn't needs authentication nor GraphQL/REST.
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By