Jump to content
Sign in to follow this  
FWR Media

[contribution] Multilayer SEO Pop Out Menu

Recommended Posts

Brilliant! Works like a charm!

That edit fixed everything.

 

you can see it at http://www.timewellspentgifts.com/demo/

 

Ok thanks for helping find that bug badur it was an odd one.

 

Basically the child category had a lower id than the parent which is odd and not something I had catered for.

 

I'm not going to update the package again until I have some solid feedback and testing here .. but.

 

I recommend all users change the following function in includes/functions/fwr_cat_functions.php

 

function buildCategoriesCache($filepath, $order_by, $languages_id) {
$result = categoriesFullScan($order_by, $languages_id);

$javamenustring = '';
while($row = tep_db_fetch_array($result)){
 $categories[$row['categories_id']] = array('id'	   => $row['categories_id'],
										 'parent'   => $row['parent_id'],
										 'sort'	 => $row['sort_order'],
										 'path'	 => '',
										 'name'	 => htmlentities($row['categories_name']));

}
tep_db_free_result($result);
foreach($categories as $cat_id => $key) {
if($key['parent'] != '0'){
( isset($categories[$key['parent']]['children']) && $categories[$key['parent']]['children'] !== NULL ? NULL : $categories[$key['parent']]['children'] = '' );
$categories[$key['parent']]['children'] .= $key['id'] . ',';
$categories[$key['id']]['path'] .= $categories[$key['parent']]['path'] . '_' . $key['id'];
} else {
$javamenustring .= '"menu_' . $key['id'] . '",';
$categories[$key['id']]['path'] .= $key['id'];
}
}
$javamenustring = rtrim  ($javamenustring, ',');
$categories['menuid_string'] = $javamenustring;
$categories['menuid_js'] =
<<<JSSCRIPT
<script language="javascript" type="text/javascript">
function get_menu_ids() {
var menuids=[$javamenustring] //Enter id(s) of SuckerTree UL menus, separated by commas
return menuids;
}
</script>
<script src="suckertree.js.php" type="text/javascript"></script>
JSSCRIPT;

// Serialize and save the $categories array
$serialized = serialize($categories);
saveSerializedCategories($filepath, $serialized, $languages_id);

$sql = "
UPDATE " . TABLE_CONFIGURATION . "
SET `configuration_value` = 'false'
WHERE `configuration_key` = 'FWR_MENU_RESET'";
tep_db_query($sql) or die('Update failed ' . mysql_error());
return $categories;
}

Edited by FWR Media

Share this post


Link to post
Share on other sites

is it possible to have it as a horizontal menu too?


I love oscommerce and OS software! I'm not a programmer, I'm only a learning boy and a translator :) I love full contribution packages!

Share this post


Link to post
Share on other sites
is it possible to have it as a horizontal menu too?

 

Not atm but I will consider it.

 

The plan for development atm is ..

 

1) Keep it to just 1 query

 

2) Add a categories sitemap driven by the same one query

 

3) Add XML sitemaps based on the same query

 

The current version has just been updated .. version 1.1.1 is totally up to date.

Share this post


Link to post
Share on other sites

Installed on my test site, easy install, no problems.

 

Thank you Robert.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Installed on my test site, easy install, no problems.

 

Thank you Robert.

 

My pleasure and thanks for the feedback.

Share this post


Link to post
Share on other sites

I "play" with this contribution ;)

 

i changed ... color / images / add a third level ...

 

all is ok

 

thank you for your time and work

Share this post


Link to post
Share on other sites
Does anyone know if Multilayer SEO Pop Out Menu can work with Show Sub-categories?

http://addons.oscommerce.com/info/885

 

Not a hope I'm afraid, Multilayer SEO Pop Out Menu is totally independent, and uses no oscommerce categories code or queries.

Share this post


Link to post
Share on other sites

If anyone is up for trying the new alpha "plugin/add on" dynamic site map for this contribution please post here and let me know.

 

What is it?

 

Using the same 1 query this builds a sitemap for your site that you could e.g. include in information, like the dynamic sitemap contribution but with no query overhead.

 

Builds a sitemap of categories plus reads all boxes and extracts the links, a good example of this is information.php where it will

show all links in that box.

 

This is currently alpha but all and any testers appreciated.

Share this post


Link to post
Share on other sites

Hi Rob.

 

This is a good idea. One query to do several things.

 

It could be extended to also read the products and then ‘Hide empty categories’ could be added to the menu and also an ‘All Products’ page could be added as well as a sitemap.

 

I have installed the menu and it worked fine (but I am waiting for the horizontal Version)

 

I would be happy to test the sitemap.

 

Ken.

Share this post


Link to post
Share on other sites

Hi Robert,

 

Thank you for this awesome contribution...installed like a charm :D

 

