Skip to content

Commit 7edb88c

Browse files
issue-78 issue-55
1 parent 036e4ff commit 7edb88c

12 files changed

Lines changed: 26 additions & 15 deletions

File tree

AbandonedCart/Plugin/Checkout/Model/GuestPaymentInformationManagementPlugin.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ public function afterSavePaymentInformation(
5555
) {
5656
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
5757
if ($this->abandonedCartHelper->isAbandonedCartSyncingEnabled()) {
58-
$response = $this->abandonedCartSendData->sendAbandonedCartData($quoteIdMask->getQuoteId());
58+
try{
59+
$response = $this->abandonedCartSendData->sendAbandonedCartData($quoteIdMask->getQuoteId());
60+
} catch (\Exception $e) {
61+
62+
}
5963
}
6064
}
61-
}
65+
}

AbandonedCart/Plugin/Checkout/Model/PaymentInformationManagementPlugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ public function afterSavePaymentInformation(
4949
$quote = $quoteRepository->getActive($cartId);
5050

5151
if ($this->abandonedCartHelper->isAbandonedCartSyncingEnabled()) {
52-
$response = $this->abandonedCartSendData->sendAbandonedCartData($quote->getId());
52+
try{
53+
$response = $this->abandonedCartSendData->sendAbandonedCartData($quote->getId());
54+
} catch (\Exception $e) {
55+
56+
}
5357
}
5458
}
5559

AbandonedCart/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"config": {
1010
"sort-packages": true
1111
},
12-
"version": "2.1.11",
12+
"version": "2.1.12",
1313
"require": {
1414
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2",
1515
"activecampaign/core": "2.1.*"

AbandonedCart/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="ActiveCampaign_AbandonedCart" setup_version="2.1.11">
9+
<module name="ActiveCampaign_AbandonedCart" setup_version="2.1.12">
1010
<sequence>
1111
<module name="Magento_Product"/>
1212
<module name="Magento_Sales"/>

Core/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"config": {
1010
"sort-packages": true
1111
},
12-
"version": "2.1.22",
12+
"version": "2.1.23",
1313
"require": {
1414
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2"
1515
},

Core/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="ActiveCampaign_Core" setup_version="2.1.22"/>
3+
<module name="ActiveCampaign_Core" setup_version="2.1.23"/>
44
</config>

Customer/Model/Customer.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,12 @@ public function saveResult($customerId, $syncStatus, $contactId, $ecomCustomerId
222222
}
223223

224224
$customerModel->setAcSyncStatus($syncStatus);
225-
$customerModel->setAcContactId($contactId);
226-
$customerModel->setAcCustomerId($ecomCustomerId);
227-
225+
if ($contactId) {
226+
$customerModel->setAcContactId($contactId);
227+
}
228+
if ($ecomCustomerId) {
229+
$customerModel->setAcCustomerId($ecomCustomerId);
230+
}
228231
$this->customerResource->save($customerModel);
229232
}
230233

Customer/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"config": {
1010
"sort-packages": true
1111
},
12-
"version": "2.1.12",
12+
"version": "2.1.13",
1313
"require": {
1414
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2",
1515
"activecampaign/core": "2.1.*"

Customer/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="ActiveCampaign_Customer" setup_version="2.1.12">
3+
<module name="ActiveCampaign_Customer" setup_version="2.1.13">
44
<sequence>
55
<module name="ActiveCampaign_Core"/>
66
</sequence>

Order/Model/OrderData/OrderDataSend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public function orderDataSend($order): array
291291
foreach ($ecomOrders as $ecomKey => $customers) {
292292
$ecomOrderArray[$ecomOrders[$ecomKey]['email']] = $ecomOrders[$ecomKey]['id'];
293293
}
294-
$acOrderId = $ecomOrderArray[$customerEmail];
294+
$acOrderId = $ecomOrderArray[$quote->getBillingAddress()->getEmail()];
295295
} else {
296296
$acOrderId = isset($result['data']['ecomOrder']['id']) ? $result['data']['ecomOrder']['id'] : null;
297297
}

0 commit comments

Comments
 (0)