Skip to content

Commit

Permalink
PAC-354: Add new Callback to validate store-view and website
Browse files Browse the repository at this point in the history
  • Loading branch information
kenza-ya committed Jul 15, 2024
1 parent c4864a3 commit 66c675d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 156 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
## Features

* Add #PAC-354 new feature:
* Validation whether the product of the website is assigned to the current store view line
* `TechDivision\Import\Callbacks\StoreWebsiteValidatorCallback`
* extend the validation für catalog_product entity
* `"import.callback.store.in.website.validator"`

# Version 25.3.2

Expand Down
5 changes: 4 additions & 1 deletion etc/configuration/operations.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@
"callbacks": [
{
"sku": [ "import.callback.custom.regex.validator" ],
"store_view_code": [ "import.callback.store.view.code.validator" ],
"store_view_code": [
"import.callback.store.view.code.validator",
"import.callback.store.in.website.validator"
],
"attribute_set_code": [ "import.callback.attribute.set.name.validator" ],
"product_type": [ "import_product.callback.validator.product_type" ],
"tax_class_id": [ "import_product.callback.validator.tax.class" ],
Expand Down
142 changes: 0 additions & 142 deletions src/Callbacks/StoreWebsiteValidatorCallback.php

This file was deleted.

15 changes: 4 additions & 11 deletions symfony/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@
</service>

<!--
| The DI configuration for the black hole enabled URL rewrite action because
| we do NOT want to persist the URL rewrites here, we ONLY want tempoarily
| The DI configuration for the black hole enabled URL rewrite action because
| we do NOT want to persist the URL rewrites here, we ONLY want tempoarily
| add them to cache used to make sure we generate unique request paths
|-->
<service id="import_product.action.wrapped.url.rewrite" class="TechDivision\Import\Dbal\Collection\Actions\GenericIdentifierAction">
Expand All @@ -472,7 +472,7 @@
<argument type="service" id="import.events.emitter"/>
<argument type="service" id="import_product.action.wrapped.url.rewrite"/>
<argument type="service" id="import_product.cache.key.url.rewrite"/>
</service>
</service>

<!--
| The DI configuration for the assemblers
Expand Down Expand Up @@ -564,13 +564,6 @@
<argument>%array_validator.nullable.false%</argument>
<argument>%array_validator.nullable.false%</argument>
</service>
<service id="import.callback.store.in.website.validator" class="TechDivision\Import\Callbacks\StoreWebsiteValidatorCallback">
<argument type="service" id="import.loader.store"/>
<argument type="service" id="import.processor.import"/>
<argument>%array_validator.nullable.true%</argument>
<argument>%array_validator.nullable.false%</argument>
<argument>%array_validator.nullable.false%</argument>
</service>

<!--
| The DI observer configuration
Expand Down Expand Up @@ -858,4 +851,4 @@

</services>

</container>
</container>

0 comments on commit 66c675d

Please sign in to comment.