This topic can no longer be replied to because it has been locked.

Bug with Mailchimp4Magento v1.0.3 - Product images upload breaks when module is on
Gravatar
Joined: 2016-06-30
Posts: 2
I'm using Mailchimp4Magento, latest version (1.0.3). I found an issue with the way the Mailchimp observer for productAfterSave works.

From the module:

app/code/community/Ebizmarts/MailChimp/Model/Observer.php

public function productSaveAfter(Varien_Event_Observer $observer) { $product = $observer->getEvent()->getProduct(); if($product->getMailchimpUpdateObserverRan()) { return; }else{ $product->setMailchimpUpdateObserverRan(true); } //update mailchimp ecommerce data for that product variant Mage::getModel('mailchimp/api_products')->update($product); }

And in the Products update file:

app/code/community/Ebizmarts/MailChimp/Model/Api/Products.php
public function update($product) { ... //update product delta $product->setData("mailchimp_sync_delta", Varien_Date::now()); $product->setData("mailchimp_sync_error", ""); $product->save(); ... }


When an administrator is editing a product in the admin, and clicks on Save, the product will be saved twice: one for the original changes, two for the mailchimp synchronization feature.

The issue is when the administrator is saving a new image: if you try to do that with the module enabled, the second time the save() method is executed, the image file won't be available anymore. The product will end up with the original image added, and also a placeholder, added by Magento since it couldn't save the image. This causes confusion since the administrator, who has only added 1 image, will get that image and a placeholder.
Gravatar
Joined: 2016-06-09
Posts: 1020
Hello,

We have just released a new version (1.0.5) that fixes many issues with the module, you can get it in our store.

https://store.ebizmarts.com/mailchimp4magento.html

Best
Gravatar
Joined: 2016-06-30
Posts: 2
I uploaded that version 1.0.5 to my site and tested it. It seems to solve the issue.
Thanks!
Gravatar
Joined: 2016-06-09
Posts: 1020
Very glad to hear it, if you run into any more trouble don't hesitate to ask.

Best regards.

NEWSLETTER

Subscribe to our newsletter to receive emails and useful news articles