HDI 2Basket Multiple Items into the Basket via URL

Hello Community,
i am glad to present you a new modul for Oxid:

[B]HDI 2Basket[/B].

HDI 2Basket extends Oxids nativ functionality to put products into the basket. Furthermore it provides the abillity to use the articlenumber instead of the OXID. At the moment
you need the following parameter to put some items into the basket:

[ul]
[li]fnc=tobasket > needed to tell Oxid that you want to perform the tobasket method[/li][li]aid={oxarticles__oxid} > the OXID of the product[/li][li]am={amount} > the amount of items[/li][/ul]

With this modul you now can use this parameters, too:
[ul]
[li]fast=1 > indicates that you want to use articlenumbers instead of oxid[/li][LIST][li]you now have to use artnum={oxarticles__oxartnum} instead of aid[/ul][/li][li]multiple=1 > indicates that you want to insert more than one item at a time[/li][ul][li]you now have to use id arrays > id[0]={oxarticles__oxid}[/li][li]you can combine it with fast=1 and use artnum arrays, too > artnum[0]=>{oxarticles_oxartnum} [/li][/ul]
[/LIST]
It is both possible to use this new methods within forms or within the URL.

Examples:


http://www.shop.com?fnc=tobasket&fast=1&artnum=12345&am=2

This Example puts 2 times the article with the articlenumber 12345 into the basket. No need to lookup its oxid in the database, even your external Marketing departmend is now able to drive Newsletter campaigns without hesitating the shopadministrator to get the OXIDs.


http://www.shop.com?fnc=tobasket&multiple=1&id[0]=r95f85cd632282fa0ef6f83dcb9cd540&am[0]=1&id[1]=aab0af7bf52da140b2378ac2fa2bc5b5&am[1]=3

This example puts 2 different articles into the basket at the same time.

http://www.shop.com?fnc=tobasket&fast=1&multiple=1&artnum[0]=12345&am[0]=1&artnum[1]=23456&am[1]=3[

Or a combination with fast=1, to get rid of the OXIDs.

<form name="orderform" action="http://www.shop.com/" method="post" >
	<input type="hidden" name="cl" value="basket"/>
	<input type="hidden" name="fnc" value="tobasket"/> 
	<input type="hidden" name="multiple" value="true"/> 
	<input type="hidden" name="fast" value="true" />
	<input type="text" name="artnum[0]" value="" />
	<input type="text" name="am[0]" size="3" value=""/><br/>
	<input type="text" name="artnum[1]" value="" />
	<input type="text" name="am[1]" size="3" value=""/><br/>
	<input type="text" name="artnum[2]" value="" />
	<input type="text" name="am[2]" size="3" value=""/><br/>
	<input type="submit" value="In den Warenkorb legen"/>
</form>

Or a HTML form as an quick order form for catalog shopper who know the article numbers.

Hope you like this and find it usefull. Feedback is very welcome.

Regards

Rafael

e: I forgot to mention: its free :wink:

Thank you!

Klingt super.

Funktioniert das auch mit persparam?

Jürgen