What are productReference and productVariantReference set to? These should normally be Guids as strings and then the default product adapter should be able to resolve those.
Also, have you changed the product adapter at all?
Also, how are your variants setup? Using the variants prop editor? and is the variants property on the doc type set with the alias "variants"?
productSnapshot is null when adding to cart
Hi.
I have a problem when i i'm trying to add variant to my cart. I'm getting a null reference for productSnapshot.
The document type for my products is Product Page and for my Variants is Product Variant.
None of my props is undefined or null. I have a store.Id and both ProductReference and productVariantReference have data.
What i'm i doing wrong?
Hey Daniel,
What are productReference and productVariantReference set to? These should normally be Guids as strings and then the default product adapter should be able to resolve those.
Also, have you changed the product adapter at all?
Also, how are your variants setup? Using the variants prop editor? and is the variants property on the doc type set with the alias "variants"?
Matt
Hi Matt.
My problem was that my variant was not a Guid but just its Id. That fixed my problem.
Thanks for fast reply.
Best regards Daniel
Perfect 👍
is working on a reply...