[MSHOP-74] Shop Category Page and Product Search Result - Pagination does not show correct number of products Created: 23/Apr/13 Updated: 29/May/13 Resolved: 24/May/13 |
|
| Status: | Closed |
| Project: | Magnolia Shop (closed) |
| Component/s: | None |
| Affects Version/s: | 1.1.1 |
| Fix Version/s: | 1.1.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Raphael Joss | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Visible to: |
Christian Balaguer, Daniel Kummer, Jeannette Popken, Lionel Biry, Stefan Baur
|
||||||||||||||||
| Description |
|
The number of found products is not correct in the context of pagination. The number shows the number of product shown on one page, not the total number of products found. You can recreate this with the sample shop. |
| Comments |
| Comment by Jaroslav Simak [ 09/May/13 ] |
|
commit: https://git.magnolia-cms.com/gitweb/?p=forge/shop.git;a=commit;h=6b6183e8ec5a0b2bc222a10c85f901bd9309b263 |
| Comment by Jan Haderka [ 09/May/13 ] |
|
I don't think the fix is complete. It just creates another issue. [#assign count=pager.count!0] so when used without paging, page will list "0 products found" instead of the real number of products found. |
| Comment by Jaroslav Simak [ 09/May/13 ] |
|
assign pager = model.pager will always create new STKPager and in its constructor we always save size of all items. Is there anything wrong with getting it from pager? |
| Comment by Jan Haderka [ 09/May/13 ] |
|
what if there is custom model or custom pager impl? The counter will still work (since it will be defaulted to 0, but product size will be wrong). At least create variable called "displayedproductsize" or similar and set it to counter value or if that is zero, set it to real product size. ... or change behaviour of how count variable is created ... right now count has some default value which we either expect to never use (in which case it should not be set) or we expect that it might be used (in which case it will produce wrong result later). |
| Comment by Jan Haderka [ 10/May/13 ] |
|
One more issue here - this fix depends on pager.getCount() method from latest STK so you need to update shop dependency in both pom and module descriptor to reflect this change. |
| Comment by Magnolia International [ 24/May/13 ] |
|
(ignore me, was just testing a Jira bug Jan reported when trying to reopen this issue) |