fond-of-spryker / data-fixer-product
n/a
Installs: 1 042
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- fond-of-spryker/data-fixer: ^1.0.0
- fond-of-spryker/product: ^1.1.0
- spryker/availability-storage: ^1.2.0
- spryker/stock: ^5.0.0
- spryker/store: ^1.0.0
Requires (Dev)
- codeception/codeception: ^2.3
- mikey179/vfsstream: ^1.6
- php-coveralls/php-coveralls: ^2.0
- phpro/grumphp: ^0.14
- phpunit/phpunit: 7.1.0
- sebastian/phpcpd: ^4.0
- spryker/code-sniffer: ^0.11
This package is auto-updated.
Last update: 2024-11-15 18:12:20 UTC
README
Installation
composer require fond-of-spryker/data-fixer-product
Register ProductAvailabilityAndReservationDataFixerPlugin in DataFixerDependencyProvider
Register ProductAvailabilityAndReservationQuantityDataFixerPlugin in DataFixerDependencyProvider
/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return array
*/
public function getDataFixer(Container $container): array
{
return [
new ProductAvailabilityAndReservationDataFixerPlugin(),
new ProductAvailabilityAndReservationQuantityDataFixerPlugin(),
];
}
Config
IDSTORE => ['SKUPREFIX']
// ---------- DataFixerProduct
$config[DataFixerProductConstants::DATA_FIXER_PRODUCT_AVAILABILITY_DATA_SKU_PREFIX] = [
1 => ['AFZ%', 'HAP%'],
4 => ['PP%', 'W-%'],
5 => ['ERG-%'],
6 => ['SAT-%'],
];
Usage
Remove all wrong availability and product reservation for current store.
vendor/bin/console data-fixer:fix -f ProductAvailabilityAndReservationWrongStoreRelationRemover
APPLICATION_STORE=STORENAME vendor/bin/console data-fixer:fix -f ProductAvailabilityAndReservationWrongStoreRelationRemover
Reset all product reservations to current stock of the product for current store
vendor/bin/console data-fixer:fix -f ProductAvailabilityAndReservationQuantity
APPLICATION_STORE=STORENAME vendor/bin/console data-fixer:fix -f ProductAvailabilityAndReservationQuantity