Open ghost opened 7 years ago
@stevecawdery i guess that can happen due to the way of creating an option. Here is how we do it: Make sure you checked the underlined checkbox.
I'm wondering about when there are no variants, it seems to dole out the same error on my system. I'm attempting to create an order minus the variantid but wondering if I'm simply missing something here.
@vmajsuk @stevecawdery Variants are technically optional, so the code should handle that case without error. I guess it's just a matter of checking variant_id
before using variant
object.
Made a PR to fix this, let me know if it looks alright https://github.com/insoftpub/storefront/pull/6
Much more elegant than my solution :)
Upon attempting to add a product to the cart, I get an error
r.handleAddProduct @ Product.jsx:120
Where the variant id is undefined as it says
Uncaught TypeError: Cannot read property 'id' of undefined
This happened in the previous release also. Any advice again? I'm simply just excited to get this boilerplate functional and develop it!