Support » Plugin: WooCommerce » Variable Product Price only on Product Page are not showing

  • Hi, I’m using woocommerce 2.2.1.
    I set only variable products and on single product pages the price don’t appear.

    website: oliodamico.it

    In the cart page and in the other pages the prices are ok but only in the product page the are “hidden”. It seem that the class price is missing.
    Please could you help me ?
    L.

    https://wordpress.org/plugins/woocommerce/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Products “Extra Virgin Olive Oil” and “DOP Aprutino Pescarese” show their prices and work well for me.

    “Flavoured Extra Virgin Olive” doesn’t have the attribute “Orange” set for the 3rd variation, or prices set for any variation. Probably you have filled in the Attributes tab correctly, but not set the attribute on the 3rd variation. “Olives Patè” is similar.

    http://docs.woothemes.com/document/product-variations/

    Thread Starter lucafolin

    (@lucafolin)

    Yes the first two products are ok as you said but the other two still remain down….no price showing…
    Yes there are some mistakes ( I’m trying and retrying to modify any parameters).
    As you can see from the two attached images now everything is ok about attributs and price fields but it still not working.

    http://oliodamico.it/galleries/test/

    If I create new products for test the price is still not showing … no more ….

    I didn’t know this until now, but I’ve checked and its true on my site, if all the variations are the same price, then the default behaviour is that the price between the drop-down and the stock quantity doesn’t show. You can test this by altering the price of one of the variations on a product whose price doesn’t show. It should now show.

    On other themes, there is a price or price-range between the product title and the short description, but your theme does not show this. You can test this by trying the default theme – does the price now show above the short description?

    The author of this site:
    http://phele.com/woocommerce-display-price-variable-product-variations-prices/
    has kindly provided some code to go in functions.php to alter the default behaviour of WooCommerce so that it does show the price under the drop-down when the variations are the same price.

    The caveat is that it needs php 5.3 on the server, on 5.2.17 it does not work according to one comment, so I can’t test it. Hopefully your mileage may be better.

    If this code doesn’t work, you will need to either add a few cents to one of the variations to make the prices different, or delve into the page template so the price does show above the short summary. PHP skills will be needed for that.

    Thread Starter lucafolin

    (@lucafolin)

    ok the problem is as you have described.
    If you have the SAME price for ALL the variation no price is showing between drop down box and stock quantity even if I reenable the price-range under product title’s.
    I think it’s a bug because you should manage variable products with the same price but I don’t know how to fix it with this version of woocommerce.
    thk for your help.

    Thread Starter lucafolin

    (@lucafolin)

    finally I fixed the problem with this code:

    // Display Price For Variable Product With Same Variations Prices
    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);

    @lucafolin

    Thank you! This was driving me crazy.

    Lucy

    (@kiddiestuff)

    Could you tell me where I add that code?

    Thread Starter lucafolin

    (@lucafolin)

    you have to inset this code in your function.php file.
    Use snippets plug in for wordpress, it could help you.
    L.

    Try to add this into your themes functions.php:

    add_filter( ‘woocommerce_show_variation_price’, function() {
    return true;
    } );

    Where would I type in the price?

    @lucafolin

    That worked for me. Your next beer is on me.

    Thanks JhnnsGrndy, it worked for me 😉

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Variable Product Price only on Product Page are not showing’ is closed to new replies.