Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2014
    Location
    Italy
    Posts
    6
    Plugin Contributions
    0

    Default How can I add the image of an ordered product?

    Hello,
    on my Zen Cart, everytime I receive an order, the system shows me the ID of the ordered product but I would see the picture also. Is there a way to solve this?
    Thank you and sorry for my bad english :)

  2. #2
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: How can I add the image of an ordered product?

    This thread shows how to get the image. You would then need to add the code to the page that displays the order.

    https://www.zen-cart.com/showthread....in-orders-page

  3. #3
    Join Date
    Sep 2014
    Location
    Italy
    Posts
    6
    Plugin Contributions
    0

    Default Re: How can I add the image of an ordered product?

    Thank you for the answer.
    Where can I add this function ( zen_get_products_image($product_id, $width = SMALL_IMAGE_WIDTH, $height = SMALL_IMAGE_HEIGHT) ?
    I think had to add the code in the page /admin_root/orders.php. If it helps, this is the page:
    http://pastebin.com/em46deZr

  4. #4
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: How can I add the image of an ordered product?

    Quote Originally Posted by alex369 View Post
    Thank you for the answer.
    Where can I add this function ( zen_get_products_image($product_id, $width = SMALL_IMAGE_WIDTH, $height = SMALL_IMAGE_HEIGHT) ?
    I think had to add the code in the page /admin_root/orders.php. If it helps, this is the page:
    http://pastebin.com/em46deZr
    Where exactly do you want it? Do you want it on the EDIT page, so CUSTOMERS->ORDER->EDIT? Or did you want it on the invoice page?

    Yes, it is in the orders.php but I'd want to try it on my test site before I tell you exactly where cause it would also screw up the formatting.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How can I add the image of an ordered product?

    I would say somewhere between lines 588 and 599 would be where to show the picture associated with the product. At least this is the location I would suggest gather which picture should be displayed and then if to be shown elsewhere (bottom of the page or on a separate location), then so be it. But it is here where the product is individually stepped through and the attributes of the product are "collected". If the image is dependent onthe attributes then need to consider determination as a part of stepping through the attributes, otherwise would want to have the image information only as a part of the loop for the products in the cart...

    Beyond that, yeah would want to consider if it is something to be included in the packing list or the invoice depending on how you do business.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: How can I add the image of an ordered product?


  7. #7
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: How can I add the image of an ordered product?

    I added this to orders.php
    Code:
                if (isset($order->products[$i]['id']) ) {
              $products = $db->Execute("SELECT products_image
                                        FROM " . TABLE_PRODUCTS . "
                                        WHERE products_id ='" . $order->products[$i]['id'] . "'");
              echo '        <td class="dataTableContent" valign="middle">' . zen_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $products->fields['products_image'] , $order->products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            }

 

 

Similar Threads

  1. Replies: 1
    Last Post: 24 Oct 2013, 03:54 AM
  2. how to align the product title, price and add to cart box next to the product image?
    By evaky in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 5 Mar 2012, 03:31 AM
  3. How do I remove the border around the add to cart image on the product page?
    By AllegraGatto in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Nov 2008, 02:45 AM
  4. How can I add flash pic for product image?
    By heimskr75 in forum General Questions
    Replies: 0
    Last Post: 21 Aug 2008, 02:29 AM
  5. image of product ordered on the admin orders page
    By james739 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Jun 2008, 06:40 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