Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default 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!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default 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:
    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'], $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.

  3. #3
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default 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....

    Does anyone know what code to add?

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

    Thanks

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

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

    I haven't tested this, but I suspect changing this:
    Code:
         $this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
    to this:
    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) . ' = ' .
    may be enough
    .

    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.

  6. #6
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default 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.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default 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.

  8. #8
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

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

    Hi,

    It works.

    Here is the code:
    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:

    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) . 'ea.' ' = ' . $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
    Thanks!!!

  9. #9
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

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

    Yes I replaced too many lines the first time.

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

    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.

  10. #10
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

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

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

 

 

Similar Threads

  1. Price per item plus per order - how?
    By one tall man in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Feb 2012, 03:09 PM
  2. Show Per Item Price
    By swilliams88 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Aug 2011, 07:33 PM
  3. Replies: 0
    Last Post: 20 Mar 2011, 11:56 PM
  4. Need help trying to switch order for display (qty, item name, price)...
    By BenhamCollectibles in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Dec 2009, 05:59 PM
  5. Item numbers in Order COnfirmation Email
    By zenrajan in forum General Questions
    Replies: 2
    Last Post: 8 Mar 2007, 09:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg