nopCommerce 4.60 - Bug fixes and improvements

Hace 1 año
Hi nopCommerce team/community,

We would like to congratulate the whole nopCommerce team for the BETA of nopCommerce 4.60 and the job they have done!!!

We are once again very excited about the upcoming version of nopCommerce 4.60, especially the move to .NET 7.

We are opening this thread to share issues and suggestions from developers so they can be addressed before the release of the final version.
As with every new release, there are issues that need to be addressed before the actual release.
So we will post anything we find as a bug, could be improved or is still missing in nopCommerce 4.60 in this thread and as a separate post.

Important: We would like to keep this thread strictly related to development issues/suggestions so please don't write with any suggestions for new features etc. as it makes it harder for the nopCommerce team to follow and take appropriate actions.

Keep up the good work guys!

Thanks,
Nop-Templates Dev Team
Hace 1 año
Hi nop team,

One big breaking change is the removal of the CustomProperties in the models.
We use them A LOT in our plugins as it was a very nice extensibility point in nopCommerce .
I guess many other nopCommerce developers are using them a lot so it would be nice to have them back or have some alternative way to add custom data to the models.

Thanks,
Boyko
Hace 1 año
It may seem like a minor issue but I think the use of way outdated items in the demo products & categories give the impression that the product is outdated. This applies to the products & images in NivoSlider.
SHOUT OUT TO ANYONE STILL USING WINDOWS VISTA!!!

Geoff
Hace 1 año
Nop-Templates.com wrote:
I guess many other nopCommerce developers are using them a lot so it would be nice to have them back or have some alternative way to add custom data to the models

Originally we marked them as [Obsolete] to see any reaction from our community whether it's really required or used (the commit with some details). Considering that no one  argued about it, we've decided to remove this property later (the commit).

I would suggest using "TempData" now to pass any custom data to views from controllers
Hace 1 año
a.m. wrote:
I guess many other nopCommerce developers are using them a lot so it would be nice to have them back or have some alternative way to add custom data to the models
Originally we marked them as [Obsolete] to see any reaction from our community whether it's really required or used (the commit with some details). Considering that no one  argued about it, we've decided to remove this property later (the commit).

I would suggest using "TempData" now to pass any custom data to views from controllers


Hi Andrei,

Thank you for your reply!

I see now but to be honest I haven't noticed that it was marked as "Obsolate" and I didn't know that you plan to remove it completely that is why I was really shocked initially. I don't know how many developers are looking at every commit in the Develop branch and notice such changes (I personally don't check them until the Beta as it is still work in progress and things change all the time).
If it was marked as Obsolete in 4.5 I would have probably noticed it and knowing you are about to remove it and take some actions about it.
Is it possible to get it back for 4.6?  You can leave the Obsolate attribute and add a comment explaining that it will be removed in nopCommerce 4.7 and suggest to use TempData instead. This way the developers will stop using them and will be prapared for the complete removal and also provide feedback with pros and cons and you can decide based on this if they need to be removed or not.

In general I think it is a really nice extensibility point that really helps developers to easily extend nopCommerce from plugins so as a developer I am not happy this needs to be removed and especially when I have a ton of code already using it.
We really use it heavily in the Administration of our plugins where we have backend code that relies on CustomProperties i.e Product, Category and Manufacturer mappings. So we need the binding to custom properties to also work as before.
This change affects all our plugins that support Mappings in the administation i.e JCarousel etc. and also plugins in the public area like One Page Checkout, Instant Search, Quick View, Rich Blog and some custom functionality in the themes.

Anyway I really wish we had this discussion several months ago and not in the last minute prior to the release. I really don't know if we will be able to rewrite everything (and as I said we really use it a lot in our plugins) considering there is less than a week to the official realease.

I hope other developers can share their views on this as well as most probably we are not the only ones using this (I know several clients with custom projects that are also using it).

Thanks,
Boyko
Hace 1 año
Hello Andrei & nopCommerce team.

I've spent some time with the new 4.60 code. So far I have two things to report.

1. There is a missing ID for one of the buttons in ShippingAddress.cshtml file. The "Next" button should have id="shippingaddress-next-button" added, but the code is missing. This ID is already referred in the shippingaddress.js file. Please add it so the script executes as expected.

