Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 URGENT - Please assist!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cps
VP-CART New User

South Africa
69 Posts

Posted - October 14 2013 :  02:38:57  Show Profile  Visit cps's Homepage  Reply with Quote
When customers place an order on our website, a copy of the order is sent to them on email. When the check ''Collection'' option, something strange happens on the order copy sent. In the totals at the bottom it says ''Out of Stock'' next to delivery.

How can I stop it from doing this?

Here is a screenshot of the email sent to the customer once the an order has been placed on the website:

http://www.thecpswarehouse.co.za/images/error.jpg



www.thecpswarehouse.co.za

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - October 14 2013 :  03:28:51  Show Profile  Visit serjtankian's Homepage  Reply with Quote
where did you check the collection option ?

I cry when angels deserve to die
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - October 14 2013 :  03:29:46  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi Cps,

Please give some more information.

What do you mean by "check Collection option"? Inventory products?

Which field is specified in your tmp_customermail.htm file? Do you have something like [formatcurrency oshipcost] next to the "delivery" label?

Kind regards,

Erik
www.aquathermia.com
Go to Top of Page

cps
VP-CART New User

South Africa
69 Posts

Posted - October 14 2013 :  04:08:42  Show Profile  Visit cps's Homepage  Reply with Quote
Please see link to screenshot below - when the customer orders products on the website, they fill out a form with all their details and they have to choose ''Delivery'' or ''Collection''.

http://www.thecpswarehouse.co.za/images/screenshot2.jpg

When they choose ''Delivery'', it calculates the delivery cost at 10% which is displayed on the copy of the order that is emailed to them. When they choose ''Collection'', it says ''Delivery - OUT OF STOCK'' as in the link to the screenshot below:

http://www.thecpswarehouse.co.za/images/error.jpg

Manilow - Yes, [formatcurrency oshipcost] is next to the ''Delivery'' label.

www.thecpswarehouse.co.za
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - October 14 2013 :  04:18:02  Show Profile  Visit serjtankian's Homepage  Reply with Quote
have you Change Shipping Calculation as Lookup ?

#########################

I cry when angels deserve to die
Go to Top of Page

cps
VP-CART New User

South Africa
69 Posts

Posted - October 14 2013 :  05:33:20  Show Profile  Visit cps's Homepage  Reply with Quote
What does that mean exactly - please explain further? I''m not very experienced with ASP...

www.thecpswarehouse.co.za
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - October 14 2013 :  05:36:49  Show Profile  Visit serjtankian's Homepage  Reply with Quote
could you post a screenshot of your shipping setting ?

#########################

I cry when angels deserve to die
Go to Top of Page

cps
VP-CART New User

South Africa
69 Posts

Posted - October 15 2013 :  04:05:32  Show Profile  Visit cps's Homepage  Reply with Quote
Not sure what settings you need, please see below and let me know if this helps?

http://www.thecpswarehouse.co.za/Templates/default-2cols/tmp_customeremail.htm

http://www.thecpswarehouse.co.za/images/del1.jpg

www.thecpswarehouse.co.za
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - October 15 2013 :  05:20:39  Show Profile  Visit manilow's Homepage  Reply with Quote
I''d rather see the settings on the page : shopa_editshipping.asp (shipping and handling).

Regards,

Erik
www.aquathermia.com
Go to Top of Page

cps
VP-CART New User

South Africa
69 Posts

Posted - October 28 2013 :  02:29:21  Show Profile  Visit cps's Homepage  Reply with Quote
Please see below:

