Skip to content

Commit

Permalink
Merge pull request #94 from PierreRambaud/fix/pdf
Browse files Browse the repository at this point in the history
Fix pdf generation bug
  • Loading branch information
PierreRambaud authored Jul 15, 2020
2 parents c4834ac + a4f6394 commit a32fbb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion classes/HTMLTemplatePSGDPRModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,19 @@ public function getFooter()
*/
public function getContent()
{
// Generate smarty data
$this->smarty->assign([
'customerInfo' => $this->personalData['prestashopData']['customerInfo'],
'addresses' => $this->personalData['prestashopData']['addresses'],
'orders' => $this->personalData['prestashopData']['orders'],
'carts' => $this->personalData['prestashopData']['carts'],
'messages' => $this->personalData['prestashopData']['messages'],
'connections' => $this->personalData['prestashopData']['connections'],
'modules' => $this->personalData['modulesData'],
'modules' => $this->personalData['modulesData']
]);

// Generate templates after, to be able to reuse data above
$this->smarty->assign([
'style_tab' => $this->smarty->fetch($this->getGDPRTemplate('personalData.style-tab')),
'generalInfo_tab' => $this->smarty->fetch($this->getGDPRTemplate('personalData.generalInfo-tab')),
'orders_tab' => $this->smarty->fetch($this->getGDPRTemplate('personalData.orders-tab')),
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/AdminAjaxPsgdprController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function ajaxProcessDownloadInvoicesByCustomer()
{
$id_customer = Tools::getValue('id_customer');

$order_invoice_list = (int) Db::getInstance()->executeS('SELECT COUNT(*)
$order_invoice_list = (int) Db::getInstance()->getValue('SELECT COUNT(1)
FROM `' . _DB_PREFIX_ . 'order_invoice` oi
LEFT JOIN `' . _DB_PREFIX_ . 'orders` o ON (o.`id_order` = oi.`id_order`)
WHERE o.id_customer =' . (int) $id_customer . '
Expand Down

0 comments on commit a32fbb7

Please sign in to comment.