Developer forum

Forum » Ecommerce - Standard features » Enable optimized product retrieval

Enable optimized product retrieval

Per Ljung
Reply

Hi!

What is the above setting in the product catalog module used for? I had missing products in the frontend when this option was on, when I unchecked it the missing products were displayed again.

Regards,

Per


Replies

 
Nikki Strømsnes
Reply

I'm experiencing the same problem. Switching to a standard template makes no difference, and I can't find any info on the setting in the documentation nor the release notes.

 

Possibly the "optimization" is done by simply retrieving less data? ;) 

 
Jacob Bertelsen
Reply

hah, nice one.

But seriously, it would be nice with a reply from DW staff

 
Jacob Storgaard Jensen
Reply

I would like a reply from DW on this one too! Experiencing the same weird behavior... Might it be connected to the product search index not being set up...?

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Then let me try to explain what "Enable optimized product retrieval" actually does.

 

A little back story. When the product list rendered a list of products from a list of Groups, it would retrieve all products from these groups, instanciate them, sort this product collection, then find the specific products for the current page number, then discard the rest. This is potentially a huge overhead. One example from a customer site: retrieve 8000+ products from the database only to display 8.

 

This is the reason we developed Optimized Product Retrieval (OPR). OPR uses the database to select, sort and page the products. The benefit is that we only retrieve and instanciate the products being displayed and not all products from the selected groups. So Nikki is actually correct, though not in the way you thought :)

 

I need to know a bit more about the problems you're facing in order for me to help. There has been a few bug fixes to OPR already, so maybe the issues have been resolved. If not, please let me know.

 

- Jeppe

 
Nikki Strømsnes
Reply

Hello Jeppe,

 

I've discovered an oddity. I have a product list, which relies on AJAX. I basically check to see if there are any products on the next page, then load them onto my page. If there are zero products, I will stop checking for new products.

 

However, if OPR is turned on, and there are no products on the page, it will instead return a bunch of cached products.

 

Example:

 

My product list is set to display 9 products per page. There are 27 products in total (three pages of 9 each).

The first page is loaded statically, and the next two pages are loaded with AJAX. When I request ?PageNum=4 I expect to see zero items, but it actually returns 9 still. Those 9 are products that have already been loaded onto my page.

 

When I turn OPR off, it works as expected.

 
Anders Ebdrup
Reply

Hi All,

 

I addition to this setting we experience that products in campaigns is not handled correct as this setting does not take this setting: 'Show products when campaign is not active' into account.

 

Best regards, Anders

 

You must be logged in to post in the forum