-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit post-checkout stock re-index to only products that manage stock… #562
Limit post-checkout stock re-index to only products that manage stock… #562
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Query should only select needed columns. E.g. $stockCollection->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns(['item_id','product_id'])
. Or, perhaps this reduction of scope should be handled by the reindexProducts
method?
…nt prior to usage in SQL IN statement
Changed as requested. The resulting SQL is:
Also note that I cast all values of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it looks fine
…ducts that manage stock * Limit post-checkout stock re-index to only products that manage stock. * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement refs: OpenMage#152
OpenMage#562) * Limit post-checkout stock re-index to only products that manage stock. ref OpenMage#152 * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement
…ducts that manage stock * Limit post-checkout stock re-index to only products that manage stock. * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement refs: OpenMage#152
OpenMage#562) * Limit post-checkout stock re-index to only products that manage stock. ref OpenMage#152 * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement
…ducts that manage stock * Limit post-checkout stock re-index to only products that manage stock. * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement refs: OpenMage#152
…ducts that manage stock * Limit post-checkout stock re-index to only products that manage stock. * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement refs: OpenMage#152
…ducts that manage stock * Limit post-checkout stock re-index to only products that manage stock. * Restrict collection to just one column in result. Cast id values to int prior to usage in SQL IN statement refs: OpenMage#152
ref #152
The core post checkout stock reindex routine will stock re-indx all products in order placed.
This is not needed, when an item is not stock managed.
This change has been used in a live environment on two sites. Both sites only manage about 10% of their stock items in magento.
This change removed all instanced of the dreaded Lock Table during checkout.
The change will most likely have zero effect on stores with full stock management.