Browser: Chrome (new) OS: macOS / Windows / Linux / etc. URL: Link to a page that illustrates this issue
Hi bricks team,
When we use the product price element in the query loop, if the product has a sale price, the product price will have 11 DOM element.
But if we use sale price and regular price dynamic data, the DOM element will be reduced to 6 items. But using sale price and regular price in an element like heading 3 is problematic.
1- It does not display the price of variable products.
2- We cannot differentiate between sale price and regular price styles. For example, I set a strikethrough for the previous price (on sale products). But the prices of products that are not on sale and have only one price will also have strikethrough.
3- When we put sale price and regular price inside an element like heading, the h tag is still rendered. While it can be removed to have a cleaner code, please pay attention to the following example.
The price element displays the variable price range (default behavior).
You can. However, the strikethrough setting isn’t even needed for the sale price, since the del HTML tag already uses strike/line through.
I don’t understand. Why do you wrap the element with a tag you don’t want?
Overall, it’s again the default WooCommerce behavior and markup. As I mentioned multiple times, please compare it with a default theme such as Storefront (in the best case, before creating a bug report).
Thanks for your understanding!
Best regards,
timmse