Skip to content

Commit

Permalink
Added changes for 2.3 #1460
Browse files Browse the repository at this point in the history
  • Loading branch information
federicocanedo committed Jul 15, 2022
1 parent 3d1f862 commit 9ad797a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Model/Api/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ protected function _getConvertedQuotes($mailchimpStoreId, $magentoStoreId)
// get only the converted quotes
$convertedCarts->addFieldToFilter('store_id', ['eq' => $magentoStoreId]);
$convertedCarts->addFieldToFilter('is_active', ['eq' => 0]);
$convertedCarts->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id']);

$convertedCarts->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id','customer_email']);
//join with mailchimp_ecommerce_sync_data table to filter by sync data.
$convertedCarts->getSelect()->joinLeft(
['m4m' => $this->_helper->getTableName('mailchimp_sync_ecommerce')],
Expand Down Expand Up @@ -225,7 +224,7 @@ protected function _getModifiedQuotes($mailchimpStoreId, $magentoStoreId)
$modifiedCarts->addFieldToFilter('is_active', ['eq'=>1]);
// select carts for the current Magento store id
$modifiedCarts->addFieldToFilter('store_id', ['eq' => $magentoStoreId]);
$modifiedCarts->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id']);
$modifiedCarts->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id','customer_id','customer_email','mailchimp_campaign_id','quote_currency_code','grand_total']);

//join with mailchimp_ecommerce_sync_data table to filter by sync data.
$modifiedCarts->getSelect()->joinLeft(
Expand Down Expand Up @@ -359,7 +358,7 @@ protected function _getNewQuotes($mailchimpStoreId, $magentoStoreId)
if ($this->_firstDate) {
$newCarts->addFieldToFilter('created_at', ['gt' => $this->_firstDate]);
}
$newCarts->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id']);
$newCarts->getSelect()->reset(\Zend_Db_Select::COLUMNS)->columns(['entity_id','customer_id','customer_email','mailchimp_campaign_id','updated_at','quote_currency_code','grand_total']);

//join with mailchimp_ecommerce_sync_data table to filter by sync data.
$newCarts->getSelect()->joinLeft(
Expand Down

0 comments on commit 9ad797a

Please sign in to comment.