Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Manufacturer logo on product page?  (Read 7275 times)

Offline illusion

  • Newbie
  • *
  • Posts: 2
  • Karma: +1/-0
    • View Profile
Manufacturer logo on product page?
« on: January 01, 2013, 05:09:50 PM »
is it possible to add the manufacturer logo to the product.tpl ?

Thank you for answer

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Manufacturer logo on product page?
« Reply #1 on: January 01, 2013, 11:04:29 PM »
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: [Select]
$this->data['product_id'] = $product_id;
$this->data['average'] = $average;
Add
Code: [Select]
$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:
Code: [Select]
<a href="<?php echo $manufacturers?>"><?php echo $manufacturer?></a>Replace with:
Code: [Select]
<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

 

Powered by SMFPacks Social Login Mod