[Plugin: Custom Content Type Manager] Email Notification Upon Change (5 posts)

  1. WebmistressM
    Posted 4 years ago #

    Custom Content Type Manager has been a great help for my store's showcasing needs. With it, I have created detailed product information (without need of a shopping cart) and even an order queue for people to track their custom on-demand commission online.

    However, Im still curious if I could input an email address custom field in the Order Queue content type, so that when another field (called "Status") is updated, an email notification will be sent (via wp mail) to the customer. This would work for us best because our DIY items go through 3-5 phases in its creation process. As of now, someone has to go to our site and stalk the order queue page themselves to know if their item has moved to the next phase. A notification email upon change of a particular Custom Content Type Manager Custom Field would be better:

    While I have seen this done with PodsCMS, I wondered if code similar to this could be used:

    $ready_to_ship = $columns['ready_to_ship']['value'];
    $to = $columns['email_address']['value'];
    $customer_name = $columns['name']['value'];
    if ( $ready_to_ship ) {
    $subject = 'Your order is ready to ship!';
    $message = 'Dear ' . $customer_name . ': Your order is ready to ship. ';
    wp_mail( $to, $subject, $message);
  2. fireproofsocks
    Posted 4 years ago #

    Thanks for kind words. Sounds like what you're doing is the type of thing that would typically involve a custom coding solution.

    Where is the change occurring that you would like to use to trigger the email? Inside the manager? Or on the front-end? WP is totally event driven, so I would think there are events firing to which you could hook some custom code like that.

  3. WebmistressM
    Posted 4 years ago #

    The changing of the "status" field would be done on the back end. However, that field would be displayed through the wordpress template, so that the customer can still see it on our website...even if they do get a notification email.

  4. fireproofsocks
    Posted 4 years ago #

    Hmmm... this sounds like something that should be handled via custom code. I would add an event listener (i.e. a "hook") to the "on post save" event (whatever WP calls it), and if the value had changed from x to y in the "status" field, then fire off an email.

  5. WebmistressM
    Posted 4 years ago #

    Would an "event listener" be tied to any sort of export function? Another thought I had would be to have some sort of auto process which outputs all the data of this custom content type (would help us keep track of all orders we have taken--current or completed) and than maybe we could output it into an email with something else?

    (there is many ways to skin a cat) :)

Topic Closed

This topic has been closed to new replies.

About this Topic