Add multiple item to cart
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!
Add multiple item to cart
I need to move all the items in wishlist to cart in one click.How can it is possible?
Re: Add multiple item to cart
You can extend the account/favorite template and add a HTML form element around the items. For each item, you can add the same code as there:
https://github.com/aimeos/ai-client-htm ... t.php#L233
The "0" in "array( 'b_prod', 0, 'prodid' )" is an index you have to increase for every product.
https://github.com/aimeos/ai-client-htm ... t.php#L233
The "0" in "array( 'b_prod', 0, 'prodid' )" is an index you have to increase for every product.
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: Add multiple item to cart
array( 'b_prod', 0, 'prodid' ) is take the value for 1 item.I have to pass multiple item in one array .Please check my screenshot
- Attachments
-
- screenshot.png (69.2 KiB) Viewed 2847 times
Re: Add multiple item to cart
For each product item in the template you have to add
where "X" is a incremented number, so
1. item: array( 'b_prod', 0, 'prodid' )
2. item: array( 'b_prod', 1, 'prodid' )
3. item: array( 'b_prod', 2, 'prodid' )
and so on.
Code: Select all
<input type="hidden" value="<?php echo $id; ?>" name="<?php echo $enc->attr( $this->formparam( array( 'b_prod', X, 'prodid' ) ) ); ?>" />
1. item: array( 'b_prod', 0, 'prodid' )
2. item: array( 'b_prod', 1, 'prodid' )
3. item: array( 'b_prod', 2, 'prodid' )
and so on.
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