Hello, I’m using Cart transform to make a Bundle product, using an app created by Dev dashboard. In dev store, I can run code in GraphQL dashboard, and create a cart Transform function. when I install the app to online store, how can I do this?
Pls help, thanks!!
Hi Zara,
Is the issue here that everything is working as expected in the dev store that your app is installed on, but if you install it on a live store, it’s not working?
@Liam-Shopify Yes, it works in different dev stores, but it doesn’t work in live store. I don’t know why, and I can’t check the logs, which is very troublesome.
Hi @Zara
Are you using the cartTransformCreate
mutation of each store that’s installing your app?
The flow should be:
- A store installs the app
- You receive an API call to your server
- You verify that this is a new install
- Obtain Offline Access Token
- You run
cartTransformCreate
mutation for that store using Admin API and the access token
Once this is done. It should work for every store.
No, only the dev store runs cartTransformCreate
in the GraphiQL dashboard, so you mean, when installing to a new Live store, It needs to judge, and then run GraphQL to create a cart Transform function, right?
But we did not deploy the app to the server, we just deploy it to Shopify. I read the doc and said that Functions
can be used without deploying the app. In the Cart transform of extensions, it seems that the cartTransformCreate
mutation cannot be run.
Yes. That is correct. In order to run function, you don’t need to have a server.
But in order to make it seamless, you would have to run a graphql mutation for creating Cart Transform on a new store.
Maybe @David-Shopify can shed more light on this.
Thanks for your explanation.
Without Server, I don’t know how to run GraphQL that creates Cart Transform inside the cart-transform extension. So is the server necessary?
@David-Shopify Can you help this? Thank you very much!
Hello @Zara,
Is this a private app or a public app. As functions dont run on private app.
When you are on test store then functions will run but once you are on a live store functions will run only if app is a public app.
To create a cart transform mutation, you must execute a GraphQL API mutation query, which requires a server and a function ID obtained after deploying the function to Shopify.
@Ankit_Shrivastava Thanks for replying.
I created the app in dev dashboard, maybe this is a feature of Shopify Plus. This app can only be installed in this organization. It should be a private app and belongs to this organization only.
Just deploy the cart transform extension to Shopify, I think it couldn’t run GraphQL in this, can I use this function in live store?
@Zara : Unless you are on Shopify Plus you cant have functions related features on private app.
You will have to release app as a public get it approved by Shopify and once published then only you can use that app for a non Shopify Plus store.