Page 2 of 2

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Sun Apr 22, 2012 1:14 am
by remcofaasse
How is it possible to add attribute on the category page?
I believe I have add it but still missing right code for php file. Thank you for you any tips. Kind regards, Remco

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Sun Apr 22, 2012 1:34 am
by inactiveaccount9912
Here is how I added them: In the category.tpl, inside the description div, I added the code:

Code: Select all

<?php
	  $this->language->load('product/product');
	  $attribute_groups = $this->model_catalog_product->getProductAttributes($product['product_id']);
	  ?>
	  <?php if ($attribute_groups) { ?>
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
      <b><?php echo $attribute['name']; ?>:</b> <span style="color:#E7342F;"><?php echo $attribute['text']; ?></span> <br />
      <?php } ?>
      <?php } ?>
	  <?php } ?>
and that is all.

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Wed May 02, 2012 3:43 pm
by rodricrzz
perfect, I could add text to mark the category editing controller and tpl files.
How do I add the link to be directed to the list of products this brand?

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Thu May 03, 2012 6:38 am
by inactiveaccount9912
I dont understand what you mean.

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Thu May 03, 2012 9:04 am
by rodricrzz
florinsith wrote:I dont understand what you mean.
Open it in new window to view the full image

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Thu May 02, 2013 8:00 am
by sandropacifico
Thanks a lot florinsith!

I never used opencart before.

I needed to display the manufacturer in the featured products in 1.5.x version.

I used this way:

1) in the controller featured.php I added this line: 'manufacturer' => $product_info['manufacturer']

$this->data['products'][] = array(
'product_id' => $product_info['product_id'],
'thumb' => $image,
'name' => $product_info['name'],
'price' => $price,
'special' => $special,
'rating' => $rating,
'reviews' => sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']),
'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']),
'manufacturer' => $product_info['manufacturer'],
);
}
}

2) In the view featured.tpl I inserted <?php echo $product['manufacturer']; ?> where I needed, inside a div, like said florinsith but, not worked.

Here the ridiculous part, it worked but, as I did not know the opencart confuse me with the manufacturer field.

I had not registered manufacturers of products which wanted show! : @

I am writing this to warn those who like me have "forgotten" or confused the field [manufacturer] with the form of products.

Thank you!

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Mon Mar 05, 2018 9:58 pm
by Street4uv
Good day sir.
I how do i display the manufacture name on the product grid view. An example is this
Product name
Manufacturers name
Price.
Or how do i add another field to display on the product grid view. An example is this
Product name
Field 1
Field 2
Price.
Thats all i want. please sir. i have tried all i could but its not displaying. please help. Thanks
My opencart version is 1.5.6.1

Re: Add Manufacturer or Model to Category page - 1.5.x

Posted: Tue Mar 06, 2018 4:15 am
by IP_CAM
Product Display Settings vqmod free, OC v.1.5.1 - 1.5.6.5:
this vqmod allowes you to set from admin if you want to display in product listing
(category page, manufacturer page, search , specials) and/or product page the following:
-model;
-manufacturer;
-sku;
-upc;
-stock/stock status depending on how you set to display;
-location;
Each field will display in admin anly if you seted so from admin > system > settings > main store > options tab.
And for each product , each field will display if it has something inserted in admin.
As for installation , just drop the downloaded xml in your vqmod/xml folder and you are set.
Then navigate in admin , in the place mentioned above and set the fields.
https://www.opencart.com/index.php?rout ... on_id=5169
---
Image
---