2. In the new "_ProductDetailsVideos.cshtml" file, I noticed there is a separate container "video-thumbs" created for each video:
@foreach (var video in Model.VideoModels)  {
    <div class="video-thumbs">
        ...
    </div>
}
However, the idea of this container is to hold all thumbnails together, just like in the Picture gallery. Can you please fix it, the code repetition should go like this:

<div class="video-thumbs">
    @foreach (var video in Model.VideoModels) {
        ...
    }
</div>
This way we will be able to arrange the thumbnails both horizontally or vertically by using CSS.


Thanks in advance.
/ Hristo
Hace 1 año
Thanks! Done (3ff972f & a612bf7).
Hace 1 año
Hi guys,

We get errors like the one below when we try to make a clean installation of any of our plugins that have migrations on a brand new nopCommerce 4.6 version (no source code version) running on IIS.

Short message:
The plugin "SevenSpikes.Nop.Plugins.SmartProductCollections" not installed

Full message
System.Exception: An error occured executing the following sql:
INSERT INTO [dbo].[MigrationVersionInfo] ([Version], [AppliedOn], [Description]) VALUES (637231428000000012, '2023-01-11T15:46:16', N'Smart Product Collections base schema')
The error was Cannot insert duplicate key row in object 'dbo.MigrationVersionInfo' with unique index 'UC_Version'. The duplicate key value is (637231428000000012).
The statement has been terminated. ...
....
. at FluentMigrator.Runner.VersionLoader.UpdateVersionInfo(Int64 version, String description)
   at Nop.Data.Migrations.MigrationManager.ApplyUpMigrations(Assembly assembly, MigrationProcessType migrationProcessType, Boolean commitVersionOnly)
   at Nop.Services.Plugins.PluginService.InsertPluginData(Type pluginType, MigrationProcessType migrationProcessType)
   at Nop.Services.Plugins.PluginService.InstallPluginsAsync()


When I check the MigrationVersionInfo table I can see that the migrations are there so they were created sucessfully but for some reason the code of the migration seems to be run one more time and thus throwing the error and leaving the plugin as "Not installed". All our migrations use the default migration attribute without specifying the migration process type (so by default they are MigrationProcessType.NoMatter) and we haven't modified them since 4.5 as they were working fine in 4.5.

Any ideas what could be causing this?

p.s: The strange thing is that we don't seem to get these errors while working locally in VS

Thanks,
Boyko
Hace 1 año
Hi, Boyko. I was able to reproduce the problem you described and will try to understand its causes, here is a ticket to track the status.

Nop-Templates.com wrote:
Hi guys,

We get errors like the one below when we try to make a clean installation of any of our plugins that have migrations on a brand new nopCommerce 4.6 version (no source code version) running on IIS.

Short message:
The plugin "SevenSpikes.Nop.Plugins.SmartProductCollections" not installed

Full message
System.Exception: An error occured executing the following sql:
INSERT INTO [dbo].[MigrationVersionInfo] ([Version], [AppliedOn], [Description]) VALUES (637231428000000012, '2023-01-11T15:46:16', N'Smart Product Collections base schema')
The error was Cannot insert duplicate key row in object 'dbo.MigrationVersionInfo' with unique index 'UC_Version'. The duplicate key value is (637231428000000012).
The statement has been terminated. ...
....
. at FluentMigrator.Runner.VersionLoader.UpdateVersionInfo(Int64 version, String description)
   at Nop.Data.Migrations.MigrationManager.ApplyUpMigrations(Assembly assembly, MigrationProcessType migrationProcessType, Boolean commitVersionOnly)
   at Nop.Services.Plugins.PluginService.InsertPluginData(Type pluginType, MigrationProcessType migrationProcessType)
   at Nop.Services.Plugins.PluginService.InstallPluginsAsync()


When I check the MigrationVersionInfo table I can see that the migrations are there so they were created sucessfully but for some reason the code of the migration seems to be run one more time and thus throwing the error and leaving the plugin as "Not installed". All our migrations use the default migration attribute without specifying the migration process type (so by default they are MigrationProcessType.NoMatter) and we haven't modified them since 4.5 as they were working fine in 4.5.

Any ideas what could be causing this?

p.s: The strange thing is that we don't seem to get these errors while working locally in VS

Thanks,
Boyko
Hace 1 año
Sergei-k wrote:
Hi, Boyko. I was able to reproduce the problem you described and will try to understand its causes, here is a ticket to track the status.


Thank you, Sergei!

Thanks,
Boyko