Quote from laszlovagyok on August 31, 2023, 16:01
Hello dear Fox!
I hope everything alright. Thank you very much your previous help. I have done the task what you have told me. I got one question please.
I would like to setup the hungarian forint such as from 17.735 Ft to 17.999 Ft. I was thinking how can I archive that but i need help. By the way your software amazing, i am going to leave a great review.
I would like to setup the same amount for HUF / PLN / NOK / DKK / CZK . There are no cents. Thats why i need your advice.
This is how looks like the current code. Please help me how can I solve this issue. Thank you very much for your help.! Have a nice day! :)
add_filter('woocs_raw_woocommerce_price', function ($price) {
global $WOOCS;
if ($WOOCS->current_currency === 'USD') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'EUR') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'CHF') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'HUF') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'GBP') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'PLN') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'NOK') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'DKK') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'CZK') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'RON') {
$price = round($price + 0.01) - 0.01;
}
return $price;
});
Hello dear Fox!
I hope everything alright. Thank you very much your previous help. I have done the task what you have told me. I got one question please.
I would like to setup the hungarian forint such as from 17.735 Ft to 17.999 Ft. I was thinking how can I archive that but i need help. By the way your software amazing, i am going to leave a great review.
I would like to setup the same amount for HUF / PLN / NOK / DKK / CZK . There are no cents. Thats why i need your advice.
This is how looks like the current code. Please help me how can I solve this issue. Thank you very much for your help.! Have a nice day! :)
add_filter('woocs_raw_woocommerce_price', function ($price) {
global $WOOCS;
if ($WOOCS->current_currency === 'USD') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'EUR') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'CHF') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'HUF') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'GBP') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'PLN') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'NOK') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'DKK') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'CZK') {
$price = round($price + 0.01) - 0.01;
}
if ($WOOCS->current_currency !== 'RON') {
$price = round($price + 0.01) - 0.01;
}
return $price;
});