hi all... could use some zen guru assistance here and a contact who can make things work for me...
I have a parts website and I am trying to bring new OEM manufacturers parts into my store. I have a third party provider that supplies exploded parts diagrams and the remote cart system. we are trying to find out if this system will work with Zen Cart and need to know, from those that know..
here is the email he sent with the questions...
"Please Contact the company (zen cart) that does you cart and ask how you can transfer 50 items into their cart at one time. You can explain you have a system a user will put a parts list together out of over 2 million parts. Once the user is finished, they will select a button named “Send to Cart”. The system will then reconfigure the parts list for transfer to a shopping cart.
We currently us XML. This way the transfer is done by our server and the user is then sent to your cart where they see their parts list ready for order."
below is more information..
Remote Cart Operation:
Then Cart uses XML to transfer information.
Description:
The cart transfer has 4 steps
1. sends a list of parts to the remote cart via an XML POST method.
2. The cart returns it’s internal ID for the parts just received completing the XML POST.
3. redirect the user to a page designated with the number and the ID contained in the querystring.
4. When the user completes the order, the order information is returned to via a XML GET method.
SENDING A PARTS LIST TO THE REMOTE CART:
XML POST is the method used for this function.
<HLSM>Opening tag
<ItemCnt>: Contains the number of parts being transferred.
Below are the tags sent for each part. The “X” the number the part is in the sequence.
This sequence is repeated for each part transferred.
TAG The data it contains
<qty_X> Quantity*
<partnum_X> Part number*
<hlsm_desc_X> Description*
<make_x> Manufacturer of the part*
<hlsm_price_X> Sale Price*
<hlsm_year_X> Year of the unit it was chosen+
<hlsm_make_X> Manufacturer of the unit chosen~
<hlsm_model_X> Model of the unit chosen+
<hlsm_cat_X> Category of the unit/part*
<hlsm_dealer_X> Returns who gets the sale credit for this part*
<hlsm_showprice_X> If the user saw the price, Yes/No*
<hlsm_ip_address_X> IP Address of the computer used*
Notes:
* Will always contain data
+ If user did not select the part through a unit, these return a dash, “-“.
~ Defaults to the manufacturer of the part.
Sample data is as follows
<HLSM>
<hlsmno>287</hlsmno>
<ItemCnt>3</ItemCnt>
<qty_1>1</qty_1>
<partnum_1>14321-KB4-671</partnum_1>
<hlsm_desc_1>SPROCKET, CAM (38T)</hlsm_desc_1>
<make_1>Honda</make_1>
<hlsm_price_1>29.49</hlsm_price_1>
<hlsm_year_1>2008</hlsm_year_1>
<hlsm_make_1>Honda</hlsm_make_1>
<hlsm_model_1>CMX250C Rebel</hlsm_model_1>
<hlsm_cat_1>Streetbike</hlsm_cat_1>
<hlsm_dealer_1>HLSM</hlsm_dealer_1>
<hlsm_showprice_1>No</hlsm_showprice_1>
<hlsm_ip_address_1>192.168.1.140</hlsm_ip_address_1>
<qty_2>1</qty_2>
<partnum_2>14401-KBG-671</partnum_2>
<hlsm_desc_2>CHAIN, CAM (98L)</hlsm_desc_2>
<make_2>Honda</make_2>
<hlsm_price_2>122.49</hlsm_price_2>
<hlsm_year_2>2008</hlsm_year_2>
<hlsm_make_2>Honda</hlsm_make_2>
<hlsm_model_2>CMX250C Rebel</hlsm_model_2>
<hlsm_cat_2>Streetbike</hlsm_cat_2>
<hlsm_dealer_2>HLSM</hlsm_dealer_2>
<hlsm_showprice_2>No</hlsm_showprice_2>
<hlsm_ip_address_2>192.168.1.140</hlsm_ip_address_2>
<qty_3>1</qty_3>
<partnum_3>5WH-15100-00-00</partnum_3>
<hlsm_desc_3>CRANKCASE ASSY</hlsm_desc_3>
<make_3>Yamaha</make_3>
<hlsm_price_3>498.49</hlsm_price_3>
<hlsm_year_3>-</hlsm_year_3>
<hlsm_make_3>Yamaha</hlsm_make_3>
<hlsm_model_3>-</hlsm_model_3>
<hlsm_cat_3>Motorcycle</hlsm_cat_3>
<hlsm_dealer_3>HLSM</hlsm_dealer_3>
<hlsm_showprice_3>Yes</hlsm_showprice_3>
<hlsm_ip_address_3>192.168.1.140</hlsm_ip_address_3>
</HLSM>
1.0 Receiving the parts list from HLSM.
‘=============================================================================== =========
Below is a samble of code to receive and parse the data. This is written in vb script:
Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
xmlDoc.async = False
xmlDoc.Load (Request)
If (xmlDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xmlDoc.parseError
strLine = "You have error " & myErr.reason
Response.Write strLine 'Send the dealer ID
Else
set Conn = Server.CreateObject ("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")
Conn.Open strDSN
'Need to get the internal id to track the order
strSQL = "Select * from xmlID"
rs.Open strSQL, Conn, adOpenKeyset,adLockOptimistic
lngtransfer_id = rs("Field0")
rs("Field0") = rs("Field0") + 1
rs.Update
rs.Close
set rs = Nothing
'Pick up the HLSM Order No and the number of parts being sent.
strHLSMNo = xmlDoc.getElementsByTagName("hlsmno").item(0).text
lngCnt = xmlDoc.getElementsByTagName("ItemCnt").item(0).text
‘Set the fields used to store the parts list.
strFields = "hlsm_no, transfer_id, dtdate, strqty, strpn, strdescr, strmake, strprice, stryear, strhlsmmake, strmodel, strcat, strdealer, strshowprice, stripaddress"
‘go through the count to pick up each part.
For b = 1 to lngCnt
‘Set the correct tag names
strQtyTag = "qty_" & b
strPNTag = "partnum_" & b
strDescTag = "hlsm_desc_" & b
strMakeTag = "make_" & b
strPriceTag = "hlsm_price_" & b
strYearTag = "hlsm_year_" & b
strHLSMMakeTag = "hlsm_make_" & b
strModelTag = "hlsm_model_" & b
strCatTag = "hlsm_cat_" & b
strDealerTag = "hlsm_dealer_" & b
strShowPriceTag = "hlsm_showprice_" & b
strIPAddressTag = "hlsm_ip_address_" & b
‘Pick up the value for each tag
strQty = Trim(xmlDoc.getElementsByTagName("qty_" & b).item(0).text) 'Qty to be ordered
strPN = Trim(xmlDoc.getElementsByTagName("partnum_" & b).item(0).text) 'Part Number
strDesc = Trim(xmlDoc.getElementsByTagName("hlsm_desc_" & b).item(0).text) 'Description
strMake = Trim(xmlDoc.getElementsByTagName("make_" & b).item(0).text) 'Manufacturer of the part
strPrice = Trim(xmlDoc.getElementsByTagName("hlsm_price_" & b).item(0).text) 'The price the customer has seen
strYear = Trim(xmlDoc.getElementsByTagName("hlsm_year_" & b).item(0).text) 'The year of the unit the part was ordered from. Will default to dash, "-", if not tied to a unit.
strHLSMMake = Trim(xmlDoc.getElementsByTagName("hlsm_make_" & b).item(0).text) 'The make of the unit the part was ordered from. Will default to dash, "-", if not tied to a unit.
strModel = Trim(xmlDoc.getElementsByTagName("hlsm_model_" & b).item(0).text) 'The model of the unit the part was ordered from. Will default to dash, "-", if not tied to a unit.
strCat = Trim(xmlDoc.getElementsByTagName("hlsm_cat_" & b).item(0).text) 'The Category of the unit the part was ordered from. Will default to dash, "-", if not tied to a unit.
strDealer = Trim(xmlDoc.getElementsByTagName("hlsm_dealer_" & b).item(0).text) 'Who get sales credit. This will be "HLSM"
strShowPrice = Trim(xmlDoc.getElementsByTagName("hlsm_showprice_" & b).item(0).text) 'determine if pricing was shown, Yes means shown, No means not shown.
strIPAddress = Trim(xmlDoc.getElementsByTagName("hlsm_ip_address_" & b).item(0).text) 'The IP address of the computer used to add these part to the list.
‘String the data to be inserted into the database and create the SQL statement.
strData = strHLSMNo & ", " & lngtransfer_id & ", #" & Date & "#, '" & strqty & "', '" & strpn & "', '" & strDesc & "', '" & _
strMake & "', '" & strPrice & "', '" & strYear & "', '" & strHLSMMake & "', '" & strModel & "', '" & _
strCat & "', '" & strDealer & "', '" & strShowPrice & "', '" & strIPAddress & "'"
strSQL = "INSERT INTO xmllist (" & strFields & ") VALUES (" & strData & ")"
‘Execute the SQL statement.
Conn.Execute strSQL
Next
Conn.Close
‘Return the ID assigned to this parts list.
Response.Write lngtransfer_id 'Send the Transfer ID
End If
Set xmlDoc = Nothing
set Conn = Nothing
2.0 Redirect the customer to the remote cart to review the items sent.
‘=============================================================================== =========
The Customer is then redirected to the cart via a querystring
The querystring has three objects:
1. action – This is a flag this is coming from HLSM
2. hlsmno – The HLSM number associated with the parts which was sent
3. transferid – The ID returned by the remote cart
Example: https://www.url _to_show_cart.asp?action=hlsmtransfer&hlsmno=295&transferid=22
The Example is as follows:
1. www.url _to_show_cart.asp – This would be the web page address HLSM redirects the dealer to.
2. Action – Always set to “hlsmtransfer”
3. Hlsmno – Set to 295.
4. Transferid – The remote cart sent 22
At this point, The HLSM has handed the order over to the remote cart.
3.0 The remote cart sending back information on the order after checkout is complete.
‘=============================================================================== =========
Order Information returned:
Once the order is completed, checkout. The remote cart is to return information about the order:
1. The HLSM Order No
2. The remote cart order number
3. The amount of the order
This is accomplished with a querystring. The object in the querystring is “or”. The information is separated with pipe. “|”.
An example would be:
https://www.onlinemicrofiche.com/XXX...56|4578|589.29
1. XXXXX – This is the directory assigned by HLSM
2. 1256 – The HLSM Order number sent when this list of parts where transferred.
3. 4578 – The Order number the remote cart assigned to the parts list when the user checked out.
4. 589.29 – The amount of the items sent to the remote cart by HLSM. This is NOT to include taxes or shipping.
XML would be used to deliver the information. HLSM would then respond the “Pass” if the information was accepted.
Please review the following example:
url = "https://www.onlinemicrofiche.com/XXXXX/shoppingcart/Maintain/OrderSent.asp?or=1256|4578|589.29
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP.3.0")
xmlhttp.open "GET", url, false
xmlhttp.setRequestHeader "Content-Type", "text/html"
xmlhttp.send ()
strResponse = xmlhttp.responseText
If strResponse = “Pass” then
‘This means the data was accepted
Else
‘The data had an error. It will respond with “Errror”
End IF
Attached is a WORD DOC explaining the operation.



