Extend Spryker Product Module
- Use Custom Attribut to generate the Url
composer require fond-of-spryker/product
###Add the Attribute Code in the configuration file
// ---------- PRODUCT URL
$config[ProductConstants::URL_ATTRIBUTE_CODE] = 'url_key';
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()
];
}