Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dynamic SiteMap


Jack_mcs

Recommended Posts

a quick little bug fix, to the orphaned li tag (which shows as an extra bullet point) at the bottom of the pages list on the sitemap, if you have chosen to exclude all info boxes from the sitemap list

in dynamic_sitemap.php about line 273 change the box files section from

               // Box Files
               for ($b = 0; $b < count($boxHeading); ++$B)
               {
                   echo '<li>'.$boxHeading[$b]['heading'][$b];
                   $nb_elements = count($boxHeading[$b]['filename']);
                   if($nb_elements > 0)
                   {
                       if (tep_not_null($boxHeading[$b]['filename'][0]))
                       {
                       echo '<ul>';
                       for ($f = 0; $f < $nb_elements ; ++$f)
                           if (tep_not_null($boxHeading[$b]['filename'][$f]))
                               echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>';
                       echo '</ul>';
                       }
                   }
                   echo '</li>';
               }

 

to

 

               // Box Files
              for ($b = 0; $b < count($files['name']); ++$B)
               {
                   echo '<li><a title="'. $files['name'][$b] .'" href="' . tep_href_link($files['path'][$b]) . '">' . $files['name'][$b] . '</a></li>';
               }
               // Box Files
               for ($b = 0; $b < count($boxHeading); ++$B)
               {
                   $nb_elements = count($boxHeading[$b]['filename']);
                   if($nb_elements > 0)
                   {
                    echo '<li>'.$boxHeading[$b]['heading'][$b];
                       if (tep_not_null($boxHeading[$b]['filename'][0]))
                       {
                       echo '<ul>';
                       for ($f = 0; $f < $nb_elements ; ++$f)
                           if (tep_not_null($boxHeading[$b]['filename'][$f]))
                               echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>';
                       echo '</ul>';
                       }
                   echo '</li>';
                   }
               }

Link to comment
Share on other sites

For people that are having problems with this Dynamic Site Map and STS Templates when generating the xml sitemaps

you need to modify the code of create_xml_sitemaps.php

as follows

 

just of the body tag about line 50 add

<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

then just after

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>

about line 54 add

    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

then just above  the close body tag about line 327 add
CODE

 

which then fixes both the blank output and the placeholder variables problems

Link to comment
Share on other sites

I am trying to install the code patch for the Enable/Disable Categories. In updating a Version 2 the instructions say to find and edit:

 

includes/classes/category_tree.php

 

There is no reference to the above if updating with Version 3 and I do not have that PHP file. Is it categories.php that needs to be edited?

 

I am attempting to install Version 3.5 of this contribution.

Link to comment
Share on other sites

Oops - nevermind - thought it was a different contributions thread :blush:

 

I am trying to install the code patch for the Enable/Disable Categories. In updating a Version 2 the instructions say to find and edit:

 

includes/classes/category_tree.php

 

There is no reference to the above if updating with Version 3 and I do not have that PHP file. Is it categories.php that needs to be edited?

 

I am attempting to install Version 3.5 of this contribution.

Edited by TracyS

~Tracy
 

Link to comment
Share on other sites

I have installed Dynamic Sitemap V 4.0.1 and my categories and manufactuer sitemaps look like this: (www.eddies-place.com is the website)

 

Creating categories sitemap.

Category ID --> URL

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

994 --> http://localhost/optics-spotting-telescopes-c-993_994.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

995 --> http://localhost/optics-scopes-c-993_995.html

 

 

Creating manufacturers sitemap.

Manufacturer --> URL

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Uncle Mikes --> http://localhost/uncle-mikes-m-11.html

Smith & Wesson --> http://localhost/smith-wesson-m-12.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

MagLite --> http://localhost/maglite-m-14.html

Cold Steel --> http://localhost/cold-steel-m-15.html

Cold Steel --> http://localhost/cold-steel-m-15.html

Cold Steel --> http://localhost/cold-steel-m-15.html

Cold Steel --> http://localhost/cold-steel-m-15.html

 

I cannot determine why I am getting all the duplicates. Any suggestion will be greatly appreciated.

 

The products sitemap looks fine.

 

Any ideas?

 

Eddie

Link to comment
Share on other sites

Hi,

 

We dont have any specials at the moment so the specials sitemap is empty ... when submitting sitemaps.xml to Google its reporting an error because smspecials.php has nothing in there just an opening and closing <urlset> tag ... is there a way I can make it NOT generate the specials sitemap and NOT include it in the sitemaps.xml file ??

 

I tried editing create_xms_sitemaps.php by commenting out the part where it creates the specials sitemap (well what i THOUGHT was creating the specials sitemap) but didn't work...

 

