News:

Looking for documentation? Take a look on our wiki

Main Menu

Multiple categories for product module

Started by rayge, August 03, 2015, 22:44:58 PM

Previous topic - Next topic

rayge

I read somewhere where you guys might be updating the module to allows this?

Has this been completed and committed yet?

I ended up having to edit a core file to get it to work for me.. simple but effective.

I opened /administrator/components/com_virtuemart/models/product.php
And changed Line 321 from
$where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id;
To
$where[] = ' `pc`.`virtuemart_category_id` IN (' . $virtuemart_category_id.')';

This way in the module i can simply enter cat ids separated by a comma.

We should also have the opportunity to allow to use created_by rather than modified_by as most of my clients import using a spreadsheet.
I Use: Joomla 3.4.1 & VM 3.0.9

Studio 42

Hi,

nice idea, but not safe to distribute.
Image someone put a name or sql query at the place ?

I think a better way is to change the category_ids as list multiple in XML, get value from the array of cat_ids and filter with Joomla JArrayHelper::toInteger($cat_ids);

Greets,
Patrick