Home › Forums › WoodMart support forum › Out of stock variables still visible in product page
Out of stock variables still visible in product page
- This topic has 15 replies, 3 voices, and was last updated 6 years, 2 months ago by
Artem Temos.
-
AuthorPosts
-
December 21, 2018 at 6:57 pm #97661
mindnormParticipantHi,
I have the following problem:In WooCommerce > Settings > Products > Inventory, I check “Hide out of stock items from the catalog”.
In the products grid the sizes for the “out of stock” variables are not visible. I see only the sizes of variables that are in stock what is correct!
If I have not checked the “Enable swatch” in the sizes (attribute), in the product page I see the dropdown without the sizes for the “out of stock” variables which is correct.
But, if I have checked the “Enable swatch” in the attribute sizes then in the product page I see the swatches options (sizes) and the sizes for the “out of stock” variables are visible.
How can I hide the the sizes for the “out of stock” variables in the swatches options?
December 21, 2018 at 8:21 pm #97675
Artem TemosKeymasterHello,
Thank you so much for contacting our support center.
Please, provide us your admin access so we can login and check this on your side. And send us a link to the product example.
Thank you in advance.
December 22, 2018 at 6:21 pm #97799
mindnormParticipantPlease check my message.
December 22, 2018 at 6:48 pm #97807
Artem TemosKeymasterTry to add the following code snippet to the Custom CSS area in Theme Settings to hide these variations
.swatches-select .swatch-disabled { display: none; }
December 22, 2018 at 7:37 pm #97820
mindnormParticipantIf in WooCommerce > Product > [Selected Product] > Variations, you set a Default Form Value the code snippet does not work. In this case all the variations are enabled.
December 22, 2018 at 8:08 pm #97832
Artem TemosKeymasterPlease, send us an example of such a product.
December 23, 2018 at 7:37 am #97884
mindnormParticipant.
December 23, 2018 at 10:02 am #97919
Elise NoromitMemberHello,
Navigate to the Theme Settings > Performance and disable Combine JS files and Include minified JS
Then find the file wp-content\themes\woodmart\js\functions.js
and add this line to woodmartThemeModule.swatchesVariations = function() {
setTimeout(function(){ resetSwatches($variation_form); }, 100);
as shown here http://prntscr.com/lyk8bv
We shall fix it in our nearest update
Best Regards
December 23, 2018 at 12:58 pm #97959
mindnormParticipantI’m sorry but this doesn’t work.
I added the code to the functions.js file and now when you visit the product page all the variations are hidden, and only after you click on “(x) Clear” the available sizes are visible.
See the attachment.
Attachments:
You must be logged in to view attached files.December 23, 2018 at 5:13 pm #97996
Elise NoromitMemberHello,
Please provide your FTP access.
Best Regards
December 24, 2018 at 12:35 pm #98152
mindnormParticipant…
December 24, 2018 at 1:20 pm #98156
Elise NoromitMemberHello,
Please replace 100 with 500 as shown http://prntscr.com/lyzh95 we shall fix this in the nearest update
Best Regards
December 24, 2018 at 2:12 pm #98163
mindnormParticipantThanks for your response.
Now, when the page is loaded all the variations are visible and they get disappeared after some time (less than 1 sec).
This is not the best experience for the user. Is it possible to have the out of stock variations hidden when the page is loaded?
December 24, 2018 at 3:41 pm #98190
Elise NoromitMemberHello,
For now, we do not have a quick solution. We shall fix this in our nearest update which will be released very soon.
Best Regards
December 24, 2018 at 3:55 pm #98201
mindnormParticipantThank you very much!
December 24, 2018 at 4:28 pm #98212
Artem TemosKeymasterYou are welcome.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register