[PrestaShop] Sitemaps exceeds 100,000 urls
-
- Posts: 6
- Joined: Wed Apr 02, 2008 2:07 pm
[PrestaShop] Sitemaps exceeds 100,000 urls
I have a problem whit sitemap.php. I have more than 100.000 URL"s and google accept only 50.000 URL's in one sitemap-file. How can i split it in different sitemap-files.
Re: [PrestaShop] Sitemaps exceeds 100,000 urls
Please make a second copy of sitemaps/products.php file and put it to
the same folder.
Then open-up both files and change the line:
to (in the first file):
to (in the second file):
the same folder.
Then open-up both files and change the line:
Code: Select all
$result = Db::getInstance()->ExecuteS("SELECT p.`id_product`,
p.`date_add`, p.`date_upd` FROM ".TABLE_PRODUCT." p,
".TABLE_PRODUCT_LANG." pl WHERE p.`active` = '1' AND pl.`id_product` =
p.`id_product` AND pl.`id_lang` = '".$langId."' AND p.`id_product` IN
(SELECT cp.`id_product` FROM ".TABLE_CATEGORY_GROUP." cg LEFT JOIN
".TABLE_CATEGORY_PRODUCT." cp ON (cp.`id_category` = cg.`id_category`)
WHERE cg.`id_group` = 1) ORDER BY p.`id_product` DESC");
to (in the first file):
Code: Select all
$result = Db::getInstance()->ExecuteS("SELECT p.`id_product`,
p.`date_add`, p.`date_upd` FROM ".TABLE_PRODUCT." p,
".TABLE_PRODUCT_LANG." pl WHERE p.`active` = '1' AND pl.`id_product` =
p.`id_product` AND pl.`id_lang` = '".$langId."' AND p.`id_product` IN
(SELECT cp.`id_product` FROM ".TABLE_CATEGORY_GROUP." cg LEFT JOIN
".TABLE_CATEGORY_PRODUCT." cp ON (cp.`id_category` = cg.`id_category`)
WHERE cg.`id_group` = 1) ORDER BY p.`id_product` DESC LIMIT 0,40000");
to (in the second file):
Code: Select all
$result = Db::getInstance()->ExecuteS("SELECT p.`id_product`,
p.`date_add`, p.`date_upd` FROM ".TABLE_PRODUCT." p,
".TABLE_PRODUCT_LANG." pl WHERE p.`active` = '1' AND pl.`id_product` =
p.`id_product` AND pl.`id_lang` = '".$langId."' AND p.`id_product` IN
(SELECT cp.`id_product` FROM ".TABLE_CATEGORY_GROUP." cg LEFT JOIN
".TABLE_CATEGORY_PRODUCT." cp ON (cp.`id_category` = cg.`id_category`)
WHERE cg.`id_group` = 1) ORDER BY p.`id_product` DESC LIMIT
40000,80000");