Product Metafields not displaying consistently

Artrockstore
New Member
5 0 0

I have added 2 product metafields and populated with values. One is type decimal and the other is type integer. I display the values on my product page. The decimal field work perfectly but the integer field is inconsistent. Even though I have valid integer data entered, for most products it displays correctly but for some products it displays blank. Has anyone seen this? Appreciate your help

Replies 3 (3)

DeepVyas
Shopify Partner
729 6 6

Does the other products on the store have variations/ option which have integer fields??

Shopify Developer | Ⓢ : deepvyas71 | ✉ : deepvyas71@gmail.com
Artrockstore
New Member
5 0 0

Yes, I used Bulk Product Edit App to add 2 product metafields to every product.

I have 24,000 products and only a small number have had values added to the metafields so far

but in testing the ones I have added values to, there's an inconsistency where just under half

of the products don't display the integer metafield, even though I have checked the value entered,

and even re-entered the integer values, but they still don't show for certain products.

As stated earlier, the decimal value metafields display correctly for every product.

Artrockstore
New Member
5 0 0

I have more information. Went into product bulk edit to check the value entered into product.metafields.album_info.year

found that when I try to enter an integer value eg. '1975' which has already been used in a different product system gives error 'key must be unique within this namespace on this resource' in other words, system is forcing unique values across all products. I can't find anywhere in the documentation that states 'values' must be unique within metafields. Nor can I see any config parameters which define a particular namespace to be unique or not. I guess I could change the metafield type to 'string' but then it might limit me when coming to comparing values eg. x > y which I can with integer. Please advise if this is a bug or a limitation. Or if I'm doing something wrong. Thanks