New Landing How can we help? Atelier Variable Product Prices Are Hidden

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Atelier
  • #248972
    afaraji
    Member
    Post count: 72

    Hello,

    For some reason my variable products are not being displayed from the catalog view. I`d prefer it to say “From: (lowest price” in the price field.

    Also you may have to login with the credentials I provided in order to browse the actual page.

    Thank you!

    Attachments:
    You must be logged in to view attached files.
    #249049
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    I just went through your shop and every product has a price, where can I find the example of prices not showing?

    – Kyle

    #249353
    afaraji
    Member
    Post count: 72
    This reply has been marked as private.
    #249430
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Thats odd, can you try deactivating all of your plugins to see if that fixes the issue?

    – Kyle

    #249692
    afaraji
    Member
    Post count: 72

    Okay i got it, it was because a ‘default variation’ was not selected for the products…So for variable products is there a way to make prices display as ‘Starting at (lowest price)’ as opposed to ‘(lowest price) – (highest price)’

    Thanks.

    #249726
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Add this to your child theme’s functions.php file:

        // Use WC 2.0 variable price format
    add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    $min_price = $product->get_variation_price( 'min', true );
    $max_price = $product->get_variation_price( 'max', true );
    if ($min_price != $max_price){
    $price = sprintf( __( 'From %1$s', 'woocommerce' ), wc_price( $min_price ) );
    return $price;
    } else {
    $price = sprintf( __( '%1$s', 'woocommerce' ), wc_price( $min_price ) );
    return $price;
    }
    }

    – Kyle

    #249736
    afaraji
    Member
    Post count: 72

    Thanks Kyle. However that also happens to hide the ‘original’ price for products that are on sale.

    Attachments:
    You must be logged in to view attached files.
    #249739
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No it doesn’t? Not on my demo anyway

    – Kyle

    #261256
    afaraji
    Member
    Post count: 72

    Hi,

    Somehow this issue has come back. Again, I have several variable products that are not displaying prices in the catalog view.. 🙁

    Thanks,

    AF

    Attachments:
    You must be logged in to view attached files.
    #261263
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Do the prices display when you remove my code?

    – Kyle

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register