Post by unknownmale1 » Fri Oct 17, 2014 10:42 pm

Are email confirmations sent when inserting an order in admin

Sales > Orders > Insert?

If not, does anyone know if an extension which can do this? I've had a look and come up with nothing.

Active Member

Posts

Joined
Sat Aug 28, 2010 6:46 pm

Post by tacobandito » Sat Oct 18, 2014 12:44 am

/admin/order/sale.php is the file containing the function that processes an admin inserted order. I've copied and pasted the code in it's entirety below.

Code: Select all

public function insert() {
		$this->language->load('sale/order');

		$this->document->setTitle($this->language->get('heading_title'));

		$this->load->model('sale/order');

		if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
			$this->model_sale_order->addOrder($this->request->post);

			$this->session->data['success'] = $this->language->get('text_success');

			$url = '';

			if (isset($this->request->get['filter_order_id'])) {
				$url .= '&filter_order_id=' . $this->request->get['filter_order_id'];
			}

			if (isset($this->request->get['filter_customer'])) {
				$url .= '&filter_customer=' . urlencode(html_entity_decode($this->request->get['filter_customer'], ENT_QUOTES, 'UTF-8'));
			}

			if (isset($this->request->get['filter_order_status_id'])) {
				$url .= '&filter_order_status_id=' . $this->request->get['filter_order_status_id'];
			}

			if (isset($this->request->get['filter_total'])) {
				$url .= '&filter_total=' . $this->request->get['filter_total'];
			}

			if (isset($this->request->get['filter_date_added'])) {
				$url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
			}

			if (isset($this->request->get['filter_date_modified'])) {
				$url .= '&filter_date_modified=' . $this->request->get['filter_date_modified'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}

			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}

			$this->redirect($this->url->link('sale/order', 'token=' . $this->session->data['token'] . $url, 'SSL'));
		}

		$this->getForm();
	}
There is no reference to sending an email in this function, nor does it call any other functions that send emails as part of this process. So, no, it would not send an email. That said, this is actually not that hard to sort out as OpenCart obviously has email sending functionality built in on other orders when they are processed. The way to handle this is to locate the file that processes those orders, and copy + paste out the email sending code...and adjust variables as needed. Unfortunately, I got this far in typing my response to your question and am being pulled away by other work, so I can't continue this right now. I will come back to this if no one else helps you between now and when I'm available again.

[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me


User avatar
Active Member

Posts

Joined
Sat Mar 30, 2013 12:27 am
Location - Springfield, MA

Post by unknownmale1 » Sat Oct 18, 2014 2:01 am

Hey,

Thanks for your response! I just assumed a confirmation order would be sent. I guess I'll need to trigger the success page and parse the order info in.

A long night ahead!

Thanks

Active Member

Posts

Joined
Sat Aug 28, 2010 6:46 pm
Who is online

Users browsing this forum: No registered users and 51 guests