Page 1 of 1

[PrestaShop] Sitemaps exceeds 100,000 urls

Posted: Tue Sep 04, 2012 12:26 am
by monstreyhans
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

Posted: Wed Sep 05, 2012 11:38 am
by inveo
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:

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");

Cart  
(empty)

Cart Check out  »

Prices are tax inclusive.

The VAT rate for your country (US) * is 0,0 % because it is not a member of the European Union (EU).

* Please create an account if your country does not match.

Community feed
  • [phpBB3] AJAX Userinfo Extension
    Hi! I'm having trouble with this extension: https://www.phpbb.com/customise/db/exte ... _userinfo/ I tried asking support from the author but for no avail, since now. My request for support...
    by Lord Phobos
  • [phpBB3] Upgrade to phpBB 3.2.3
    Hello.. after Upgrade to phpBB 3.2.3 I am getting this message.. How can I solve this issue..? Thank you
    by ingbrzy
  • [phpBB3] URL path changed
    Hello.. I have changed my site path after moving to new hosting and now can not activate SEO module.. new path http://www.miuios.cz/domains/miuios.cz/ could you help me? thank you
    by ingbrzy2
  • [phpBB3] Chinese language support
    Hi, i bought magic seo for phpbb because it says that it supports a wide range of alphabets and UTF-8, however i found that it doesn't. I'm preparing a website in Chinese and all forums having a...
    by iwsmike
  • [WP2PS] Yoast SEO plugin
    Thanks for your support installing the PS-WP integration. However there is some errors when PS-WP integration is activated. 1. Error generating sitemap with Yoas SEO plugin (it disappears when...
    by argidomin
Join our support forum » Pre-Sales Questions »
Featured Testimonials

Great work - great support - great tool! Thank you for your whole work and your great support. We're very glad with the plugin and our online portals now run much faster than before.

Alexander, the owner of Die Wirtschaft Köln

Skeptical at first as I am with all new purchases that can dramatically effect traffic, but this one comes highly recommended. And not just for the product, the support is second to none and all issues are dealt with politely and efficiently. Top Marks!

Phillip, the owner of Sexy Ladies Fancy Dress Costumes

More Testimonials »