isLoggedBack()) { exit; } header('Content-Type: text/json'); $shipping_number = Tools::getValue('shipping_number'); if(!$shipping_number) { echo json_encode(array()); exit; } echo json_encode(array( Db::getInstance()->ExecuteS(' SELECT l.`date_add` AS `parcel_date`, d.`id_order`, d.`product_name`, l.`quantity`, o.`date_add`, c.`firstname`, c.`lastname`, c.`id_customer` FROM `'._DB_PREFIX_.'lapostews` l LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON l.`id_order_detail` = d.`id_order_detail` LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = d.`id_order` LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` WHERE l.`shipping_number` = "'.pSQL($shipping_number).'" '), /*Db::getInstance()->ExecuteS(' SELECT l.`date_add` AS `parcel_date`, d.`id_order`, d.`product_name`, l.`quantity`, o.`date_add`, c.`firstname`, c.`lastname`, c.`id_customer` FROM `'._DB_PREFIX_.'exapaqws` l LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON l.`id_order_detail` = d.`id_order_detail` LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = d.`id_order` LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` WHERE l.`shipping_number` = "'.pSQL($shipping_number).'" '), Db::getInstance()->ExecuteS(' SELECT l.`date_add` AS `parcel_date`, o.`id_order`, o.`date_add`, c.`firstname`, c.`lastname`, c.`id_customer` FROM `'._DB_PREFIX_.'supplyweb_parcel` l LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = l.`id_order` LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` WHERE l.`shipping_number` = "'.pSQL($shipping_number).'" '),*/ Db::getInstance()->ExecuteS(' SELECT l.`date_add` AS `parcel_date`, o.`id_order`, o.`date_add`, c.`firstname`, c.`lastname`, c.`id_customer` FROM `'._DB_PREFIX_.'shipping_history` l LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = l.`id_order` LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` WHERE l.`shipping_number` = "'.pSQL($shipping_number).'" '), )); exit; } public function display() { global $cookie; $this->_html = '

'.$this->l('Parcel lookup').'

'; echo $this->_html; } }