Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default product image on confirmation page

    Hello,
    Does anyone know how to put the product image on the confirmation page? I tried this:

    <td><div id="cartImage" class="back"><?php echo $order->products[$i]['productsImage']; ?></div></td>

    but to no avail, I don't know what is the name of the element to show the image. Can someone help? Thanks.

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

    Default Re: product image on confirmation page

    The products_image is not something that is, by default, available from the order ... you can, however, use one of the functions to obtain the image for the products based on the products_id from the order ...

    In the function file functions_lookups.php is the function:
    PHP Code:
    /*
     * look up a products image and send back the image's HTML \<IMG...\> tag
     */
      
    function zen_get_products_image($product_id$width SMALL_IMAGE_WIDTH$height SMALL_IMAGE_HEIGHT) { 
    See if that doesn't help get you pointed in the right direction ...
    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!

  3. #3
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: product image on confirmation page

    Thank You Linda,
    This is what I did from your code:
    <td><?php echo zen_get_products_image($order->products[$i]['id'], $width = 39, $height = 40) ?></td>

    and it works great! I don't even know what the element name is but I just guessed ['id'] and it worked. This just goes to show the good coding of zen cart where I can just guess the label to get it to work. I wish I knew more of the structure and names, but I eventually will .

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

    Default Re: product image on confirmation page

    Thanks for the update and posting what worked 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!

  5. #5
    Join Date
    Sep 2007
    Posts
    73
    Plugin Contributions
    2

    Default Re: product image on confirmation page

    Linda Maybe you can help me. I used the following code to add the product image to my invoice, but it is NOT resizing the image.

    Maybe you can shed some light on my errors.

    PHP Code:
    echo '        <td class="dataTableContent" align="center" valign="top">' .zen_image(DIR_WS_CATALOG_IMAGES zen_get_products_image$order->products[$i]['id'], $width SMALL_IMAGE_WIDTH$height SMALL_IMAGE_HEIGHT)) . '</td>' "\n"

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

    Default Re: product image on confirmation page

    Your syntax is off on the call for the image:

    Code:
    echo '        <td class="dataTableContent" align="center" valign="top">' .zen_image(DIR_WS_CATALOG_IMAGES . zen_get_products_image( $order->products[$i]['id'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)) . '</td>' . "\n";
    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!

  7. #7
    Join Date
    Sep 2007
    Posts
    73
    Plugin Contributions
    2

    Default Re: product image on confirmation page

    I made the small change but the image still does not resize.

    I was trying your calling from this thread, http://www.zen-cart.com/forum/showth...ht=products_id.

    I would like it to be linked to the small image (currently 100 x 80).

    Small enough to be on an invoice, big enough to be seen.

    Basically I want to call the order product id and show the image associated with the order.

    Thanks,

    Dale

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

    Default Re: product image on confirmation page

    It works fine for me ... what do you have now in your code on the invoice.php using the code that I gave 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!

  9. #9
    Join Date
    Sep 2007
    Posts
    73
    Plugin Contributions
    2

    Default Re: product image on confirmation page

    This is what I have:
    PHP Code:
    // bof image added by inkuyo -->
          
    echo '        <td class="dataTableContent" align="center" valign="top">' .zen_image(DIR_WS_CATALOG_IMAGES zen_get_products_image$order->products[$i]['id'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT)) . '</td>' "\n";
    // eof image added by inkuyo <-- 
    Is there w away to call the image w/o having it nested? I think that is sloppy.

    I made the mod for the admin catalog images but I used this code for that:
    PHP Code:
    echo '<br>'zen_image(DIR_WS_CATALOG_IMAGES $categories->fields['categories_image'] , SMALL_IMAGE_HEIGHTSMALL_IMAGE_WIDTH
    The 2nd code did not seem to work though for the invoice. Not totally sure what variables use.

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

    Default Re: product image on confirmation page

    The code I posted will show the Product Image on the invoice.php

    The part that gives the image is:
    Code:
    zen_image(DIR_WS_CATALOG_IMAGES . zen_get_products_image( $order->products[$i]['id'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT))
    Where ever you are, if you can identify the valid products_id value whether that is:
    $order->products[$i]['id']
    $products_id
    $_GET['products_id']
    etc. etc.

    That is giving you the value in the specific file where you want to call the image ...

    This is a category image:
    $categories->fields['categories_image']

    I thought you are trying to get the products_image from the products table ...
    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!

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Remove product image from product page NOT category image
    By rgoetz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 3 Aug 2011, 11:25 AM
  2. Product description on checkout confirmation page
    By neit in forum Managing Customers and Orders
    Replies: 3
    Last Post: 23 Mar 2010, 01:05 PM
  3. Different product's category image vs. product's page image ... ??
    By mancer in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 7 Jul 2008, 03:29 PM
  4. Replies: 0
    Last Post: 24 Aug 2007, 02:05 PM
  5. how to show product links on confirmation page?
    By making_web2002 in forum General Questions
    Replies: 15
    Last Post: 3 Oct 2006, 11:07 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