[v3.0.2.0 - Fix] - model/checkout/recurring.php file - addReference method not found
Posted: 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:
However, the addReference method does not exist in the catalog/model/checkout/recurring.php file,
find:
which I presume would need the following to be added below:
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.
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
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;
}
}
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()");
}