<%option explicit%>
<! #include file="shop$db.asp" -->
<!-- #include file="shopupsincludes.asp" -->
<!-- #include file="shoph_shipping.asp" -->
<%
Const ExtraDisplay="No"
ShopCheckAdmin "shopa_editshipping.asp"
''**************************************************************************
'' Shop Shipping administration Only
'' VP-ASP 6.50
''
''**************************************************************************
dim howmanyfields
dim arrayfields
dim mysql
Dim Fieldcount
Dim Headnames
Dim ProcType
Dim SortType
Dim Sortfield
Dim SortUpDown
Dim Sortupdownnames(2)
Dim Sortupdownvalues(2)
Dim Sortupdowncount
Dim Procnames(3)
dim Procvalues(3)
Dim Fieldnames
Dim Fieldnamecount
Dim DisplayFields
Dim displayFieldCount
Dim DisplayField
Dim Idfield
Dim SelectField
Dim SelectValue
Dim maxfields
Dim i
Dim item
dim dbtable
Dim scriptresponder
dim fieldname
Dim rstemp
Dim dbc
dim SpecialFunction
Dim Continue
Dim SelectAll
Dim productcategoryid
dim language
dim partsql
dim Selectioncritereontext
dim specialsearchcount
dim Specialsearch
setsess "shippingcalc", lcase(getconfig("xshippingcalc"))
Specialsearch="YES"
specialsearchcount=5
''
''
SelectAll=""
SetSess "CurrentURL","shopa_editshipping.asp"
SetSess "table","shipmethods"
dbtable=GetSess("table")
ShopcheckLicense
AdminPageHeader
GetDatabase

If dbtable<>"" then '' no valid table
if request("changeship") > "" then
ConfigUpdateRecord
end if
GetSpecialFunction
EditOpenDatabase dbc,database,dbtable
SetSess "pagenumberaddproduct",mypage

GenerateDisplayHeader "Set up " & getlang("langadminshipping") & " (" & getconfig("xshippingcalc") & ")"
GetInput
ProcessSpecialRequests
'' Different Responders for different tables
ShopopenRecordSet mysql, rstemp, mypagesize, mypage

''if the selected shipping calculation requires it, show the shipping methods
if (lcase(getconfig("xshippingcalc")) <> "fixed") and (lcase(getconfig("xshippingcalc")) <> "other") and (lcase(getconfig("xshippingcalc")) <> "product") then
GenerateDisplayBodyHeader
GenerateTable
GenerateDisplayBodyFooter
%><p></p><%
else
GenerateDisplayBodyHeader
%><table width="100%">
<tr>
<td align="right"><%ChangeShippingForm%></td>
</tr>
<tr>
<td>No shipmethods required for this shipping calculation.</td>
</tr>
</table><%
GenerateDisplayBodyFooter
%><p></p><%
end if

''Call PageNavBar (Mysql) '' put bottom navigation bar

GenerateDisplayHeader "Set up " & getlang("langbillother1") & " " & getlang("langadminshipping")

dim othersql
''VP-ASP 6.50 - broadened defintion of IF statement to cover cases where xmysql hasn''t been set
if ucase(xdatabasetype) = "MYSQL" OR ucase(xdatabasetype) = "MYSQL351" OR getconfig("xMYSQL")="Yes" then
othersql = "* from shipmethods WHERE (shiproutine <> '') AND (shiproutine <> ''upsxmlrealtime.asp'')"
else
othersql = "SELECT * from shipmethods WHERE (NOT shiproutine IS NULL) AND (NOT shiproutine = '') AND (NOT shiproutine = ''upsxmlrealtime.asp'')"
end if
ShopopenRecordSet othersql, rstemp, mypagesize, mypage

GenerateDisplayBodyHeader
%>
<br /><center><table width="90%" bgcolor="#eeeeee"><tr><td align="right">
<input type="button" onclick="location.href=''shopa_editshipmethods.asp?table=<%=dbtable%>&other=yes''" value="<%=getlang("langEditadd")%>">
</td></tr></table></center>
<% if not rstemp.eof then
GenerateOtherTable
else
response.write getlang("langnorecords")
end if

GenerateDisplayBodyFooter
%><p></p><%

