Forums / Templates, Stylesheets, Page Layout / How can I make Manufacturer Name a link?

How can I make Manufacturer Name a link?

Locked

Started by mcanes on 14 Jul 2008, 12:50 AM · Views: 1,488

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
14 Jul 2008, 12:50 AM
#1
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

How can I make Manufacturer Name a link?

Hello all... Can someone tell me how I can turn the following code that is currently used to display the Manufacturers Name on the Product Info page into a link to other items by that manufacturer.

Here is the code that shows the name currently:

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

Now I want to make that text a link to the page that the Manufactures sidebox links to:

index.php?main_page=index&manufacturers_id=12 (or whatever their ID is)

Thanks so much for your help on such a simple question.

9 Aug 2008, 2:21 PM
#2
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: How can I make Manufacturer Name a link?

this used to work...

<?php if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) { echo '<a class="manufacturer" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers_id) . '">' . zen_image(DIR_WS_IMAGES . $check_image) . '</a></br>' . "\n" ; } else { echo '<!--NO IMAGE-->'; } ?>

(just change image to text <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '' : '') . "\n"; ?>

BUT IT DOES NOT WORK WITH v138.. help.. plz

20 Sep 2008, 3:06 PM
#3
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: How can I make Manufacturer Name a link?

poosk:

this used to work...

<?php if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) { echo '<a class="manufacturer" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers_id) . '">' . zen_image(DIR_WS_IMAGES . $check_image) . '</a></br>' . "\n" ; } else { echo '<!--NO IMAGE-->'; } ?>

(just change image to text <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '' : '') . "\n"; ?>

BUT IT DOES NOT WORK WITH v138.. help.. plz

This will work. Replace the <ul id="productDetailsList"> section of includes/templates/YOUR_TEMPLATE/tpl_product_info_display.php with the below:

<ul id="productDetailsList">
  <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT .  $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>'  : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?> <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . '<a class="manufacturer" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $product_info->fields['manufacturers_id']) . '">' .  $manufacturers_name . '</a></li>' : '') . "\n"; ?>
</ul>
22 Sep 2008, 5:32 PM
#4
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: How can I make Manufacturer Name a link?

poosk:

this used to work...

<?php if ($check_image = zen_get_products_manufacturers_image((int)$_GET['products_id'])) { echo '<a class="manufacturer" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers_id) . '">' . zen_image(DIR_WS_IMAGES . $check_image) . '</a></br>' . "\n" ; } else { echo '<!--NO IMAGE-->'; } ?>

(just change image to text <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '' : '') . "\n"; ?>

BUT IT DOES NOT WORK WITH v138.. help.. plz

any suggestions???