Skip to content

Commit f4abf21

Browse files
committed
Hotfix #627: Correcting Magento order increment id on checkoutSuccess observer
1 parent 5d10b2e commit f4abf21

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/community/Conlabz/CrConnect/Model/Observer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ public function checkoutSuccess()
9797
$tmpItems = array();
9898
foreach ($items as $item) {
9999
$tmpItem = array();
100-
$tmpItem["order_id"] = $lastOrderId;
100+
$tmpItem["order_id"] = $order->getIncrementId();
101101
$tmpItem["product"] = $item->getName();
102102
$tmpItem["product_id"] = $item->getProductId();
103103
$tmpItem["price"] = round($item->getPrice(), 2);
104104
$tmpItem["quantity"] = (integer)$item->getQtyOrdered();
105-
$tmpItem["purchase_date"] = strtotime($item->getCreatedAt());
105+
$tmpItem["purchase_date"] = strtotime($order->getCreatedAt());
106106
$tmpItem["currency"] = $order->getData('order_currency_code');
107107
$tmpItem["source"] = "MAGENTO Order";
108108

app/code/community/Conlabz/CrConnect/etc/config.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<config>
33
<modules>
44
<Conlabz_CrConnect>
5-
<version>3.4.4</version>
5+
<version>3.4.5</version>
66
</Conlabz_CrConnect>
77
</modules>
88
<global>

0 commit comments

Comments
 (0)