deepee Posted November 11, 2012 Share Posted November 11, 2012 (edited) Hi All The instructions on the back office Google Sitemap Module Configuration says: Use cron job to re-build the sitemap: "http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" I set the cronjob up in my cPanel exactly as above:- Minute Hour Day Month Weekday Command Actions 0 9 * * * "http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" I set up an email notification for each time it runs. My host's Cron Daemon returns an error: /bin/sh: "http://mysite.com.au...emap-cron.php?:" No such file or directory Anyone have any ideas as to what needs to be changed to get it to run as it would be a very useful feature? Thanks deepee Edited March 22, 2013 by deepee (see edit history) Link to comment Share on other sites More sharing options...
deepee Posted November 13, 2012 Author Share Posted November 13, 2012 After some experimentation with cPanel's Cronjob builder it's as simple as putting the wget command and a single space in front of the URL in the Google Sitemap Module : "wget http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" Hoping this helps some more people to get it working. Cheers deepee 4 Link to comment Share on other sites More sharing options...
Bejo Posted November 26, 2012 Share Posted November 26, 2012 After some experimentation with cPanel's Cronjob builder it's as simple as putting the wget command and a single space in front of the URL in the Google Sitemap Module : "wget http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" Hoping this helps some more people to get it working. Cheers deepee Thank your 4 share. Link to comment Share on other sites More sharing options...
Totti Posted December 28, 2012 Share Posted December 28, 2012 If I use the cron manager I create a file to 0 kb. If I do the BO everything is working correctly. Why ? Link to comment Share on other sites More sharing options...
junnecito Posted December 28, 2012 Share Posted December 28, 2012 Thank's a lot now works. Link to comment Share on other sites More sharing options...
patrickvbw Posted March 4, 2013 Share Posted March 4, 2013 If I use the cron manager I create a file to 0 kb. If I do the BO everything is working correctly. Why ? Same problem here, i get an empty file.. If i create the sitemap through the button it works fine.. Link to comment Share on other sites More sharing options...
deepee Posted March 5, 2013 Author Share Posted March 5, 2013 (edited) The cPanel cronjobs ran inconsistently for me too. I ended up bookmarking the cronjob URL in firefox and by just by clicking it, it would refresh the sitemap, e.g.: http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" I now use a Firefox extension called "My Weekly Browsing Schedule" that visits the URL automatically on a user defined shedule, such as on startup. https://addons.mozil...wsing-schedule/ It's a bit fiddly to set up initially but it works well. Edited March 5, 2013 by deepee (see edit history) 1 Link to comment Share on other sites More sharing options...
bilalhussain Posted March 12, 2013 Share Posted March 12, 2013 (edited) Hello Everyone, Following URL for my shop is not generating sitemap.xml correctly. It create an empty sitemap file. But when I click on the button to generate sitemap, it works fine? Any help? I am using PrestaShop™ 1.5.3.1. When I browse the following link it creates a sitemap.xml and when I click on the button it creates another sitemap-1.xml???? I have no idea whats going on...can someone shed some light on it please....... http://mysite.com/modules/gsitemap/gsitemap-cron.php?&token=ce03751c73&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" Thanks, Bill Edited March 12, 2013 by bilalhussain (see edit history) Link to comment Share on other sites More sharing options...
Whispar1 Posted March 22, 2013 Share Posted March 22, 2013 Just an FYI - This is a known bug: http://forge.prestashop.com/browse/PNM-895 Until a fix comes out either use the button as you indicated or try one of the workarounds posted above. Link to comment Share on other sites More sharing options...
bilalhussain Posted March 22, 2013 Share Posted March 22, 2013 Thanks PrestaShop Apprentice Link to comment Share on other sites More sharing options...
deepee Posted March 22, 2013 Author Share Posted March 22, 2013 I've edited the topic subject and removed [sOLVED] until the developers fix it properly.... 2 Link to comment Share on other sites More sharing options...
Whispar1 Posted March 23, 2013 Share Posted March 23, 2013 Here is a fix - working for me in 1.5.3.1 Line 208 of gsitemap.php Replace this code: $tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang'])); With this code: $tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang']),null,0,true); and use wget as instructed above Link to comment Share on other sites More sharing options...
bilalhussain Posted March 28, 2013 Share Posted March 28, 2013 I just upgraded PS to 1.5.4.0 and replace the gsitemap.php code as you instructed. Then I used the wget command instructed below but again it generated 0.000MB size with 0 indexed page. note: I don't think upgrading PS to the latest version could cause any problem not to work your gsitemap replacement code.. just a thought.. After some experimentation with cPanel's Cronjob builder it's as simple as putting the wget command and a single space in front of the URL in the Google Sitemap Module : "wget http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0" Hoping this helps some more people to get it working. Cheers deepee Link to comment Share on other sites More sharing options...
silentRun Posted April 29, 2013 Share Posted April 29, 2013 Also, you have to take into account if your shop is offline or online ... Link to comment Share on other sites More sharing options...
cyberwala Posted August 23, 2013 Share Posted August 23, 2013 thanks its working... Link to comment Share on other sites More sharing options...
dominio Posted July 4, 2015 Share Posted July 4, 2015 Hi there, if Do not know if this is an issue anymore but for me it works my syntax is wget "http://www.yoursite.com/modules/gsitemap/gsitemap-cron.php?token=3a1934d3e1&id_shop=1" cheers Link to comment Share on other sites More sharing options...
marrakchi Posted August 10, 2015 Share Posted August 10, 2015 Bonjour, Pour moi en PS 1.6.0.14 et thème default la solution ci-dessous fonctionne: wget "http://www.yoursite....4d3e1&id_shop=1" ne pas oublier l'espace après le wget 1 Link to comment Share on other sites More sharing options...
Marmulet Posted January 6, 2016 Share Posted January 6, 2016 Bonjour, Moi aussi ça fonctionne sur Prestashop 1.6.1.2 wget "http://example.com/modules/gsitemap/gsitemap-cron.php?token=2...7&id_shop=1" Merci à tous, je cherchais depuis plusieurs comment faire. On peut aussi utiliser curl je pense. Link to comment Share on other sites More sharing options...
Recommended Posts