Jack_mcs Posted March 22, 2009 Author Share Posted March 22, 2009 It looks like a path problem. You might want to read through this thread to see fixes for that. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2009 Share Posted March 22, 2009 (edited) It looks like a path problem. You might want to read through this thread to see fixes for that. Jack Jack Are you saying it might be a path problem becuase the full paths are not shown in the error? I removed the full path because I did not want to show them here on the forum. I will search and see what I can find. Everything was working fine until I wanted to change it to "Products Viewed". Thanks! Edited March 22, 2009 by projman Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 22, 2009 Author Share Posted March 22, 2009 Yes, that is what I meant. If that is not the correct output, then I don't know what the problem is. I don't provide support for specially coded projects so you will need to figure that one out yourself. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
XxWickedxX Posted March 22, 2009 Share Posted March 22, 2009 Jon I have the same problem. Let me know if you figure out what fixes that. I will do the same if I figure it out. Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 28, 2009 Share Posted March 28, 2009 Hi Jack, Thx for the contribution. I have downloaded the latest from the 6th March but having problems with specials. We dont have any specials but still the sitemapindex.xml file is still showing the line <sitemap> <loc>http://www.fantaby.se/foretag/shop/sitemapspecials.xml</loc> <lastmod>2009-03-15</lastmod> </sitemap> because of this we are getting an error message from Google saying the sitemapspecials.xml file is empty. I would have thought that if there were no specials, this code would have been left out/deleted from the sitemapindex.xml file so that Google wouldnt be led to the empty file. Or has something gone wrong with just our installation? Many thanks/ Luke Quote Link to comment Share on other sites More sharing options...
Guest Posted March 28, 2009 Share Posted March 28, 2009 Jon I have the same problem. Let me know if you figure out what fixes that. I will do the same if I figure it out. Thanks. Hi Jason, I think I fixed it - Try This: function GenerateProductSitemap(){ $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_viewed as viewed FROM " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id) WHERE products_status='1' ORDER BY pd.products_viewed DESC"; if ( $products_query = $this->DB->Query($sql) ){ $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query); $container = array(); $number = 0; $top = 0; while( $result = $this->DB->FetchArray($products_query) ){ $top = max($top, $result['viewed']); $location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false); $lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added']; $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ; $ratio = $top > 0 ? $result['viewed']/$top : 0; $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); $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 ? 'products' : 'products' . $number; $this->GenerateSitemap($container, $type); $container = array(); $number++; } } # end while $this->DB->Free($products_query); if ( sizeof($container) > 1 ) { $type = $number == 0 ? 'products' : 'products' . $number; return $this->GenerateSitemap($container, $type); } # end if } else { $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'false'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = '0'; } } # end function Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 28, 2009 Author Share Posted March 28, 2009 Hi Jack, Thx for the contribution. I have downloaded the latest from the 6th March but having problems with specials. We dont have any specials but still the sitemapindex.xml file is still showing the line because of this we are getting an error message from Google saying the sitemapspecials.xml file is empty. I would have thought that if there were no specials, this code would have been left out/deleted from the sitemapindex.xml file so that Google wouldnt be led to the empty file. Or has something gone wrong with just our installation? Many thanks/ Luke Code was posted a few pages back to remove the manufacturers entry. You can use the same for specials by applying it to the specials section. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
XxWickedxX Posted March 29, 2009 Share Posted March 29, 2009 Hi Jason, I think I fixed it - Try This: function GenerateProductSitemap(){ $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_viewed as viewed FROM " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id) WHERE products_status='1' ORDER BY pd.products_viewed DESC"; if ( $products_query = $this->DB->Query($sql) ){ $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query); $container = array(); $number = 0; $top = 0; while( $result = $this->DB->FetchArray($products_query) ){ $top = max($top, $result['viewed']); $location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false); $lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added']; $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ; $ratio = $top > 0 ? $result['viewed']/$top : 0; $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); $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 ? 'products' : 'products' . $number; $this->GenerateSitemap($container, $type); $container = array(); $number++; } } # end while $this->DB->Free($products_query); if ( sizeof($container) > 1 ) { $type = $number == 0 ? 'products' : 'products' . $number; return $this->GenerateSitemap($container, $type); } # end if } else { $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'false'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = '0'; } } # end function That worked wonderfully. Not sure what you did. Perhaps Ill have more time later to compare. Thanks a lot Jon. Quote Link to comment Share on other sites More sharing options...
Ken44 Posted March 29, 2009 Share Posted March 29, 2009 Hi Jack. Thank you for the update. It's working perfectly. May I ask, what is the advantage of the extra feeds?, and have 'new products' been omitted for a reason? What about our static pages? conditions, shipping etc (I also have a few tutorials). Would it be worth me manually creating another XML file for these pages? Thanks. Ken Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 29, 2009 Author Share Posted March 29, 2009 New products will show up in the products sitemap. A separate sitemap could be created for those but since they would be duplicates, I don't think it would gain anything. I toyed with the idea of adding a sitemap for the static pages but those are usually of less importance and the search engines will find them quick enough on their own, especially if an on-site sitemap contribution is installed. So I'm not sure I will be changing the code for that but it might be a good idea to create a separate one for those. It could be done manually in a few minutes, using one of the sitemaps from this contribution as a guide, and isn't something that would change, at least not often. It may not make a big difference but any exposure is better than none. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Ken44 Posted March 29, 2009 Share Posted March 29, 2009 Hi Jack. Thanks for the info. A separate sitemap could be created for those but since they would be duplicates Well the specials.xml is also a duplicate. I have (for example) http://mysite/product_info.php?products_id=312 in the sitemapspecials.xml. And then it is repeated in sitemapproducts.xml Surely this is a duplicate in the same way that new products would be? Regards. Ken. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 30, 2009 Author Share Posted March 30, 2009 Yes, they also appear. My thinking is that a new products sitemap would be more likely to be empty. Although, as some have mentioned, so is the specials and manufacturers so I will probably change the code to allow those to be options. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Ken44 Posted March 30, 2009 Share Posted March 30, 2009 Hi Jack. Thanks for your reply. I will remove the sitemapspecials.xml and edit it from sitemapindex.xml. I look forward to the update. Regards. Ken. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2009 Share Posted March 30, 2009 (edited) That worked wonderfully. Not sure what you did. Perhaps Ill have more time later to compare. Thanks a lot Jon. Jason, I found another error: Locate this line in the function: $lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added']; Change it back to the original line: $lastmod = $this->NotNull($result['last_mod']) ? $result['last_mod'] : $result['date_added']; If I find anything else, I will let you know, but it looks good now. Edited March 30, 2009 by projman Quote Link to comment Share on other sites More sharing options...
XxWickedxX Posted March 31, 2009 Share Posted March 31, 2009 Thanks Jon. Made the change. Much appreciatied. Quote Link to comment Share on other sites More sharing options...
i2Paq Posted April 16, 2009 Share Posted April 16, 2009 I found some issues with the original contribution by Chemo that I used. Google started to show errors and redirects in my Webmaster Tools sitemaps. Looking for a solution I found your *updated* version and I suddenly discovered that I was using an incomplete version since day 1 :blush: Your installation was easy and it worked out of the box. Just one question: Which files should I remove from the domain.com/googlesitemap/ to be on the safe side? Thanks. Quote Norman in 't Veldt Moderator osCommerce The Netherlands Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 16, 2009 Author Share Posted April 16, 2009 You don't need to remove any files. Just upload the ones from this contribution. They are all the same except for a few. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
i2Paq Posted April 18, 2009 Share Posted April 18, 2009 You don't need to remove any files. Just upload the ones from this contribution. They are all the same except for a few. Jack Thanks, but that is not what I mean, sorry for that. In the googlesitemap map there are a lot of files, one is an index.html whit installation instructions. This googlesitemap is accessable via your browser and thus can someone see the install instruction. I removed that file so now there is only the index.php which will generate the sitemaps.xml files. Just want to know if that construction is safe or do I need to remove other files or change the access rights? Quote Norman in 't Veldt Moderator osCommerce The Netherlands Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 18, 2009 Author Share Posted April 18, 2009 You can remove that if you want. The contents of that directory is known to anyone familiar with the contribution so having the install instructions doesn't provide any information that can hurt a site. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
i2Paq Posted April 19, 2009 Share Posted April 19, 2009 You can remove that if you want. The contents of that directory is known to anyone familiar with the contribution so having the install instructions doesn't provide any information that can hurt a site. Jack Thanks! Quote Norman in 't Veldt Moderator osCommerce The Netherlands Link to comment Share on other sites More sharing options...
handbaghabit Posted April 22, 2009 Share Posted April 22, 2009 Hi could someone post a link to the install file please after I have downloaded the package to my desktop I click on install file and it says I should be redirected but it never happens so I cant view the instructions. Thanks in Advance Lori Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 22, 2009 Author Share Posted April 22, 2009 You need to extract the contents and then click on install. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
handbaghabit Posted April 22, 2009 Share Posted April 22, 2009 You need to extract the contents and then click on install. Jack Hi jack Thanks for your reply I have installed a few contributions on my site already so I know how to open a zip file etc but I when I try to get the link for the instal documents I.E. does not show the document just tells me I am being redirected which never happens. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 22, 2009 Author Share Posted April 22, 2009 My reply had nothing to do with opening the zip file. The way the install document was written won't allow it to be ran from within the zip file. Have you extracted the contents of the zip file and placed them somewhere on your computer and clicked on the install file from there? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
handbaghabit Posted April 22, 2009 Share Posted April 22, 2009 My reply had nothing to do with opening the zip file. The way the install document was written won't allow it to be ran from within the zip file. Have you extracted the contents of the zip file and placed them somewhere on your computer and clicked on the install file from there? Jack Hi Jack Thanks again for your support tried that, didn't work on the pc but managed to get it from the laptop obviously an issue with my old desktop. I have installed a couple of your contribs so far with no problem and just thought I'd say thanks a million for your hardwork. Lori Quote 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.