navigationHistory remembering x number of pages v1.0
Author: Piemol
Date: 25-12-2009
===
Forum: http://forums.oscommerce.com/topic/3...-of-pages-v10/
Contribution:
===
What this is:
This enhanced navigationHistory class, remembers the last x number of pages you visited.
The original osCommerce class works like this:
- If you visit product A, then product B, it only remembers product B.
- If you visit category C, then category D, it only remembers category D.
- If you visit category C, then several products/non-category pages, then category D, it only remembers category D and the products and other pages are
gone!.
- Some pages will be remembered forever, if you visit the contact page, then hundreds of products, the contact page is still in the history!
So this is not my vision of a 'history', and not very conistent in my opinion.
That's why I created my version, that just remembers all of the visited pages (default to a maximum of six, just change the number to something more suitable
for you), except when you refreshed or visit the same page over and over again.
And because of its consistency, you can easily use this class to go back one or two or six pages in history. While the original class sometimes erases a lot
of pages from its memory (the third case in how the original class works), this one can just jump back to the last page where you really were.
===
How to install (after backups!):
- If you didn't modify "catalog/includes/classes/navigation_history.php" you can just back it up and replace it with mine.
- If you did modify it, you can replace the whole function add_current_page with mine, if you modified the function you'll have to check what I made. Not too
difficult to see I hope.
===
See the changes yourself:
Place this code somewhere in the footer before and after you 'installed' this class to see the differences while you browse your shop:
===
Hope you like this contribution !
More...




LinkBack URL
About LinkBacks









Bookmarks