Discussing APIs and development related to customers, discounts, and order management.
Hi,
We've been having a sporadic issue lately where certain line items will lose their properties after they're in the cart. We cannot fulfill our orders without these properties, so this has been a significant support issue for us.
We're using the /cart/add.js script to add the items (and this method words for 99% of all orders).
For example a customer adds an item to the cart like so -- to the /cart/add.js endpoint:
array (
'type' => 'nl-add-to-cart',
'item' =>
array (
'quantity' => '4',
'id' => '794508781',
'properties' =>
array (
'Typeface' => 'Palm Springs',
'House-numbers' => '4990',
'Orientation' => 'horizontal',
),
)
And the script received this back from the endpoint:
array (
'items' =>
array (
0 =>
array (
'id' => '794508781',
'properties' =>
array (
'Typeface' => 'Palm Springs',
'House-numbers' => '4990',
'Orientation' => 'horizontal',
),
'quantity' => '4',
'variant_id' => '794508781',
'key' => '794508781:11ec7c81914b6bc7a00e58332e33447e',
'title' => 'Numbers + Letters - 6" / matte black powder coat',
'price' => '3080',
'final_price' => '3080',
'final_line_price' => '12320',
...
etc.
That sure LOOKS like a successful transaction to me!
But the final order did NOT have these properties:
'Typeface' => 'Palm Springs',
'House-numbers' => '4990',
'Orientation' => 'horizontal',
Anyone have any ideas why this would be happening? It feels a lot like a bug on shopify's end, mostly because we have hundreds of orders with similar attributes that work fine.
thanks!
I doubt this is a bug. What apps do you have in place that could alter a cart, or perhaps create a new checkout?
Getting a successful response with the AJAX call doesn't mean that is the final cart that is used for the checkout. Things (like apps) can interrupt the default flows.
Sharing a store link and replication steps would go some ways to giving the forum members something tangible to look at.