Jump to content

Subcategories with same name (Prestashop 1.7.0.4)


maccio

Recommended Posts

Hello,
I installed Prestashop 1.7.0.4 in Italian and English.

I built this tree of categories without any error:
Products
-Footwear
--Man
--- sneaker
--Woman
--- sneaker

If I create a product and I check both categories "sneaker" the system give me this error Unable to update settings.

Why? Is it a bug?

Thanks in advance!

Link to comment
Share on other sites

  • 3 weeks later...

A quick fix, in this file : PrestaShopBundle\Form\Admin\Type\CommonAbstractType.php

In formatDataChoicesList function.

 

Replace this line : $new_list[$item[$mapping_name]] = $item[$mapping_value];

By this one : $new_list[$item[$mapping_name].$item[$mapping_value]] = $item[$mapping_value];

 

This permit to have unique value name not visible by users.

Link to comment
Share on other sites

I was always under the impression right from the start of v1.7 that you could not have any categories and subcategories with the same name.

 

I went out of my way to give each a unique name.

 

Is this not the case now. Or is it a real bug. Can you point to where the bug has been logged.

 

Cheers

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

A quick fix, in this file : PrestaShopBundle\Form\Admin\Type\CommonAbstractType.php

In formatDataChoicesList function.

 

Replace this line : $new_list[$item[$mapping_name]] = $item[$mapping_value];

By this one : $new_list[$item[$mapping_name].$item[$mapping_value]] = $item[$mapping_value];

 

This permit to have unique value name not visible by users.

 

Any feedback from someone of this solution in production?

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...
  • 3 years 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...