Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sitemap SEO


Jack_mcs

Recommended Posts

Hi. Great add-on. I'm using the "Enable & Disable Categories" contribution and was wondering what do I need to change to force the sitemap to not display the hidden categories. Also, I want to display only manufacturers that have linked products and hide those that have no products. How can I do that?

 

Thanks in advance.

Link to comment
Share on other sites

I don't use that contribution so I don't know what code to add to limit the category. It would have to be added to the sitemap module files where categories are called. For the manufacturers, I think changing this line in includes/modules/sitemap_manufacturers.php file

	  $products_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " .  TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join  " .		    TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p2c.products_id = p.products_id left join  " .  TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where p.products_status > 0 and c.categories_id = " . $mapCID);

to

	  $products_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " .  TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join  " .		    TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p2c.products_id = p.products_id left join  " .  TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where p.products_status > 0 and p.products_quantity > 0 and c.categories_id = " . $mapCID);

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

I managed to disable the hidden categories by adding c.categories_status = '1' to the following query in category_tree.php and category_tree_no_products.php:

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where c.categories_status = '1' and cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name");

I changed the line like you suggested in includes/modules/sitemap_manufacturers.php and includes/modules/sitemap.php, but unfortunately it didn't change how the manufacturers are being displayed. Any other ideas?

Link to comment
Share on other sites

  • 2 weeks later...

Jack,

 

I get the following error when I go to sitemap.php

Fatal error: Cannot redeclare in_multi_array() (previously declared in /home/****/public_html/includes/functions/general.php:1377) in /home/*****/public_html/includes/functions/sitemap.php on line 132

 

Thanks,

Blaine

Link to comment
Share on other sites

In the includes/functions/sitemap.php and includes/modules/sitemap.php files, find

in_multi_array

and change it to something else, like

sitemap_in_multi_array

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, I don't recommend the Dynamic Sitemap contribution. This one and the "Google XML Sitemap SEO" are better for the onsite and offsite site maps.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Found another minor HTML issue in sitemap_manufacturers.php

 

Change:

echo '<tr><td width="10"> </td><td class="sitemap_indvidual">' . TEXT_NO_MANUFACTURERS_FOUND . '</td></tr>';

 

To:

echo '<tr><td><table><tr><td width="10"> </td><td class="sitemap_indvidual">' . TEXT_NO_MANUFACTURERS_FOUND . '</td></tr></table></td></tr>';

 

The original code caused an HTML parsing error by putting too many table cells in a column that has only been taking 1 table cell per row. This error would only be seen if you had a product with no manufacturer set for a product.

Link to comment
Share on other sites

Another HTML change in sitemap_category.php

 

Change:

$mapCatStr = '<div>
 <tr>
	 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
		 <td class="sitemap_indvidual">' . $catname['cname'] . '</td>
	 </tr>
	 </table></td>
 </tr></div>';

 

To:

$mapCatStr = '<div>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
		 <td class="sitemap_indvidual">' . $catname['cname'] . '</td>
	 </tr>
	 </table></div>';

 

 

Also, is anyone having issues with Firefox not picking up the css styles? All the colors are showing properly in IE9 but no styles are properly displaying in Firefox.

Link to comment
Share on other sites

  • 2 weeks later...

Could there be a mistake in the install instructions or did I miss something.

Installed on osC v2.3.3 and V2.3.1

Had to insert in includes/languages/english/modules/boxes/bm_information.php

define('MODULE_BOXES_INFORMATION_SITEMAP_SEO', 'Site Map');

To get the information box to read "Site Map"

Was this left out of the install instructions?? Or did I overlook something.

Posted just in case others are having the same problem. Works perfect now.

Thanks for a great contrib.

"Do what I'm thinking Not what I said." https:windowanddoorparts.us

Link to comment
Share on other sites

  • 4 weeks later...

Could there be a mistake in the install instructions or did I miss something.

Installed on osC v2.3.3 and V2.3.1

Had to insert in includes/languages/english/modules/boxes/bm_information.php

define('MODULE_BOXES_INFORMATION_SITEMAP_SEO', 'Site Map');

To get the information box to read "Site Map"

Was this left out of the install instructions?? Or did I overlook something.

Posted just in case others are having the same problem. Works perfect now.

Thanks for a great contrib.

 

Yup i just downloded and installed this, and same issue here... Thanks for pointing it out, cuz i was a little confused for a moment.

Link to comment
Share on other sites

  • 4 weeks later...

Jack,

 

I Upgraded from 1.8 to 1.9. You originally did the install of SEO 1.7 and 1.8 (I believe.) I am running 2.2rcsomething. In order to upgrade it says just to replace the new files only. Did that. When you look at a product info page it shifts my product description taking up the entire description area and the area where column right goes, forcing column right to be on left side directly below column left.

 

I restored the backup and it goes away. So just to make sure it wasn't other add-on updates that I have been doing, I upload the files again. Same result. It doesn't do it on any other pages other than productinfo pages. Any clue where to look? I restored it again and it is gone now.

 

http://absolutelyscooterparts.net

Link to comment
Share on other sites

If you look at the history file you will see there were two changes made for appearance. One of those must be causing this problem. The changes would be one or more of the module files and the sitemap.php file. You could try replacing one of those at a time to find the problem. Or comparethem with the 1.8 files to see the difference. The appearance changes are not required for proper operation so you can skip those as long as you know that is all that was changed in the file.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Hello ! I got two things installed in my oscommerce shop 2.3.3, sitemap seo and sitemap seo 5 pro. Both working fine unless there's one small thing:

In the Sitemap itself the product links are working fine. So if you click on a product, the product page opens. But the main categories have wrong links. What can that be ?

Here the url:

http://dsc-electronics.com/sitemap.php

Link to comment
Share on other sites

This addon just uses the standard oscommerce link function. If the links are not formatted correctly, it has to be due to the url rewriter you are using. You can turr SEO 5 off to verify the links work correctly.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Then there is something wrong with the link function in your site. This addon doesn't create any urls from its own code. It just uses the shops code to do that. There's no way to test this that I can think of, beyond what you've done so far, so I don't have any other suggestions for you. If you can't get it to work and wish to, then you would need to pay someone to look at the code.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 5 weeks later...

Box Control only works with infoboxes with hard code links so that won't help you. But the code is built to handle those links. You have to enable it in the settings and it should load them.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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...