Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 ASP (Windows server) versions
 Shipping software not able to download
Author « Topic »  

DeeAnna
Advanced Member

USA
271 Posts

Posted - 04/02/2019 :  09:30:33  
Hi there! I use shipping software by Shipworks, https://www.shipworks.com/, to purchase and print shipping labels. Until sometime last week, the connection between my ECT store and the Shipworks software worked fine -- I could download orders for shipping without any problems.

Then I updated the store to version 7.0.4 and also discovered some problems with permissions as I was uploading the new version to my website. To resolve the permission errors, the Servelink folks reset permissions for my website.

I discovered yesterday that Shipworks can no longer communicate with the ECT store database. When I try to download orders to the SW database, nothing happens. The SW detailed log files do not show any errors.

I'm working with Shipworks and Servelink to troubleshoot this issue, but I need to also ask you good folks for your input.

Could the update to 7.0.4 have changed how Shipworks has to connect with the ECT store database to extract the data it needs? The following is the customized asp file that Shipworks uses to communicate with my store. Regards, DeeAnna

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="swincludes.asp"-->
<%

if request.form("username")=swusername and request.form("password")=swpassword then
Set rs = Server.CreateObject("ADODB.RecordSet")
Set cnn=Server.CreateObject("ADODB.Connection")
cnn.open sDSN

response.ContentType="text/xml"
response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
response.Write("<ShipWorks moduleVersion=""3.0.1"" schemaVersion=""1.0.0"">")

if request.form("action")="getmodule" then

response.Write(" <Module>")
response.Write(" <Platform>eCommerce Templates</Platform>")
response.Write(" <Developer>eCom Webstore (sales@ecomwebstore.com)</Developer> ")
response.Write(" <Capabilities> ")
response.Write("<DownloadStrategy>" & swDownloadStrategy & "</DownloadStrategy> ")
response.Write(" <OnlineCustomerID supported=""false"" /> ")
response.Write(" <OnlineStatus supported=""true"" dataType=""text"" supportsComments=""true"" /> ")
response.Write(" <OnlineShipmentUpdate supported=""true"" /> ")
response.Write(" </Capabilities> ")
response.Write(" </Module> ")

elseif Request.form("action")="getstore" then

response.Write(" <Store> ")
response.Write(" <Name>" & swStoreName & "</Name>")
response.Write(" <CompanyOrOwner>" & swOwnerName & "</CompanyOrOwner> ")
response.Write(" <Email>" & swStoreEmail & "</Email> ")
response.Write(" <Street1>" & swStoreAddress & "</Street1> ")
response.Write(" <Street2>" & swStoreAddress2 & "</Street2> ")
response.Write(" <Street3>" & swStoreAddress3 & "</Street3> ")
response.Write(" <City>" & swStoreCity & "</City> ")
response.Write(" <State>" & stateAbbrev(swState) & "</State> ")
response.Write(" <PostalCode>" & swStorePostalCode & "</PostalCode> ")
response.Write(" <Country>" & getUSA(swCountry) & "</Country> ")
response.Write(" <Phone>" & swStorePhone & "</Phone> ")
response.Write(" <Website>" & swStoreWebsite & "</Website> ")
response.Write(" </Store> ")

elseif Request.form("action")="getstatuscodes" then

response.Write(" <StatusCodes> ")
'come in here and loop through all the possible order status codes
sql="SELECT statID,statPrivate from orderstatus where statPrivate<>'' order by statID"
rs.Open sql,cnn,0,1
do until rs.eof
response.Write(" <StatusCode> ")
response.Write(" <Code>" & rs("statID") & "</Code> ")
response.Write(" <Name>" & rs("statPrivate") & "</Name> ")
response.Write(" </StatusCode> ")
rs.movenext
Loop
rs.close
response.Write(" </StatusCodes> ")

elseif Request.form("action")="getcount" then

'all the possible orders
if swDownloadStrategy="ByModifiedTime" then
wheresql=" WHERE ordStatusDate > '" & Request.form("start") & "'"
elseif swDownloadStrategy="ByOrderNumber" then
wheresql=" WHERE ordID > " & Request.form("start")
end if
sql="SELECT count(ordID) as OrderCount from orders" & wheresql
rs.Open sql,cnn,0,1
response.Write(" <OrderCount>" & rs("OrderCount") & "</OrderCount> ")
rs.close


elseif Request.form("action")="getorders" then

response.Write(" <Parameters> ")
response.Write(" <Start>" & Request.form("start") & "</Start> ")
response.Write(" <MaxCount>" & Request.form("maxcount") & "</MaxCount> ")
response.Write(" </Parameters> ")

response.Write(" <Orders> ")

