ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Why not a list menu?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Why not a list menu?

 Post Reply Post Reply
Author
Message
Louis View Drop Down
Newbie
Newbie
Avatar

Joined: 22-February-2006
Location: Netherlands
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Topic: Why not a list menu?
    Posted: 26-March-2007 at 6:12am

I'm wondering why PC doesn't use a list menu. The crrent menu has to be generated from the backoffice, thats not realy efficient. If a list menu would be used, all kinds of nice css menu's would be possible. List menu's are easely styled and can be made dynamic.

Here are some nicely styled list menu's: vertcal one level, vertical multi-level

I'm saying this because I found (according to my opinion) one of the nicest webshops I've ever seen: click



Edited by Louis - 26-March-2007 at 6:17am
Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 26-March-2007 at 7:50am

You really have two different issues here...

1. First, PC uses the "Generate Navigation" from the Control Panel for one primary reason...efficient display of a menu on the front end. The Generate Navigation creates static HTML content which is used to display the navigation menus of categories, subcategories and optionally products. For stores with many categories/subcategories, generating the menus on-the-fly as a customer moves from page to page can be resource intensive and slow the site down. So the Generate Navigation only needs to be performed when you as the merchant change your store's categories or subcategories which is not usually alot once the store is up and running.

2. Second, the formatting of the HTML used to display the menu. You are correct, it would be nice to have it generate list based menus which can be styled with CSS. If you are familiar with ASP and HTML you could easily modify the genCatNavigation.asp routine to create lists vs. tables for the menus.

We have done this for a couple clients and it isn't very difficult. See http://www.poshera.com.

If you have a small set of categories/subcategories you could also change the header.asp file and generate the navigation dynamically if you wanted to do that.

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
Louis View Drop Down
Newbie
Newbie
Avatar

Joined: 22-February-2006
Location: Netherlands
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 27-March-2007 at 4:21pm

@Netprofits

Thx for your reply. Regarding point 2; I would love to experiment/use the list menu option for my next project. The problem, I'm good at html but not at asp. genCatNavigation.asp looks just a bit too complex for my limited knowledge. Could you post the lines of code I would need to change (or post the edited genCatNavigation.asp file) in order to make it a list menu? As you have done it for multiple client's you will probebly have it in no time. It would realy help me.

Thx

Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 28-March-2007 at 7:05am

There is no easy way to just post the lines that need to be changed. It depends on the projects and how the you want you navigation to look, i.e. just top level categories or 1st and 2nd level categories where the second level "fly-out" when the top level is rolled over. Also, the specific CSS classes and IDs need to be integrated into the code as you create each UL and LI tag.

The Poshera example I listed uses PC 2.76 and a 3rd party menu system and is quite different than the 3.x version of the generate navigation code.

You are probably better off working with an ASP developer so you can tell them exactly what you want and have them customize it. That's what other companies have paid us to do.

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
Louis View Drop Down
Newbie
Newbie
Avatar

Joined: 22-February-2006
Location: Netherlands
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 01-April-2007 at 10:08am

Quote There is no easy way to just post the lines that need to be changed. It depends on the projects and how the you want you navigation to look, i.e. just top level categories or 1st and 2nd level categories where the second level "fly-out" when the top level is rolled over. Also, the specific CSS classes and IDs need to be integrated into the code as you create each UL and LI tag.

This is not a problem. I know how to style and make a css list menu. The fly-out or roll-down kind of effects are done by a java script. This is not the issue. Which classes or ID also doen't matter. That I cat do... And I just use 3.x so the other is also not the issue. The only part is the adjusting of the genCatNavigation.asp so it creates a list in stead of a table. I cant see the table tags but I just can't get it to work as a table needs table, td, and tr. A list just needs ul and li.

However, I can understand that you're not willing to share the code.

Thx, anyway.

Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 01-April-2007 at 11:26am

Here is the code, have fun. As I said, this was done in 2.76 so it may need to be modified for 3.x. This code is provided purely as an example. It builds a string that must be written out to an HTML file. You can use the genCatnavigation.asp code for all of that and insert this as needed. We do not provide support for this code.


strContent = "<!-- Top Navigation Drop Down Menus -->"
strContent = strContent & "<table border='0' cellpadding='0' cellspacing='0' width='775'>"
strContent = strContent & "  <tr><td width='100%'>"
strContent = strContent & "    <ul id='p7PMnav'>"
strContent = strContent & "      <li><a href='default.asp'>Home</a></li>"

'----- Start Categories Level 1
pcv_strTemp=" AND pccats_RetailHide<>1 "
query="select idcategory,categorydesc from categories where idParentCategory=1 and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"
set rsMenuObj=server.CreateObject("ADODB.RecordSet")
set rsMenuObj=conn.execute(query)

