Jump to content

Short Description in Invoice


Cravenkiss

Recommended Posts

Hi,

My prestashop version is 1.6.1.5 and we are trying to insert short description in our invoice. We tried this code but it ain't working at all. Is there a module or a way to add the short description please?

 

pdf/invoice.tpl:
change :
<td style="text-align: left; width: 45%">{$order_detail.product_name}</td>
to
<td style="text-align: left; width: 45%">{$order_detail.product_name}  - {$order_detail.description_short}</td>
 
classes/order/OrderInvoice.php:
change:
        public function getProductsDetail()
        {
                return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
                SELECT *
                FROM `'._DB_PREFIX_.'order_detail` od
                LEFT JOIN `'._DB_PREFIX_.'product` p
                ON p.id_product = od.product_id
                LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop)
                WHERE od.`id_order` = '.(int)$this->id_order.'
                AND od.`id_order_invoice` = '.(int)$this->id);
        }
 
to:
 
        public function getProductsDetail()
        {
                return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
                SELECT *
                FROM `'._DB_PREFIX_.'order_detail` od
                LEFT JOIN `'._DB_PREFIX_.'product` p
                ON p.id_product = od.product_id
                LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
                ON pl.id_product = od.product_id
                LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop)
                WHERE od.`id_order` = '.(int)$this->id_order.'
                AND od.`id_order_invoice` = '.(int)$this->id);
        }

Thank you.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...