J'ai cette erreur et je comprend pas la source : PHP Fatal error: Class 'Thelia\\Core\\Event\\Customer\\CustomerCreateOrUpdateEvent' not found in C:\\xampp\\htdocs\\shop\\local\\modules\\CreateOrUpdateCustomer\\Controller\\CreateNewCustomerController.php on line 63,
Voici mon code dans mon controller:
class CreateNewCustomerController extends BaseFrontController
{
public function createCustomerAction(){
if ($nbrAdherent == 1 && $nbrPersonnel == 0) {
$customerCreateEvent = new CustomerCreateOrUpdateEvent(
1, // civilite non identifiee dans t_adherent 1 = M.
$pdo->query ( "Select sNomContact from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // First name
$pdo->query ( "Select sPrenomContact from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), //Last name
$pdo->query ( "Select sAdresse1 from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // address 1
$pdo->query ( "Select sAdresse2 from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // address 2
'', // address 3'',
$pdo->query ( "Select sTelephone from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // telephone
$pdo->query ( "Select sMobile from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // cellphone
$pdo->query ( "Select sCodePostal from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // zip code
$pdo->query ( "Select sVille from t_adherent where nIdAdherent = '$id'" )->fetchColumn (), // city,
64, // pays: 64 = France
$email, // email
md5($pwd), // password
$this->getSession()->getLang()->getId(),
null, // reseller
null, // sponsor
0, // discount
$token, // remmeber_me_token
null, // company
generateRef() // ref
);
$this->dispatch(TheliaEvents::CUSTOMER_CREATEACCOUNT, $customerCreateEvent);
}
}