//create specials listing sitemap
echo TEXT_CREATE_SPECIALS;			
$sm = DIR_FS_CATALOG . 'smspecials.xml';
$fh = fopen($sm, 'w') or die(ERROR_SPECIALS_FILE);
fwrite($fh, utf8_encode($xml_head));
$base_url = HTTP_CATALOG_SERVER.DIR_WS_CATALOG."specials.php?page="; // url to your specials pages (must end with the page=)
$cnt = 0;
$special_query = tep_db_query('select count(specials_id) as numspecials from ' . TABLE_SPECIALS . ' s join ' . TABLE_PRODUCTS . ' p where p.products_status = 1 and s.products_id = p.products_id and s.status = 1');
$num = tep_db_fetch_array($special_query);
$numpages = ((int)$num['numspecials'] = 0 ? 1 : ceil((int)$num['numspecials'] / MAX_DISPLAY_SEARCH_RESULTS));
for ($page = 1; $page <= $numpages; $page++) // create a url for every page of each manufacturer
 {
  //$url = $base_url . $page;
	  $url=tep_href_link(FILENAME_SPECIALS,'page='.$page,'NONSSL',false);
 echo $page .' --> '. $url .'<br>';
 fwrite($fh, utf8_encode('<url><loc>' . smspecialchars($url) . "</loc><changefreq>".$scf."</changefreq></url>\n"));
 }
fwrite($fh, utf8_encode($xml_foot));
fclose($fh); 
echo $numpages . TEXT_COMPLETED;

 

Tried commenting all that out but no luck.

 

 

Will Google punish us or not crawl us if its reporting this error?? If it wont effect us at all then I guess we can just leave it for now ... any info would be greatly appreciated :)

Edited by sLaV-
Link to comment
Share on other sites

:blush: Hi! thanks for your contribution, but havea trouble could you please help me:

 

in my page url: http://adprintstore.com/store/dynamic_sitemap.php

 

1146 - Table 'adpluss_osc1.TABLE_SITEMAP_EXCLUDE' doesn't exist

 

select exclude_file from TABLE_SITEMAP_EXCLUDE where exclude_type != "0" and is_box="1"

 

[TEP STOP]

 

---------------------------------

 

All site works fine, my admin panel to works excelent but no this page, what can i do....

 

Thanks man...

Link to comment
Share on other sites

:blush: Hi! thanks for your contribution, but havea trouble could you please help me:

 

in my page url: http://adprintstore.com/store/dynamic_sitemap.php

 

1146 - Table 'adpluss_osc1.TABLE_SITEMAP_EXCLUDE' doesn't exist

 

select exclude_file from TABLE_SITEMAP_EXCLUDE where exclude_type != "0" and is_box="1"

 

[TEP STOP]

 

---------------------------------

 

All site works fine, my admin panel to works excelent but no this page, what can i do....

 

Thanks man...

missing table, run sql file.

Link to comment
Share on other sites

Hello everybody!

I just installed contribution and some strange thing happening: despite it looks like everything is Ok (no errors at least) it doesn't generate sitemaps.xml file. I checked the file and it still has sample info. I did changes for STS users as it was suggested, when I run "submit" I got the page with links, but still file sitemaps.xml is old.

Thanks for any advice.

 

Mike

Computers777dotcom

Link to comment
Share on other sites

Problem: I installed it as it says but when I click submit it does not update my xml files. They remain with the sample. Permissions for testing purposes are all 777. Please help!

Link to comment
Share on other sites

  • 2 weeks later...

Good day,

 

I really hope this isn't a dead post?

 

Everything has set itself up proper but when I click on submit query I get:

 

Not Found

The requested URL /shop/admin/FILENAME_CREATE_XML_SITEMAPS was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

How can this be, I can sign into my site with FTP and see that the missing file is where it should be and rearing to go?

 

I'm sure it's simple and I've been reading through all 37 pages of this behemoth without luck!! Any help greatly apprectiated

Link to comment
Share on other sites

Nothing. I asked the question and then decided to forge ahead. I am rebuilding a new shop and was wondering what the recommended version was. When the contribs get flumexed up I get confused as to what version is best....

 

What's wrong with your version?
Link to comment
Share on other sites

Nothing. I asked the question and then decided to forge ahead. I am rebuilding a new shop and was wondering what the recommended version was. When the contribs get flumexed up I get confused as to what version is best....

I meant the version you made. That is what I am using.

Link to comment
Share on other sites

Some of the instructions were missing. I uploaded a new version with the complete install docs.

 

lildog

 

Hi, i want to instal this contribution bt i am nt trained at this..can you provide me instruction file as how to install this
Link to comment
Share on other sites

Really great looking Sitemap for my customers. Since originally installing 3.5, the second column contents displays twice. Updated just now to 3.5.5. Same results. I did change code for cosmetic purposes. I would like to get a hint as were to look for what might be causing this. Below is a link to the Site Map. Thanks!

 

B4Auto Sitemap

Edited by Berlyn
Link to comment
Share on other sites

Hi,

 

How did you solve your error in the sitemap ?

 

I use seo valadition too and dangling carrot too.

But when i look in google sitemap i have got too many error :

 

When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot because they contained too many redirects. Please change the URLs in your Sitemap that redirect and replace them with the destination URL (the redirect target). All valid URLs will still be submitted

 

all my links are like that :

 

 

and it is written that is 301 redirect

Link to comment
Share on other sites

At the end of my Dynamic Site Map page, which you can find here:

 

http://www.thebestcandles.com/dynamic_sitemap.php

 

I get:

 

Error!

Unable to determine the page link!

 

I didn't have much luck searching here so I tried Google search for a solution... but didn't find anything...

 

Could somebody steer me in the right direction please.

 

Thanks,

Pete

I find the fun in everything.

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