15 lines
851 B
PHP
15 lines
851 B
PHP
<?php
|
|
|
|
if (SF_APP == 'backend')
|
|
{
|
|
stPluginHelper::addEnableModule('stRecentlyViewedProductsBackend');
|
|
stPluginHelper::addRouting('stRecentlyViewedProductsBackend', '/st-recently-viewed-products/:action/*', 'stRecentlyViewedProductsBackend', 'config');
|
|
stConfiguration::addModule(['label' => 'Ostatnio przegladane produkty', 'route' => '@stRecentlyViewedProductsBackend', 'icon' => 'stRecentlyViewedProductsPlugin'], 'offer');
|
|
}
|
|
elseif (SF_APP == 'frontend')
|
|
{
|
|
stPluginHelper::addEnableModule('stRecentlyViewedProductsFrontend');
|
|
stPluginHelper::addRouting('stRecentlyViewedProductsFrontend', '/st-recently-viewed-products/:action/*', 'stRecentlyViewedProductsFrontend', 'index');
|
|
$dispatcher->connect('stProductActions.postExecuteShow', array('stRecentlyViewedProductsPluginListener', 'postExecuteProductShow', 'last'));
|
|
}
|