Configuration of the partial method

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
JackDarkWeb
Posts: 10
Joined: 10 May 2021, 05:35

Configuration of the partial method

Post by JackDarkWeb » 01 Jun 2021, 17:12

<?= $this->partial($this->config('client/html/common/partials/products', 'common/partials/products-standard' ),
[
'products' => $products

] )
?>

If I understand this script correctly, it allows to get the variable products in the file products-standard.php.
Now I want to get this same variable products in the file body-standard.php in the folder catalog/home.

I did this but the variable data is empty

<?= $this->partial($this->config('client/html/catalog/home/body', 'catalog/home/body-standard' ),
[
'products' => $products

] )?>
How else can I do it?

Please help me!

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

Re: Configuration of the partial method

Post by aimeos » 03 Jun 2021, 08:49

The product in the catalog/home component are already rendered here:
https://github.com/aimeos/ai-client-htm ... hp#L89-L93

If you want to show the variant articles of selection products too, just add this configuration:
https://aimeos.org/docs/2021.x/config/c ... basket-add

Be care full and assign only a few products to the Home category. Otherwise, your home page will be very slow when using this setting!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

JackDarkWeb
Posts: 10
Joined: 10 May 2021, 05:35

Re: Configuration of the partial method

Post by JackDarkWeb » 04 Jun 2021, 08:43

thank you for your answer.
I notice that on the home page it is the products in promotion that are display.
Now if want to display all the latest products without exception

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

Re: Configuration of the partial method

Post by aimeos » 05 Jun 2021, 06:24

In that case, you have to extend from the existing catalog/home component and overwrite the addData() method with your own implemenation:
https://github.com/aimeos/ai-client-htm ... #L410-L515
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply