Post by remcofaasse » Sun Apr 22, 2012 1:14 am

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

New member

Posts

Joined
Mon Dec 05, 2011 2:20 am

Post by inactiveaccount9912 » Sun Apr 22, 2012 1:34 am

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.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by rodricrzz » Wed May 02, 2012 3:43 pm

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?

User avatar
Active Member

Posts

Joined
Fri Jun 03, 2011 4:05 pm
Location - Avellaneda, Buenos Aires

Post by inactiveaccount9912 » Thu May 03, 2012 6:38 am

I dont understand what you mean.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by rodricrzz » Thu May 03, 2012 9:04 am

florinsith wrote:I dont understand what you mean.
Open it in new window to view the full image

Attachments

Means? Open it in new window to view the full image.


User avatar
Active Member

Posts

Joined
Fri Jun 03, 2011 4:05 pm
Location - Avellaneda, Buenos Aires

Post by sandropacifico » Thu May 02, 2013 8:00 am

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!


Posts

Joined
Thu May 02, 2013 7:34 am

Post by Street4uv » Mon Mar 05, 2018 9:58 pm

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

Newbie

Posts

Joined
Wed Feb 28, 2018 8:31 pm

Post by IP_CAM » Tue Mar 06, 2018 4:15 am

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

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: Bing [Bot] and 7 guests