Skip to content

Instantly share code, notes, and snippets.

@waiting-for-dev
Created November 16, 2013 10:54
Show Gist options
  • Save waiting-for-dev/7498825 to your computer and use it in GitHub Desktop.
Save waiting-for-dev/7498825 to your computer and use it in GitHub Desktop.
AdminCustomersController for Newsletter Plus Prestashop module. It delete subscriber when a customer with the same email is created in the backend.
<?php
class AdminCustomersController extends AdminCustomersControllerCore
{
public function afterAdd($customer)
{
require_once _PS_MODULE_DIR_.'newsletterplus/newsletterplus.php';
$newsletterplus = new Newsletterplus();
$newsletterplus->hookActionCustomerAccountAdd(array(
'_POST' => $_POST,
'newCustomer' => $customer,
));
parent::afterAdd();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment