You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found an issue in the openmage core which destroys category product positions in anchor categories.
When I save the product from the magento backend we get positions in anchor categories like: 80003
When the "catalog category product" index is processing all products we get positions in anchor categories like: 20003
This different positions calculations generate wrong orders in our catalog. I expect that the positions should be the same, either I save the product in backend or I run the index, but they are not.
I have checked the code and found differences between the catalogProductSave function and the indexer reindexAll function.
Both functions have different calculations which should be changed to one way.
The way the positions are calculations should be the same and we should decide us for one way. Either from the catalogProductSave of from the reindexAll function.
For me this change fixed my problem, but it also could be that the position calculating in reindexAll is wrong.
Regards,
Alexander Herbel
The text was updated successfully, but these errors were encountered:
I have found an issue in the openmage core which destroys category product positions in anchor categories.
When I save the product from the magento backend we get positions in anchor categories like: 80003
When the "catalog category product" index is processing all products we get positions in anchor categories like: 20003
This different positions calculations generate wrong orders in our catalog. I expect that the positions should be the same, either I save the product in backend or I run the index, but they are not.
I have checked the code and found differences between the catalogProductSave function and the indexer reindexAll function.
Both functions have different calculations which should be changed to one way.
catalogProductSave function
app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php
Line: 559
Code-Line: (cc.position + 1) + (cc.level +1) * 10000 + cp.position
reindexAll function
app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php
Line: 896
Code-Line: (cc.position + 1) * (cc.level + 1*10000) + cp.position
The way the positions are calculations should be the same and we should decide us for one way. Either from the catalogProductSave of from the reindexAll function.
For me this change fixed my problem, but it also could be that the position calculating in reindexAll is wrong.
Regards,
Alexander Herbel
The text was updated successfully, but these errors were encountered: