Dear VM support,
I hope someone can help me with this issue:
We are using the latest VM and Joomla. To pull in the category name into the invoice, I am adding this code in invoice_items.php via override in template HTML.
$db = JFactory::getDBO();
$query = 'SELECT `category_name` ' . ' FROM `xxxx_virtuemart_categories_en_gb` ' . ' WHERE `virtuemart_category_id` =' .$item->virtuemart_category_id ;
$db->setQuery($query);
$catname = $db->loadResult();
And display using:
echo $catname;
Most of the category names come up on the invoice, but a few category names - the newer ones, does not display. With an update, did virtuemart by any chance change the DB table structures? I also could not find the table entries for thos category ID's in the mySQL database. Yet it does show up in the front-end for the products.
Any help appreciated.
Thanks,
MediaX
Link to site: http://www.jbfurniture.co.za
Hi VM Support,
After doing some thorough inspection I noticed that I was at fault here. The database has two sets of tables and I was calling the data from the wrong section.
My issue is resolved now. Thank you all.
Kind regards,
MediaX