Add multiple product to the cart with single button
-
- Phoca Enthusiast
- Posts: 59
- Joined: 14 Nov 2022, 12:04
Add multiple product to the cart with single button
Would it be possible to add multiple products to the cart with a single click of the 'Add to Cart' button? Perhaps if the id and quantity inputs could be arrays in .phItemCartBoxForm?
Tags:
- Jan
- Phoca Hero
- Posts: 48513
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add multiple product to the cart with single button
Hi, for now, there is no such option, do you have some use case for this feature?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 59
- Joined: 14 Nov 2022, 12:04
Re: Add multiple product to the cart with single button
The shop sells phones, and customers can choose from suggested accessories such as cases, screen protectors, chargers, cables, etc. These are individual products that can be purchased along with the phone as kind of an upsell. There is no bundle or package pricing; just multiple products added to the cart with a single click.
We use this solution on multiple webshops that we have built.
We use this solution on multiple webshops that we have built.
- Jan
- Phoca Hero
- Posts: 48513
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add multiple product to the cart with single button
Can you paste some link to see how this works?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 59
- Joined: 14 Nov 2022, 12:04
Re: Add multiple product to the cart with single button
https://apneumatika.hu/webaruhaz/pneuma ... -reszletek
This is a VirtueMart shop. The child products are listed in a table with separate quantity inputs but a single "Add to Cart" button. This allows you to easily select the desired quantities of multiple sizes in one table.
Another example
https://masszazsmedencek.hu/masszazsmed ... azsmedence
Here, you can add additional products to the cart using a list of checkboxes.
It might be possible to achieve this by using product_id[] instead of product_id and implementing a fallback with (array)product_id in the processing logic.
This is a VirtueMart shop. The child products are listed in a table with separate quantity inputs but a single "Add to Cart" button. This allows you to easily select the desired quantities of multiple sizes in one table.
Another example
https://masszazsmedencek.hu/masszazsmed ... azsmedence
Here, you can add additional products to the cart using a list of checkboxes.
It might be possible to achieve this by using product_id[] instead of product_id and implementing a fallback with (array)product_id in the processing logic.
- Jan
- Phoca Hero
- Posts: 48513
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add multiple product to the cart with single button
Hi, thank you for this info, I think, the best way is to create specific extension for this feature. Added to feature request list.
https://github.com/PhocaCz/PhocaCart/issues/246
Jan
https://github.com/PhocaCz/PhocaCart/issues/246
Jan
If you find Phoca extensions useful, please support the project