[MSU Sitemaps] Overcoming Google's 50,000 item sitemap limit
-
- Posts: 6
- Joined: Tue Aug 24, 2010 8:52 am
[MSU Sitemaps] Overcoming Google's 50,000 item sitemap limit
-
- Posts: 6
- Joined: Tue Aug 24, 2010 8:52 am
Re: [MSU Sitemaps] Overcoming Google's 50,000 item sitemap l
I made a copy of sitemaps/products.php and saved it as sitemaps/products2.php
In sitemaps/products.php find
$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");
and change it to
$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND p.products_id <= '26000' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");
(*note - change the 26000 value to the middle product_id value for your store if you need to)
In sitemaps/products2.php find
$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");
and change it to
$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND p.products_id > '26000' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");
(again, change the 26000 value if you need to)
Resubmit sitemaps.php to Google and hey presto your products are now split into two sitemaps both of which are within Google's limit. Green ticks all the way!