View Single Post
  #8  
Old 08-11-2010, 05:11 PM
  HumanNature's Avatar 
HumanNature HumanNature is offline
 

Member
  
Join Date: Aug 2006
Posts: 26
 

Default Re: free google sitemap

Woooh this modification is great thank you very much, it works perfectly in 4.2.3.

Just one question, i want to add an extra condition to the product query because if the main category of the product is not available I don't want the products to appear in the sitemap but i don't know how to made the JOIN to the category table in the query.

Can you help me?


$prods = func_query("SELECT * FROM $sql_tbl[products], $sql_tbl[clean_urls] WHERE resource_type = 'P' AND productid = resource_id AND forsale = 'Y'");
if (is_array($prods[0]))
foreach($prods as $pr) {
$xml .= '<url>
<loc>'.$http_location.'/'.$pr["clean_url"].'.html</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>';
}
__________________
X-Cart 4.1.5
PHP 4.3.9
Mysql 4.1
VPS CentOS 4.2
Mods: Too much...
* Moving to 4.1.8 and to a dedicated server *
Reply With Quote