Hi,
First of all, thanks a lot for the PDF invoice plugin — it's been really helpful in my projects.
While customising the invoice template for one of my clients, I noticed something small that you might want to look into when you have a moment. The store address from the HikaShop configuration is printed on a single line in the generated PDF, even though the address in the config contains line breaks. Ideally those line breaks would show up on the invoice as well.
Looking at the code with AI in plugins/hikashop/attachinvoice/attachinvoice/invoice.php (around line 134), I think it might be related to this line:
$store = str_replace(array('\r\n','\n','\r'),array('<br/>','<br/>','<br/>'),$config->get('store_address',''));
If I'm reading it correctly (read AI
, the search strings are wrapped in single quotes, which in PHP means the \r and \n are interpreted as literal characters (backslash + letter) rather than actual newline characters. Since the address in the config contains real newlines, the replacement doesn't find a match.