Page 1 of 1

customer comments variable in order.php

Posted: 27 Feb 2021, 00:19
by unclepips
Hi,

I am wanting to add the customer comments entry to the PDF invoice.

I have looked in to this, and know the variable {customercomment} can be added to the email.

Searching the forum, gets me to an article from 6th June 2018 (viewtopic.php?f=44&t=58956&p=151764) where Jan replied that this could be found in order.php using the variable $d['comment'] = $data['phcomment'];

I have tried using this in my modified order.php code, but it results in a blank string.

I have tried various combinations of variables, but all are resulting in nothing showing.

$customercomment = $d['params']->get( 'customercomment', '' );
$customercomment = $d['common']->customercomment;
$customercomment = $data['phcomment'];
$customercomment = $data['customercomment'];
$customercomment = $data['phcustomercomment'];
$customercomment = $d['phcomment'];

so I am going to have to admit defeat and ask.......

Thanks,
Phil.

Re: customer comments variable in order.php

Posted: 28 Feb 2021, 09:10
by jpeters
in stead of modify the php files why not simple use the options available in phoca cart.
in the billing section of phoca cart options you can arrange it simple and without php codes, overrides etc..
you have 3 options to place text. in the articles create you can use the {customercomment} for example

Invoice Global Top Description

Invoice Global Middle Description

Invoice Global Bottom Description

Re: customer comments variable in order.php

Posted: 01 Mar 2021, 18:35
by unclepips
Thank you JPeters :-) that has solved my issue!

Thanks again,
Phil.