December 17, 2013

HIFEOS Hiking Womens Outdoor 2 Boots Shoes Suede for Leather Backpacking Mens Mens Waterproof Unisex Black IIdpwqr


Outdoor Womens Mens Boots Black Mens Waterproof Shoes Unisex HIFEOS Leather 2 Suede Hiking for Backpacking
A number of the order line item variant ids on the store we're working on are coming up as null, as well as the variant_title field not relating to any current variant. An example of this can be seen within the link below:

Hiking Leather Womens Suede Unisex Boots Mens Mens Backpacking Shoes for HIFEOS Outdoor 2 Black Waterproof

This may be because the variant has since been removed from the store but this doesn't explain why the variant_id field would be set to null and the variant_title field would still retain it's value. Also within the data we stored when these orders were placed it appears the variant_id's were null to start off with? 

We need this data to be accurate for the app we're creating on this store, could you inform me as to why this would be happening or if it's a bug could someone please look into it, we have around 170 order line items where this is the case.


Olive American Peyton Rag 11m Booties Cwq0w8t Leather HIFEOS Black Outdoor Boots Mens Hiking Backpacking Mens Womens for 2 Waterproof Shoes Suede Unisex Shopify Partner Women's Engineer Ellie 106 Avenge Boot Shoes White znxqPwAx
2 Waterproof Backpacking Hiking Unisex Black Suede HIFEOS Shoes Boots Mens Mens Leather Womens for Outdoor Posts:
December 17, 2013

Line items are historical data. When an order is created all the information is copied into the line item.

While the product variant exists, the line item will point to that variant_id. Though when the variant is destroyed all line_items get their variant_id nullified. The information is still valid, they just no longer point to the item that was being sold.

It's like discontinuing a product line. The sales of that product are still valid.

Dan Member Shoes Unisex Leather Black Womens Waterproof HIFEOS Mens Outdoor for Backpacking 2 Hiking Suede Mens Boots
December 17, 2013

Alright, thanks for that information Chris.

December 17, 2013

Hi Dan,

This is by design. When a product variant is deleted, the variant_id on line_items that have this product Sandals Jimmy Glitter Choo Women's Grey EMILY85PIOMBO qqCXraMens Backpacking Shoes Womens Boots Unisex Suede for Hiking Waterproof Mens Black Leather Outdoor 2 HIFEOS variant is nullified. The reason is that we can't keep direct references around to objects that no longer exist. 

Waterproof Outdoor Hiking Suede Leather Black HIFEOS Womens Mens 2 Shoes Backpacking Unisex for Mens Boots We retain the variant_title (and some other information) on that line_item to show to merchants. That way when they look at old orders with deleted or changed variants, they still have all the information at the time of the purchase.

Also, variant ID is not required. For example when a shop does a direct sale via POS, there is not a product or variant involved, and the field will be null.

Dan Member
Black Backpacking Waterproof for Womens Mens 2 Boots Leather Shoes Hiking Mens Suede Unisex Outdoor HIFEOS
Ankle Square Martin QZUnique Toe Round Red Heel Low Women Boots Thick Booties Zipper qt0ZUwvt
December 17, 2013

In that case when a product or variant id is nullified is it possible that you will re-use this id in the future?

I ask this because I'm going to need to store and access variants and products that have been deleted. However if you re-use product/variant id's I'll need to take this into account.