Get Mini Basket With Product Images also
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: 86
- Joined: 12 Jan 2019, 15:17
Get Mini Basket With Product Images also
Is There Any Method In Which I can get mini basket with product images also.
Please give Info about that.
Please give Info about that.
Re: Get Mini Basket With Product Images also
You can change the template and add the product image link here:
https://github.com/aimeos/ai-client-htm ... d.php#L171
You can get the URL by using:
The methods of the ordered product are documented there:
https://aimeos.org/api/latest/class-Aim ... Iface.html
https://github.com/aimeos/ai-client-htm ... d.php#L171
You can get the URL by using:
Code: Select all
<img src="<?= $this->content( $product->getMediaUrl() ) ?>" />
https://aimeos.org/api/latest/class-Aim ... Iface.html
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
Re: Get Mini Basket With Product Images also
How would we need to update the AimeosBasketMini updateBasket function to show the image without having to reload the page after adding a product to the basket?
I have modified my mini basket template and added the below to the AimeosBasketMini updateBasket function but the image will only show after a page reload
I am assuming that order.base.product.mediaUrl does not exists as my src is updated with (unknown)
I have modified my mini basket template and added the below to the AimeosBasketMini updateBasket function but the image will only show after a page reload
Code: Select all
$(".thumbnail--container img", product).attr("src", entry.attributes['order.base.product.mediaUrl']);
Re: Get Mini Basket With Product Images also
Dump the response or have a look into the web inspector of your browser to see the structure of the data.
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
Re: Get Mini Basket With Product Images also
The attribute is called order.base.product.mediaurl, not order.base.product.mediaUrl. I still had to edit the script to modify the path of the preview image but now it is working.
- harshithvemula
- Posts: 33
- Joined: 19 Jul 2020, 16:27
Re: Get Mini Basket With Product Images also
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
- parmonov98
- Posts: 33
- Joined: 24 Sep 2020, 12:12
Re: Get Mini Basket With Product Images also
how about to get a url of the product in basket?
I didn't find an url returner method on https://aimeos.org/api/latest/class-Aim ... ndard.html.
https://imgur.com/3vtF4is
there is not url. or how can I generate it?
I didn't find an url returner method on https://aimeos.org/api/latest/class-Aim ... ndard.html.
https://imgur.com/3vtF4is
there is not url. or how can I generate it?
Re: Get Mini Basket With Product Images also
What's your code for adding the image in the mini basket?
The basket product itself has no URL because it depends on the configured target page. You can generate the URL easily using the URL view helper using:
The basket product itself has no URL because it depends on the configured target page. You can generate the URL easily using the URL view helper using:
Code: Select all
$this->link( 'client/html/catalog/detail/url', [<params>] )
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
- parmonov98
- Posts: 33
- Joined: 24 Sep 2020, 12:12
Re: Get Mini Basket With Product Images also
be kind, tell me what to pass in there as params?aimeos wrote: ↑10 Oct 2020, 08:55 What's your code for adding the image in the mini basket?
The basket product itself has no URL because it depends on the configured target page. You can generate the URL easily using the URL view helper using:Code: Select all
$this->link( 'client/html/catalog/detail/url', [<params>] )
Re: Get Mini Basket With Product Images also
The parameters your can pass are described here:
https://aimeos.org/docs/latest/frontend ... ter-names/
https://aimeos.org/docs/latest/frontend ... ter-names/
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