Support Forum

Content of the article

WPBE - WordPress Posts Bulk Editor Professional
You need to log-in to create request (topic) to the support

Message "Notice: Trying to get property of non-object" with price filter

(new from 01-07-2019)
If you not got email within 24 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here.
The support doesn work on saturdays and sundays, so some Friday requests can be answered on Monday.

Hello,

 

I get this message when I use the price filter on my Shop Page :

"Notice: Trying to get property of non-object in /home/clicjouepc/www/wp-content/themes/Divi/includes/builder/functions.php on line 8540"

 

There's no problem with the other controls.

I never modified the code.

 

Thanks for your help

Hello

Please  try  to disable  my  plugin  and  do test with native  woo price filter

If  no luck  - drop me exact  link to the  issue

Hello Pablo,

 

I did nothing more but the price filter works now on this page https://www.clic-jouet.fr/index.php/2329-2/?swoof=1&min_price=15&max_price=25&product_cat=peluches  (a page I created)

but the price filter doesn't work on the divi shop page made with divi builder  https://www.clic-jouet.fr/index.php/boutique/

The two pages have the same structure with divi shop module for the products.

 

I tried to add a price filter widget a long time ago in a sidebar with the appearance/widget menu but it never worked (the widget is invisible as the attributes filter widget, but some other work as calendar or image...)

 

Hello

Try  to use  [woof_products ] to show products  on this  page.  This seems to be a problem with the current template.

Hello,

thanks a lot it works.

in fact I realised that the price filter doesn't work if any categories is selected. in my second message and in the second link you have my shop page.

on the first line you have divi shop module with my products (only 4 for testing)

on the second line you have text module with [woof_products] shortcode

 

if you don't select any categories only the [woof_products] shortcode works and not the divi shop module.

If I select a categorie, the two modules work

 

If I select a categorie the text "?swoof=1" is added in the url just after "boutique/" and then the divi shop module works.

 

Thanks

Hello

Try  in file - \plugins\woocommerce-products-filter\js\front.js change  line  -  https://c2n.me/43uFnFY.png

var l = woof_current_page_link + '?'+swoof_search_slug + '=1&min_price=' + woof_current_values.min_price + '&max_price=' + woof_current_values.max_price;