nopCommerce 4.0 - Bug fixes and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Nop-Templates.com wrote:
Here is a work item. I'm sure we'll find a way to support it
And done. Please see this commit

Hi Andrei,

Great! It looks quite promising!
I will give it a try on Monday and will let you know if everything is fine!

Many thanks again for the quick solution!

Boyko


Hi Andrei,

I finally had a chance to test this.

It turned out that the current implementation will not work in many cases when the Model is not exactly NopBaseModel but a collection of NopBaseModels.

Here is an example:

The HomePageProductsViewComponent returns IEnumerable<ProductOverviewModel> as a Model rather than BaseNopModel.
The check in the NopViewComponent will cause no event to be published:

if (model is BaseNopModel)


You should handle all the other possible Model scenarios in addition to the check above or at least the most common ones.

p.s: The same applies for the PublishModelEventsFilter

Thanks,
Boyko
6 years ago
a.m. wrote:
Simply rename the _EstimateShippingResult.cshtml (i.e _EstimateShippingResult1.cshtml) so that it could not be found. Then try to estimate the shipping and you will see the "Internal Server Error" page in the Network tab but no error is logged in the System -> Log...
Thanks! I'll check


Hi Andrei,

In addition to errors like "Could not find the view" we should Log any Razor view compilation errors.
For example if for some reason the _EstimateShippingResult.cshtml could not be compiled i.e has some typo, we need to log this error in the Log.
I already commented on the issue in GitHub.

Thanks,
Boyko
6 years ago
Nop-Templates.com wrote:
...It turned out that the current implementation will not work in many cases when the Model is not exactly NopBaseModel but a collection of NopBaseModels...

Thanks a lot, Boyko! We'll support it soon (a work item)
6 years ago
Making ecommerce platforms like a boss == Andrei Mazulnitsyn
6 years ago
I have one suggestion about the attributes could you add a number AttributeControlType? I know there is a text input but this is not linked to a value in the attributes values definition.

I know there is a dropdown but what if you want to sell something with custom sizes then you have very long dropdwonlist sometimes...

It would be nice to have a number field that could be predefined in the article attribues values. So for example if you want to buy a table with a size of 151 the price changes.


Greets
Matthias
6 years ago
Nop-Templates.com wrote:
Hi Andrei,

I finally had a chance to test this.

It turned out that the current implementation will not work in many cases when the Model is not exactly NopBaseModel but a collection of NopBaseModels.

Here is an example:

The HomePageProductsViewComponent returns IEnumerable<ProductOverviewModel> as a Model rather than BaseNopModel.
The check in the NopViewComponent will cause no event to be published:

if (model is BaseNopModel)


You should handle all the other possible Model scenarios in addition to the check above or at least the most common ones.

p.s: The same applies for the PublishModelEventsFilter

Thanks,
Boyko

Boyko, please see this commit. Thanks again!
6 years ago
a.m. wrote:

Boyko, please see this commit. Thanks again!


Hi Andrei,

Now it works but it took us some time to see that we could not have IConsumer<ModelPrepared<IEnumerable<ProductOverviewModel>>> but it should be IConsumer<ModelPrepared<IEnumerable<BaseNopModel>>> instead (then we saw the comment in the code that it was intentional) and need to cast it to the concrete type in the HandleEvent method.

Anyway this will work for us.

Thank you again!

Boyko
6 years ago
Nop-Templates.com wrote:


Hi Andrei,

In addition to errors like "Could not find the view" we should Log any Razor view compilation errors.
For example if for some reason the _EstimateShippingResult.cshtml could not be compiled i.e has some typo, we need to log this error in the Log.
I already commented on the issue in GitHub.



Hi Andrei,

Do you think we can do something about the above point?

Thanks,
Boyko
6 years ago
Hi Guys,

have anyone tried to run and Build the nopCommerce 4.0 Beta in Visual Studio MAC?

As i tried to build it as we are have moved NopCommerce to support the asp.net core but getting error.

Something like this..

00000001   ldfld System.Runtime.ExceptionServices.ExceptionDispatchInfo:m_Exception
00000006   ldarg.0
00000007   callvirt Void System.Exception:RestoreExceptionDispatchInfo (ExceptionDispatchInfo)
0000000c   ldarg.0
0000000d   ldfld System.Runtime.ExceptionServices.ExceptionDispatchInfo:m_Exception
00000012   throw

So if some one tried and please let me know and i am also trying to fix it and let you guys know solutions on it..

Thanks
Umesh
6 years ago
Hi Andrei,

I finally had a chance to play with the "Upload plugin" functionality.

1. You should add to the description that the plugin directory will be DELETED as some store owners may have some customization to the plugins and they should be aware that their customization will be lost.

2. You should think about adding support for Theme as well. In our theme packages we have the following structure.

Plugins
Themes/ThemeName

We can add uploadedPlugins.json to specify the plugins to be installed but there is no way for the Theme files to be copied into the Themes folder. So the store owner will need to use FTP to upload the theme files.

3. I tried to upload several plugins from a single zip and some of the files from the Zip were not copied.
By quickly looking at the code I noticed this in the UploadMultiplePlugins method:

 if (!Directory.Exists(directoryPath))
                            Directory.CreateDirectory(directoryPath);
                        else
                            entry.ExtractToFile(entryPath);


the code above skips the first file in a folder.
It should be without the else clause in order to work properly.

 if (!Directory.Exists(directoryPath))
{
                            Directory.CreateDirectory(directoryPath);
}
                  
entry.ExtractToFile(entryPath);


Unfortunately we don't have much time to test this more as we are busy with the upgrade of the themes and plugins but I would suggest you to test this functionality a bit more.

Thanks,
Boyko
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.