Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
Product Display Setting.png | 4.4 KB | drupal786 |
Comments
Comment #2
rajeshwari10 CreditAttribution: rajeshwari10 commentedHi 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!
Comment #3
rolfo85 CreditAttribution: rolfo85 commentedI 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 ?
Comment #4
drupal786 CreditAttribution: drupal786 commentedHello 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!
Comment #5
hochmania CreditAttribution: hochmania commentedI'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).
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedYour 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.
Comment #7
hochmania CreditAttribution: hochmania commentedI 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
Comment #8
bojanz CreditAttribution: bojanz at Centarro commented@hochmania
MIght be hidden on the variation's Manage fields page.
Comment #10
nattyweb CreditAttribution: nattyweb commentedI 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
Comment #11
nattyweb CreditAttribution: nattyweb commentedFurther 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