Jump to content

Multistore - Impossible to select a root category for new store


prime1974

Recommended Posts

Hi there.

We are running for the second time into problems creating a new store with multistore activated.

The problem we run into is the following error message:
"You need to select at least the root category."

 

The source of the problem is located in what you see here:
post-18579-0-96656400-1467050918_thumb.png

You will notice that the checkbox is missing for the root category "Online print shop".

Once I change the category root to the original category root of the general store category (start - prestashop default), I am able to select the root category as visible in here:
post-18579-0-77051400-1467050927_thumb.png

You will notice that the checkbox to select the root category is available for selection, which in the other case wasn't.

 

The root category which I want to select ("Online print shop") is the root category of another online shop which is already working with that root category.

Can somebody please help?

Thank you very much in advance!

Link to comment
Share on other sites

  • 1 month later...

I can't reproduce this issue on my PrestaShop v1.6.1.6 website. My guess is that you've upgraded from an old version of PrestaShop before Multistore was added and your category structure has a "Home" category of 1 instead of 2. Can you check your ps_category_lang table to see what's there? Each of your shops should have the "Root" category with an ID of 1 and a "Home" category with an ID of 2.

  • Like 1
Link to comment
Share on other sites

I can't reproduce this issue on my PrestaShop v1.6.1.6 website. My guess is that you've upgraded from an old version of PrestaShop before Multistore was added and your category structure has a "Home" category of 1 instead of 2. Can you check your ps_category_lang table to see what's there? Each of your shops should have the "Root" category with an ID of 1 and a "Home" category with an ID of 2.

No, there was no important update from the old versions. We use prestashop since version 1.6.0.

I'll go for the DB entry on monday and let you know what's in there.

 

Cheers.

Link to comment
Share on other sites

I am have to same problem, after i change my strutured of categories the presta return this error, in the back office, only while i select one shop,  while i set all shops he work normaly, i already try set root category, create home category, change db and other things but not work. if someone cn help me , i need help... thanks and i'm sorry for my bad english.

[PrestaShopException]

Root category must be an integer value
at line 212 in file classes/helper/HelperTreeCategories.php

207.     }208. 209.     public function setRootCategory($value)210.     {211.         if (!Validate::isInt($value)) {212.             throw new PrestaShopException('Root category must be an integer value');213.         }214. 215.         $this->_root_category = $value;216.         return $this;217.     }
Link to comment
Share on other sites

  • 3 months later...

I can't reproduce this issue on my PrestaShop v1.6.1.6 website. My guess is that you've upgraded from an old version of PrestaShop before Multistore was added and your category structure has a "Home" category of 1 instead of 2. Can you check your ps_category_lang table to see what's there? Each of your shops should have the "Root" category with an ID of 1 and a "Home" category with an ID of 2.

 

Should I change the category_id in ps_category_lang and ps_category from 1 to 2?

 

What will this change break?

Link to comment
Share on other sites

  • 4 months later...

I experience the same problem. I started with a fresh installation 1.6.1.0 now upgraded to 1.6.1.11. And the error persists.

When activating multi-store and adding a new shop, it fails to save with error "select root category".

The issue here is that the default root category is not selectable because there is no checkbox.

 

I've seen an aritcle:

https://www.hostknox.com/tutorials/prestashop/1.5-1.6/multistore#add-shops

with sscreenshot:

https://www.hostknox.com/content/images/tutorials/prestashop/1.5-1.6/multistore/10.jpg

 

Showing that in prestashop-v1.6.0.x, the default home root category is selectable with a checkbox.

 

Why in version 1.6.1.x it is not available, is a mystery to me.

Edited by jordifs (see edit history)
Link to comment
Share on other sites

  • 2 years later...

This post is just to inform others.

 

Warning:

There are more bugs linked to feature multi-store.

 

Briefing on my scenario:

In theory the system does not allow to migrate from one shop. With the intend to:

- enable feature multi-store

- then move the existing configuration to shop group

- then add other shops to the group using shop cloning.

That was not seen as allowed in version 1.6.1.[1-11]. Nonetheless can say this is possible with some hacks. Some involve changing database records. Cannot recommend my pathway.

 

Details on my path:

Did the trickery to enable multi-store preserving the initial shop. Had feature multi-store enabled for 12-18 months. In that period new bugs appeared. After much looking around, and reading the program source routines. Encountered what I perceived as bugs. Some obvious to me in design. The are some routines that appeared not up for the task of a full-featured multi-store behaviour. In a way it was comprehensible. It is complex and difficult. No bad feelings on programmers. But after much looking around, multiple issues led me to conclusions:

- feature multi-store was not ready for production (v1.6.1)

- it is a very bad idea (better to separate multiple installations; or to have one installation being able to really operate with multiple domains)

- it is badly designed (the programming is tricky, with query parameters that change the output depending on external arguments, shop vs shop_group and sql-joins)

- has some evident GUI pitfalls. Shop owner wants to add one product shared in multi-domains, not having differents shops with the same product. The stock quantity can be shared. But the product created through cloning is inherently bad, and needs post cloned action to edit and correct. This means doing that for multiple text fields, multiple languages, and multiples shops (5-10, one for each domain). The amount of backoffice work is untenable for the admin person. So the idea of using multi-domain through multi-store is unusable. Please consider some numbers: 5 domains/shops, with 4k-5k products, with 5 languages, with up to 200 custom attributes for each product. Having to edit so many fields, for each language, and repeat the process for each shop, is untenable.

 

This lead me to a situation in which: I perceived new bugs that seem to be unreported and unsolved. I compared that scenario to a previous one without multi-store, and without some bugs. So decided to go back. To undo the multi-store feature. And return to one shop one domain. It kind of works.

 

The summary:

Avoid using feature multi-store at all costs.

If multi-domain feature is the objective. Then better to add it through small hacks. To trick the system. To use the domain present in the web-browser instead of the one configured in database. Doing that is easy. But other issues might arise (me still working on this).


 

Hope this clarifies my stance around this issue-bug and provides a contextual interpretation around the feature and its use.

Link to comment
Share on other sites

9 minutes ago, devecschool said:

If goal is return to single store (disable the bugged multistore) fix is on this query

INSERT INTO `ps_category_shop` ( `id_category` , `id_shop` , `position` )
SELECT id_category, 1, 0
FROM `ps_category`
WHERE id_category NOT
IN (
SELECT id_category
FROM `ps_category_shop`
)

About your insight. Can guarantee it is not so easy. There is other stuff. Like advanced stock management, which links stock quantities to shop_group or shop. There is also other bugs, like having the same customer with same email address, present in ps_customer with multiple records. There is weird stuff going on that require careful approach. Also some modules are installed saving configuration linked to shop_group. So the rollback affects, for instance, the payment module. A platform with such a diversity, makes it too difficult to recommend an easy solution.

Eventhough, it is feasible to rollback changes.

Link to comment
Share on other sites

1 minute ago, jordifs said:

About your insight. Can guarantee it is not so easy. There is other stuff. Like advanced stock management, which links stock quantities to shop_group or shop. There is also other bugs, like having the same customer with same email address, present in ps_customer with multiple records. There is weird stuff going on that require careful approach. Also some modules are installed saving configuration linked to shop_group. So the rollback affects, for instance, the payment module. A platform with such a diversity, makes it too difficult to recommend an easy solution.

Eventhough, it is feasible to rollback changes.

the problem is that a serious bug reported in 2016 is still open :( also on 1.7.x

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
  • 9 months 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...