Results 1 to 4 of 4
  1. #1

    help question get manufacturer id from product

    Hello zenners,

    I want to build internal linking from my products to their manufacturers. I am here right now i get it from old threat:
    PHP Code:
    <?php //Display Manufacturer name
    echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' '<b>' TEXT_PRODUCT_MANUFACTURER '</b><a href="' zen_href_link(zen_get_products_manufacturers_id($product_id). FILENAME_DEFAULT,'manufacturers_id=' .'cPath=' $_GET['manufacturers_id']). '">' $manufacturers_name '</a></li>' '') . "\n"?>
    All fine but i cant get the id of the right manufacturer. Is there a way to get the products, manufacturer ID.

    Many regards
    My most recent work: magprom.net

  2. #2

    Default Re: How to get manufacturer id from product

    Never mind, I found my mistake. Here is what i've done
    PHP Code:
    <?php //Display Manufacturer name
    echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' '<b>' TEXT_PRODUCT_MANUFACTURER '</b><a href="' zen_href_link(zen_get_products_manufacturers_id($product_id). FILENAME_DEFAULT,'manufacturers_id=' $product_info->fields['manufacturers_id']). '">' $manufacturers_name '</a></li>' '') . "\n"?>
    My most recent work: magprom.net

  3. #3
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to get manufacturer id from product

    Thank you...saved me some time! Was able to get rid of that silly little sidebox that pops up when on product pages. Matter of fact, I'm trying to move all sidebox functions into the center column and make my website a little cleaner on the layout!

  4. #4
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: How to get manufacturer id from product

    Do you know how to accomplish the same thing in the products_all listing?

    I tried plugging the anchor part of your code into this tpl_modules_products_all_listing.php but it is not retrieving the manufacturers_id.

    PHP Code:
    if (PRODUCT_ALL_LIST_MANUFACTURER != '0' and zen_get_show_product_switch($products_all->fields['products_id'], 'manufacturer')) {
    $display_products_manufacturers_name = ($products_all->fields['manufacturers_name'] != '' TEXT_MANUFACTURER ' ' '<a href="' zen_href_link(zen_get_products_manufacturers_id($product_id). FILENAME_DEFAULT,'manufacturers_id=' $product_info->fields['manufacturers_id']). '">' $products_all->fields['manufacturers_name'] . '</a>' str_repeat('<br clear="all" />'substr(PRODUCT_ALL_LIST_MANUFACTURER31)) : '');
    } else {
    $display_products_manufacturers_name '';

    I also tried replacing $product_info with $products_all but that didn't work.

    I will appreciate any insight that you or anyone else can provide.
    Last edited by mikeel100; 21 Nov 2014 at 06:40 AM. Reason: php code is messy

 

 

Similar Threads

  1. v151 How to hide product descriptions from manufacturer section pages
    By Dan1234 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Apr 2014, 07:51 PM
  2. v151 Get products from one current manufacturer
    By perfumbg in forum General Questions
    Replies: 4
    Last Post: 30 Jan 2014, 04:32 PM
  3. Add Manufacturer image to Manufacturer product page
    By vito in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Jul 2010, 05:05 PM
  4. Buy product X, get 20% off from product Y
    By pasi in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 8 Feb 2010, 02:26 PM
  5. Can't get Manufacturer to show up in Product Listing page
    By KismetDesign in forum General Questions
    Replies: 2
    Last Post: 6 Oct 2009, 08:25 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR