Author Topic: [SOLVED]Want to have enter more than 1 category ID  (Read 5389 times)

oceanb702

  • Beginner
  • *
  • Posts: 10
[SOLVED]Want to have enter more than 1 category ID
« 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.

oceanb702

  • Beginner
  • *
  • Posts: 10
Re: [Possible?]Want to have enter more than 1 category ID
« Reply #1 on: February 09, 2012, 18:16:21 pm »
anyone please?

oceanb702

  • Beginner
  • *
  • Posts: 10
Re: [Possible?]Want to have enter more than 1 category ID
« Reply #2 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

lipes

  • Sr. Member
  • ****
  • Posts: 720
Re: [SOLVED]Want to have enter more than 1 category ID
« Reply #3 on: April 23, 2013, 21:52:34 pm »
some solution to virtuemart 2 but with the random product option?
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25