customer comments variable in order.php

Phoca Cart - complex e-commerce extension
unclepips
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 15 Feb 2021, 15:43

customer comments variable in order.php

Post 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.

Tags:
jpeters
Phoca Professional
Phoca Professional
Posts: 225
Joined: 31 Dec 2020, 09:46

Re: customer comments variable in order.php

Post 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
unclepips
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 15 Feb 2021, 15:43

Re: customer comments variable in order.php

Post by unclepips »

Thank you JPeters :-) that has solved my issue!

Thanks again,
Phil.
Post Reply