Extend Spryker Product Module

1.2.0 2020-01-03 11:08 UTC

This package is auto-updated.

Last update: 2024-10-11 14:06:04 UTC


README

Build Status PHP from Travis config license

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()
    ];
}