Jump to content

Edit History

sanctusmob

sanctusmob


beatify code

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

So in file modules/mailchimppro/mailchimppro.php you must replace function hookActionCustomerAccountUpdate (line 783) with the following.

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

sanctusmob

sanctusmob


beatify code

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

sanctusmob

sanctusmob

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

sanctusmob

sanctusmob

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

×
×
  • Create New...