Zen Cart Logo
Forums / All Other Contributions/Addons / Yahootreemenu with ajax.

Yahootreemenu with ajax.

Locked

Views: 80,451

Results 61 to 80 of 290
This thread is locked. New replies are disabled.
29 Nov 2006, 5:41 PM
#61
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Yahootreemenu with ajax.

pensive612:

Anyone have any ideas on this one yet?
Yes, of course. :)

In the tpl_yahootreemenu.php found the code:

if ($categories[$cat]['count'] > 0) {
$link = '", href:"index.php?main_page=index&cPath='. $categories[$cat]['path'] . '"';
} else {
$link = '"';
}

And change it to

$link = '", href:"index.php?main_page=index&cPath='. $categories[$cat]['path'] . '"';

In the loadNodes.js found the code:

if (productsCount > 0) {
tmpNode = new YAHOO.widget.MenuNode({label: root_node.item(i).getElementsByTagName('name').item(0).firstChild.data, href: "index.php?main_page=index&cPath=" + path }, node, false);
} else {
tmpNode = new YAHOO.widget.MenuNode({label: root_node.item(i).getElementsByTagName('name').item(0).firstChild.data }, node, false);
}

And change it to:

tmpNode = new YAHOO.widget.MenuNode({label: root_node.item(i).getElementsByTagName('name').item(0).firstChild.data, href: "index.php?main_page=index&cPath=" + path }, node, false);

29 Nov 2006, 5:48 PM
#62
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

BTW, I have published another menu box in the osCommerce contributions.
YATM - Yet Another Tree Menu. You can get it here:
http://www.oscommerce.com/community/contributions,4683
If somebody found it usefull, I'll port it into Zen-Cart.

29 Nov 2006, 8:56 PM
#63
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Thank you so much Andrew! I'm on it...

and yes, the Tigra Menu would be a great mod for ZenCart.

thanks for all your hard work.

29 Nov 2006, 9:18 PM
#64
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Andrew, okay the code is getting really close.

but if i add the javascript changes, it stops all categories from displaying in the sidebox. if i don't add the javascript. the categories load. and they link to the pages, but don't open the hierarchy at the same time...

that's what i've found so far...

i'll keep messing around.

thanks again.

30 Nov 2006, 9:55 AM
#65
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

pensive612:

Andrew, okay the code is getting really close.
but if i add the javascript changes, it stops all categories from displaying in the sidebox.

May be you put some error into the javascript. Does your browser show some messages about an error? I have made that changes at the demo website http://zen-cart.org.ua. Does it work as you need?

BTW, to expand the category you have to click on the triangle at the left side of the categories name.

30 Nov 2006, 10:02 AM
#66
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

aah... that was the issue. i was hoping the category link would do both, expand, and take to the sub-category page, like the original category sidebox.

if that's still possible, i'd love to know the difference in code.

but regardless, thank you so much for your time... i really appreciate it.

30 Nov 2006, 11:41 AM
#67
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

pensive612:

if that's still possible, i'd love to know the difference in code.

Please, try once more on the zen-cart.org.ua. Is this better?
I'll give you the result code.

30 Nov 2006, 12:03 PM
#68
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Please, try once more on the zen-cart.org.ua. Is this better?
I'll give you the result code.

absolutely perfect..!

30 Nov 2006, 2:42 PM
#69
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

pensive612:

absolutely perfect..!
Take it, please.

30 Nov 2006, 10:37 PM
#70
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Thanks Andrew. I noticed that these are the files for the 1.27 ver. of ZenCart. I'm using 1.36.

So, I commented out the same lines in the 1.36 versions, and its preventing the categories from showing up at all. Is there something else I should change to make this 1.36 compatible?

Sorry i'm making this so difficult.

Thanks again for your help.

2 Dec 2006, 3:17 PM
#71
flaming avatar

flaming

New Zenner

Join Date:
Nov 2005
Posts:
20
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Andrew_Yer:

Yes, of course. :)

In the tpl_yahootreemenu.php found the code:

