Product feature integration
Edit on GitHubInstall Feature Core
Prerequisites
Please overview and install the necessary features before beginning the integration step.
Name | Version |
---|---|
Spryker Core | 201903.0 |
1) Install the required modules using Composer
Run the following command to install the required modules:
composer require spryker-feature/product: "^201903.0" --update-with-dependencies
Module | Expected Directory |
---|---|
`ProductSearchWidget` | `vendor/spryker-shop/product-search-widget` |
2) Add Translations
Append the glossary according to your configuration:
src/data/import/glossary.csv
quick-order.input.placeholder,Search by SKU or Name,en_US
quick-order.input.placeholder,Suche per SKU oder Name,de_DE
product_quick_add_widget.form.quantity,"# Qty",en_US
product_quick_add_widget.form.quantity,"# Anzahl",de_DE
quick-order.search.no_results,Item cannot be found,en_US
quick-order.search.no_results,Das produkt konnte nicht gefunden werden.,de_DE
Run the following console command to import data:
console data:import glossary
3) Set up Widgets
Register the following plugins to enable widgets:
|Plugin|Description|Prerequisites|Namespace|
|—|—|—|—|
|ProductConcreteSearchWidget
|Allows customers to search for concrete products on the Cart page.|None| SprykerShop\Yves\ProductSearchWidget\Widget
|ProductConcreteAddWidget
|Incorporates ProductConcreteSearchWidget
and allows customers to search for concrete products and quickly add them to the Cart with the desired quantity.|None|SprykerShop\Yves\ProductSearchWidget\Widget
|
src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php
<?php
namespace Pyz\Yves\ShopApplication;
use SprykerShop\Yves\ProductSearchWidget\Widget\ProductConcreteAddWidget;
use SprykerShop\Yves\ProductSearchWidget\Widget\ProductConcreteSearchWidget;
use SprykerShop\Yves\ShopApplication\ShopApplicationDependencyProvider as SprykerShopApplicationDependencyProvider;
class ShopApplicationDependencyProvider extends SprykerShopApplicationDependencyProvider
{
/**
* @return string[]
*/
protected function getGlobalWidgets(): array
{
return [
ProductConcreteSearchWidget::class,
ProductConcreteAddWidget::class,
];
}
}
Module | Test |
---|---|
`ProductConcreteSearchWidget` | Go to the Cart page and make sure the "Quick add to Cart" section is present, so you can search for concrete products by typing their SKU. |
`ProductConcreteAddWidget` | Go to the Cart page and make sure the "Quick add to Cart" section is present, so you can add the found products to the Cart with the desired Quantity. |
Thank you!
For submitting the form