How to pass data to partial
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 40
- Joined: 12 Jul 2018, 19:57
How to pass data to partial
Laravel: 5.6
Aimeos: 2018.04
PHP: 7.x
Hi there;
In the product detail I need to send a new variable to price-standard.php, I have to show some additional data that is coming from a hidden attibute.
I tried this but it doesn't work
Where myVal should be the new variable that I need to render in the price-standard.php
How can I get it working ??
Thanks.
Aimeos: 2018.04
PHP: 7.x
Hi there;
In the product detail I need to send a new variable to price-standard.php, I have to show some additional data that is coming from a hidden attibute.
I tried this but it doesn't work
Code: Select all
<?= $this->partial(
$this->config( 'client/html/common/partials/price', 'common/partials/price-standard.php' ),
array( 'pricess' => $this->detailProductItem->getRefItems( 'price', null, 'default' ), 'myVal' => 'Test' )
); ?>
How can I get it working ??
Thanks.
--
Jorge A Ramirez
System Engineer
PHP Developer
Jorge A Ramirez
System Engineer
PHP Developer
Re: How to pass data to partial
This should work as you say. In the price partial you should have access to:
Code: Select all
print_r( $this->pricess );
echo $this->myVal;
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