This commit is contained in:
@@ -31,19 +31,19 @@ class Hiltes
|
||||
$this->hiltesPass = $_ENV['HILTES_API_PASS'];
|
||||
}
|
||||
|
||||
public function import()
|
||||
{
|
||||
|
||||
$finder = new Finder();
|
||||
$finder->files()->in($this->current_dir_path . "/hiltes/h2c/");
|
||||
|
||||
foreach ($finder as $file) {
|
||||
$contents = $file->getContents();
|
||||
|
||||
//var_dump($contents);
|
||||
}
|
||||
|
||||
}
|
||||
// public function import()
|
||||
// {
|
||||
//
|
||||
// $finder = new Finder();
|
||||
// $finder->files()->in($this->current_dir_path . "/hiltes/h2c/");
|
||||
//
|
||||
// foreach ($finder as $file) {
|
||||
// $contents = $file->getContents();
|
||||
//
|
||||
// //var_dump($contents);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
@@ -84,13 +84,14 @@ class Hiltes
|
||||
public function createRequest($orderData)
|
||||
{
|
||||
|
||||
$data = array();
|
||||
$this->loginToHiltes('', '');
|
||||
$order = $this->orderRepository->findOneBy(array('orderId' => $orderData->getOrderId()));
|
||||
|
||||
/**
|
||||
* @var Order
|
||||
*/
|
||||
$order = $this->orderRepository->findOneBy(array('orderId' => $orderData->getOrderId()));
|
||||
|
||||
|
||||
if ($order) {
|
||||
//foreach ($orders as $order) {
|
||||
if ($order->getStatus() != 2) return false;
|
||||
@@ -116,9 +117,12 @@ class Hiltes
|
||||
# "AchievedSalesPrice" => 0, #X Erzielter Verkaufspreis
|
||||
$tSalNr = array();
|
||||
foreach ($tA['positions'] as $v) {
|
||||
if ($v['type'] == 'versandposition') {
|
||||
$SalesNumber = '000001';
|
||||
$SalesGoodsGroupNumber = 9350;
|
||||
if ($v['type'] == 'versandposition' || $v['sku'] == '') {
|
||||
// $SalesNumber = '000001';
|
||||
// $SalesGoodsGroupNumber = 9350;
|
||||
|
||||
// Versandkosten werden nicht übermittelt
|
||||
continue;
|
||||
} else {
|
||||
$SalesNumber = (!empty($v['gtin']) ? $v['gtin'] : $v['sku']);
|
||||
if (preg_match('/^([0-9]+)_/', $SalesNumber, $tP)) {
|
||||
|
||||
Reference in New Issue
Block a user