Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 6.00 Questions
 Dynamic menus and 6.07 patch
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

aprit
Starting Member

USA
8 Posts

Posted - February 04 2006 :  21:19:12  Show Profile  Reply with Quote
Hello Support,

There was the bug introduced by 6.07 patch.
Here's how reproduce it:

Create another admin and assign it one item from menu access, for example:
menu item: add customer
and one table: customers.

Dynamic menus will not work.
It worked just before I've applied patch 6.07.

You have to have a least on submenu item for each dynamic menu.

support
Administrator

4679 Posts

Posted - February 05 2006 :  16:24:13  Show Profile  Visit support's Homepage  Reply with Quote
Hi,

To fix this problem, please follow these steps:

1. Open shopheaders.asp

2. Locate the following line (about line 976) -
    if rs.eof then

3. Add this code above that line -
    %>//Contents for menu <%=theNumber%>
    var menu<%=theNumber%>=new Array()<%

4. Locate this line (about line 981) -
    response.write "menu" & theNumber & "[0] = 'No menu items'"

5. Replace with this code -
    %>menu<%=theNumber%>[0]='<a href="#" class="nav">No menu items</a>'<%

Those changes should solve your menu problems.

Kind regards,
Claire
VP-ASP Support

Edited by - support on February 05 2006 16:24:58
Go to Top of Page

aprit
Starting Member

USA
8 Posts

Posted - February 05 2006 :  17:35:28  Show Profile  Reply with Quote
Hi,

Thanks for the prompt response. It still does not work.

Per your advise here is the fixed code:

' the fix after 6.07 as per support
%>//Contents for menu <%=theNumber%>
var menu<%=theNumber%>=new Array()<%
if rs.eof then
'response.write "<div align='center' style='padding: 5px'>No menu items</div>"
' response.write "menu" & theNumber & "[0] = 'No menu items'"
%>menu<%=theNumber%>[0]='<a href="#" class="nav">No menu items</a>'<%
else


And here's the generated javascript code:


//Contents for menu 1
var menu1=new Array()menu1[0]='<a href="#" class="nav">No menu items</a>'//Contents for menu 2
var menu2=new Array()menu2[0]='<a href="#" class="nav">No menu items</a>'//Contents for menu 3
var menu3=new Array()//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="shopa_editrecord.asp?table=customers" class="nav">Add Customer </a><br /><br />'

menu3[1]='<a href="shopa_editdisplaybulk.asp?table=customers" class="nav">Bulk Customer Update </a><br /><br />'

menu3[2]='<a href="shopa_mailsetup.asp?table=customers" class="nav">Email Customers </a><br /><br />'

menu3[3]='<a href="shopa_exportsetup.asp?table=customers" class="nav">Export Customers </a><br /><br />'

menu3[4]='<a href="shopa_import.asp?table=customers" class="nav">Import Customers </a><br /><br />'
//Contents for menu 4
var menu4=new Array()menu4[0]='<a href="#" class="nav">No menu items</a>'//Contents for menu 5
var menu5=new Array()menu5[0]='<a href="#" class="nav">No menu items</a>'//Contents for menu 6
var menu6=new Array()menu6[0]='<a href="#" class="nav">No menu items</a>'
Go to Top of Page

support
Administrator

4679 Posts

Posted - February 05 2006 :  17:39:22  Show Profile  Visit support's Homepage  Reply with Quote
Hi,

Sorry about that, it's a matter of line breaks.

Please try this:

1. Open shopheaders.asp

2. Locate the following line (about line 976) -
if rs.eof then

3. Add this code above that line -
%>//Contents for menu <%=theNumber%>
var menu<%=theNumber%>=new Array()
<%

4. Locate this line (about line 981) -
response.write "menu" & theNumber & "[0] = 'No menu items'"

5. Replace with this code -
%>menu<%=theNumber%>[0]='<a href="#" class="nav">No menu items</a>'
<%

Note the changed locations of the "<%" - there are extra line breaks.

Kind regards,
Claire
VP-ASP Support
Go to Top of Page

aprit
Starting Member

USA
8 Posts

Posted - February 05 2006 :  17:55:24  Show Profile  Reply with Quote
Thanks alot.
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