Product Teaser Plugin

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
velo
Posts: 44
Joined: 20 Jun 2016, 06:58

Product Teaser Plugin

Post 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
[pb]

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Product Teaser Plugin

Post 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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

velo
Posts: 44
Joined: 20 Jun 2016, 06:58

Re: Product Teaser Plugin

Post by velo » 13 Jul 2016, 08:31

Hi,

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 ... -t715.html)

Greetings
[pb]

velo
Posts: 44
Joined: 20 Jun 2016, 06:58

Re: Product Teaser Plugin

Post 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
typo3config
plugin.tx_aimeos.settings.client.html.catalog.myshoplist.size = 6

Code: Select all

class 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 );
  }
}
//edit
$this->getContext()->getConfig() shows us that there is no typo3 config at all, we just get the default configuration.

Thanks
[pb]

Dennis
Posts: 15
Joined: 30 Nov 2016, 09:16

Re: Product Teaser Plugin

Post by Dennis » 10 Mar 2017, 10:31

Hey!

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!

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Product Teaser Plugin

Post 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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
Metalics
Advanced
Posts: 103
Joined: 13 Jul 2015, 23:59

Re: Product Teaser Plugin

Post 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
plugin.tx_aimeos.settings.client.html.catalog.lists.metatags=0"

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

HOME-CAMPAIGN = COA
HOME-CAMPAIGN {
10 = TEXT
10 {
wrap = <div class="home-campaing-header">|</div>
lang.tr=Kampanyalı Ürünlerimiz
lang.en=Campaign Products
}
20 = RECORDS
20 {
tables = tt_content
source = 25 //tt_content id of the Campaign products plugin
}
30 = TEXT
30 {
stdWrap.wrap = <span>|</span>
typolink.parameter.lang.tr = http://www.yourdomain.com/TR/ueruenler- ... -products/
typolink.parameter.lang.en = http://www.yourdomain.com/EN/products-s ... -products/
typolink.ATagParams = class = "home-campaing-footer"
typolink.extTarget = _blank
typolink.wrap = <div class ="campaign-link">|</div>
stdWrap.override.lang.tr=Tü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".
E.g:
"#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.
Attachments
Adsizsd.png
Adsizsd.png (170.44 KiB) Viewed 4544 times

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Product Teaser Plugin

Post 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 all

client.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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply