Zen Cart Logo
Forums / Basic Configuration / Putting a link to product in order e-mail

Putting a link to product in order e-mail

Views: 724

Results 1 to 4 of 4
20 Jan 2013, 9:39 PM
#1
anysigns avatar

anysigns

New Zenner

Join Date:
Sep 2012
Posts:
31
Plugin Contributions:
0

Putting a link to product in order e-mail

I have a lot of products in my store, some of them have similar or even identical names. I would like to be able to have a link to the product in the shop embedded with the order e-mail, but I am not sure how to do.

Thank you.

21 Jan 2013, 3:01 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Putting a link to product in order e-mail

You could use this for the link:

zen_href_link(zen_get_info_page((int)$this->products[$i]['id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$this->products[$i]['id'])) . '&products_id=' . (int)$this->products[$i]['id'])

NOTE: be sure to add it to both the TEXT and HTML for the order class ...

15 Feb 2013, 5:48 PM
#3
netofy avatar

netofy

New Zenner

Join Date:
Feb 2013
Posts:
1
Plugin Contributions:
0

Re: Putting a link to product in order e-mail

Ajeh:

You could use this for the link:

zen_href_link(zen_get_info_page((int)$this->products[$i]['id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$this->products[$i]['id'])) . '&products_id=' . (int)$this->products[$i]['id'])

> 
> NOTE: be sure to add it to both the TEXT and HTML for the order class ...

Life saver, thanks. Just for anyone else's info here's what I've done. ver1.5

1.open order.php look for ```php
// build output for email notification
``` ( line 906) add ```php
////SHOW PRODUCT LINK
$produrllink[$i] = zen_href_link(zen_get_info_page((int)$this->products[$i]['id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$this->products[$i]['id'])) . '&products_id=' . (int)$this->products[$i]['id']);
``` directly after it.

2. Next Find: ```php
$this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
``` (it should be the very next line)

Replace with

```php
$this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ' '. $produrllink[$i]. ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .

I only use plain txt email but it works fine for me. Thanks

16 Feb 2013, 2:22 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Putting a link to product in order e-mail

Thanks for the update that this worked for you to get you on track ... :smile: