Paging doesn't work correctly on either BuyNow or Product Listing pages.
On BuyNow, the first 10 items are shown with the numbers 0-10 (should be 1-10), the next 2 (of 12) show as two items, but the range is 10-12 (should be 11-12).
On the Product Listing page (from Manage Products), problems are bigger. With 108 products, and the default set at 10, 40 items show with the pager showing 0-40 of 108. Clicking next, the next 40 items show, pager stays at 0-40 of 108, same is true for successive clicks of next until the end is reached, at which point the pager goes out of range, and shows something like 120-160 of 240.
Changing the items per page to 25, the first 25 items show, but the pager says 0-40 of 108. Same behavior clicking next, item list advances to second, then third 25, but pager says 0-40 of 108.
Version 2.93, DNN 5.4.2
We have changed the index to begin at 1 instead of 0 and the update will be availible in the next release 2.94
It's better (a little), but it's not fixed.
Running 2.96 now,
With 108 products, the first page shows products 1-10 of 108.
Click Next, the next 10 products are displayed, pager still reports 1-10 0f 108.
Click Next again, the next 10 products are displayed (21-30), pager reports 11-20.
Click First from here, the first 10 products are displayed, pager reports 21-30.
The problem is more than just correcting the index/starting number.
Another thing that would help, would be to make the default number of products displayed a configurable setting. Because it is very slow moving from one group of 10 to the next, and because setting the count higher doesn't persist going from list to detail and back, it would be good to be able to specify 100 or 200 as the default number of products to display.
Does it work the same as ProductsList.ascx, changing the first number in the dropdownlist becomes the new default? Of course, if we do that, we have to remember to remake the change every time we install an update. It would be better if these were configuration options that persisted across updates.
A bit more about how paging doesn't work correctly...
I set the number to 200 (I have 108 products)
Pager reports 1-200 of 108 (should be 1-108 of 108)
Click on Next link (which should not be active, since already at the end), pager reports 1-0 of 0, and now no links are active. Only option available is Back (to Store Admin menu).
Here is a link to our test site running v2.96 http://www9.smith-consulting.com where you can see the paging on the product listing page is working correctly. Can you compare the stored proc Smith_ListproductByFilter in the 2.96 zip file with what you have on your site to make sure that the stored proc was copied correctly when you upgraded.
I think that explains the problem.
There is NO stored procedure Smith_ListproductByFilter in the 2.96 sqldataprovider. There is such a stored procedure in the database.
There IS a stored procedure Smith_productByFilter in the 2.96 sqldataprovider, which indeed was installed, but which probably is never invoked, because of the naming error.
I guess your test site is updated directly, rather than by applying version update files?
I just looked and the Smith_ListproductByFilter stored procedure is in the 01.00.00.SqlDataProvider file.
The product listing page uses the Smith_ListproductByFilter sproc
From the store admin menu when you click manage products, the manage product screen uses the Smith_productByFilter sproc
Ok, I have compared that procedure in my database to the corresponding procedure in 01.00.00.SqlDataProvider, and they are different.
Even though I have installed 2.96, and the script in 01.00.00.SqlDataProvider drops and recreates the procedure, and even though the 2.96 install ran with no errors, they are different.
Cut and paste the "ListproductByFilter" sproc from the 01.00.00.SqlDataProvider into a new query window in SQL Mgmt Studio and execute it so you have the latest version of the stored procedure in your store sql database.
Of course, I can do that, and I will.
But it leaves me filled with uncertainty. What other procedures have not been updated? Why don't installs get the job done, updating everything they are supposed to?
This is a lingering problem, better recently but obviously not completely resolved. We did a "clean install" on this site not long ago, before going into production. We're only a couple of updates beyond that, and once again, not fully up to date. I hope we aren't faced with having to do it repeatedly to have a properly working system.
The paging issue was just recently reported as you can see from the dates in this thread and was released as a patch and not a minor release. The patch for this stored procedure was released after the minor release v2.96 thats the reason it wasnt included in the 02.96.00.SqlDataProvider file. I will make sure its added to the 02.97.00.SqlDataProvider in the next minor release early next week after the 4th of July. Thanks for the heads up!
Well, I went through the drill of updating the stored procedure (on a localhost install, not ready to start this kind of non-QA patching of my production system, and although I was able to replace the procedure, paging didn't work correctly, with much the same aberrations reported at the beginning of this thread.
so I went to your test system, to confirm that IT works correctly, and IT DOESN'T.
First page of Manage Products presents product 765-768, pager says 1-10 of 257. That is correct.
Click Next, products 774-783 are presented, but pager still says 1-10 of 257.
Click Next again, products 785-784 are presented, pager updates to 11-20 of 257.
Click First, products go back to the first group, 765-768, but pager updates to 21-30 of 257.
Click First again, same products are presented, now pager is correct, 1-10 of 257.
Looks like there is still work to do, to get paging to work correctly, then worry about getting it into an update.
Meanwhile, I have taken the expedient of changing the default in ProductsList.ascx to 200 products per page. I'd still like to see this as a configuration option, rather than having to patch the ascx every time I install an update, but at least it gets around this issue.
I just fixed the paging on the manage products screen and deployed it to the test site http://www9.smith-consulting.com so you can see its working now. I uploaded the hotfix for the manage products screen to the cart downloads page. To deploy the hotfix do the following:
That link gives me "page not found".
I did confirm that paging is working correctly now in the test site.
As I have changed paging in ManagerProducts.ascx to default to 200, which is way more than my current product count, this is not critical, so I will wait for the next release to get the correction. Glad to know it's coming, but no need to jump through hoops to make it available sooner.
I fixed the link on the download page.