Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Changing email text depending on Order Status -- esp tied to Reward Points addon

    Hi all, Can anyone point me in the right direction to do the following :

    I have a the rewards point full suite installed and customers reward points change their status from Pending to Earned when the Order Status changes from Pending to Processing.

    When the Order Status changes, the system sends an email out automatically to tell the customer that their order status has changed to Pending. I would like to tag a message on to that to tell them that their Reward Points have also changed to "Earned" and can be spent - but I only want it to be sent with the Order Status changed to "Processing" email.

    Any ideas please?

  2. #2
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Re: Changing email text depending on Order Status -- esp tied to Reward Points addon

    I'm guessing that the following pseudo-code inserted into the module that creates the email when the order status changes is what is required :

    if (order_status_variable == PROCESSING) {

    insert text "You can now spend your pending reward points"
    }

    My question is, where is the module that creates the email and what is the variable name that indicates the order status (I am assuming it holds an integer value).

    Any ideas please please please?

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

    Default Re: Changing email text depending on Order Status -- esp tied to Reward Points addon

    /admin/orders.php

    You can find the correct number for the "Processing" order status by looking in the list of order statuses in Admin->Localization->Order Status.
    .

    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.

  4. #4
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Re: Changing email text depending on Order Status -- esp tied to Reward Points addon

    Quote Originally Posted by DrByte View Post
    /admin/orders.php

    You can find the correct number for the "Processing" order status by looking in the list of order statuses in Admin->Localization->Order Status.
    Thanks for that DrByte - Much appreciated - I have changed the code in Orders.php as follows but i'm sure there must be a more elegant way of doing it. It works though :) - The only thing that worries me is the use of the HTML <BR> ??

    The code I have modified is in bold. Round about line 122ish

    $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
    $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];

    if ($orders_status_array[$status] == 'Processing') {
    $pointstext = '<br>Any Reward Points that were Pending have now changed to Earned can can be redeemed against your next order. <br><br>';
    } else {
    $pointstext = '';
    }

    $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = $pointstext . str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);

    $customer_notified = '0';

  5. #5
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Re: Changing email text depending on Order Status -- esp tied to Reward Points addon

    Erm... the phrase "can can be redeemed against your next order" should be replaced with "AND can be redeemed against your next order"...

    I certainly wasn't suggesting anyone should burst into an impromptu dance routine....

 

 

Similar Threads

  1. Reward Points + Edit Orders + Admin New Order
    By gigi3 in forum All Other Contributions/Addons
    Replies: 12
    Last Post: 16 Mar 2020, 08:35 PM
  2. v139h Reward Points module display order totals including reward points
    By irsarahbean in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Jun 2013, 01:19 AM
  3. Reward Points addon: Please tell me what I did, didn't do or need to do?
    By masb in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 1 Jul 2010, 03:43 AM
  4. Send different email depending on order status
    By eden in forum General Questions
    Replies: 2
    Last Post: 21 Sep 2008, 04:08 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