Skip to content

Commit

Permalink
fix: bug with combination
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john committed Dec 16, 2024
1 parent 1c8cccc commit ebf3fa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Traits/Hooks/UseCombinationHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function hookActionObjectCombinationDeleteAfter($parameters)
/** @var SynchronizationService $synchronizationService * */
$synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME);

$uniqueProductId = $combination->id . '-' . $combination->id_product;
$uniqueProductId = $combination->id_product . '-' . $combination->id;

if (isset($combination->id)) {
$synchronizationService->sendLiveSync(Config::COLLECTION_PRODUCTS, Config::INCREMENTAL_TYPE_DELETE);
Expand Down
6 changes: 3 additions & 3 deletions src/Traits/Hooks/UseProductHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public function hookActionObjectProductUpdateAfter($parameters)
*/
public function hookActionObjectProductDeleteAfter($parameters)
{
/** @var SynchronizationService $synchronizationService * */
$synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME);

/** @var \Product $product */
$product = $parameters['object'];

/** @var SynchronizationService $synchronizationService * */
$synchronizationService = $this->getService(Config::SYNC_SERVICE_NAME);

if (isset($product->id)) {
$synchronizationService->sendLiveSync(Config::COLLECTION_PRODUCTS, Config::INCREMENTAL_TYPE_DELETE);
$synchronizationService->insertContentIntoIncremental(
Expand Down

0 comments on commit ebf3fa6

Please sign in to comment.