Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 File Name :: DHTML Categories Author :: gwizard Category :: Minor CubeCart Version :: Description DHTML Categories Mod by Alon Kobets. http://www.natalie-shop.com * README * This mod will replace the default html categories with DHTML menu that supports Themes. Coded for CC 3.0.6 and I haven't tested it with any other version, although it should work. This mod is based on Categories Tree mod by Milos The conVict and part of the credit should go to him. <XXX> means DIRECTORY ! 'XXX' means FILE ! * INSTALL - HOWTO * 1. Copy all files inside <JS> dir to <js> under main shop dir. 2. Go to <main dir>\<includes>\<boxes>\'categories.inc.php' and back it up. 3. Copy the included 'categories.inc.php' to that location overwriting the now backed up file. 4. Go to <your skin>\<styleTemplates>\<boxes>\'categories.tpl' and erase all between the <div class="boxContentRight"> and <div class="boxFootRight"> </div> 5. Insert this code instead: <div id="shopHtmlMenu" align="center"> <ul style="visibility: hidden"> <li><span></span><a href="index.php">{LANG_HOME}</a></li> <li></li> {DATA}</li> </ul> </div> <script language="JavaScript" type="text/javascript"> <!-- cmDrawFromText ('shopHtmlMenu', 'vbl', cmThemeIE, 'ThemeIE'); --> </script> </div> Of course here you can change align of the menu, the theme in use and what type of menu it is (horizontal vs vertical). 6. Go to <your skin>\<styleTemplates>\<global>\'index.tpl' and find: <meta name="keywords" content="{META_KEYWORDS}" /> AFTER ADD: <script LANGUAGE="JavaScript" SRC="js/JSCookMenu.js" type="text/javascript"></SCRIPT> <LINK REL="stylesheet" HREF="js/ThemeIE/theme.css" TYPE="text/css" /> <script LANGUAGE="JavaScript" SRC="js/ThemeIE/theme.js" type="text/javascript"></SCRIPT> Here also you will have to change the theme in use if you changed it in the 'categories.tpl'. That's it ! Enjoy :-) View File Link to comment Share on other sites More sharing options...
roban Posted December 15, 2005 Share Posted December 15, 2005 Thanks. I think there's something wrong with the file you sent for download. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 What do you mean "wrong" ? I have just tried to d/l and open it and it went ok. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 I forgat to mention that if you need additional info on the javascript generating the menu or it's theme support, then you should visit: http://www.cs.ucla.edu/~heng/JSCookMenu/demo.html which is the author site and he has many nifty stuff there Also, this mod was inspired by osCommerce mod with (almost) the same name :w00t: Link to comment Share on other sites More sharing options...
roban Posted December 15, 2005 Share Posted December 15, 2005 When I download the file I get text gibberish and no zip file Link to comment Share on other sites More sharing options...
Guest aikdo Posted December 15, 2005 Share Posted December 15, 2005 tested it im geting the zip file... robin think its a local problem... make sure zip is still defined to winzip.winrar.explorer and hasn't gone astray to say notepad++ Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 i found a small bug, on my site not all main categories are display, user can only see if they go with mouse over last category. You can see here after Navigation is nothing but must display Ortung and Software. Also i see the box in IE is behind the content, in Opera and Firefox work fine. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 Actually, I don't see since you have probably changed back. Can you change it back so I can see ? I have checked this in FF and IE, but on the JSCookMenu it says this will work with all the popular browsers exactly the same. Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 ok, i have changed the theme now, sorry i have made many tests. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 Hmm, is Ortung and Software are both top level categories ? Because I can see them under Navigation. I assumed here that top level categories has father id > 0. Is this correct, dev ppl ? On the other issue, yes I see it. Try: find - cmDrawFromText ('shopHtmlMenu', 'vbl', cmThemeIE, 'ThemeIE'); and change vbl to vbr. Also I have found another bug with the small image when in subcat. I will fix it soon. Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 Hmm, is Ortung and Software are both top level categories ? Because I can see them under Navigation. I assumed here that top level categories has father id > 0. Is this correct, dev ppl ? yes it is top level 0, i have test it with other name, when i rename "Ortung" to "Artung" i can see it but all Cats after Letter "N" i can not see. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 It has nothing to do with language :-) My shop is in Hebrew and it all shows fine. Is this a live shop ? Cause I need you to send me your SQLDump of Categories to debug it. Can you do it ? Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 yes it is an live shop :-) I can send you the dump, what you need? the original sql file or csv data? How i can send you? Thank you! PS.: the IE fix will not run Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 SQL export from phpmyadmin or any other method. i've sent you my email. Is anyone else who tried the mod experienced this kind of problem ? Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 15, 2005 Share Posted December 15, 2005 OK. Go to your categories.inc.php and change the sql statement after ORDER BY to "cat_id DESC" That should fix your problem, but you will have to live with not alphabetized categories. This all happened becouse your categories ID's are not in the normal order of creation. You have probably used some tool to automaticly create them from csv or something, right ? You have also an empty name category which you should really delete. You can do that only from phpmyadmin, btw. BTW, I did not experienced problems with IE and Killer skin. I am therefore assuming that this has to do with CSS, namely "float: left" line under .colMid or something like that. Try to remove it and see what happens. Also, about the icon bug...go to the theme.js under <shop>\<js>\<themeIE> and ADD to the path in the first line /shop/ in order it to be absolute. Link to comment Share on other sites More sharing options...
Guest Posted December 16, 2005 Share Posted December 16, 2005 first, thank you very much, the menu is running. The problem with IE i have not fix to now but i work on this. Link to comment Share on other sites More sharing options...
Guest gauz Posted December 16, 2005 Share Posted December 16, 2005 Thanks its work, but my site use english & dutch and the language did'nt change when i choice to dutch language. Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2005 Share Posted December 17, 2005 This exactly what I needed. I just started working with CubeCart this week. The previous solution used this menu system and my client loved it. They were disappointed when I told them it wasn't available with Cubecart. I have imported data with CSV and I also am experiencing the problem with some menu level 0 not showing up. It was said above: This all happened becouse your categories ID's are not in the normal order of creation. You have probably used some tool to automaticly create them from csv or something, right ? So what IS the "normal order of creation? All 0 levels first and then subcategories, OR Main level, subcategory, subsubcategory, the another Main level, etc? I will recreate the category file if necessary to get the proper order and all of them showing up. I also have the same problem with IE "hiding" the flyout menus. Is there a definite fix for that? Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2005 Share Posted December 17, 2005 I fixed the IE "hidden flyout menu" problem by adding the following line to layout.css in .colLeft add: z-index: 100; This worked for me and didn't break Firefox. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 17, 2005 Share Posted December 17, 2005 I assume you did it with the Classic or Legend skin, right ? Cause I am working only in Killer and I didn't experience that problem at all. The normal order of creation, as far as I know (and please correct me if I'm wrong), is first all the top level categories and then subdirectories in no matter what order. That would set all the top level categories with the proper id's for the script to understand. BUT, you can also use the ORDER BY cat_id DESC and then reformat the output as you see fit. When I'll have more time, I'll probably add some admin control to this mod (theme, multiple language support, etc) but right now I am codding the Manual Credit Card support :lol: Link to comment Share on other sites More sharing options...
convict Posted December 17, 2005 Share Posted December 17, 2005 Nice to see my ideas in a real world Some of my current work has been killed qwizard. Look at this thread. Thank you. I would be grateful do not anything more with this category mod and do not steal any public spoken ideas please. Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2005 Share Posted December 17, 2005 gwizard, Yes I was using the legend skin. What happens with the category order if after populating the subcategories, you add a new TOP LEVEL category? I guess I'll rebuild the table and give it a try. Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 18, 2005 Share Posted December 18, 2005 Nice to see my ideas in a real world Some of my current work has been killed qwizard. Look at this thread. Thank you. I would be grateful do not anything more with this category mod and do not steal any public spoken ideas please. Hi, Convict. I am sorry our dev has clashed, as I didn't saw that post of yours and hadn't been aware that you were planning on releasing javascript menu as well. I have announced on this earlier when I released my Hebrew lang pack, you know. You could have sent me a PM explaining that you were working on it already. On the other hand, saying that I stole your idea is pure bullshit as: 1. I didn't saw it. 2. I had announced it week before. 3. EVERY major cart has dhtml menu's so you cannot claim the idea for yourself. All I did was adding 3 if clauses to your code. That's hardly "Some of my current work has been killed" as you've said. Final words: If you think you can do better - DO IT and stop whining. Link to comment Share on other sites More sharing options...
convict Posted December 18, 2005 Share Posted December 18, 2005 See another post ... do you see my annoucement and its date? Do you know something about ethics? We are NOT on Formula 1 ring, this not a quoestion of win. Most of your reasons are droll-looking :lol: Link to comment Share on other sites More sharing options...
Guest gwizard Posted December 18, 2005 Share Posted December 18, 2005 I do know alot about ethics, how this is relevant if I haven't saw your posts ? How is this relevant even if I had saw your post ? I gave you the proper credit in the code, in the forum and in the txt file attached. I didn't stole your code and claimed it for my own. When I want to build something, I do not ask for permission nor I go to the forum and look if anyone has been working on it. I just do it. To do otherwise would be a waste of time and I have 1.1.2006 deadline and much more work to do. This is the last post on the subject. Link to comment Share on other sites More sharing options...
Recommended Posts