emartech / 3rd-party-integrations-magento-M2

Please note: this plugin is deprecated. we have a new version of the plugin- please contact emarsys support for more info
MIT License
0 stars 5 forks source link

Cart command is not triggered on empty cart. #3

Closed eghanin closed 6 years ago

eghanin commented 6 years ago

Please edit the file at following path:

Magento_root_dir/app/code/Emarsys/Emarsys/view/frontend/templates/emarsys/javascripttracking.phtml

    Replace the following code from line number 22 to 24:

    <?php if ($cartData = $block->getCartItemsJsonData()): ?>
        <script>ScarabQueue.push(["cart", [<?php echo $cartData; ?>]]);</script>
    <?php endif; ?>

    with:

    <script>ScarabQueue.push(["cart", [<?php echo $block->getCartItemsJsonData() ?>]]);</script>
eghanin commented 6 years ago

the above solution should enforce cart calls on empty carts

eghanin commented 6 years ago

fixed with the newest release

eghanin commented 6 years ago

this is fixed in our newer versions