logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Monday, May 10, 2021 7:07:00 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 289

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
There are issues with the screen refresh on the low inventory report if you sort by instock, then edit some values. This happened on a fresh install of 9.0.4 with sample products.
To reproduce:
Open the low inventory report, then sort by instock. Change some values and save. The product listing reverts to the default value, but the instock and availability date reflect the values of the product that used to be in that position. If you refresh the page, it is OK.
There are two issues- the sort order doesn't stay the same after saving and the values in at least two columns don't reflect the right ones for the product in the row. I didn't test the lowstock value. This merchant has the source code so if a change is necessary there, I can make it. A fast patch would be much appreciated- this is a big site where merchant has been with AC more than 10 years and the site is live.
Thanks
1.png (54kb) downloaded 2 time(s).
2.png (38kb) downloaded 2 time(s).
3.png (29kb) downloaded 2 time(s).

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Tuesday, May 11, 2021 6:38:23 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I am able to reproduce the issue. Sorting isn't working properly.
I have reported a bug.

To resolve the issue, please follow these steps:

1- Open file \CommerceBuilder\Reporting\ProductInventoryDataSource.cs
2- Search in GetLowProductInventory function

Code:
case "instock":
    productOrderBy = "P.InStock";
    variantOrderBy = "PV.InStock";
    mainSortExpression = "R.InStock";
    break;


3- Replace with

Code:
case "instock":
case "instock asc":
    productOrderBy = "P.InStock";
    variantOrderBy = "PV.InStock";
    mainSortExpression = "R.InStock";
    break;


4- Search the following in the same file

Code:
case "instockwarninglevel":
    productOrderBy = "P.InStockWarningLevel";
    variantOrderBy = "PV.InStockWarningLevel";
    mainSortExpression = "R.InStockWarningLevel";


5- Replace with

Code:
case "instockwarninglevel":
case "instockwarninglevel asc":
    productOrderBy = "P.InStockWarningLevel";
    variantOrderBy = "PV.InStockWarningLevel";
    mainSortExpression = "R.InStockWarningLevel";


6- Open file \Website\Areas\Admin\Controllers\ReportController.cs

7- Search for
Code:
public ActionResult UpdateSelectedProducts(ListLowInventoryProductsModel listInventoryModel, FormCollection form, string Command, string AllSelected, string modelData)


8- Replace with
Code:
public ActionResult UpdateSelectedProducts(ListLowInventoryProductsModel listInventoryModel, FormCollection form, string Command, string AllSelected, string modelData, string sortExpression)


9- Search for
Code:
return ListProducts(modelData);


10- Replace with
Code:
ModelState.Clear();
return ListProducts(modelData, sortExpression);


11- Search for
Code:
return ListProducts(LowInventoryReportModel.Serialize(model));


12- Replace with
Code:
ModelState.Clear();
return ListProducts(LowInventoryReportModel.Serialize(model), sortExpression);
thanks 1 user thanked shaharyar for this useful post.
judy at Web2Market on 5/11/2021(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.