Post by yorkshireboy » Wed Feb 08, 2017 3:54 am

I've got pp_express working on my site by deleting out the lines which related to options

Occasionally however I get the below error - anyone know how I fix this, or what it means?

Undefined variable: payment_address in web/catalog/controller/payment/pp_express.php on line 682

New member

Posts

Joined
Wed Oct 21, 2015 2:10 am
Location - UK

Post by thekrotek » Wed Feb 08, 2017 4:39 am

It means, that payment_address variable is missing from some array. You can simply try to ignore it, if it doesn't break anything for you.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by yorkshireboy » Wed Feb 08, 2017 5:30 am

This is the code from the file referenced:

Code: Select all

		foreach ($results as $result) {
			if ($this->config->get($result['code'] . '_status')) {
				$this->load->model('payment/' . $result['code']);

				$method = $this->{'model_payment_' . $result['code']}->getMethod($payment_address, $total);
A couple of lines before is this code - which I believe is where payment_address is defined

Code: Select all

if ($this->customer->isLogged() && isset($this->session->data['payment_address_id'])) {
			$this->load->model('account/address');
			$payment_address = $this->model_account_address->getAddress($this->session->data['payment_address_id']);
		} elseif (isset($this->session->data['guest'])) {
			$payment_address = $this->session->data['guest']['payment'];
I think this would explain why it only happens sometime - as if I'm understanding it correctly then the definition is linked to if the user is logged into their account.

Does this help - any further suggestions to help me follow this error through?

New member

Posts

Joined
Wed Oct 21, 2015 2:10 am
Location - UK

Post by yorkshireboy » Sat Feb 18, 2017 4:44 pm

Does anyone have instructions for how to use pp_express in OC2.0.3.1 without filling the error log everytime someone uses it?

Transactions process OK - just with errors being reported.

Errors are all undefined index or variables

All help appreacited

New member

Posts

Joined
Wed Oct 21, 2015 2:10 am
Location - UK
Who is online

Users browsing this forum: No registered users and 53 guests