I’m building a Vue app with Snipcart and I’m facing an error when attempting to add dynamic shipping rates to the checkout.
In order to work with the order validation I’m using a serverless function for Snipcart to crawl JSON. This has all worked fine previously and I’ve successfully tested transactions without the :data-item-weight attribute added. But as soon as I add weight attribute I receive this error when checking out:
A ‘cart-confirmation’ error occured in Snipcart.
Reason: ‘product-crawling-failed’
— Item 1 —
[Item ID] YR1JnBAAACEAQe4u
[Item Unique ID] 9b89743f-2b66-4c52-81de-d652312fca67
[Item Name] Through the Window
[Url] https://my-url.com/.netlify/functions/prismic
[Status] InvalidDimensions
[Price in cart] 20
[Crawled prices] []
[Details] null
{kind: ‘cart-confirmation’, reason: ‘product-crawling-failed’, technicalReason: {…}, data: Array(1), code: ‘snipcart.errors.order_validation.product_crawling’, …}
The interesting thing about this…to me at least… is ‘[Status] InvalidDimensions’. Am I not formatting the JSON correctly? All the item weights are in grams, there are no decimals. It seems to calculate the correct shipping rate prior to hitting checkout, so its receiving the item weight via the button… but just not corresponding to the JSON data? I have no idea what the problem could be.
Any help would be appreciated!