• Resolved jamierood

    (@jamierood)


    Variable Products: instead of listing only options related to the first option (Medium), gives error:
    “Sorry, no products matched your selection. Please choose a different combination.”
    For example, by default on the page referenced, I have my most popular paper print size (12×16 mat). But if you select canvas, you get the error cause that is not available on canvas.
    Of course you can hit the ‘Clear’ button, but that is not totally ‘clear’ to customers ??

    Works perfectly on my old shop: – example
    https://jamierood.com/shop-ls/product/gcds-im/

    Increased the threshold already – that fixed some problems, but not this last one ??

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support abwaita a11n

    (@abwaita)

    Hi @jamierood,

    I visited your site and this particular product seemed to add to cart with no error:


    Link to image: https://snipboard.io/YQCqLK.jpg

    However, the error was present on the Paper - 5x7variation. I presume that this variation has 0 stock.

    There have been related reports of this issue and here’s the existing GitHub issue – https://github.com/woocommerce/woocommerce/issues/27192

    You can post a comment on that thread so that developers can treat this as another case.

    Recently, in this thread, another user got the same error message for products that were out of stock. It turned out that when creating variations, there were some delays and the user refreshed the page before the process was complete. In turn, this produced variations that had this behavior.

    You might have experienced the issue when creating your variations. The workaround gotten from the other user is to remove the existing variations for this product and create them in small bits. For instance, you can start by creating Medium – Paper & all size combinations then wait till WooCommerce says – X variations created. From there, create another medium and all sizes. It seems this will not introduce the delay and WooCommerce will be able to create the variations.

    Let us know how it goes.
    Thanks.

    Thread Starter jamierood

    (@jamierood)

    Thanks for the reply abwaita ??
    I don’t think this is related to price like the post you referenced.
    Yes, the default paper side works fine and can be added to the cart. As stated above however, if you change the ‘medium’ from paper to canvas you will see the error as the default paper size is not available in canvas. I would expect the options to reset to those available for canvas as it does in my old shop.

    I will try you suggestion above though and post to the github and here afterwards ??

    PS. seems like there would be a plugin that makes this all work better?

    Thread Starter jamierood

    (@jamierood)

    OK, found one problem:
    Storefronts theme had overwritten the code I had added to raise the threshold – gotta figure out how to keep that from happening. Replaced, but kinda worse now cause I cannot select a different medium without pressing the clear button (visitors may think there are no other options ??

    This is the code I had added to the theme’s functions.php –

    /* Increase Woocommerce Variation Threshold */
    function wc_ajax_variation_threshold_modify( $threshold, $product ){
      $threshold = '1111';
      return  $threshold;
    }
    add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ajax_variation_threshold_modify', 10, 2 );
    
    // see all my variations when editing without pagination
    function custom_wc_admin_variations_per_page( $qty ) {
    	return 40;
    }
    
    add_filter( 'woocommerce_admin_meta_boxes_variations_per_page', 'custom_wc_admin_variations_per_page' );
    Mirko P.

    (@rainfallnixfig)

    Hi there,

    Thanks for getting back.

    I have my most popular paper print size (12×16 mat). But if you select canvas, you get the error cause that is not available on canvas.

    Following your instructions, I wasn’t able to replicate the issue with the error message. You can see a short video recording here:

    Can you please help us understand the issue here by providing screenshots or a short video? If you don’t already have a screenshot service installed, here are a few free options:

    * https://snipboard.io
    * https://skitch.com/
    * https://getcloudapp.com/
    * https://awesomescreenshot.com/

    For videos, you can use a free extension/service like https://www.loom.com/.

    There is also a walkthrough guide here: https://en.support.wordpress.com/make-a-screenshot/

    We look forward to hearing back from you on this!

    Thread Starter jamierood

    (@jamierood)

    Sure Mirko P. ??

    Here is the initial product screen with the default print size selected:
    https://www.jamierood.art/images/Screen%20Shot%202021-08-31%20at%2010.54.01%20AM.png

    Let’s say we want to select a canvas instead:
    https://www.jamierood.art/images/Screen%20Shot%202021-08-31%20at%2010.54.13%20AM.png
    ….
    Customer – ‘ oh, so only paper is available – I’m gone..’

    Oh, but wait – if you select ‘Clear….’ then try again! – Oh, too confusing..
    https://www.jamierood.art/images/Screen%20Shot%202021-08-31%20at%2010.54.43%20AM.png

    You can see I added a message to Medium to select ‘Clear’ – but still confusing…

    Thread Starter jamierood

    (@jamierood)

    cannot figure out how to embed the images in this post, so provided links ??

    Mirko P.

    (@rainfallnixfig)

    Hi @jamierood,

    Thanks for sending over those screenshots.

    When I select Canvas these are the options available:

    Link to image: https://snipboard.io/E1TQnD.jpg

    If I hit the Clear button and choose the Size first (9×12 mat) then only Paper is available. All other Mediums for that specific size must be out of stock and so WooCommerce hides them by default.

    Let me know what exactly are you trying to accomplish so we can have a further look.

    Thanks.

    Thread Starter jamierood

    (@jamierood)

    Well, that is supposed to be what happens. – What browser are you using?
    I’ve tried Firefox & Safari and canvas does not show as an option til I hit the ‘Clear’ link ??

    Thread Starter jamierood

    (@jamierood)

    No – you do not mat anything but a paper print – has nothing to do with ‘stock’.

    Thread Starter jamierood

    (@jamierood)

    What I’m trying to accomplish is present the user with the option to select canvas without having to figure out they need to click the ‘Clear’ link. (see above)

    Mirko P.

    (@rainfallnixfig)

    Hi again,

    Thanks for getting back with additional details.

    Just to clarify, when you select “Paper” and “12 x 16 mat”:

    the term/value “Canvas” under the Attribute “Medium” will only be displayed if you have a variation “Canvas” + “12 x 16 mat” with a regular price assigned. If you didn’t create that variation or there is no price assigned, WooCommerce will hide it by default.

    If you’re looking to create something other than the default functionality then it would require some customization to make it happen, or it may be achieved with an additional plugin.

    For example, if you want to display radio buttons instead of drop-downs you can achieve that by using a plugin:

    https://www.ads-software.com/plugins/wc-variations-radio-buttons/

    There’s also custom coding on the following page that can help show all variations as radio buttons:

    https://codedcommerce.com/product/change-variation-drop-downs-to-radio-buttons/

    If you require assistance with custom development tasks you could reach out to some of the official WooCommerce development partners via this link below:

    https://woocommerce.com/customizations/

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Variable Products: instead of options related to the first option, gives error’ is closed to new replies.