You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi Nick
Correct me if I am wrong, but is there a coding error in XMOD_PointOfSale.php.
I have checked the latest 9.2 version.
around line 180
$paypalcpactive = $this->globals('core_settings.ecom.paypalcpactive');
$sql = 'SELECT id FROM ecom_gateway WHERE active=' . $this->CORE_DB->quote(1) . ' AND (id=' . $this->CORE_DB->quote('stripe');
if (!(empty($paypalcpactive))) {$sql .= ' OR id=' . $this->CORE_DB->quote('paypalcp') . ')';}
I don't think the AND is being closed unless $paypalcpactive isn't empty.
Shouldn't it be
$paypalcpactive = $this->globals('core_settings.ecom.paypalcpactive');
$sql = 'SELECT id FROM ecom_gateway WHERE active=' . $this->CORE_DB->quote(1) . ' AND (id=' . $this->CORE_DB->quote('stripe');
if (!(empty($paypalcpactive))) {$sql .= ' OR id=' . $this->CORE_DB->quote('paypalcp');}
$sql .= ')';
Offline
You are correct - that needs to be fixed. Would cause an issue if paypalcp is inactive and stripe is active (stripe would not load correcting for POS orders). Update forthcoming. Thank you. Implemented as:
$sql = 'SELECT id FROM ecom_gateway WHERE active=' . $this->CORE_DB->quote(1) . ' AND (id=' . $this->CORE_DB->quote('stripe'); if (!(empty($paypalcpactive))) {$sql .= ' OR id=' . $this->CORE_DB->quote('paypalcp');} $sql .= ') AND urltype=' . $this->CORE_DB->quote('I');
Offline