Get sites details from product id
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!
-
- Advanced
- Posts: 114
- Joined: 08 Nov 2019, 11:56
Get sites details from product id
Hello, we are using laravel JSON API on the application side for android and ios.
Most of the things are done, but now we need to add the distributor name of the product.
So, we have added multiple sites into main parent, and every site we have added 10-10 products. Now, We need to show the product with the site's name. Like product-A is selling by Xyz.
How do we achieve this?
Thanks
Most of the things are done, but now we need to add the distributor name of the product.
So, we have added multiple sites into main parent, and every site we have added 10-10 products. Now, We need to show the product with the site's name. Like product-A is selling by Xyz.
How do we achieve this?
Thanks
-
- Advanced
- Posts: 114
- Joined: 08 Nov 2019, 11:56
Re: Get sites details from product id
hello, Is there any solution for that? We need to show products by vendor name as well?
For that, we need to show vendor name into product details first then from there the user can visit the complete vendor store.
Will it be possible?
Thanks
For that, we need to show vendor name into product details first then from there the user can visit the complete vendor store.
Will it be possible?
Thanks
Re: Get sites details from product id
There's no way to retrieve all available sites using the JSON REST API for security reasons. If you need the site name, you have to extend the product endpoint class (https://github.com/aimeos/ai-client-jso ... #L281-L319), fetch the locale site items for the products returned (using $product->getSiteId() and the searchItems() method of the locale site manager) and add that information in the product template (https://github.com/aimeos/ai-client-jso ... #L106-L133)
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 sites details from product id
Site information is now available per product if you add "include=locale.site"
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