Hi guys,
Is it possible to add the manufacturer description to the catagory view page?
What i am trying to do is create a page with the products of a manufacturer and the description.
Currently when you go to the url
products/manufacturer/brand you will only get the products of that manufacturer. I would like to add a manufacturer description here.
Kind regards,
Meton
Try the following code in components\com_virtuemart\views\category\tmpl\default.php or better in a template override for this view
if ($this->categoryId == '0') {
$model = VmModel::getModel('Manufacturer');
$manufacturers = $model->getManufacturers(true, true,true);
foreach ($manufacturers as $manufacturer) {
if ($manufacturer->mf_name == $this->category->category_name ) {
echo $manufacturer->mf_desc;
}
}
}
Good evening,
the code works in part, ie it takes the name of the manufacturer, but not the manufacturer of the selected category.
In practice, by opening the DIOR category, I'm reminded of ZADIG & VOLTAIRE.
How can you solve?
Thank you
Sorry, I was wrong to enter the name of the category, instead of writing only DIOR I put BRANDS DIOR.
IT WORKS