Example: A category has 72 items in it

In catalog settings we have set the number of items to show per page to 24

So in front end there will be 3 pages with 24 items each.

Now when a customer views the pages and is on page 3, than clicks an item on that page to view the details, and after that hits the back button, than they are on page 1 of that category again instead of page 3

is this standard Magento behaviour? Can this be changed, so it will take the customer back to the last viewed page?


is this standard Magento behaviour?

No, this is due to some kind of AJAX navigation, added by an extension or your theme. You say, "the url does not change", this means the pages are loaded in the background and the site is only partially refreshed without changing the URL.

Can this be changed, so it will take the customer back to the last viewed page?

A good AJAX navigation would make use of the HTML5 history API or at least this technique: https://stackoverflow.com/questions/3009380/whats-the-shebang-hashbang-in-facebook-and-new-twitter-urls-for

But yours obviously doesn't, so it cannot be changed, except if you replace the navigation module.

  • I will contact the theme developers – Carlo Jul 10 '15 at 15:14

By default, you should see page 3 of your category and not page 1 of your category. Be honest, Magento has nothing to do with this behaviour, because the back-button of a particular browser has no special preference for a Magento site. :-)

It may sound confusing. To understand, you should know how back-button of a browser works. Every brwoser will keep a reference to the urls that you have visited previously. So the history Url stack will look like this in your above depicted case.

domain.com/some-product-in-category.html <<=== current_url

Now when you click on the back-button, according to the URL stacks, browser will redirect you to the url domain.com/category?limit=24&p=3 for sure. If it is not happened like that, then that means

  • There may be some javascript functions which will allow us to listen to back button click and modifying the result. (but this is a rarest situation)

  • Or somehow,the previous link reference will be domain.com/category?limit=24&p=1. The link that I have attached above gives you a clear such an example. Go through it.

  • i know, but when i browse through the different pages, the url does not change. if you want to see for yourself, here's a link to the sites category: dev.blinckstar.nl/super-sale/necklaces – Carlo Jul 7 '15 at 8:49

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.