Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

STS and DHTML Categories Support


SteveOh

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!

Link to comment
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>

Link to comment
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

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

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
Share on other sites

  • 4 weeks later...

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

  • 3 months later...
  • 4 weeks later...

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?

Link to comment
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

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...