'all the orders
if swDownloadStrategy="ByModifiedTime" then
wheresql=" WHERE ordStatusDate > '" & Request.form("start") & "'"
elseif swDownloadStrategy="ByOrderNumber" then
wheresql=" WHERE ordID > " & Request.form("start")
end if
sql="SELECT ordDate,ordStatusDate,ordID,ordShipType,ordName,ordAddress,ordAddress2,ordCity,ordState,ordZip,ordCountry,ordPhone,ordEmail,"
sql=sql & "ordshipName,ordShipAddress,ordShipAddress2,ordShipCity,ordShipState,ordShipZip,ordShipCountry,ordShipPhone,"
sql=sql & "ordTotal,ordShipping,ordHandling,ordStateTax,ordCountryTax,ordHSTTax,ordDiscount,statPrivate,ordExtra1,ordShipExtra1 from orders inner join orderstatus on orders.ordStatus=orderstatus.statID " & wheresql
rs.Open sql,cnn,0,1
do until rs.eof

ordDate=rs("ordDate")
newOrdDate=Year(ordDate) & "-" & preZero(Month(ordDate)) & "-" & preZero(Day(ordDate)) & "T" & preZero(Hour(ordDate)) & ":" & preZero(Minute(ordDate)) & ":" & preZero(Second(ordDate))
ordStatusDate=rs("ordStatusDate")
newOrdStatusDate=Year(ordStatusDate) & "-" & preZero(Month(ordStatusDate)) & "-" & preZero(Day(ordStatusDate)) & "T" & preZero(Hour(ordStatusDate)) & ":" & preZero(Minute(ordStatusDate)) & ":" & preZero(Second(ordStatusDate))

response.Write("<Order>")
response.Write("<OrderNumber>" & rs("ordID") & "</OrderNumber>")
response.Write("<OrderDate>" & newOrdDate & "</OrderDate>")
response.Write("<LastModified>" & newOrdStatusDate & "</LastModified>")
response.Write("<ShippingMethod>" & htmlspecials(rs("ordShipType")) & "</ShippingMethod>")
response.Write("<StatusCode>" & rs("statPrivate") & "</StatusCode>")

response.Write("<BillingAddress>")
response.Write("<FullName>" & rs("ordName") & "</FullName>")
response.Write("<Company>" & rs("ordExtra1") & "</Company>")
response.Write("<Street1>" & rs("ordAddress") & "</Street1>")
response.Write("<Street2>" & rs("ordAddress2") & "</Street2>")
response.Write("<City>" & rs("ordCity") & "</City>")
response.Write("<State>" & stateAbbrev(rs("ordState")) & "</State>")
response.Write("<PostalCode>" & rs("ordZip") & "</PostalCode>")
response.Write("<Country>" & getUSA(rs("ordCountry")) & "</Country>")
response.Write("<Phone>" & rs("ordPhone") & "</Phone>")
response.Write("<Email>" & rs("ordEmail") & "</Email>")
response.Write("</BillingAddress>")

response.Write("<ShippingAddress>")
response.Write("<FullName>" & iif(rs("ordshipName")<>"",rs("ordshipName"),rs("ordName")) & "</FullName>")
response.Write("<Company>" & rs("ordShipExtra1") & "</Company>")
response.Write("<Street1>" & iif(rs("ordShipAddress")<>"",rs("ordShipAddress"),rs("ordAddress")) & "</Street1>")
response.Write("<Street2>" & iif(rs("ordShipAddress")<>"",rs("ordShipAddress2"),rs("ordAddress2")) & "</Street2>")
response.Write("<City>" & iif(rs("ordShipCity")<>"",rs("ordShipCity"),rs("ordCity")) & "</City>")
response.Write("<State>" & stateAbbrev(iif(rs("ordShipState")<>"",rs("ordShipState"),rs("ordState"))) & "</State>")
response.Write("<PostalCode>" & iif(rs("ordShipZip")<>"",rs("ordShipZip"),rs("ordZip")) & "</PostalCode>")
response.Write("<Country>" & getUSA(iif(rs("ordShipCountry")<>"",rs("ordShipCountry"),rs("ordCountry"))) & "</Country>")
response.Write("<Phone>" & iif(rs("ordShipPhone")<>"",rs("ordShipPhone"),rs("ordPhone")) & "</Phone>")
response.Write("<Email>" & rs("ordEmail") & "</Email>")
response.Write("</ShippingAddress>")

response.Write("<Totals>")
response.Write("<Total name=""SubTotal"" impact=""none"">" & rs("ordTotal") & "</Total>")
response.Write("<Total name=""Shipping"" impact=""add"">" & rs("ordShipping") & "</Total>")
response.Write("<Total name=""Handling"" impact=""add"">" & rs("ordHandling") & "</Total>")
response.Write("<Total name=""Taxes"" impact=""add"">" & rs("ordStateTax")+rs("ordCountryTax")+rs("ordHSTTax") &"</Total>")
response.Write("<Total name=""Discounts"" impact=""subtract"">" & rs("ordDiscount") & "</Total>")
response.Write("</Totals>")

