Hi
Can i echo the category name of the product in the invoice?
Need the same thing...
The category name to show on the Invoice and Confirmation Email.
Anyone??
Thanks
I tried some options like $item->virtuemart_category_name; or $product->category_name; but dosen't work.
This is my solution to put category name in Confirmation Email
In the file: invoice/invoice_items.php
after this lines
foreach($this->orderDetails['items'] as $item) {
$qtt = $item->product_quantity ;
$product_link = JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id . '&virtuemart_product_id=' . $item->virtuemart_product_id;
add the following code
$db = JFactory::getDBO();
$query = 'SELECT `category_name` ' . ' FROM `#__virtuemart_categories_es_es` ' . ' WHERE `virtuemart_category_id` =' .$item->virtuemart_category_id ;
$db->setQuery($query);
$catname = $db->loadResult();
to print the category name, put this line where you want
<?php echo $catname; ?>
The table virtuemart_categories_es_es will be diferent depending your language site.