WCMp Catalog Enquiry
Tagged: Catalog Enquiry (Pro)
-
AuthorPosts
-
-
February 25, 2022 at 5:49 PM #134870Hannu Ala-HarjaParticipant
If I put Catalog Enquiry (Pro) my site turn very slow specially on admin side. If I turn them off then good and fast again.
What to do? -
February 25, 2022 at 7:37 PM #134882MVX Support NinjaKeymaster
Hi, We tried to recreate this on our end but didn’t face any such issues.
Here is the video- https://www.loom.com/share/82c6c58bd4404b0db7823b5ebf6a8ff0
It seems like there is some plugin/theme conflict. Just to be sure, disable all the plugins except WooCommerce, WCMp, WCMp Catalog Enquiry Pro and Catalog Enquiry, and check again.
If the issue is still there, switch to some default theme such as twenty and check again.
Do keep us posted. -
March 19, 2022 at 12:34 PM #135590Luca ToccoParticipant
Same problem here.
I’m using the plugin from november and it was not this way. -
March 19, 2022 at 1:26 PM #135591Luca ToccoParticipant
I’ve followed your instruction and the problem is still there. I’ve tried on a website with under 100 products and there’s no problem, the problem start when you have a great amount of products (in my case 1500).In the screenshot you can see the exact query. The really strange thing it’s that it happen everywhere in frontend and backend (also in pages not related to your plugin).
-
March 19, 2022 at 3:28 PM #135595Luca ToccoParticipant
We found a way to fix it with a workaround. The problem was that the plugin has a query that call all the products on each page (and there’s no reason to do that..).
So in woocommerce-catalog-enquiry-core-functions.php we changed the post per page value from -1 to 12 and now it works (see code below).// find all woocommerce product
if(!function_exists(‘woocommerce_catalog_products’)) {function woocommerce_catalog_products() {
$args = array( ‘posts_per_page’ => 12, ‘post_type’ => ‘product’, ‘post_status’ => ‘publish’, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’ );
$woocommerce_product = get_posts( $args );
$all_products = array();
foreach ( $woocommerce_product as $post => $value ){
$all_products[$value->ID] = $value->post_title;
}
return $all_products;
}
}BTW i think it’s a bug and your tech department need to look at it and find out if that call is needed or not..and maybe use a cron to call that query only where needed.
Hope this will be fixed in a future release.
Best. -
March 21, 2022 at 8:28 PM #135641Raju The Cool GuyKeymaster
Hi,
You might have a huge number of products on your site. We have to show all products on the exclusion option list. So that users can exclude that product. So if you have huge numbers of products then you have modified them in this way. In our next update, we will add a filter, so that you can modify it as your wish. -
March 21, 2022 at 8:55 PM #135643Luca ToccoParticipant
Yes i have a lot of products but the problem is that that query start every time i load every page in the wordpress dashboard(also the one not related with your plugin) and this is not good at all.
If you need it for some plugin option you need to execute that query only in the page it belong (and also this way it can really slowdown the plugin option if there’s a lot of data).
Thanks for your attention and waiting for the filter in the next update. As soon as it’s out i let you know if it works properly. -
March 22, 2022 at 8:32 PM #135681NerdySupportExpert MoumitaKeymaster
@Luca Tocco, we will release an update in our free plugin with this fix.
-
March 23, 2022 at 7:39 PM #135714Raju The Cool GuyKeymaster
Hi @Luca Tocco,
After our update, you can use this below code in your currently active theme funtions.php fileadd_filter('woocommerce_catalog_limit_backend_product', function($products) { $products['posts_per_page'] = 12; return $products; });
CopyThanks
-
-
AuthorPosts
The topic ‘Catalog Enquiry (Pro) Makes my site super slow’ is closed to new replies.