ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Batch Print Shipping Labels
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Batch Print Shipping Labels

 Post Reply Post Reply
Author
Message
radarman View Drop Down
Newbie
Newbie


Joined: 14-February-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote radarman Quote  Post ReplyReply Direct Link To This Post Topic: Batch Print Shipping Labels
    Posted: 14-February-2007 at 1:55pm

Does anyone know how to modify the "batchPrint" page for packing slips to show only the customers name and address? and....how to get this to display with 3 across so this can be printed on a sheet of peel and stick labels?

Thanks

Back to Top
radarman View Drop Down
Newbie
Newbie


Joined: 14-February-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote radarman Quote  Post ReplyReply Direct Link To This Post Posted: 14-February-2007 at 4:06pm

Here is the code for BatchPrint.asp and some modifications I did to it. But it doesnt work as i wish it to. Can anyone tell or show me how to get it right?

The part i tried to adjust is in red

The code i added is a Horizontal Looper that supposed to make 3 colums of the data between the code. It works on other pages i try with other data but not on this one.

Help?

<% 
      pidcustomer=rs("idcustom er")
      porderdate=rs("orderdate ")
      porderdate=ShowDateFrmt( porderdate)
      pAddress=rs("Address")
      pcity=rs("city")
      pstate=rs("state")
      pstateCode=rs("stateCode ")
      if pstateCode="" then
       pstateCode=pstate
      end if
      pzip=rs("zip")
      pCountryCode=rs("Country Code")
      ppaymentDetails=trim(rs( "paymentDetails"))
      pshipmentDetails=rs("shi pmentDetails")
      pshippingAddress=rs("shi ppingAddress")
      pshippingCity=rs("shippi ngCity")
      pshippingStateCode=rs("s hippingStateCode")
      pshippingState=rs("shipp ingState")
      if pshippingStateCode="" then
       pshippingStateCode =pshippingState
      end if
      pshippingZip=rs("shippin gZip")
      pshippingCountryCode=rs( "shippingCountryCode")
      pshippingPhone=rs("digit alemailtext")
      pidAffiliate=rs("idaffil iate")
      paffiliatePay=rs("affili atePay")
      pdiscountDetails=rs("dis countDetails")
      ptaxAmount=rs("taxAmount ")
      ptotal=rs("total")
      pcomments=rs("comments")
      porderStatus=rs("orderSt atus")
      pprocessDate=rs("process Date")
      pprocessDate=ShowDateFrm t(pprocessDate)
      pshipDate=rs("shipDate")
      pshipDate=ShowDateFrmt(p shipdate)
      pshipvia=rs("shipvia")
      ptrackingNum=rs("trackin gNum")
      preturnDate=rs("returnDa te")
      preturnDate=ShowDateFrmt (preturnDate)
      preturnReason=rs("return Reason")
      pshippingFullName=rs("Sh ippingFullName")
      pord_DeliveryDate=rs("or d_DeliveryDate")
      pord_OrderName=rs("ord_O rderName")
      pOrdPackageNum=rs("ordPa ckageNum")
      piRewardPoints=rs("iRewa rdPoints")
      piRewardPointsCustAccrue d=rs("iRewardPointsCustAccrued")
      piRewardValue=rs("iRewar dValue")
      pAddress2=rs("address2")
      pshippingCompany=rs("shi ppingCompany")
      pshippingAddress2=rs("sh ippingAddress2")
      ptaxDetails=rs("taxDetai ls")
      pSRF=rs("SRF")
      pord_VAT=rs("ord_VAT")
      pcv_CatDiscounts=rs("pcO rd_CatDiscounts")
      if pcv_CatDiscounts<>"" then
      else
       pcv_CatDiscounts=" 0"
      end if
      pcgwAuthCode=rs("gwAuthC ode")
      pcgwTransId=rs("gwTransI d")
      pcpaymentCode=rs("paymen tCode")

      mySQL="SELECT [name],lastname,customerCompany,phone,email,customertype FROM customers WHERE idCustomer=" & pidcustomer
      Set rsCustObj=Server.CreateObject("ADODB.Recordset")
      Set rsCustObj=connTemp.execute(mySQL)
      CustomerName=rsCustObj(" name")& " " & rsCustObj("lastname")
      CustomerPhone=rsCustObj( "phone")
      CustomerEmail=rsCustObj( "email")
      CustomerCompany=rsCustOb j("customerCompany")
      CustomerType=rsCustObj(" customertype")
      set rsCustObj=nothing    
      %>
</p>
<table width="33%" cellpadding="5" cellspacing="0" class="invoice">
  <tr>
<% 
Dim Repeat_rs__numRowsHL
Dim Repeat_rs__indexHL

Repeat_rs__numRowsHL = -1
Repeat_rs__indexHL = 0
rs_numRows = rs_numRows + Repeat_rs__numRowsHL
      
While ((Repeat_rs__numRowsHL <> 0) AND (NOT rs.EOF))
%>

    <td class="invoice"> <strong>SHIP TO</strong>:<br>
      <% if pshippingAddress="" then %>
      <% response.write "(Same as billing address)" %>
      <% else %>
      <% if pshippingFullName<>"" then
  response.write pshippingFullName
  else
  response.write CustomerName
  end if %>
      <br>
      <% if pshippingCompany<>"" then
  response.write pshippingCompany & "<br>"
  else
  if customerCompany <> "" then
  response.write customerCompany & "<br>"
  end if
  end if %>
      <%=pshippingAddress%><br>
      <% if pshippingAddress2<>"" then
  response.write pshippingAddress2&"<BR>"
  end if %>
      <%=pshippingcity%>, <%=pshippingStateCode%>&nbsp;<%=pshippingZip%&a mp;a mp;g t;
      <% if pShippingCountryCode <> scShipFromPostalCountry then
  response.write "<BR>" & pShippingCountryCode
  end if %>
      <% if pshippingPhone <> "" then %>
      <% end if %>
      <% end if %>
    </td>
<%

    Repeat_rs__indexHL=Repeat_rs__indexHL+1
    Repeat_rs__numRowsHL=Repeat_rs__numRowsHL-1
    rs.MoveNext()
    if len(nested_rs)<=0 then
      nested_rs = 1
    end if
    if ((Repeat_rs__numRowsHL <> 0) AND (NOT rs.EOF) AND (nested_rs mod 3 = 0)) then
      Response.Write "</tr><tr>"
    end if
    nested_rs = nested_rs + 1
  Wend
%>
  </tr>
</table>

<%end if%>
<%
 Next
 closedb()
%>



Edited by radarman - 14-February-2007 at 4:08pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.066 seconds.