add hookActionEmailSendBefore to set bankwire details for mail template
This commit is contained in:
@@ -44,8 +44,9 @@ class B2BPayments extends PaymentModule implements PrestaShop\PrestaShop\Core\Mo
|
||||
{
|
||||
if (
|
||||
!parent::install() ||
|
||||
!$this->registerHook('paymentOptions')
|
||||
|| !$this->registerHook('DisplayOrderConfirmation')
|
||||
!$this->registerHook('paymentOptions') ||
|
||||
!$this->registerHook('DisplayOrderConfirmation') ||
|
||||
!$this->registerHook('actionEmailSendBefore')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -411,4 +412,13 @@ class B2BPayments extends PaymentModule implements PrestaShop\PrestaShop\Core\Mo
|
||||
Context::getContext()->customer = $originalCustomer;
|
||||
return $regularPrice;
|
||||
}
|
||||
|
||||
public function hookActionEmailSendBefore($params)
|
||||
{
|
||||
if ($params['template'] == 'bankwire_postpaid') {
|
||||
$params['templateVars']['{bankwire_owner}'] = Configuration::get('BANK_WIRE_OWNER');
|
||||
$params['templateVars']['{bankwire_details}'] = nl2br(Configuration::get('BANK_WIRE_DETAILS'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user