News:

AbanteCart v1.4.2 is released.

Main Menu
support

Manufacturer logo on product page?

Started by illusion, January 01, 2013, 05:09:50 PM

Previous topic - Next topic

illusion

is it possible to add the manufacturer logo to the product.tpl ?

Thank you for answer

abantecart

There are number of ways you can do this.

1. You can create a custom block with manufacture selected or media block with image(icon) of manufacturer.
You would need to create this for every manufacturer and add proper block to each product's layout 
This is pain if you have too many manufacturers and products.

2. You can change code to add manufacturer icon on product details page (middle section).

Change the following 2 files:
Controller: /storefront/controller/pages/product/product.php
about line 291after:

$this->data['product_id'] = $product_id;
$this->data['average'] = $average;

Add

$resource = new AResource('image');
$thumbnail = $resource->getMainThumb('manufacturers',
$product_info['manufacturer_id'],
$this->config->get('config_image_grid_width'),
$this->config->get('config_image_grid_height'),
true);
$this->data['manufacturer_icon'] = $thumbnail['thumb_url'];


and 
Template: /storefront/view/default/template/pages/product/product.tpl
About line 166:
<a href="<?php echo $manufacturers?>"><?php echo $manufacturer?></a>
Replace with:
<a href="<?php echo $manufacturers?>"><img src="<?php echo $manufacturer_icon?>" border="0" title="<?php echo $manufacturer?>" /></a>

3. You can change manufacturer static block to show manufacturer icon if in product detail page. You need to add manufactures block to generic product details layout one time.
These has been added to version 1.1.3 but you can copy below files to your abantecart:
https://github.com/abantecart/abantecart-src/blob/2ca3dc68fe2c6e9ef8b48582470f18b2102cbfb1/public_html/storefront/controller/blocks/manufacturer.php
https://github.com/abantecart/abantecart-src/blob/2ca3dc68fe2c6e9ef8b48582470f18b2102cbfb1/public_html/storefront/view/default/template/blocks/manufacturer.tpl

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Forum Rules Code of conduct
AbanteCart.com 2010 -