Results 1 to 5 of 5
  1. #1
    Join Date
    May 2007
    Posts
    214
    Plugin Contributions
    0

    Default 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:
    Code:
      <?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:

    Code:
    index.php?main_page=index&manufacturers_id=12 (or whatever their ID is)
    Thanks so much for your help on such a simple question.

  2. #2
    Join Date
    Mar 2005
    Location
    Helsinki
    Posts
    570
    Plugin Contributions
    0

    Default Re: How to 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

  3. #3
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,719
    Plugin Contributions
    9

    Default Re: How to make Manufacturer Name a link

    Quote Originally Posted by poosk View Post
    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:

    Code:
    <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>

  4. #4
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    455
    Plugin Contributions
    0

    red flag Re: How to make Manufacturer Name a link

    Quote Originally Posted by poosk View Post
    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???

  5. #5
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,719
    Plugin Contributions
    9

    Default Re: How to make Manufacturer Name a link

    Quote Originally Posted by 100asa View Post
    any suggestions???
    Uh, look at my post right above yours.

 

 

Similar Threads

  1. Make Manufacturer Info box a centerbox
    By jasonsfa98 in forum General Questions
    Replies: 0
    Last Post: 8 Aug 2008, 05:13 PM
  2. How do I make the manufacturer sidebar into a drop down?
    By amieco in forum Basic Configuration
    Replies: 5
    Last Post: 25 Aug 2007, 12:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •