Post by Gekkoton » Sat Dec 29, 2018 3:42 pm

version 3.0.2.0
SEO URL activated
shop has 2 languages

When using integrated (standard) module Google Sitemap - it generates map only for main language, so the 2nd language pages remains not indexed.
How to modify code for indexing of all languages in Sitemap?

When discussed this issue at another forum, got an advice to implement cycle code in \catalog\controller\extension\feed\google_sitemap.php

...
$this->load->model('localisation/language');
$languages = $this->model_localisation_language->getLanguages();
$config_language_id = $this->config->get('config_language_id');

foreach ($languages as $language) {
$this->config->set('config_language_id', $language['language_id']);
.....
}

$this->config->set('config_language_id', $config_language_id);
...

Unfortunately my level of php knowledge is close to zero, so probably someone can help with this issue.
I beleive this will be helpful not only for me, as multilingual shops are not so rare...

Newbie

Posts

Joined
Tue Dec 25, 2018 2:15 am

Post by straightlight » Sun Dec 30, 2018 12:16 am

This request won't be encouraged for Search Engines crawling your store, however.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

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

Post by Gekkoton » Sun Dec 30, 2018 7:27 pm

straightlight wrote:
Sun Dec 30, 2018 12:16 am
This request won't be encouraged for Search Engines crawling your store, however.
What do you mean? Adding of 2nd language pages in sitemap won't be encouraged by search engines crawlers, or particular code listed in my post will lead to undesirable results with search engines crawlers?

In fact with SEO URL on we get unique page link for every language, text of every product page is completely translated, Meta-tags Title and Meta-tags Description are fully translated. The identical only images. What the cons against adding multiple language pages in sitemap (atleast for products and information pages)?

Newbie

Posts

Joined
Tue Dec 25, 2018 2:15 am
Who is online

Users browsing this forum: No registered users and 5 guests