If not rsMenuObj.eof then
 do while not rsMenuObj.eof
  IDCategory1=rsMenuObj("idcategory")
  CatDesc1=rsMenuObj("categorydesc")

  '== create top level menu item
  strContent = strContent & "<li class='p7PMtrg'><a href='" & sPCpath & "viewCat_h.asp?idCategory=" & IDCategory1 & "'>" & CatDesc1 & "</a>" & vbCRLF

  '----- Start Categories Level 2
  query="select idcategory,categorydesc from categories where idParentCategory=" & IDCategory1 & " and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"
  set rsMenuObj2=server.CreateObject("ADODB.RecordSet")
  set rsMenuObj2=conn.execute(query)

        '== 1st level drop down menu items 
  IF not rsMenuObj2.eof then
      strContent = strContent &("<ul>")
   do while not rsMenuObj2.eof
    IDCategory2=rsMenuObj2("idcategory")
    CatDesc2=rsMenuObj2("categorydesc")

    '----- Start Categories Level 3
    query="select idcategory,categorydesc from categories where idParentCategory=" & IDCategory2 & "  and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"
    set rsMenuObj3=server.CreateObject("ADODB.RecordSet")
    set rsMenuObj3=conn.execute(query)
 
    If not rsMenuObj3.eof then
     strContent = strContent & "<li><a class='p7PMtrg' href='" & sPCpath & "viewCat_h.asp?idCategory=" & IDCategory2 & "'>" & CatDesc2 & "</a>" & vbCRLF
        strContent = strContent &"<ul>" & vbCRLF

     do while not rsMenuObj3.eof
      IDCategory3=rsMenuObj3(" idcategory")
      CatDesc3=rsMenuObj3("cat egorydesc")

      '----- Start Categories Level 4
      query="select idcategory,categorydesc from categories where idParentCategory=" & IDCategory3 & "  and idCategory>1 and iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC"
      set rsMenuObj4=conn.execute(query)
      
      If not rsMenuObj4.eof then
       strContent = strContent & "<li><a class='p7PMtrg' href='" & sPCpath & "viewCat_h.asp?idCategory=" & IDCategory3 & "'>" & CatDesc3 & "</a>" & vbCRLF
          strContent = strContent &"<ul>" & vbCRLF
       do while not rsMenuObj4.eof
        IDCategory4= rsMenuObj4("idcategory")
        CatDesc4=rsM enuObj4("categorydesc")
        strContent = strContent & "<li><a href='" & sPCpath & "viewCat_h.asp?idCategory=" & IDCategory4 & "'>" & CatDesc4 & "</a></li>"
        rsMenuObj4.m ovenext
       loop
          strContent = strContent &"</ul>" & vbCRLF
      ELSE
          '== generate level 3 menu option
       strContent = strContent & "<li><a href='" & sPCpath & "viewCat_h.asp?idCategory=" & IDCategory3 & "'>" & CatDesc3 & "</a>" & vbCRLF
      END IF
      set rsMenuObj4=nothing
      '------ End Categories Level 4
 
      rsMenuObj3.movenext
      strContent = strContent &"</li>" & vbCRLF
     loop
        strContent = strContent &"</ul>" & vbCRLF
    ELSE
     strContent = strContent & "<li><a href='" & sPCpath & "viewCat_h.asp?idCategory=" & IDCategory2 & "'>" & CatDesc2 & "</a>" & vbCRLF
    END IF
    set rsMenuObj3=nothing
    '------ End Categories Level 3
 
    rsMenuObj2.movenext
    strContent = strContent &"</li>" & vbCRLF
   loop
      strContent = strContent &"</ul>" & vbCRLF
  ELSE
'   Call GenProducts(IDCategory1)
  END IF
  set rsMenuObj2=nothing
  '------ End Categories Level 2
  
  rsMenuObj.movenext
  strContent = strContent &"</li>" & vbCRLF
 loop
    strContent = strContent &"</ul>" & vbCRLF
 set rsMenuObj=nothing

END IF

strContent = strContent & "</td></tr></table>" & vbCRLF

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
Louis View Drop Down
Newbie
Newbie
Avatar

Joined: 22-February-2006
Location: Netherlands
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 01-April-2007 at 4:48pm

Hi, Thanks very much!

 

I actually managed to do it myself in the mean time.

 

Here is my code 2007-04-01_164426_genCatNavigation.zip. It isn't the neat way to do it but I just replaced the table tags with ul and the tr tags with li. Then I deleted all the td tags so that that data would go directly into the li. thatís pretty much it actually. It works fine now.

 

I'm busy trying to add some java script of moo tools to animate the menu. I'll post the result when I'm done.

 

Thx again, I'll have a look at your code to learn something from it.

Back to Top
Louis View Drop Down
Newbie
Newbie
Avatar

Joined: 22-February-2006
Location: Netherlands
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 02-April-2007 at 5:13pm

I got it to work. Here is the link. Look at the menu in the left column and scroll down to the heading 'kunstenaars'. Underneath you will see two names. If you click on one of the names, the list will  slide down. If you then click on the other name, the previous name will  slide up and the other will slide down. Try it to see.

If some one is interested, I'll post it.

Back to Top
BlkBox View Drop Down
Newbie
Newbie


Joined: 17-January-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote BlkBox Quote  Post ReplyReply Direct Link To This Post Posted: 14-April-2007 at 4:53am
Originally posted by Louis Louis wrote:

I got it to work. Here is the link. Look at the menu in the left column and scroll down to the heading 'kunstenaars'. Underneath you will see two names. If you click on one of the names, the list will  slide down. If you then click on the other name, the previous name will  slide up and the other will slide down. Try it to see.

If some one is interested, I'll post it.



Yah that would be awesome if you could post it. Great job by the way...looks very nice.

Thanks
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.04
Copyright ©2001-2015 Web Wiz Ltd.

This page was generated in 0.639 seconds.