Jump to content
Jack_mcs

Sitemap SEO

Recommended Posts

Sorry the program works great what i am talking about is when http://(whatever.com)/catalog/sitemap.php is displayed

@ the bottom of the page after all the sitemap is generated it says

(Please contact us if you experience any problems finding what you need:)

and underneath that

Company Name

Address

Location

Phone #

E-mail address <--------- this is it sorry for the misunderstanding

Share this post


Link to post
Share on other sites

Oh, I see. That is loaded from the store address setting in admin. If you can't edit it there (it may be used elsewhere), then you would need to edit sitemap.php language file.

Share this post


Link to post
Share on other sites

In your includes/language/english/sitemap.php file find

 

define('TEXT_INFORMATION', '<p>Please contact us if you experience any problems finding what you need:</p> ' .

nl2br(STORE_NAME_ADDRESS) . '<br>' .

STORE_OWNER_EMAIL_ADDRESS

);

 

and change it to

 

define('TEXT_INFORMATION', '<p>Please contact us if you experience any problems finding what you need using the contact us form.</p>');

 

That will keep the text, but remove the address details and email.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Oh, I see. That is loaded from the store address setting in admin. If you can't edit it there (it may be used elsewhere), then you would need to edit sitemap.php language file.

 

Thanks Jack

Share this post


Link to post
Share on other sites

In your includes/language/english/sitemap.php file find

 

define('TEXT_INFORMATION', '<p>Please contact us if you experience any problems finding what you need:</p> ' .

nl2br(STORE_NAME_ADDRESS) . '<br>' .

STORE_OWNER_EMAIL_ADDRESS

);

 

and change it to

 

define('TEXT_INFORMATION', '<p>Please contact us if you experience any problems finding what you need using the contact us form.</p>');

 

That will keep the text, but remove the address details and email.

 

thanks i did this

define('TEXT_INFORMATION', '<b>Please <a href="/contact_us.php">Contact Us</a> if you experience any problems finding what you

need :</b><BR> ' .

nl2br(STORE_NAME_ADDRESS) . '<BR>' .

SITEMAP

);

 

Thanks

Share this post


Link to post
Share on other sites

In instructions for installation I didn't find correction for file bm_information.php. I fixed it myself off course in language file bm_information.php add define('MODULE_BOXES_

INFORMATION_SITEMAP_SEO', 'sitemap')

 

While I was arranging Boxes Group Control 2 notices appeared.

Notice Warning: explode() expects parameter 2 to be string, array given in /.../.../.../admin/sitemap_seo_box_control.php on line 162 I fixed with:

 

if (! is_array($activeBox))

$boxName = explode(".", $activeBox);

 

Following notice was still left:

Warning: file(/.../.../public_html/includes/modules/boxes/Array) [function.file]: failed to open stream: No such file or directory in/.../.../public_html/admin/includes/functions/sitemap.php on line 203.

What is wrong? How to fix this?

 

I have a version 2.3.3.

Edited by Matjaz

Share this post


Link to post
Share on other sites

I'm not seeing that error here but you can try changing

$boxName = explode(".", $activeBox);

to

$boxName = explode(".", implode($activeBox));

Share this post


Link to post
Share on other sites

1. Despite correction note about sitemap.php on line 203 stays.

 

2. Why I cant plug in via administration:

 

Enable Articles Manager

Enable InfoPages

Enable Page Manager

 

When I start install. php php admin notices me:

1048 - Column 'set_function' cannot be null INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES (NULL, 'Sort Order - Articles Manager', 'SITEMAP_SEO_SORTORDER_ARTICLES_MANAGER', '4', 'Where to place this module in the listings.', '18', '16', NULL, now(), NULL)

Share this post


Link to post
Share on other sites

1. Despite correction note about sitemap.php on line 203 stays.

 

2. Why I cant plug in via administration:

 

Enable Articles Manager

Enable InfoPages

Enable Page Manager

Do you have those addons installed?

Share this post


Link to post
Share on other sites

I downloaded and changed everything what I saw in file after_2.3 for oscommerce version 2.3 or above. Is there something else I should have?

Share this post


Link to post
Share on other sites

If you want to use those addons, you have to install them. This thread is for the Sitemap SEO addon only.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Anytime I click "(show products)," and then click on a product, and then hit the "back" button, I get a re-submission prompt from my browser. Is this intended, or have I made a mistake with installation?

Share this post


Link to post
Share on other sites

The re-submission problem occurs whenever a form is used. This addon doesn't use any forms. I don't know what you are clicking on when you click "show products" but that is where I would start looking.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

The lastest version has the option in Admin>Configuration>Sitemap SEO "show products in categories" true/false. I have it set to false as default, so it just shows categories. However, at the top of the sitemap, right next to "Categories," there is also (show products) which when I mouseover, it shows the link as: "javascript:document.sitemap.submit()" .

 

There are no forms on the page at all.

 

This isn't a huge detraction from the sitemap, but it may lead some customers to think they've made a mistake or that there is a security risk. If there's a way to avoid the prompt, I'd like to, but I can also live with it, if it presents a large hurdle.

 

Please forgive my ignorance. I don't know, so I must ask :)

Share this post


Link to post
Share on other sites

