Fix: Price index limited to 100 product - #1124
Conversation
a4ae731 to
04447d8
Compare
|
@Codencode Paolo, I am sorry, but it works fine on my 8.1.7 shop with 4.0.0 module for some reason. 🤔 And the shop is running since 2015, with holes in the IDs. |
|
@Hlavtox |
|
@Codencode Yep I think it works fine, but there indeed is an issue. AI says: However, the process still works thanks to the recursive call (or repeated AJAX requests), which continues indexing as long as the cursor advances. The downside is that progress reporting can be inaccurate (it always adds 100 even if fewer rows were processed), and the loop condition is confusing. A cleaner approach would be to loop while the cursor actually moves forward, or compare against the maximum product ID, so the whole process happens in one loop without relying on recursion. |
|
@Hlavtox, Basically, I set the product table AUTO_INCREMENT to 10000 and create 200 products.
Here the system prints the number of iterations performed. I created 2 versions of the module:
Here are the results: without fix:
with fix:
As you can see, in the first case the system executes the method call 3 times, while in the second case it performs 3 iterations, thus with a single call to the |


Uh oh!
There was an error while loading. Please reload this page.