Hello guys,

I am working on D8 commerce site with its latest release 8.x.2.0-alpha, i am facing an issue with the product variation, when i try to show add to cart button with the product SKU and its Sell Price using "add to cart form" field formatter like http://prntscr.com/c2bh4g at the product display, it only shows the add to cart button and missing other info like sku and sell price, when i tried to use field formatter "Rendered Entity" it only shows SKU and Sell Price now add to cart button is missing.

Any help or suggestions would be appreciated.

Thanks

CommentFileSizeAuthor
Product Display Setting.png4.4 KBdrupal786
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupal786 created an issue. See original summary.

rajeshwari10’s picture

Hi guys,

I want to display price in add to cart page, which is currently not being displayed.

I am also facing the same issue as said above.

Any suggestions would be helpful.

Thanks!

rolfo85’s picture

I have exactly the same issue. I can't display the variation fields such as: Price, SKU, Title etc. when I have the "Add to cart form" set on the Variation field, in the product types section.

Any help ?

drupal786’s picture

Hello guys,

We can see this issue is resolved in the next dev release of this module but still we are not able to update it, when i try to update it via composer it shows this module is up to date, so is there any way to apply the latest updates ?

Thanks!

hochmania’s picture

I'm running Commerce 8.x-2.0-beta7 and for the life of me, cannot figure out this problem too. My Add to Cart form shows the variation, but not the price and cannot get the price to show (or anything other than the product variation select/radio buttons).

bojanz’s picture

Category: Bug report » Support request
Status: Active » Fixed
Issue tags: -product variation, -product, -field formatter

Your variations field needs to be shown using the "Add to cart" formatter. Check your product's "Manage form display" page. No other formatter will work.

hochmania’s picture

I have the variations field set to "Add to cart" formatter, as seen here: http://prntscr.com/fg8q45

But when viewing the product page, no price is displayed
http://prntscr.com/fg8qfd

bojanz’s picture

@hochmania
MIght be hidden on the variation's Manage fields page.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nattyweb’s picture

I have exactly this same issue. No matter what I try, I cannot display the variation price in the add to cart form.

On this page:
admin/commerce/config/product-variation-types/default/edit/display/cart

I have the Product, Price and SKU set to display but all I see is the Add to Cart button.

I am going crazy trying to find what must be a very simple fix.

Please, anyone with basic knowledge of Commerce 2, put me out of my misery.

This is on core 8.9.5 and Drupal Commerce 8.x-2.20.

Thanks in anticipation...
Martin

nattyweb’s picture

Further to #10 it turns out I was having problems with DIsplay Suite. Standard display and price was shown, although not as part of the Variation Add to Cart display.

My saviour was here, with a suggestion to alter the twig template commerce-product.html.twig:
https://www.drupal.org/project/commerce/issues/2928139#comment-12622816