Variable product in WP woocomnerce - only some attrs - wordpress

Hi I am using WP and woocommerce.
I created variable product but it use all of attributes. It is possible to create variation which will use only some attributes?
Lets say that we have attrs: color, size, gender
I would like to create variation:
color: black, size: XL - but I do not want to specify gender, because it does not matter to me
Is it possible?
Thanks

You can always just remove the gender attribute from Products > Attribute.
Or when you are creating a new product, you can specify specific attributes you wanna use.
Add new product
Set product data to "variable product"
Go to "Attributes" tab
Select attribute from dropdown on top right (gathered from saved attributes)

Related

Woocommerce - replace attributes multi-select field with select field or limit selection to max one item

In Woocommerce at creating product back-end, in product options>attributes tab,
We can add attribute and its terms(values) trough a multi-select field.
But for example if we use that attribute to select Brand of the product, then the logic is that we can select only one brand. Or if that is a color, then we have to be able to select only one color. Scenario is that we have simple product and we are not going to use that attribute for variations.
So my question is - how to restrict selection of terms for an attribute only to one.
Any help is appreciated.
I did not tried anything, as that should be a question with common solution. I think.

Hide specific product attribute terms on WooCommerce variation product dropdown without disable it

I would like to hide attributes terms or values from variation dropdown list and also enabled not disabled. just hide it from selecting in variations dropdown list because I want To use this variation ID as a single product.
My Example is
hide attribute value woocommerce
I found the below code which helps me of what Exactly I need but it makes the attribute value or variation Id disabled and I can't use it anymore as a single product by variation Id
Hide specific product attribute terms on WooCommerce variable product dropdown
If you can hide an option/attribute only in this dropdown then you should have 2 options:
Hide by using CSS
Hide by using JS like this-
option1)
$('#test').find('option[text="Domains Num"]').css('display','none'); OR $('#test').find('option[text="Domains Num"]').hide();
option2)
$('#mySelect option:contains(' + value + ')').css('display','none');
In your Js file or footer.php page

Attributes not showing to choose in woocommerce

At my product page, when I go to Product Data, select “Variable product” and then click on “Variations” I get the message, “Before adding variations, add and save some attributes on the Attributes tab.”
enter image description here
So… I went to the Attributes tab, created an attribute titled ‘Colors’, and ‘Size’.
enter image description here
With those saved, I went back to my saved product, went back to “Product Data”, selected “Variable product” and clicked on, “Variations”
But there I again see that message "Before adding variations, add and save some attributes on the Attributes tab.".
After you've added your global attributes (Products › Attributes), you still need to select those attributes from the Attributes tab on the product edit page. You'll then be able to set up variations for a product.
Go to: Products › Add Product (or edit an existing one).
Select the Attributes tab in the Product Data. Use the dropdown menu to choose any of the global attributes that you’ve created.
Select Add to make the attribute type available for variations
Select the terms that you want to use for this product's variations (I've selected Black and White in the screenshot below).
Check Use for variations
Click Save attributes
You can now set up variations within the Variations tab

What's the best the approach to add an extra attribute field in Drupal Commerce?

I'm using Drupal Commerce and i have a product type called "Painting" this product type does not have an attribute fields, I'm using inline_entity_form module so i can show the product add form within the node add form for my product display content type.
The product in the site is the painting itself, it may come with a frame or without a frame (the user can choose) and the price will change based on the user's choice, how can i add such field without using attributes fields? as attributes fields requires that the site admin to add many products and put them in one product display, i just want to keep it simple to the site admin, to make him add the product in the same way he adds a node.
Thank you.
This sounds like you just need two variations:
Product one, without frame
Product two, with frame
Each variation has it's own price and title.
You can get by without using an attribute field. Drupal Commerce renders a dropdown when there are no attributes and allows user's to pick from the product variation titles. Since you are using Inline Entity Form this should be seamless for the site admin.

wordpress adding product attributes hierarchy

I have 1 attribute called Weight in Products > Attributes. I have a nice hierarchy in here and its organized like the picture below.
Organized attributes:
My problem is when you go to add a new product and under attributes I added my attribute called weight. But in the select dropdown there its not organized. See the image below for the unorganized select list of attributes when adding a product.
Unorganized attributes:
How can I get my select list when adding a product to look like the one that is under Products > Attributes? Or, how can I get image #2 to look like image #1?

Resources