Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default manufacturer image on manufacturer page

    The thing about ZC is the hard things are easy to do, the simple things always seem to confuse me.

    I want to display the manufacturer logo on the manufacturer page.

    No doubt as soon as I post this I'll find a way but in the meantime if anyone can point me in the right direction I'd appreciate it!

    Thanks.

  2. #2
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: manufacturer image on manufacturer page

    Just to update:

    I've simply taken this code and plonked it onto the product listing page:

    <div class="centeredContent">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name']) . '</div>

    Only problem is that it only shows the 'no image' image.

    The relevant images do exist and this code works on the product info page, just not on the product listing.

    Anyone know why?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: manufacturer image on manufacturer page

    You are using:
    Code:
    <div class="centeredContent">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name']) . '</div>
    That isn't available on the Product Listing ...

    You could use a function for this ...

    How to find a function that could be used? Peek at the Tools ... Developers Tool Kit ... and see if the field you are looking for can be found by entering it into the bottom input box and selecting Catalog ...

    Then, review the function to see what is being sent back to you and how to call that function to obtain the value ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: manufacturer image on manufacturer page

    I totally understand what you are saying and performed the search (for 'manufacturers_image') and got 22 results.
    I then checked the pages that these results were on but simply couldn't see the wood for the trees!

    I tried various options but nothing worked.


  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: manufacturer image on manufacturer page

    One function that looks rather appealing is the:
    Code:
    /includes/functions/functions_lookups.php
    
    Line #362 : function zen_get_products_manufacturers_image($product_id) {
    Try something like:
    Code:
    echo 'I AM THE IMAGE: '  . zen_get_products_manufacturers_image($product['id']);
    Then, go adapt the results to displaying the image ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: manufacturer image on manufacturer page

    I am so missing something, still, as I simply cannot see what I am doing wrong (or more to the point, what I am supposed to be doing!).

    I see what you're saying above but for some reason I am simply not getting it.

    This is what I have:
    Code:
    case 'PRODUCT_LIST_NAME':
            $lc_align = '';
            if (isset($_GET['manufacturers_id'])) {
              $lc_text = '
    		  <div class="centeredContent">' . zen_get_products_manufacturers_image((int)$_GET['manufacturers_image']) . zen_image(DIR_WS_IMAGES . $check_image) . '</div>
    		  <h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']),
    But then I use the line, as mentioned,

    Code:
    case 'PRODUCT_LIST_NAME':
            $lc_align = '';
            if (isset($_GET['manufacturers_id'])) {
              $lc_text = '
    		  <div class="centeredContent">echo 'I AM THE IMAGE: '  . zen_get_products_manufacturers_image($product['id']);</div>
    		  <h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']),
    But obviously you cannot use echo in this instance.
    I have tried different combinations but either they blank the page out or simply make no difference!


  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: manufacturer image on manufacturer page

    Sorry ... I have a typo on the products_id variable to use ...

    But you have a mess ...

    This code will display the manufacturers_image but you will want to rearrange it so that it displays where you want it on the listing ...

    Code:
            case 'PRODUCT_LIST_NAME':
            $lc_align = '';
    
            $check_manufacturers_image = zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']));
    
            if (isset($_GET['manufacturers_id'])) {
              $lc_text = '<h3 class="itemTitle">' . $check_manufacturers_image . '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              $lc_text = '<h3 class="itemTitle">' . $check_manufacturers_image . '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break;
    This will set a variable $check_manufacturers_image to be the manufacturers_image and then you can add it where you need it ...

    You can jazz that up as well with ALT tags or sizes etc. ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: manufacturer image on manufacturer page

    As usual, Linda, you are a perfect help but in this case I simply couldn't get this working.

    I know it's my lack of seeing what's right in front of me and I think, for now, I simply need to just leave this.

    I detest admitting defeat but this one simply has me stumped!

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: manufacturer image on manufacturer page

    Try this, in that case statement just add the lines:

    Code:
            $check_manufacturers_image = zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($listing->fields['products_id']));
    echo 'I SEE ' . $check_manufacturers_image . '<br>';
    Then, when you run the Product Listing you will see "somewhere" on the page all the images ... they will just appear as a mess but the point is to test can you see them ...

    Once you can see them, then you can add the variable:
    $check_manufacturers_image

    Somewhere on the two $lc_text lines to make them appear with each of the Products ...

    Try it and see if that works for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Mar 2009
    Posts
    45
    Plugin Contributions
    0

    Default Re: manufacturer image on manufacturer page

    Old thread, I know, but I'm looking to add the same feature.

    So, where do I put the code again? Specifically which file? I got the manufacturer image to work in the product info, but couldn't figure out the manufacturer product listing (aka. choosing one manufacturer and then clicking search).

 

 

Similar Threads

  1. Categories Image on Manufacturer page
    By elena1707 in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 4 May 2011, 10:53 PM
  2. 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
  3. Manufacturer image on product category page
    By bobdog in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 25 Jan 2010, 02:22 AM
  4. adding manufacturer image to product page
    By gsdcypher in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 May 2009, 03:21 PM
  5. Removing Manufacturer Image without losing manufacturer
    By Jamie Bower in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 Jan 2009, 10:42 PM

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