Author Topic: Add manufacturer desc in manufacturere product selection  (Read 499 times)

Meton

  • Jr. Member
  • **
  • Posts: 92
Add manufacturer desc in manufacturere product selection
« on: October 21, 2015, 14:20:53 pm »
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

Spyros Petrakis

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 101
    • OlympianThemes
  • VirtueMart Version: Always latest Stable
Re: Add manufacturer desc in manufacturere product selection
« Reply #1 on: October 23, 2015, 22:38:46 pm »
Try the following code in components\com_virtuemart\views\category\tmpl\default.php or better in a template override for this view

Code: [Select]
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;
    }
  }

}
Fast and simple to use templates with fanatical support
https://www.olympianthemes.com

Vincenzo77

  • Beginner
  • *
  • Posts: 4
  • A beginner
  • Skype Name: vincenzo.perna29
  • VirtueMart Version: 3.2.14
Re: Add manufacturer desc in manufacturere product selection
« Reply #2 on: May 09, 2018, 19:15:00 pm »
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

  • Beginner
  • *
  • Posts: 4
  • A beginner
  • Skype Name: vincenzo.perna29
  • VirtueMart Version: 3.2.14
Re: Add manufacturer desc in manufacturere product selection
« Reply #3 on: May 09, 2018, 20:19:36 pm »
Sorry, I was wrong to enter the name of the category, instead of writing only DIOR I put BRANDS DIOR.
IT WORKS