grandnode2 icon indicating copy to clipboard operation
grandnode2 copied to clipboard

Fixed the product changed warning when save product after modified at…

Open Lurvy opened this issue 3 years ago • 1 comments

Fixed the product changed warning when save product after modified attribute combination

Resolves #300
Type: bugfix

Issue

When save product after modified attribute combination there is a warning: "You can't edit the product because has been changed. Please refresh page and try to change again". If continue to click save, then "Product attributes" and "Attribute combinations" will could not add new or delete forever.

Modify attribute combination will change "UpdatedOnUtc" field of product, and when save product will verify the "Ticks" on page is equal "UpdatedOnUtc", but the "Ticks" is not newest.

Solution

Add newest "Product Ticks" to "Attribute Combination List", and change the hidden value "Ticks" on page after request list.

Breaking changes

Testing

1. Edit product, Click Tab "Inventory", Change "Manage inventory method" to "Track inventory by product attributes", Save it.
2. Add some "Product attributes" and checked "Allow to use in attribute combinations", add some "Attribute value".
3. Modify (Add / Delete / Generate / Clear) "Attribute combinations".
4. Click "Save" or "Save and Continue Edit".

Lurvy avatar Aug 05 '22 02:08 Lurvy

Fixed product cache issue: same as delete attribute combination, change attribute combination stock quantity will also write and clear the product cache frequently in a short period of time, that will cause cache can't clear

Lurvy avatar Aug 10 '22 01:08 Lurvy