VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: larissa_n on January 25, 2013, 23:37:50 PM

Title: Custom sort-by criterium - where in the code?
Post by: larissa_n on January 25, 2013, 23:37:50 PM
Hey,

I need to have a custom orderby-criterium which is user proximity. I have user location (cookies/IP) and product location (customfields) and I have an idea of how to calculate this value, but I feel completely lost in where to insert my code into virtuemart to get this extra filter.

I find tutorials for VM1, but not for VM2, and these are the files that changed the most.

I can see that the product.php assigns a SQL query to most orderby-cases, but where is this list generated that the admin can choose the actual options from?

Thank you so much for your help!
Larissa