Author |
Topic |
|
LisaGriff
VP-CART New User
USA
90 Posts |
Posted - May 22 2007 : 03:03:36
|
I wrote this in reply to a posting that was in another forum that was kind of off topic and I thought I'd post it here too since I know quite a few people were asking about this.
I found a menu called The Simple Tree Menu on dynamicdrive.com that I adapted and easily integrated into the 6.50 cart that expands to show the subcategories.
It was pretty simple to do and it uses the categories from the category navigation routine by inserting the script code after the call to the routine in the shop header file, as shown below in how I have mine coded.
Then all you have to do is make a couple of changes in shopnavcategories.asp & tweak the css settings in both the shop.css file and the css file included with the menu to get the look you want. Worked like a charm but it did take a bit of css tweaking for me but then I have not worked with css very much before now.
You can see it on my test site http://test.griffsshortcuts.com/shop650
Download the menu files and follow installation directions then
You will need the shopnavcategories.asp file that comes with the fly-out menu add-on.
around line 12 in shopnavcategories.asp find
set rs=navdbc.execute(sql)
change the line beneath it to read (or add if not there).
Response.write "<ul id=""catnav"" class=""treeview"">" & vbcrlf
around line 83 in shopnavcategories.asp find
If hassubcategory<>"" And showsubcats="Yes" then
change the line beneath it to read (or add if not there).
Response.write "<ul id=""catnav"" class=""treeview"">"
Insert at the top of shopheaders.asp
<!-- #include file="shopnavcategories.asp"-->
my changed code in the shoppage_header file
<!-- START CATEGORY BOX -->
<h2><%=getlang("langcommoncategories")%></h2>
<%DisplayNavcategories%>
<script type="text/javascript">
//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))
ddtreemenu.createTree("catnav", true, 2)
</script>
<!-- END CATEGORY BOX -->
Hope this can be useful and that it isn't too confusing.
|
Edited by - LisaGriff on June 01 2007 03:23:25 |
|
Mark Priest
VP-CART Expert
United Kingdom
580 Posts |
Posted - May 22 2007 : 07:50:14
|
An excellent addition!
Thanks
Regards,
Mark Buy Fireworks |
|
|
zzzz8888
Starting Member
7 Posts |
Posted - May 27 2007 : 16:23:31
|
I like your template very much. That is the best i have ever seen for VPASP. Could you please email me your tempplate your file ([email protected])?
Thanks.
John |
|
|
LisaGriff
VP-CART New User
USA
90 Posts |
Posted - May 27 2007 : 22:27:23
|
Thank you very much for your compliment but the revisions made are for our site and not available as a template. If you are just referring to emailing the expanding menu template - there is no template, and I have given the directions above. |
|
|
stone5150
VP-CART New User
USA
186 Posts |
Posted - May 27 2007 : 22:49:07
|
You can get the script here http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
Bob Stone IT Manager TECH Inc Network Consultant specializing in Windows Server, virus prevention/recovery, and Exchange. Custom ASP, CSS, SHTML, and JavaScript scripting service available upon request |
|
|
goshen
VP-CART New User
132 Posts |
Posted - May 29 2007 : 22:31:52
|
Great and Awesome! This is what we've all been waiting for. Thanks a million. I will try and implement it on my site which is still in development. |
|
|
LisaGriff
VP-CART New User
USA
90 Posts |
Posted - May 30 2007 : 23:38:43
|
Please save yourself a headache and use the shopnavcatgories file from the fly-out menu. I am not sure my directions will work with the file that comes with the other plain category listing add-on and I am editing my original posting to take out the reference. |
|
|
goshen
VP-CART New User
132 Posts |
Posted - May 31 2007 : 05:55:04
|
Noted...thanks Lisa |
|
|
LisaGriff
VP-CART New User
USA
90 Posts |
Posted - June 01 2007 : 03:25:54
|
Found a step I forgot about. I made the change in the directions. It was only to add <!-- #include file="shopnavcategories.asp"--> to the top of shopheaders.asp |
|
|
goshen
VP-CART New User
132 Posts |
Posted - June 01 2007 : 05:38:25
|
I havent had time to implement this yet, but I am sure it will be seamless....once again thanks |
|
|
elvis
VP-CART Super User
202 Posts |
Posted - August 05 2008 : 10:17:25
|
I have this line in line 81 If hassubcategory<>"" And showsubcats="Yes" then I followed the instruction carefully, but I don't get the following lines in my src., and the fuction is the same as fly-out.
<div class="cartsubtotalminicart" > <br><a href="javascript:ddtreemenu.flatten('catnav', 'expand')">Expand All</a>
| <a href="javascript:ddtreemenu.flatten('catnav', 'contact')">Close All</a></div>
Another question. In my line 81 I have If hassubcategory<>"" And showsubcats="Yes" then
After this line I have FormatNavsubcategories categoryid, spacing
Do I need to replace this with your code or I just need to add it? Response.write "<ul id=""catnav"" class=""treeview"">" Thanks for your codes. |
|
|
elvis
VP-CART Super User
202 Posts |
Posted - August 09 2008 : 07:45:18
|
Ok I got it.
I just added the following after <h2><%=getlang("langcommoncategories")%></h2>
<div class="expandcont" > <a href="javascript:ddtreemenu.flatten('catnav', 'expand')">Expand All</a>
|<a href="javascript:ddtreemenu.flatten('catnav', 'contact')">Close All</a></div>
Then it works fine. Thanks. |
|
|
LisaGriff
VP-CART New User
USA
90 Posts |
Posted - August 21 2008 : 21:10:29
|
Sorry, I haven't been to the forums for awhile. I added the "Expand All" and "Close All" links a while after I posted these directions. |
|
|
|
Topic |
|