Thank you for the replies but I am still going in circles....
Since copying the cod files could cause issues and I am on my test environment I put the changes into the original COD file. Same result.
BTW the test environment works in every way just trying to do this doesn't work.
In the cod.php controller file I put in both:
Code: Select all
$this->session->data['displaycustcode'] = 'H085aJG7Hrqj29';
$data['displaycustcode'] = 'H085aJG7Hrqj29';
Then in the cod.tpl I echo out:
Code: Select all
<?php
echo $this->session->data['displaycustcode'] . 'session';
echo $displaycustcode ;
?>
The first one only shows "session" with errors in the log of
Undefined property: Template\PHP::$session in /catalog/view/theme/default/template/extension/payment/cod.tpl on line 4
Trying to get property 'data' of non-object in /catalog/view/theme/default/template/extension/payment/cod.tpl on line 4
Trying to access array offset on value of type null in /catalog/view/theme/default/template/extension/payment/cod.tpl on line 4
The echo $displaycustcode shows the H085aJG7Hrqj29.
One more shoot for this attempt I put into the cod.tpl file:
Code: Select all
var_dump($this->data);
var_dump($this->session->data);
The $this->data dumps all the variables
the $this->session->data gives me NULL
So it is a defined and understood variable but not in the session???
BTW I also did the $this->session->data in the live store and it also is null. This can't be as the live store has orders process and has proper display on the success page.
So confused.....
Mike