Different productList template for cross seller

Fragen und Antworten zum Cross-Seller
Antworten
2zi0li
Beiträge: 7
Registriert: 26. Feb 2020, 16:22

Different productList template for cross seller

Beitrag von 2zi0li »

Hello,
is it possible to set a different "productList" template or add a switch to show some elements only when it's used in the context of a cross seller?

I try to explain it better: when I include a cross seller in my page I get even content elements used in my overview, but I don't want them to be shown.

Thank you
Benutzeravatar
supportteam2
Beiträge: 427
Registriert: 4. Mär 2015, 14:05

Re: Different productList template for cross seller

Beitrag von supportteam2 »

Merconis offers many possibilities to adjust what is displayed in which situation and which template is used in which place. However, based on your description, it is difficult to determine which of the Merconis options are suitable for you. I am also not sure if I understand what exactly you want to achieve. In a normal shop the product overview module and the product detail view module are integrated in the layout. On a page that uses this layout and has products assigned to it, a product overview is then displayed. If you click on a product here, the detailed view (single view) of this product will open on the same page. Content elements that you have placed on this page are initially displayed in both the overview and the detailed view. However, you can define for a content element in which specific Merconis context it should or should not be displayed. In this way you can display a content element in the overview but hide it in the detail view, even though technically the same page is opened in both cases. You can also use the display settings to define which templates are used.

If you place a CrossSeller on any page, products are displayed in this CrossSeller. In this case, these products do not have to be assigned to the page on which you display the CrossSeller. The CrossSeller can display products anywhere. By clicking on a product, the product detail view opens on a page to which the product is actually assigned.

However, including a CrossSeller on a page does not affect what else is displayed on that page. All content elements that you have placed on a page will also be displayed if you additionally place a CrossSeller on this page.
2zi0li
Beiträge: 7
Registriert: 26. Feb 2020, 16:22

Re: Different productList template for cross seller

Beitrag von 2zi0li »

I'm trying to reply but it keeps me saying that content is not permitted
2zi0li
Beiträge: 7
Registriert: 26. Feb 2020, 16:22

Re: Different productList template for cross seller

Beitrag von 2zi0li »

Thank you for your reply, I try to explain better.

My guess is if can I set somewhere which version of "productList.html5" template should I use inside my cross sell OR can I set a switch inside "productList.html5" to hide my wrap code (divs and so on) when it's used inside the cross sell?

Very barebone: my result should by an OL with LI, but around displayed LIs I have code that comes from "productList.html5" that I don't want to be printed.


Thank you
Dateianhänge
crosssel-error.jpg
crosssel-error.jpg (49.84 KiB) 23617 mal betrachtet
Benutzeravatar
supportteam2
Beiträge: 427
Registriert: 4. Mär 2015, 14:05

Re: Different productList template for cross seller

Beitrag von supportteam2 »

In the display settings in the contao/merconis backend you can differntiate between settings for a normal product overview and for cross sellers. You can also define different display settings and assign them to different pages. However, the template "productList.html5" is a wrapper around all products that are being displayed in a product overview or in a cross seller and this wrapper will always be used. You can define which template to use for actually showing a single product and by this you can make products appear completely differently in different situations. Of course you can modify the productList template but if you actually need to make differences in the productList template based on the situation it is used in, this is tricky. The easiest thing that you could do is to use CSS to hide markup created by the productList template in certain situations. That's usually sufficient in every use case we encountered so far. If you have a cross seller, you will find a div around the product list code which identifies the cross seller using self-explaining classes.
Antworten

Zurück zu „Cross-Seller / Cross seller“