Automate Google SitemapXML mod in Zen Cart

Sep 20, 2011 | Zen Cart Tips | 0 comments

Does your client make a lot of updates to their website? Like add/edit/update products a lot? Or, add EZ pages a lot? There is a Zen Cart plug in (SitemapXML (formerly “Google Sitemap”)) that generates a properly formatted XML site map for Google. You can get it here:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=544

Download and install it according to their instructions.

The site map needs to be manually updated from within the admin panel. This means your client or developer will need to remember to do this. Not good. So, let’s automate it. Below are instructions on how to do this. You’ll need to be able to write and schedule a cron job on your web host account.

Step 1: Install the SitemapXML mod.

Step 2: Call the page that generates the XML file with a cron job using cURL. Schedule it to run according to how many updates your client is making. The schedule is set by using your cPanel or similar application supplied by your web host.

It’s now automated.

CRON JOB 1:

[php]
curl http://www.YOUR-WEBSITE.com/index.php?main_page=sitemapxml
[/php]

Now, if you want to ping Google, Yahoo!, Ask.com, and Microsoft after each new XML file generated, you would run the following cron job. But, it’s not really necessary to ping them, especially Google, because they will naturally crawl your site every few days anyway.

CRON JOB 2:

[php]
curl http://www.YOUR-WEBSITE.com/index.php?main_page=sitemapxml&genxml=no&ping=yes
[/php]

That’s all there is to it!

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.