Created
March 23, 2020 13:56
-
-
Save Hotfirenet/d51fc066329869ec17b3c033cd347794 to your computer and use it in GitHub Desktop.
Article HFN - Classer par marque et référence les produits dans le BL et la facture Prestashop - https://hotfirenet.com/blog/2689-classer-par-marque-et-reference-les-produits-dans-le-bl-et-la-facture-prestasop/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OrderInvoice extends OrderInvoiceCore { | |
public function getProductsDetail() { | |
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT od.*, p.*, ps.* | |
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) | |
LEFT JOIN `ps_manufacturer` m ON m.`id_manufacturer`= p.`id_manufacturer` | |
WHERE od.`id_order` = '.(int)$this->id_order.' | |
AND od.`id_order_invoice` = '.(int)$this->id .' | |
ORDER BY m.name, p.reference'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment