Close

View product exception

[email protected]
11 years ago
#1111 Quote
Avatar
  • 1
Hi,

I've installed fashion theme on nopcommerce 2.6
I've an exception while viewing a product

here are the details:

Dettagli eccezione: System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.

Errore nel codice sorgente:

Riga 101:                        @if (productFashionModel.ProductManufacturers != null && productFashionModel.ProductManufacturers.Count > 0)


it seems that productFashionModel was null.


Support
11 years ago
#1112 Quote
Avatar
  • Moderator
  • 1044
Hi sergio,

Thank you for reporting this. We sent you an email that the problem is fixed now. You need to download the latest package and update the Fashion theme plugin.

Please let us know if you have any other problems with the theme and we will be glad to help.

Best Regards
IndigoTea
11 years ago
#1135 Quote
Avatar
  • 3
I'm running into the same error message, after applying the latest 2.6 version of the template. The issue occurs when I use the theme with the folder name of the theme changed (prior to modifying the theme for the custom layout I'm going to implement). I didn't have that issue with the ShopAll theme - is there something I can do to avoid this error message, and still have my customized folder name?
Support
11 years ago
#1141 Quote
Avatar
  • Moderator
  • 1044
IndigoTea wrote:
I'm running into the same error message, after applying the latest 2.6 version of the template. The issue occurs when I use the theme with the folder name of the theme changed (prior to modifying the theme for the custom layout I'm going to implement). I didn't have that issue with the ShopAll theme - is there something I can do to avoid this error message, and still have my customized folder name?


Hi IndigoTea,

We are glad that someone asked this specific questions, which means that you guys are doing the modification of the themes in proper way. Namely to copy it over with a different name and then apply your modifications in the new theme.
You also need to do this for each plugins as all plugins have a Themes folder where the specific views are placed. This way you can have more than a single theme running on the same instance of nopCommerce i.e DarkOrange, Fashion etc. We don't recommend doing this on a production environment but it is very convenient during development and making modifications to a new theme.

Basically you need to add your new name of the Fashion theme i.e FashionNew to the supported theme names setting.
So here is a little background information why you need to do this and how.
The Fashion theme plugin dynamically adds some new data to the model aka productFashionModel via an Action Filter. But we don't want to add this additional information to the product model if we are running a different theme and want it only for the Fashion theme. That's why there is a setting that specifies a list of themes for which we want this additional information.
Here is the setting you need to modify:
SevenSpikesSettings.FashionThemeNames
The value of this setting should be "Fashion" as you can see in the Settings.xml file of the Fashion theme plugin. You need to add your new theme names separated with semicolomn ";". For example:
"Fashion;FashionNew"

When you add your new theme name then you will get the product manufacturers and categories on the product page when running the modified version of the Fashion theme.
We will add a check if the product fashion model is not null, so that you don't get this error on the product page if you forget to add the theme name although you will lose this additional information if you forgot to do so.

Best Regards,
Nop-Templates Support Team

IndigoTea
11 years ago
#1144 Quote
Avatar
  • 3
Ah, I see! Thanks very much for the clarification. I'd already taken the steps of creating custom theme folders in the plugins - I'm very pleased that it's automatically detected when the plugin theme folders are named the same as the active theme.