commit
8def052f47
@ -154,11 +154,12 @@ class Retailcrm_Retailcrm_Model_Exchange
|
|||||||
$customer->setWebsiteId($siteid);
|
$customer->setWebsiteId($siteid);
|
||||||
$customer->loadByEmail($order['email']);
|
$customer->loadByEmail($order['email']);
|
||||||
|
|
||||||
|
|
||||||
if (!is_numeric($customer->getId())) {
|
if (!is_numeric($customer->getId())) {
|
||||||
$customer
|
$customer
|
||||||
->setGroupId(1)
|
->setGroupId(1)
|
||||||
->setWebsiteId($siteid)
|
->setWebsiteId($siteid)
|
||||||
->setStore($storeId)
|
->setStoreId($storeId)
|
||||||
->setEmail($order['email'])
|
->setEmail($order['email'])
|
||||||
->setFirstname($order['firstName'])
|
->setFirstname($order['firstName'])
|
||||||
->setLastname($order['lastName'])
|
->setLastname($order['lastName'])
|
||||||
@ -390,7 +391,7 @@ class Retailcrm_Retailcrm_Model_Exchange
|
|||||||
$customer
|
$customer
|
||||||
->setGropuId(1)
|
->setGropuId(1)
|
||||||
->setWebsiteId($siteid)
|
->setWebsiteId($siteid)
|
||||||
->setStore($storeId)
|
->setStoreId($storeId)
|
||||||
->setEmail($order['email'])
|
->setEmail($order['email'])
|
||||||
->setFirstname($order['firstName'])
|
->setFirstname($order['firstName'])
|
||||||
->setLastname($order['lastName'])
|
->setLastname($order['lastName'])
|
||||||
|
@ -103,7 +103,6 @@ class Retailcrm_Retailcrm_Model_Order extends Retailcrm_Retailcrm_Model_Exchange
|
|||||||
}
|
}
|
||||||
|
|
||||||
$product = array(
|
$product = array(
|
||||||
'productId' => $item->getProductId(),
|
|
||||||
'productName' => !isset($parent) ? $item->getName() : $parent->getName(),
|
'productName' => !isset($parent) ? $item->getName() : $parent->getName(),
|
||||||
'quantity' => !isset($parent) ? intval($item->getQtyOrdered()) : intval($parent->getQtyOrdered()),
|
'quantity' => !isset($parent) ? intval($item->getQtyOrdered()) : intval($parent->getQtyOrdered()),
|
||||||
'initialPrice' => !isset($parent) ? $item->getPrice() : $parent->getPrice(),
|
'initialPrice' => !isset($parent) ? $item->getPrice() : $parent->getPrice(),
|
||||||
@ -116,7 +115,6 @@ class Retailcrm_Retailcrm_Model_Order extends Retailcrm_Retailcrm_Model_Exchange
|
|||||||
$items[] = $product;
|
$items[] = $product;
|
||||||
} elseif ($item->getProductType() == "grouped") {
|
} elseif ($item->getProductType() == "grouped") {
|
||||||
$product = array(
|
$product = array(
|
||||||
'productId' => $item->getProductId(),
|
|
||||||
'productName' => $item->getName(),
|
'productName' => $item->getName(),
|
||||||
'quantity' => $item->getQtyOrdered(),
|
'quantity' => $item->getQtyOrdered(),
|
||||||
'initialPrice' => $item->getPrice(),
|
'initialPrice' => $item->getPrice(),
|
||||||
@ -343,10 +341,12 @@ class Retailcrm_Retailcrm_Model_Order extends Retailcrm_Retailcrm_Model_Exchange
|
|||||||
}
|
}
|
||||||
|
|
||||||
$product = array(
|
$product = array(
|
||||||
'productId' => $item->getProductId(),
|
|
||||||
'productName' => !isset($parent) ? $item->getName() : $parent->getName(),
|
'productName' => !isset($parent) ? $item->getName() : $parent->getName(),
|
||||||
'quantity' => !isset($parent) ? intval($item->getQtyOrdered()) : intval($parent->getQtyOrdered()),
|
'quantity' => !isset($parent) ? intval($item->getQtyOrdered()) : intval($parent->getQtyOrdered()),
|
||||||
'initialPrice' => !isset($parent) ? $item->getPrice() : $parent->getPrice()
|
'initialPrice' => !isset($parent) ? $item->getPrice() : $parent->getPrice(),
|
||||||
|
'offer' => array(
|
||||||
|
'externalId' => $item->getProductId()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
unset($parent);
|
unset($parent);
|
||||||
$items[] = $product;
|
$items[] = $product;
|
||||||
|
Loading…
Reference in New Issue
Block a user