ActiveCampaign / module-integration

GNU General Public License v3.0
8 stars 19 forks source link

Abandoned Cart Sync - Items From Previous Cart Recorded On Next Cart #9

Closed bret-BSA closed 3 months ago

bret-BSA commented 3 years ago

Magento 2.4 ECE PHP 7.4

activecampaign/module-integration/AbandonedCart/Model/AbandonedCartSendData.php

The $quoteItemsData array needs to be re-initialized for each abandoned cart.

    $abandonedCarts->setPageSize($numberOfAbandonedCart);
    foreach ($abandonedCarts as $abandonedCart) {
        $connectionId = $this->coreHelper->getConnectionId($abandonedCart->getStoreId());
        $customerId = $abandonedCart->getCustomerId();

SHOULD BE:

    $abandonedCarts->setPageSize($numberOfAbandonedCart);
    foreach ($abandonedCarts as $abandonedCart) {
        $quoteItemsData = array();
        $connectionId = $this->coreHelper->getConnectionId($abandonedCart->getStoreId());
        $customerId = $abandonedCart->getCustomerId();
jorgeeurekalabs commented 3 months ago

Hi,

This issue has been fixed.

Thank you.