integration_documentation:plugin:en:api:plentymarkets:promotions
This is an old revision of the document!
Using promotions with Plentymarkets Ceres
If you have configured Promotions within the FINDOLOGIC Account, the promotions can be displayed in the shop with this steps:
Container link
Set up container links as described here: Set container links
Template adaption
- Open the menu ''Plugins » Plugin overview''.
- Click on the plugin set where the ''Findologic plugin'' is installed.
- Click on the ''Ceres plugin'' or your own theme to get to the configuration page.
Add the following row to the file resources/views/Category/Item/CategoryItem.twig:
{{ LayoutContainer.show("Findologic::CategoryItem.Promotion") }}
<markdown>
![https://docs.findologic.com/lib/exe/fetch.php?media=integration_documentation:plugin:en:api:plentymarkets:template_adaption_promotion_en.png](https://docs.findologic.com/lib/exe/fetch.php?media=integration_documentation:plugin:en:api:plentymarkets:template_adaption_promotion_en.png)
—
* Add an eventlistener in the serviceprovider of the plugin to “IO.tpl.search” and “IO.tpl.category.item”, which is loading “CategoryItem.twig”:
![https://docs.findologic.com/lib/exe/fetch.php?media=integration_documentation:plugin:en:api:plentymarkets:plugin_adaption_promotion_en.png](https://docs.findologic.com/lib/exe/fetch.php?media=integration_documentation:plugin:en:api:plentymarkets:plugin_adaption_promotion_en.png)
- *Code2Copy:**
```php public function boot(Twig $twig, Dispatcher $dispatcher, ConfigRepository $config) { $dispatcher->listen('IO.tpl.category.item', function (TemplateContainer $container) { $container->setTemplate('MyTheme::Category.Item.CategoryItem'); }, self::PRIORITY); $dispatcher->listen('IO.tpl.search', function (TemplateContainer $container) { $container->setTemplate('MyTheme::Category.Item.CategoryItem'); }, self::PRIORITY); } ```
</markdow n>