GenerateDisplayHeader "Set up UPS Real-Time " & getlang("langadminshipping")
GenerateDisplayBodyHeader
GenerateUPSTable
GenerateDisplayBodyFooter
%><p></p><%

gethelp(getsess("shippingcalc"))

rsTemp.close '' close database
set rstemp=nothing
ShopCloseDatabase dbc
end if
AdminPageTrailer '' Write admin trailer

''
Sub GetDatabase
Database=request("database")
if database="" then
database=GetSess("db")
else
SetSess "db",database
end if
if database="" then
Debugwrite "No database specified"
end if
end sub

''**************************************************************************
Sub GetInput
mypage = Request("page")

''VP-ASP 6.09 - Precautionary Security Fix
if mypage > "" then
If not isnumeric(mypage) then
shoperror "Page size must be numeric"
end if
end if

''first time we need everything, othertimes sql is set up
sortfield=request("Sortfield")
'' See how we are sorting
If Sortfield="" or Sortfield=getlang("langCommonSelect") then
sortfield=IdField
end if
SelectValue=request("Selectvalue")
SelectField=request("selectField")
Productcategoryid=request("productcategoryid")
If productcategoryid=getlang("langCommonselect") then
productcategoryid=""
end if
If SelectField=getlang("langCommonselect") then
selectvalue=""
end if
''response.write "sortfield="& sortfield & "<br />"
'' see which types processed or unprocessed
SortUpdown=request("SortUpdown")
If SortUpdown="" then
sortupdown="ASC"
end if
if mypage="" then
SetFieldNames '' field names for table
GetDisplayfields
mypage=1
GenerateSQL
else
Mysql=Getsess("sqlquery")
Fieldcount=GetSess("Fieldcount")
Fieldnames=GetsessA("Fieldnames")
sortfield=GetSess("sortfield")
sortupdown=GetSess("sortupdown")
IDfield=GetSess("IDfield")
productcategoryid=GetSess("productcategoryid")
language=Getsess("editlanguage")
dbtable=GetSess("table")
DisplayFields=GetSess("DisplayFields")
DisplayFieldCount=GetSess("DisplayFieldCount")
partsql=getsess("partsql")
end if
maxrecs=getconfig("xeditdisplaymaxrecords")
mypagesize=maxrecs
SetUpDown
'' see if mail of export
If Request("SelectAll")<>"" then
SelectAll=" checked "
end if
database=Getsess("db")
end sub
''
'' SQL is generate by using fields on form

Sub GenerateSQL
mypagesize=getconfig("xeditdisplaymaxrecords")
shopproductcheck
dim sqlproc
dim key
dim sqladd
if Request("sorttext")<>"" then
mysql=request("Selectioncritereontext")
exit sub
end if
sqladd=" Where"
MySql = "SELECT * from " & lcase(dbtable)
dim i

if Selectvalue<> "" then
key = SelectValue & "%"
mySQL = MySQL & " where " & SelectField & " like ''" & key & "''"
sqladd=" AND "
end if
If ucase(dbtable)="PRODUCTS" then
DoRestrictProducts MySQL, sqladd
end if
If Productcategoryid<>"" then
mysql=Mysql & sqladd
mysql=Mysql & " ccategory=" & productcategoryid
sqladd=" And "
end if
mysql=Mysql & sqladd
mysql = mysql & " shiproutine IS NULL"
sqladd=" And "
If sortfield="" then sortfield=idfield
If sortfield<>"" then
mysql=mysql & " order by " & sortfield & " " & sortupdown
end if
SetSess "sqlquery",MySQL
Setsess "sortfield",sortfield
Setsess "sortupdown",sortupdown
If getconfig("xdebug")="Yes" then
debugwrite "generated sql=" & mysql & "<br />"
end if
End sub
''
Sub DorestrictProducts (isql, sqladd)
if getconfig("XAdminRestrictProducts")<>"Yes" then exit sub
If GetSess("Admintype")="" then exit sub
If GetSess("Admintype")="SUPER" then exit sub
iSql = isql & sqladd & " userid=''" & GetSess("shopadmin") & "''"
sqladd=" and "
end sub

