Skip to content

Commit

Permalink
Merge pull request #64 from jorgeeurekalabs/main
Browse files Browse the repository at this point in the history
2.0.12
jorgeeurekalabs authored Sep 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents fbf43ff + d04d2f4 commit c022b28
Showing 11 changed files with 32 additions and 15 deletions.
16 changes: 9 additions & 7 deletions AbandonedCart/Model/AbandonedCartSendData.php
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Model\AbstractModel;
use Magento\Framework\Stdlib\DateTime;
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
use Magento\Framework\UrlInterface;
use Magento\Quote\Api\CartRepositoryInterface;
use Magento\Quote\Model\QuoteFactory;
@@ -128,6 +128,8 @@ class AbandonedCartSendData extends AbstractModel

private $customerId;



/**
* AbandonedCartSendData constructor.
* @param CustomerRepositoryInterface $customerRepository
@@ -149,7 +151,7 @@ class AbandonedCartSendData extends AbstractModel
* @param AppEmulation $appEmulation
* @param StoreManagerInterface $storeManager
* @param CustomerModel $customerModel
* @param DateTime $dateTime
* @param TimezoneInterface $dateTime
* @param CartRepositoryInterface $quoteRepository
* @param UrlInterface $urlBuilder
*/
@@ -173,7 +175,7 @@ public function __construct(
AppEmulation $appEmulation,
StoreManagerInterface $storeManager,
CustomerModel $customerModel,
DateTime $dateTime,
TimezoneInterface $dateTime,
CartRepositoryInterface $quoteRepository,
UrlInterface $urlBuilder
)
@@ -313,9 +315,9 @@ public function sendAbandonedCartData($quoteId = null): array
"discountAmount" => $this->coreHelper->priceToCents($abandonedCart->getDiscountAmount())
],
"orderUrl" => $this->urlBuilder->getDirectUrl('checkout/cart'),
"abandonedDate" => $abandonedCart->getCreatedAt(),
"externalCreatedDate" => $abandonedCart->getCreatedAt(),
"externalUpdatedDate" => $abandonedCart->getUpdatedAt(),
"abandonedDate" => $this->dateTime->date($abandonedCart->getCreatedAt())->format('Y-m-d H:i:s'),
"externalCreatedDate" => $this->dateTime->date($abandonedCart->getCreatedAt())->format('Y-m-d H:i:s'),
"externalUpdatedDate" => $this->dateTime->date($abandonedCart->getUpdatedAt())->format('Y-m-d H:i:s'),
"shippingMethod" => $abandonedCart->getShippingMethod(),
"totalPrice" => $this->coreHelper->priceToCents($abandonedCart->getGrandTotal()),
"shippingAmount" => $this->coreHelper->priceToCents($abandonedCart->getShippingAmount()),
@@ -425,7 +427,7 @@ private function saveResult($quoteId, $acOrderId, $syncStatus): void
if ($quoteModel->getEntityId()) {
$quoteModel->setAcOrderSyncId($acOrderId);
$quoteModel->setAcSyncStatus($syncStatus);
$quoteModel->setAcSyncedDate($this->dateTime->formatDate(time()));
$quoteModel->setAcSyncedDate($this->dateTime->date()->format('Y-m-d H:i:s'));
}
$quoteModel->save();
}
2 changes: 1 addition & 1 deletion AbandonedCart/composer.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"config": {
"sort-packages": true
},
"version": "2.1.1",
"version": "2.1.3",
"require": {
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2",
"activecampaign/core": "2.1.*"
2 changes: 1 addition & 1 deletion AbandonedCart/etc/module.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="ActiveCampaign_AbandonedCart" setup_version="2.1.1">
<module name="ActiveCampaign_AbandonedCart" setup_version="2.1.3">
<sequence>
<module name="Magento_Product"/>
<module name="Magento_Sales"/>
5 changes: 5 additions & 0 deletions Customer/Observer/CustomerSaveAfter.php
Original file line number Diff line number Diff line change
@@ -27,6 +27,11 @@ class CustomerSaveAfter implements ObserverInterface
*/
protected $curl;

/**
* @var LoggerInterface
*/
protected $logger;

/**
* CustomerSaveAfter constructor.
* @param Customer $customer
2 changes: 1 addition & 1 deletion Customer/composer.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"config": {
"sort-packages": true
},
"version": "2.1.3",
"version": "2.1.4",
"require": {
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2",
"activecampaign/core": "2.1.*"
2 changes: 1 addition & 1 deletion Customer/etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="ActiveCampaign_Customer" setup_version="2.1.3">
<module name="ActiveCampaign_Customer" setup_version="2.1.4">
<sequence>
<module name="ActiveCampaign_Core"/>
</sequence>
10 changes: 10 additions & 0 deletions Order/Model/OrderData/OrderDataSend.php
Original file line number Diff line number Diff line change
@@ -103,6 +103,16 @@ class OrderDataSend
*/
protected $quoteRepository;

/**
* @var CustomerModel
*/
protected $customerModel;

/**
* @var CustomerModel
*/
protected $coreHelper;

/**
* OrderDataSend constructor.
* @param ProductRepositoryInterfaceFactory $productRepositoryFactory
2 changes: 1 addition & 1 deletion Order/composer.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"config": {
"sort-packages": true
},
"version": "2.1.0",
"version": "2.1.1",
"require": {
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2",
"activecampaign/core": "2.1.*"
2 changes: 1 addition & 1 deletion Order/etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="ActiveCampaign_Order" setup_version="2.1.0">
<module name="ActiveCampaign_Order" setup_version="2.1.1">
<sequence>
<module name="ActiveCampaign_Core" />
</sequence>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "activecampaign/module-integration",
"description": "ActiveCampaign extension for Magento 2.3 and 2.4",
"type": "magento2-component",
"version": "2.0.10",
"version": "2.0.12",
"license": "OSL-3.0",
"require": {
"php": "~7.3.0||~7.4.0||~8.0||~8.1||~8.2"
2 changes: 1 addition & 1 deletion marketplace-composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "activecampaign/module-integration",
"description": "ActiveCampaign extension for Magento 2.3 and 2.4",
"type": "metapackage",
"version": "2.0.10",
"version": "2.0.12",
"license": [
"OSL-3.0"
],

0 comments on commit c022b28

Please sign in to comment.