Skip to content
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

Fix issue: Remove the tier price for all products that are available #66

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Version 26.1.1

## Bugfixes

* Fix issue: Remove the tier price for all products that are available through the fired listner
* Define a new method `addPrimarySkuToRowPkMapping` to map the SKU with the primary SKU of the row

## Features

* none

# Version 26.1.0

## Bugfixes
Expand Down
2 changes: 2 additions & 0 deletions src/Observers/EeProductObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use TechDivision\Import\Dbal\Utils\EntityStatus;
use TechDivision\Import\Product\Ee\Utils\MemberNames;
use TechDivision\Import\Product\Observers\ProductObserver;
use TechDivision\Import\Product\Utils\ColumnKeys;

/**
* Observer that create's the product itself for the Magento 2 EE edition.
Expand Down Expand Up @@ -48,6 +49,7 @@ protected function mergeEntity(array $entity, array $attr, $changeSetName = null
$this->setLastRowId($entity[MemberNames::ROW_ID]);
$this->setLastEntityId($entity[MemberNames::ENTITY_ID]);

$this->addPrimarySkuToRowPkMapping($entity[MemberNames::SKU], $entity[MemberNames::ROW_ID]);
// merge and return the entity
return parent::mergeEntity($entity, $attr, $changeSetName);
}
Expand Down
9 changes: 8 additions & 1 deletion src/Subjects/EeBunchSubject.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

namespace TechDivision\Import\Product\Ee\Subjects;

use TechDivision\Import\Product\Utils\RegistryKeys as ProductRegistryKeys;
use TechDivision\Import\Utils\RegistryKeys;
use TechDivision\Import\Product\Subjects\BunchSubject;
use TechDivision\Import\Product\Ee\Exceptions\MapSkuToRowIdException;
Expand Down Expand Up @@ -107,7 +108,13 @@ public function tearDown($serial)
$registryProcessor = $this->getRegistryProcessor();

// update the status up the actual import with SKU => row ID mapping
$registryProcessor->mergeAttributesRecursive(RegistryKeys::STATUS, array(RegistryKeys::SKU_ROW_ID_MAPPING => $this->skuRowIdMapping));
$registryProcessor->mergeAttributesRecursive(
RegistryKeys::STATUS,
array(
RegistryKeys::SKU_ROW_ID_MAPPING => $this->skuRowIdMapping,
ProductRegistryKeys::PRIMARY_SKU_TO_ROW_PK_MAPPINGS => $this->primarySkuToRowPkMappings
)
);

// call parent method
parent::tearDown($serial);
Expand Down
Loading