Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    100
    Plugin Contributions
    0

    Default Adding manuafactuers image to product listing

    I looked all over the forums and I couldnt find anything that was up to date..
    I want to add a little image that says "crafter" as well as the manufacturer's image to the product listing. Can someone point me to a place where I can find information on this?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding manuafactuers image to product listing

    The product listing content is built in /includes/modules/your_template/product_listing.php.

    Find this section
    PHP Code:
            case 'PRODUCT_LIST_MANUFACTURER':
            
    $lc_align '';
            
    $lc_text '<a href="' zen_href_link(FILENAME_DEFAULT'manufacturers_id=' $listing->fields['manufacturers_id']) . '">' $listing->fields['manufacturers_name'] . '</a>';
           break; 
    and you can add to the content of $lc_text.

    You can access the manufacturer's id here $listing->fields['manufacturers_id'],
    and use that to identify an image file to be called just before or after the <a href.../a> You would name the image files with a suffix of the mfr's id (mfr_img_27.jpg).

    Get started and I can give you more pointers if you need them.

  3. #3
    Join Date
    Aug 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: Adding manuafactuers image to product listing

    ok, i already figured out how to add the image but how do i get it to link to the manufacturers site?? this is what im working with:

    http://heyprettycupcake.com/index.ph...&products_id=2

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding manuafactuers image to product listing

    Oh, so you wanted it on the product info page, not the product listing page!

    The product entry/editing page in admin has an option to list a "Products URL:" which you could use to find the code that does this. You may well be able to copy a chunk of code to your image output area.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding manuafactuers image to product listing

    This section of tpl_product_info_display.php outputs the mfr's link:
    PHP Code:
    <!--bof Product URL -->
    <?php
      
    if (zen_not_null($products_url)) {
        if (
    $flag_show_product_info_url == 1) {
    ?>
        <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATIONzen_href_link(FILENAME_REDIRECT'action=url&goto=' urlencode($products_url), 'NONSSL'truefalse)); ?></p>
    <?php
        
    // $flag_show_product_info_url
      
    }
    ?>
    <!--eof Product URL -->
    You could redefine TEXT_MORE_INFORMATION (if it's not used elsewhere) to read "Crafter"; or you may be able to replace "TEXT_MORE_INFORMATION" in the code with your call to the image so the image becomes the link (I haven't tried this and don't know if it will work properly.)

  6. #6
    Join Date
    Aug 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: Adding manuafactuers image to product listing

    im lost.. so that code will make it a link??

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding manuafactuers image to product listing

    That code displays text saying something like "visit this product's web page" which is a link to a URL which you enter in the product editing page.

    You can find the language file where TEXT_MORE_INFORMATION is defined and change it to "Crafter", or maybe to a chunk of code which will be interpreted when run to equal a product-specific image plus link.
    Or you could insert said chunk of code somewhere in the
    <?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(...
    statement.

    I expect I could figure out the right formulation for that, but it would take a bit of research...
    and some trial & error (hopefully not too much error ;)

 

 

Similar Threads

  1. Adding a link to product page into the admin's product listing.
    By thebigkick in forum Customization from the Admin
    Replies: 1
    Last Post: 16 May 2012, 07:02 PM
  2. Adding a "New" image to the product listing (similar to "Sold Out" image)
    By javaman in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 18 Feb 2010, 11:44 PM
  3. Adding _LRG image to the bottom of each product listing
    By stiggy100 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Jun 2009, 10:34 PM
  4. Adding Additional Attributes to Product Listing from Custom Product Type
    By Bigman in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 12 Aug 2008, 04:29 PM
  5. Adding columns in addition to product image and name in the product listing page
    By thunderbird2004 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Mar 2008, 10:41 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