Sub GenerateTable()
dim my_link
Dim howmanyrecs
Dim fieldvalue
dim idvalue

SetSess "Table",dbtable
SetSess "Dbname",dbname
SetSess "Idfield",idfield

SetUpFieldsForShipping
%>
<center>
<br /><table width="90%" bgcolor="#eeeeee">
<tr>
<td align="left"><%ChangeShippingForm%>
</td>
<td align="right">
<input type="button" onclick="location.href=''shopa_editshipmethods.asp?table=<%=dbtable%>''" value="<%=getlang("langEditadd")%>">
</td>
</tr>
</table>
<br />
<%CheckAll "shipping","SelectAll" %>
<form action=shopa_editshipping.asp method=post name="shipping">
<%=ReportTableDef & "<tr bgcolor=''#9999CC''>" %>
<%for i=0 to howmanyfields
'' response.write ReportHeadColumn & ArrayFields(i) & reportHeadColumnEnd
response.write ReportHeadColumn & HeadNames(i) & reportHeadColumnEnd
next
response.write ReportHeadColumn & "<center>" & getlang("langcommonedit") & "</center>" & reportHeadColumnEnd
If Specialfunction<>"" then
'' Response.write ReportHeadColumn & SpecialFunction & reportHeadColumnEnd
Response.write ReportHeadColumn
response.write "<center><input type=""checkbox"" onclick=""CheckAll_shipping()"" name=""SelectAll""></center>"
Response.write reportHeadColumnEnd
end if
%></tr><%

'' Now lets grab all the records
howmanyrecs=0
DO UNTIL rstemp.eof OR howmanyrecs=maxrecs
idvalue=rstemp(idfield)
if partsql<>"" then
Formatproductdetails idvalue, howmanyfields,arrayfields
else
my_link="shopa_editshipmethods.asp?which=" & rstemp(idfield) & "&idfield=" & idfield & "&table=" & dbtable & "&database=" & dbname
'' response.write ReportDetailRow & ReportDetailColumn & "<a href=''" & my_link & "''>" & getlang("langCommonEdit") & "</a>" & reportDetailColumnEnd
response.write ReportDetailRow
for i = 0 to howmanyfields
If IsNull(rstemp(ArrayFields(i))) then
response.write ReportDetailColumn & " " & reportDetailcolumnEnd
else
response.write ReportDetailColumn & rstemp(ArrayFields(i)) & ReportDetailColumnEnd
end if
next
response.write ReportDetailColumn & "<center><a href=''" & my_link & "''><img src=''images/admin/main/edit.gif'' alt=''Edit Shipping'' border=0></a></center>" & reportDetailColumnEnd
end if
If SpecialFunction<>"" then
response.write ReportDetailColumn & "<center><input type=checkbox name=''" & SpecialFunction & "User''" & " value=" & idvalue & " " & SelectAll & "></center>" & reportdetailcolumnend
end if

response.write "</tr>"
howmanyrecs=howmanyrecs+1
if howmanyrecs < maxrecs then
rstemp.movenext
end if
loop
if Specialfunction<>"" then
%>
</table>
<table width="90%" bgcolor="#eeeeee">
<!-- <tr>
<td width=''50%''><input type="submit" class=''submitbtn'' name="SelectNone" value="<%''=getlang("langUnselect")%>"></td>
<td align=center><input type="submit" class=''submitbtn'' name="SelectAll" value="<%''=getlang("langSelectAllRecords")%>"></td>
</tr> -->
<tr>
<td width="10%"><%Call PageNavBar (Mysql) '' put bottom navigation bar%></td>
<td align=right><input type="submit" class=''submitbtn'' name="Selected" value="<%=SpecialFunction%> <%=getlang("langSomeRecords")%>"></td>
</tr>
<tr>
<% if lcase(SpecialFunction) <> "delete" then%>
<td colspan="2" align=right><input type="submit" class=''submitbtn'' name="All" value="<%=SpecialFunction%>  <%=getlang("langAllRecords")%>"></td>
<%else%>
<td colspan="2"> </td>
<%end if%>
</tr>
</table><br /> 
<br />
<center>
<table width=''60%''>
</table>
</center>
<%
else
Response.write "</table>"
end if
%>
<input type="hidden" name="database" value="<%=database%>">
<input type="hidden" name="table" value="<%=dbtable%>">
<input type="hidden" name="idfield" value="<%=idfield%>">
<input type="hidden" name="page" value="<%=mypage%>">
<input type="hidden" name="specialfunction" value="<%=SpecialFunction%>">
</form><%
end sub

