nopCommerce 4.10 - Bug fixes and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Nop-Templates.com wrote:
Hello Andrei.

In this commit:
"#2115 Implemented showing vendor name on the shopping cart and order details page"

it seems that only the <th> and <td> elements have been added to the Order Summary table and the table on Order Details page, but the required <col> element is missing.

Depending on table content, this may cause the table layout to break apart.
Please add the required <col> elements too. The two files in question are:

Shared\Components\OrderSummary\Default.cshtml

Order\Details.cshtml


Thanks a lot
/ Hristo


Hi Andrei,

Did you see this post?

Thanks,
Boyko
5 years ago
Nop-Templates.com wrote:
it seems that only the <th> and <td> elements have been added to the Order Summary table and the table on Order Details page, but the required <col> element is missing.

Depending on table content, this may cause the table layout to break apart.
Please add the required <col> elements too. The two files in question are:

Shared\Components\OrderSummary\Default.cshtml

Order\Details.cshtml


Thanks a lot for reporting! Fixed
5 years ago
Hi Andrei,

There is a problem with the images when they are saved in the database.

The "ValidatePicture" method is resizing the images to the configured Maximum image size in the administration.
For example if you upload a product image with 200 px x 200 px resolution it is resized to 1920px x 1920px (default max size). If we get the image without resizing (original size) the image is with bad quality and is very large. This has two drawbacks:
- The image size is bigger than the original one making the database huge
- The image is stretched and the quality is bad

Regards,
Stoyan
5 years ago
a.m. wrote:
it seems that only the <th> and <td> elements have been added to the Order Summary table and the table on Order Details page, but the required <col> element is missing.

Depending on table content, this may cause the table layout to break apart.
Please add the required <col> elements too. The two files in question are:

Shared\Components\OrderSummary\Default.cshtml

Order\Details.cshtml

Thanks a lot for reporting! Fixed


Thanks, Andrei.
The "Order Summary" table is good now.
Can you please fix the table in "Order Details" too? That one is still missing the new <col> element.
5 years ago
Hi guys,

There is an issue with the SaveSlug method implementation and especially this line:

var entityName = entity.GetType().BaseType.Name;


This would work when you edit an existing entity (loaded as proxy type) but does not work when you create a new entity and it is a POCO object (not a proxy) and you end up with the actual base type which is "BaseEntity" instead.

Just try to create a new product and you will see what happens.

p.s: I have suggested in the past that the ISlugSupported interface should contain the actual name that is stored in the UrlRecord table rather than using reflection.

public interface ISlugSupported
{
        string EntityName { get; }
}


This will allow the plugin vendors to name their entities as they want without worrying about name collisions. For example we have a plugin that has Article entity and another vendor also has Article entity in their plugin, which makes both plugins incompatible. We should be able to override the name of the entity and prefix it for example i.e SS_Article (SS for Seven Spikes which is our company name).

Thanks,
Boyko
5 years ago
Nop-Templates.com wrote:
Can you please fix the table in "Order Details" too? That one is still missing the new <col> element.

Sure. Done.

Thanks again

Nop-Templates.com wrote:
This would work when you edit an existing entity (loaded as proxy type) but does not work when you create a new entity and it is a POCO object (not a proxy) and you end up with the actual base type which is "BaseEntity" instead.

Also fixed
5 years ago
Hi Andrei,

Thank you for the quick fixes!

This is actually an improvement suggestion which we already use and I think you might also consider adding it out of the box - Add EF Core profiling to the MiniProfiler.

https://miniprofiler.com/dotnet/HowTo/ProfileEFCore

I think it is quite useful for analyzing the database requests and optimizing the code.

Thanks,
Boyko
5 years ago
Thanks, Boyko! Also done
5 years ago
Nop-Templates.com wrote:


There is a problem with the images when they are saved in the database.

The "ValidatePicture" method is resizing the images to the configured Maximum image size in the administration.
For example if you upload a product image with 200 px x 200 px resolution it is resized to 1920px x 1920px (default max size). If we get the image without resizing (original size) the image is with bad quality and is very large. This has two drawbacks:
- The image size is bigger than the original one making the database huge
- The image is stretched and the quality is bad


Hi Andrei,

Did you create a work item for this?

Thanks,
Boyko
5 years ago
Greetings Andrei,

we have a suggestion concerning the new Consents field at the bottom of the Customer info page.

If we leave it like it is, we would need to write additional styling for all of the themes and for each resolution.

Instead, we propose we change the markup, so that it corresponds to all other fields and this way it will automatically get the styling from each theme.

This is our proposition:


@if (Model.GdprConsents.Count > 0)
{
   <div class="fieldset">
       <div class="form-fields">
            @foreach (var consent in Model.GdprConsents)
            {
               if (consent.IsRequired)
               {
                   <script asp-location="Footer">
                        $(document).ready(function() {
                           $('#save-info-button').click(function() {
                                if ($('#consent@(consent.Id)').is(':checked')) {
                                        //do some stuff
                                        return true;
                                    } else {
                                        //just show validation errors, don't post
                                   alert('@Html.Raw(JavaScriptEncoder.Default.Encode(consent.RequiredMessage))');
                                        return false;
                                    }
                                });
                            });
                    </script>
                }
                <div class="inputs accept-consent">
                   <input id="consent@(consent.Id)" type="checkbox" name="consent@(consent.Id)" checked="@consent.Accepted" />
                   <label for="consent@(consent.Id)">@consent.Message</label>
                </div>
            }
        </div>
   </div>
}



We have also added a check if there are consents at all, and if there aren't any, then the additional markup would not be rendered.

Kind Regards,
Valentin.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.