Zen Cart Logo
Forums / Managing Customers and Orders / Product link on oder confirmation email

Product link on oder confirmation email

Views: 946

Results 1 to 3 of 3
7 Sep 2012, 9:35 AM
#1
mico86 avatar

mico86

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Product link on oder confirmation email

Hi all :smile:
I need to receive the order confirmation email, only for the admin, containing the link to the product. can this change? If yes, can you give me a starting point from which to start? I thought I'd change the order of admin class ...
Thanks

7 Sep 2012, 4:33 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Product link on oder confirmation email

That's gonna be complicated, since the admin email is just a copy of the customer's email, with some extra stuff slapped onto the end.

It's all handled by the orders.php class.

9 Sep 2012, 2:51 PM
#3
mico86 avatar

mico86

New Zenner

Join Date:
Feb 2012
Posts:
3
Plugin Contributions:
0

Re: Product link on oder confirmation email

For now I found a different solution that's OK for my needs. In order page, the admin side, each has a picture, the name is clickable and will redirect to the product page.
This is the procedure:

/admin/order.php

@about line 490 immediately after the FOR cicle: for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

write:

    $url = $order->products[$i]['id'];
    $name = $order->products[$i]['name'];

@about line 500 replace this:

      echo '          <tr class="dataTableRow">' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
           '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

with this:

echo '          <tr class="dataTableRow">' . "\n" .
           '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
           '            <td class="dataTableContent" valign="top">' . "<a href=http://www.nameofyourstore.com/index.php?main_page=product_info&products_id=$url>$name</a>"  . '<br>' .
           zen_image(DIR_WS_CATALOG . DIR_WS_IMAGES . zen_get_products_image($order->products[$i]['id']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);

This is the result:

[IMG]http://img31.imageshack.us/img31/7742/producturlandphoto.jpg[/IMG]

The photos can be seen properly with imagehandler.
The links to the products work only if the product is active.

When I have some time, I'll find (I hope) the solution also to insert the link in the admin confirmation email. :smile:
I hope to be helpful and sorry for my english (sponsored by google translate hahahaahahhahaha)