Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2011
    Posts
    9
    Plugin Contributions
    0

    Default Remote cart integration?

    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.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Remote cart integration?

    For somebody with previous experience of sort of integration and knowledge of how the shopping cart is structured and managed in Zen Cart, it would be straightforward.

    They'd write a custom handler to receive the XML data, parse it and populate the shopping cart, before directing the customer to the cart.

    The customer would login or create an account and proceed through the checkout as normal.

    When the order is confirmed as successful, the order id is passed to the checkout success page. this would be intercepted and used to read the order and provide the information back to the HLSM system, before taking the customer to the checkout success page (or redirecting them back to HLSM if that's more appropriate).

    But there is a BIG caveat here. Although it's straightforward for the right person, somebody lacking relevant experience handling these sorts of feeds or sufficient Zen Cart knowledge will struggle and very possibly be unable to complete the task.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Mar 2011
    Posts
    9
    Plugin Contributions
    0

    Default Re: Remote cart integration?

    I am looking for that person...help !

  4. #4
    Join Date
    Mar 2011
    Posts
    9
    Plugin Contributions
    0

    Default Re: Remote cart integration?

    how about some suggestions for good questions to ask that will help weed out the herd of people that will certainly claim they can do it..?

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Remote cart integration?

    Yes. I recognise the problem. Now that the commercial help wanted section of the forum has been closed down, you're rather at the mercy of the freelance sites.

    You could take a look through the forum and approach people who seem knowledgeable in the area (note: not us, Kuroi, as although we are a commercial agency, our posts here are intended as impartial help and not to tout for business).

    I would certainly ask for examples of similar integrations that they have done before specifically for Zen Cart. Ask whether they did them personally (a lot of the guys on the freelance sites don't do the work themselves, they just source it and front it up, so you don't know who's going to actually do it), and ask which bit was the most difficult to test their understanding.

    I'd also ask them to demonstrate their Zen Cart expertise by referencing posts that they've made in this forum. You can follow up through private message to check that they're not just pointing to other people's posts.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Remote cart integration?

    Quote Originally Posted by Bacchus View Post
    how about some suggestions for good questions to ask that will help weed out the herd of people that will certainly claim they can do it..?
    You'll not have much problem finding people who will claim they are able to do this, but personally I don't really agree with
    kuroi that it will be "straightforward". I think that for even a seasoned zen-cart developer this isn't going to a task that can be completed in a weekend or two. It will take a lot of time and commitment. Certainly far more than *I* would consider spending on it, at least not without a substantial upfront payment.

    No, I am not offering to accept the task, its not about the $$$, it is about the time that I don't have to spare.

    The point of my reply though is to backup what kuroi did state in regards to having them to demonstrate their skills and knowledge in regards to zen development, and to also warn you against going for the cheapest estimate on offer.

    Anyone that says they can do this for a few hundred bucks is either fooling themselves, or fooling you.

    Cheers
    Rod

 

 

Similar Threads

  1. v139h Remote phpbb integration?
    By drbyday in forum General Questions
    Replies: 1
    Last Post: 16 Mar 2013, 12:31 AM
  2. how to Install Zen Cart on a remote server
    By wingsze in forum General Questions
    Replies: 4
    Last Post: 17 Mar 2008, 04:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg