Jump to content

Mostrar logos de marcas en top-menu (ps_mainmenu)


smash.imq

Recommended Posts

Buenas! Pues eso... Me gustaría mostrar en el menú, la imagen (logo) que añadimos en el BO cuando creamos una marca. Estoy en prestashop 1.7.8.9 con el tema original de prestashop.

 

He estado buscando en .tpl y en .php y lo unico que he conseguido encontrar referente a esto, lo he encontrado en ps_mainmenu.php y es lo siguiente:

  // Case to handle the option to show all Manufacturers
                case 'ALLMAN':
                    $children = array_map(function ($manufacturer) use ($id_lang) {
                        return $this->makeNode([
                            'type' => 'manufacturer',
                            'page_identifier' => 'manufacturer-' . $manufacturer['id_manufacturer'],
                            'label' => $manufacturer['name'],
                            'url' => $this->context->link->getManufacturerLink(
                                new Manufacturer($manufacturer['id_manufacturer'], $id_lang),
                                null,
                                $id_lang
                            ),
                        ]);
                    }, Manufacturer::getManufacturers());

                    $root_node['children'][] = $this->makeNode([
                        'type' => 'manufacturers',
                        'page_identifier' => 'manufacturers',
                        'label' => $this->trans('All brands', [], 'Modules.Mainmenu.Admin'),
                        'url' => $this->context->link->getPageLink('manufacturer'),
                        'children' => $children,
                    ]);
                    break;

                case 'MAN':
                    $manufacturer = new Manufacturer($id, $id_lang);
                    if ($manufacturer->id) {
                        $root_node['children'][] = $this->makeNode([
                            'type' => 'manufacturer',
                            'page_identifier' => 'manufacturer-' . $manufacturer->id,
                            'label' => $manufacturer->name,
                            'url' => $this->context->link->getManufacturerLink(
                                $manufacturer,
                                null,
                                $id_lang
                            ),
                        ]);
                    }
                    break;

Imagino que deberé cambiar algo de la linea de label (no se de cual de todas), indicando $manufacturer - > img, url o image_urls o vete a saber... por eso mismo pido ayuda jajajaja

 

Alguien me hecha una manita? :) 

Gracias!

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...