News:

Support the VirtueMart project and become a member

Main Menu

Add manufacturer desc in manufacturere product selection

Started by Meton, October 21, 2015, 14:20:53 PM

Previous topic - Next topic

Meton

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
Joomla!         3.6.5
VirtueMart     3.0.18

Spiros Petrakis

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;
    }
  }

}

Joomla templates and extensions development
https://www.yourgeek.gr

Vincenzo77

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

Vincenzo77

Sorry, I was wrong to enter the name of the category, instead of writing only DIOR I put BRANDS DIOR.
IT WORKS