Jump to content

email admin when an order is canceled


sean1688

Recommended Posts

Thanks for your reply.

 

however this does not work.

 

the Cubecart is set up to send email to the admin when an order is paid. this is working fine for us.

 

what we want to do is to also send an email to admin when an order is canceled. this will be adding an email template, but I don't know how to do that.

Link to comment
Share on other sites

In the file /classes/order.class.php, (CC602 line 471) find:

Was:
            case self::ORDER_CANCELLED:
                // Cancelled
                $content = $mailer->loadContent('cart.order_cancelled', $order_summary['lang'], $this->_order_summary);
                break;
            }
 
Now:
            case self::ORDER_CANCELLED:
                // Cancelled
                $content = $mailer->loadContent('cart.order_cancelled', $order_summary['lang'], $this->_order_summary);
                if(!empty($content)) {$admin_mailer = Mailer::getInstance(); $admin_mailer->sendEmail($this->_notifyAdmins(), $content);}
                break;
            }

This is using the existing template Cart: Order Cancelled.
 

Adding a new, custom email template just for the admin when an order is cancelled is a bit more involved.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...