Post by straightlight » Sat Oct 14, 2017 8:50 am

For users using the PayPal Express or the SagePay direct payment module, there is a called method being initiated from those two files:

Code: Select all

catalog/controller/extension/payment/pp_express.php
catalog/model/extension/payment/sagepay_direct.php

Code: Select all

$this->model_checkout_recurring->addReference
However, the addReference method does not exist in the catalog/model/checkout/recurring.php file,

find:

Code: Select all

public function editReference($order_recurring_id, $reference) {
		$this->db->query("UPDATE " . DB_PREFIX . "order_recurring SET reference = '" . $this->db->escape($reference) . "' WHERE order_recurring_id = '" . (int)$order_recurring_id . "'");

		if ($this->db->countAffected() > 0) {
			return true;
		} else {
			return false;
		}
	}
which I presume would need the following to be added below:

Code: Select all

public function addReference($order_recurring_id, $reference) {
		$this->db->query("REPLACE INTO `" . DB_PREFIX . "order_recurring` SET `reference` = '" . $this->db->escape($reference) . "', `order_recurring_id` = '" . (int)$order_recurring_id . "', `date_added` = NOW()");
	}
Note: In this particular case, the date_modified field does not exist in the database in the order_recurring table which means the date_added would need to be re-affected for ... an unknown reason and until the date_modified field actually exist in a future release.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 161 guests