if ($categories[$cat]['count'] > 0) {
$link = '", href:"index.php?main_page=index&cPath='. $categories[$cat]['path'] . '"';
} else {
$link = '"';
}

And change it to

$link = '", href:"index.php?main_page=index&cPath='. $categories[$cat]['path'] . '"';

In the loadNodes.js found the code:

if (productsCount > 0) {
tmpNode = new YAHOO.widget.MenuNode({label: root_node.item(i).getElementsByTagName('name').item(0).firstChild.data, href: "index.php?main_page=index&cPath=" + path }, node, false);
} else {
tmpNode = new YAHOO.widget.MenuNode({label: root_node.item(i).getElementsByTagName('name').item(0).firstChild.data }, node, false);
}

And change it to:

tmpNode = new YAHOO.widget.MenuNode({label: root_node.item(i).getElementsByTagName('name').item(0).firstChild.data, href: "index.php?main_page=index&cPath=" + path }, node, false);

Hi,

Appologies for what may be a really silly question, but do I completely replace the following section of code

if ($categories[$cat]['count'] > 0) {
$link = '", href:"index.php?main_page=index&cPath='. $categories[$cat]['path'] . '"';
} else {
$link = '"';
}

With this little bit below

$link = '", href:"index.php?main_page=index&cPath='. $categories[$cat]['path'] . '"';

And then the same for the following section??

I am a newby, sorry.

F

3 Dec 2006, 3:27 PM
#72
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Yahootreemenu with ajax.

I have read this entire thread and the readme for this mod (v. v.0.3a.1) and then installed on a fresh ZC 1.36 shop.

But I observe categories are not displaying in the "Yahoo Menu" sidebox. "All Products" and "New Products" links continue to display. Any recommends?

Shoud I uninstall and go with zc_1.2.7_0.1b version?

(note this is a test shop, so to keep it simple I have two categories, each containing two products and no subcategories).

Some questions and highlights...

In the readme for:
YahooTreeMenuWithAJAX for Zen-Cart v. 1.3.0.2 v.0.3a.1
Updated by: Seethrou [email protected] (2006-08-15)

It says:

For compatability with ZC v1.3.x, in the file:
includes/templates/template_default/tpl_yahootreemenu.php

For the following line of code:
. ' tree = new YAHOO.widget.TreeView("yahooTreeMenu");' . "\n"

Replace by the lines below:

// Replaced yahooTreeMenu by yahootreemenuContent for v1.3.x override
. ' tree = new YAHOO.widget.TreeView("yahootreemenuContent");' . "\n"

Questions:

  1. I assume it is meant to place tpl_yahootreemenu.php in:
    includes/templates/template_default/sideboxes/
    (or includes/templates/YOUR_TEMPLATE/sideboxes/)

  2. Is the above edit still required? The version I downloaded (v 1.3.0.2 v0.3a.1) shows that edit is already impemented.

  3. In general does this version of the YTM support Zen Cart v.1.36, either out-of the box or requiring patches?

  4. Also I see the following commented out section at the top of /sideboxes/tpl_yahootreemenu.php

*/

$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

/**

  • // Replaced with v1.3.x override
  • $content = '<div id="yahooTreeMenu"></div>' . "\n";
  • // Moved to CSS override directory
  • $content = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'css') . '/tree.css">' . "\n";
  • // Moved to jscript override directory
  • $content .= '<script type="text/javascript" src="' . $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'jscript'). '/YAHOO.js"></script>' . "\n"
  •       .  '<script type="text/javascript" src="' . $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'jscript'). '/treeview.js"></script>' . "\n"
    
  • . '<script type="text/javascript" src="' . $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'jscript'). '/loadNodes.js"></script>' . "\n";
    */

What is the source for this commented out code reference? From an earlier version of the mod? If so, which version?

  1. I see andrew states that moving the three JS files to the override firectory is not recommended. So does this updated mod (v.0.3a.1) work if placing the files in includes/templates/template_default/ ?

  2. And same question regarding the css file?

