- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How can i show FROM price on configurable products
Magento 2 displays base price set on configurable product as price on Category pages and on product view page before attribute is selected. I would like to display either price range or show 'From' in front of the price, so it doesn't look like misleading, because the price changes when attribute is selected e.g. different price for different size.
Thanks
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to apply a CSS rule on a frontend product view page to the configurable products only: https://mage2.pro/t/819
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to show FROM price on configurable products
The simpliest way to add a label (e.g. "FROM") before a price is to use the CSS rule ::before with setting the content property:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to show FROM price on configurable products
Hi,
But How do you tell it to it for the configurable product only?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to apply a CSS rule on a frontend product view page to the configurable products only: https://mage2.pro/t/819
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to show FROM price on configurable products
Very useful, thanks Dmitry.
Any idea how to do a similar exercise on a category page, I can't see any specific css class that identifies configurable products.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to show FROM price on configurable products
For the category page you could add the type of product to each product item as a class, this will require amending the product listing template. You can get the type ID via:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to show FROM price on configurable products
If you use CSS to add the text it won't be run through Magento's translate functions and won't be read by the likes of screen readers which causes an accessibility issue.