Price upon request
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Jonas on February 9, 2024, 13:38Hi Support,Please help me with this code:add_filter( 'woocommerce_get_price_html', 'custom_price_message' );function custom_price_message($price) {if(!empty($price)){return $price;}else{return 'Pris efter forespørgsel';}}I am trying to display products without a price as "Price upon request" and i've worked it out to work in my primary language/currency. But when changing to English the currency (EURO) does not apply the desired text.https://gallerifusion.dk/en/kunst/page/10/


Quote from Jonas on February 10, 2024, 13:41I followed this documentation and mostly solved the problem.
Add to cart button is gone, but price is still shown as "€0" insted of "Price upon request" as in my primary language.
-> https://currency-switcher.com/make-product-not-purchasable-avoid-free-price-text
-> https://gallerifusion.dk/en/konstantin-korobov-maleri-18/
I followed this documentation and mostly solved the problem.
Add to cart button is gone, but price is still shown as"€0" insted of"Price upon request" as in my primary language.
-> https://currency-switcher.com/make-product-not-purchasable-avoid-free-price-text
-> https://gallerifusion.dk/en/konstantin-korobov-maleri-18/
Quote from Jonas on February 10, 2024, 17:40Found this code on your website: https://currency-switcher.com/faq
How to to display the text “Call for Price” when the price is 0 or blank
Next code will do the job:add_filter('woocommerce_get_price_html', 'fbs_woocommerce_get_price_html', 100, 2);
function fbs_woocommerce_get_price_html($price, $product)
{
if ($product->price <= 0)
{
//remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
//remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
return 'Call for Price';
} else
{
return $price;
}
}After applying this code in my child theme there is a problem.
Items that are marked as "Sold" on my website by having no price and out of stock now shows as "Price upon request". Items that are zero (0) in stock on my website should show as "Sold", but with the above code all products with "0" price are shown as "Price upon request".
Please modify the code so products without price that are in stock (1) is marked as "Price upon request" and items that are out of stock (0) and without price is still marked as sold :)
Found this code on your website: https://currency-switcher.com/faq
How to to display the text “Call for Price” when the price is 0 or blank
Next code will do the job:
add_filter('woocommerce_get_price_html', 'fbs_woocommerce_get_price_html', 100, 2);
function fbs_woocommerce_get_price_html($price, $product)
{
if ($product->price <= 0)
{
//remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
//remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
return 'Call for Price';
} else
{
return $price;
}
}
After applying this code in my child theme there is a problem.
Items that are marked as"Sold" on my website by having no price and out of stock now shows as"Price upon request". Items that are zero (0) in stock on my website should show as"Sold", but with the above code all products with"0" price are shown as"Price upon request".
Please modify the code so products without price that are in stock (1) is marked as"Price upon request" and items that are out of stock (0) and without price is still marked as sold :)
Quote from Pablo Borysenco on February 12, 2024, 10:51Hello
What plugin version number are you using?
Hello
What plugin version number are you using?
Quote from Jonas on February 12, 2024, 12:21Hello,
Version 1.4.1.7
Hello,
Version 1.4.1.7
Quote from Pablo Borysenco on February 12, 2024, 13:35Hello
please try in file - wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php - add this code - https://share.pluginus.net/image/i20240212133356.png
if (empty($price)) {
return $price;
}
Hello
please try in file - wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php - add this code - https://share.pluginus.net/image/i20240212133356.png
if (empty($price)) {
return $price;
}
Quote from Jonas on February 12, 2024, 13:50My code + changing product type to "External/Affiliate product" + your code, solved the problem.
You are the best, thanks for your time! :D
Found my code in Stack overflow: https://stackoverflow.com/questions/47611343/add-text-after-price-unless-the-price-is-zero-then-call-for-price-in-woocommerc
My code + changing product type to"External/Affiliate product" + your code, solved the problem.
You are the best, thanks for your time! :D
Found my code in Stack overflow: https://stackoverflow.com/questions/47611343/add-text-after-price-unless-the-price-is-zero-then-call-for-price-in-woocommerc
Quote from Pablo Borysenco on February 13, 2024, 10:09Hello
Great! Welcome;)
Hello
Great! Welcome;)