skip to Main Content

My site was working fine, suddenly the ajax on category pages is not working on second time. On first time it works fine, whether it is pagination or layered navigation, but on second time it doesn’t work. I found out that the URLs are generating incorrect the second time. On first click, it is “headsets?p=2”, while after the page ajax loads, it is “headsets&p=2?p=3” and same case is for layered navigation, doesn’t work on second time.

Also, the code and database are working on local machine and staging site, I run deployment with git/Jenkins, so code and database are the same on all platforms, and the issue is only on live site.

URL: https://www.thetelecomshop.com/au/headsets

2

Answers


  1. Chosen as BEST ANSWER

    Resolved! It was some extension issue, that was removing ?ajax=1 from URLs'. Thanks


  2. In my case it was issue in app/code/Sm/ShopBy/Plugin/Category/View.php this file.

    - $requestUri = preg_replace('/(?|&)ajax=1/', '', $requestUri);
    

    so I commented the above line

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search