Dirty Butter Posted October 4, 2014 Share Posted October 4, 2014 Google is getting more and more critical of the freshness of our feed to them. I currently manually send a new feed and sitemap daily (unless I forget). They recently disabled a handful of items, because I had lowered the prices! I'm beginning to hate Google's control over our business practices as much as I used to hate eBay's. Is there a way to automate the creation of the feed and sitemap, so it could be done automatically periodically throughout the day? Bsmither had already helped me modify the products.export.inc.php file, so one click of the Google Export button within Admin sends a fresh feed. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 4, 2014 Share Posted October 4, 2014 Depending on the code (needs admin login?), a routine can be placed in the file ini-custom.inc.php. That file is called every time ini.inc.php is called, which is every time a page request is made. But you don't want a new file generated for every page request. (Adds a number of seconds to deliver the page.) Maybe for every: * if stock levels are reported, every time someone successfully makes a purchase * if file_exists and it's now 12 hours later, make new file * any other trigger parameters If your hosting package allows for it, set up a cron-job. Or, if you have an .htaccess file in the FEED folder, that file can test for /FEED/plushgooglebase.txt, and if the URL contains that, rewrite the page request to the Export URL: /admin.php?_g=products&node=export&page=1&per_page=5000&format=googlebase&node=export&access=XXX which will export a dynamically generated file with that filename. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 4, 2014 Author Share Posted October 4, 2014 I do have access to creating a cron job via cpanel, but I'm guessing as to what to do. Do I use this section of maintenance.index.php as the basis of a script file? How do I name it as a script - with .js? <fieldset><legend>{$LANG.maintain.title_rebuild_misc}</legend> <div style="height: 20px;"><label for="sitemap">{$LANG.maintain.sitemap}</label><span><input type="checkbox" id="sitemap" name="sitemap" value="1" /></span></div> </fieldset> <div> <input type="hidden" name="previous-tab" id="previous-tab" value="rebuild" /> <input type="submit" name="rebuild" value="{$LANG.common.submit}" /> </div> <input type="hidden" name="token" value="{$SESSION_TOKEN}" /> </form> </div> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 7, 2014 Author Share Posted October 7, 2014 Thanks for pointing in the direction of creating a cron job - I think I did that part right. But that doesn't get Google to look at it more often than once every 24 hours. So there's still more to this than I thought. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 8, 2014 Author Share Posted October 8, 2014 The other part of this puzzle is to create a link to rebuild the sitemap, rather than a checkbox and submit button. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 8, 2014 Author Share Posted October 8, 2014 Based on the Request Log for a submitted sitemap, would this work, or is that just a link to Google's response? http://www.google.com/webmasters/sitemaps/ping?sitemap=https://dirtybutter.com/plushcatalog/sitemap.xml Quote Link to comment Share on other sites More sharing options...
Karol2015 Posted March 12, 2015 Share Posted March 12, 2015 If your hosting package allows for it, set up a cron-job. If anyone’s hosting doesn’t support Cron, or its Cron service is crap. You may try https://www.easycron.com. 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.