This page will list all known bugs a fix if available. Please refer back to this page if you have any issues before posting in the helpdesk.
Please make backups of your files before applying any of the following updates.
Many of the following fixes are most likely aleady installed in your package. Please check the date of your version in shop$version.asp and compare against the fixes date below.
Dates earlier than your version will have fixes up to date applied and can be ignored..
Issue #
Date
Issue
Finename
Resolved
1.
12/10/2009
Admin : Directory & Uploaded Image URL populated wrongly if VPASP installed at Root folder
admin/uploadsub.asp & admin/shopa_uploadpop.asp
Yes
2.
12/10/2009, 12/22/2009
There is displaying at front pages
shoptranslate.asp
Yes
3.
12/10/2009
Each item unit price and total price do not showing at cart
shopformatorder.asp
Yes
4.
12/11/2009
Shipping method may bypass to the payment page
shopcustomer.asp
Yes
5.
12/11/2009
Blogs, News, Content tables not created with MS SQL 2000
Database
Yes
6.
12/11/2009
Installation / Upgrade Wizard : Setup successfully but Cart do not setup properly
Packages
Yes
7.
12/11/2009
While using Australia Pos Module to checkout, there is the error at shopcustomer.asp
shopcustomer.asp
Yes
8.
12/11/2009
Multiple images does not swapped at product extended page.
shopimageswatches.asp
Yes
9.
12/12/2009
Broken link at customer service area for UPS Tracking.
When adding a news review with mysql, there are empty record.
shopmysqlsubs.asp
Yes
23.
12/16/2009
The installation not able to check with SQL Server Native connection.
Package
Yes
24.
12/16/2009
Duplicate Sub-categories while using Fly-out / Drop down at Side Categories.
shopproductsubs.asp
Yes
25.
12/17/2009
Side categories not able to be translated while using other languages with non-style categories.
shopproductsubs.asp
Yes
26.
12/17/2009
Show warnings at shopcustcontact.asp while using SSL.
shopcustcontact.asp
Yes
27.
12/19/2009
UPS Real Time does not work if shipping to UK.
upsxmlrealinterface.asp
Yes
28.
12/19/2009
Ajax shipping should get from ship country, but not billing country.
shopajaxshippingzipcodecountry.asp
Yes
29.
12/19/2009
The Blog / News detail page broken while using templates default-3cols (3 columns templates)
shopcms.asp, shopproductsubs.asp
Yes
30.
12/19/2009
While deleting Category at Page Manager editing page, it will redirect me to Error - "Unauthorize Admin"
admin\shopa_removenewscategory.asp
Yes
31.
12/21/2009
If sub-product inventory display type set to Quantity, it is still displaying main product's Quantity. If sub-product inventory display type set to Table, it is still displaying main product's Order Button.
Top minicart is not updated after click order button at shopdisplayproducts.asp, if Xproductstayonpage set to Yes.
shopaddtocart.asp
Yes
63.
01/08/2010
When xproductstayonpage is set to Yes and order now is click on shopdisplayproducts.asp all products then show up instead of just the category you were on.
Front page affliate Rep Report - List all Reps errors.
admin/admin$db.asp, shop$db.asp
Yes
80.
01/15/2010
Missing images at front page affliate link reports - orders & summary.
Packages
Yes
81.
01/15/2010
Front page affliate link reports - orders & summary: affliate # link to admin wrongly.
shopaffreportsubs.asp
Yes
82.
01/17/2010
Product tabs does not working at product extended page while xprocatdisplay is enabled and retriving values from ProProCatDisplayCategoryID (products table) and CatProCatDisplayCategoryID (categories table).
shopprocat.asp
Yes
83.
01/17/2010
Errors while generating Google Site Map & Google Product Feed with the packages dated 2010.01.11 or later.
SEO Tool Module
Yes
84.
01/18/2010
If checkout with paypal & xallowinvalidcards set to No, vpasp generate the Variable is undefined error.
shopvalidatecreditcards.asp
Yes
85.
01/18/2010
Results of page 2 onwards are displaying wrongly with the packages dated 2010.01.12 later.
admin/admin$db.asp, shop$db.asp
Yes
86.
01/18/2010
Ajax does not running after click "Add Category" at "Edit Product Page" and main category is empty.
admin/shopa_addproduct.asp
Yes
87.
01/18/2010
"Edit Product Page" - If products.ccategory = 0, vpasp not able to update products.ccategory after click "Add Category" and "Delete Category".
admin/shopa_procategory.asp
Yes
88.
01/19/2010
"Add Record" to customer at admin control panel, the layout is broken.
admin/shopa_editrecord.asp
Yes
89.
01/19/2010
"Add Record" to customer at admin control panel not able to be updated.
shopcustgrpsubs.asp
Yes
90.
01/19/2010
If set xlogonrequired to Yes, customers not able to login to the shopping cart.
shop$db.asp
Yes
92.
01/20/2010
Breadcrumb is displaying wronlgy if SEO dynamic enabled and clicking directly from "Featured Products", "Top Sellers"
shopexd.asp
Yes
93.
01/20/2010
Generate Google Site Map produce incorrect xml file while using special charasters with SEO Dynamic.
admin/shopgooglesitemapscreate.asp
Yes
94.
01/20/2010
Layout Manager: Edit content box is not working if content with special charaters.
Not able to save ' (appostrophe ) at feature edit page.
admin/shopa_featureedit.asp
Yes
103.
01/26/2010
Contents with html table displaying incorrectly (extra spaces) at shopcontent.asp.
shopfileio.asp
Yes
104.
01/26/2010
"Template not found" at front page, or admin login page produce scripts error if admin folder name has the same name with the 2nd level sub-folder name onwards.
if getsess("CartCount") > 0 then
htmlwrite shopformatcurrency(getsess("OrderTotal"),GetConfig("xdecimalpoint"))
else
if GetSess("Newcurrencysymbol")<>"" then
htmlwrite GetSess("Newcurrencysymbol") & "0.00"
elseif GetConfig("XCurrencySymbol") <> "" then
htmlwrite GetConfig("XCurrencySymbol") & "0.00"
else
htmlwrite "$" & "0.00"
end if
end if
Locate around line 1351: within routine sub getminicartsectionhtml
if getsess("CartCount") > 0 then
htmlwrite shopformatcurrency(getsess("OrderTotal"),GetConfig("xdecimalpoint")) & "</span>"
else
if GetSess("Newcurrencysymbol")<>"" then
htmlwrite GetSess("Newcurrencysymbol") & "0.00" & "</span>"
elseif GetConfig("XCurrencySymbol") <> "" then
htmlwrite GetConfig("XCurrencySymbol") & "0.00" & "</span>"
else
htmlwrite "$" & "0.00" & "</span>"
end if
end if
Save and test.
14. shoprandomproducts.asp
Locate around line 201: within routine sub GenerateFrontpagesql
Locate around line 498: within routine sub generatesublinks
Above
plink = plink & "<ul class=""menulist"">"
Add
plink=""
Save and test.
25. shopproductsubs.asp
Locate around line 386: within routine sub NavigateShowCategories
Modify
name = TranslateLanguage(dbc, "categories", "catedescription", "categoryid", cid, name)
to
name = TranslateLanguage(dbc, "categories", "catdescription", "categoryid", cid, name)
Save and test.
26. shopcustcontact.asp
Locate around line 16: Below of the main comments.
Add
if lcase(request.ServerVariables("HTTPS")) = "on" then
response.Redirect "http://"& request.ServerVariables("HTTP_HOST") & xmysite2 &"/shopcustcontact.asp"
end if
Save and test.
27. upsxmlrealinterface.asp
Locate around line 327: within routine sub createxmlinternational.
Below
dim shiptocountry
Add
shiptocountry = ucase(getsess("SHIPCOUNTRY"))
if shiptocountry = "" then
shiptocountry = ucase(getsess("COUNTRY"))
end if
if shiptocountry = "UK" then
shiptocountry = "GB"
end if
Locate around line 378: within routine sub createxmlinternational.
if shiptocountry = "" then
shiptocountry = getsess("country")
else
setsess "country", shiptocountry
end if
to
if shiptocountry = "" then
shiptocountry = ucase(getsess("SHIPCOUNTRY"))
if shiptocountry = "" then
shiptocountry = ucase(getsess("COUNTRY"))
end if
else
setsess "shipcountry", shiptocountry
end if
Save and test.
29a. shopcms.asp
Locate around line 930: within routine sub displayblogscommentform
if len(passhelpstring) > 0 then
htmlwrite "<span>"
GenHelpIcon(passhelpstring)
HtmlWrite "</span>"
end if
Save and test.
30. admin\shopa_removenewscategory.asp
Locate around line 12.
Modify
ShopCheckadmin "shopa_addproduct.asp"
to
ShopCheckadmin ""
Save and test.
31a. shopfileio.asp
Locate around line 476: within routine sub ProcessKeyword
Modify
Handle_SpecialCheckbox value,parsearray
to
Handle_SpecialCheckbox value,parsearray,parseRS
Locate around line 497: within routine sub ProcessKeyword
Modify
Add_Quantity "User",parsearray
to
Add_Quantity "User",parsearray,parseRS
Locate around line 505: within routine sub ProcessKeyword
Modify
Add_Button "User",parsearray
to
Add_Button "User",parsearray,parseRS
Locate around line 1160: within routine sub Handle_SpecialOrderButton
Modify
Add_Quantity "",parsearray
to
Add_Quantity "",parsearray,parseRS
Locate around line 1163: within routine sub Handle_SpecialOrderButton
Modify
Add_Quantity "",parsearray
to
Add_Quantity "",parsearray,parseRS
Locate around line 1172: within routine sub Handle_SpecialOrderButton
Modify
Add_Button "",parsearray
to
Add_Button "",parsearray,parseRS
Locate around line 1175: within routine sub Handle_SpecialOrderButton
Modify
Add_Button "",parsearray
to
Add_Button "",parsearray,parseRS
Locate around line 1211: within routine sub Handle_SpecialCheckBox
Modify
sub Handle_SpecialCheckBox (ivalue, parsearray)
to
sub Handle_SpecialCheckBox (ivalue, parsearray, parseRS)
Locate around line 1220: within routine sub Handle_SpecialCheckBox
Modify
Add_Quantity "", parsearray
to
Add_Quantity "",parsearray,parseRS
Locate around line 1222: within routine sub Handle_SpecialCheckBox
Modify
Add_Button "",parsearray
to
Add_Button "",parsearray,parseRS
Locate around line 1249: within routine sub Add_Button
Modify
sub Add_Button (ivalue, parsearray)
to
sub Add_Button (ivalue, parsearray, parseRS)
Locate around line 1260: within routine sub Add_Button
Above
dim mytext, mybutton, tableflag
Add
dim inventorycheck, pricedisplay, quantitydisplay, addflag
Checkinventoryproducts ivalue,parsearray,parseRS, inventorycheck, pricedisplay, quantitydisplay, inventoryoutofstock
addflag = false
if inventorycheck = true then
If pricedisplay = false then
addflag = false
else
addflag = true
end if
else
addflag = true
end if
if addflag then
Locate around line 1333: within routine sub Add_Button
Above
end sub
Add
end if
Locate around line 1336: within routine sub Add_Quantity
Modify
sub Add_Quantity (ivalue, parsearray)
to
sub Add_Quantity (ivalue, parsearray, parseRS)
Locate around line 1347: within routine sub Add_Quantity
Above
dim strminimumquantity, rc, tableflag, fieldtype
Add
dim inventorycheck, pricedisplay, quantitydisplay,addflag
Checkinventoryproducts ivalue,parsearray,parseRS, inventorycheck, pricedisplay, quantitydisplay, inventoryoutofstock
addflag = false
If inventorycheck=false then
addflag = true
else
If quantitydisplay=true then
addflag = true
end if
end if
if addflag = true then
Locate around line 1361: within routine sub Add_Quantity
Below
if rc> 0 then exit sub
Add
htmlwrite ""
Locate around line 1381: within routine sub Add_Quantity
Above
end sub
Add
end if
Locate around line 1914: within routine sub Handle_Inventoryproducts
Modify
FormatInventoryproducts dbc, parseRS
to
dim inventorycheck, pricedisplay, quantitydisplay
Checkinventoryproducts ivalue,parsearray,parseRS, inventorycheck, pricedisplay, quantitydisplay, inventoryoutofstock
If inventorycheck=true then
FormatInventoryproducts dbc, parseRS
end if
Save and test.
31b. shopproductinventory.asp
Locate around line 392: within routine sub FormatInventoryQuantity
Right click mycompany table, then choose Design View
Locate faxnumber field
Set Allow Zero Length to Yes
Save and test.
39. shop$db.asp
Locate around line 3573: within routine sub generatebaseurl
Replace sub generatebaseurl to
sub generatebaseurl
if lcase(request.ServerVariables("HTTPS")) = "on" then
if xssl <> "" then
htmlwrite "<base href="""& xssl &"/"" />"
else
if xmysite <> "" then
htmlwrite "<base href="""& xmysite &"/"" />"
else
htmlwrite "<base href=""https://"& request.ServerVariables("HTTP_HOST") & xmysite2 &"/"" />"
end if
end if
else
if xmysite <> "" then
htmlwrite "<base href="""& xmysite &"/"" />"
else
htmlwrite "<base href=""http://"& request.ServerVariables("HTTP_HOST") & xmysite2 &"/"" />"
end if
end if
end sub
Save and test.
40. MsSQL Database
Open MsSQL Database
Locate blogsreviews table
Change comment field type to TEXT type
Locate newsreviews table
Change comment field type to TEXT type
Save and test.
41. shopfileio.asp
Locate around line 360: within routine sub Substitute
Modify
workrecord = Newrecord
to
workrecord = replace(Newrecord,vbcrlf,"<br />")
Save and test.
42a. shopproductsubs.asp
Locate around line 2398: within routine sub NavigateFeaturedProducts
Modify
'strsql = "select *, p.cstock AS sumofnumitems from products p, prodcategories cc, categories c where "
'strsql = strsql & " cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid and "
to
strsql = "select distinct p.catalogid,p.featuredflagorder, p.cstock AS sumofnumitems from products p, prodcategories cc, categories c where "
strsql = strsql & " cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid and "
Locate around line 2400: within routine sub NavigateFeaturedProducts
Remove
strsql = "select *, p.cstock AS sumofnumitems from products p, categories c where "
strsql = strsql & " p.ccategory=c.categoryid and "
Save and test.
42b. shopnewproductsub.asp
Locate around line 76: within routine sub Generatesqlnewproducts
Modify
'sql = "select * from products p, prodcategories cc, categories c " & wherestr
'sql = sql & " and cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid "
to
sql = "select distinct p.catalogid from products p, prodcategories cc, categories c " & wherestr
sql = sql & " and cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid "
Locate around line 78: within routine sub Generatesqlnewproducts
Remove
sql = "select * from products p, categories c " & wherestr
sql = sql & " and c.categoryid=p.ccategory "
Save and test.
42c. shoprandomproducts.asp
Locate around line 174: within routine sub GenerateFrontpagesql
Modify
'sql = "select * from products p, prodcategories cc, categories c " & wherestr
'sql = sql & " and cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid "
to
sql = "select distinct p.catalogid from products p, prodcategories cc, categories c " & wherestr
sql = sql & " and cc.intCatalogId=p.CatalogId and cc.intcategoryid=c.categoryid "
Locate around line 176: within routine sub GenerateFrontpagesql
Remove
sql = "select * from products p, categories c " & wherestr
sql = sql & " and c.categoryid=p.ccategory "
Save and test.
43. admin/shopa_generateseodynamicsubs.asp
Locate around line 10.
Below
dim createdirname
Add
dim directorylength
directorylength = 200
Locate around line 211: within routine sub generateseodynamiccategories
Locate around line 780: within function GetMaxPages
Replace Whole function GetMaxPages
to
function GetMaxPages (mysql,mypagesize)
if len(mysql) <= 0 then
GetMaxPages = 1
exit function
end if
dim mysql3,countrs,countpos,frompos,counttotal,maxpage,frompos2
dim tempsql
tempsql = mysql
frompos = instr(lcase(tempsql),"order by ")
if frompos > 0 then
tempsql = mid(tempsql,1,frompos - 1)
end if
tempsql = replace(tempsql,";","")
mysql3 = "select count(*) as reccnt from ("& tempsql &") as t "
Set countrs = Server.CreateObject("ADODB.Recordset")
countrs.open mysql3, dbc, adOpenDynamic, adLockOptimistic
if not countrs.eof then
counttotal = countrs("reccnt")
end if
if clng(counttotal) mod clng(mypagesize) = 0 then
maxpage = int(clng(counttotal) / clng(mypagesize))
else
maxpage = int(clng(counttotal) / clng(mypagesize)) + 1
end if
if maxpage <= 0 then maxpage = 1
GetMaxPages = maxpage
end function
Save and test.
50b. admin/admin$db.asp
Locate around line 752: within function GetMaxPages
Replace Whole function GetMaxPages
to
function GetMaxPages (mysql,mypagesize)
if len(mysql) <= 0 then
GetMaxPages = 1
exit function
end if
dim mysql3,countrs,countpos,frompos,counttotal,maxpage,frompos2
dim tempsql
tempsql = mysql
frompos = instr(lcase(tempsql),"order by ")
if frompos > 0 then
tempsql = mid(tempsql,1,frompos - 1)
end if
tempsql = replace(tempsql,";","")
mysql3 = "select count(*) as reccnt from ("& tempsql &") as t "
Set countrs = Server.CreateObject("ADODB.Recordset")
countrs.open mysql3, dbc, adOpenDynamic, adLockOptimistic
if not countrs.eof then
counttotal = countrs("reccnt")
end if
if clng(counttotal) mod clng(mypagesize) = 0 then
maxpage = int(clng(counttotal) / clng(mypagesize))
else
maxpage = int(clng(counttotal) / clng(mypagesize)) + 1
end if
if maxpage <= 0 then maxpage = 1
GetMaxPages = maxpage
end function
Save and test.
51. admin/shopa_generateseodynamicsubs.asp
Locate around line 286: within routine sub generateseodynamiccategoryhassub
if trim(hassubflag) = "Yes" then
strRedirectTemplate1 = Server.MapPath("seotemplates/products-categoryid-hassub.asp")
else
strRedirectTemplate1 = Server.MapPath("seotemplates/products-categoryid.asp")
end if
Save and test.
54. admin/shopa_googleproductfeed.asp
Locate around line 267: within routine sub getheadertitle
Modify
if (tconfig_eanfieldname<>"" and IsNull(tconfig_eanfieldname)=false) then
to
if (gpfeanfieldname<>"" and IsNull(gpfeanfieldname)=false) then
Save and test.
55a. shop$db.asp
Locate around line 789: within routine function GetMaxPages
Modify
frompos = instr(mysql3,"order by ")
to
frompos = instr(lcase(mysql3),"order by ")
Save and test.
55b. admin/admin$db.asp
Locate around line 761: within routine function GetMaxPages
Modify
frompos = instr(mysql3,"order by ")
to
frompos = instr(lcase(mysql3),"order by ")
Save and test.
56a. admin/shopa_generateseodynamicsubs.asp
Locate around line 1345: within routine Public Function FMTString2UrlDir
Locate around line 208: within routine sub AddImage
Modify
dim mylink
if getconfig("xSEODynamicEnable") = "Yes" then
genseocategoryproductlink mylink,id,iname,iname,"","No"
to
dim mylink
dim tempname
tempname = Iname
if getconfig("xSEODynamicEnable") = "Yes" then
genseocategoryproductlink mylink,id,tempname,tempname,"","No"
Save and test.
57b. shopdisplayproducts.asp
Locate around line 115: within routine sub ProcessFirst
Modify
getseocat_name CATEGORY,CAT_ID
to
getseocat_name CATEGORY
Save and test.
57c. shopseosubs.asp
Locate around line 73: within routine sub getseocat_name
Modify
sub getseocat_name (CATEGORY)
if getconfig("xSEODynamicEnable") <> "Yes" then exit sub
dim tempstr
tempstr = CATEGORY
if tempstr = "" then
if getsess("seocategoryname") <> "" then
tempstr = getsess("seocategoryname")
end if
end if
setsess "seocategoryname",""
CATEGORY = tempstr
end sub
to
sub getseocat_name (CATEGORY, cat_id)
if getconfig("xSEODynamicEnable") <> "Yes" then exit sub
dim tempstr
tempstr = getseocategoryname(cat_id)
setsess "seocategoryname",""
CATEGORY = tempstr
end sub
SetSess "convertBackBackpage",GetSess("convertBackpage")
if instr(GetSess("convertCurrentpage"),"shoptellfriendpro.asp") = 0 and instr(GetSess("convertCurrentpage"),"shopreviewspro.asp") = 0 and instr(GetSess("convertCurrentpage"),"shopajaxshippingzipcodecountry.asp") = 0 then
SetSess "convertBackpage",GetSess("convertCurrentpage")
end if
Save and test.
59. shopproductfeaturesgenerate.asp
Locate around line 405, within routine sub GenerateSelectList.
Below
images = ""
Add
sSelect = ""
Locate around line 408, within routine sub GenerateSelectList.
Modify
if not isnull(strfeatureOther) then
to
if not isnull(strfeatureOther) and strfeatureOther <> "" then
Save and test.
60. shopdisplaycategories.asp
Locate around line 131, within routine sub FormatCategoryTemplate.
Locate around line 167: within routine sub GenerateFrontpagesql
Replace whole sub GenerateFrontpagesql
to
sub GenerateFrontpagesql (selectfield, selectvalue, sql,procategorylist)
dim wherestr, sortstr
sortstr=getconfig("xsortproducts")
wherestr="where hide=0"
If selectfield<>"" and selectvalue<>"" then
wherestr=wherestr & " and " & selectfield & "='" & selectvalue & "'"
end if
sql="select * from products " & wherestr
If getconfig("xselectproductsbylanguage")="Yes" and getsess("language")<>"" then
sql=sql & " and (clanguage='" & getsess("language") & "'"
sql=sql & " or clanguage is null)"
end if
'inventory
sql = sql & " AND (highercatalogid is null)"
'VP-ASP 6.5.1 - stock control
if getconfig("xstocklow")<>"" then
lngcstock= clng(getconfig("xstocklow"))
sql = sql & " and cstock> " & lngcstock
end if
'700 - Customer Groups - Matching Custormer match
sql = sql & GenerateCustomerMatchSQL ("customermatch","excustomermatch","loggedin","and")
'700 - home page manager - random products
if len(procategorylist) > 0 then
sql = sql & " AND (ccategory in ("& procategorylist &"))"
end if
If sortstr<>"" then
sql=sql & " order by " & sortstr
end if
If getconfig("xdebug")="Yes" then
debugwrite sql
end if
end sub
Save and test.
67a. shopcms.asp
Locate around line 1050: within routine sub Handle_BlogsLink
Modify
response.write mylink
to
value = mylink
Save and test.
67b. templates\yourtemplate\tmp_blogs.htm
Locate around line 6.
Modify
<!-- The following link must be remain in this format : start -->
<a href="
[formatblogslink]
">
<!-- end -->
[formatdate cdateadded]
-
[translate headline]
</a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
[add_websesslink]">
<!-- end -->
<img src="[cimageurl]" border="0" alt="[translate cname]" /></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
[add_websesslink]" class="btn-details">
<!-- end -->
[GetLang langproductextendeddescription]</a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
[add_websesslink]">
<!-- end -->
<img src="[cimageurl]" border="0" alt="[translate cname]" /></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
[add_websesslink]" class="btn-details">
<!-- end -->
[GetLang langproductextendeddescription]</a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img border="0" src="[extendedimage]"></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a></td->
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
click to see more</a></strong></p></td>
to
<a href="[formatshopexdlink][add_websesslink]">click to see more</a>
</strong></p></td>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
click to see more</a></strong></p></td>
to
<a href="[formatshopexdlink][add_websesslink]">click to see more</a>
</strong></p></td>
Save and test.
67p. templates\yourtemplate\tmp_proexddisplay.htm
Locate around line 18.
Modify
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
click to see more</a></strong></p>
to
<a href="[formatshopexdlink][add_websesslink]">click to see more</a>
</strong></p>
Save and test.
67r. templates\yourtemplate\tmp_proexdprocat.htm
Locate around line 19.
Modify
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
<img src="[cimageurl]" width='60' height='60' border='0'></a>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
click to see more</a></strong></p></td>
to
<a href="[formatshopexdlink][add_websesslink]">click to see more</a>
</strong></p></td>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
">
<!-- end -->
click to see more</a></strong></p></td>
to
<a href="[formatshopexdlink][add_websesslink]">click to see more</a>
</strong></p></td>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
[add_websesslink]">
<!-- end -->
<img border='0' src='[cimageurl]' alt='[cname]' /></a></td>
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
[add_websesslink]">
<!-- end -->
click to see more</a></strong></p></td>
to
<a href="[formatshopexdlink][add_websesslink]">click to see more</a></strong></p>
</td>
Save and test.
67w. templates\yourtemplate\tmp_topsellers.htm
Locate around line 4.
Modify
<!-- The following link must be remain in this format : start -->
<a href="
[formatshopexdlink]
" class="image">
<!-- end -->
Locate around line 789: within function GetMaxPages
Modify
frompos = instr(mysql,"from ")
mysql3 = "select count(*) as reccnt " & mid(mysql,frompos,len(mysql) - frompos + 1)
frompos = instr(lcase(mysql3),"order by ")
if frompos > 0 then
mysql3 = mid(mysql3,1,frompos - 1)
end if
to
frompos = instr(lcase(mysql),"order by ")
if frompos > 0 then
mysql = mid(mysql,1,frompos - 1)
end if
mysql = replace(mysql,";","")
mysql3 = "select count(*) as reccnt from ("& mysql &") as t "
Save and test.
70b. admin/admin$db.asp
Locate around line 759: within function GetMaxPages
Modify
frompos = instr(mysql,"from ")
mysql3 = "select count(*) as reccnt " & mid(mysql,frompos,len(mysql) - frompos + 1)
frompos = instr(lcase(mysql3),"order by ")
if frompos > 0 then
mysql3 = mid(mysql3,1,frompos - 1)
end if
to
frompos = instr(lcase(mysql),"order by ")
if frompos > 0 then
mysql = mid(mysql,1,frompos - 1)
end if
mysql = replace(mysql,";","")
mysql3 = "select count(*) as reccnt from ("& mysql &") as t "
Save and test.
71. admin/shopa_editdisplay.asp
Locate around line 305: within sub GenerateSQLEditDisplay
Modify
if trim(ucase(request("Selectioncritereontext"))) <> trim(ucase(session("sqlquery"))) then
to
if instr(trim(ucase(request("Selectioncritereontext"))),trim(ucase(session("sqlquery")))) <= 0 then
Save and test.
72a. shop$db.asp
Locate around line 1515: within sub CheckValidLogin
Above
if GetConfig("xshopclosed")="Yes" then
Add
if InStr(1,Request.ServerVariables("SCRIPT_NAME"),"shoperror.asp",1) Then
exit sub
end if
Save and test.
72b. admin/admin$db.asp
Locate around line 1444: within sub CheckValidLogin
Above
if GetConfig("xshopclosed")="Yes" then
Add
if InStr(1,Request.ServerVariables("SCRIPT_NAME"),"shoperror.asp",1) Then
exit sub
end if
Save and test.
73. shopproductformat.asp
Locate around line 383: within sub GenerateImage
Below
if GetConfig("XextendedPopup") = "Yes" then
Add
%>
<script language="JavaScript" type='text/javascript'>
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'width=550,height=400,menubar=no,toolbar=no,location=no,status=no,directories=no,copyhistory=no,resizable=yes,scrollbars=yes');");
}
// End -->
</script>
<%
Locate around line 459: within sub GenerateNoImage
Below
if GetConfig("XextendedPopup") = "Yes" then
Add
%>
<script language="JavaScript" type='text/javascript'>
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'width=550,height=400,menubar=no,toolbar=no,location=no,status=no,directories=no,copyhistory=no,resizable=yes,scrollbars=yes');");
}
// End -->
</script>
<%
Locate around line 1431: within sub CheckValidLogin
Remove
if GetConfig("xlogonrequired")="Yes" then
if GetSess("Login")="" then
if instr(lcase(request.ServerVariables("SCRIPT_NAME")),"shoploginforce.asp") <= 0 then
if instr(lcase(request.ServerVariables("SCRIPT_NAME")),"shopcontent.asp") <= 0 then
if instr(lcase(request.ServerVariables("SCRIPT_NAME")),"shopblogs") <= 0 then
if instr(lcase(request.ServerVariables("SCRIPT_NAME")),"shopnews") <= 0 then
SetSess "CurrentURL", "shoploginforce.asp"
ResponseRedirect getactualfileslocation(request.ServerVariables("SCRIPT_NAME"), "shoploginforce.asp", "", "", "no")
end if
end if
end if
end if
end if
end if
Save and test.
75a. admin/admin$db.asp
Locate around line 17.
Above
session.codepage=1252
Add
setsess "inadminflag","Yes"
Save and test.
75b. shopupsincludes.asp
Locate around line 1.
Remove
<!--#include file="shophash.asp"-->
Locate around line 8.
Above
const upshashkey = "oiYhaTdaDa"
Add
if getsess("inadminflag") <> "Yes" then
%>
<!-- #include file="shophash.asp"-->
<%
end if
setsess "inadminflag",""
Save and test.
75c. shopformatorder.asp
Locate around line 1.
Remove
<!--#include file="shophash.asp"-->
Locate around line 10.
Above
const xDisplayorderfields=""
Add
if getsess("inadminflag") <> "Yes" then
%>
<!-- #include file="shophash.asp"-->
<%
end if
setsess "inadminflag",""
Save and test.
76. shopnewproductsub.asp
Locate around line 76: within routine sub Generatesqlnewproducts.
Modify
sql = "select distinct p.catalogid from products p, prodcategories cc, categories c " & wherestr
to
sql = "select distinct p.catalogid,p.cdateadded from products p, prodcategories cc, categories c " & wherestr
Locate around line 109: within routine sub Generatesqlnewproducts.
Above
end sub
Add
dim rs,plist
plist = ""
set rs = Server.createobject("ADODB.Recordset")
rs.open sql, dbc, 3, 3
do while not rs.eof
plist = plist & rs("catalogid") & ","
rs.movenext
loop
closerecordset rs
if plist = "" then
sql = ""
exit sub
end if
plist = mid(plist,1,len(plist)-1)
sql = "select * from products p where p.CatalogId In (" & plist & ")"
if sortstr<>"" then
sql = sql & " order by " & sortstr
end if
Save and test.
77. admin/shopa_featureedit.asp
Locate around line 791: within routine sub WriteFeatureRow.
Modify
if featurerequired = true then
to
if featurerequired = true or featurerequired = 1 then
Save and test.
78a. admin/shopa_featureedit.asp
Locate around line 1079: within routine sub FeaturesProducts.
Modify
sql = "select catalogid,cname from products where concat(',',features,',') like concat (',' ,'%"& strfeatures &"%',',') limit 20"
to
sql = "select catalogid,cname from products where CONCAT(',',features,',') like '%,"& strfeatures &",%' limit 20"
Save and continue to 78b.
78b. admin/shopa_displayrelfeatureprod.asp
Locate around line 76: within routine sub GenerateSQLEditDisplayProdFeatures.
Modify
MySql = "select catalogid,cname from products where concat(',',features,',') like concat (',' ,'%"& strfeatures &"%',',')"
to
MySql = "select catalogid,cname from products where concat(',',features,',') like '%,"& strfeatures &",%'"
Save and test.
79a. shop$db.asp
Locate around line 793: within function GetMaxPages
Above
mysql3 = "select count(*) as reccnt from ("& mysql &") as t "
Add
mysql = replace(mysql,";","")
Save and test.
79b. admin/admin$db.asp
Locate around line 764: within function GetMaxPages
Above
mysql3 = "select count(*) as reccnt from ("& mysql &") as t "
Add
mysql = replace(mysql,";","")
Save and test.
80. Packages
Download latest packages from www.vpasp.com
Copy all the images in /images/admin/ folder to your CartRoot/images/admin/
if getsess("shopadmin") <> "" then
fieldvalue="<a href=" & my_link &">" & rs("affid") & "</a>"
else
fieldvalue=rs("affid")
end if
Save and test.
82. shopprocat.asp
Locate around line 33: within sub Handle_procatdisplay
Modify
if trim(strProProCatDisplayCategoryID)>0 then
to
if trim(len(strProProCatDisplayCategoryID))>0 then
Locate around line 51: within sub Handle_procatdisplay
Modify
if trim(strCatProCatDisplayCategoryID)>0 then
to
if trim(len(strCatProCatDisplayCategoryID))>0 then
Save and test.
83. SEO Tool Module
Download SEO Tool Module (vpasp700seotools.zip) from vpasp.com.
Replace the files to your site.
Save and test.
84. shopvalidatecreditcards.asp
Locate around line 113: within function trimtodigits
Below
function trimtodigits(tstring)
Add
dim s,ts,x,ch
Save and test.
85a. shop$db.asp
Locate around line 780: within function GetMaxPages
Replace Whole function GetMaxPages
to
function GetMaxPages (mysql,mypagesize)
if len(mysql) <= 0 then
GetMaxPages = 1
exit function
end if
dim mysql3,countrs,countpos,frompos,counttotal,maxpage,frompos2
dim tempsql
tempsql = mysql
frompos = instr(lcase(tempsql),"order by ")
if frompos > 0 then
tempsql = mid(tempsql,1,frompos - 1)
end if
tempsql = replace(tempsql,";","")
mysql3 = "select count(*) as reccnt from ("& tempsql &") as t "
Set countrs = Server.CreateObject("ADODB.Recordset")
countrs.open mysql3, dbc, adOpenDynamic, adLockOptimistic
if not countrs.eof then
counttotal = countrs("reccnt")
end if
if clng(counttotal) mod clng(mypagesize) = 0 then
maxpage = int(clng(counttotal) / clng(mypagesize))
else
maxpage = int(clng(counttotal) / clng(mypagesize)) + 1
end if
if maxpage <= 0 then maxpage = 1
GetMaxPages = maxpage
end function
Save and test.
85b. admin/admin$db.asp
Locate around line 752: within function GetMaxPages
Replace Whole function GetMaxPages
to
function GetMaxPages (mysql,mypagesize)
if len(mysql) <= 0 then
GetMaxPages = 1
exit function
end if
dim mysql3,countrs,countpos,frompos,counttotal,maxpage,frompos2
dim tempsql
tempsql = mysql
frompos = instr(lcase(tempsql),"order by ")
if frompos > 0 then
tempsql = mid(tempsql,1,frompos - 1)
end if
tempsql = replace(tempsql,";","")
mysql3 = "select count(*) as reccnt from ("& tempsql &") as t "
Set countrs = Server.CreateObject("ADODB.Recordset")
countrs.open mysql3, dbc, adOpenDynamic, adLockOptimistic
if not countrs.eof then
counttotal = countrs("reccnt")
end if
if clng(counttotal) mod clng(mypagesize) = 0 then
maxpage = int(clng(counttotal) / clng(mypagesize))
else
maxpage = int(clng(counttotal) / clng(mypagesize)) + 1
end if
if maxpage <= 0 then maxpage = 1
GetMaxPages = maxpage
end function
Save and test.
86. admin/shopa_addproduct.asp
Locate around line 1776: within sub AddCategories
Below
Displayallcurrentcategories ' display all current categories
Locate around line 82: within sub Updatemaincategory
Modify
sql = "select * from prodcategories where intcategoryid=" & lngccategory & " and intCatalogId=" & CatalogId
'set rs = dbc.execute(sql)
to
if lngccategory <> 0 then
sql = "select * from prodcategories where intcategoryid=" & lngccategory & " and intCatalogId=" & CatalogId
else
sql = "select * from prodcategories where intCatalogId=" & CatalogId & " and intcategoryid > 0 order by id asc"
end if
Locate around line 89: within sub Updatemaincategory
Modify
if not rs.eof then
found = true
else
found = false
end if
to
if not rs.eof then
found = true
if lngccategory = 0 then
lngccategory = rs("intcategoryid")
end if
else
found = false
if lngccategory = 0 then
lngccategory = categoryid
end if
end if
Locate around line 217: within sub Performdeletecategory
Modify
sql = "SELECT TOP 1 intcategoryid from prodcategories WHERE (intCatalogId = " & which & ") AND (NOT intcategoryid = " & categoryid & ") ORDER BY id desc"
to
sql = "SELECT TOP 1 intcategoryid from prodcategories WHERE (intCatalogId = " & which & ") AND (NOT intcategoryid = " & categoryid & ") and intcategoryid > 0 ORDER BY id desc"
Save and test.
88. admin/shopa_editrecord.asp
Locate around line 1615: within sub DisplayForm
Modify
displaycustormergroup contactid
HtmlWrite " "
to
if which<>"" then
displaycustormergroup contactid
HtmlWrite " "
end if
Save and test.
89. shopcustgrpsubs.asp
Locate around line 348: within sub updatecustomergroup
Below
dim sqlrs,strsql
Add
if oldwhich <> "" then
Locate around line 357: within sub updatecustomergroup
Below
closerecordset sqlrs
Add
else
refreshindfromcontact which
end if
Save and test.
90. shop$db.asp
Locate around line 1505: within sub CheckValidLogin
Modify
if GetSess("Login")="" then
to
if GetSess("Login")="" and instr(lcase(request.ServerVariables("SCRIPT_NAME")),"shoplogin.asp") <= 0 then
Save and test.
91. admin/admin$db.asp
Locate around line 3206: within function addHTMLEditor
Modify
<pre id="idTemporary_<%=fieldname%>" name="idTemporary_<%=fieldname%>" style="display:none"><%if textdata > "" then response.write Server.HTMLEncode(textdata)%></pre>
to
<pre id="idTemporary_<%=fieldname%>" name="idTemporary_<%=fieldname%>" style="display:none"><%if textdata > "" then response.write textdata%></pre>
Save and test.
92. shopexd.asp
Locate around line 57
Below
ExdOpenRecordSet tmpRS
Add
'700 - Solve the SEO wrong breadcrumb
if getconfig("xSEODynamicProductsEnable") = "Yes" then
dim bccategoryname
getseocat_name bccategoryname,tmpRS("ccategory")
if trim(bccategoryname) <> "" then
dim breadcrumblink
breadcrumblink = "<a href=""" & GetConfig("xhome") & addwebsesslinkfirst & """>" & GetLang("langcommonhome") & "</a> " & SubCatSeparator & "<a href=""shopDisplayCategories.asp"">" & GetLang("LangCommonCategories") & "</a>"
breadcrumblink = breadcrumblink & subcatseparator & " " & bccategoryname
SetSess "breadcrumb", breadcrumblink
else
SetSess "breadcrumb", ""
end if
end if
Save and test.
93. admin/shopgooglesitemapscreate.asp
Locate around line 419: within sub WriteblogsLocation
Above
mylink = "<loc>" & mysite & "/"& mylink &"</loc>"
Add
mylink = fixspecialcharxml(mylink)
Locate around line 431: within sub WritenewsLocation
Above
mylink = "<loc>" & mysite & "/"& mylink &"</loc>"
Add
mylink = fixspecialcharxml(mylink)
Locate around line 450: within sub WriteCategoryLocation
Above
mylink = "<loc>" & mysite & "/"& mylink &"</loc>"
Add
mylink = fixspecialcharxml(mylink)
Locate around line 472: within sub WriteProductLocation
Above
mylink = "<loc>" & mysite & "/"& mylink &"</loc>"
Add
mylink = fixspecialcharxml(mylink)
Locate last line
Above
%>
Add
'fix xml special char
function fixspecialcharxml (passtr)
if trim(passtr) = "" then
fixspecialcharxml = ""
exit function
end if
dim tempstr
tempstr = passtr
tempstr = replace(tempstr,"&","&")
tempstr = replace(tempstr,"<","<")
tempstr = replace(tempstr,">",">")
tempstr = replace(tempstr,"""",""")
tempstr = replace(tempstr,"'","'")
fixspecialcharxml = tempstr
end function
Save and test.
94a. admin/js/shophomepagemanagerfunctions.js
Locate around line 665: within function savesidebar
if lcase(containername) = "contentpage" then
otheroptions5 = replace(URLDecode(request("otheroptions5")),"&","&")
otheroptions5 = replace(otheroptions5,"%uFFFD","'")
else
otheroptions5 = cleanchars(request("otheroptions5"))
end if
Save and test.
95a. shopupdatecartprices.asp
Locate around line 87: within sub UpdateCartPrices
Above
for i = 1 to scartItem
Add
dim selectlistpos1,selectlistpos2,selectlistvalue
Locate around line 95: within sub UpdateCartPrices
if trim(arrCart(cfeatureotherpricing,i)) <> "" then
if instr(arrCart(cfeatureotherpricing,i),"-selectlistprice=[") > 0 then
selectlistpos1 = instr(arrCart(cfeatureotherpricing,i),"-selectlistprice=[") + len("-selectlistprice=[") - 1
selectlistpos2 = instr(mid(arrCart(cfeatureotherpricing,i),selectlistpos1+1,len(arrCart(cfeatureotherpricing,i)) - selectlistpos1 + 1),"]")
selectlistvalue = mid(arrCart(cfeatureotherpricing,i),selectlistpos1+1,selectlistpos2-1)
else
selectlistvalue = 0
end if
end if
ProductPrice = ProductPrice + getfprice(arrCart(cProductFeatures,i)) + selectlistvalue
Locate around line 129: within function getfprice
Replace function getfprice
to
function getfprice (feaid)
if len(feaid) <= 0 then
getfprice = 0
exit function
end if
dim tempfeaidary(100),tempfeaidcnt
parserecord feaid,tempfeaidary,tempfeaidcnt,","
dim strsql,tempprice,orders,totalprice,icnt,otheramount
totalprice = 0
tempprice = 0
otheramount = 0
dim selectlistpos1,selectlistpos2,selectlistvalue
for icnt = 0 to (tempfeaidcnt - 1)
if isnumeric(tempfeaidary(icnt)) = false or instr(tempfeaidary(icnt),",") > 0 then
else
strsql = "select featuretype,featureprice from prodfeatures where id=" & tempfeaidary(icnt)
Set Orders = Server.CreateObject("ADODB.Recordset")
orders.open strsql, dbc, adopenkeyset, adlockoptimistic
if not orders.eof then
if lcase(orders("featuretype")) = "selectlist" then
tempprice = 0
elseif lcase(orders("featuretype")) = "quantity" then
if trim(arrCart(cfeatureotherpricing,i)) <> "" then
if instr(arrCart(cfeatureotherpricing,i),"-selectquantity=[") > 0 then
selectlistpos1 = instr(arrCart(cfeatureotherpricing,i),"-selectquantity=[") + len("-selectquantity=[") - 1
selectlistpos2 = instr(mid(arrCart(cfeatureotherpricing,i),selectlistpos1+1,len(arrCart(cfeatureotherpricing,i)) - selectlistpos1 + 1),"]")
selectlistvalue = mid(arrCart(cfeatureotherpricing,i),selectlistpos1+1,selectlistpos2-1)
end if
else
selectlistvalue = 0
end if
tempprice = orders("featureprice")
if isnull(tempprice) then tempprice = 0
if trim(tempprice) = "" then tempprice = 0
tempprice = tempprice * selectlistvalue
else
tempprice = orders("featureprice")
if isnull(tempprice) then tempprice = 0
if trim(tempprice) = "" then tempprice = 0
otheramount = otheramount + tempprice
end if
end if
Orders.close
set Orders=Nothing
totalprice = cdbl(totalprice) + cdbl(tempprice)
end if
next
getfprice = totalprice
end function
Locate around line 181: within function getfpricepercent
Replace function getfpricepercent
to
function getfpricepercent (feaid,curprice)
if len(feaid) <= 0 then
getfpricepercent = 0
exit function
end if
if len(curprice) <= 0 then
getfpricepercent = 0
exit function
end if
if isnumeric(curprice) = false then
getfpricepercent = 0
exit function
end if
dim tempfeaidary(100),tempfeaidcnt
parserecord feaid,tempfeaidary,tempfeaidcnt,","
dim strsql,tempprice,orders,temppercent,icnt
totalprice = 0
tempprice = 0
for icnt = 0 to (tempfeaidcnt - 1)
if isnumeric(tempfeaidary(icnt)) = false or instr(tempfeaidary(icnt),",") > 0 then
else
strsql = "select featurepercent from prodfeatures where id=" & tempfeaidary(icnt)
Set Orders = Server.CreateObject("ADODB.Recordset")
orders.open strsql, dbc, adopenkeyset, adlockoptimistic
if not orders.eof then
temppercent = orders("featurepercent")
end if
Orders.close
set Orders=Nothing
if isnull(temppercent) then temppercent = 0
if trim(temppercent) = "" then temppercent = 0
if cdbl(temppercent) > 0 then
tempprice = (temppercent / 100) * curprice
totalprice = cdbl(totalprice) + cdbl(tempprice)
end if
end if
next
getfpricepercent = totalprice
end function
if istable(Newrecord) = false then
workrecord = replace(Newrecord,vbcrlf,"<br />")
else
workrecord = Newrecord
end if
Locate end of the file.
Above
%>
Add
'check is the string html coding
function istable (passstring)
dim tempstring, intStartPos, intEndPos
tempstring = passstring
if instr(lcase(tempstring),"<body") > 0 or instr(lcase(tempstring),"<html") > 0 or instr(lcase(tempstring),"<table") > 0 or instr(lcase(tempstring),"<td") > 0 or instr(lcase(tempstring),"<tr") > 0 or instr(lcase(tempstring),"<form") > 0 or instr(lcase(tempstring),"<img") or instr(lcase(tempstring),"<span") then
istable = true
else
istable = false
end if
end function
Save and test.
104a. shopxmysite.asp
Locate around line 19:within sub initxmysite
Remove
if len(xadminfolder) <= 0 then
else
if instr(xMySite,xadminfolder) > 0 then
if trim(xadminfolder) <> "" then
xmysite = replace(xMySite,xadminfolder & "/","")
xmysite = replace(xMySite,xadminfolder & "\","")
end if
end if
end if
Save and continue to 104b.
104b. shop$db.asp
Locate around line 3486:within function RealSubFolderName
Replace
if trim(xadminfolder) <> "" then
thename = replace(thename,xadminfolder & "/","")
thename = replace(thename,xadminfolder & "\","")
end if
to
if lcase(right(thename,len(xadminfolder))) = lcase(xadminfolder) then
thename = mid(thename,1,len(thename)-len(xadminfolder))
elseif lcase(right(thename,len(xadminfolder)+1)) = lcase(xadminfolder & "/") or lcase(right(thename,len(xadminfolder)+1)) = lcase(xadminfolder & "\") then
thename = mid(thename,1,len(thename)-len(xadminfolder)-1)
end if
Locate around line 3506:within function RealSubFolderNameOnly
Modify
if trim(xadminfolder) <> "" then
thename = replace(mid(pstr,2,scriptnamelength),xadminfolder & "/","")
thename = replace(mid(pstr,2,scriptnamelength),xadminfolder & "\","")
else
thename = mid(pstr,2,scriptnamelength)
end if
to
thename = mid(pstr,2,scriptnamelength)
Save and continue to 104c.
104c. admin/adminxmysite.asp
Locate around line 19:within sub initxmysite
Remove
if len(xadminfolder) <= 0 then
else
if instr(xMySite,xadminfolder) > 0 then
if trim(xadminfolder) <> "" then
xmysite = replace(xMySite,xadminfolder & "/","")
xmysite = replace(xMySite,xadminfolder & "\","")
end if
end if
end if
Save and continue to 104d.
104d. admin/admin$db.asp
Locate around line 3403:within function RealSubFolderName
Replace
if trim(xadminfolder) <> "" then
thename = replace(thename,xadminfolder & "/","")
thename = replace(thename,xadminfolder & "\","")
end if
to
if lcase(right(thename,len(xadminfolder))) = lcase(xadminfolder) then
thename = mid(thename,1,len(thename)-len(xadminfolder))
elseif lcase(right(thename,len(xadminfolder)+1)) = lcase(xadminfolder & "/") or lcase(right(thename,len(xadminfolder)+1)) = lcase(xadminfolder & "\") then
thename = mid(thename,1,len(thename)-len(xadminfolder)-1)
end if
Locate around line 3454:within function RealSubFolderNameOnlyWithoutAdmin
Modify
if trim(xadminfolder) <> "" then
thename = replace(mid(pstr,2,scriptnamelength),xadminfolder & "/","")
thename = replace(mid(pstr,2,scriptnamelength),xadminfolder & "\","")
else
thename = mid(pstr,2,scriptnamelength)
end if
to
thename = mid(pstr,2,scriptnamelength)
Save and continue to 104e.
104e. admin/editor/assetmanager/checkadmin.asp
Replace function RealSubFolderNameOnlyWithoutAdmin
to
function RealSubFolderNameOnlyWithoutAdmin(pstr)
dim thename
thename = session("xmysite")
RealSubFolderNameOnlyWithoutAdmin = thename
end function
Locate around line 113:within sub Generatepinnumber
Modify
if lcase(pinproductmatch)<>"CatalogId" then
to
if lcase(pinproductmatch)<>"catalogid" then
Save and test.
107. shopfileio.asp
Locate around line 2262:within function GetEmaildownloadLink
Modify
if cint(arrayemaillinks(i,0))=cint(CatalogId) then
to
if cint(arrayemaillinks(i,0))=clng(CatalogId) then
Save and test.
108. shopnewproductsub.asp
Locate around line 76: within routine sub Generatesqlnewproducts.
Modify
sql = "select distinct p.catalogid from products p, prodcategories cc, categories c " & wherestr
to
sql = "select distinct p.catalogid,p.cdateadded from products p, prodcategories cc, categories c " & wherestr
Save and test.
109a. admin/shopa_featureedit.asp
Locate around line 1079: within routine sub FeaturesProducts.
Modify
if instr(lcase(xdatabasetype),"mysql") > 0 then
sql = "select catalogid,cname from products where CONCAT(',',features,',') like ',%"& strfeatures &"%,' limit 20"
else
sql = "select top 20 catalogid,cname from products where ',' + features + ',' like ',%"& strfeatures &"%,'"
end if
to
if instr(lcase(xdatabasetype),"mysql") > 0 then
sql = "select catalogid,cname from products where CONCAT(',',features,',') like '%,"& strfeatures &",%' limit 20"
else
sql = "select top 20 catalogid,cname from products where ',' + features + ',' like '%,"& strfeatures &",%'"
end if
Save and continue to 109b.
109b. admin/shopa_displayrelfeatureprod.asp
Locate around line 75: within routine sub GenerateSQLEditDisplayProdFeatures.
Modify
if instr(lcase(xdatabasetype),"mysql") > 0 then
MySql = "select catalogid,cname from products where concat(',',features,',') like ',%"& strfeatures &"%,'"
else
MySql = "select catalogid,cname from products where ',' + features + ',' like ',%"& strfeatures &"%,'"
end if
to
if instr(lcase(xdatabasetype),"mysql") > 0 then
MySql = "select catalogid,cname from products where concat(',',features,',') like '%,"& strfeatures &",%'"
else
MySql = "select catalogid,cname from products where ',' + features + ',' like '%,"& strfeatures &",%'"
end if
Save and test.
110. Please refer to #152.
111a. shopproductsubs2.asp
Locate around line 140: within routine sub Navigateshowcurrencies.
if lcase(getsess("inadminflag")) = "yes" then
url = "shoplanguageset.asp?LG=" & server.urlencode(name)
else
url = xmysite2 & "/shoplanguageset.asp?LG=" & server.urlencode(name)
end if
Save and test.
112. admin/admin$db.asp
Locate around line 3206: within function addHTMLEditor
Modify
<pre id="idTemporary_<%=fieldname%>" name="idTemporary_<%=fieldname%>" style="display:none"><%if textdata > "" then response.write textdata%></pre>
to
<pre id="idTemporary_<%=fieldname%>" name="idTemporary_<%=fieldname%>" style="display:none"><%if textdata > "" then response.write Server.HTMLEncode(textdata)%></pre>
Save and test.
113. shoppinnumbers.asp
Locate around line 113:within sub Generatepinnumber
sub OpenInputFile (filename, fsObj, RecordObj, rc)
if lcase(left(filename,10)) = "templates/" then filename = xmysite2 & "/" & filename
on error resume next
dim whichfile, dbfile, xtemplate, cmpstr1, cmpstr2, cmpstr3
xtemplate = getconfig("xtemplate")
cmpstr1 = lcase(filename)
cmpstr2 = lcase(xmysite2 & "/templates/"& xtemplate &"/")
dbfile=left(replace(cmpstr1,cmpstr2,""),3)
if lcase(dbfile)="db=" then
OpenInputFiledb replace(cmpstr1,cmpstr2,""), fsObj, RecordObj, rc
exit sub
end if
dim dpos, dposstr
dpos = instr(cmpstr1,"/" & "templates/")
if dpos = 0 then dpos = instr(cmpstr1,"\" & "templates\")
dposstr = mid(filename, dpos, len(filename) - dpos + 1)
'700 - getting real subfolder name
dim infolder
infolder = server.mappath(filename)
infolder = replace(lcase(infolder),lcase(dposstr),"")
infolder = replace(lcase(infolder),replace(lcase(dposstr),"/","\"),"")
whichfile=infolder & "\" & "templates\" & xtemplate & "\" & realfilename
set fsObj = Server.CreateObject("Scripting.FileSystemObject")
set RecordObj= fsObj.OpenTextFile(whichfile, 1, False)
if err.number > 0 then
rc=4
fsObj.close
set fsObj=nothing
else
rc=0
end if
end sub
Save and continue to 117 & 118b.
117 & 118b. admin/adminfileio.asp
Locate around line 30:within sub OpenInputFile
Replace whole sub OpenInputFile
to
sub OpenInputFile (filename, fsObj, RecordObj, rc)
if lcase(left(filename,10)) = "templates/" then filename = xmysite2 & "/" & filename
on error resume next
dim whichfile, dbfile, xtemplate, cmpstr1, cmpstr2, cmpstr3
xtemplate = getconfig("xtemplate")
cmpstr1 = lcase(filename)
cmpstr2 = lcase(xmysite2 & "/templates/"& xtemplate &"/")
dbfile=left(replace(cmpstr1,cmpstr2,""),3)
if lcase(dbfile)="db=" then
OpenInputFiledb replace(cmpstr1,cmpstr2,""), fsObj, RecordObj, rc
exit sub
end if
dim dpos, dposstr
dpos = instr(cmpstr1,"/" & "templates/")
if dpos = 0 then dpos = instr(cmpstr1,"\" & "templates\")
dposstr = mid(filename, dpos, len(filename) - dpos + 1)
'700 - getting real subfolder name
dim infolder
infolder = server.mappath(filename)
infolder = replace(lcase(infolder),lcase(dposstr),"")
infolder = replace(lcase(infolder),replace(lcase(dposstr),"/","\"),"")
whichfile=infolder & "\" & "templates\" & xtemplate & "\" & realfilename
set fsObj = Server.CreateObject("Scripting.FileSystemObject")
set RecordObj= fsObj.OpenTextFile(whichfile, 1, False)
if err.number > 0 then
rc=4
fsObj.close
set fsObj=nothing
else
rc=0
end if
end sub
Save and test.
119. shopexd.asp
Locate around line 60.
Modify
if getconfig("xSEODynamicProductsEnable") = "Yes" then
to
if getconfig("xSEODynamicEnable") = "Yes" and getconfig("xSEODynamicProductsEnable") = "Yes" then
Locate around line 77 within routine sub FormatContent.
Modify
GetContentSQL = "select ContentId from content WHERE MessageType = '" & MessageType & "'"
to
GetContentSQL = "select ContentId from content WHERE MessageType = '" & tosql(MessageType,"Text") & "'"
Locate around line 138 within routine sub GenerateContentSQL.
Modify
sql="select * from content where MessageType='" & MessageType & "'"
to
sql="select * from content where MessageType='" & tosql(MessageType,"Text") & "'"
Locate around line 163 within routine sub WriteImpressions.
Modify
dbc.execute("UPDATE content SET impressions = impressions + 1 WHERE MessageType LIKE '" & MessageType &"'")
to
dbc.execute("UPDATE content SET impressions = impressions + 1 WHERE MessageType LIKE '" & tosql(MessageType,"Text") &"'")
Save and test.
128. shopblogs.asp
Locate around line 127 within routine sub GenerateContentSQL.
Modify
sql="select * from blogs where MessageType='" & MessageType & "'"
to
sql="select * from blogs where MessageType='" & tosql(MessageType,"Text") & "'"
Save and test.
129. shopnews.asp
Locate around line 127 within routine sub GenerateContentSQL.
Modify
sql="select * from news where MessageType='" & MessageType & "'"
to
sql="select * from news where MessageType='" & tosql(MessageType,"Text") & "'"
Save and test.
130. shopfileio.asp
Locate around line 2298 within routine function istable.
Modify
if instr(lcase(tempstring),"<body") > 0 or instr(lcase(tempstring),"<html") > 0 or instr(lcase(tempstring),"<table") > 0 or instr(lcase(tempstring),"<td") > 0 or instr(lcase(tempstring),"<tr") > 0 or instr(lcase(tempstring),"<form") > 0 or instr(lcase(tempstring),"<img") then
to
if instr(lcase(tempstring),"<body") > 0 or instr(lcase(tempstring),"<html") > 0 or instr(lcase(tempstring),"<table") > 0 or instr(lcase(tempstring),"<td") > 0 or instr(lcase(tempstring),"<tr") > 0 or instr(lcase(tempstring),"<form") > 0 or instr(lcase(tempstring),"<img") or instr(lcase(tempstring),"<span") then
Save and test.
131. admin/shopa_addproduct.asp
Locate around line 952 within routine sub PHeaderRow.
Locate around line 3595: within routine sub generatebaseurl
Replace sub generatebaseurl to
sub generatebaseurl
if lcase(request.ServerVariables("HTTPS")) = "on" then
if xssl <> "" then
htmlwrite "<base href="""& xssl &"/"" />"
else
if xmysite <> "" then
htmlwrite "<base href="""& xmysite &"/"" />"
else
htmlwrite "<base href=""https://"& request.ServerVariables("HTTP_HOST") & xmysite2 &"/"" />"
end if
end if
else
if xmysite <> "" then
htmlwrite "<base href="""& xmysite &"/"" />"
else
htmlwrite "<base href=""http://"& request.ServerVariables("HTTP_HOST") & xmysite2 &"/"" />"
end if
end if
end sub
Save and test.
136. admin/shopadmin.asp or renamed admin login page
Locate around line 100: within routine Sub Handle_producttabs.
Modify
producttabs.setpersist(true)
to
producttabs.setpersist(false)
Save and test.
138. shopfileio.asp
Locate around line 795: within routine sub DoSpecialFormating.
Above
if GetConfig("xdisplayprices") <> "No" then
Add
if parseRS("taxfree") = true or lcase(parseRS("taxfree")) = "true" or parseRS("taxfree") = 1 or parseRS("taxfree") = "1" then
value = ""
exit sub
end if
Locate around line 895: within routine sub DoSpecialFormating.
Above
if GetConfig("xdisplayprices") <> "No" then
Add
if parseRS("taxfree") = true or lcase(parseRS("taxfree")) = "true" or parseRS("taxfree") = 1 or parseRS("taxfree") = "1" then
value = ""
exit sub
end if
Save and test.
139. shop$db.asp
Locate around line 760: within routine function GenPageSQL.
Modify
mysql2 = "select distinct top "& (clng(mypagesize) * clng(mypage)) &" "& tempfieldstring2 &",RowNumber from (" & mysql2 & ") as queries "
to
mysql2 = "select distinct top "& (clng(mypagesize) * clng(mypage)) &" "& tempfieldstring2 &" from (" & mysql2 & ") as queries "
Locate around line 764: within routine function GenPageSQL.
Modify
mysql2 = mysql2 & " where (RowNumber <= "& clng(mypage) * clng(mypagesize) &" AND RowNumber >= "& ((clng(mypage)-1) * clng(mypagesize)) + 1 &") order by RowNumber"
if instr(lcase(xdatabasetype),"mysql") > 0 then
tempstring = tempstring & " "& whereok &" (concat(',',"& matchfield &",',') like '%," & CustomerProductGroups(icnt) & ",%' "
else
tempstring = tempstring & " "& whereok &" (',' + "& matchfield &" + ',' like '%," & CustomerProductGroups(icnt) & ",%' "
end if
Locate around line 389: within routine function GenerateCustomerMatchSQL.
Modify
tempstring = tempstring & " or ',' + "& matchfield &" + ',' like '%," & CustomerProductGroups(icnt) & ",%' "
to
if instr(lcase(xdatabasetype),"mysql") > 0 then
tempstring = tempstring & " or concat(',',"& matchfield &",',') like '%," & CustomerProductGroups(icnt) & ",%' "
else
tempstring = tempstring & " or ',' + "& matchfield &" + ',' like '%," & CustomerProductGroups(icnt) & ",%' "
end if
Locate around line 401: within routine function GenerateCustomerMatchSQL.
Modify
tempstring = tempstring & " and (',' + "& exmatchfield &" + ',' not like '%," & CustomerProductGroups(icnt) & ",%' "
to
if instr(lcase(xdatabasetype),"mysql") > 0 then
tempstring = tempstring & " and (concat(',',"& exmatchfield &",',') not like '%," & CustomerProductGroups(icnt) & ",%' "
else
tempstring = tempstring & " and (',' + "& exmatchfield &" + ',' not like '%," & CustomerProductGroups(icnt) & ",%' "
end if
Locate around line 407: within routine function GenerateCustomerMatchSQL.
Modify
tempstring = tempstring & " and ',' + "& exmatchfield &" + ',' not like '%," & CustomerProductGroups(icnt) & ",%' "
to
if instr(lcase(xdatabasetype),"mysql") > 0 then
tempstring = tempstring & " and concat(',',"& exmatchfield &",',') not like '%," & CustomerProductGroups(icnt) & ",%' "
else
tempstring = tempstring & " and ',' + "& exmatchfield &" + ',' not like '%," & CustomerProductGroups(icnt) & ",%' "
end if
Save and test.
141. shopexd.asp
Locate around line 79.
Modify
if (tmprs("productmatch")) <> lcase(xproductmatch) then
to
if (tmprs("p.productmatch")) <> lcase(xproductmatch) then
Save and test.
142. shopdisplayproducts.asp
Locate around line 116: within routine sub ProcessFirst.
Remove
CleanseMessage category, rc
if rc> 0 then
category = ""
end if
Locate around line 124: within routine sub ProcessFirst.
Remove
CleanseMessage productname, rc
if rc>0 then
productname = ""
end if
Save and test.
143. shoplanguagesubs.asp
Locate around line 26: within routine sub Navigateshowlanguages.
if lcase(getsess("inadminflag")) = "yes" then
url = "shoplanguageset.asp?LG=" & server.urlencode(name)
else
url = xmysite2 & "/shoplanguageset.asp?LG=" & server.urlencode(name)
end if
'700 - Quick Admin Order Form
if getsess("fromquickorderpage") = "Yes" then
Add
'check if https
directsecuredform "shopcustomer.asp", "Yes"
Save and test.
148. shop$db.asp
Locate around line 3774: within routine sub directsecuredform.
Replace sub directsecuredform
to
sub directsecuredform (passstring,passflag)
if lcase(passflag)="yes" then
if lcase(request.ServerVariables("HTTPS")) = "off" then
if xssl <> "" and instr(lcase(xssl),"https") > 0 then
if right(xssl,1) = "/" then
responseRedirect xssl &""& passstring &""
else
responseRedirect xssl &"/"& passstring &""
end if
end if
end if
else
if lcase(request.ServerVariables("HTTPS")) = "on" then
responseRedirect "http://"& request.ServerVariables("HTTP_HOST") & xmysite2 &"/"& passstring &""
end if
end if
end sub
Save and test.
149. shopfileio.asp
Locate around line 2271: within routine sub Handle_NumberSubCats.
Modify
Set scrs = Server.CreateObject("ADODB.Recordset")
scrs.open scsql, dbc, adOpenDynamic, adLockOptimistic
if not scrs.eof then
response.write "(" & scrs("thecount") & ")"
else
response.write "(0)"
end if
to
dim scrs2
Set scrs2 = Server.CreateObject("ADODB.Recordset")
scrs2.open scsql, dbc, adOpenDynamic, adLockOptimistic
if not scrs2.eof then
response.write "(" & scrs2("thecount") & ")"
else
response.write "(0)"
end if
CloseRecordSet scrs2
Save and test.
150. shopproductsubs.asp
Locate around line 1550: within routine sub NavigateTopTen.
'take care the currency conversion
dim Conversionvalue
Conversionvalue = getsess("Conversionvalue")
if Conversionvalue <> "" then
if cdbl(Conversionvalue) <> 1 and cdbl(Conversionvalue) <> 0 then
'Bug Fixed - Currency coversion
if currencycalculateflag then
shipcost = shipcost / Conversionvalue
end if
setsess "smprice",ShipCost
end if
end if
Save and test.
155. shopproductcreatesql.asp
Locate around line 391: within routine sub NewProductSQL.
Modify
sql = "select * from products p, prodcategories cc, categories c where "
to
dim strProductFields
dim i
dim strdistinct
strdistinct = "DISTINCTROW"
if ucase(xDatabaseType) = "SQLSERVER" or ucase(GetConfig("xDatabaseType")) = "SQLSERVER" then
strdistinct = "DISTINCT"
end if
strProductFields = GetSess("strProductFields")
if strProductFields = "" then
GetProductfields dbc
strProductFields = GetSess("strProductFields")
end if
sql = "select " & strdistinct & " " & strproductfields
sql = sql & " from products p, prodcategories cc, categories c where "
Save and test.
156. shopshippingcalc.asp
Locate around line 132: within routine sub GetShippingDatabase.
Modify
if getsess("javascriptstatus") = "" then
SQL = "SELECT * from shipmethods order by shipmethod"
else
SQL = "SELECT * from shipmethods WHERE ((shiproutine IS NULL) OR (shiproutine ='') (shiproutine IS NOT NULL) and (shiproutine <> 'upsxmlrealtime.asp') and (shiproutine <> 'fedex.asp') and (shiproutine <> 'austpostrealtime.asp') and (shiproutine <> 'canadapostxml.asp') and (shiproutine <> 'uspostalrealtime.asp')) "
end if
to
if getsess("javascriptstatus") = "" then
SQL = "SELECT * from shipmethods "
else
SQL = "SELECT * from shipmethods WHERE ((shiproutine IS NULL) OR (shiproutine ='') and (shiproutine <> 'upsxmlrealtime.asp') and (shiproutine <> 'fedex.asp') and (shiproutine <> 'austpostrealtime.asp') and (shiproutine <> 'canadapostxml.asp') and (shiproutine <> 'uspostalrealtime.asp')) "
end if
Locate around line 138: within routine sub GetShippingDatabase.
Above
dim shipcountry
Add
if getsess("javascriptstatus") <> "" then
Locate around line 157: within routine sub GetShippingDatabase.
Below
SQL = SQL & " and shipstate='" & shipstate & "'"
end if
end if
Add
end if
Locate around line 165: within routine sub GetShippingDatabase.
Modify
SQL = "SELECT * from shipmethods WHERE ((shiproutine IS NULL) OR (shiproutine ='') OR (shiproutine IS NOT NULL) and (shiproutine <> 'upsxmlrealtime.asp') and (shiproutine <> 'fedex.asp') and (shiproutine <> 'austpostrealtime.asp') and (shiproutine <> 'canadapostxml.asp') and (shiproutine <> 'uspostalrealtime.asp')) "
if GetConfig("xshippingbycountry") = "Yes" then
SQL = SQL & " and (shipcountry='" & shipcountrydefault & "' or shipcountry is null or shipcountry = ''"
end if
if GetConfig("xshippingbystate") = "Yes" then
SQL = SQL & " or shipstate='" & shipstatedefault & "' or shipstate is null or shipstate = '') "
else
SQL = SQL & " ) "
end if
SQL = SQL & " order by shipmethod"
to
SQL = "SELECT * from shipmethods WHERE ((shiproutine IS NULL) OR (shiproutine ='') and (shiproutine <> 'upsxmlrealtime.asp') and (shiproutine <> 'fedex.asp') and (shiproutine <> 'austpostrealtime.asp') and (shiproutine <> 'canadapostxml.asp') and (shiproutine <> 'uspostalrealtime.asp')) "
if GetConfig("xshippingbycountry") = "Yes" then
SQL = SQL & " and (shipcountry='" & shipcountrydefault & "' or shipcountry is null or shipcountry = ''"
end if
if GetConfig("xshippingbystate") = "Yes" then
if GetConfig("xshippingbycountry") = "Yes" then
SQL = SQL & " or shipstate='" & shipstatedefault & "' or shipstate is null or shipstate = '') "
else
SQL = SQL & " and (shipstate='" & shipstatedefault & "' or shipstate is null or shipstate = '') "
end if
else
if GetConfig("xshippingbycountry") = "Yes" then
SQL = SQL & " ) "
end if
end if
SQL = SQL & " order by shipmethod"
Save and test.
157. shopreadfile.asp
Locate around line 13: within routine sub ShopReadFile.