From 22352d1443a96ab3e5d8b07086e57b934e3c1b2b Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 4 Jun 2013 10:58:41 +0200 Subject: [PATCH] [-] BO : Fix bug #PNM-788 Loyalty points in adminCustomers when only one order --- modules/loyalty/loyalty.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/loyalty/loyalty.php b/modules/loyalty/loyalty.php index 1c276252b..8d63cf678 100644 --- a/modules/loyalty/loyalty.php +++ b/modules/loyalty/loyalty.php @@ -601,7 +601,7 @@ class Loyalty extends Module $html = '

'.sprintf($this->l('Loyalty points (%d points)'), $points).'

'; - if (!$points) + if (!isset($points) || count($details) == 0) return $html.' '.$this->l('This customer has no points'); $html .= ' @@ -619,7 +619,7 @@ class Loyalty extends Module $html .= ' '.((int)$loyalty['id'] > 0 ? ''.sprintf($this->l('#%d'), $loyalty['id']).'' : '--').' - '.Tools::displayDate($loyalty['date'], (int)$params['cookie']->id_lang).' + '.Tools::displayDate($loyalty['date']).' '.((int)$loyalty['id'] > 0 ? $loyalty['total_without_shipping'] : '--').' '.(int)$loyalty['points'].' '.$loyalty['state'].' @@ -671,4 +671,4 @@ class Loyalty extends Module return (array_key_exists($key, $translations)) ? $translations[$key] : $key; } -} +} \ No newline at end of file