[4.1] store does not contain a GetLocalized definition

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 năm cách đây
Hi everyone,

I'm trying to install this theme (PowerShop).

I get an error indicating that: store does not contain a GetLocalized definition.

var storeName = storeContext.CurrentStore.GetLocalized (x => x.Name);


How can I solve? I use version 4.1.

Thanks in advance
5 năm cách đây
freedomx wrote:
Hi everyone,

I'm trying to install this theme (PowerShop).

I get an error indicating that: store does not contain a GetLocalized definition.

var storeName = storeContext.CurrentStore.GetLocalized (x => x.Name);


How can I solve? I use version 4.1.

Thanks in advance


Hi,

In 4.1 you need to use the ILocalization service e.g.

_localizationService.GetLocalized(storeContext.CurrentStore, x => x.Name);

Regards,
Hristian
5 năm cách đây
Hello Hristian and thanks for the reply!


I tried to change how you tell me, but now the mistake is: "NopRazorPage<dynamic>._localizationServices it is not accessible due to the level of protection".
5 năm cách đây
However, with this layout the system crashes: "System.Data.SqlClient.SqlException (0x80131904)".

Eliminating the PhowerShop folder the system resumes regularly.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.