Opencart send fax on order

In some cases, it’s useful to fax your orders to the store as soon as an order is placed. Now many people will think this is very hard, but in fact, it’s very easy to accomplish this. Thank god for API’s!

Browse your Opencart folder and go to /catalog/model/checkout/order.php, line 370 (after the following code), and add your fax code. If you put the code here, you can reuse the default HTML mail Opencart will send to your client (which includes all the order info).

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/mail/order.tpl')) {
	$html = $template->fetch($this->config->get('config_template') . '/template/mail/order.tpl');
} else {
	$html = $template->fetch('default/template/mail/order.tpl');
}

I’d like to use Interfax since they provide a very easy PHP API. Only 1 requirement, you’ll need SOAP. Now add this code:

/* START: SEND FAX */
 
	/**************** Settings begin **************/
 
	$username = ''; // Enter your Interfax username here
	$password = ''; // Enter your Interfax password here
	$faxnumber = ''; // Enter your designated fax number here in the format +[country code][area code][fax number], for example: +12125554874
	$texttofax = $html; // Enter your fax contents here
	$filetype = 'HTML'; // If $texttofax is regular text, enter TXT here. If $texttofax is HTML enter HTML here
 
	/**************** Settings end ****************/
 
	$client = new SoapClient("http://ws.interfax.net/dfs.asmx?wsdl");
 
	$params->Username  = $username;
	$params->Password  = $password;
	$params->FaxNumber = $faxnumber;
	$params->Data      = $texttofax;
	$params->FileType  = $filetype;
 
	$faxResult = $client->SendCharFax($params);
 
/* END: SEND FAX */

Et voila. The email sent to your client for notification will also automaticly be faxed to the given fax number.

Ecocheque : opencart payment module

I’ve created a small and humble module for the big and powerful Opencart shopping system. This module basicly allows people to checkout for free, so they can pay their order on delivery (like ‘Rembours’) with so called ‘Ecocheques’, only in Belgium!

You can download a copy from this module in the extension shop (download here) or pull it from github: https://github.com/kryap/opencart-ecocheque-payment-module


1. Just to be safe, make a backup of your OpenCart installation

2. Upload the contents of the 'upload' folder to your OpenCart installation. No files are overwritten.

3. Log in to the admin control panel and go to:
Extensions > Modules > Payments > Install

4. Done