Shopping Cart Operations > Template Support

Manufacturer logo on product page?

(1/1)

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:

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

--- End code ---
Add

--- Code: --- $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'];

--- End code ---

and 
Template: /storefront/view/default/template/pages/product/product.tpl
About line 166:

--- Code: ---<a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a>
--- End code ---
Replace with:

--- Code: ---<a href="<?php echo $manufacturers; ?>"><img src="<?php echo $manufacturer_icon; ?>" border="0" title="<?php echo $manufacturer; ?>" /></a>
--- End code ---

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

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod