How to add favorite add wishlist in catalog/lists?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

How to add favorite add wishlist in catalog/lists?

Post by parmonov98 » 12 Oct 2020, 17:28

How to add favorite add wishlist in catalog/lists?
I want this button in catalog/lists template. How to approach?
https://imgur.com/6vPesZi

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

Re: How to add favorite add wishlist in catalog/lists?

Post by aimeos » 13 Oct 2020, 09:56

Use the catalog/action-standard.php partial:
https://github.com/aimeos/ai-client-htm ... andard.php
via the partial view helper:
https://aimeos.org/docs/latest/infrastr ... s/#partial
in the list items template and the product partial:
- https://github.com/aimeos/ai-client-htm ... y-list.php
- https://github.com/aimeos/ai-client-htm ... andard.php
e.g.:

Code: Select all

<?= $this->partial('catalog/action-standard', ['productItem' => $productItem]) ?>
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

akropivko
Posts: 36
Joined: 20 Jan 2021, 12:49

Re: How to add favorite add wishlist in catalog/lists?

Post by akropivko » 05 Mar 2021, 18:07

Let me clarify a little:
Code to insert into ext/<your_ext>/client/html/templates/common/partials/products-standard.php

Code: Select all

<?= $this->partial($this->config( 'client/html/catalog/partials/actions', 'catalog/actions-partial-standard' ), ['productItem' => $productItem]) ?>
And don't forget to check CSS for rendered action items.

Post Reply