Home Forums WoodMart support forum Out of stock variables still visible in product page

Out of stock variables still visible in product page

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #97661

    mindnorm
    Participant

    Hi,
    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?

    #97675

    Artem Temos
    Keymaster

    Hello,

    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.

    #97799

    mindnorm
    Participant

    Please check my message.

    #97807

    Artem Temos
    Keymaster

    Try to add the following code snippet to the Custom CSS area in Theme Settings to hide these variations

    .swatches-select .swatch-disabled {
    	display: none;
    }
    #97820

    mindnorm
    Participant

    If 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.

    #97832

    Artem Temos
    Keymaster

    Please, send us an example of such a product.

    #97884

    mindnorm
    Participant

    .

    #97919

    Hello,

    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

    #97959

    mindnorm
    Participant

    I’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.
    #97996

    Hello,

    Please provide your FTP access.

    Best Regards

    #98152

    mindnorm
    Participant

    #98156

    Hello,

    Please replace 100 with 500 as shown http://prntscr.com/lyzh95 we shall fix this in the nearest update

    Best Regards

    #98163

    mindnorm
    Participant

    Thanks 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?

    #98190

    Hello,

    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

    #98201

    mindnorm
    Participant

    Thank you very much!

    #98212

    Artem Temos
    Keymaster

    You are welcome.

Viewing 16 posts - 1 through 16 (of 16 total)