Sub GenerateOtherTable()
dim my_link
Dim howmanyrecs
Dim fieldvalue
dim idvalue

SetSess "Table",dbtable
SetSess "Dbname",dbname
SetSess "Idfield",idfield

howmanyfields = 2

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "shiproutine"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("LangMenuFileName")
%>
<center>
<%CheckAll "shippingother","SelectAllOther" %>
<form action=shopa_editshipping.asp method=post name="shippingother">
<%=ReportTableDef & "<tr bgcolor=''#9999CC''>" %>
<%for i=0 to howmanyfields
'' response.write ReportHeadColumn & ArrayFields(i) & reportHeadColumnEnd
response.write ReportHeadColumn & HeadNames(i) & reportHeadColumnEnd
next
response.write ReportHeadColumn & "<center>" & getlang("langcommonedit") & "</center>" & reportHeadColumnEnd
If Specialfunction<>"" then
Response.write ReportHeadColumn
response.write "<center><input type=""checkbox"" onclick=""CheckAll_shippingother()"" name=""SelectAllOther""></center>"
response.write reportHeadColumnEnd
end if
%></tr><%

'' Now lets grab all the records
howmanyrecs=0
DO UNTIL rstemp.eof OR howmanyrecs=maxrecs
idvalue=rstemp(idfield)
if partsql<>"" then
Formatproductdetails idvalue, howmanyfields,arrayfields
else
my_link="shopa_editshipmethods.asp?which=" & rstemp(idfield) & "&idfield=" & idfield & "&table=" & dbtable & "&database=" & dbname & "&other=yes"
response.write ReportDetailRow
for i = 0 to howmanyfields
If IsNull(rstemp(ArrayFields(i))) then
response.write ReportDetailColumn & " " & reportDetailcolumnEnd
else
response.write ReportDetailColumn & rstemp(ArrayFields(i)) & ReportDetailColumnEnd
end if
next
response.write ReportDetailColumn & "<center><a href=''" & my_link & "''><img src=''images/admin/main/edit.gif'' alt=''Edit Shipping'' border=0></a></center>" & reportDetailColumnEnd
end if
If SpecialFunction<>"" then
response.write ReportDetailColumn & "<center><input type=checkbox name=''" & SpecialFunction & "UserOther''" & " value=" & idvalue & " " & SelectAll & "></center>" & reportdetailcolumnend
end if

response.write "</tr>"
howmanyrecs=howmanyrecs+1
if howmanyrecs < maxrecs then
rstemp.movenext
end if
loop

