woo range slider not aware of tax?
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 gabriel.pribeagu on August 26, 2021, 17:58Hello,
How to test
- Enable taxes on your store and set a tax rate (10% VAT)
- Choose to enter product prices excl tax (10, 20, 50)
- Choose to display product prices incl tax on the frontend.
- Add a the woof price filter (woo-prince range) and view the page.
The product prices will be 11, 22, 55. It is correct
The woo price range is 10 - 50. This is the range without taxes. I need to match the products range with taxes. So 11-55. Technically I need to set the min max values with a tax offset.
Here is a link to see the example below
or picture https://clip2net.com/s/4d8nnSw
I tried to solve this problem by using the Ion slider and apply the 10% tax in its setting.
The slider show 11-61. The 11 part is correct, it`s match the minimum price with tax. The 61 part is wrong because it has tax applied 2 times (50*10/100)*10/100
https://clip2net.com/s/4d8nbOb
Also the Ion slider in this case is not working ok because if you narrow the slider to 11 value the filter will show zero products even if there is a product with price=11.
https://clip2net.com/s/4d8ngyZ
You have to go to 11+tax to reach the product that has price=11.
https://clip2net.com/s/4d8niSV
If i remove the tax from woo commerce and only keep the Ion slider tax, the ion range will be correct bat the product prices will show without tax so it doesn`t make sense this solution.
So I need some advices to have the correct range with taxes in the woof price filter.
I`m forced to insert prices exclusive taxes and display them inclusive taxes.
I only have one tax for all the products in my store.
Thank you
All the access in private area
test link
Hello,
How to test
- Enable taxes on your store and set a tax rate (10% VAT)
- Choose to enter product prices excl tax (10, 20, 50)
- Choose to display product prices incl tax on the frontend.
- Add a the woof price filter (woo-prince range) and view the page.
The product prices will be 11, 22, 55. It is correct
The woo price range is 10 - 50. This is the range without taxes. I need to match the products range with taxes. So 11-55. Technically I need to set the min max values with a tax offset.
Here is a link to see the example below
or picture https://clip2net.com/s/4d8nnSw
I tried to solve this problem by using the Ion slider and apply the 10% tax in its setting.
The slider show 11-61. The 11 part is correct, it`s match the minimum price with tax. The 61 part is wrong because it has tax applied 2 times (50*10/100)*10/100
https://clip2net.com/s/4d8nbOb
Also the Ion slider in this case is not working ok because if you narrow the slider to 11 value the filter will show zero products even if there is a product with price=11.
https://clip2net.com/s/4d8ngyZ
You have to go to 11+tax to reach the product that has price=11.
https://clip2net.com/s/4d8niSV
If i remove the tax from woo commerce and only keep the Ion slider tax, the ion range will be correct bat the product prices will show without tax so it doesn`t make sense this solution.
So I need some advices to have the correct range with taxes in the woof price filter.
I`m forced to insert prices exclusive taxes and display them inclusive taxes.
I only have one tax for all the products in my store.
Thank you
All the access in private area
test link
Quote from Pablo Borysenco on August 27, 2021, 16:18Hello
If the tax is added in the standard way, the plugin will automatically add the tax(for max-price) - https://share.pluginus.net/image/i20210827165431.png
Hello
If the tax is added in the standard way, the plugin will automatically add the tax(for max-price) - https://share.pluginus.net/image/i20210827165431.png
Quote from gabriel.pribeagu on August 27, 2021, 16:23Ok, but not for the minimum price. Now teh minimum price it is 10 in slider insteed of 11(price) as I see in your picture if you use Ion slide. So Ion slider only show the max correct, not the minimum.
Also woo range slider still show min and max without taxes. Is there a way to have a slider with min and max correct (with taxes)?
Ok, but not for the minimum price. Now teh minimum price it is 10 in slider insteed of 11(price) as I see in your picture if you use Ion slide. So Ion slider only show the max correct, not the minimum.
Also woo range slider still show min and max without taxes. Is there a way to have a slider with min and max correct (with taxes)?
Quote from Pablo Borysenco on August 27, 2021, 17:09in file - \wp-content\plugins\woocommerce-products-filter\classes\helper.php - add code - https://share.pluginus.net/image/i20210827180747.png
if (wc_tax_enabled() && 'incl' === get_option('woocommerce_tax_display_shop') && !wc_prices_include_tax()) {
$tax_classes = array_merge(array(''), WC_Tax::get_tax_classes());
$class_max = $max;
$class_min = $min;
foreach ($tax_classes as $tax_class) {
if ($tax_rates = WC_Tax::get_rates($tax_class)) {
$class_max = ceil($max + WC_Tax::get_tax_total(WC_Tax::calc_exclusive_tax($max, $tax_rates)));
$class_min = floor($min + WC_Tax::get_tax_total(WC_Tax::calc_exclusive_tax($min, $tax_rates)));
}
}
$min = $class_min;
$max = $class_max;
}
result - https://share.pluginus.net/image/i20210827180909.png
in file - \wp-content\plugins\woocommerce-products-filter\classes\helper.php - add code - https://share.pluginus.net/image/i20210827180747.png
if (wc_tax_enabled() && 'incl' === get_option('woocommerce_tax_display_shop') && !wc_prices_include_tax()) {
$tax_classes = array_merge(array(''), WC_Tax::get_tax_classes());
$class_max = $max;
$class_min = $min;
foreach ($tax_classes as $tax_class) {
if ($tax_rates = WC_Tax::get_rates($tax_class)) {
$class_max = ceil($max + WC_Tax::get_tax_total(WC_Tax::calc_exclusive_tax($max, $tax_rates)));
$class_min = floor($min + WC_Tax::get_tax_total(WC_Tax::calc_exclusive_tax($min, $tax_rates)));
}
}
$min = $class_min;
$max = $class_max;
}
result - https://share.pluginus.net/image/i20210827180909.png
Quote from gabriel.pribeagu on August 27, 2021, 17:16Wonderfull!!
Thank you very much. Maybe this thing will be implemented in the next update so woo range slider to bee aware of taxes by default :)
Wonderfull!!
Thank you very much. Maybe this thing will be implemented in the next update so woo range slider to bee aware of taxes by default :)
Quote from Pablo Borysenco on August 27, 2021, 17:46Yes, I passed it to developers
Yes, I passed it to developers