Solved

Bundles Shopify Function with cartTransform

olio-dev
Shopify Partner
4 1 2

We have created a bundles `cart_transform` Shopify Function based on the Github example app . Our function executes correctly producing the desired cart expand operation when a bundle product is present in the cart.

 

However, we are experiencing two unexpected issues:

  1. The bundle components are not shown on the checkout page. Just the bundle product.

  2. More importantly, an order containing the bundle product does not contain the itemised list of the component variants. In the "Lifecycle of a Bundle" table in the bundle docs, for orders it states "Order lines return bundle components, with a reference to the bundle parent."

 

Our bundle extension is installed on a development store and the function appears to be executing correctly. For example, here's the input and output to our Function as shown in the partner dashboard for a particular execution:

 

Screen Shot 2023-05-10 at 13.16.37.png

 

 

Any ideas about what might be going wrong here / something we may have missed? Any help would be greatly appreciated. Thank you.

Accepted Solution (1)

olio-dev
Shopify Partner
4 1 2

This is an accepted solution.

It turns out that this behaviour seems to be a bug related to the cart transform GraphQL API used by cart_transform functions as highlighted in a GitHub discussion. Our function has desired effect as long as the bundle product has at least one component variant with a quantity of exactly 1.

 

I will mark my problem as solved for now until the API is fixed.

View solution in original post

Replies 3 (3)

olio-dev
Shopify Partner
4 1 2

Following on, the behaviour is the same even with the "Bundles reference app" provided by Shopify (https://shopify-bundles-reference.shopifysvc.com/)

olio-dev
Shopify Partner
4 1 2

This is an accepted solution.

It turns out that this behaviour seems to be a bug related to the cart transform GraphQL API used by cart_transform functions as highlighted in a GitHub discussion. Our function has desired effect as long as the bundle product has at least one component variant with a quantity of exactly 1.

 

I will mark my problem as solved for now until the API is fixed.

DeKsTech
Shopify Expert
56 4 9

@olio-dev I am having trouble replicating the bundle sample app on my own app. I tried running the extension and then just deploying it. How were you able to successfully replicate it? I cannot get my code to compile properly via wasm.

DeKs Tech | www.dekstech.com