Skip to content

Commit

Permalink
Merge pull request #1195 from mailchimp/Issue-1191-2.2
Browse files Browse the repository at this point in the history
closes #1191 for magento 2.2
  • Loading branch information
gonzaloebiz authored Jun 3, 2021
2 parents 0188194 + b6cdef2 commit 884dd0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Model/Api/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public function _sendProducts($magentoStoreId)
$this->includingTaxes = $this->_helper->getConfigValue(\Ebizmarts\MailChimp\Helper\Data::XML_INCLUDING_TAXES, $magentoStoreId);
$this->_markSpecialPrices($magentoStoreId, $mailchimpStoreId);
$collection = $this->_getCollection();
$collection->addFieldToFilter("type_id", ["nin"=>[\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, "grouped"]]);
$collection->addStoreFilter($magentoStoreId);
$collection->getSelect()->joinLeft(
['m4m' => $this->_helper->getTableName('mailchimp_sync_ecommerce')],
Expand Down Expand Up @@ -201,6 +202,7 @@ protected function _markSpecialPrices($magentoStoreId, $mailchimpStoreId)
* get the products that was synced when it have special price and have no more special price
*/
$collection2 = $this->_getCollection();

$collection2->addStoreFilter($magentoStoreId);
$collection2->addAttributeToFilter(
'special_price',
Expand Down

0 comments on commit 884dd0e

Please sign in to comment.