News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Marking visited categories

Started by ioncap, March 15, 2016, 11:49:06 AM

Previous topic - Next topic

ioncap

Hello dear people ;D

VirtueMart: 3.0.13.6
Joomla!:3.4.8


On this page i'd like to do something about the current way of marking visited/viewed categories. As it is done at the moment of writing this post: CSS (a:visited) and as some may know, this is a bad idea. After visiting all the categories and not clearing the browser history all the categories will be marked as visited *poef* and gone is the functionality as it was ment to be.

My idea now is to create 2 arrays and store them in a $_SESSION:

       
  • Displayed categories
  • Visited categories
The "visited" style will be added to the category after checking if the category_id is in both arrays. For implementation of this functionality i need to know in what file the categories are being displayed (in case this is a function i would like to know where this function is located).
If anyone can point me in the right direction and/or if someone would like to help with the creation of this functionality, that would be marvelous!


Greetings,
-Ioncap

Ghost

Categories have a sublayout (/components/com_virtuemart/sublayouts/categories.php). VM by default saves last visited category but only 1.

ioncap

Thank you kindly Ghost for your quick reply!