What I am trying to achieve: Enable ‘Simple Product’ pages to display ‘Attributes’ (exactly as Variable Product Attributes are shown)
What I already know:
I know that it can be done by creating a Variable Product with just one variation instead of a Single Product. I have used Variable Products before and I don’t want to create 1 additional ID for every single simple product.
Why am I trying this: Weights shown on any product page is the shipping weight. I want to show the product actual weight and actual volume (eg 100ml). Volumes are not supported by default and I want a consistent/elegant way to show it to customers. Since I am already using attributes for Variable products, I can quickly reuse the same attribute values for Simple Products.
What I don’t want to do:
– Write volume in the Product header
– Create variable products with 1 variation
I am sure there are lots of people facing this issue and would like a good solution. I just need the Attribute values to be shown for Simple Products in the exact place as Variable Products. I can customize the css part.
I am comfortable editing functions.php
Can anyone help me please?
2
Answers
To add the attributes after title we need to hook to
woocommerce_single_product_summary
action.By default title is with priority of 5
In your child theme functions.php file add the following.
Have you found a precise solution to this problem, please?
Because I would like to have the same thing.
Thank you