-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2.12
-- Browser(s) name and version -- : Firefox 65.0b5
Hello,
I have configured the pdf invoice plugin to send the invoice with confirmation email. It works well but I have an issue :
I need to display a customer number in the ivoice. This number is made of 2 fields :
- custom field I called user type that has 2 possible values
- the hikashop user id
I manage to make it work when I request the invoice from the backend (click on invoice in order administration) But it doesn't work when the invoice is sent by mail and returns 000000
This is the code I user to display the number in attachinvoice/attachinvoice/invoice.php :
<?php
$user = hikashop_loadUser(true);
$userType = $user->user_type;
$userHikashopId = $user->user_id;
$codeClient = $userType . str_pad($userHikashopId, 6, '0', STR_PAD_LEFT);
?>
<br/>
Code client : <?php echo $codeClient; ?>
I suppose I can't use hikashop_loadUser(true) at that point so how can I get the info to build my customer number?