Layout builder and products with no variations shouldn't generate sample values

Created on 4 June 2024, 6 months ago
Updated 20 June 2024, 5 months ago

Describe your bug or feature request.

When you have a product with no variations and are using layout builder, the field's generateSampleValue() methods are getting called and generic values are injected in to the product template. This should happen when editing layout builder, but not when viewing the product.

If a bug, provide steps to reproduce it from a clean install.

1) Install layout builder
2) Drop a price field on a product layout.
3) Create a product with no variations
4) View the product page
5) See the $9.99 price

Proposed resolution

Determine where (VariationFieldBlock, productVariationFieldRenderer, etc..) we should escape the generation of field data and do not render this it to the PDP.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Product

Created by

🇺🇸United States andyg5000 North Carolina, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024