Yes, there is a form but it is not a security problem because the database doesn't use the results of the form. You can remove that link though by deleting this code

  $showCategories .= tep_draw_form('sitemap', tep_href_link(FILENAME_SITEMAP_SEO)) . tep_hide_session_id() . tep_draw_hidden_field('show_products', $showStatus);
  $showCategories .= '<a class="sitemap" href="javascript:document.sitemap.submit()">' . $showProducts . '</a> ';
  $showCategories .= '</form></th></tr>';

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

How difficult is it for the sitemap omit/exclude categories that contain 0 products? My site does not display empty categories in the category box, but they do still show in the sitemap.

 

It's not an addon, exactly...more like a short snippet added to the bm_categories.php shown here:

 

// DISABLE CATEGORY WITH NO PRODUCT
$bShowCategory = false;
$products_in_category = tep_count_products_in_category($counter);
if ($products_in_category > 0){
 for ($i=0; $i<$tree[$counter]['level']; $i++) {
 $categories_string .= "    "; /*alters the offset of subcategories*/
 }
 $categories_string .= '<a href="';
 if ($tree[$counter]['parent'] == 0) {
 $cPath_new = 'cPath=' . $counter;
 } else {
 $cPath_new = 'cPath=' . $tree[$counter]['path'];
 }
 $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';
 /* if (isset($cPath_array) && in_array($counter, $cPath_array)) {
 $categories_string .= '<strong>';
 } commented out original before "easier categories in 2.3.1.*/
if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '<span class="categoryBox-active">';
} else {
$categories_string .= '<span class="categoryBox">';
}

// display category name
 $categories_string .= $tree[$counter]['name'];
 /* if (isset($cPath_array) && in_array($counter, $cPath_array)) {
 $categories_string .= '</strong>';
 }*/
$categories_string .= '</span>';
 /*if (tep_has_category_subcategories($counter)) {
 $categories_string .= '->';
 }*/
 $categories_string .= '</a>';
 if (SHOW_COUNTS == 'true') {
 $products_in_category = tep_count_products_in_category($counter);
 if ($products_in_category > 0) {
	 $categories_string .= ' (' . $products_in_category . ')';
 }
 }
 $categories_string .= '<br />';
}
//End Hide Empty Category

 

I assume mimicking this behavior on the sitemap isn't quite as simple?

Share this post


Link to post
Share on other sites

I haven't tried this but the following may work, or should at least get you started. In the includes/classes/category_tree.php file, find

function buildProducts($category_id)
{

and add this after it

if ($products_in_category < 1) return '';

Share this post


Link to post
Share on other sites

No change in "hide products" page, which is my default, but that caused the category tree in "show products" to be blank on the category side....still messing around with it.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

I've modified the category_tree_no_products in the following way, but I get a blank page:

$spacer_string = '',
$spacer_multiplier = 1;
$products_in_category = tep_count_products_in_category($counter);
function osC_CategoryTree($catID = 0, $load_from_database = true) {
global $languages_id;
$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 cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name");
$this->data = array();
$this->root_category_id = $catID;
while ($categories = tep_db_fetch_array($categories_query)) {
$this->data[$categories['parent_id']][$categories['categories_id']] = array('name' => $categories['categories_name'], 'count' => 0);}
} //end class osC_CategoryTree
function buildBranch($parent_id, $level = 0, $p_category_link = false) {
if ($products_in_category < 1){ return '';}else{
$result = $this->parent_group_start_string; //starts the <ul> tag

 

Am I even close?

Share this post


Link to post
Share on other sites

I don't know the code by heart so I can't see what was changed. But I don't provide specialized coding help in the forums due to the number of requests. If it is somethign I can see at a glance, I will try to help but, usually, not anything beyond that.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Is information pages compatible with Sitemap SEO? I have Enable InfoPages checked in Settings control.

 

Then, I went to Box Control. Down at Additional Link Control, I selected information.php and added information.php?info_id=10 with a display name of Frequently Asked Questions. But, when I go to the sitemap, I get this error (I had to exclude the box to get rid of the error):

 

Warning: file(/home/essent8/public_html/includes/languages/english/modules/boxes/information.php) [function.file]: failed to open stream: No such file or directory in /home/essent8/public_html/includes/functions/sitemap.php on line 84

 

If I try using the Box Group Control for information.php or bm_info1.php I get this error:

 

 

Warning: file(/home/essent8/public_html/includes/modules/boxes/Array) [function.file]: failed to open stream: No such file or directory in /home/essent8/public_html/backoffice/includes/functions/sitemap.php on line 203

 

Also, I've been through the installation directions three times to make sure I didn't miss any directions or files, but Sitemap SEO does not show up in the Configuration box. I have the Sitemap SEO box with the three control files, but not a Sitemap SEO link to change display settings.


Diana

Share this post


Link to post
Share on other sites

It is compatible with it in pre-2.3 shops but I don't recall ever testing the two together in newer shops. The path you show is for pre-2.3 and since it is failing I assume you have a 2.3 shop. So, if that is the case, I would say it is not compatible with those shops. I'll change that in the next version but I've no idea when that will be.

Share this post


Link to post
Share on other sites

Yes, I do have a 2.3 shop. Thank you for letting me know! :)


Diana

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

×