if Specialfunction<>"" then
%>
</table>
<table width="90%" bgcolor="#eeeeee">
<!-- <tr>
<td width=''50%''><input type="submit" class=''submitbtn'' name="SelectNone" value="<%''=getlang("langUnselect")%>"></td>
<td align=center><input type="submit" class=''submitbtn'' name="SelectAll" value="<%''=getlang("langSelectAllRecords")%>"></td>
</tr> -->
<tr>
<td width="10%"><%Call PageNavBar (Mysql) '' put bottom navigation bar%></td>
<td align=right><input type="submit" class=''submitbtn'' name="Selected" value="<%=SpecialFunction%> <%=getlang("langSomeRecords")%>"></td>
</tr>
<tr>
<% if lcase(SpecialFunction) <> "delete" then%>
<td colspan="2" align=right><input type="submit" class=''submitbtn'' name="All" value="<%=SpecialFunction%>  <%=getlang("langAllRecords")%>"></td>
<%else%>
<td colspan="2"> </td>
<%end if%>
</tr>
</table><br /> 
<br />
<center>
<table width=''60%''>
</table>
</center>
<%
else
Response.write "</table>"
end if
%>
<input type="hidden" name="database" value="<%=database%>">
<input type="hidden" name="table" value="<%=dbtable%>">
<input type="hidden" name="idfield" value="<%=idfield%>">
<input type="hidden" name="page" value="<%=mypage%>">
<input type="hidden" name="specialfunction" value="<%=SpecialFunction%>">
</form><%
end sub

Sub GenerateUPSTable()%>
<center><table width="50%">
<tr>
<td style="background-color:#ffffff; border: 2px #cccccc solid"><div align="center"><img src="images/ups_logo_small.gif"></div></td>
<td><div align="right"><%if (GetUPSConfig("xupsacctno", true, dbc) = "") or (GetUPSConfig("AccessLicenceNum", true, dbc) = "") then%>
<a href="shopa_ups_license_1.asp">Add UPS Real-Time Shipping</a>
<br /><a href="shopa_ups_configure.asp">Configure UPS Real-Time Shipping</a>
<%else%>
<a href="shopa_ups_configure.asp">Configure UPS Real-Time Shipping</a>
<br /><a href="shopa_ups_track.asp">Track UPS Orders</a>
<br /><a href="shopa_ups_license_1.asp">Reset UPS Real-Time Shipping</a>
<br /><a href="shopa_ups_off.asp">Turn Off UPS Real-Time Shipping</a>
<%end if%>
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center"><font size="1">UPS, UPS brandmark, and the Color Brown are trademarks of United Parcel Service of America, Inc. All Rights Reserved.</font></div></td>
</tr>
</table></center><br /><%
end sub

Sub SetFieldNames
Fieldnamecount=0
dim fSql
dim rs
dim fldname
ReDim Fieldnames(200)
FSQL = "SELECT * FROM " & lcase(dbtable)
''debugwrite fSQL
Set rs = dbc.Execute(fSQL)
For each fldName in rs.Fields
Fieldnames(fieldcount)=fldName.Name
'' debugwrite fieldnames(fieldcount) & "<br />"
fieldcount=fieldcount+1
next
rs.close
Idfield=Fieldnames(0)
SetSessA "Fieldnames",Fieldnames
DisplayFields=Fieldnames
Displayfieldcount=fieldcount
SetSessA "DisplayFields",Displayfields
SetSess "DisplayFieldCount",displayfieldCount
End Sub

Sub SetUpDown
Sortupdownnames(0)=getlang("langAscending")
Sortupdownnames(1)=getlang("langDescending")
Sortupdownvalues(0)="ASC"
Sortupdownvalues(1)="DESC"
SortUpDowncount=2
end sub

'' *******************************************************
Sub DeleteRecord(Item)
dim Rowsaffected
dim dsql
dbc.Execute " " & dbtable & " where " & idfield & "=" & Item, RowsAffected, 1
end sub
''*****************************************************

