Home Forums WoodMart support forum Number of visible swatches on single product Working Abonormally

Number of visible swatches on single product Working Abonormally

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #684945

    I have a total of 15 variation colors.
    Each variation is like this:

    Laminate Frame and Shutter – total: 4 colors

    Painted Color – total: 9 colors

    Veneer – total: 4 colors

    I have set the parameter for the number of visible swatches on a single product to 12.

    Before choosing anything, it shows the right number (as you can see), but when I begin to choose, the number does not change accordingly with the available variation number, like it’s showing in the image.

    Please fix this bug, because if I select the threshold to 12, then when there are only 4 variations, the text should not be shown.

    It seems this only works with products that have only one variation.

    Attachments:
    You must be logged in to view attached files.
    #685047

    Hung Pham
    Keymaster

    Hi akash.work.manualcontrol,

    Thanks for reaching to us.

    I kindly request you to conduct a check by activating the default WordPress Theme, such as Storefront or Twenty Twenty-Three (Appearance > Themes). This is to ascertain whether the issue you are experiencing is due to our theme or not.

    Regards,
    Hung PD

    #685053

    Hello Sir,

    Do you understand what I am saying? I am talking about the +5 counter.

    I have over 2000+ variations, but your theme’s AJAX variation threshold only goes up to 500.
    I added a code in the .htaccess file to load 2000+ variations. It is taking time to load, but I need those variations.

    /**
     * Force WooCommerce to preload variations up to 5000.
     * This overrides theme or plugin values.
     */
    add_filter('woocommerce_ajax_variation_threshold', function ($threshold, $product) {
        return 4000;
    }, PHP_INT_MAX, 2);
    

    But this shouldn’t affect the counter.

    And Sir, I am telling you again:

    In the first image, without selecting anything, it shows the right number.

    But on the 2nd or 3rd image, when I begin to choose a variation (for example, Painted), it only has 9 variations. Still, the +5 is showing, even though the value is now less than 12 (which I selected in the theme option).

    The +5 is not going away — it just stays there and hides 2 of my variations.

    Similarly, with the Laminate option, it has only 4 colors, but as you can see in the 3rd image, it shows only 3 colors + the counter.

    When I click on the +5, it enables the 4th color.

    Attachments:
    You must be logged in to view attached files.
    #685368

    Hung Pham
    Keymaster

    Hi akash.work.manualcontrol,

    I’ve passed this topic to one of our developers, and I will let you know once get an answers.

    Thanks for your patience.

    Best Regards,
    Hung PD

    #685411

    Hung Pham
    Keymaster

    Hi akash.work.manualcontrol,

    To assist you in the best possible manner, I kindly ask that you please provide me temporary wp-admin info (wp-admin URL, username, password) to the Private Content area, this will allow me to thoroughly investigate and address your concerns more efficiently.

    Regards,
    Hung PD

    #685428

    Hello Hung, Thanks for understanding
    This is my 2nd Testing site.
    I have created a Product called Doors
    There are only 3 attributes
    I tried to create the problem I am taking with small variation, so that you understand the problem.
    Please see the images in sequential order, so that you can understand.

    On the variation image, as you can see on laminated there are multiple color options, but on paint there are only 2 options.
    But on product page when I select paint, the 14+ thing remains there, when I click on it it only reveals 2 which is actual available colors for it.

    Attachments:
    You must be logged in to view attached files.
    #685437

    Forget to mention i use this custom css provided by you for hiding out of stock variation from the swatch

    .wd-swatches-single .wd-swatch {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .wd-swatches-single .wd-swatch.wd-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    z-index: -1;

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