Jump to content
Sign in to follow this  
SteveOh

STS and DHTML Categories Support

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
Share on other sites
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>

 

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

Share this post


Link to post
Share on other sites
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

 

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 by SteveOh

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 *

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

Share this post


Link to post
Share on other sites

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 by lauraxg

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

I like I like

fairly easy to instal no problems there

just a couple questions

00000001.jpg

 

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


people please fill out your info ... I like to see the sites and it helps everyone help you greatly

Share this post


Link to post
Share on other sites

why cant we edit posts?

I figured the width thing out now I gotta get rid of the cat name (1)


people please fill out your info ... I like to see the sites and it helps everyone help you greatly

Share this post


Link to post
Share on other sites

bump


people please fill out your info ... I like to see the sites and it helps everyone help you greatly

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

00000001.jpg

 

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×