drupal-8drupal-commerce

In Drupal 8 Commerce, how to display product variation price in Add to Cart form?


On my Drupal 8 Commerce 8.x-2.0-beta7 site, I cannot get the price of a variation to display in my Add to Cart page.

On my Commerce Products Manage Display page, I am using the "Add to cart form" display for the Variations field.

http://prntscr.com/fg8q45

I see each variation title to select, but not the price. http://prntscr.com/fg8qfd

What am I missing?


Solution

  • @Bharanikumar I have the following steps to get the price showing on the product pages.

    1. First, create a product attribute, make the element type a select list, select the default variation type and add all the different variations that your product may have (red, blue, green).

    2. In the default variation type "manage form and manage display" I moved all the fields to visible.

    3. In the product types make sure the fields you want to be seen are not in disabled and the variation should be the "add to cart" format.

    4. Create a product, add variations and give the different variations prices.

    After it is saved the variation select list should have all the options you specified in step 1 and the price and sku that you assigned it when you created the product.

    I hope this helps!

    enter image description here

    enter image description here