13161 - rewrite comments in override payment module

This commit is contained in:
Rodney Figaro 2017-05-15 11:04:37 +02:00
parent 7857dd6278
commit 645bf55797

View File

@ -721,7 +721,7 @@ abstract class PaymentModule extends PaymentModuleCore
* *
* @param string $template_name template name with extension * @param string $template_name template name with extension
* @param int $mail_type Mail::TYPE_HTML or Mail::TYPE_TXT * @param int $mail_type Mail::TYPE_HTML or Mail::TYPE_TXT
* @param array $var list send to smarty * @param array $var list send to smarty (antadis 13161 - with id_category_default if list is product list)
* *
* @return string * @return string
*/ */
@ -740,15 +740,14 @@ abstract class PaymentModule extends PaymentModuleCore
} }
if (Tools::file_exists_cache($default_mail_template_path)) { if (Tools::file_exists_cache($default_mail_template_path)) {
// antadis 13161 present products by brands in email
if (preg_match('/^order_conf_product_list/', $template_name)===1) { if (preg_match('/^order_conf_product_list/', $template_name)===1) {
// antadis 13161 group products by brands, and get their brand
$brands_summary = Cart::getBrandSummaryWithProducts($var, $this->context); $brands_summary = Cart::getBrandSummaryWithProducts($var, $this->context);
// antadis 13161 end
$this->context->smarty->assign('category_brands', $brands_summary['category_brands']); $this->context->smarty->assign('category_brands', $brands_summary['category_brands']);
$this->context->smarty->assign('products_per_brand', $brands_summary['products_per_brand']); $this->context->smarty->assign('products_per_brand', $brands_summary['products_per_brand']);
} }
// antadis 13161 end
else { else {
$this->context->smarty->assign('list', $var); $this->context->smarty->assign('list', $var);
} }