Forums / Templates, Stylesheets, Page Layout / order confirmation email - how do I show per-item price for qty > 0 ?

order confirmation email - how do I show per-item price for qty > 0 ?

Locked

Started by gsdcypher on 28 Dec 2007, 2:20 AM · Views: 2,255

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
28 Dec 2007, 2:20 AM
#1
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

order confirmation email - how do I show per-item price for qty > 0 ?

Hi All,

Currently on the order confirmation email, the 1 x product is listed and then the price is given. If someone orders more than one of the same item, the number x and the item name and then the combined price is given.

Current:
Products

2 x Cups = $9.50
size 30oz

How do I change it so the order confirmation will list the number of products ordered, the product name, @ THE PRICE PER ITEM, and then the combined price?

Change to:
Products

2 x Coop Cups @ $4.47each = $9.50
size 500162 30oz

Thanks!

28 Dec 2007, 3:02 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: order confirmation email - how do I show per-item price for qty > 0 ?

The pricing for text-only emails is built in the order.php class file, via these lines:```
$this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
$currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Dec 2007, 5:29 AM
#3
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: order confirmation email - how do I show per-item price for qty > 0 ?

I ran a search and found the orders.php in the includes/classes directory. I found that text starting at line 844...

But how do I change it to show "@ $x.xx ea." ???

Thanks.

29 Dec 2007, 2:11 AM
#4
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: order confirmation email - how do I show per-item price for qty > 0 ?

I tried a couple of things and just broke the cart....:frusty:

Does anyone know what code to add?

Something like" $this->products[$i] '@' ['price'] ???

Thanks

29 Dec 2007, 5:19 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: order confirmation email - how do I show per-item price for qty > 0 ?

I haven't tested this, but I suspect changing this:$this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .to this:```
$this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') [B]. ' @ ' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], 1) . [/B]' = ' .

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2007, 7:04 PM
#6
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: order confirmation email - how do I show per-item price for qty > 0 ?

Hi,

That is very close... :-)

It now shows this
2 x Cap @ $10.00 =

But it does not show the combined amount of $20.00

Thanks.

29 Dec 2007, 7:12 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: order confirmation email - how do I show per-item price for qty > 0 ?

Did you replace all 3 lines with just the one, by mistake?
I originally mentioned 3 lines of code. But only suggested changes to the first line. You still need the other 2 lines as-is.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2007, 7:16 PM
#8
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: order confirmation email - how do I show per-item price for qty > 0 ?

Hi,

It works. :clap:

Here is the code:

$this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' @ ' . 
 $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], 1) . ' = ' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .

Here is the display:
3 x Cover @ $59.95 = $179.85

If I wanted to add "ea." after the $59.95, would it be:

$this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' @ ' . 
 $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], 1) . 'ea.' ' = ' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .

Thanks!!!

29 Dec 2007, 8:40 PM
#9
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: order confirmation email - how do I show per-item price for qty > 0 ?

Yes I replaced too many lines the first time. :oops:

I tried to add the ea. after the price but I broke the cart with this code"

 
   $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], 1) . 'ea.' . . ' = ' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .

How do I need to change it to add ea.?

Thanks.

29 Dec 2007, 9:20 PM
#10
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: order confirmation email - how do I show per-item price for qty > 0 ?

Got it, too many .'s before :-)