Configuration of the partial method
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 10
- Joined: 10 May 2021, 05:35
Configuration of the partial method
<?= $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!
[
'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!
Re: Configuration of the partial method
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!
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, give us a star
If you like Aimeos, give us a star
-
- Posts: 10
- Joined: 10 May 2021, 05:35
Re: Configuration of the partial method
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
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
Re: Configuration of the partial method
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
https://github.com/aimeos/ai-client-htm ... #L410-L515
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star