Sub GetDisplayFields
dim i
Dim displayArray(100)
DisplayFieldCount = Request("DisplayFields").Count
''Debugwrite DisplayfieldCount
if DisplayfieldCount=0 then
SetSess "Displayfieldcount",displayfieldcount
exit sub
end if
displayField=Request("DisplayFields")
DisplayFields= Split(DisplayField, ", ", -1, 1)
If DisplayFields(0)="All" then
Displayfieldcount=0
end if
SetSessA "DisplayFields",DisplayFields
SetSess "Displayfieldcount",displayfieldcount
end sub
''*****************************
Sub ValidateTable
''********************************************
''See if user has access to this table
Dim UserTables
dim tablecount
if getconfig("xRestrictAdminTables")<>"Yes" then exit sub
UserTables=GetSess("UserTables")
If Isnull(UserTables) then
exit sub
end if
if UserTables="" then
exit Sub
else
UserTables=split(GetSess("UserTables"),",",-1,1)
end if
tablecount=ubound(UserTables)
for i = 0 to tablecount
if ucase(dbtable)=ucase(Usertables(i)) then
exit sub
end if
next
dbtable=""
end sub

sub SetUpFieldsForShipping
select case lcase(getconfig("xshippingcalc"))
case "lookup"
howmanyfields = 2

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "smprice"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductprice")
case "weight"
howmanyfields = 3

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "shipbasecost"
ArrayFields(3) = "shipextracost"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductbaseprice")
Headnames(3)="Extra Cost"

addshippingcountry
case "quantity"
howmanyfields = 3

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "shipbasecost"
ArrayFields(3) = "shipextracost"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductbaseprice")
Headnames(3)="Extra Cost"

addshippingcountry
case "quantityrange"
howmanyfields = 5

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "shipbasecost"
ArrayFields(3) = "shipextracost"
ArrayFields(4) = "shipother1"
ArrayFields(5) = "shipother2"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductbaseprice")
Headnames(3)="Extra Cost"
Headnames(4) = "Min Quantity"
Headnames(5) = "Max Quantity"

addshippingcountry
case "pricerange"
howmanyfields = 5

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "shipbasecost"
ArrayFields(3) = "shipextracost"
ArrayFields(4) = "shipcost1"
ArrayFields(5) = "shipcost2"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductbaseprice")
Headnames(3)="Extra Cost"
Headnames(4) = "Min Cost"
Headnames(5) = "Max Cost"

addshippingcountry
case "weightrange"
howmanyfields = 5

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "shipbasecost"
ArrayFields(3) = "shipextracost"
''VP-ASP 6.09 - changed from shipcost1 and shipcost2 for more informative display
ArrayFields(4) = "shipother1"
ArrayFields(5) = "shipother2"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductbaseprice")
Headnames(3)="Extra Cost"
Headnames(4) = "Min Weight"
Headnames(5) = "Max Weight"

addshippingcountry
case else
howmanyfields = 2

Redim ArrayFields(howmanyfields)
ArrayFields(0) = "shipmethodid"
ArrayFields(1) = "shipmethod"
ArrayFields(2) = "smprice"

Redim Headnames(howmanyfields)
Headnames(0)="ID"
Headnames(1)=getlang("langshippingmethod")
Headnames(2)=getlang("langproductprice")
end select
end sub


Sub GetSpecialFunction
specialfunction=Request("Specialfunction")
if specialfunction="" then
specialfunction=GetSess("specialfunction")
If Specialfunction="" then
specialfunction=getlang("langCommonDelete")
setsess("specialfunction"),specialfunction
end if
else
If ucase(Specialfunction)="NULL" then
SpecialFunction=""
end if
end if
SetSess "specialfunction",specialfunction
end sub
Sub ProcessSpecialRequests
if Request("All") <> "" then
SEtSess "Allrecords","Yes"
ProcessSpecialFunction
else
SetSess "AllRecords",""
end if
If Request("Selected")<>"" then
ProcessSpecialFunction
end if
end sub
Sub ProcessSpecialfunction
dim deletename
deletename=getlang("langcommonDelete") & "User"
SpecialFunction=ucase(Request("SpecialFunction"))
If SpecialFunction=ucase(getlang("langCommonDelete")) Then
For each item in Request(Deletename)
DeleteRecord Item
Next
exit sub
End if
end sub

sub addshippingcountry
If Getconfig("xshippingbycountry")="Yes" then
howmanyfields = howmanyfields + 1

