Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    help question How to remove unwanted detail in Order Confirmation email?

    Hello everyone,

    On placing an order, the customer gets a confirmation email as per the example below (I have masked some fields because this is from a real order):

    If you look at the products area, you will see the product title (underlined in red) and what I want to remove underlined in blue. This unwanted detail is actually the "Products Model" which I use as a SKU field.

    I know (or so I think) that contents of the order confirmation email are defined in the includes/classes/order.php file but my knowledge of php is from non-existent to minimal and some help from an experienced fellow will be really appreciated.

    Thanks in advance for any assistance and wishes for a nice weekend to all.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How to remove unwanted detail in Order Confirmation email?

    Right file.
    in v1.5.0 starting a line 906 you'll see this section:
    Code:
          // build output for email notification
          $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) : '') .
          $this->products_ordered_attributes . "\n";
          $this->products_ordered_html .=
          '<tr>' . "\n" .
          '<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
          '<td class="product-details" valign="top">' . nl2br($this->products[$i]['name']) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" .
    The parts highlighted would need to be removed if you are using the Model Number field for something other than its intended purpose and wish it not to be displayed on order-confirmation emails.
    .

    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
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: How to remove unwanted detail in Order Confirmation email?

    A million thanks DrByte, it worked perfectly!

    Can I trouble you with another two questions please?

    1) How can I remove the extra line feed underneath the product price?
    2) How can I remove the (Shipping to >> Greece) from the Shipping method block below the Delivery address?

    Following your previous instructions, I fiddled with various lines of the includes/classes/order.php file trying to find the solution myself, but with no success but I suspect that it will again be something easy. The new order confirmation displays below:


    Thank you in advance again and have a nice evening.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How to remove unwanted detail in Order Confirmation email?

    I suspect your blank line can be removed from the raw HTML of the email template file in your /email/ folder.

    And the shipping name comes from your shipping module.
    .

    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.

  5. #5
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: How to remove unwanted detail in Order Confirmation email?

    Yes, the blank line was caused by some padding in the html email and this is now fixed.

    As for the shipping name, it does come from the shipping module but I was trying to get rid of the second part only (the one in parentheses). Anyway, I shortened both parts of that line in the module and the whole text does not overflow to a second line now, improving the overall appearance.

    Once more, I thank you for your assistance and wish you a nice evening.

 

 

Similar Threads

  1. v139f Remove IP addresses from Order Confirmation Email
    By vdivito in forum Managing Customers and Orders
    Replies: 2
    Last Post: 11 Jul 2016, 02:44 PM
  2. Can I remove the line-breaks in order confirmation email?
    By idc1 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Dec 2011, 03:19 AM
  3. How Do I Remove Extra Lines from Order Confirmation Email?
    By powrwrap in forum General Questions
    Replies: 7
    Last Post: 22 May 2011, 11:09 PM
  4. How do I Edit Order of Order Totals in Order Confirmation Email?
    By toussi in forum Managing Customers and Orders
    Replies: 1
    Last Post: 20 Mar 2009, 08:05 AM
  5. Order Confirmation Email- Remove CC
    By GroovyFish in forum General Questions
    Replies: 4
    Last Post: 30 Jan 2009, 04:50 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR