♥mommaroodles Posted June 15, 2014 Share Posted June 15, 2014 I recommend the following changes to the sitemap.class.php instead of encoding - use decode for the google webmasters url generation function GenerateSubmitURL(){ $url = urldecode($this->base_url . 'sitemapindex.xml'); return htmlspecialchars(utf8_decode('http://www.google.com/webmasters/sitemaps/ping?sitemap=' . $url)); } # end function Quote "The doorstep to the temple of wisdom is a knowledge of our own ignorance." Link to comment Share on other sites More sharing options...
Roaddoctor Posted June 15, 2014 Share Posted June 15, 2014 Is there a setting needed to show information.php pages? I see the /*** ADD INFORMATION PAGES ***/ code in the class file but on my sitemappages.xml file there are no info pages listed. I see admin has enable Articles, but no entry for enable Information Pages? just checking Everything else is working well as far as I can see, no errors, all the pages generate fine. Alternate class fails. store is 2.3.3.4, addon is 1.6 Quote -Dave Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 16, 2014 Author Share Posted June 16, 2014 No, there isn't anything else needed other than, of course, for the Information Pages addon to be installed. There are a number of addons that are similar but the code is meant to work with this one. Quote 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 More sharing options...
Roaddoctor Posted June 16, 2014 Share Posted June 16, 2014 Jack, typo above, yes I am using Contribution Version: 2.0.5 by Slick303, I messed with this all last night but I cannot figure out why my info pages are not showing up.. Ughh - just noticed information.php on my exclude list... how the heck that happened I dunno. Comparing to the clean package, I have these extra entries.... information.php should be removed... Should product_info be there? 28 => 'information.php', 29 => 'password_reset.php', 30 => 'product_info.php', 31 => 'tell_a_friend.php' Quote -Dave Link to comment Share on other sites More sharing options...
Roaddoctor Posted June 16, 2014 Share Posted June 16, 2014 @@Jack_mcs removing information.php from exclude list solves info pages not showing, but "information.php" by itself (Page not found error) now also is generated... Any way to exclude that without excluding all the legit info pages? Quote -Dave Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 16, 2014 Author Share Posted June 16, 2014 @@Roaddoctor You're right, that is incorrect. I never noticed that before. Please try this. In the sitemap.class.php (or the alternate if you use it), find if (! in_array($filename, $this->excludeList) && $this->IsViewable($root . $filename)) { $r = @stat($filename); $displayName = ucwords(str_replace("_", " ", substr($filename, 0, strpos($filename, ".")))); //remove the .php and underscores $pagesArray[] = array('filename' => $this->base_url . $filename, 'lastmod' => gmstrftime ("%Y-%m-%d", $r[9])); and change it to if ($this->IsViewable($root . $filename)) { if (! in_array($filename, $this->excludeList)) { $r = @stat($filename); $displayName = ucwords(str_replace("_", " ", substr($filename, 0, strpos($filename, ".")))); //remove the .php and underscores $pagesArray[] = array('filename' => $this->base_url . $filename, 'lastmod' => gmstrftime ("%Y-%m-%d", $r[9])); } Then use the exclude pages option and enter in information.php, product_info.php and whichever others ones should be excluded. Quote 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 More sharing options...
Roaddoctor Posted June 16, 2014 Share Posted June 16, 2014 fixed - thank you! Quote -Dave Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 17, 2014 Author Share Posted June 17, 2014 A new version has been uploaded with these changes: - Added code to set the last modified date if the date is 0. If this happens, it may mean there is a problem with the database.- Added a bunch of files to the excludes list to prevent them from showing in the pages site map file.- Added code to include reviews in the pages file.- Changed code to handle the exclude list correctly.- Changed mysql file so it works with newer versions of mysql.- Removed extra showmanufacturers statement fron index.php - found by Melanie (mommaroodles ). Quote 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 More sharing options...
plazman65 Posted July 11, 2014 Share Posted July 11, 2014 Hi! I have SPPC and Hidden Products installed. Does anyone know what changes I would need to make to exclude hidden products from showing up? Thanks for any help :) Quote Link to comment Share on other sites More sharing options...
RBA55 Posted August 20, 2014 Share Posted August 20, 2014 My store has 2 languages, english and french. My admin is in english. The sitemaps are generated only in english. Is there a way to have sitemaps generated for both languages? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 20, 2014 Author Share Posted August 20, 2014 There isn't an easy way. I started adding the code but never completed it. I think that if you change this line in googlesitemap/index.php $languages_id = $lng->language['id']; to this $languages_id = XX; where XX is the language ID of the other language, the files will be created in that language. This has to be done manually, of course, and the resulting sitemap files would have to be renamed since they would be overwritten when the other language is ran. Quote 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 More sharing options...
Roaddoctor Posted August 20, 2014 Share Posted August 20, 2014 Hi! I have SPPC and Hidden Products installed. Does anyone know what changes I would need to make to exclude hidden products from showing up? Thanks for any help :) you need to add where p.products_status = '1' or WHERE c.categories_status = 1 at the appropriate places Quote -Dave Link to comment Share on other sites More sharing options...
RBA55 Posted August 20, 2014 Share Posted August 20, 2014 Thanks Jack, as I suspected. I'll take a look at the code myself and see if I can figure it out, just wanted to know if it had been done. I guess it's a good thing to do, no? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 21, 2014 Author Share Posted August 21, 2014 (edited) As long as there is a link to the other language, like in a language box, the search engines will find the other url's. But the maps speeds that process up so they would help. Edited August 21, 2014 by Jack_mcs Quote 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 More sharing options...
Rachael w. Posted November 23, 2014 Share Posted November 23, 2014 I am trying to make some changes to the code to match my shop. I have 4 manufacturers set up. I don't know how to explain it, not just 4 individual manufacturers but I have coded the site to have 4 different manufacturers available (label, artist, genre, condition). I would like to have sitemaps for each of those manufacturers. I have added the database tables for sitemap true/false selection and set those to true. I have added the dummy xml files and set the permissions to 755. I have edited index.php and sitemap.class.php. Somewhere in these two files I've made a mistake and I cannot figure it out. When I run the index.php in my browser it runs fine, however it just flat out stops after creating the first manufacturer sitemap. Diagnosis shows nothing. No errors whatsoever it just stops and never creates the sitemap.xml for the other manufacturers. Here is my manufacturers code from sitemap.class.php where I do think the error is. function GenerateManufacturer2Sitemap(){ $sql = "SELECT manufacturers2_id as m2ID, date_added, last_modified as last_mod, manufacturers2_name FROM " . TABLE_MANUFACTURERS2 . " order by manufacturers2_name DESC"; if ( $manufacturers2_query = $this->DB->Query($sql) ){ $this->debug['QUERY']['MANUFACTURERS2']['STATUS'] = 'success'; $this->debug['QUERY']['MANUFACTURERS2']['NUM_ROWS'] = $this->DB->NumRows($manufacturers2_query); $container = array(); $number = 0; while( $result = $this->DB->FetchArray($manufacturers2_query) ){ $location = $this->hrefLink(FILENAME_DEFAULT, 'manufacturers2_id=' . $result['m2ID'], 'NONSSL', false); $lastmod = $this->NotNull($result['last_mod']) ? $result['last_mod'] : $result['date_added']; $changefreq = GOOGLE_SITEMAP_MAN2_CHANGE_FREQ; $priority = .5; $container[] = array('loc' => htmlspecialchars(utf8_encode($location)), 'lastmod' => date ("Y-m-d", strtotime($lastmod)), 'changefreq' => $changefreq, 'priority' => $priority ); if ( sizeof($container) >= 50000 ){ $type = $number == 0 ? 'manufacturers2' : 'manufacturers2' . $number; $this->GenerateSitemap($container, $type); $container = array(); $number++; } } # end while $this->DB->Free($manufacturers2_query); if ( sizeof($container) > 0 ) { $type = $number == 0 ? 'manufacturers2' : 'manufacturers2' . $number; return $this->GenerateSitemap($container, $type); } # end if } else { $this->debug['QUERY']['MANUFACTURERS2']['STATUS'] = 'false'; $this->debug['QUERY']['MANUFACTURERS2']['NUM_ROWS'] = '0'; } } # end function It' seemed like it would be such a simple thing to do, but I have reread those lines over and over and I do not see where I could have messed up. Can anyone help? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 23, 2014 Author Share Posted November 23, 2014 Try replacing all of the code in GenerateManufacturer2Sitemap with that in GenerateManufacturerSitemap and see if it works, which it should. If it does, then it is just a matter of swapping the lines until you find the problem. Rachael w. 1 Quote 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 More sharing options...
Rachael w. Posted November 23, 2014 Share Posted November 23, 2014 Great idea! Going to do it now. Quote Link to comment Share on other sites More sharing options...
Rachael w. Posted November 23, 2014 Share Posted November 23, 2014 I found the error. The code I was using had this: $this->DB-> when it should have had this: tep_db_ Working like a charm now! Thank you so much Jack! You're a great supporter of your contributions! I really do appreciate all your hard work! Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 23, 2014 Author Share Posted November 23, 2014 You're welcome. I'm glad you got it going. Quote 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 More sharing options...
dewarsco2 Posted December 15, 2014 Share Posted December 15, 2014 After I generated the sitemaps it says CONGRATULATIONS! All files generated successfully. When I go to the sitemaps they are empty. Permissions are set to 777. Any ideas why it is not writing to the files. Quote "Do what I'm thinking Not what I said." https:windowanddoorparts.us Link to comment Share on other sites More sharing options...
dewarsco2 Posted December 15, 2014 Share Posted December 15, 2014 To the above post Using OSC 2.3.4 Quote "Do what I'm thinking Not what I said." https:windowanddoorparts.us Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 15, 2014 Author Share Posted December 15, 2014 What happens when you switch to the alternate option? What is the output of the test option? Quote 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 More sharing options...
♥Tsimi Posted December 16, 2014 Share Posted December 16, 2014 (edited) Hi Jack I have this Add-on now running for few months and i add products to my store as the weeks go by. So i thought i check out the sitemaps to make sure that all new added products get correctly indexed. I am all new to this SEO stuff and therefore might have 1 or 2 silly questions. Does this add-on update the sitemaps automatically? I added a bunch of new products in the past 2 weeks but when generating the sitemaps i can't see the new new products added. Looked at the Webmaster Tools...same there. I can only view older products that date 2 months back. Do I have to change some settings in the Webmaster Tools area? I always thought after adding new products i just need to generate new sitemaps with the link in your read me file and that's it. Any guidance is highly appreciated. Edited December 16, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 16, 2014 Share Posted December 16, 2014 OK, i think i understood now how it works. I didn't refresh the sitemaps in the Webmaster Tools page. After i clicked on "resubmit sitemap" i needed to click on the refresh link. Now they show just fine and google will hopefully send it's crawlers. Same goes for the direct links to the sitemaps (example: *MYURL*/sitemapproducts.xml) once entered the URL just refresh with F5 and the new products get listed nicely as they should. Thanks again. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 16, 2014 Author Share Posted December 16, 2014 You shouldn't need to do anything once it is setup correctly. You should set up a cron job to run the script if you haven't. That will keep your maps current. In webmaster tools, all you really need to do is add the sitemapindex.php map but it is better to add all of the ones you are using since errors are easier to see. Once that's all done and the maps are not getting any errors In webmaster tools, you don't need to do anything else at all. Tsimi 1 Quote 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 More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.