Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2007
    Posts
    813
    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
    58,279
    Blog Entries
    3
    Plugin Contributions
    106

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    813
    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
    813
    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
    58,279
    Blog Entries
    3
    Plugin Contributions
    106

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    813
    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
    58,279
    Blog Entries
    3
    Plugin Contributions
    106

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    813
    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
    813
    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
    813
    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. Editing email order confirmation
    By chronister in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 Nov 2007, 03:43 AM
  2. Email order confirmation total problem
    By gapi78 in forum General Questions
    Replies: 6
    Last Post: 22 Nov 2007, 09:05 AM
  3. Can I change product details in order confirmation email?
    By ducksigns in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Oct 2007, 11:29 PM
  4. Replies: 11
    Last Post: 22 Nov 2006, 08:27 PM

Bookmarks

Posting Permissions

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