Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2011
    Posts
    4
    Plugin Contributions
    0

    Default Remove/Hide Discount Coupon Code from Order Confirmation Emails

    Hello,

    We process a number of orders by phone on behalf of customers and often offer them bulk discounts. The % of the discounts vary.

    After taking their CC info, We enter their info thorough our website just as a regular customer would do.

    We have set-up discounts by using Coupon Codes starting with free S&H and and then adding a free S&H + 1% discount code, free S&H + 2% discount, etc. (We are using the Discount_Coupons_Combo 1.39 version as posted by Ajeh)

    However, we want the codes to remain purely internal. We do not plan to offer coupons to our customers for their own use, so hiding the codes from the invoice is not an issue.

    If additional information is need, please ask.

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Remove/Hide Discount Coupon Code from Order Confirmation Emails

    your going to want to edit admin/invoice.php. The bit that you are interested in is :

    Code:
    <?php
      for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
        echo '          <tr>' . "\n" .
             '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" .
             '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
             '          </tr>' . "\n";
      }
    ?>
    It loops through all the order totals and prints them out. If you want to exclude one of them then something like:

    Code:
    <?php
      for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
      if($order->totals[$i]['title'] != 'Title to Exclude')
      {
        echo '          <tr>' . "\n" .
             '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" .
             '            <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
             '          </tr>' . "\n";
      }
      }
    ?>
    You'll have to change where it says 'Title to Exclude' to the title of the order total you need to exclude.

    I would say though that it is better to just change the titles to something customer friendly so that they know they are getting discounts.

    And having written this post I realise that that will make the totals not add up. You may just want to change the title itself rather than exlude the whole row? In which case you'd use the same technique but put it around the title rather than the whole thing.

  3. #3
    Join Date
    May 2011
    Location
    Sunny Rossendale (not)
    Posts
    556
    Plugin Contributions
    2

    Default Re: Remove/Hide Discount Coupon Code from Order Confirmation Emails

    I have a similar question I'd like to hide the actual code from both emails and invoices as I have a discount code set up for phone orders and I don't want this code in public view all you would see in the invoice and email is something like this:

    Widget £15.99
    Discount No code showing £2.00
    Total £13.99
    can this be done
    What ever your doing remember to KISS ( Keep It Simple Stupid )

 

 

Similar Threads

  1. v150 Broke Html order confirmation emails - only showing code
    By gfdesigns in forum General Questions
    Replies: 20
    Last Post: 25 Nov 2014, 09:16 PM
  2. Discount code / coupon for a customers first order
    By ray-the-otter in forum General Questions
    Replies: 4
    Last Post: 24 May 2013, 03:55 PM
  3. How to Hide Discount Code from order confirmation emails ?
    By Rony in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 9
    Last Post: 20 Sep 2010, 10:25 PM
  4. Pass variable from link to Discount Coupon Code
    By MrForce in forum General Questions
    Replies: 0
    Last Post: 17 Apr 2008, 06:07 AM
  5. Order confirmation emails - remove copyright
    By isac123 in forum General Questions
    Replies: 4
    Last Post: 16 Dec 2007, 07:12 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