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

Yahootreemenu with ajax.

Locked

Views: 80,451

Results 161 to 180 of 290
This thread is locked. New replies are disabled.
21 Jun 2007, 9:58 AM
#161
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Yahootreemenu with ajax.

I have a feeling that this query is not going to get an answer, because Andrew Yer seems to have stopped contributing to this thread.

I have installed the Yahoo Tree Menu mod on my store, but when I click on a category it's not opening - the 'opening' image appears, whizzing round, but the categories don't expand.

But I have discovered that clicking on a category in the central 'products' area of the store fixes the problem. Once a category has been selected, the menu then works fine, but, obviously I would want the menu to work firts time every time.

Any suggestions as to how cure this problem would be very much appreciated.

Here's a link to my store - which is still under development

21 Jun 2007, 2:25 PM
#162
bgroup99 avatar

bgroup99

Zen Follower

Join Date:
Aug 2006
Posts:
197
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

I've been having the same problem. Not quite sure what to make of it.

26 Jun 2007, 4:39 PM
#163
solucionoproblemas avatar

solucionoproblemas

New Zenner

Join Date:
Dec 2006
Posts:
16
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

not sure why, but if you access to your store with

http://hohose.exphoster.com/store/

it fails when clicking on menu.However check it accessing to

http://www.hohose.exphoster.com/store/ (with leading www.)

then it works fine. I didn't have enough time to go inside the real problem, but you can solve it quickly by adding the following code in YOURTEMPLATE/common/html_header.php (around line 20)

