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
Here is how I added them: In the category.tpl, inside the description div, I added the code:
and that is all.
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 } ?>
Open it in new window to view the full imageflorinsith wrote:I dont understand what you mean.
Attachments
Means? Open it in new window to view the full image. - Sin título-1.jpg (326.64 KiB) Viewed 3863 times
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!
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!
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
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
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
---
---
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
---
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 43 guests