fond-of-spryker / product
Extend Spryker Product Module
Installs: 19 212
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- spryker/product: ^6.0.0
Requires (Dev)
- codeception/codeception: ^2.3
- mikey179/vfsstream: ^1.6
- phpro/grumphp: ^0.14
- sebastian/phpcpd: ^4.0
- spryker/code-sniffer: ^0.11
- spryker/development: ^3.6
This package is auto-updated.
Last update: 2024-11-11 14:23:11 UTC
README
Extend Spryker Product Module
- Use Custom Attribut to generate the Url
Installation
composer require fond-of-spryker/product
1. To use the Custom Url generate functionality you have to take the following steps:
###Add the Attribute Code in the configuration file
// ---------- PRODUCT URL
$config[ProductConstants::URL_ATTRIBUTE_CODE] = 'url_key';
Extend the Product Dependency in Pyz
protected function getProductAbstractBeforeCreatePlugins(Container $container)
{
return [
.......
new UrlProductAbstractBeforeCreatePlugin()
];
}
protected function getProductAbstractAfterCreatePlugins(Container $container)
{
return [
..........
new UrlProductAbstractAfterCreatePlugin()
];
}
protected function getProductAbstractBeforeUpdatePlugins(Container $container)
{
return [
..........
new UrlProductAbstractBeforeUpdatePlugin()
];
}
protected function getProductAbstractAfterUpdatePlugins(Container $container)
{
return [
..........
new UrlProductAbstractAfterUpdatePlugin()
];
}