New custom field in product details and localization

Posted: July 17, 2019 at 11:40 AM Quote #242613
Hi
I have added a new custom field in product details (a kind of technical characteristic)
The value of that field is saved in the "standard" version but it is not saved in the localized ones.
What did I forget?

Thanks ;)

Claudio
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 17, 2019 at 12:32 PM Quote #242614
Localisation have separate code for that.

You have to look at product post method.

They did code for other fields.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
I am passionate about new ideas and new way of thinking :-)

Cheers,
Smiten Kalathiya
Posted: July 17, 2019 at 3:30 PM Quote #242618
sk5202 wrote:
Localisation have separate code for that.

You have to look at product post method.

They did code for other fields.



Thank you

I edited ProductModelFactory in Admin area adding the following for the custom field

locale.Characteristic = _localizationService.GetLocalized(product, entity => entity.Characteristic, languageId, false, false);
                

Now it's all ok ;)
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more