Kryptronic Software Support Forum

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.

#1 09-13-2022 11:11:49

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706
Website

XMOD_PointOfSale.php error??

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 .= ')';


Rob

Online

 

#2 09-14-2022 08:03:27

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19794
Website

Re: XMOD_PointOfSale.php error??

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:

Code:

$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');

Nick Hendler

Offline

 

Board footer