Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Problems and bugs
 Admin Menu''s fail when there are no items (fixed)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jeremy_burgess
Starting Member

United Kingdom
11 Posts

Posted - January 29 2006 :  13:13:10  Show Profile  Visit jeremy_burgess's Homepage  Reply with Quote
Hi there,

People running VPASP 6 (specifically 6.07) may notice that if you remove access to any menu items that the drop down menus don't work in the admin tool. This seems to happen if any of the menus (i.e. Affiliates which I don't use so removed access for my users) is empty.

Without boring you with the reason, replace the code for the writemenuitems sub (line 955) in shopheaders.asp with the following:

Sub WriteSubMenuItems (theNumber, theName,theSection)
dim list, userid, menuconn, rs, m

ShopOpenDatabase menuconn

Userid=getsess("shopadmin")
if getsess("Admintype")="SUPPLIER" then
userid="supplier"
end if
list = GetAccess(Userid, menuConn)
if list = "" then
responseredirect "shopa_logoff.asp"
end if

'Get all menu items for this sub-menu
sql = "SELECT * FROM tblaccess WHERE "
sql = sql & "fldsection = '" & theSection & "' AND fldMenu = '" & theName & "' "
sql = sql & " AND fldauto in (" & list & ") ORDER BY fldOrder, fldName"
set rs=menuconn.execute(sql)

%>
var menu<%=theNumber%>=new Array()
//Contents for menu <%=theNumber%>
<%

if rs.eof then
'response.write "<div align='center' style='padding: 5px'>No menu items</div>"
response.write "menu" & theNumber & "[0] = 'No menu items'"
else
'write out menu items
dim mm
mm = 0

while not rs.eof
%>
menu<%=theNumber%>[<%=mm%>]='<a href="<%=rs("fldurl")%>" class="nav"><%
dim menuWord
menuWord = replace(rs("fldname"), "getlang(""", "")
menuWord = replace(rs("fldname"), """)", "")

if instr(menuword ," ") > 0 then
dim menuWordArray, thing
menuWordArray = split(menuword," ")

for each thing in menuWordArray
if lcase(left(thing, 4)) = "lang" then
if lcase(left(thing, 8)) = "language" then
response.write thing & " "
else
response.write getlang(thing) & " "
end if
else
response.write thing & " "
end if
next
else
if lcase(left(menuword, 4)) = "lang" then
if lcase(left(menuword, 8)) = "language" then
response.write menuword & " "
else
response.write getlang(menuword) & " "
end if
else
response.write menuword & " "
end if
end if%></a><br /><br />'
<%mm = mm + 1
rs.movenext
wend
end if
closerecordset rs
ShopCloseDatabase menuconn
End SUb

support
Administrator

4679 Posts

Posted - January 29 2006 :  18:39:20  Show Profile  Visit support's Homepage  Reply with Quote
Hi,

Thank you for posting this, we will investigate including it in the next patch.

Regards,
VP-ASP Support
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