Zen Cart Logo
Forums / General Questions / Manufacturer image link

Manufacturer image link

Views: 951

Results 1 to 5 of 5
26 Jul 2011, 1:00 AM
#1
jace avatar

jace

New Zenner

Join Date:
Nov 2010
Posts:
91
Plugin Contributions:
0

Manufacturer image link

On my product info page, I would like to have the manufacturer image linking to a list of all their products. I've got a basic idea how it's done. I already have the manufacturer image on the product info page, so we can skip that step. I'm just stuck on the php coding. Could someone please correct the error for me?

<?php echo '<a href="http://mydomain.com/store/index.php?main_page=index&manufacturers_id=' . $product_info->fields['manufacturers_id'] . '" alt="Click here for all products from this brand">Link here</a>'; ?>

I'm quite proficient in HTML, but very limited in my ability to work in PHP. Any help appreciated :) TIA!

26 Jul 2011, 2:32 AM
#2
jace avatar

jace

New Zenner

Join Date:
Nov 2010
Posts:
91
Plugin Contributions:
0

Re: Manufacturer image link

Nevermind .. managed to figure it out myself.

Any moderators around, please delete this thread.

6 Oct 2011, 6:22 PM
#3
clsmky avatar

clsmky

New Zenner

Join Date:
Jul 2011
Posts:
23
Plugin Contributions:
0

Re: Manufacturer image link

Jace:

Nevermind .. managed to figure it out myself.

Any moderators around, please delete this thread.

would you mind posting your tpl_product_info_display.php file? I would like to see how you went about a solution. I need the same thing for my site.

It would be greatly appreciated :D

6 Oct 2011, 10:58 PM
#4
jace avatar

jace

New Zenner

Join Date:
Nov 2010
Posts:
91
Plugin Contributions:
0

Re: Manufacturer image link

Sure, would be happy to. Here's my coding below. The first line should already be in the tpl_product_info_display.php file, and the second line, from memory, I added in to show and link the image:

  <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>

<?php echo '<a href="index.php?main_page=index&manufacturers_id=' . $product_info->fields['manufacturers_id'] . '"><BR>' . zen_image(DIR_WS_IMAGES .  zen_get_products_manufacturers_image($product_info->fields['products_id'])) . '</a><br> <br><font size=1>(Click logo for all products<br>from this brand)</font>'; ?>
6 Oct 2011, 11:05 PM
#5
clsmky avatar

clsmky

New Zenner

Join Date:
Jul 2011
Posts:
23
Plugin Contributions:
0

Re: Manufacturer image link

Jace:

Sure, would be happy to. Here's my coding below. The first line should already be in the tpl_product_info_display.php file, and the second line, from memory, I added in to show and link the image:

Thanks for the quick response! I ended up using a line from another post and it worked just fine. After a little modification and surrounding it in a div I was able to position it as I pleased with a little CSS.

For those that find this thread in the future. This what I used.

<?php echo (($flag_show_product_info_manufacturer == 1 and zen_get_products_manufacturers_image((int)$_GET['products_id']) != '' ) ? '<div class="forward">' .'<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $product_info->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id']), 'click to view products by this manufacturer') . '</a>' . '</div>' : ''); ?>

I didnt place it in the <ul> of the other attributes. I placed it directly under the product name div

to see the results on my site