Redim Preserve ArrayFields(howmanyfields)
Redim Preserve Headnames(howmanyfields)

ArrayFields(howmanyfields) = "shipcountry"
Headnames(howmanyfields) = getlang("langcustcountry")
end if
end sub


Sub Handlexshippingcalc (fieldname, mydefault)
dim shippingmethods,shipping(20),shippingcount
shippingmethods=getconfig("xshippingmethods")
if shippingmethods="" then
shippingmethods="lookup,pricerange,pricepercent,product,fixed,message,weight,weightrange,quantity,quantityrange"
end if
parserecord shippingmethods,shipping,shippingcount,","
GenerateSelectNV shipping,mydefault,fieldname, shippingcount,""
end sub

Sub ConfigUpdateRecord
dim fieldname, fieldvalue, sql

shopopendatabase dbc
fieldname = "xshippingcalc"
fieldvalue = request("xshippingcalc")

If fieldvalue="" then
fieldvalue="NULL"
else
Fieldvalue=replace(fieldvalue,"''","''")
fieldvalue="''" & fieldvalue & "''"
end if

sql="update " & xconfigtable & " set fieldvalue=" & fieldvalue
sql=sql & " where fieldname=''" & fieldname & "''"

dbc.execute(sql)
Shopclosedatabase dbc

If getconfig("xautoloadconfiguration")="Yes" then
application("init" & "_" & xshopid)=""
LoadApplicationVariables
end if
end sub

Sub ChangeShippingForm%>
<form action=''shopa_editshipping.asp'' method=''post'' name=''changeship'' id=''changeship''>
<strong>Change Shipping Calculation: </strong><%Handlexshippingcalc "xshippingcalc", getconfig("xshippingcalc")%>
<input type="submit" value="Change" name="changeship">
</form>
<%End Sub
%>

www.thecpswarehouse.co.za
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - October 28 2013 :  09:26:20  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi cps,

I would like to see the settings on the yourdomain/shopa/shopa_editshipping.asp page and not the code.

This page shows parameters like:

Shipping Method
Base Price
Minimum Price
Maximum Price

Kind regards,

Erik
www.aquathermia.com
Go to Top of Page

cps
VP-CART New User

South Africa
69 Posts

Posted - October 31 2013 :  02:11:06  Show Profile  Visit cps's Homepage  Reply with Quote
Sorry, I''m really confused - where do I find this in the VP-ASP control panel?

www.thecpswarehouse.co.za
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - October 31 2013 :  08:07:37  Show Profile  Reply with Quote
Hi,

if you click on the Tab - Advanced Settings. On the down menu you should see ''Shipping & Handling'' Click on that and then if possible, post a screen shot so that we can see the actual shipping records.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

cps
VP-CART New User

South Africa
69 Posts

Posted - November 04 2013 :  04:36:07  Show Profile  Visit cps's Homepage  Reply with Quote
Good day,

Please see the screenshots below:

http://www.thecpswarehouse.co.za/images/shipping1.jpg
http://www.thecpswarehouse.co.za/images/delivery.jpg
http://www.thecpswarehouse.co.za/images/collection.jpg

www.thecpswarehouse.co.za
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - November 08 2013 :  04:28:42  Show Profile  Reply with Quote
Hi cps,

the images are not loading.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - November 10 2013 :  18:04:35  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi cps,

When selecting "pricepercent" shipping, the shipping cost will be calculated with the xfixedshippingcost setting regardless the selected shipping method on the customer form. Whether your client selects "Delivery" or "Collection", the calculated shipping cost will be the same.

I think it would be better for you to opt for "pricerange" shipping cost calculation. In that case, you can set a free shipping option: set for "Collection" Base Price, Minimum Price and Maximum Price to 0. For "Delivery", however, choose convenient values.

I hope this information will help you any further.

Kind regards,

Erik
www.aquathermia.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00