Show category name in product detail page- hack (virtuemart)
In order to display category name in your product detail page you need to modify some of your Virtuemart files.
Requirement:
Joomla 1.5.X
Virtuemart 1.1.X
Here’s how:
1. Backup virtuemart files and back up joomla database
2. Go to administrator/components/com_virtuemart/html/shop.product_details.php
3. Look for :
$recent_products = $ps_product->recentProducts($product_id,$tpl->get_cfg(’showRecent’, 5));
and insert the code below:
$db->query( “SELECT category_id, category_name FROM #__{vm}_category WHERE category_id=’$category_id’”);
$db->next_record();
$category_name = shopMakeHtmlSafe( $db->f(’category_name’) );
4. Look for :
$tpl->set( “recent_products”, $recent_products); // Recent products
and insert the code below:
$tpl->set( “category_name”, $category_name );
5. Save shop.product_details.php
6. Go to FLYPAGE file (I’m using garden_flypage.tpl.php) and insert anywhere in the code.
7. Save FLYPAGE file.
Contact me at arni[at]virtuosomaster.com if you need my help.

Ratings:
Posted in:
Joomla, Virtuemart — admin|
|
|



















