nopCommerce 4.20 - Feedback and Improvements

7 months ago
Hi nopCommerce team/community,

As usual we are very excited about the upcoming version of nopCommerce 4.20.

But as every new release there are issues that need to be fixed before the actual release.
That is why we would like to open this thread (similar to this one for nopCommerce 4.10, nopCommerce 4.00) to keep all our feedback for nopCommerce 4.20 in one place.

We will post anything we find that is a bug, could be improved or is still missing in nopCommerce 4.20 as a separate post in this thread.

Keep up the good work guys!

Thanks,
Boyko
7 months ago
Hi guys,

We really like the new feature to be able to install/uninstall several plugins at once.

But the way it works now does not allow us to prevent certain plugins to be uninstalled.
Let me give you an example.
We have a Core plugin that contain common libraries shared by all our plugins.
In other words, we don't allow this plugin to be Uninstalled if there are any other SevenSpikes plugins already installed.
Unfortunately with the new functionality we have no way to prevent our customers of uninstalling the Core plugin by mistake and thus their website will not be able to be even started as there will be missing assemblies from the Core plugin.
We also have other plugins that are dependent on each other i.e Ajax Filters Pro require the Ajax Filters to be installed first as otherwise they will not work etc.

So it would be great if we could tell nopCommerce if certain plugins could not be installed/unistalled and return some message i.e "You could not uninstall Core plugin as it is used by other plugins" or "You could not install Ajax Filters Pro plugin as it required the Ajax Filters plugin to be installed first" etc.


Thank you in advance as usual!

Thanks,
Boyko
7 months ago
Hi guys,

To add to my previous post how we handled this in the previous version of nopCommerce.

In the Install method of all our plugins we had an additional check ShouldInstallPlugin which checks that if the Core plugin is not installed then it simply does not call the Install method of the BasePlugin (we always inherit the BasePlugin). This way, even without showing any messages to the clients, at least we didn't allow them to install a plugin that will potentially break the site.

In the Uninstall method of all our plugins we had an additional check ShouldUnInstallPlugin.
If we should not uninstall a plugin we simply don't call the Uninstall method of the BasePlugin and thus it was never really uninstalled.

Now in nopCommerce 4.20 the logic of the actual installation/uninstallation of the plugin is not in the plugin (as it used to be in the BasePlugin) itself and we have no control over it.


The bottom line is that we need a way to prevent certain plugins to be added in the list of plugins that are to be Uninstalled as once they go there and the application is restarted we could do nothing.

Thanks,
Boyko
7 months ago
Thanks a lot, Boyko! Here is a work item
7 months ago
Better Vendor detail(information) page would be great. As you can see on demo website not a great detail page.
6 months ago
Done. Please see this commit for more details

a.m. wrote:
Thanks a lot, Boyko! Here is a work item
6 months ago
Sergei-k wrote:
Done. Please see this commit for more details


Hi Sergei,

Great job! This works great for preventing a plugin to be uninstalled.

But we also need to be able to prevent the installation of certain plugins.

This is very important because as I mentioned in my previous post above we have a Core plugin on which all other our plugins depend.
So if the Core plugin is not installed we want to prevent the installation of the other plugins and let the store owners know that they need to install it first. Right now you are allowed to install the other plugins (without the Core plugin being installed) and after nopCommerce is restarted then all these newly installed plugins could not be loaded as they use libraries from the Core plugin which is not loaded (not installed).

It is very important to handle this scenario and prevent nopCommerce store owners to not be able to start their websites because of some random installation order of the plugins.

p.s: I will add a comment in GitHub.

Thanks,
Boyko
6 months ago
Hi guys,

Can you please comment on the above post?

This is very important to be done before 4.20 is released as otherwise we will have a lot of angry customers.

Alternatively you could implement something like DependentPlugins option in the plugin.json file just like the SupportedVersions.
This way when you are about to Install a new plugin you can simply check if all of its DependentPlugins system names are either already installed or to be installed and if not then do not install that plugin.

What do you think?

Thanks,
Boyko
6 months ago
Hi guys,

We started doing some Linux testing and found out that you are using Bitmap and Image classes in  FileRoxyFilemanService.cs.

Please note that System.Drawing is not supported on Linux   (unless you do some sudo stuffs) and you better use some other library instead.
So now for example the file upload in the editor is not working on Linux (and a lot of other functionality from the editor too).

p.s: Just noticed that you already use ImageSharp so you can change the code to use it instead.

Thanks,
Boyko