How to add items to a shopping cart from custom catalogs or html pages?

This article shows the advanced user how to add multiple items to a Sophio shopping cart. You must understand how to write html code to a new or existing web page to work with this document. The code below specifically works with our Wrenchead Integration or what we refer to as our latest framework. If your site is using a Worldpac, IMC, SAVE or custom catalog this same code will work provided the MyStoreWrenchead.prg is being used in your 'mystore' store settings field.

Every item sections starts with

<input type="hidden" name="mmbuy" id="mmbuy" value="" />

The mmbuy value needs to be incremented for each part ( 001 for first item, 002 for second , 003 for third, and so on.)

The fields should be self explanatory.

Added in 2015 - You can use the form code for a single item add to cart.  Obviously you need to change the values you see and be sure that the products are valid in your store.

<form action=“additem.wws" method="post">
<input type="hidden" value="999999" name="mmbuy" id="mmbuy"/>
<input name="txSku_999999" type="hidden" value="PF2057"/>
<input name="txMFR_999999" type="hidden" value="ACDELCO PROFESSIONAL"/>
<input type="hidden" value="5.89" name="txPrice_999999" id="txPrice_999999"/>
<input type="hidden" value="7.36" name="txList_999999" id="txList_999999"/>
<input type="hidden" value="" name="txWeight_999999" id="txWeight_999999"/>
<input type="hidden" name="txSup_999999" value="WHD" />
<input type="hidden" name="txCore_999999" value="0" />
<input name="txparttype_999999" type="hidden" value="1"/>
<input name="txMinQty_999999" type="hidden" value="0"/>
<input name="txItempk_999999" type="hidden" value="104284"/>
<input name="txLineCode_999999" type="hidden" value="DCC"/>
<input name="txCore_999999" type="hidden" value="0"/>
<input name="txWhse_999999" type="hidden" value="99 "/>
<input name="txWd_999999" type="hidden" value="211"/>
<input type="text" name="txqty_999999" value="1"/>
<input type="submit" value="Add to Cart" />

<form name="epcaddsingleitem" method="post" action="http://www.YOUR-DOMAIN.COM/additem.wws" id="epcaddmultiitem">
<-- first item -->
<input type="hidden" name="mmbuy" id="mmbuy" value="001" />
<input type="hidden" name="txSup_001" id="txSup_001" value="WHD" />
<input type="hidden" name="txPrice_001" id="txPrice_001" value="60.29" />
<input type="hidden" name="txList_001" id="txList_001" value="98.49" />
<input type="hidden" name="txCore_001" id="txCore_001" value="0.00" />
<input type="hidden" name="txCost_001" id="txCost_001" value="50.29" />
<input type="hidden" name="txJobber_001" id="txJobber_001" value="55.00" />
<input type="hidden" name="txWeight_001" id="txWeight_001" value="1.25" />
<input type="hidden" name="txSku_001" id="txSku_001" value="17D840M" />
<input type="hidden" name="txMFR_001" id="txMFR_001" value="ACDELCO DURASTOP BRAKES" />
<input type="hidden" name="txLineCode_001" id="txLineCode_001" value="ADU" />
<input type="hidden" name="txMinQty_001" id="txMinQty_001" value="1" />
<input type="hidden" name="txPtype_001" id="txPtype_001" value="02316" />
<input type="hidden" name="txDesc_001" id="txDesc_001" value="Semi-Metallic Brake Pad Set" />
<input type="hidden" name="txQty_001" id="txQty_001" value="1" />
<input type="hidden" name="txImage_001" id="txImage_001" value="" />

<-- second item -->
<input type="hidden" name="mmbuy" id="mmbuy" value="002" />
<input type="hidden" name="txSup_002" id="txSup_002" value="WHD" />
<input type="hidden" name="txPrice_002" id="txPrice_002" value="48.85" />
<input type="hidden" name="txList_002" id="txList_002" value="93.04" />
<input type="hidden" name="txCore_002" id="txCore_002" value="0.00" />
<input type="hidden" name="txCost_002" id="txCost_002" value="30.29" />
<input type="hidden" name="txJobber_002" id="txJobber_002" value="42.00" />
<input type="hidden" name="txWeight_002" id="txWeight_002" value="1.25" />
<input type="hidden" name="txSku_002" id="txSku_002" value="EU840" />
<input type="hidden" name="txMFR_002" id="txMFR_002" value="ATE/PREMIUMONE" />
<input type="hidden" name="txLineCode_002" id="txLineCode_002" value="ADU" />
<input type="hidden" name="txMinQty_002" id="txMinQty_002" value="1" />
<input type="hidden" name="txPtype_002" id="txPtype_002" value="02316" />
<input type="hidden" name="txDesc_002" id="txDesc_002" value="PremiumOne Brake Pad" />
<input type="hidden" name="txQty_002" id="txQty_002" value="1" />
<input type="hidden" name="txImage_002" id="txImage_002" value="" />

<-- cart values -->
<input type="hidden" name="year" id="year" value="2004" />
<input type="hidden" name="make" id="make" value="Audi" />
<input type="hidden" name="model" id="model" value="A4 QUATTRO" />
<input type="hidden" name="engine" id="engine" value="V6-2976cc 3.0L F/I Vin AVK" />
<input type="hidden" name="cat" id="cat" value="Brake/Wheel Bearing" />
<input type="hidden" name="subcat" id="subcat" value="Front Friction/Drums & Rotors" />
<input type="hidden" name="keepshopping" id="keepshopping" value=""/>


Was this answer helpful? 79 Users Found This Useful (205 Votes)