[Commerce Service for LS Central DB] & [LS SaaS] & [LS Central WS] 22.1 (LS:22.2.9.1004958 [59761])
Commerce Service for LS Central:2023.05.45
LS Magento: 2.3
LS Retail Partner - Dizparc
Steps to reproduce (*)
Set the Price of the Configurable product in ls_replication_repl_price to 0
Set the Prices of the Child-products to anything other than 0
Run SyncPrices-cron for that configurable + children
Expected result (*)
I've been logging all changes to the "price" attribute on products and this is the log after a "normal" by-design SyncPrice-run
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008: from: 0, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-000: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-001: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-002: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-003: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-004: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-000: from: 0, to: 2499 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-001: from: 0, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-002: from: 0, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-003: from: 0, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-004: from: 0, to: 2499 [] []
Actual result (*)
Depending on the order of the rows in ls_replication_repl_price is stored, there may be a problem if the configurable-line comes after the line of a childproduct, because the sync always assumes the child are supposed to have the same price as the configurable.
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-000: from: 2000, to: 2499 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008: from: 0, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-000: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-001: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-002: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-003: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-004: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-001: from: 2000, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-002: from: 2000, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-003: from: 2000, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-004: from: 2000, to: 2499 [] []
The result of this example is that the new price of 100008-000 is marked as successfully imported, but since the parent is imported after, the price is reset to 0, thus the price of the 100008-000 variant is wrongfully set to 0.
Hi @henriksjodahl, thanks for opening reporting this issue. This has already been fixed and merged into the master branch and soon will be available in the upcoming release.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
I've been logging all changes to the "price" attribute on products and this is the log after a "normal" by-design SyncPrice-run
Actual result (*)
Depending on the order of the rows in ls_replication_repl_price is stored, there may be a problem if the configurable-line comes after the line of a childproduct, because the sync always assumes the child are supposed to have the same price as the configurable.
The result of this example is that the new price of 100008-000 is marked as successfully imported, but since the parent is imported after, the price is reset to 0, thus the price of the 100008-000 variant is wrongfully set to 0.