Get Mini Basket With Product Images also

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

Re: Get Mini Basket With Product Images also

Post by parmonov98 » 12 Oct 2020, 12:41

aimeos wrote: 11 Oct 2020, 08:57 The parameters your can pass are described here:
https://aimeos.org/docs/latest/frontend ... ter-names/

any you didn't tell me what to pass in. What data does $this->link('client/html/catalog/lists/url', data) expect?
Please, tell me how the $this->links() work? where is it?
How can I see its implementation or detailed info for to use it in templates?

User avatar
harshithvemula
Posts: 33
Joined: 19 Jul 2020, 16:27

Re: Get Mini Basket With Product Images also

Post by harshithvemula » 12 Oct 2020, 16:50

I have added the product image to the mini cart but it updates only after reloading the page. i have tried adding code to update basket function but it didn't worked .please help me. I have added this code

Code: Select all

<img src="<?= $this->content( $product->getMediaUrl() ) ?>" />
AimeosBasketMini updateBasket function-

Code: Select all

$(".thumbnail--container img", product).attr("src", entry.attributes['order.base.product.mediaUrl']);

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

Re: Get Mini Basket With Product Images also

Post by aimeos » 13 Oct 2020, 06:57

parmonov98 wrote: 12 Oct 2020, 12:41
aimeos wrote: 11 Oct 2020, 08:57 The parameters your can pass are described here:
https://aimeos.org/docs/latest/frontend ... ter-names/
any you didn't tell me what to pass in. What data does $this->link('client/html/catalog/lists/url', data) expect?
Please, tell me how the $this->links() work? where is it?
How can I see its implementation or detailed info for to use it in templates?
It depends on the string you are passing to the link view helper:
- 'client/html/catalog/lists/url' e.g. ['f_catid' => 1]
- 'client/html/catalog/detail/url' e.g. [d_name => 'My-product']

The article describes all parameters which are accepted, their meaning and if they are required.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

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

Re: Get Mini Basket With Product Images also

Post by aimeos » 13 Oct 2020, 07:01

harshithvemula wrote: 12 Oct 2020, 16:50 I have added the product image to the mini cart but it updates only after reloading the page. i have tried adding code to update basket function but it didn't worked .please help me. I have added this code

Code: Select all

<img src="<?= $this->content( $product->getMediaUrl() ) ?>" />
AimeosBasketMini updateBasket function-

Code: Select all

$(".thumbnail--container img", product).attr("src", entry.attributes['order.base.product.mediaUrl']);
Guess, your CSS selector ".thumbnail--container img" is wrong and doesn't match the node you want to update.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

Re: Get Mini Basket With Product Images also

Post by parmonov98 » 16 Oct 2020, 03:56

aimeos wrote: 11 Oct 2020, 08:57 The parameters your can pass are described here:
https://aimeos.org/docs/latest/frontend ... ter-names/

Waht am I doing wrong?
https://imgur.com/a/7oczeYq

https://i.imgur.com/UScMOcR.png ?

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

Re: Get Mini Basket With Product Images also

Post by aimeos » 16 Oct 2020, 15:52

There's no method named getUrl() for product items. Use this instead:

Code: Select all

$product->getName( 'url' )
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply