apps/customer/controllers/GuestController.php >> actionRegister()
i know i can use customer_model_customer_aftersave hook after save method
Why not use "customer_model_customercompany_aftersave" ?but i need after customer_company save
Yii::app()->hooks->addAction('customer_model_customercompany_aftersave', function($company){
if (Yii::app()->getController()->getRoute() != 'guest/register') {
return;
}
$customer = $company->customer;
// use the objects here...
});
This is good. Instead of string literals like yes / no, use the class contants like: Classname::TEXT_YES and Classname::TEXT_NO:i will be happy to take a look at this extension and help me to find out bugs and ...
https://gitlab.com/masihfathi/ui-ux-improvment
or if you have other opinion i will be happy to hear.
$list->visibility = Lists::VISIBILITY_PUBLIC;
$list->merged = Lists::TEXT_NO;
$list->welcome_email = Lists::TEXT_NO;
$list->removable = Lists::TEXT_YES;
$list->subscriber_require_approval = Lists::TEXT_NO;