VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Coding Central => Topic started by: ioncap on March 15, 2016, 11:49:06 AM

Title: Marking visited categories
Post by: ioncap on March 15, 2016, 11:49:06 AM
Hello dear people ;D

VirtueMart: 3.0.13.6
Joomla!:3.4.8


On this page (http://www.bonucci.de/webshop-top/de-groot-edelgebak) 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:
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
Title: Re: Marking visited categories
Post by: Ghost on March 15, 2016, 11:53:12 AM
Categories have a sublayout (/components/com_virtuemart/sublayouts/categories.php). VM by default saves last visited category but only 1.
Title: Re: Marking visited categories
Post by: ioncap on March 15, 2016, 11:56:17 AM
Thank you kindly Ghost for your quick reply!