• Resolved Balagur

    (@honoren)


    When choosing a product variation, no variation cost is selected (nothing happens). I tried to switch to the “Storefront” theme and everything works fine on it. I did not notice such a problem before.

    There is a price range (which is indicated by the variation) > After selecting a range, there should be only one price or a price from this range (if there are any in the variations).

    Updated the theme to the latest version did not help.

    ========

    Found part of the problem. Further help needed.

    I edited the CSS:
    div.woocommerce-variation.single_variation {
    display: none! important;
    }

    But if this edit is disabled now, then there will be another problem. In a variable product with the same price, an empty block of about 24 pixels will be created at this place.

    • This topic was modified 4 years, 1 month ago by Balagur.
    • This topic was modified 4 years, 1 month ago by Balagur.
    • This topic was modified 4 years, 1 month ago by Balagur.
    • This topic was modified 4 years, 1 month ago by Balagur.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Balagur

    (@honoren)

    I am attaching another link with a variable product, with the same price. For comparison.

    https://2b-voshod.com/shop/santehnika/mojki/stalnye-mojki-franke/kuhonnaya-mojka-blanco-etagon-6-2/

    Theme Author themevision

    (@themevision)

    Hi Balagur,

    Since, site access is disable so could see issue on site.

    Thanks

    Thread Starter Balagur

    (@honoren)

    Hi, themevision. Opened access to the site, you can watch.

    • This reply was modified 4 years, 1 month ago by Balagur.
    Thread Starter Balagur

    (@honoren)

    Solution to the problem.

    Add this code to functions.php

    add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' );
    add_filter( 'woocommerce_is_attribute_in_product_name', '__return_false' );
    Thread Starter Balagur

    (@honoren)

    I’m sorry. I inserted it wrong.

    add_filter('woocommerce_available_variation', function ($value, $object = null, $variation = null) {
        if ($value['price_html'] == '') {
            $value['price_html'] = '<span class="price">' . $variation->get_price_html() . '</span>';
        }
        return $value;
    }, 10, 3);
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce is not updating price variation (bag)’ is closed to new replies.