Jump to content

Gsitemap 3.0 - Problem with priorities


lionna

Recommended Posts

Hello dear community,

 

did anybody had a Problem with priorities in Gsitemap module?

 

In order to show some of the product categories in Google SERPs, I would like to give the highest priority to the category. For that, I have changes the category priority to 1.0 in the file gsitemap.php

public function install()
	{
		foreach (array(
			'GSITEMAP_PRIORITY_CATEGORY' => 1.0,
			'GSITEMAP_PRIORITY_HOME' => 0.9,
			'GSITEMAP_PRIORITY_PRODUCT' => 0.8,
			'GSITEMAP_PRIORITY_MANUFACTURER' => 0.7,
			'GSITEMAP_PRIORITY_SUPPLIER' => 0.6,
			'GSITEMAP_PRIORITY_CMS' => 0.5,
			'GSITEMAP_FREQUENCY' => 'weekly',
			'GSITEMAP_CHECK_IMAGE_FILE' => false,
			'GSITEMAP_LAST_EXPORT' => false
		) as $key => $val)
			if (!Configuration::updateValue($key, $val))
				return false;

However, the sitemap will still generate the priority 0.8 for categories (Default value).

 

Does anyone know what is the problem here?

 

I run Prestashop 1.5.6.1

 

Thanks in advance,

Lionna

Link to comment
Share on other sites

  • 4 weeks later...

Hello again Lionna,

 

Found it out.

 

These parameters are only valid at installation time and never again read after that. So the changes you made to gsitemap.php won't be active.

 

What I did (it worked for me) :

 

In BO/Modules : uninstall module

Then modify the parameters directly in gsitemap.php (modules/gsitemap/gsitemap.php)

Install module in BO

Go to configure and generate sitemap

 

View new generated sitemap : your new parameters are active.

 

Hope it works for you too.

 

Pierre

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...