Shopify themes, liquid, logos, and UX
Does anyone know how you would format the JSON for the product list metafield. Is it something like:
{
"Product1": "gid://12345",
"Product2": "gid://12345",
"Product3": "gid://12345",
}
Trying to pass it through a connector with NetSuite and want to make sure it's formatted the correct way 🙂
Hi @mitchelldirt ,
Here's an example of a properly formatted JSON:
{
"namespace":"related_products",
"key":"product_list",
"value":"[\"gid:\/\/shopify\/Product\/4558550859913\",\"gid:\/\/shopify\/Product\/4558550499465\",\"gid:\/\/shopify\/Product\/4593300471945\",\"gid:\/\/shopify\/Product\/4585581805705\",\"gid:\/\/shopify\/Product\/4558550597769\"]",
"type":"list.product_reference"
}
Hello,
Can anyone help on this, I am trying to create a metafield for the same - list.product_reference.
Trying a PUT request to products/{id}/metafields.json
Below is the json
Hi @lthomas1,
Were you able to get this resolved ?
... or did you find a workAround ?
Many Thanks, Michael
Yes @MichaelSD
Instead of updating using products api, I used "metafields/{metafield_id}.json"
A PUT request to the above worked for me.
Payload similar to below -
{"metafield": {"namespace": "custom", "key": "rec_products", "value": "["gid://shopify/Product/{product id}"]", "type": "list.product_reference"}}
Thanks,
Lily
Wondered if you had been able to resolve this.
Facing the same issue, and looking at options to resolve.
Thanks, Michael
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024