Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Admin order-status update default to no mail?

    I've looked and I don't see any way to have the orders default to 'no mail' when there is a status update. Typically, the only time I update an order is to note that it has been shipped, and the customer already gets an email from the shipping service. I'd rather have it default to no mail and have to change it if necessary for a specific situation, than to have to remember every time to click on no mail. I've looked in the email options in Configuration, and in both the Customer and Order sections.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,403
    Plugin Contributions
    87

    Default Re: Order default to no mail?

    You'll need to edit /YOUR_ADMIN/orders.php to make that change (this really should be a store-configuration item, IMO). Find the following section towards the bottom of the file:
    Code:
                  <tr>
                    <td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> [<?php echo zen_draw_radio_field('notify', '1', true) . '-' . TEXT_EMAIL . ' ' . zen_draw_radio_field('notify', '0', FALSE) . '-' . TEXT_NOEMAIL . ' ' . zen_draw_radio_field('notify', '-1', FALSE) . '-' . TEXT_HIDE; ?>]&nbsp;&nbsp;&nbsp;</td>
                    <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo zen_draw_checkbox_field('notify_comments', '', true); ?></td>
                  </tr>
    To change the default to "No Mail", you'll make the following highlighted edits:
    Code:
    <?php
    //-bof-Change default setting to "no email"
    ?>
                  <tr>
                    <td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> [<?php echo zen_draw_radio_field('notify', '1', false) . '-' . TEXT_EMAIL . ' ' . zen_draw_radio_field('notify', '0', true) . '-' . TEXT_NOEMAIL . ' ' . zen_draw_radio_field('notify', '-1', FALSE) . '-' . TEXT_HIDE; ?>]&nbsp;&nbsp;&nbsp;</td>
                    <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo zen_draw_checkbox_field('notify_comments', '', true); ?></td>
                  </tr>
    <?php
    //-eof-Change default setting to "no email"
    ?>
    It's "good practice" to add some sort of comments surrounding your changes to core- (and template-override-) files so that it's easier to merge those changes on the next Zen Cart update.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Order default to no mail?

    Quote Originally Posted by HeleneWallis View Post
    I've looked and I don't see any way to have the orders default to 'no mail' when there is a status update. Typically, the only time I update an order is to note that it has been shipped, and the customer already gets an email from the shipping service. I'd rather have it default to no mail and have to change it if necessary for a specific situation, than to have to remember every time to click on no mail. I've looked in the email options in Configuration, and in both the Customer and Order sections.
    This requires a code change in the admin/orders.php file. While the line numbers have likely changed, I know it to be in this forum because I have previously provided the direction to someone on how it's done. *smirk* Will see what can be found...

    Edit: Well, there you have it. No need to look.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Order default to no mail?

    Quote Originally Posted by lat9 View Post
    You'll need to edit /YOUR_ADMIN/orders.php to make that change (this really should be a store-configuration item, IMO). Find the following section towards the bottom of the file:
    ...

    It's "good practice" to add some sort of comments surrounding your changes to core- (and template-override-) files so that it's easier to merge those changes on the next Zen Cart update.
    Thanks much, I think it should be a store configuration item too (hint, hint!). I'll tweak the code, and I always comment heavily. Spent years as a maintenance programmer fixing software with zero comments. Learned the hard way, lol. I also have a file with a well-commented explanation of every change I've made to my ZenCart and why.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,403
    Plugin Contributions
    87

    Default Re: Order default to no mail?

    Quote Originally Posted by HeleneWallis View Post
    ...Spent years as a maintenance programmer fixing software with zero comments. Learned the hard way, lol. I also have a file with a well-commented explanation of every change I've made to my ZenCart and why.
    Yep, me too! Reminds me of a time when I was going to use another person's code as a "base" but found that the code (10K+ SLOC) contained not one comment. His response: "The comments only say what the code's supposed to do, so there's no point in including them.".

    I just wrote what I needed from scratch ...

  6. #6
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Order default to no mail?

    LOL. Been there done that. To be fair, some of the older languages didn't make it easy to comment anything. But there's no excuse for not doing it now.

  7. #7
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Order default to no mail?

    And thank you. Just made the change, works as it should.

 

 

Similar Threads

  1. Replies: 10
    Last Post: 16 Dec 2014, 05:09 PM
  2. v151 New Order Email Admin Update order status missing?
    By wrickspam in forum Managing Customers and Orders
    Replies: 1
    Last Post: 7 May 2014, 09:46 PM
  3. Change Email Subject of Status Update Messages e.g. Order Update XXXX
    By apemusic in forum Managing Customers and Orders
    Replies: 4
    Last Post: 13 Oct 2010, 08:42 AM
  4. Status update e-mail error
    By dandownunder in forum General Questions
    Replies: 2
    Last Post: 9 Aug 2006, 06:03 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