Swatch variation "out-of-stock" feature fails to work when too many variations

This topic has 14 replies, 3 voices, and was last updated 4 years ago ago by Olga Barlow

  • Avatar: Jari
    Jari
    Participant
    April 5, 2020 at 18:23

    I’m building a store for lingerie and I have few variants with many selections. All works fine when i have 3 colors and 5 different sizes: what is not available in store (or stock value 0), will fade to grey and add a “x” on top of selection.
    But if I have 2 colors and 22 sizes, the feature fails. And this is one of the key features I need, to avoid customers clicking all over again for empty selections. When this happens an announcements rises as it should: “Please try some other selection…”.
    They need to see if their secelltion is available in defined color or size.

    Is there a way to correct this issues? I tried to search, but unfortunately only solution was some modification (snippet) to code and this I did not want to do before asking you. There is also an add-on to make this, but since everything is really working fine with panties but not with bras, I’m totally confused.

    My page is not yet published. I just started week ago.

    13 Answers
    Avatar: Jari
    Jari
    Participant
    April 5, 2020 at 18:46

    I’m just uploading a video of my problem to youtube. And yes, I have used same settings for all these three products. I have created new products with copying from perfectly working product. https://youtu.be/eacEHkzAlcU

    Avatar: Jari
    Jari
    Participant
    April 6, 2020 at 12:18

    Still replying to myself, since no-one is able to help me. I found similar topic and in this discussion there is a snippet where some value needs to be changed from 10 to 9999:
    “It should work for all variations. Try changing “10” with “9999””.
    I’m not sure where I should add this code and is this fix relevant to the them I’m using.

    https://businessbloomer.com/woocommerce-disable-out-of-stock-variations-variable-product-dropdown/?unapproved=360958&moderation-hash=6f95c5cf36fb620d1fcc20e6df0d4eb8#comment-360958

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 6, 2020 at 17:56

    Hello,

    Could you, please, provide us with WP Dashboard and FTP access to your site and to the product with the issue? We’ll check the problem in more detail.

    Regards

    Avatar: Jari
    Jari
    Participant
    April 6, 2020 at 19:57

    I assume here are the credentials. Problem products are the ones with multiple selections, like https://www.liiviteos.fi/tuote/abecita-rita/
    and
    https://www.liiviteos.fi/tuote/triumph-modern-finesse-wp/

    Please contact administrator
    for this information.
    Avatar: Jari
    Jari
    Participant
    April 7, 2020 at 08:15

    2. While you go there, would you please instruct me how to move shop banner where it was: on top of products (see how it is now on “categories” pages, on top of products, not on top of everything). Now it’s even above the breadcrumbles.

    3. I just don’t find a place where to edit banners, others than shop-banne-lingerie. This is in static blocks. But how I could edit for exampl this banner: “accessories”?
    https://www.liiviteos.fi/tuote-osasto/rintaliivit/

    I’m a newbie and with one week experience it’s quite a job. I appreciate your help very much, thank You in advance!

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 7, 2020 at 16:46

    Hello,

    1) Thank you for the access. I passed your issue to our developers. They will take a closer look. Suppose number of variations (142 for example for the product you provided) could be the reason of the problem. Anyway, waiting for answer from developers.
    By the way I checked the WooCommerce error log and found that third-party plugin that you use causes critical error http://prntscr.com/rutml8 I have temporarily disabled the plugin. Contact plugin author about this.

    2) Edit the banner position according to your needs http://prntscr.com/rutq65 (theme options > WooCommerce > Shop > Shop page layout) . In your case you used custom banner above the breadcrumbs http://prntscr.com/rutsbg

    3) Products > Categories > edit the category > and as I can see static block code was added directly to description http://prntscr.com/rutwwm You can remove it and add simple shortcode of the static block.

    Regards

    Avatar: Jari
    Jari
    Participant
    April 8, 2020 at 04:08

    Thank you very much for your help. I have been over frushtrated.
    1. OK, good to know.
    2. I managed but I did not find the place where 8theme layout options could be changed (your later prinscreen)
    3. Now that I found it, I can edit the texts, but I still cannot find the place to change the background picture. In code it is img “4665” but I connot change this. With shops firts page banner I did find a place where to edit these with WP Bakery, but for categories pages I cannot find it anywhere.
    Believe me, I have tried 🙂

    Avatar: Jari
    Jari
    Participant
    April 8, 2020 at 05:02

    2. Found.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 8, 2020 at 07:42

    Hello,

    Go to Static block > edit “Category page banner”
    http://prntscr.com/rv73hg http://prntscr.com/rv73z3 http://prntscr.com/rv73v3

    Regards

    Avatar: Jari
    Jari
    Participant
    April 8, 2020 at 15:39

    I was not visible earlier, I needed to change WP Bakery credentials first. 🙂
    Thanks a lot!

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 8, 2020 at 15:54

    You are welcome.

    Regards

    Avatar: Jari
    Jari
    Participant
    April 12, 2020 at 06:37

    I was able to identify this issue is only to over 30 variatios. I’d really need this feature, I have already a lot of products configured to use it. Please let me know what is the answer from developers. Meaning is it just some snippet in the code or bigger issue?

    I was able to google with the topic, but I do not remember where I found some more info, maybe here: https://businessbloomer.com/woocommerce-disable-out-of-stock-variations-variable-product-dropdown/
    or here:
    https://pluginrepublic.com/display-stock-variations-unavailable-woocommerce/

    It was some where hidden in the commets or links in the comments.
    And I don’t mean to teach you, just wanted to help us out from this problem. Happy Easter, in case you celebrate it!

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 13, 2020 at 16:48

    Hello,

    Unfortunately, it’s not related to our theme but to WooCommerce plugin and what scripts it uses for the products that have a small list of the variation and which one with the large one. Code that you suggested does not work even with the official WooCommerce theme Storefront, for the product with the large number of variations WooCommerce refreshes the form only if all the conditions are chosen https://gyazo.com/50090f5e76b16eb631bb7bde9b5b2d66
    For the product with fewer variations it refreshes form even if the one condition is chosen https://gyazo.com/0b507689c2641b2a16c276e540fce8fc

    You may contact WooCommerce support about this issue https://wordpress.org/support/plugin/woocommerce/ , maybe they will be able to suggest some working solution but I’m not sure.

    Regards

  • Viewing 14 results - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.