Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #717208

    Hi,
    I’m writting you because I can’t find a solution for my problem.

    I want to sold products on my woocommerce eshop and to show both prices with reductions and initial prices without reductions (crossed).
    When I sold products without variation, everything works fine and I can see the initial price crossed and the new price sold.
    But on product with variations, I can’t see the initial price (crossed) and only the reduced price is showed.

    Thank you for your help !

    #718031

    Hi Obeatone!

    Please try adding following code to functions.php file in Appearance > Editor

     add_filter('woocommerce_show_variation_price',      function() { return TRUE;});

    If that does not help, please switch to a default theme temporarily and check if you can reproduce the issue.

    Can you please a link to
    Regards,
    Yigit

    #718672

    Hi Yigit, thank you for your help !
    I add the following code to functions.php and unfortunetly it doesn’t work.

    I temporarily switch to a basic theme and it works fine, I can see both prices (old crossed) and the new one with variations products.

    Regards,
    Thibault

    #719766

    Hi,

    Thank you for the update. The variable product should display the original price range and the sale price range. Did you add any modifications to the product or price template? Please contact the WooCommerce support for additional help. I’m sure they’ll be able to provide a quick solution to this problem.

    Best regards,
    Ismael

    #719815

    Hi Ismael,
    I don’t understand your answer. The fact is that it is working perfectly with another theme.
    So the problem is with the enfold theme not with woocommerce. I didn’t touch any php files or something like that on the theme…

    If I ask woocommerce they will tell to ask the theme creator, it is logic.
    So can you help me to solve this problem ?

    Thank you very much !
    Regards.

    #721330

    Hi,

    I’m sorry but I’m just asking you to create another inquiry in the plugin’s support forum to expedite the process. I’m not really sure why it’s not working in your installation but if you can provide the login details, we’ll check the settings.

    Best regards,
    Ismael

    #722372

    Hi Ismael,
    Thank you very much !

    You will find in the secret areat the website access.

    You can test it with products in the “Nouvelle collection” category : http://adelineaffre.com/website/bijoux/nouvelle-collection/
    The problem is present even in the product page : http://adelineaffre.com/website/bijou/collier-blslqsls/

    Regards,
    Thibault

    • This reply was modified 7 years, 11 months ago by Obeatone.
    #723544

    Hi,

    I checked the settings but I can’t figure out what’s wrong with it so I created a variable product in my own installation. The settings are almost the same as the “collier-blslqsls” product and the sale price is displaying as you can see in the screenshot.

    // http://i.imgur.com/ToEdxWj.png

    Please try to deactivate some of the plugins except for WooCommerce.

    Best regards,
    Ismael

    #723652

    Thank you for your help Ismael.

    I found where the problem is located. I made some modification to my functions.php file and when I put the initial file it works fine.
    I have to find where the problem is in my customised file :)

    Regards,
    Thibault

    #723655

    Ok so I found the issue :)
    I add this on my functions.php file to disable the display of variable prices :

    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( __( ‘%1$s’, ‘woocommerce’ ), wc_price( $max_price ) );
    return $price;
    } else {
    $price = sprintf( __( ‘%1$s’, ‘woocommerce’ ), wc_price( $max_price ) );
    return $price;
    }
    }

    When I add this, the problem with sales on variable products appears.

    Do you have any idea on how I can disable variable prices with an other method ?
    Thank you again for your help Ismael !

    Regards,
    Thibault

    #724825

    Hi, you can close the topic I found a solution :)

    Thank you for your help.
    Regards,
    Thibault

    #725317

    Hi,

    glad you found a solution!! Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.

    Best regards,
    Andy

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Sales / Crossed prices not displayed on products with variations’ is closed to new replies.