Rajoutez ce code dans un fichier override/classes/order/OrderInvoice.php :
<?php
class OrderInvoice extends OrderInvoiceCore
{
public function getProductsDetail()
{
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
(new DbQuery())
->select('*')
->from('order_detail', 'od')
->leftJoin('product', 'p', 'p.id_product = od.product_id')
->leftJoin('product_shop', 'ps', 'ps.id_product = p.id_product AND ps.id_shop = od.id_shop')
->leftJoin('product_lang', 'pl', 'pl.id_product = p.id_product AND pl.id_lang = '.Context::getContext()->language->id)
->where(
'od.id_order = '.(int)$this->id_order.
($this->id && $this->number ? ' AND od.`id_order_invoice` = '.(int)$this->id : '')
)
->orderBy('od.product_name')
);
}
}
?>
Puis dans pdf/invoice.product-tap.tpl
Remplacer:
{else}
{$order_detail.product_name}
{/if}
par:
{else}
{$order_detail.product_name}
{strip}
{$order_detail.description_short}
{/strip}
{/if}
BIEN PENSER A VIDER LE CACHE ou supprimer fichier cache/class_index.php si il existe
Édité 1 fois - Dernière édition: 25/04/2021 à 20:29 Par Limporia.