VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: be on October 26, 2012, 00:13:14 AM

Title: Show categories as attributes in product view?
Post by: be on October 26, 2012, 00:13:14 AM
Hi,
how can I show the multiple categories from one product in the productview?
Actally I use $this->category->category_name;,
but with this I got only displayed the category in which I´m actually be and not all the categories where the product is set in the backend under
"Product Information".

Propably it could be possible to solve this with a direct db-query like this:

$dbcat = JFactory::getDBO();
$dbcat->setQuery("SELECT custom_value FROM #__virtuemart_product_customfields WHERE virtuemart_product_id=".$product->virtuemart_product_id." and virtuemart_custom_id=17 ;"); 
$dbcat->query();
$resultcat = $db2->loadResult();

But my programingskills are to small to get the db-query for the multiple categories work, also because the Information is stored in several mysql-tables.

BR