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 :)
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 :)
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
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.
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...
Oh, and then there is this :)
https://www.zen-cart.com/downloads.php?do=file&id=1529
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>'; }
Bookmarks