Skip to content

Commit 02a19d1

Browse files
committed
Show phone if defined only
1 parent 7d3c0a2 commit 02a19d1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

myaccount/tpl/mycustomerinstances.tpl.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@
251251
// Customer (link to login on customer dashboard)
252252
print '<span class="opacitymedium">'.$langs->trans("Customer").' : </span>'.$tmpcustomer->name;
253253
print ' &nbsp; - &nbsp; '.dol_print_email($tmpcustomer->email, 0, 0, 1, 0, 1, 1);
254-
print ' &nbsp; - &nbsp; '.dol_print_phone($tmpcustomer->phone, $tmpcustomer->country_code, 0, $tmpcustomer->id, '', '&nbsp;', 'phone');
254+
if ($tmpcustomer->phone) {
255+
print ' &nbsp; - &nbsp; '.dol_print_phone($tmpcustomer->phone, $tmpcustomer->country_code, 0, $tmpcustomer->id, '', '&nbsp;', 'phone');
256+
}
255257
// Add link to login to dashboard with customer account
256258
/*
257259
$dol_login_hash = dol_hash(getDolGlobalString('SELLYOURSAAS_KEYFORHASH') . $tmpcustomer->email.dol_print_date(dol_now(), 'dayrfc'), 5); // hash is valid one hour

myaccount/tpl/mymodulecustomerinstances.tpl.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@
255255
// Customer (link to login on customer dashboard)
256256
print '<span class="opacitymedium">'.$langs->trans("Customer").' : </span>'.$tmpcustomer->name;
257257
print ' &nbsp; - &nbsp; '.dol_print_email($tmpcustomer->email, 0, 0, 1, 0, 1, 1);
258-
print ' &nbsp; - &nbsp; '.dol_print_phone($tmpcustomer->phone, $tmpcustomer->country_code, 0, $tmpcustomer->id, '', '&nbsp;', 'phone');
258+
if ($tmpcustomer->phone) {
259+
print ' &nbsp; - &nbsp; '.dol_print_phone($tmpcustomer->phone, $tmpcustomer->country_code, 0, $tmpcustomer->id, '', '&nbsp;', 'phone');
260+
}
259261
print '<br>';
260262

261263
// URL

0 commit comments

Comments
 (0)