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