Set rsCart= Server.CreateObject("ADODB.RecordSet")
sSQL="SELECT cartID,cartProdID,cartProdName,cartQuantity,cartProdPrice,cartOrderID,pWeight as prodWeight,pSKU as SKU,imagesrc from (Cart inner join products on Cart.cartProdID=products.pID) left join productimages on Cart.cartProdID=productimages.imageProduct where imagetype=0 and imagenumber=0 and cartOrderID=" & rs("ordID")
rsCart.Open sSQL,cnn,0,1
response.Write("<Items>")
do until rsCart.eof
response.Write("<Item>")
response.Write("<ProductID>" & rsCart("cartProdID") &"</ProductID>")
response.Write("<Code>" & rsCart("cartProdID") &"</Code>")
response.Write("<SKU>" & rsCart("SKU") &"</SKU>")
response.Write("<Name>" & rsCart("cartProdName") &"</Name>")
response.Write("<Quantity>" & rsCart("cartQuantity") &"</Quantity>")
response.Write("<UnitPrice>" & rsCart("cartProdPrice") &"</UnitPrice>")
response.Write("<Weight>" & rsCart("prodWeight") &"</Weight>")
response.Write("<ThumbnailImage>" & Request.ServerVariables("server_name") & "/" & rsCart("imagesrc") & "</ThumbnailImage>")

Set rsCartOpt= Server.CreateObject("ADODB.RecordSet")
sSQL="SELECT * from Cartoptions where coCartID=" & rsCart("cartID")
rsCartOpt.Open sSQL,cnn,0,1
if not rsCartOpt.eof then
response.Write("<Attributes>")
do until rsCartOpt.eof
response.Write("<Attribute>")
response.Write("<Name>" & rsCartOpt("coOptGroup") & "</Name>")
response.Write("<Value>" & rsCartOpt("coCartOption") & "</Value>")
response.Write("</Attribute>")
rsCartOpt.movenext
Loop
rsCartOpt.close
response.Write("</Attributes>")
end if

response.Write("</Item>")
rsCart.movenext
Loop
rsCart.close
response.Write("</Items>")
response.Write("</Order>")
rs.movenext
Loop
rs.close

response.Write(" </Orders> ")

elseif Request.form("action")="updatestatus" then

liRecordsAffected = 0
sql="UPDATE orders set ordStatus='" & Request.form("status") & "', ordPrivateStatus='" & Request.form("comments") & "' where ordID=" & Request.form("order")
set rs=cnn.execute(sql,liRecordsAffected,1)

If err.number > 0 or liRecordsAffected= 0 then
response.Write(" <Error> ")
response.Write(" <Code>" & err.number & "</Code> ")
response.Write(" <Description>Unable to update order #" & Request.form("order") & " with tracking #" & Request.form("tracking") & "</Description> ")
response.Write(" </Error> ")
else
response.Write(" <UpdateSuccess /> ")
end if


elseif Request.form("action")="updateshipment" then

liRecordsAffected = 0
sql="UPDATE orders set ordTrackNum='" & Request.form("tracking") & "' where ordID=" & Request.form("order")
set rs=cnn.execute(sql,liRecordsAffected,1)

If err.number > 0 or liRecordsAffected= 0 then
response.Write(" <Error> ")
response.Write(" <Code>" & err.number & "</Code> ")
response.Write(" <Description>Unable to update order #" & Request.form("order") & " with tracking #" & Request.form("tracking") & "</Description> ")
response.Write(" </Error> ")
else
response.Write(" <UpdateSuccess /> ")
end if

end if
response.Write(" </ShipWorks> ")
else
Response.write "Username and Password are incorrect"
Response.End

end if

%>

Classic Bells, Postville, Iowa, USA, http://classicbells.com/

Edited by - DeeAnna on 04/02/2019 09:32:37

Andy
ECT Moderator

95440 Posts

Posted - 04/02/2019 :  09:41:02  
Hi

Did this come from an outside developer as I'm not sure I've seen this integration before.

Andy

Please feel free to review / rate our software

DeeAnna
Advanced Member

USA
271 Posts

Posted - 04/02/2019 :  10:27:59  
I'd forgotten about that. Yes, you're right. Dean from ecomwebstore.com did the customization in 2014. It looks like he's still in business. Is there a way to send him a notification about this thread to see if he has any opinion about this matter? I don't know his username here, assuming he's on the ECT forum. Update -- I sent an inquiry through his website. --DeeAnna

Classic Bells, Postville, Iowa, USA, http://classicbells.com/

Edited by - DeeAnna on 04/02/2019 10:38:51
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.05 seconds. Snitz Forums 2000