Since you are using custom plugin for price range, I'd like to test this personally on your host and for this I need your FTP (not WP) credentials to modify theme files and test them.
To include your credentials click Insert Credentials button in editor toolbar. (See how)
Also tell me how to reproduce the issue so I can focus on the problem quickly.
" In fact with taxes activated (all 22%) and doing any search with the default woocommerce price range filter, it sends a query FROM price without tax (wrong calculated: for ex. input 5, without vat should be 4.1€ + 0.90€ (22%) [5/1.22% = 4.10€] = 5 but the input sent is 3.9€ which i think is derived like this: 5 * 0.22 = 1.10, 5 – 1.1 = 3.9€);
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts INNER JOIN wp_postmeta
ON ( wp_posts.ID = wp_postmeta.post_id )
WHERE 1=1 AND ( wp_posts.ID NOT IN ( SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (7) ) )
AND ( ( wp_postmeta.meta_key = '_price'
AND CAST(wp_postmeta.meta_value AS DECIMAL(10,2)) BETWEEN '<strong>234</strong>'
AND '<strong>488</strong>' ) )
AND wp_posts.post_type = 'product'
AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')
GROUP BY wp_posts.ID
ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
LIMIT 0, 10
Hi there!
I wrote you before about this problem, but haven't had time till now to test the system without modifications and plugins.
The problem is that the woocommerce price range doesn't work correctly. When i give some min and max input it doesn't display the correct products.
I've tried with basic oxygen theme and one buy one every plugin until i had only woocommerce on, but still shows this issue.
I truly think it's a woocommerce problem, and i've already wrote them.
I would to just know if you had experienced the same problem if you test it on your system.
Anyways the problem is that i can't use any price range plugin, because they're all mainly Ajax and don't work on our system.
Do you know any solution to this?
Thanks
Hi Pietro,
Since you are using custom plugin for price range, I'd like to test this personally on your host and for this I need your FTP (not WP) credentials to modify theme files and test them.
To include your credentials click Insert Credentials button in editor toolbar. (See how)
Also tell me how to reproduce the issue so I can focus on the problem quickly.
Hi Pietro,
I have installed Query Monitor plugin and tried the price filter on shop page:
(view large version)
So after hitting the Filter button the results were properly shown as the main query is affected:
(view large version)
So mainly the query is properly formed and our theme only parses the results.
If you activate the original parent theme of Oxygen you will see that it will show 14 results matching the price range 3-12€:
http://drops.laborator.co/Fy8fyY
I've also tested with your child theme functions so I have removed this line of code:
And the results were showing fine. So definitely the problem with price range is related to that file.
Hi Arlind,
thanks for your answer.
Anyways we were right, it's not our code that has problem but instead is actually a problem of Woocommerce.
More than a month ago we've opened a support thread and here you can see all the details about the problem: https://wordpress.org/support/topic/filter-price-widget-not-working-properly/ :
" In fact with taxes activated (all 22%) and doing any search with the default woocommerce price range filter, it sends a query FROM price without tax (wrong calculated: for ex. input 5, without vat should be 4.1€ + 0.90€ (22%) [5/1.22% = 4.10€] = 5 but the input sent is 3.9€ which i think is derived like this: 5 * 0.22 = 1.10, 5 – 1.1 = 3.9€);
and the TO is like the input.
See the example:
Url: https://localhost/shopping/negozio/?min_price=300&max_price=488
The query is:
Hi Pietro,
Thank you for letting me know about this. Does the WooCommerce team fixed this issue or it still remains?
Hi Arlind,
I will check in the next few days and will let you know.
Regards