PRammer Posted January 29, 2015 Share Posted January 29, 2015 Здравствуйте! Подскажите, как можно удалить атрибуты из письма об успешном оформлении заказа, которое приходит на почту, если в шаблоне, стоит только переменная - {products} Сам шаблон письма Что приходит на почту Версия PrestaShop 1.5.6.0 Пожалуйста, подскажите, где "копать"? Link to comment Share on other sites More sharing options...
Kerm Posted January 29, 2015 Share Posted January 29, 2015 classes\PaymentModule.phpИщи слово $products_list .= Там мод ним должен идти html код. Там нужно убрать это: .(isset($product['attributes']) ? ' - '.$product['attributes'] : '') 1 Link to comment Share on other sites More sharing options...
PRammer Posted January 30, 2015 Author Share Posted January 30, 2015 classes\PaymentModule.php Ищи слово $products_list .= Там мод ним должен идти html код. Там нужно убрать это: .(isset($product['attributes']) ? ' - '.$product['attributes'] : '') Большое Вам спасибо!!! И так... Более детально Было так: $products_list .= '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding: 0.6em 0.4em;width: 15%;">'.$product['reference'].'</td> <td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').' - '.Tools::displayError('Customized').(!empty($customization_text) ? ' - '.$customization_text : '').'</strong></td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td> <td style="padding: 0.6em 0.4em; width: 15%;">'.$customization_quantity.'</td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice($customization_quantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td> </tr>'; } if (!$customization_quantity || (int)$product['cart_quantity'] > $customization_quantity) $products_list .= '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding: 0.6em 0.4em;width: 15%;">'.$product['reference'].'</td> <td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</strong></td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(Product::getTaxCalculationMethod((int)$this->context->customer->id) == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td> <td style="padding: 0.6em 0.4em; width: 15%;">'.((int)$product['cart_quantity'] - $customization_quantity).'</td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(((int)$product['cart_quantity'] - $customization_quantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td> </tr>'; Сделал так: $products_list .= '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding: 0.6em 0.4em;width: 15%;">'.$product['reference'].'</td> <td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].' - '.Tools::displayError('Customized').(!empty($customization_text) ? ' - '.$customization_text : '').'</strong></td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td> <td style="padding: 0.6em 0.4em; width: 15%;">'.$customization_quantity.'</td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice($customization_quantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td> </tr>'; } if (!$customization_quantity || (int)$product['cart_quantity'] > $customization_quantity) $products_list .= '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding: 0.6em 0.4em;width: 15%;">'.$product['reference'].'</td> <td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].'</strong></td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(Product::getTaxCalculationMethod((int)$this->context->customer->id) == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td> <td style="padding: 0.6em 0.4em; width: 15%;">'.((int)$product['cart_quantity'] - $customization_quantity).'</td> <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(((int)$product['cart_quantity'] - $customization_quantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td> </tr>'; Тему можно закрывать! Link to comment Share on other sites More sharing options...
optokuppler Posted January 30, 2015 Share Posted January 30, 2015 такие ответы закреплять в топах нужно, много кому пригодится Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now