Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #225840

    Hi there,
    the adjustments for the new woocommerce update seem to mostly work just fine. thanks for that!
    one thing that bothers me is that in the prior version while using a variable product the shop page displays the pricing as ‘from x Euro’. now this was changes to: ‘From x Euro to x Euro’… i am not sure if this makes more sense to me, maybe it helps it searches, tags or similar.

    i wonder how i can change back to the prior display (from x Euro)?
    the other reaso i dont like the new pricing display is that the formatting comes pretty unusual – the spaces between characters and numbers are a bit weird. If i could change that too, that would be great.

    here is what i meant: http://www.blackjava.de/Preise%20Variable.jpg

    thanks in advance for your hard work!
    my best regards
    Pedro

    #225899

    Hey Pedro!

    Refer to this article:
    http://gerhardpotgieter.com/2014/02/13/woocommerce-2-1-variation-prices-revert-to-2-0-format/

    Best regards,
    Josue

    #225992

    Thanks. would thaat be functions.php or functions-enfold.php when they ask to insert it into the themes functions.php?
    any specific place in the php to add it?

    thanks in advance

    #226046

    Hi!

    I recommend to add it at the very bottom of functions.php.

    Regards,
    Peter

    #226047

    Hey!

    You can this at the very bottom of functions.php:

    // 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 );
    	$price = sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $min_price ) );
    	return $price;
    }

    Best regards,
    Ismael

    #226108

    Thanks Ismael for the quick response.
    If i put the code exactly how it is at the bottom of the theme’s function.php it somehow freezes the site.
    any idea what it could be?
    thanks

    #226210

    Hi,

    Do you have access to your PHP log? can you post the last reports?

    Regards,
    Josue

    #226284
    This reply has been marked as private.
    #226682

    Hey Ismael,

    Just wanted to say your // Use WC 2.0 variable price format // snippet works perfect.
    Thanks 4 the support.

    Regards,
    Kleefaan

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘price range for variable products on woocommerce shop page’ is closed to new replies.