PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

price filter not working correctly

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 please
If 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.

Hi Support Team,

I just bought your plugin on Envato.
Unfortunately the price filter is not working correctly after the default installation!

The site is still in development and so I only have 2 products. The Ion-Slider shows the correct price range (1 - 33.588) but by changing the range to 20.000 - 33.588 no product shows up.

All the prices are filled in excl. vat in the backend. The Shop itselfs shows by default all prices incl. vat.
product one 27.990 excl. / 33.588 incl. should show up. but it doesn´t!

I have several custom-programmed processes. However, I deactivated them for testing purposes, and the behavior persisted.

And the performance isn´t the best at all with just 2 products and I actived turbo mode already.

 

thanks for your support!

 

kind regards

 

Hello

Create please stage site using Duplicator https://wordpress.org/plugins/duplicator/ - clone of the site provide please in the private area of this ticket exect link to the issue, wp-admin access, and ftp acees to that stage site.

Also you can do little test - disable HUSKY plugin, and check if price filter works fine without it, sometimes its happens, in this case try:

regenerate the data table  - Woocommerce -> Status -> Tools - https://share.pluginus.net/image/i20240111124932.png

Welcome!

Staging site not possible! But I have a dup-backup in case of. It´s ... like mentioned ... a dev-site!

Tested without Husky - ok.

As I said: It´s a problem with tax incl. vs. excl.
ION Slider shows the correct value but as soon as I change the lower price to whatever to have only products from x-33.588,00 euro ... no products found!
cause the generated URL sets itself to : swoof/price-17820-to-27990/

27990 is product without tax!
33588 is product with tax!

WOO-Settings: products excl. vat
Shop shows products incl. vat

 

Hello

I did little fix and looks like it works now, please do tests on /shop page

Hello,

i´ve seen you´ve been working on the site so I stopped my work ;)

It looks much better now cause the right product is listed.

BUT:
.) normal view: product price info: incl. 20% VAT - OK
.) changing slider to -> from: 13321 (or x) to: 33588 - product price info: changes to excl. 20% VAT - NOK - should be still incl. 20% VAT
.) Reset price range: Slider jumps back to wrong values (1 - 27990) and product price info still wrong: Shows excl. 20% VAT - NOK - should be incl. 20% VAT

thanks in advance!

Hello

I revised function about getting taxes and changed it:

//new function

public static function get_max_price($additional_taxes ="") {
global $wpdb;

if (version_compare(WOOCOMMERCE_VERSION, '2.6', '>')) {
$prices = self::get_filtered_price($additional_taxes);
$max_price = $prices->max_price ?: 0;
} else {
//not supported
}

// If taxes are included and need to be shown with tax
if (wc_tax_enabled() && 'incl' === get_option('woocommerce_tax_display_shop')) {
// Find the product with the highest price
$product_id = $wpdb->get_var($wpdb->prepare("
SELECT post_id
FROM {$wpdb->postmeta}
WHERE meta_key = '_price'
AND meta_value = %s
LIMIT 1
", $max_price));

if ($product_id) {
$product = wc_get_product($product_id);
if ($product) {
// Get the price including taxes via the WooCommerce API
$max_price = wc_get_price_including_tax($product);
}
}
}

return ceil($max_price);
}

 

Do tests please, now it works as with filtering so after reset ...

 

 

hello,

while loading it shows the old values! this could be irritating to end-customers.
still price info with: excl. 20% VAT - wrong - should be incl. 20% VAT!

as soon as the slider is moved and dropped everything changes to excl. 20% VAT.

this is a big issue!

 

 

Hello

while loading it shows the old values - what do you mean, values in the inputs?

still price info with: excl. 20% VAT - wrong - should be incl. 20% VAT! - looks like I not understood you, whereb to see it, now I see such picture

 

hello

first: I kindly ask you to delete your picture as soon as possible!

"while loading it shows the old values - what do you mean, values in the inputs?" - yes, but forget about it! those inputs are already deactivated and won´t be needed any more.

"still price info with: excl. 20% VAT - wrong - should be incl. 20% VAT! - looks like I not understood you, where to see it..." - just look under those product-images!
there´s a bunch of information and under the price you´ll find the VAT information. You can even see that in your picture. ;)

Hello

Previous image removed

Looks like you mean what product card displayed, if yes, I deactivated HUSKY and picture is the same: [picture is removed] - HUSKY not related to the products content and price how to display it, only filtering. If you meant something another make short video please and share in the private area

please remove this picture as well! thank you!

By default it shows incl. 20% VAT. Yes.
Then set the range of price -> the value changes to excl. 20% VAT and stays there.

this only happens with husky activated.

hello again.

I just wanted to tell you, that you can close this ticket. thank you for your support but I just recognized this:
Filtering by any other value with checkboxes and clearing this filter, the slider shows the wrong values. This time the highest price + 20% is shown. So in this case I can´t use your plugin and I´m afraid possible solutions will take longer. Maybe I can use your plugin in any other project but not in this special one.
Another solution would be to change Woo-settings to"add products with tax" - cause than everything works as expected. But thats not my decision and so ... to keep it simple ...

Thanks again for your support and have a great day!

best regards

 

Hello

Thank you and Welcome!