Or as the above commented out code might suggest does this update REQUIRE installing those files in override directories:
includes/templates/YOUR_TEMPLATE/jscript/
includes/templates/YOUR_TEMPLATE/css/

But then does performance suffer as indicated by andrew previously in this thread?

This thread is a bit confusing as I see different mentions of seethrou's version v. zc_1.3.0.2 v.0.3a.1 (2006-08-15) and also andrew_yer's more recent v. zc_1.2.7_0.1b (08-31-06).

And I see various patches offered.

Are any of the recent patches posted in this thread (by andrew) intended only for v. zc_1.2.7_0.1b ? Or do they also apply to v. zc_1.3.0.2 v.0.3a.1 ?

When posting a patch or a recommendation please specifically state which version of the mod it is intended for and which version of Zen Cart. Otherwise confusion is created.

I've visited Andrew's site at http://zen-cart.org.ua/
Is this using mod version v.0.3a.1 or zc_1.2.7_0.1b ?

Anyone have a URL for a demo to observe behavior of the other YTM version?

And I understand there is a non-ajax version of this YTM mod. Anyone have a demo URL?

And what are the merits (pros and cons) of using the ajax menu version in displaying the categories/subcats in the YTM sidebox, versus the non ajax version?

To lessen the confusion it might be best to merge the documentation for both mod versions? Or if not, then split the threads to support each mod independently. Just a recommendation.

Thanks,
Woody

3 Dec 2006, 3:47 PM
#73
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Yahootreemenu with ajax.

bgroup99:

A follow up question:

