-
AuthorPosts
-
November 26, 2016 at 1:23 pm #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 !
November 28, 2016 at 11:00 pm #718031Hi 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,
YigitNovember 30, 2016 at 11:05 am #718672Hi 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,
ThibaultDecember 2, 2016 at 4:10 pm #719766Hi,
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,
IsmaelDecember 2, 2016 at 5:05 pm #719815Hi 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.December 7, 2016 at 4:48 am #721330Hi,
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,
IsmaelDecember 9, 2016 at 10:55 am #722372Hi 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.
December 13, 2016 at 6:53 am #723544Hi,
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,
IsmaelDecember 13, 2016 at 11:24 am #723652Thank 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,
ThibaultDecember 13, 2016 at 11:34 am #723655Ok 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,
ThibaultDecember 15, 2016 at 11:21 am #724825Hi, you can close the topic I found a solution :)
Thank you for your help.
Regards,
ThibaultDecember 16, 2016 at 2:16 pm #725317Hi,
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 -
AuthorPosts
- The topic ‘Sales / Crossed prices not displayed on products with variations’ is closed to new replies.