Price field is not available via "Manage Display" but is available via Layout builder

Created on 30 January 2024, 5 months ago
Updated 6 February 2024, 5 months ago

Describe your bug or feature request.

Hi,

For my product types, I have the setting "Inject product variation fields into the rendered product" enabled.

The default viewmode for my products are using Layout builder. In the layout builder, I can add the price field and it updates when a different variation is selected. That works as expected.

Now I wish to display a single views block that shows a single product using a viewmode. This block needs to show the add to cart form and the price, along with a few other fields.

I need to embed this block inside a layout builder enabled page, so I can't use layout builder for the viewmode used in the block. This causes a WSOD. So I've added a new viewmode without Layout builder enabled, but I don't have the Price field available there. I can add everything, add to cart form, etc, but no Price.

I found an old comment about adding the price field to the Add to cart form. That would be perfect, but the solution is not working for me. The Price field is visible at /admin/commerce/config/product-variation-types/default/edit/display but it does not appear on the add to cart form. When I set the Price field to visible at /admin/commerce/config/order-item-types/default/edit/form-display/add_to_cart I get an editable price field which is not what I need.

I've also noticed that in the Commerce documentation, example catalog views are not showing prices.

This feels like a bug to me, unless I'm missing something?

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

-Install commerce 2 on the latest version of Drupal
-Create a viewmode for a product, there is no Price field available despite setting "Inject product variation fields into the rendered product"

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Price

Created by

🇹🇭Thailand AlfTheCat

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

Comments & Activities

Production build 0.69.0 2024