Jump to content

[SOLVED] 1 error product must be in the default category


Recommended Posts

It's not a bug, but a feature that was added to v1.3.2. In PrestaShop v1.3.1, you were able to set the "Default category" to a category the product wasn't actually in, which caused problems in some modules. In v1.3.2, the default category must be a category the product is actually in. If you try to set the default category to "Home", but the product isn't a featured product, you will get that error message. You must change the default category from "Home" to any of the categories the product is in.

Link to comment
Share on other sites

Yeah.. This is lot better. now that I know what to look for when I edit. This would also maybe make the webshop work better without delay since bug in codes might slow or disable your shop. Still got lot of loading time for my webshop, but after checking my products one, by one I found lot of things like this I have to correct. Lot of work, but I guess the result would be an improved shop.

Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

Here is an solution:

check your admin folder / tabs and AdminProducts.php file. Open it and find this code:

 

if (!is_array(Tools::getValue('categoryBox')) OR !in_array(Tools::getValue('id_category_default'), Tools::getValue('categoryBox')))

$this->_errors[] = $this->l('product must be in the default category');

 

 

Just delete it...

And its working yet...

 

If you dont wanna see this message:

Consider changing the default category

 

only find this part of code:

<script type="text/javascript">

$(document).ready(function() {

$(\'div#categoryList input.categoryBox\').click(function (){

if ($(this).is(\':not(:checked)\') && $(\'div#categoryList input.id_category_default\').val() == $(this).val())

alert(\''.utf8_encode(html_entity_decode($this->l('Consider changing the default category.'))).'\');

});

});

</script>

 

 

and just delete it.

 

And thats all..

 

 

 

 

Thank you, i found solution...

Link to comment
Share on other sites

  • 9 years later...
On 10/24/2010 at 6:37 AM, rocky said:

It's not a bug, but a feature that was added to v1.3.2. In PrestaShop v1.3.1, you were able to set the "Default category" to a category the product wasn't actually in, which caused problems in some modules. In v1.3.2, the default category must be a category the product is actually in. If you try to set the default category to "Home", but the product isn't a featured product, you will get that error message. You must change the default category from "Home" to any of the categories the product is in.

Sorry for being so stupid, but I do not understand a word that you say. I just copied a product of one certain category and filled in the new texts and images and so on and saved it under a new name, and everything is fine. Then I did the same with the second product and bam: "product must be in the default category". The product is in the correct category, the one it is supposed to be in. What is this about? 

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

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...