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

PAC-903: add the enterprise variant #70

Merged
merged 3 commits into from
Oct 11, 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 27.1.0

## Bugfixes

* None

## Features

* New validation added, whether the product of the website is assigned to the current shop view line
* `"import.callback.store.in.website.validator"`

# Version 27.0.1

## Bugfixes
Expand Down
43 changes: 43 additions & 0 deletions src/Observers/EeStoreWebsiteValidatorObserver.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

/**
* TechDivision\Import\Product\Ee\Observers\StoreWebsiteValidatorObserver
*
* PHP version 7
*
* @author MET <[email protected]>
* @copyright 2024 TechDivision GmbH <[email protected]>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/import
* @link http://www.techdivision.com
*/

namespace TechDivision\Import\Product\Ee\Observers;

use TechDivision\Import\Product\Msi\Utils\ColumnKeys;
use TechDivision\Import\Product\Observers\StoreWebsiteValidatorObserver;
use TechDivision\Import\Product\Utils\MemberNames;

/**
* Store view validator implementation.
*
* @author MET <[email protected]>
* @copyright 2024 TechDivision GmbH <[email protected]>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/import
* @link http://www.techdivision.com
*/
class EeStoreWebsiteValidatorObserver extends StoreWebsiteValidatorObserver
{
/**
* @return void
*/
public function setLastEntityRowId($sku): void
{
if (!$this->hasBeenProcessed($sku)) {
$this->entity = $this->loadProduct($sku);
$this->setLastEntityId($this->entity[MemberNames::ROW_ID]);
$this->lastEntityId = $this->getLastEntityId();
}
}
}
4 changes: 4 additions & 0 deletions symfony/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@
<argument type="service" id="import_product.utils.entity.type.code.mapping"/>
</service>

<service id="import_product_ee.store.in.website.validator.observer" class="TechDivision\Import\Product\Ee\Observers\EeStoreWebsiteValidatorObserver">
<argument type="service" id="import_product_ee.processor.product.bunch"/>
<argument type="service" id="import.processor.import"/>
</service>
</services>

</container>
Loading