Variants not rendering when defined in the product.json seed file
See original GitHub issueIf I add a variant
to a product in product.json, it does not render the product in the UI anymore on the product list page http://localhost:3000/collection.
[
{
"product": {
"name": "Arms Wax",
"description": "Waxing treatment of an arm region include after wax treatment and hot towelling"
},
"categories": [
{
"id": "cat_31q0o3LD15DdjR",
"slug": "treatments-body-waxing",
"name": "Body Treatment (Waxing)"
}
],
"variant": [
{
"name": "Service",
"options": [
{
"description": "Half Arm",
"price": "30.00"
},
{
"description": "Full Arm",
"price": "40.00"
},
{
"description": "Underarms",
"price": "15.00"
}
]
}
]
},
...
]
But if I remove the "variant"
field again so it is as shown below instead, and run yarn seed
again, then the UI successfully loads that product in the UI again.
[
{
"product": {
"name": "Arms Wax",
"description": "Waxing treatment of an arm region include after wax treatment and hot towelling",
"price": "30.00"
},
"categories": [
{
"id": "cat_31q0o3LD15DdjR",
"slug": "treatments-body-waxing",
"name": "Body Treatment (Waxing)"
}
]
},
...
]
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Variants not rendering when defined in the product.json seed file
When I run yarn seed it successfully seeds the 1st product named "Eyebrow Wax" (because it doesn't use the "variant" property), but it...
Read more >Rails: Render JSON after Controller action results in "missing ...
I moved the render out of the block and got a Rails error telling me that I needed to define respond_to at the...
Read more >Problem with JSON-LD code for product variants - Shopify ...
Solved: Hey there, We have a problem with JSON-LD code, that's why we can't fix an issue on Google Merchant Center: Mismatched value...
Read more >Add a JSON rendering and variant to your page
Navigate to sitecore/Content/Tenant/Site/Presentation/Rendering Variants/JSON List, right-click JSON List, click Insert, and click JSON Variant ...
Read more >Facts About: Naming and Labeling Varieties of Seed ...
This does not mean that all varieties must be marketed under a single name. In fact, some old varieties may be marketed legally...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ltfschoen please explore the 422 error for further information on why your API call is being rejected. If you have any more questions feel free to raise them on Slack or on our seeder repository. As far as I can see this issue is not a bug in this repository, so I’m going to close it 🙂 thanks for raising it though!
Did your initial seeding request fail?