I seem to be having a small issue with the sort order though...I have tried both categories sort and sort_order .. basically I want the products to be displayed alphabetically (from a - z) like how it is displayed in my admin catalog section. When I try to sort with categories id I get two items that should be near the bottom appear at the top...but the rest are ok...when I sort via sort_order I get them reversed from a-z (so it displays z-a) ... I have tried changing the default sort order in my admin section from desc to asc but had no luck :(

I have even updated my buildCategoriesCache function and still no luck :(

 

 

Also when it displays the menu it displays it with this annoying border around the whole menu...I looked in my stylesheet for the site and looked in infoBox and infoBoxContents but cant see any declaration of a border....should I be looking elsewhere?

 

 

Cheers again!

Share this post


Link to post
Share on other sites
Hi Robert,

 

Thank you for this awesome contribution...installed like a charm :D

 

I seem to be having a small issue with the sort order though...I have tried both categories sort and sort_order .. basically I want the products to be displayed alphabetically (from a - z) like how it is displayed in my admin catalog section. When I try to sort with categories id I get two items that should be near the bottom appear at the top...but the rest are ok...when I sort via sort_order I get them reversed from a-z (so it displays z-a) ... I have tried changing the default sort order in my admin section from desc to asc but had no luck :(

I have even updated my buildCategoriesCache function and still no luck :(

 

 

Also when it displays the menu it displays it with this annoying border around the whole menu...I looked in my stylesheet for the site and looked in infoBox and infoBoxContents but cant see any declaration of a border....should I be looking elsewhere?

 

 

Cheers again!

 

includes/functions/fwr_cat_functions.php

 

find function categoriesFullScan()

 

Try changing ..

 

ORDER BY c.parent_id, $order_by, cDescr.categories_name

 

To ..

ORDER BY c.parent_id, cDescr.categories_name, $order_by

 

Re: styling, the css file is catalog/fwr_suckertree_css_menu.php as mentioned in the install instructions.

Edited by FWR Media

Share this post


Link to post
Share on other sites
includes/functions/fwr_cat_functions.php

 

find function categoriesFullScan()

 

Try changing ..

 

ORDER BY c.parent_id, $order_by, cDescr.categories_name

 

To ..

ORDER BY c.parent_id, cDescr.categories_name, $order_by

 

Re: styling, the css file is catalog/fwr_suckertree_css_menu.php as mentioned in the install instructions.

 

Hey mate that did the job with the sort order thank you SO much :D :D

 

Re: the stylesheet, I have even looked at that and cant find it ANYWHERE...i hope you dont mind but I sent you a screenshot of my menu and I was hoping you might be able to point me in the right direction...thanks again for everything :)

Share this post


Link to post
Share on other sites
If anyone is up for trying the new alpha "plugin/add on" dynamic site map for this contribution please post here and let me know.

 

What is it?

 

Using the same 1 query this builds a sitemap for your site that you could e.g. include in information, like the dynamic sitemap contribution but with no query overhead.

 

Builds a sitemap of categories plus reads all boxes and extracts the links, a good example of this is information.php where it will

show all links in that box.

 

This is currently alpha but all and any testers appreciated.

Hi Robert

 

Yes, I am interested in testing it.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Hi Robert

 

Yes, I am interested in testing it.

 

 

Thanks .. sent you a PM.

Share this post


Link to post
Share on other sites

New package added.

 

The menu is unversioned but does include a couple of efficiency changes.

 

The new package includes a dynamic sitemap that uses the query from the menu, so no additional overhead for categories.

 

Boxes (files in includes/boxes/) are indexed dynamically once indexed thay are stored like the menu in a serialized .ser file so little overhead and no queries at runtime.

 

A full pop out menu system and a dynamic sitemap for very little overhead.

 

Example: A user (shall remain nameless unless he pops up here) quote: -

Replacing dynamenu and sitemap MS2.2-2 with FWR SeoPopOutMenu and Sitemap has reduced database queries by over 100 and is still usable with javascript disabled.

 

Future Developments

 

Already there are two significant developments for this contribution that are working .. but under testing.

 

These two benefits are only available for PHP5 as they use DOM (not php4 DOM XML)

 

1) Full Google webmaster tools XML sitemap: -

 

  • Sitemap index
  • Sitemap Categories
  • Sitemap products

 

No overhead for most but the products sitemap requires one query to set up then no queries at runtime

 

2) A Products RSS 2.0 feed for your website (no overhead uses the products query of the above.)

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hello Robert,

 

I am using your popout menu which i like very much.

 

There is comething going wrong in the third level of one category:

 

<ul id="menu_47">
<!-- Level 0 -->
 <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47" title="Classic/Rustic">Classic/Rustic</a>
   <ul>
<!-- Level 1 -->
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_28" title="Dining Room Furniture">Dining Room Furniture</a></li>
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_29" title="Sofas">Sofas</a></li>
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_43" title="Bedroom Furniture">Bedroom Furniture</a></li>
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_44" title="Office furniture">Office furniture</a>
     <ul>
<!-- Level 2 -->
       <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=_48" title="Desks">Desks</a></li>
       <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=_49" title="Bookcases">Bookcases</a></li>
       <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=_54" title="Armchairs">Armchairs</a></li>
     </ul>
   </li>
   <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_32" title="Small furniture">Small furniture</a></li>
 </ul>
 </li>
</ul>

 

As you can see the cPath is not showing corectly.

I tried changing the sort order and looked if the parent/child paths are correct in phpadmin.

Did the necesary resets of the cache in FWR menu.

Nothing seems to help.

Another category is showing corectly in the third level, but this one alway come as cPath=_48" and not 47_44_48

 

Are ther more people that had the same problem?

 

Thanks, Steven

Share this post


Link to post
Share on other sites
Hello Robert,

 

I am using your popout menu which i like very much.

 

There is comething going wrong in the third level of one category:

 

<ul id="menu_47">
<!-- Level 0 -->
 <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47" title="Classic/Rustic">Classic/Rustic</a>
   <ul>
<!-- Level 1 -->
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_28" title="Dining Room Furniture">Dining Room Furniture</a></li>
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_29" title="Sofas">Sofas</a></li>
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_43" title="Bedroom Furniture">Bedroom Furniture</a></li>
     <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_44" title="Office furniture">Office furniture</a>
     <ul>
<!-- Level 2 -->
       <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=_48" title="Desks">Desks</a></li>
       <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=_49" title="Bookcases">Bookcases</a></li>
       <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=_54" title="Armchairs">Armchairs</a></li>
     </ul>
   </li>
   <li><a href="http://www.moveistemplo.pt/catalog/index.php?cPath=47_32" title="Small furniture">Small furniture</a></li>
 </ul>
 </li>
</ul>

 

As you can see the cPath is not showing corectly.

I tried changing the sort order and looked if the parent/child paths are correct in phpadmin.

Did the necesary resets of the cache in FWR menu.

Nothing seems to help.

Another category is showing corectly in the third level, but this one alway come as cPath=_48" and not 47_44_48

 

Are ther more people that had the same problem?

 

Thanks, Steven

 

Steven

 

Are you using the latest package? The one with the sitemap option?

 

If not then please upgrade and let me know if it works.

Share this post


Link to post
Share on other sites

I am using the last package.

Tried the old one too again, but had the same problem.

 

Strange, i did check a week ago this previous version and than it seemed working wel. Maybe the problem was there but i overlooked it.

 

BTW sitemap is working well!

Share this post


Link to post
Share on other sites
I am using the last package.

Tried the old one too again, but had the same problem.

 

Strange, i did check a week ago this previous version and than it seemed working wel. Maybe the problem was there but i overlooked it.

 

BTW sitemap is working well!

 

To help me look into this could you .zip up two tables from your DB for me please ..

 

categories and categories_description

 

and send them to admin(at)fwrmedia(dot)co(dot)uk

 

This way I'll be able to test locally.

Share this post


Link to post
Share on other sites
I am using the last package.

Tried the old one too again, but had the same problem.

 

Strange, i did check a week ago this previous version and than it seemed working wel. Maybe the problem was there but i overlooked it.

 

BTW sitemap is working well!

 

Thanks Steven for making the effort to help, I received the files and can confirm that under certain circumstances cPaths are displaying incorrectly.

 

I will work on this and report back, but just for now wanted you to know that I haven't forgotten about you.

Share this post


Link to post
Share on other sites

Hello Robert,

 

The new fwr_cat_functions.php is working well.

cPaths are showing correctly.

Very good work!

Thanks

Share this post


Link to post
Share on other sites

A new version added. Version 1.1.2

 

This is a recommended upgrade as it includes a cPath bugfix.

 

Changelog:

 

improved logic for the creation of multilayer cPaths handling an existing bug. ( Thanks Steven B )

 

(PHP5 ONLY) Added RSS 2.0 products feed (thanks to Coopco and Get-Wireless for testing for me)

 

(PHP5 ONLY) Added Google webmaster tools site map collection (thanks to Coopco and Get-Wireless for testing for me)

 

Added more commenting in the core function files.

 

Other minor changes.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Really like this contribution. Unfortunately, I am having a couple of niggling issues:

 

1. If I change the background colour of the subfolder style, it will get 'over-written' white because of the background .gif that is used as a menumarker (works fine in firefox, though)

 

2. Is there any way that a link to the main index page, specials and featured products could be incorporated?

 

Thanks for such a great contribution!

Share this post


Link to post
Share on other sites
Really like this contribution. Unfortunately, I am having a couple of niggling issues:

 

1. If I change the background colour of the subfolder style, it will get 'over-written' white because of the background .gif that is used as a menumarker (works fine in firefox, though)

 

2. Is there any way that a link to the main index page, specials and featured products could be incorporated?

 

Thanks for such a great contribution!

 

Glad you like it Richard and thanks for the kind comments.

 

1) I'm afraid I won't be offering "theme/style" support as I'd be stuck here all day and it really isn't within the bounds of "support".

 

2) Not really, the menu is highly dynamic, nothing to stop you creating a little box above or below the menu box though. Although the homepage should be in the breadcrumb.

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  

×