News:

Support the VirtueMart project and become a member

Main Menu

How to display manufacturer name on product details page

Started by z-analysts, February 06, 2015, 04:54:02 AM

Previous topic - Next topic

z-analysts

I know there is a config option to display the manufacturer name on the product details page however I don't want to use that option. Instead I want to display the product manufacturer name underneath the product name.

Can someone please help me with the code to display the manufacturer name for the current product?

Thank you!

VM 3.0.4
Joomla 3.3.6

jenkinhill

Have you looked at the template files? It is very easy to identify the code for manufacturer in components/com_virtuemart/views/productdetails/tmpl/default.php (or in your equivalent template override file if using one already)


<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
    echo $this->loadTemplate('manufacturer');
}
?>



You can move that code (which loads the manufacturer template (default_manufacturer.php) to wherever you need it in the default.php to create an override. Some css adjustment will prbably be needed.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum