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