Code: Select all
$template->data['text_greeting'] = $language->get('text_new_received') . "\n\n";
$template->data['invoice_no'] = '';
$template->data['text_invoice_no'] = '';
$html = $template->fetch($this->config->get('config_template') . '/template/mail/xml.tpl');
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id . ' (' . $order_total . ')');
$mail->setSubject($subject);
$mail->setTo($this->config->get('config_email'));
$mail->setHtml($html);
$mail->send();
Code: Select all
<?xml version="1.0" encoding="ISO-8859-15"?>
<Order>
<OrderID><?php echo $order_id; ?></OrderID>
<OrderDate><?php echo $date_added; ?></OrderDate>
<ShippingAddress>
<Name><?php echo $shipping_address_split['firstname'] . " " . $shipping_address_split['lastname']; ?></Name>
<Street1><?php echo $shipping_address_split['address_1']; ?></Street1>
<City><?php echo $shipping_address_split['city']; ?></City>
<State><?php echo $shipping_address_split['zone_code']; ?></State>
<Zip><?php echo $shipping_address_split['postcode']; ?></Zip>
<Country><?php echo $shipping_address_split['country']; ?></Country>
<Phone><?php echo $telephone; ?></Phone>
<EmailAddress><?php echo $email; ?></EmailAddress>
</ShippingAddress>
<OrderLineItems>
<?php foreach ($products as $product) {
$str = $option['value'];
$start = strpos($str, '[');
$end = strpos($str, ']', $start + 1);
$length = $end - $start;
$result = substr($str, $start + 1, $length - 1);
?>
<Product>
<SKU><?php echo $result; ?></SKU>
<Name><?php echo $product['name']; ?></Name>
<Quantity><?php echo $product['quantity']; ?></Quantity>
</Product>
<? } ?>
</OrderLineItems>
<ShippingMethod><?php echo $shipping_method; ?></ShippingMethod>
<CommentsCustomer><?php echo $comment; ?></CommentsCustomer>
</Order>
This email is not fired, and the apache error logs are telling me it's a string issue in line 1, I know I can echo everything out, but I'm hoping there's a better way.
Thank you in advance!