Add to cart - products purchased jointly

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!
cuongtran3001
Posts: 2
Joined: 01 Oct 2018, 08:38

Add to cart - products purchased jointly

Post by cuongtran3001 » 01 Oct 2018, 08:46

Dear master,

We need to add custom functionality for product detail:
- We will show the related products
- For each of them, we have checkbox that user can check or un-check
- There is button add all to cart , when user click on it, the selected items will be added to cart first. When user click on Add to cart, the current product will be added to cart later.

Could you please let me know if we can or can not reach it? How is the solution?

Thank all,

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

Re: Add to cart - products purchased jointly

Post by aimeos » 02 Oct 2018, 07:42

That's relatively easy to implement because the related products (type "suggestion" or "bought-together") are already displayed at the detail page if there are any. You only have to add the buttons to add them to the basket (one or all of them).

To implement this , you have to extend the products partial (https://github.com/aimeos/ai-client-htm ... andard.php), move the <form> tag outside into the product detail template (https://github.com/aimeos/ai-client-htm ... d.php#L502) and add a "add all to cart" button there.

Please note that you also need to use this patch from dev-master:
https://github.com/aimeos/ai-client-htm ... bbbbea85e1
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply