nopCommerce 4.50 -Suggestions, bug reports and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anos atrás
Hi, Boyko.

We have removed the IRepository.EntityFromSqlAsync method under this ticket. Instead, you can use the INopDataProvider.QueryProcAsync method

Nop-Templates.com wrote:
Hi guys,

It seems like you have removed the EntityFromSqlAsync method from the IRepository interface and from the EntityRepository respectively.
We use this method to call a stored procedure (yes we still use stored procedures in some of our plugins) so we need some alternative method we could use to call a stored procedure now.
I don't seem to find how to do it in nopCommerce 4.50.

Have you thought about this and could you please advise on what we should use now?

p.s: Please note that probably there are other nopCommerce vendors still using stored procedures for their plugins and also many customizations of nopCommerce require the usage of stored procedures.

Thanks,
Boyko
2 anos atrás
I am not sure in this bug.
I tried to add js script (not file!) on the cshtml page
<script asp-location="Footer" asp-exclude-from-bundle="true" src="https://js.squareupsandbox.com/v2/paymentform"></script>

and I saw this error
System.IO.FileNotFoundException: No files found matching exist in an asset
   at WebOptimizer.Asset.ExpandGlobs(IAsset asset, IWebHostEnvironment env)
   at WebOptimizer.Asset.GenerateCacheKey(HttpContext context)
   at Nop.Web.Framework.TagHelpers.Shared.NopScriptTagHelper.ProcessSrcAttribute(TagHelperContext context, TagHelperOutput output)
   at Nop.Web.Framework.TagHelpers.Shared.NopScriptTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
   at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)


I could do it using this command
nopHtmlHelper.AddScriptParts(ResourceLocation.Footer, "https://js.squareupsandbox.com/v2/paymentform");
2 anos atrás
foxnetsoft wrote:
I am not sure in this bug.
I tried to add js script (not file!) on the cshtml page
<script asp-location="Footer" asp-exclude-from-bundle="true" src="https://js.squareupsandbox.com/v2/paymentform"></script>

and I saw this error


Hi! We are revising some parts of the new bundling and will add handling external resources.
So far you can disable processing through the Tag Helper opt-out character ("!").

<!script src="https://js.squareupsandbox.com/v2/paymentform"></!script>
2 anos atrás
Alexey,
Thank you for your answer. I'll use this solution.
I copied my code from the Avalara plugin.

    var scriptUrl = avalaraTaxSettings.UseSandbox ? AvalaraTaxDefaults.CertificatesSandboxScriptUrl : AvalaraTaxDefaults.CertificatesScriptUrl;
    <script asp-location="Head" asp-exclude-from-bundle="true" src="@scriptUrl"></script>

Look for this file
nopCommerce_4.50_Source\Plugins\Nop.Plugin.Tax.Avalara\Views\Customer\ExemptionCertificates.cshtml

I think you need to change it too.
2 anos atrás
Hi guys,

Congratulations on the nopCommerce 4.5 RC!

Unfortunately, the js bundling is still not working properly as the jQuery and some other scripts are added to the bundle after any scripts added by the plugins.

Currently the code is like this and it works fine without JS bundling as the Footer scripts are added after the main scripts that do not have a specified location but this breaks when the JS Bundling is enabled and they are added to the Footer as then they are added after the main scripts:

<body>
   @RenderBody()

   @* main scripts here *@
    <script src="~/lib_npm/jquery/jquery.min.js"></script>  
    ...
  

    @NopHtml.GenerateScripts(ResourceLocation.Footer)
    @NopHtml.GenerateInlineScripts(ResourceLocation.Footer)
</body>


I think you need to change the order of the scripts in the _Root.Head.cshtml so that the main scripts like jquery are always added to the Footer prior to any other scripts i.e plugin scripts added in RenderBody().

<body>
    
@* main scripts should be first and always in the Footer *@
<script src="~/lib_npm/jquery/jquery.min.js" asp-location="Footer"></script>  
    ...

   @RenderBody()

    @NopHtml.GenerateScripts(ResourceLocation.Footer)
    @NopHtml.GenerateInlineScripts(ResourceLocation.Footer)
</body>


Thank you for looing at this and Happy New Year!

Thanks,
Boyko
2 anos atrás
Hi guys,

The issue described here with the css order is still present in the the RC version.

The main issue is that the styling of the plugins is loaded prior to the styling of the theme (the theme styling is loaded last) and thus the plugins look broken.  The order needs to be the same as it used to be in 4.4 and any other previous version of nopCommerce.

Thanks,
Boyko
2 anos atrás
Hi guys,

Did you have a chance to look at the above javascript and css ordering issues?

Basically we need to ensure that the order of js and css files is the same as in previous versions of nopCommerce (with or without js/css bundling enabled).

Please let me know if you need further details from us or if something is not clear since they were reported several days ago and we never heard back from you!

nopCommerce 4.5 release date is approaching and these issues need to be corrected prior to that!

Thanks,
Boyko
2 anos atrás
Nop-Templates.com wrote:

The main issue is that the styling of the plugins is loaded prior to the styling of the theme


Hi! We'll register the main CSS/JS files a bit earlier in the layout output as we did in 4.40. It should solve possible issues with priority.
2 anos atrás
Hi, Boyko! We've changed the priority of assets. Details in this commit.
2 anos atrás
alexey.a wrote:
Hi, Boyko! We've changed the priority of assets. Details in this commit.


Hi Alexey,

Thank you for the changes!

Unfortunately there are still some breaking changes.
Since you have removed the styles from the Footer in the administration (also in the public area), it is no longer possible to include new styles from plugins integrated as Widgets in the administration.

For example we have several plugins that include styles in the administration (and not only styles). Since they are Widget plugins integrated in the admin widget zones i.e "admin_searchbox_before" , they are executed when the widget zone is called by nopCommerce. Unfortunately it is too late to add styles when you are called as a widget plugin in the administration since the
@NopHtml.GenerateCssFiles() has already been called prior to that and thus any styles added after that are simply omitted by nopCommerce.

Could you please add back the styles in the Footer so that we can add styles there from within widget admin plugins or at least add a new widget zone somewhere prior to @NopHtml.GenerateCssFiles() that we can use to include styles?
Or even better if you could add 2 widget zones - one prior and one after the default admin styles)?

p.s: Currently we have 5 plugins affected by this and we can't come up with a proper solution/workaround and that is why I am writing to you.

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