Trouble activating cart transform extension

wmccracken
Shopify Partner
1 0 0

We are having trouble activating a cart transform extension on our Shopify store

When querying the store access-scopes, we are seeing “read_cart_transforms and write_cart_transforms”, and so we know we have those access scopes enabled.

However, when attempting to make the following mutation, we are consistently getting this error: “GraphqlQueryError: Access denied for cartTransformCreate field. Required access: write_cart_transforms access scope. Also: The user must have products and preferences permission to
create a cart transform function”
          mutation {
            cartTransformCreate(functionId: “XXXXX”) {
              cartTransform {
                id
                functionId
              }
              userErrors {
                field
                message
              }
            }
          }
We’ve checked user permissions and all seem enabled.
Any help is appreciated, thanks!

Replies 9 (9)

Liam
Shopify Staff
2731 299 769

Hi Wmccracken,

 

This error does seem to point to a permissions issue. Even though you're seeing `read_cart_transforms` and `write_cart_transforms` when querying the store's access scopes, it's possible that the user or app making the actual API request doesn't have these scopes - can you confirm that the user or app making the request has been granted these scopes? When you checked user permissions, these were the permissions at Settings > Users and Permissions, correct?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Koffein
Shopify Partner
5 1 1

Hey Liam,

 

any updates on this? I have the same issue and also as `Sillycube` mentioned, I could only make the mutation query work to install my extension in a "checkout extensibility" preview activated develop shop.

 

I don't wanna have to redo everything in the main dev shop to install the app + extension, any ideas?

jam_chan
Shopify Partner
894 23 175

I've added the write_cart_transforms access scopes to my app. However, when I activate cart transform for a new user, it gives me "Access denied for cartTransformCreate field. Required access: `write_cart_transforms` access scope. Also: The user must have products and preferences permission to create a cart transform function."

 

If the user who installed the app doesn't have the products and preferences permission. How can I deal with this issue? Sometimes, a partner may help the store owner with the setup and I can't take control of this situation.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

jam_chan
Shopify Partner
894 23 175

I have the same issue. When I use another user in another 2 dev stores, I can run this graphql.

When I use the API key, it's not working. But I already include the write_cart_transforms into my scopes and grant permission.

 

Then I check the dev stores I was using, 2 stores have the checkout extensibility preview and the failed one doesn't have this. So I guess this is the cause.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

Tuckey
Shopify Partner
10 2 9

Did you manage to get this working? I am currently having the same issue, I've double checked the permissions for both app and user, and have run the function on the store owner's account via The GraphiQL app. 

Worked perfectly fine on my partner development store, but there seems to be a hiccup when taking it to a real Shopify Plus store. 

philip_beauford
Shopify Partner
6 0 1

Same issue, am not able to see any runs and all correct access scopes are given and used a cart transform dev preview store. The bundle tutorials for the Cart Transform API are ok but all I'm trying to do is hide a line item price using the updateOperation. Am not seeing any activity for this extensions and it is installed. I am guessing I may need a GraphQL mutation of some kind but without clearer docs I don't know where to look for that.

Anthony_Gorilla
Shopify Partner
7 1 2

I'm having the same issue. It runs on my dev store but does not run when installed to the real store. I enabled the function via the graphql mutation as well which was successful. However I see no runs for the cart-transform in the logs. I have another extension in the same app which does run. Of course I did double check the scopes and the permissions are correct. Did you figure this out?

Anthony_Gorilla
Shopify Partner
7 1 2

Figured one part out. Unpublish all shopify scripts. But I still can't see any logs for failed runs in the partner store

Jon_Innovonics
Shopify Partner
23 2 6

If anyone comes across this post first as I did, there is another one which has a bit more context as to why you are receiving this error.
This post in particular, the solution:

In case anyone else has this issue and finds this post, some other apps can cause incompatibilities for Cart Transforms which SBD_ confirmed for me in DMs. 

 

To find this I ran the below query:

{
  shop {
    features {
      bundles {
        eligibleForBundles
        sellsBundles
        ineligibilityReason
      }
    }
  }
}
Copy

 

Which returned "Shopify Bundles isn't available yet for this store.", which after Googling led me to finding SimpleBundles help article which stated that having certain apps installed can cause incompatibility.

 

In my case, I had one of these installed. So if you're sure that you have the right permissions, and are blocked by:

"Access denied for cartTransformCreate field. Required access: `write_cart_transforms` access scope. Also: The user must have products and preferences permission to create a cart transform function."

 

 

 

The link they include to the Simple Bundles site provides multiple possibilities:

Additionally, if you encounter the message "Shopify Bundles isn't available yet for this store," follow the checklist below to ensure compatibility:
  1. Unpublish any Shopify Scripts that your store hasn't installed or never had.
  2. Ensure that your store isn't utilizing checkout.liquid customizations or features. Using the original checkout.liquid can result in your store being incompatible with Bundles.
  3. Confirm that your store isn't employing payment gateways and apps which might force an unsupported version of checkout. This includes:
    • Global-e
    • Licensify
    • Exemptify
    • Recharge Subscriptions



Of which having "Recharge Subscriptions" was my issue (along with shopify scripts)

️ If I was helpful, please Like or Accept the solution


Contact me directly via email: Jonathan@Innovonics.com