<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 11, 2008, at 11:17 AM, Hariharan Gopalan wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Everyone!<br><br>I found interchange when I was looking for a shopping cart that can maintain multiple carts for a single user.<br><br>IC is such an awesome product, thanks so much to people who contributed to this.<br> <br>Was wondering if someone could please give some code example os the CART tag where I can have a user select products and place in separate carts. <br>Need to setup the products in groups so products in a group end up in their own cart and when checking out will create an order for each group...<br> <br>any ideas / tips will be very helpful<br><br>Thanks a bunch<br><br>Hari</blockquote><br></div><div>Hari,</div><div><br></div><div>Here's some simple code that adds to a cart that the user chooses:</div><div><br></div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 10px; ">&lt;form action="[process]"><br>&lt;input type=hidden name=mv_session_id value="[data session id]" /><br>&lt;input type=hidden name=mv_nextpage &nbsp; value="@_MV_PAGE_@" /><br>&lt;input type=hidden name=mv_todo &nbsp; &nbsp; &nbsp; value="refresh" /><br>&lt;input type=hidden name=mv_order_item value="SKU_NUMBER_HERE" /><br>&lt;input type=text &nbsp; name=mv_quantity &nbsp; value=1 &nbsp;size=3 style="text-align: right; margin: 2px 10px; 2px 0;" /></span></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&lt;select name=mv_cartname></span></font></div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 10px; ">&nbsp;&nbsp; [perl]</span></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; &nbsp; &nbsp;$html = '';</span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; &nbsp; &nbsp;foreach my $cartname (sort keys %$Carts)</span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; &nbsp; &nbsp;{</span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $html .= qq{&lt;option value="$cartname">$cartname&lt;/option>\n};</span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; &nbsp; &nbsp;}</span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; &nbsp; &nbsp;return $html;</span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;">&nbsp;&nbsp; [/perl]</span></font></div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 10px; ">&lt;/select<br>&lt;input type=submit value="Add to Cart" /><br>&lt;/form><br></span></div><div><br></div><div>To group your products you could simply set mv_cartname = [item-field prod_group] or any grouping field of your choice from the database.&nbsp;</div><div><br></div><div>However, creating a separate order for each cart at checkout is an altogether different matter. &nbsp;You may well need to handle address collection, shipping, tax, payment, emails and order-logging for each cart separately, and that's too big a topic for me to address here. &nbsp;</div><div><br></div><div>Good luck!</div><div><br></div>Regards,<div>Carl<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>. . . . . . . . . . . . . . . . . . .&nbsp;</div><div>Carl Bailey</div><div>t: 919-323-8025</div><div><a href="mailto:carl@endpoint.com">carl@endpoint.com</a></div><div>. . . . . . . . . . . . . . . . . . .&nbsp;</div></div></span> </div><br></div></body></html>