Discussing Shopify Functions development, deployment, and usage in Shopify apps.
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:
Any ideas about what might be going wrong here / something we may have missed? Any help would be greatly appreciated. Thank you.
Solved! Go to the solution
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.
Following on, the behaviour is the same even with the "Bundles reference app" provided by Shopify (https://shopify-bundles-reference.shopifysvc.com/)
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.
@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.