View Single Post
  #3  
Old 01-26-2010, 11:13 PM
 
user1 user1 is offline
 

Member
  
Join Date: Feb 2009
Posts: 29
 

Default Re: free google sitemap

Quote:
Originally Posted by Babydoll
thanks for mentioning this.
i modified it like you said without the last manufacturer part.
is it supposed to show the clean url after? mine is still showing the ~productid=xx


The module runs each time you load a page in the admin part of your site.
The module also creates two entries in the "config" table of your database. In one of them "xcartmod_sitemap_time", it saves the current date.
Since we need our sitemap created only once in a day there is an if statement inside it.
Before creating the sitemap, it checks if the current date is the same with the one in "xcartmod_sitemap_time".
If it isn't, it creates a new sitemap and writes the current date to the db. If it is, it does nothing.


So you have created your sitemap but you can't create another one before the day passes. Just delete the value in "xcartmod_sitemap_time" entry in the "config" table. If you don't want (for testing purposes) to update the date entry and check the date in the db then replace:
Code:
$xm_today = mktime(0, 0, 0, date("m"), date("d"), date("Y")); if ($xm_today == $config["xcartmod_sitemap_time"]) return; db_query("UPDATE $sql_tbl[config] SET value='$xm_today' WHERE name='xcartmod_sitemap_time'");
with
Code:
//$xm_today = mktime(0, 0, 0, date("m"), date("d"), date("Y")); //if ($xm_today == $config["xcartmod_sitemap_time"]) // return; // //db_query("UPDATE $sql_tbl[config] SET value='$xm_today' WHERE name='xcartmod_sitemap_time'");
Don't forget to revert this change after you finish with testing or else you will create a new sitemap each time you visit the admin part of your site!

Andreas Nikolaidis
__________________
x-cart v4.3.2 gold
http://www.FarMoreThanGames.com
Reply With Quote