Forums / Managing Customers and Orders / Product links and image in Customer->Order

Product links and image in Customer->Order

Started by ironman on 12 Dec 2011, 5:46 AM · Views: 1,496

Results 1 to 7 of 7
12 Dec 2011, 5:46 AM
#1
ironman avatar

ironman

New Zenner

Join Date:
Nov 2011
Posts:
12
Plugin Contributions:
0

Product links and image in Customer->Order

I would like to add links and small image for the products in the order details at Customer->Order in the admin. This will help us when processing orders.
I tried to use the zen_get_info_page but fail. Do I need to add some function under admin/function/ Can anyone give me a help on this?

16 Jan 2012, 3:21 PM
#2
ironman avatar

ironman

New Zenner

Join Date:
Nov 2011
Posts:
12
Plugin Contributions:
0

Re: Product links and image in Customer->Order

I want to do this too. Can anyone help on this?

16 Jan 2012, 3:41 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product links and image in Customer->Order

If you mean on the Admin Customer ... Order ... so that when you look at the orders.php page you want to see the image and have a link to edit the Product ...

You can edit the file:
/your_secret_admin/orders.php

and add the code in RED:

      echo '          <tr class="dataTableRow">' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_product_path($order->products[$i]['id']) . '&pID=' . $order->products[$i]['id'] . '&product_type=' . zen_get_products_type($order->products[$i]['id'])) . '">' . zen_image(DIR_WS_CATALOG_IMAGES . zen_get_products_image($order->products[$i]['id']), $order->products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . '</a>' . ' </td>' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
           '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

Just above that section of code, you will see:

            <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>

Change the colspan from 2 to 3 ...

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!

16 Jan 2012, 4:11 PM
#4
ironman avatar

ironman

New Zenner

Join Date:
Nov 2011
Posts:
12
Plugin Contributions:
0

Re: Product links and image in Customer->Order

thank you so much for you prompt reply Ajeh! Your help is great! Can I have the image link to the storefront product page instead of editing the product? It's will be good if the product name also link to the store product page. This can help the people processing the order view clearly what the customer order.

16 Jan 2012, 5:07 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product links and image in Customer->Order

This has code where the first image will open a new window to the Catalog for the Product ... and the second has the the link to edit the Product in the catalog ...

      echo '          <tr class="dataTableRow">' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . '<a href="' . zen_catalog_href_link(zen_get_handler_from_type(zen_products_lookup($order->products[$i]['id'], 'products_type')) . '_info', 'cPath=' . zen_get_product_path($order->products[$i]['id']) . '&products_id=' . $order->products[$i]['id']) . '" target= "_blank">' . zen_image(DIR_WS_CATALOG_IMAGES . zen_get_products_image($order->products[$i]['id']), $order->products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . '</a>' . ' </td>' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_product_path($order->products[$i]['id']) . '&pID=' . $order->products[$i]['id'] . '&product_type=' . zen_get_products_type($order->products[$i]['id'])) . '">' . zen_image(DIR_WS_CATALOG_IMAGES . zen_get_products_image($order->products[$i]['id']), $order->products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . '</a>' . ' </td>' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
           '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

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!

19 Jan 2012, 10:10 AM
#6
ironman avatar

ironman

New Zenner

Join Date:
Nov 2011
Posts:
12
Plugin Contributions:
0

Re: Product links and image in Customer->Order

thank you for your great help. I can show the order image and hyperlink in the admin order successfully!

19 Jan 2012, 1:50 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product links and image in Customer->Order

Thanks for the update that this is now working for you ... :smile:

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!