VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Frontend Modules VM 1.1 => Topic started by: oceanb702 on February 09, 2012, 15:06:41 pm

Title: [SOLVED]Want to have enter more than 1 category ID
Post by: oceanb702 on February 09, 2012, 15:06:41 pm
Hi,

I installed the Latest product module. Under the parameter, there's a textbox for category ID. Can i actually enter more than one ID number?

If not, is there a way to enter a main category ID where by all the sub category product will show too.
Title: Re: [Possible?]Want to have enter more than 1 category ID
Post by: oceanb702 on February 09, 2012, 18:16:21 pm
anyone please?
Title: Re: [Possible?]Want to have enter more than 1 category ID
Post by: oceanb702 on February 09, 2012, 18:27:41 pm
problem solved.


Quote
find the line:

Code: [Select]
$q .= "AND #__{vm}_category.category_id='$category_id'";
and replace with


Code: [Select]
$category_id_mod = "'".str_replace(",","','", $category_id)."'";
$q .= "AND #__{vm}_category.category_id IN ($category_id_mod)";


In the Latest Product Module, be sure to separate your category IDs with commas for example:
Code: 1,2
Title: Re: [SOLVED]Want to have enter more than 1 category ID
Post by: lipes on April 23, 2013, 21:52:34 pm
some solution to virtuemart 2 but with the random product option?