SteveOh Posted March 16, 2005 Share Posted March 16, 2005 Here's an addon that allows the DHTML Categories Menu work with STS DHTML Categories Menu contrib: http://www.oscommerce.com/community/contributions,2844 STS Contrib: http://www.oscommerce.com/community/contributions,1524 ADDON: This is an addon to STS to work with Categories Menu Addon found here: http://www.oscommerce.com/community/contributions,2844 OPEN sts_user_code.php: FIND: $template['catmenu'] = $sts_block['catmenu']; ADD AFTER: $sts_block_name = 'dhtmlmenu'; require(STS_START_CAPTURE); echo '<script language="JavaScript" src="external/jscookmenu/jscookmenu.js"></script>'; echo '<link rel="stylesheet" href="external/jscookmenu/themeie/theme.css" type="text/css">'; echo '<script language="javascript" src="external/jscookmenu/themeie/theme.js"></script>'; echo '<script language="JavaScript" type="text/javascript">' . "n"; echo '<!--' . "n"; echo ' cmDraw('mainmenu', menuID, 'vbr', cmThemeIE, 'themeie');' . "n"; echo ' //-->' . "n"; echo '</script>' . "n"; require(STS_STOP_CAPTURE); $template['dhtmlmenu'] = $sts_block['dhtmlmenu']; Let me know if there are any problems Enjoy! Quote Link to comment Share on other sites More sharing options...
SteveOh Posted March 17, 2005 Author Share Posted March 17, 2005 One more thing.... You have to add the newly created tag to all your template files beside $categorybox example: FIND (in one of your STS template files): <p><font size="1" face="Arial, Helvetica, sans-serif">$categorybox</font></p> REPLACE WITH: <p><font size="1" face="Arial, Helvetica, sans-serif">$categorybox $dhtmlmenu</font></p> Quote Link to comment Share on other sites More sharing options...
mbianchi Posted March 17, 2005 Share Posted March 17, 2005 One more thing.... You have to add the newly created tag to all your template files beside $categorybox example: FIND (in one of your STS template files): <p><font size="1" face="Arial, Helvetica, sans-serif">$categorybox</font></p> REPLACE WITH: <p><font size="1" face="Arial, Helvetica, sans-serif">$categorybox $dhtmlmenu</font></p> <{POST_SNAPBACK}> I tried to add this but when I go to my homepage I now get: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/asiancul/public_html/includes/sts_user_code.php on line 42 What could it be? Here is line 42: echo ' cmDraw('mainmenu', menuID, 'vbr', cmThemeIE, 'themeie');' . "n"; Thanks! Mark Quote Link to comment Share on other sites More sharing options...
SteveOh Posted March 17, 2005 Author Share Posted March 17, 2005 (edited) I tried to add this but when I go to my homepage I now get: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/asiancul/public_html/includes/sts_user_code.php on line 42 What could it be? Here is line 42: echo ' cmDraw('mainmenu', menuID, 'vbr', cmThemeIE, 'themeie');' . "n"; Thanks! Mark <{POST_SNAPBACK}> Sorry, the messageboard took away the backslashes from that line. Here it is again (using the code block as I should have in the first post) $sts_block_name = 'dhtmlmenu'; require(STS_START_CAPTURE); echo '<script language="JavaScript" src="external/jscookmenu/jscookmenu.js"></script>'; echo '<link rel="stylesheet" href="external/jscookmenu/themeie/theme.css" type="text/css">'; echo '<script language="javascript" src="external/jscookmenu/themeie/theme.js"></script>'; echo '<script language="JavaScript" type="text/javascript">' . "\n"; echo '<!--' . "\n"; echo ' cmDraw(\'mainmenu\', menuID, \'vbr\', cmThemeIE, \'themeie\');' . "\n"; echo ' //-->' . "\n"; echo '</script>' . "\n"; require(STS_STOP_CAPTURE); $template['dhtmlmenu'] = $sts_block['dhtmlmenu']; Just to highlight the error line in particular: echo ' cmDraw(\'mainmenu\', menuID, \'vbr\', cmThemeIE, \'themeie\');' . "\n"; Notice the backslashes before the single quotes. Should fix your problem A working example: http://www.paintandpalette.org * I wish we could edit our topic posts :s * Edited March 17, 2005 by SteveOh Quote Link to comment Share on other sites More sharing options...
darkangel Posted March 17, 2005 Share Posted March 17, 2005 Yo SteveOh, That code sure did help, I was looking for something like that for my categories and finally you came up with it. I appreciate the time and effort you have put to this.. Great Work, Hurray! Dark Quote Link to comment Share on other sites More sharing options...
chrisr63 Posted March 29, 2005 Share Posted March 29, 2005 Hi, Thanks for this. Just managed to get it all working on my site thanks to this help. As someone with no programming skills, where do I look to change the colour of the background on the dynamic boxes that are generated - the default blue clashes with the design of the rest of my site? Thanks Chris Quote Link to comment Share on other sites More sharing options...
Twizted Posted April 15, 2005 Share Posted April 15, 2005 I am using this.. Just installed it actually... You can see it at http://www.dragonmodz.net But... I am wanting to put a bullet beside the catagories (Like my Information Box)... how would this be done? I have looked and looked at the code.. and I cant figure it out lol... Please advise.. ;) Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2005 Share Posted April 17, 2005 Hi guys, I would like to use the DHTML Menu for my categories (I'd like to run it horizontally in my header...that part was easy!), but since I don't have subcategories, I wanted to list the products instead. So I was wondering if there was an easy way to do this... CATEGORY 1 | CATEGORY 2 | etc. Product 1 Product 2 Product 3 etc... I tried merging the Simple Category/Product Tree module with this one, but I don't have enough coding experience to get it working. Can anyone help with this? :'( Phil Quote Link to comment Share on other sites More sharing options...
Guest Posted June 15, 2005 Share Posted June 15, 2005 Sorry, the messageboard took away the backslashes from that line. Here it is again (using the code block as I should have in the first post) $sts_block_name = 'dhtmlmenu'; require(STS_START_CAPTURE); echo '<script language="JavaScript" src="external/jscookmenu/jscookmenu.js"></script>'; echo '<link rel="stylesheet" href="external/jscookmenu/themeie/theme.css" type="text/css">'; echo '<script language="javascript" src="external/jscookmenu/themeie/theme.js"></script>'; echo '<script language="JavaScript" type="text/javascript">' . "\n"; echo '<!--' . "\n"; echo ' cmDraw(\'mainmenu\', menuID, \'vbr\', cmThemeIE, \'themeie\');' . "\n"; echo ' //-->' . "\n"; echo '</script>' . "\n"; require(STS_STOP_CAPTURE); $template['dhtmlmenu'] = $sts_block['dhtmlmenu']; Just to highlight the error line in particular: echo ' cmDraw(\'mainmenu\', menuID, \'vbr\', cmThemeIE, \'themeie\');' . "\n"; Notice the backslashes before the single quotes. Should fix your problem A working example: http://www.paintandpalette.org * I wish we could edit our topic posts :s * <{POST_SNAPBACK}> This is a great contribution but I can't get it to work with STS. I made all the changes....with the backslashes and everything but now i get this error: Parse error: parse error, unexpected T_FUNCTION in /home/.nathaniel/maccimizer/hausofbooks.com/oscom/includes/sts_user_code.php on line 55 And here is what is on line 55: function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) { Any ideas?? Thanks, Rob Quote Link to comment Share on other sites More sharing options...
lauraxg Posted July 10, 2005 Share Posted July 10, 2005 (edited) Thanks this contrib is awsome !!!!! :) I have a special request I'm trying to do the same for Optional Related Products 1.0 it works fine when I turn off STS templates but it needs a fix like this one for DHTML menu... would anyone be able to help? I need to have an $ comand so that I can implement it into all my sts template pages? can anyone help? here's my site: My catalog Edited July 10, 2005 by lauraxg Quote Link to comment Share on other sites More sharing options...
Kickn Posted October 14, 2005 Share Posted October 14, 2005 Did you get Optional Related Products working with STS? Quote Link to comment Share on other sites More sharing options...
afmaury Posted November 11, 2005 Share Posted November 11, 2005 I have been trying to get this working and am partially successful. The categories show up and the subcategories drop-down. But I can't get the CSS to style the script at all in Internet Explorer. It works fine in Mozilla. Does anyone have any ideas on how to fix this? Quote Link to comment Share on other sites More sharing options...
DiMiT Posted November 12, 2005 Share Posted November 12, 2005 I like I like fairly easy to instal no problems there just a couple questions top arrow I wanna get rid of the light blue and the 1 I got rid of the catagories name but that didnt fix it as well how do I make the menu cats have a longer width? anyone can help would be greatly appreciated thanks in advance Quote people please fill out your info ... I like to see the sites and it helps everyone help you greatly Link to comment Share on other sites More sharing options...
DiMiT Posted November 12, 2005 Share Posted November 12, 2005 why cant we edit posts? I figured the width thing out now I gotta get rid of the cat name (1) Quote people please fill out your info ... I like to see the sites and it helps everyone help you greatly Link to comment Share on other sites More sharing options...
DiMiT Posted November 12, 2005 Share Posted November 12, 2005 bump Quote people please fill out your info ... I like to see the sites and it helps everyone help you greatly Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2006 Share Posted January 31, 2006 Someone happen like me? Dhtml menu with sts, in IE work good, in firefox not, windows are not beside main menu but botton... and seam cant read css file... Hope you understand, because my english is not perfect. Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2006 Share Posted January 31, 2006 You need mod in classes boxes.php, and after categories.php, to me work fine with title, the problem that menu work with IE, not with firefox, and to you? I like I like fairly easy to instal no problems there just a couple questions top arrow I wanna get rid of the light blue and the 1 I got rid of the catagories name but that didnt fix it as well how do I make the menu cats have a longer width? anyone can help would be greatly appreciated thanks in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.