Quick Add to Cart + Packaging Units feature integration

Edit on GitHub
You are browsing a previous version of the document. The latest version is 202212.0.

Install feature frontend


To start feature integration, overview and install the necessary features: |Name|Version| |—|—| |Quick Add To Cart|201903.0| |Packaging units|201903.0|

1) Set up Behavior

Set up the Additional Functionality

Enable the following behaviors by registering the plugins:

Plugin Specification Prerequisites Namespace
QuickOrderItemDefaultPackagingUnitExpanderPlugin Expands ItemTransfer with packaging unit data if available. None SprykerShop\Yves\ProductPackagingUnitWidget\Plugin\QuickOrder
namespace Pyz\Yves\QuickOrderPage;
use SprykerShop\Yves\ProductPackagingUnitWidget\Plugin\QuickOrder\QuickOrderItemDefaultPackagingUnitExpanderPlugin;
use SprykerShop\Yves\QuickOrderPage\QuickOrderPageDependencyProvider as SprykerQuickOrderPageDependencyProvider;
class QuickOrderPageDependencyProvider extends SprykerQuickOrderPageDependencyProvider
	* @return \SprykerShop\Yves\QuickOrderPageExtension\Dependency\Plugin\QuickOrderItemExpanderPluginInterface[]
	protected function getQuickOrderItemTransferExpanderPlugins(): array
		return [
			new QuickOrderItemDefaultPackagingUnitExpanderPlugin(),

Make the following checks at `https://mysprykershop.com/quick-order`: `QuickOrderItemDefaultPackagingUnitExpanderPlugin` sets default configuration for a product with packaging units:
  1. Select a product with packaging units on the **Quick Add To Cart** page and add it to the cart.
  2. Check `ItemTransfer` in Cart if it has `amount`, `amountSalesUnit`, `amountLeadProduct`, and `productPackagingUnit` properties set.