Jump to content
Fabrizio r

Newsletter mailchimp module

Recommended Posts

Hi, I connected my prestashop store to mailchimp with the official module, and the sync with the customers works properly.
However, users who sign up with the native form provided by prestashop are not imported, so they are on the list of my backoffice subscribers but not among the customers.
I do not know if the module provided by mailchimp is able to synchronize only the customers and not all the members, in the description is not clear, or I missed something.
Can someone help me?

Thanks

Share this post


Link to post
Share on other sites

The module have many problems with prestashop 1.7.5
From the Mailchimp Config / Mailchimp Sync the only think that work is the sync products in regular mode.
All the other sync did work in any mode. So you can't import your old data from the module.

"Live" it seems to work properly. So from the time you install the module new customers, new orders are syncing.


Also we have this error

[Thu Sep 05 12:43:44.364250 2019] [proxy_fcgi:error] [pid 9908] [client 79.129.43.209:56810] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 3 passed to PrestaChamps\MailchimpPro\Hooks\Action\Customer\AccountUpdate::run() must be an instance of Customer, null given, called in /var/www/vhosts/example.com/httpdocs/modules/mailchimppro/mailchimppro.php on line 789 and defined in /var/www/vhosts/example.com/httpdocs/modules/mailchimppro/src/PrestaChamps/MailchimpPro/Hooks/Action/Customer/AccountUpdate.php:57nStack trace:n#0 /var/www/vhosts/example.com/httpdocs/modules/mailchimppro/mailchimppro.php(789): PrestaChamps\MailchimpPro\Hooks\Action\Customer\AccountUpdate::run(Object(Context), Object(DrewM\MailChimp\MailChimp), NULL)n#1 /var/www/vhosts/example.com/httpdocs/classes/Hook.php(966): Mailchimppro->hookActionCustomerAccountUpdate(Array)n#2 /var/www/vhosts/example.com/httpdocs/classes/Hook.php(351): HookCore::coreCallHook(Object(Mailchimppro), 'hookactionCusto...', Array)n#3 /var/www/vhosts/example.com/httpdocs/classes/Hook.php(903): HookCore::callHookOn(Object(Mailchimppro), 'act...n', referer: https://www.example.com/el/order

This happens when a customer at checkout in the address step and he go back to add something else to the cart. The second time he try to checkout we get this error and the customer gets a white page.
I search the problem and in public function hookActionCustomerAccountUpdate($params) at $params['newCustomer'] does not exist in table, only $params['customer']. I have dump variable $params and i fix the problem

public function hookActionCustomerAccountUpdate($params)
{
if(isset($params['newCustomer']))
{
try {
PrestaChampsMailchimpProHooksActionCustomerAccountUpdate::run(
$this->context,
$this->getApiClient(),
$params['newCustomer']
);
} catch (Exception $exception) {
PrestaShopLogger::addLog("[MAILCHIMP] :{$exception->getMessage()}");
}
}elseif (isset($params['customer']))
{
try {
PrestaChampsMailchimpProHooksActionCustomerAccountUpdate::run(
$this->context,
$this->getApiClient(),
$params['customer']
);
} catch (Exception $exception) {
PrestaShopLogger::addLog("[MAILCHIMP] :{$exception->getMessage()}");
}
}
}

I didn't remove the $params['newCustomer'] because i don't now if it's in use in some other case. (where have no sense to use variable "newCustomer" in the CustomerAccountUpdate )


All the above are also tested in fresh install of prestashop 1.7.5.2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More