Post by pasargad » Sat Jun 19, 2021 5:50 pm

Hi,
I have one online shopping with OpenCart 2.0.3.1 and with over 1500 Product and using module google site map. (index.php?route=feed/google_sitemap)
But, after open URL of sitemap or file sitemap.xml it have delay for 30min.
what is problem?
the website is fast and very good, but sitemap.xml have problem
Too, for more information my web site is on cloudflaer
thank you

Newbie

Posts

Joined
Thu Oct 16, 2014 10:34 pm

Post by straightlight » Sat Jun 19, 2021 6:06 pm

Lack of info.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pasargad » Sat Jun 19, 2021 7:45 pm

straightlight wrote:
Sat Jun 19, 2021 6:06 pm
Lack of info.
What more information do you need ??

Newbie

Posts

Joined
Thu Oct 16, 2014 10:34 pm

Post by ADD Creative » Sat Jun 19, 2021 9:04 pm

The standard sitemap is inefficient and actually lists the products 3 times.

Try removing these lines.
https://github.com/opencart/opencart/bl ... hp#L44-L52
https://github.com/opencart/opencart/bl ... p#L92-L100

Also Cloudflare could cause you issues, I suspect it will timeout before the XML has been fully generated.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by pasargad » Sun Jun 20, 2021 2:57 am

ADD Creative wrote:
Sat Jun 19, 2021 9:04 pm
The standard sitemap is inefficient and actually lists the products 3 times.

Try removing these lines.
https://github.com/opencart/opencart/bl ... hp#L44-L52
https://github.com/opencart/opencart/bl ... p#L92-L100

Also Cloudflare could cause you issues, I suspect it will timeout before the XML has been fully generated.
Thank you, I remove this lines but no change!

I did add one line code in file google_sitemap.php
After:

Code: Select all

$this->response->addHeader('Content-Type: application/xml');
$this->response->setOutput($output);
I did add:

Code: Select all

file_put_contents('sitemap-domain.xml', $output);
So, After open link "https://www.domainname.com/index.php?ro ... le_sitemap" sitemap create with file name: sitemap-domain.xml
Too, I can see sitemap with address: https://domainsite.com/sitemap-domain.xml
Now, I have question, I want run Cron job for this url, but what command should I enter in the field of "Command"?

Code: Select all

https://www.domainname.com/index.php?route=feed/google_sitemap
Thank you

Newbie

Posts

Joined
Thu Oct 16, 2014 10:34 pm

Post by ADD Creative » Sun Jun 20, 2021 6:35 pm

You could use curl or wget with options to suppress the output to access the URL.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 6 guests