Amy shop (http://shop.thebricktongroup.com/) I have the Ajax Menu Mod working except for one detail. The "accessories" category doesn't open to display subcategories in it when I click on it. All the other top level categories display their subcategories when clicked on, but not accessories. What is wrong? Does it have too many subcategories?

bgroup-

I visited your site to check out your YTM implementation but it appears you have reverted to using default Zen Cart categories menu?

Did you not solve your issues with the YTM mod? Which version of the YTM od did you try? And which version Zen Cart are your running/

Woody

3 Dec 2006, 4:07 PM
#74
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Yahootreemenu with ajax.

magicpants:

Okay, I'm officially baffled.

How do you style the selected category? For some reason, right now the selected category is almost exactly the same as the others, only a tiny bit smaller. Kinda strange!

I'm looking through the tree.css, putting in font-size: 5.0em; under all the classes and not seeing any changes! What css class should I be altering?

Hi Magic-

Did you find your answer? If so what was the CSS solution? Which version of YTM mod do you have installed?

Wishing I could locate a working demo of the ajax version of YTM on Zen Cart 1.36 site somewhere.

I'm not sure which version of YTM mod or what version of Zen Cart Andrew is running here: http://zen-cart.org.ua/

The source JS appears to be a ajax version. But not sure.

Navigating his menu and then viewing source I noted that when a parent category is selected and then emphasized the source shows following class applied to the chosen category menu item:

class="category-subs-parent"

along with:

class="category-top"

Whereas a non-selected category menu item will only show the following class applied:

class="category-top"

Does this apply to your question?

My problem is I cannot get the categories to display in the YTM sidebox at all. I'm assuming CSS related?

Trying YTM v.0.3a.1 on Zen Cart 1.36. Maybe I should uninstall and install zc_1.2.7_0.1b (with additional patches)?

Woody

3 Dec 2006, 6:02 PM
#75
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

First, a little bit of history. I had tried ytm_zc_1.2.7_0.1b in ZC v1.2.6 or v1.2.7 and it works. (But as discussed before, it don't show the sub categories. And also for the override, if a ZC system which used more than one templates at the same time, e.g. for multi languages environments. Then it will difficult to have difficult display effect for each template.)

However in ZC v1.3.x, the ytm_zc_1.2.7_0.1b not work directly for the templates based on template_default, for example the Future_Zen. And since the module not updated for several months,
this is why I updated it to ytm_v.0.3a.1.

And ytm_v.0.3a.1 only addressed the v1.3.x template compatible problem and the override. Therefore still with other problem if it existed before.

In ZC v1.3.6, I have already installed and tested. It works in my test site according to the readme and the discussion above.

Just copy the files and directly in the package of ytm_v.0.3a.1 to the ZC install directly.
/includes/./.
/categories.php

And as for the override, just copy the css file and the images for the menu to its override directory.
includes/templates/YOUR_TEMPLATE/css/stylesheet_tree.css
includes/templates/YOUR_TEMPLATE/images/menu/.

Note:

  1. As Andrew stated previous in this thread, it have the performance problem for ytm_v.0.3a.1. For the jscript about 16K will not cached and become the overhead for each page rendered.

  2. For ZC v1.3.6 offical release, in the category sidebox file, there are some code changes which different from before of v1.3.5 or v1.3.0.2. Therefore the ytm will need another update if possible.

As I don't have enough time recently, my steps are slowed down and can't respond to some other topics and the pm which ask for helps.

And hope that Andrew will review the module or update it if possible. :smile:

.

3 Dec 2006, 6:06 PM
#76
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Yahootreemenu with ajax.

Regarding running the YTM w/ ajax 1.3.0.2 v0.3a.1 mod on Zen Cart 1.36...

I see at the top of categories.php file (which is uploaded to the root of the shop):

require('includes/application_top.php');

Header("Content-Type: application/xml; charset=" . CHARSET);
Header("Content-disposition: inline; filename=categories.xml");

echo '<?xml version="1.0" encoding="' . CHARSET . '"?>';

Anyone aware if this YTM mod has issues with the version of application_top included with Zen Cart 1.36?

Any patches needed ro make this version run on Zen Cart v.1.36?

Or any ideas why I may not be seeing categories displayed in my YTM sidebox. I have double checked the uploading of files to proper locations.

I observe the same issue with Firefox2 and IE6.

When I disable scripting in browser I see the category links as normal (so at the very least the <noscript> functionality of YTM mod is working).

Anyone have the previous 1.3.0.2 v0.3a mod version? So I can do a compare with 1.3.0.2 v0.3a1 version and see if any diffs that might relate to issue?

Thanks,
Woody

3 Dec 2006, 6:23 PM
#77
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Yahootreemenu with ajax.

seethrou:

Thanks for the follow-up and update on the mod history. Yes I noted at the end of the readme explanation of reasons for update from a to a1 (including supporting newer CSS based templates). Thanks for clarification.

I'm a bit confused where you state:

In ZC v1.3.6, I have already installed and tested. It works in my test site according to the readme and the discussion above.

But then you state:

For ZC v1.3.6 offical release, in the category sidebox file, there are some code changes which different from before of v1.3.5 or v1.3.0.2. Therefore the ytm will need another update if possible.

Anyone with a URL for an english language based shop running the YTM a1 mod on Zen Cart 1.36 which I could check out?

I've had success with ajax widgets before. Not sure why issue now.

Or can anyone suggest a good JS based (but non-ajax) categories sidebox menu system which is supported on Zen Cart 1.36?

Thanks,
Woody

3 Dec 2006, 6:41 PM
#78
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Well,
I haven't a free time, but I'll try to make new release of the YTM by the next weekend.

3 Dec 2006, 6:45 PM
#79
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Woodymon:

But then you state:

Quote:
For ZC v1.3.6 offical release, in the category sidebox file, there are some code changes which different from before of v1.3.5 or v1.3.0.2. Therefore the ytm will need another update if possible.
The official ZC v1.3.6 released files for the Category Sidebox had changed and the add on module should update it if possible.
And the ytm_v.0.3a.1 only updated for or before ZC v1.3.0.2. :P

.

3 Dec 2006, 6:47 PM
#80
andrew_yer avatar

andrew_yer

New Zenner

Join Date:
Feb 2006
Posts:
59
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Woodymon:
Could you provide the URL of your website with YATM installed?