0

I am using Magento v1.8.1

My developer (who has now left the team) had implemented custom pagination on my site about a year ago. It was working just fine till recently. Now, clicking on the right arrow button, or on any of the page numbers just returns the first page of results. While we changed our hosting from GoDaddy to AWS recently, there should not have been any code changes that I am aware of.

Here is the codeblock from the phtml page -- for simplicity, I have stripped out all the html formatting related code:

<?php $specialorders = $this->getCollection(); ?>
<?php if(count($specialorders) > 0): ?>
    <?php echo $this->getPagerHtml(); ?>
    <?php foreach($specialorders as $specialorder): ?>
        <?php  echo $specialorder->getData('special_order_num') ;?>
        <?php  echo $this->getStatus($specialorder->getData('status')) ;?>
    <?php endforeach; ?>
<?php else: ?>
    <?php echo "<p class='msg'>You don't have any special orders associated with your account</p>"; ?>
<?php endif; ?>

  • It appears this might be related to caching. I noticed that when clicking on the right arrows, or subsequent page numbers, or even when changing the # of items to show per page from the dropdown, the URL was not changing. However, if I physically concatenate "/?limit=5&p=2" or "/?limit=all&p=1" to the end of the URL in the browser, it behaves just fine. So this may not be a code issue afterall. – user3211239 Mar 23 '16 at 3:32
0

Seems like the problem with the URL generation. When you say

I noticed that when clicking on the right arrows, or subsequent page numbers, or even when changing the # of items to show per page from the dropdown, the URL was not changing. However, if I physically concatenate "/?limit=5&p=2" or "/?limit=all&p=1" to the end of the URL in the browser, it behaves just fine.

Please check the URL of the dropdown <option> tags or arrows li tags by inspecting through firebug or viewing the source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.