/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
 /*redirect from http://midomain.com/whatever to http://www.midomain.com/whatever */
  /*needed for sidebox yahootreemenu with ajax */
    $thisroot = $HTTP_SERVER_VARS['HTTP_HOST'];
    $thisphp_self = $_SERVER['PHP_SELF'];

    if (substr($thisroot,0,4) != "www.") {
     header("location: http://www.{$thisroot}{$thisphp_self}");  
     exit;
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>

give it a try, i think it will solve your problem.

27 Jun 2007, 9:45 AM
#164
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

solucionoproblemas:

not sure why, but if you access to your store with

http://hohose.exphoster.com/store/

it fails when clicking on menu.However check it accessing to

http://www.hohose.exphoster.com/store/ (with leading www.)

then it works fine. I didn't have enough time to go inside the real problem, but you can solve it quickly by adding the following code in YOURTEMPLATE/common/html_header.php (around line 20)

/**

  • output main page HEAD tag and related headers/meta-tags, etc
    */
    /*redirect from http://midomain.com/whatever to http://www.midomain.com/whatever */
    /*needed for sidebox yahootreemenu with ajax */
    $thisroot = $HTTP_SERVER_VARS['HTTP_HOST'];
    $thisphp_self = $_SERVER['PHP_SELF'];

    if (substr($thisroot,0,4) != "www.") {
    header("location: http://www.{$thisroot}{$thisphp_self}");
    exit;
    }
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> ``` > > give it a try, i think it will solve your problem. solucionoproblemas

The situation is now reversed - opening http://www.hohose.exphoster.com/store/ (with leading www.) was not working when I made my original post, but without the www. it was working

I reported this to my hosting provider, and he has now reversed the situation, i.e. as you have experienced it (working with the www.) which is how things should be.

Nevertheless I appreciate your input, and I'll give it a try!!

blag

27 Jun 2007, 10:04 AM
#165
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

solucionoproblemas:

not sure why, but if you access to your store with

http://hohose.exphoster.com/store/

it fails when clicking on menu.However check it accessing to

http://www.hohose.exphoster.com/store/ (with leading www.)

then it works fine. I didn't have enough time to go inside the real problem, but you can solve it quickly by adding the following code in YOURTEMPLATE/common/html_header.php (around line 20)

/**

  • output main page HEAD tag and related headers/meta-tags, etc
    */
    /*redirect from http://midomain.com/whatever to http://www.midomain.com/whatever */
    /*needed for sidebox yahootreemenu with ajax */
    $thisroot = $HTTP_SERVER_VARS['HTTP_HOST'];
    $thisphp_self = $_SERVER['PHP_SELF'];

    if (substr($thisroot,0,4) != "www.") {
    header("location: http://www.{$thisroot}{$thisphp_self}");
    exit;
    }
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> ``` > > give it a try, i think it will solve your problem. solucionoproblemas

Many,many thanks for your assistance - that snippet of code has resolved the problem.

I really appreciate your input!!

blag

19 Jul 2007, 11:15 PM
#166
emilio avatar

emilio

New Zenner

Join Date:
May 2005
Location:
san francisco - California
Posts:
49
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Hi :smile:

I installed the yahootremenu with ajax of Andrew and it works perfectly on my 1.3.7 on my site
http://www.insitesolutions.com.br
and with some of the modifications suggested by this thread i had no problem to apply.
Now i'm installing on a second site and i decided to use a different layout for
each sidebox starting from the categories box as you may see by the image
below.
I created a new class for the categories box into \includes\templates\CUSTOM\sideboxes\tpl_categories.php and defined it into the stylesheet with the background image.
Now i need to put the header of the box as i marked in the picture attached with an arrow and i followed the thread at this link https://www.zen-cart.com/tutorials/index.php?article=135
In the first site i created i had no problem because all the sideboxes used the same background but now is getting tough :lookaroun
Do you have some idea or suggestion?
What i'm doing wrong?
Thank you

19 Jul 2007, 11:44 PM
#167
emilio avatar

emilio

New Zenner

Join Date:
May 2005
Location:
san francisco - California
Posts:
49
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

whooops sorry i did it my brain was in disguise...hehehehhe :lamo:
I post the solution so someone else may enjoy
go to includes\modules\sideboxes\YOUR_TEMPLATE\yahootreemenu.php
and just substitute the var
$title = BOX_HEADING_YAHOO_TREEMENU;
with
$title = zen_image($template->get_template_dir(BOX_HEADING_CATEGORIES, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . BOX_HEADING_CATEGORIES, HEADER_ALT_TEXT);
and there you go....
Sorry again :laugh:

20 Jul 2007, 12:07 AM
#168
enderandrew avatar

enderandrew

New Zenner

Join Date:
Jun 2007
Posts:
46
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Color me stupid, but I'm not seeing a download in the download section. In the original thread there was an attached download for a version designed for ZC 1.2.7, and I'm hoping/assuming there have been updates since then.

20 Jul 2007, 12:15 AM
#169
emilio avatar

emilio

New Zenner

Join Date:
May 2005
Location:
san francisco - California
Posts:
49
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

take it easy brother :smile:
Just click here http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_52&products_id=236
It is updated till the 1.3.6 but with some turnaround and have a look here:
http://www.zen-cart.com/forum/showthread.php?t=36268&highlight=warning&page=12
it will work as a charme even clicking into the categories
have fun

7 Aug 2007, 8:12 AM
#170
stinie avatar

stinie

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

solucionoproblemas:

not sure why, but if you access to your store with

http://hohose.exphoster.com/store/

it fails when clicking on menu.However check it accessing to

http://www.hohose.exphoster.com/store/ (with leading www.)

then it works fine. I didn't have enough time to go inside the real problem, but you can solve it quickly by adding the following code in YOURTEMPLATE/common/html_header.php (around line 20)

/**

  • output main page HEAD tag and related headers/meta-tags, etc
    */
    /*redirect from http://midomain.com/whatever to http://www.midomain.com/whatever */
    /*needed for sidebox yahootreemenu with ajax */
    $thisroot = $HTTP_SERVER_VARS['HTTP_HOST'];
    $thisphp_self = $_SERVER['PHP_SELF'];

    if (substr($thisroot,0,4) != "www.") {
    header("location: http://www.{$thisroot}{$thisphp_self}");
    exit;
    }
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> ``` > > give it a try, i think it will solve your problem.

Hello solucionoproblemas,

With my show this solution causes the login function to stop rendering. If i put the above code right before the <!DOCTYPE /> definition then I cannot login anymore. I just see a white area at the place where I should see the login area.

My shop is located at
http://natasjadeleeuwe.eu/

I am going to look for a different solution to get the YUI! menu work. For now I turn the YUI menu off until I find a solution.

Have you heared of this problem that I have before?

Kind regards,

Stinie

7 Aug 2007, 10:45 AM
#171
stinie avatar

stinie

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Dear "Categories Menu, YahooTreeMenu With AJAX" users,

Hope to find someone also installed the "Categories Menu, YahooTreeMenu With AJAX" module on Zen Cart 1.3.7.1.

I have the following problem. After installing the module and activating the layout box the menu did not open/collapse.

So I tried to figure out why. I modified /inclueds/extra_datafiles/yahootreemenu.php

Set the 'YAHOOTREEMENU_SHOW_CATEGORY_LINK' to true instead of false
// Do you want the categories names has the link?
define('YAHOOTREEMENU_SHOW_CATEGORY_LINK', true);

Now I get a warning message at the frontend

Warning: Invalid argument supplied for foreach() in /home/natasja/public_html/includes/templates/template_default/sideboxes/tpl_yahootreemenu.php on line 217

I you like you can have a look at
http://natasjadeleeuwe.eu/

Is there anybody who has experience with this kind of problem?

Cheers,

Stinie

7 Aug 2007, 4:35 PM
#172
emilio avatar

emilio

New Zenner

Join Date:
May 2005
Location:
san francisco - California
Posts:
49
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Hi Stinie
I guess that if you read the complete thread of Andrew you get the solution

Is there a workaround for the warning that shows on the home page?

The workaround is:

In the includes/templates/template_default/sideboxes/tpl_yahootreemenu.php
find (~ 217 line) the code

   foreach ($categories[$expanded[$i]]['child_list'] as $cat) {

$ret .= renderNode($categories, $cat, $expanded[$i], $categories[$cat]['child_count'], ($categories[$cat]['categories_id'] == $expanded[$i+1]) and ($i < $iter_num - 1), $cat == $expanded[$i + 1], YAHOOTREEMENU_WITHOUT_AJAX);
}

And replace it with the code:

  if (is_array($categories[$expanded[$i]]['child_list'])) {
    foreach ($categories[$expanded[$i]]['child_list'] as $cat) {

$ret .= renderNode($categories, $cat, $expanded[$i], $categories[$cat]['child_count'], ($categories[$cat]['categories_id'] == $expanded[$i+1]) and ($i < $iter_num - 1), $cat == $expanded[$i + 1], YAHOOTREEMENU_WITHOUT_AJAX);
}
}this can be found in

http://www.zen-cart.com/forum/archive/index.php/t-36268.html

about the problem of solucionoproblema i have seen the same problem in my site .
I have a double url www.geofloripa.com and geofloripa.com without www
and same for me when i try the link without www my categories won't expand.
I've been googling a little and found something that is not a real solution to the problem but could solve it and also improve the google page ranking
here is what i've found

It’s never a good idea to have duplicates of the same page indexed by Google. Why’s that? Because they will be placed into the Supplemental Index.
What does this mean? As described by Wikipedia, “Supplemental Result is a supplementry Google search Index of less important web pages according to the Google’s PageRank”.
One of the easiest ways to ensure that you have as little duplicate pages as possible in Google’s web database is to use the same base host name for your website.
This means that you either have URLs that look like this: http://example.com/ or this: http://www.example.com/ Both URLs would go to the same page, but to a robot, they are different sites entirely and so one would appear as a duplicate of the other.
In order to ensure that you only use one, all you need to do is modify your site’s .htaccess file (this is simply a file named .htaccess that you place in your site’s /public_html/ folder.) I personally prefer forcing www. in the URL rather than removing it because that string is commonly associated with a website, so in my opinion, the URL is more permanently imprinted into the visitor’s mind.
In the .htaccess file, you need to enter the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
This will force any visits to your site that does not use www. to use it. If someone visits http://example.com/index.php?do=blog , it will redirect to http://www.example.com/index.php?do=blog
And that’s it! It’s also backwards compatible, so any links that point to your site that do not use www. will simply redirect to the www. version of your site’s URL.This could be found here at this link

http://www.blogherald.com/2007/06/07/forcing-www-in-the-url-helps-dig-you-out-of-googles-supplemental-index/

Well this means, i guess, having a speech with my host and i didn' t do it still, but i guess that may solve the issue
If someone has more information please give a suggestion
Thank you

7 Aug 2007, 5:46 PM
#173
stinie avatar

stinie

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Hello "Zen Cart Support Team",

Both your answers were helpful.
With the your tips and the tips from http://www.zen-cart.com/forum/archive/index.php/t-36268.html I could solve my first problem. I was not aware of that thread. Thanks for the tip.

The .htaccess rewrite rule to force http://natasjadeleeuwe.eu/ into http://www.natasjadeleeuwe.eu/ works very well. I did not know that Google sees http://natasjadeleeuwe.eu/ and http://www.natasjadeleeuwe.eu/ as two different entries. So I printed the article that you send me to read more about the subject. Thanks for the tip.

Right now I still cannot open/collapse the menu (tree). I will look into that later. It is evening in Rotterdam and I have to do other things. Tomorrow (or tonight) I will do more reading and hopefully I will find the right answer myself. Otherwise I will post another question. Maybe I will get help again like I got now.

Cheers,
Stinie

8 Aug 2007, 6:22 AM
#174
solucionoproblemas avatar

solucionoproblemas

New Zenner

Join Date:
Dec 2006
Posts:
16
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

please, verify that both configure.php (catalog and admin) have the right HTTP_SERVER and HTTPS_SERVER defines. If you have apache with rewrite mod enabled then redirect yoursite.com to https://www.yoursite.com and set http://www.yoursite.com into HTTP_SERVER. If HTTP_SERVER has the wrong value (eg: http://yoursite.com) then yahootreemenu will not expand.

My former code was a fix for a site under apache without mod_rewrite and with leading www in name. In that case the menu failed when accesing with domain without leading www, so just fixed it with that rought piece of code.

Hope that helps

8 Aug 2007, 12:27 PM
#175
stinie avatar

stinie

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Dear solucionoproblemas,

Thaks for the last tip:

--- start ---
please, verify that both configure.php (catalog and admin) have the right HTTP_SERVER and HTTPS_SERVER defines. If you have apache with rewrite mod enabled then redirect yoursite.com to https://www.yoursite.com and set http://www.yoursite.com into HTTP_SERVER. If HTTP_SERVER has the wrong value (eg: http://yoursite.com) then yahootreemenu will not expand.
--- end ---

It was really helpful, because I could not login into the Admin Interface anymore. I was redirected from http://natasjadeleeuwe.eu/admin/ to http://www.natasjadeleeuwe.eu/admin/ due to the apache redirect in my .htaccess file in the root of the webapp.

The normal login box showd up, but after typing my correct usernam/password combination I could not log into the admin gui.

After your tip (modify the configure.php files) I could login again. Thanks a lot.

My yahoo tree menu still does not work. I do not know why and I also cannot give the right questions.

I post a new topic for the new question. Otherwise I will get confused. Many thanks for the tips I already received from you people.

Cheers,

Stinie

8 Aug 2007, 2:28 PM
#176
stinie avatar

stinie

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Hi there,

"One step at a time" and "divide and conquer" is my motto, but to be honest it is not easy. I am trying to find out why my Yahootreemenu with ajax does not work with Zen Cart 1.3.7.1.

In recent posts I already got some really good tips. The menu still does not render properly on http://www.natasjadeleeuwe.eu/ but the warnings are gone and I can log into the system again. The menu does not open/collapse though.

I looked into the source code of the page and I found out that

1.) The css file and the javascript file are not in the head of the xhtml file

Does anyone know how I can get the .css file and the .javascript files into the haead of my html document (where they belong)?

2.) The javascript does not hold my products, (I have not categories yet, only products) but it does not show any products. No wonder that the menu does not open when I click on it. It has not children.

Does anyone know if the Yahootreemenu with ajax has maybe conflicts with other zencart modules or does not work with Zen Cart 1.3.7.1. yet?

Or does anyone know why I I have to configure some extra things in the admin GUI of zencart in order to get the menu to work properly?

I put the source (html) code of the menu at the bottom of this thread:

Cheers,

Stinie

<!--// bof: yahootreemenu //--> <div class="leftBoxContainer" id="yahootreemenu" style="width: 150px"> <h3 class="leftBoxHeading" id="yahootreemenuHeading">YahooMenu</h3> <div id="yahootreemenuContent" class="sideBoxContent"> <link rel="stylesheet" type="text/css" href="includes/templates/template_default/css/tree.css"> <script type="text/javascript" src="includes/templates/template_default/jscript/YAHOO.js"></script> <script type="text/javascript" src="includes/templates/template_default/jscript/treeview.js"></script> <script type="text/javascript" src="includes/templates/template_default/jscript/loadNodes.js"></script> <script type="text/javascript"> var tree; var nodes = new Array(); var nodeIndex =0; var root; var tmpNode; function treeInit() { tree = new YAHOO.widget.TreeView("yahootreemenuContent"); root = tree.getRoot(); loadTree(); tree.draw(); } function loadTree() { } function loadDataForNode(node, onCompleteCallback) { var request = "load_branch.php?cPath=" + node.data.id; makeRequest(request, node, onCompleteCallback); } treeInit(); </script> <noscript> </noscript> <hr id="catBoxDivider" /> <a class="category-links" href="http://www.natasjadeleeuwe.eu/index.php?main_page=products_new">New Products ...</a><br /> <a class="category-links" href="http://www.natasjadeleeuwe.eu/index.php?main_page=products_all">All Products ...</a></div> </div> <!--// eof: yahootreemenu //-->
16 Aug 2007, 10:40 AM
#177
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

stinie

I don't have an answer to your problem, but I do have a suggestion. Zen Cart is very finickitty about the location of javascript files. If you have just one javascript file in the wrong place it can prevent a whole load of other files from loading/working.

I can't remember offhand which is the specific location that overrides other javascript files, but if you do a search for posts by 'ckosloff' and probably in relation to 'popup attribute images' you will find more definitive guidance. (I have also discussed this topic elsewhere, so searches on my name will probably get you to the same topic)

I hope this helps

16 Aug 2007, 1:36 PM
#178
emilio avatar

emilio

New Zenner

Join Date:
May 2005
Location:
san francisco - California
Posts:
49
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

Hi Stinie
How are you?
I have the zen 1.3.7.1 (the latest) and the yahootreemenu is working perfectly
in explorer and firefox.
I just made that little modification loading that additional code for the .htaccess in the root of my site, as i said into my previous post, and it just worked...
So you missed something or you didn't work correctly on the override system
for your CUSTOM template.
You can see it by yourself going to the site i just released, http://geofloripa.com
Just don't give up and you will get it done :smile:

16 Aug 2007, 8:04 PM
#179
andrew_yer avatar

andrew_yer

New Zenner

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

Re: Yahootreemenu with ajax.

Hi stinie!

I've got an javascript error on your home page:
"YAHOO is not defined"

There is the line:

<script type="text/javascript" src="includes/templates/template_default/jscript/YAHOO.js"></script>

on the page.

Well, let's request the
http://www.natasjadeleeuwe.eu/includes/templates/template_default/jscript/YAHOO.js

Have got:
403 forbidden

I think you understand where is the problem ;)

19 Aug 2007, 4:52 AM
#180
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: Yahootreemenu with ajax.

This modules display very good on Firefox 2.0 but it is very ugly when display in IE.
Can someone know this problem?

This is image on Firefox:

This is image on IE: