Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2982 by velo
12 Jul 2016, 07:48
Hey there,

is there any possibility to Teaser Products on a page.
E.g. I have a start page, on this page I want to teaser random Products. It will be okay to Teaser random Products every hour or something like this.
Any ideas?

Thanks in advance
#2986 by aimeos
12 Jul 2016, 16:01
You can teaser single products or a list of products using the catalog detail and catalog lists component. Both have the possibility to enter/select a product ID / category in the Flexform and configure specific templates for this view. Displaying products randomly is currently not supported.
#2991 by velo
13 Jul 2016, 08:31

just for information. Our solution is as follows:

We create a new list plugin in this plugin we choose randomly 6 product id's and display them. (Get all Id's which are suitable, choose randomly 6 id's get the products and display them)
I think the only real problem is caching, but I'm sure we'll find a proper solution. (see other question typo3-extension-f16/cache-cleanup-for-a-specific-page-t715.html)

#2993 by velo
13 Jul 2016, 09:09
We have one problem left.
We can't get the typo3 configuration in our own plugin.

What we do.

We've created a standard typo3 plugin and copied the Catalog List Controller.
At the point where we should retrieve the typo3 config we just get an array of default values. Any Ideas where's the problem?

Here's a part of our code
plugin.tx_aimeos.settings.client.html.catalog.myshoplist.size = 6

Code: Select allclass Myshop
extends \Aimeos\Client\Html\Catalog\Base
implements \Aimeos\Client\Html\Common\Client\Factory\Iface

protected function getProductListSizeByParam( array $params )
    //here we get just the default value
     $defaultSize = $this->getContext()->getConfig()->get( 'client/html/catalog/myshoplist/size', 48 );
     $size = ( isset( $params['l_size'] ) ? (int) $params['l_size'] : $defaultSize );
     return ( $size < 1 || $size > 100 ? $defaultSize : $size );

$this->getContext()->getConfig() shows us that there is no typo3 config at all, we just get the default configuration.

#4013 by Dennis
10 Mar 2017, 10:31

We have similar requirements: We want a plugin for teasering several products (e.g. 5 top-seller products) on the homepage, too.

Unfortunately, we cannot just use the list plugin and modify it according our wishes because the list plugin is cached and then on other pages the modified list plugin will be rendered instead of the default list plugin.

So my questions are: Is there something new related to your plugin development (@velo)? What would be the best way to develop such a product teaser plugin (for teasering several products) (@aimeos)? Is it necessary to develop an own plugin ourselves or can one of the aimeos-plugins reused without caching problems?

Many thanks in advance!
#4017 by aimeos
11 Mar 2017, 14:15
The catalog list plugin has a "promo" section which does exactly what you need.
You can add configuration specific for the plugin element on the page when using the TSConfig Flexform field offered by the plugin.
#4020 by Metalics
11 Mar 2017, 16:40
We needed same feature and found a solution like below which meets our requirements for now:

We created a new category item with name "Campaign products" in the catalog tree. The status of this category item is "Disabled". So that it doesn't appear in your main category menu.

Create a content element with "Catalog list" plugin. On "Default category if no parameter is available" section of the plugin, select the "Campaign products" category. TypoScript configuration of the plug in is:
"plugin.tx_aimeos.settings.client.html.catalog.lists.size = 5

And then define this content element in your Typoscript Setup (marker):

10 = TEXT
10 {
wrap = <div class="home-campaing-header">|</div>ı Ürünlerimiz
lang.en=Campaign Products
20 {
tables = tt_content
source = 25 //tt_content id of the Campaign products plugin
30 = TEXT
30 {
stdWrap.wrap = <span>|</span> = ... -products/
typolink.parameter.lang.en = ... -products/
typolink.ATagParams = class = "home-campaing-footer"
typolink.extTarget = _blank
typolink.wrap = <div class ="campaign-link">|</div>üm Kampanyalı Ürünler
stdWrap.override.lang.en=All Campaign Products

In this way you can assign unlimited number of featured products to the "Campaign products" category item but only 5 of them will be displayed for example on your home page. But people will see all featured or campaign products by clicking the "All Campaign Products" link.
With "HOME-CAMPAIGN" marker you can display campaing products on every template you want.

And finally you can add individual CSS for the product list items on your home page and hide "catalog-list-type, pagination, etc".
"#page-2 .catalog-list .catalog-list-head, #page-2 .catalog-list .catalog-list-type, #page-2 .catalog-list nav.pagination {display:none;}"

Thats the solution we are using for now. Maybe someone else will offer a better one.
Adsizsd.png (170.44 KiB) Viewed 1016 times
#4025 by aimeos
12 Mar 2017, 12:13
The simplest way is to:
- Create a new category
- Assign products with list type "promotion" to this category
- Place the "catalog list" plugin on your home page
- Select the new category as default in the flexfrom of the plugin
- Add this configuration to the TypoScript config field in the flexform of the plugin:
Code: Select allclient.html.catalog.lists.standard.subparts {
  0 = promo

Tip: You can select the start category of the shown category tree in the "catalog filter" plugin, so the best place for categories that shouldn't show up is on the same tree level besides the selected category in the "catalog filter" plugin.