Upgrade the ProductConfiguration module
Edit on GitHubUpgrading from version 0.2.* to version 1.0.*
Estimated migration time: 5 minutes
Version 1.0.0 of the ProductConfiguration module introduces the following backward incompatible changes:
- Adjusted
ProductConfigurationFacade::getProductConfigurationCollection()so it’s now getting product configurations byProductConfigurationCriteriainstead ofProductConfigurationFilterTransfer. - Introduced the
spy_product_configuration.uuidfield to allow unique identifier. - Introduced the
spy_product_configuration-unique-uuidunique index.
To upgrade the ProductConfiguration module from version 0.2.* to version 1.0.*, do the following:
- Update the
ProductConfigurationmodule to version 1.0.0:
composer require "spryker/product-configuration":"^1.0.0" --update-with-dependencies
- Update the database schema and generated classes:
console transfer:generate
console propel:install
console transfer:generate
Upgrading from version 0.1.* to version 0.2.*
Estimated migration time: 30 minutes
To upgrade the ProductConfiguration module from version 0.1.* to version 0.2.*, do the following:
- Update the
ProductConfigurationmodule to version 0.2.0:
composer require spryker/product-configuration:"^0.2.0" --update-with-dependencies
- Generate transfer classes:
console transfer:generate
-
From
\Pyz\Client\ProductConfiguration\ProductConfigurationDependencyProvider, remove the plugin stacks:\Pyz\Client\ProductConfiguration\ProductConfigurationDependencyProvider::getDefaultProductConfiguratorRequestPlugin()\Pyz\Client\ProductConfiguration\ProductConfigurationDependencyProvider::getDefaultProductConfiguratorResponsePlugin()
-
In
\Pyz\Client\ProductConfiguration\ProductConfigurationDependencyProvider, on the project level, register the plugin that describes the strategy of extracting volume prices for configurable products:
<?php
namespace Pyz\Client\ProductConfiguration;
use Spryker\Client\ProductConfiguration\Plugin\PriceProductVolumeProductConfigurationPriceExtractorPlugin;
use Spryker\Client\ProductConfiguration\ProductConfigurationDependencyProvider as SprykerProductConfigurationDependencyProvider;
/**
* @method \Spryker\Client\ProductConfiguration\ProductConfigurationConfig getConfig()
*/
class ProductConfigurationDependencyProvider extends SprykerProductConfigurationDependencyProvider
{
/**
* @return \Spryker\Client\ProductConfigurationExtension\Dependency\Plugin\ProductConfigurationPriceExtractorPluginInterface[]
*/
protected function getProductConfigurationPriceExtractorPlugins(): array
{
return [
new PriceProductVolumeProductConfigurationPriceExtractorPlugin(),
];
}
}
- In
\Pyz\Service\PriceProduct\PriceProductDependencyProvider, on the project level, register the filter plugins:
<?php
namespace Pyz\Service\PriceProduct;
use Spryker\Service\PriceProduct\PriceProductDependencyProvider as SprykerPriceProductDependencyProvider;
use Spryker\Service\ProductConfiguration\Plugin\PriceProduct\ProductConfigurationPriceProductFilterPlugin;
use Spryker\Service\ProductConfiguration\Plugin\PriceProduct\ProductConfigurationVolumePriceProductFilterPlugin;
class PriceProductDependencyProvider extends SprykerPriceProductDependencyProvider
{
/**
* {@inheritDoc}
*
* @return \Spryker\Service\PriceProductExtension\Dependency\Plugin\PriceProductFilterPluginInterface[]
*/
protected function getPriceProductDecisionPlugins(): array
{
return array_merge([
new ProductConfigurationPriceProductFilterPlugin(),
new ProductConfigurationVolumePriceProductFilterPlugin(),
], parent::getPriceProductDecisionPlugins());
}
}
-
From
\Pyz\Client\ProductConfiguration\ProductConfigurationDependencyProvider, remove the pluginProductConfigurationQuoteRequestQuoteCheckPlugin(must be replaced withSpryker\Client\ProductConfigurationCart\Plugin\QuoteRequest\ProductConfigurationQuoteRequestQuoteCheckPlugin). -
From
\Pyz\Zed\Availability\AvailabilityDependencyProvider, remove the pluginProductConfigurationCartItemQuantityCounterStrategyPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\Availability\ProductConfigurationCartItemQuantityCounterStrategyPlugin). -
From
\Pyz\Zed\AvailabilityCartConnector\AvailabilityCartConnectorDependencyProvider, remove the pluginProductConfigurationCartItemQuantityCounterStrategyPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\AvailabilityCartConnector\ProductConfigurationCartItemQuantityCounterStrategyPlugin). -
From
\Pyz\Zed\Cart\CartDependencyProvider, remove the plugin:ProductConfigurationGroupKeyItemExpanderPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\Cart\ProductConfigurationGroupKeyItemExpanderPlugin). -
From
\Pyz\Zed\Checkout\CheckoutDependencyProvider, remove the plugin:ProductConfigurationCheckoutPreConditionPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\Checkout\ProductConfigurationCheckoutPreConditionPlugin). -
From
\Pyz\Zed\PriceCartConnector\PriceCartConnectorDependencyProvider, remove the plugins:ProductConfigurationCartItemQuantityCounterStrategyPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\PriceCartConnector\ProductConfigurationCartItemQuantityCounterStrategyPlugin)ProductConfigurationPriceProductExpanderPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\PriceCartConnector\ProductConfigurationPriceProductExpanderPlugin)
-
From
\Pyz\Zed\QuoteRequest\QuoteRequestDependencyProvider, remove the plugins:ProductConfigurationQuoteRequestUserValidatorPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\QuoteRequest\ProductConfigurationQuoteRequestUserValidatorPlugin)ProductConfigurationQuoteRequestValidatorPlugin(must be replaced withSpryker\Zed\ProductConfigurationCart\Communication\Plugin\QuoteRequest\ProductConfigurationQuoteRequestValidatorPlugin)
-
From
\Pyz\Zed\ProductConfiguration\ProductConfigurationConfig, remove the methodgetItemFieldsForIsSameItemComparison()(must be replaced with\Pyz\Zed\ProductConfigurationCart\ProductConfigurationCartConfig::getItemFieldsForIsSameItemComparison()).
Thank you!
For submitting the form