Jump to content

{$product.description_short} dans le PDF invoice


Recommended Posts

Hello,

 

Petit soucis,  j'ai beau chercher,tester plusieurs solution mais rien y fait... :(  impossible de faire apparaitre {$order_detail.description_short|} ou {$product.description_short}  dans ma facture en pdf.

 

 

j'intègre dans invoice.product-tab.tpl juste en dessous {$order_detail.product_name}

 

-  {$product.description_short} rien y fait

-  {$order_detail.description_short} pareil

 

des conseils ? ai-je oublié quelque chose ?

 

merci d'avance.

 

 

Link to comment
Share on other sites

peux être car $order_detail.description_short n'existe pas => $order_detail.product_name,  mais le contenu court du produit n'est que sur l'object produit qui n'existe pas dans cette partie.

 

Il te faut mettre en place une override pour instancier l'object

Link to comment
Share on other sites

 c'est ce que je pensais aussi dans le fichier orderinvoice ?

 

 

 mais c'est la que je bloque à nouveau .... 

 

 

 

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.'
'.($this->id && $this->number ? ' AND od.`id_order_invoice` = '.(int)$this->id : '').' ORDER BY od.`product_name`');
    }
 
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...