Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative ProductCategory.DisplayOrder is set to 0 #7260

Closed
Manuel-Innovapps opened this issue Jul 17, 2024 · 6 comments
Closed

Negative ProductCategory.DisplayOrder is set to 0 #7260

Manuel-Innovapps opened this issue Jul 17, 2024 · 6 comments
Assignees
Labels

Comments

@Manuel-Innovapps
Copy link
Contributor

nopCommerce version: 4.70.4 +

Steps to reproduce the problem:

  1. Edit a category that contains products
  2. In the "products" section at the bottom of the page edit a product to set it's display order
  3. Set the value to a negative number
  4. Update the product
  5. Negative Value is not stored and value is set to 0

Notes

Using the network tab in your browsers dev-tools reveals that the negative number is transmitted to c#, but the model inside CategoryController.ProductUpdate already only contains 0. I could not find any code or action filter that introduce this behavior, so that we would be able to overwrite this functionality for our customers.

This previously worked in nopCommerce 4.60.x

Expected behavior

Negative values should be store correctly.

Additional notes

Our customer relies on this feature heavily, as this increases his capability of sorting products as he likes without the need to change all other products assigned to this category.

Other DisplayOrders are unaffected by this change. The display order of the category itself can be changed to a negative value. The same goes for manufacturer.

This seems to only happens where the display order is can be changed inside a table. This can in example also be seen for the display order of payment methods

@duc-tv
Copy link
Contributor

duc-tv commented Jul 18, 2024

It also happens with the order of the product images. Pls check it.

@exileDev
Copy link
Contributor

Closed #7260

@duc-tv
Copy link
Contributor

duc-tv commented Jul 26, 2024

@exileDev, please check it once again. I cannot change the order of the product images after upgrading to 4.70.4
(latest from 4.70-bug-fixes) (locate: Vietnamese)

image

@Manuel-Innovapps
Copy link
Contributor Author

As far as I know, this has not yet been published into any release. If you want to experience this right now, you will need to generate a patch file from the commit and apply it locally. At least that's what we have done for our customers.

@exileDev
Copy link
Contributor

@duc-tv Also, don't forget to configure the CLDR pattern for localization of client-side validation according to the current culture (Admin area -> Setting -> General settings).

@duc-tv
Copy link
Contributor

duc-tv commented Jul 31, 2024

Thank you all, it works fine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants