Merge branch 'ticket-11985-MondialRelay_part2' into develop

This commit is contained in:
Marion Muszynski 2017-02-15 12:10:20 +01:00
commit b74733c1dd
2 changed files with 10 additions and 5 deletions

View File

@ -312,10 +312,15 @@ class AdminLogistics extends AdminTab {
$this->printLabel($logistics_carriers['exapaq']->renderLabel(new Order(23336), 0.24, array('shipping_number' => '100000000', 'exapass' => '250094100000000068'))); $this->printLabel($logistics_carriers['exapaq']->renderLabel(new Order(23336), 0.24, array('shipping_number' => '100000000', 'exapass' => '250094100000000068')));
} elseif(Tools::isSubmit('submitTestMondialrelay')) { } elseif(Tools::isSubmit('submitTestMondialrelay')) {
$this->_html .= '<p class="conf">'.$this->l('Registration complete, label sent to printer').'</p><br />'; $this->_html .= '<p class="conf">'.$this->l('Registration complete, label sent to printer').'</p><br />';
$result = $logistics_carriers['mondialrelay']->registerParcel(new Order(864899), array('1903302' => "1"), 1.2); $weight = 31;
$render = $logistics_carriers['mondialrelay']->renderLabel(new Order(864899), 1.2, $result[1]); $id_order = 120508;
$this->printLabel($render); $id_order_detail = 353510;
//$this->printLabel($logistics_carriers['mondialrelay']->renderLabel(new Order(864899), 1.2, '6J12345123451')); $product = array('125694' => "1");
$result = $logistics_carriers['mondialrelay']->_getRegisteredParcel(new Order($id_order), $id_order_detail, $product, $weight);
$render = $logistics_carriers['mondialrelay']->renderLabel(new Order($id_order), $weight, $result[1]);
$f = fopen(dirname(__FILE__).'/label_mr.txt', 'a+');
fwrite($f, $render);
fclose($f);
} elseif(Tools::isSubmit('submitShip') && ($id_order = (int) Tools::getValue('id_order'))) { } elseif(Tools::isSubmit('submitShip') && ($id_order = (int) Tools::getValue('id_order'))) {
$order = new Order((int) $id_order); $order = new Order((int) $id_order);

View File

@ -38,7 +38,7 @@ while($line = fgets($file)) {
INSERT INTO `'._DB_PREFIX_.'mondialrelay_agencies` INSERT INTO `'._DB_PREFIX_.'mondialrelay_agencies`
VALUES ( VALUES (
"'.pSQl(substr($line, 6, 4)).'", "'.pSQl(substr($line, 6, 4)).'",
"'.pSQl(substr($line, 10)).'", "'.pSQl(substr($line, 10)).'"
) )
'); ');
} }