M
M
Michael2017-07-31 17:17:41
opencart
Michael, 2017-07-31 17:17:41

How to display the manufacturer in the modules on the main page?

OC v.3.0.2.0
Under the product description {{ product.description }} display {{ manufacturer }} inside the module e.g. latest.php
in the template is extremely simple, but the controller does not like something

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2017-08-01
@Buera

I decided.
add {{ product.manufacturer }} in latest.twig module template
in latest.php controller add following.

$product_info = $this->model_catalog_product->getProduct($result['product_id']);
        
        $data['products'][] = array(
          'product_id'  => $result['product_id'],
          'thumb'       => $image,
          'name'        => $result['name'],
          'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
          'price'       => $price,
          'special'     => $special,
          'tax'         => $tax,
          'rating'      => $rating,
          'href'        => $this->url->link('product/product', 'product_id=' . $result['product_id']),
          'manufacturer'=> $product_info['manufacturer']
        );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question