Jump to content

How to duplicate emails


bonhomie
 Share

Recommended Posts

If someone could create a code to do a blind copy for the existing emails, that would work. But I have no idea how that could be done.

If it requires code for each email, I would like to have a duplicate of the Order Complete email. I don't really have a need for the others.

Link to comment
Share on other sites

Where can I view the emails that have gone out to my customers (if any?) They do not show up in the sent box of the email i have logged as my admin/contact email. Is there a place within cubecart that stores this information?

Link to comment
Share on other sites

  • 4 weeks later...

When an order's status is changed by the admin, or during the normal course of checking out and the order's status moves into Processing or Completed, an email is sent to the customer using the appropriate template.

Also, when an order enters the Pending or Processing status, the admin is notified, using the appropriate template, if two things are set:

1. Store Settings, Features tab, Misc group, Order status for admin email notifications: Pending or Processing

2. Administrators Settings, edit an administrator, General tab, Details group, Receive order notifications? - green tick

* We can more statuses to notify the admin.

* We can bcc the admin to get a copy of whatever the customer gets on a per status basis.

* Anything else?

We will first look at the order entering the Complete status. This is about line 405 in order.class.php. (Note that a digital-only order will self-complete. There is no need for the admin to manually change the order to Complete in this case. Once the order is determined to be digital and nothing tangible is left, the assumption is that the email containing the digital download link is sufficient and the Complete email notice will not happen.)

Just a few lines down is this:

$content = $mailer->loadContent('cart.order_complete'.....

We can add this just afterwards:

$mailer->ClearBCCs(); $mailer->AddBCC($this->_notifyAdmins());

The reason why we clear BCCs first is to remove any addresses that was entered from other functions. notifyAdmins() is an email list of all eligible admins along with the store's main contact email address.

Try it and see what happens.

Link to comment
Share on other sites

When an order's status is changed by the admin, or during the normal course of checking out and the order's status moves into Processing or Completed, an email is sent to the customer using the appropriate template.

Also, when an order enters the Pending or Processing status, the admin is notified, using the appropriate template, if two things are set:

1. Store Settings, Features tab, Misc group, Order status for admin email notifications: Pending or Processing

2. Administrators Settings, edit an administrator, General tab, Details group, Receive order notifications? - green tick

* We can more statuses to notify the admin.

* We can bcc the admin to get a copy of whatever the customer gets on a per status basis.

* Anything else?

We will first look at the order entering the Complete status. This is about line 405 in order.class.php. (Note that a digital-only order will self-complete. There is no need for the admin to manually change the order to Complete in this case. Once the order is determined to be digital and nothing tangible is left, the assumption is that the email containing the digital download link is sufficient and the Complete email notice will not happen.)

Just a few lines down is this:

$content = $mailer->loadContent('cart.order_complete'.....

We can add this just afterwards:

$mailer->ClearBCCs(); $mailer->AddBCC($this->_notifyAdmins());

The reason why we clear BCCs first is to remove any addresses that was entered from other functions. notifyAdmins() is an email list of all eligible admins along with the store's main contact email address.

Try it and see what happens.

I just tried this -

I added in the following

$content = $mailer->loadContent('cart.order_complete', $mailer->ClearBCCs(); $mailer->AddBCC($this->_notifyAdmins()) , $order_summary['lang'], $this->_order_summary);

}

Then I went in to make a test order to see what emails came through and when clicking on the 'checkout' button OR the 'paypal' button from my cart and I was presented with a blank/whilte page. i knew my cart was working before so I removed the above change and the cart diverts again diverts to payments options or paypal again as it should. Why is the above code causing these problems. What have I got wrong?

Link to comment
Share on other sites

Try this instead:

if(!$this->_skip_order_complete_email) {

	 $content = $mailer->loadContent('cart.order_complete', $order_summary['lang'], $this->_order_summary);

$mailer->ClearBCCs(); $mailer->AddBCC($this->_notifyAdmins());	

}

Thanks , I am not getting a blank page anymore obviously I just had it in the wrong place. I will wait and see what emails I get when my next customer orders!

Link to comment
Share on other sites

I said:

Just a few lines down is this:

$content = $mailer->loadContent('cart.order_complete'.....

We can add this just afterwards:

$mailer->ClearBCCs(); $mailer->AddBCC($this->_notifyAdmins());

You did this:

$content = $mailer->loadContent('cart.order_complete', $mailer->ClearBCCs(); $mailer->AddBCC($this->_notifyAdmins()) , $order_summary['lang'], $this->_order_summary);

My sincerest apologies. I truly believe that when I use ellipses (....), people understand there is more to follow but it is irrelevant to the discussion. I should have said:

Just a few lines down is this line of code of which only the beginning is shown:

and,

We can add this new line of code just below that one:

Live and Learn.

Link to comment
Share on other sites

I'm sorry it's not working for you yet. May I make a suggestion? Create a test customer with an email address you have access to (it didn't work for me when I used one on the same domain as the store). Go through the order process, but obviously don't pay. Then you can go to that order and trigger the emails repeatedly via changing the status back and forth from pending to processing to complete, etc., so you can see what happens with the emails. Just be sure your last step after testing is to cancel the order, so your stock level is not affected.

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.

 Share

×
×
  • Create New...