Zen Cart Logo
Forums / Managing Customers and Orders / Showing Unit Price in Order Confirmation Email

Showing Unit Price in Order Confirmation Email

Views: 1,867

Results 1 to 5 of 5
19 Mar 2013, 2:28 PM
#1
framegirl avatar

framegirl

New Zenner

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

Showing Unit Price in Order Confirmation Email

What I would like to do is show the unit price (in addition to the total price) in the order confirmation email.

Because we have multiple websites and a retail location, we use a system other than Zen Cart to send orders to our warehouse and each order must be entered into this system. Having the unit price on the email would save us a bit of time by not having to pull out our calculator for each order.

I know that this would be added in the PRODUCTS_DETAIL area of the email and I found this in order.php on line 978. The price also shows in the products array of order.php.

What I don't know is how all these parts work together. Therefore, I don't know how or where to tell Zen Cart that I want to see the unit price in the email. So I have come to the experts. Does anyone have any ideas as to how to accomplish this?

Thanks,
framegirl

w w w . f r a m i n g s u p p l i e s - s h o p . c o m

Zen Cart 1.5.0
Linux server
PHP 5.3.22
MySQL 5.1.68-cll

AddOns
FedEx
USPS
Backup-MySQL
Image Handler 4
Avonlee Contempo Template
Dynamic Filter
Easy Populate 4
Add Customers from Admin

28 Jan 2014, 2:27 AM
#2
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: Showing Unit Price in Order Confirmation Email

Lets whack two birds with one stick.... I also want to show the unit price (in addition to the total price) in my HTML order confirmation email.
Thought this would be simple but it's kicking my but too! :ohmy:
Any pointers would be appreciated.

28 Jan 2014, 2:57 AM
#3
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: Showing Unit Price in Order Confirmation Email

ZC V1.5.1
First I inserted this code into orders.php around line 918 which gives me the individual price but it has 4 decimal places which I can't figure out how to truncate to 2 places.
'<td class="product-details" align="right" valign="top" width="60">' . $this->products[$i] ['price'] . '</td>' . "\n" .

Then I tried the code at this thread (by DrByte) which should do it for the TEXT emails but I couldn't get it to work for HTML emails.
"order confirmation email - how do I show per-item price for qty > 0 ?"

28 Jan 2014, 3:10 AM
#4
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Showing Unit Price in Order Confirmation Email

linuxguy2:

ZC V1.5.1
First I inserted this code into orders.php around line 918 which gives me the individual price but it has 4 decimal places which I can't figure out how to truncate to 2 places.
'<td class="product-details" align="right" valign="top" width="60">' . $this->products[$i] ['price'] . '</td>' . "\n" .

Then I tried the code at this thread (by DrByte) which should do it for the TEXT emails but I couldn't get it to work for HTML emails.
"order confirmation email - how do I show per-item price for qty > 0 ?"Instead of

$this->products[$i] ['price']

Try

$currencies->format($this->products[$i] ['price'])
28 Jan 2014, 5:08 PM
#5
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: Showing Unit Price in Order Confirmation Email

:D

Purr---fect, Thanks,