Attribute hide not working
-
WP 6.1.1; Woocommerce 7.4.1
My products have 3 attribute. On the products page I want to show only 2 of them, the 3rd is for internal purpose only.
The products page has an option “Visible on products page” but doesn’t matter if it is checked or not. The third attribute allways visible. I turned it off but I would like to use it. Can you help me in this?
The page I need help with: [log in to see the link]
-
Hello @valucky,
My products have 3 attribute. On the products page I want to show only 2 of them, the 3rd is for internal purpose only.
The products page has an option “Visible on products page” but doesn’t matter if it is checked or not. The third attribute allways visible. I turned it off but I would like to use it. Can you help me in this?
I’m sorry but I’m not sure if I fully understand your request. Can you please attach some screenshots that describe the problem?
You can upload them using Snipboard.
Look forward to hearing back from you. ??I saved 2 screen. The first show that I unchecked the “Visible on Products Page”.
https://www.aprily.com/kepek/Merchant1.jpg
The second show, that it is still visible on Products Page.
Hi @valucky
Thanks for sharing the requested information above.
I understand that you disable the option
Visible on the product page
underProducts > Attributes
, but you are still seeing it on your product page, correct?This is the expected behavior since the option
Used for variations
is also enabled, hence, this option is showing on your product page.Once you disable both options:
Visible on the product page
andUsed for variations
, it will not be displayed like the image below:On the other hand, disabling this option will hide the attribute under the Additional Information tab.
Output:
Hope this helps!
Sorry, it did not help.
I have some products that has a 10 pack=30g and a 60 pack=180g size variation.I wanted to use this variation to show Google Merchant Center a “Unit pricing measure”. Every different size need a different “Unit pricing measure”. So I need to use the attribute for variations. I can not turn it off.
The customer need only the packing information. (10 pack) The size information in not important, and I want to hide it on the products page. So I have to turn it off.
Why this two options are linked together?
How can I solve it? Can you help me?Hi @valucky ,
Thanks for providing additional clarity!
After checking your site, the “Unit pricing measure” variation is not visible on my end, as seen in the screenshot below:
To be sure, I checked this in various browsers (Chrome, Safari, and Mozilla Firefox), and the results remained the same.
Have you managed to resolve this issue, or are you still seeing the “Unit pricing measure” option?
If you are not seeing the same results as us on your end, please try clearing your browser cache and checking your site again. Alternatively, you can try and view this in Private/Incognito mode and see if this makes any difference.
Let us know how this goes!
I removed this variation. This is a live webshop and I don’t want my customers to see and choose something, they don’t understand.
Temporarily I put it back to “Fortune Delight” only, if you would like to see it.
Right now it is set as NOT visible in products page and used for variations.
I tried with disabled cache, incognito mode with no difference.
- This reply was modified 1 year, 8 months ago by V.A.Lucky.
I tested different variations, and it will not work for me.
When I choose the taste and size (example: 60 pack), the “Unit pricing measure” will not fill automatically. This means, I can not hide it with “display:none” even if this variation has only one attribute data (example: 180 g).
But if I fill the “Unit pricing measure” attribute to “180 g”, I can not change the size back to 10 pack, because the “Unit pricing measure” has a filled data “180 g”. This must be emptied before I can change the size.
Interesting excention: When the size has only one data, and a “Unit pricing measure” has one data too, the plugin does not ask anything, just fill everything automatically. Does not matter the variation is visible on the Products Page or not.
I see only one solution: I have to use this unwanted attribute and let the cuspomers to choose it.
Do you have any way to use the standard “Unit pricing measure” and fill it according to Google? (With different size variations too.)
Hi @valucky ,
Hmm, this is a really interesting scenario!
As a workaround, you can try setting a default form value for the attribute by doing the following:
- Navigate to Product Data → Variations, and by “Default Form Values:” select, for example, “180g”. This will assign the variation to the default value or to the “Any” value for that attribute:
Since you have mentioned that the “Unit Price Measuring” attribute is the 3rd attribute to be displayed, next, you can use the following CSS to hide this from being displayed on the page. Please add this to Appearance → Customize → Additional CSS:
.single-product .variations tr:nth-child(3) { display:none; }
The outcome of this is this:
- The variation for “Unit Price Measuring” will be set to the default value (automatically applying this value on the Single product page).
- Thus, allow you to hide the variation option from being displayed on the single product page with CSS, and still be allowed to add the item to the cart.
Please let us know how this goes!
Sorry, but this will not work. (I mentioned the problem in my previous post.)
I tried to hide this attribute.
If I set the default value to “180g”, the customer can not change it (because he does not see the attribute). The result: He can not choose and buy the “30g” product.
If I set the default value to “any”, he can not buy anything, because he can not set this attribute. The “add to cart” button is not clickable.I suggest an improvement for the plugin:
If I change the first attribute, and the second (and the rest) attribute has only one variation, the plugin should fill it automatically. (The plugin do this already if the first has only one variation.)
If I change the first attribute again, the plugin should refresh the second… attributes acconding to the first attribute. (The second and the rest attribute should not block the first / previous one.)Finally I changed my previous attributes. Instead of “10 pack”… I use the “30g”… It not look pretty, but it works.
Hi @valucky ,
Glad to hear you found a workaround!
I suggest an improvement for the plugin:
If you have any suggestions on how to improve the WooCommerce core plugin, feel free to create an enhancement request here. ??
I will go ahead and mark this thread as resolved then, however, feel free to create a new topic should you need any further help.
Cheers!
- The topic ‘Attribute hide not working’ is closed to new replies.