integration_documentation:plentymarkets_ceres_en:ceres_promotions_en

integration_documentation:plentymarkets_ceres_en:ceres_promotions_en

This is an old revision of the document!


If you have set up promotions in the FINDOLOGIC customer login, you have to follow these instructions in order to get the promotion banners active in your shop:

  • Open the menu CMS » Container-Verknüpfungen.
  • Connect the container with the data provider, as shown in the following screenshot:


  • Add the following row to the file resources/views/Category/Item/CategoryItem.twig:
LayoutContainer.show("Findologic::CategoryItem.Promotion")
Wir raten dazu das File resources/views/Category/Item/CategoryItem.twig in das eigene Theme aufzunehmen (wenn vorhanden). Wenn Sie die Zeile direkt in das Ceres Plugin aufnehmen, wird diese nach dem nächsten Update wieder verschwunden sein


  • Add an eventlistener in the serviceprovider of the plugin to “IO.tpl.search” and “IO.tpl.category.item”, which is loading “CategoryItem.twig”:

Code2Copy:

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