Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gateway/Request/BasicParameter/ClientIPDataBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress;
use Magento\Payment\Gateway\Request\BuilderInterface;
use Magento\Sales\Model\Order;
use Zend\Stdlib\ParametersInterface;

class ClientIPDataBuilder implements BuilderInterface
{
Expand Down
9 changes: 5 additions & 4 deletions Model/Service/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory;
use Buckaroo\Magento2\Helper\Data;
use Magento\Framework\App\ResourceConnection;
use Laminas\Db\Sql\Expression;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Expand Down Expand Up @@ -158,11 +159,11 @@ protected function cancelExpiredTransferOrdersPerStore(StoreInterface $store)
)
->addFieldToFilter(
'created_at',
['lt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . $dueDays . ' DAY')]
['lt' => new Expression('NOW() - INTERVAL ' . $dueDays . ' DAY')]
)
->addFieldToFilter(
'created_at',
['gt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
['gt' => new Expression('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
);

$orderCollection->getSelect()
Expand Down Expand Up @@ -238,11 +239,11 @@ protected function cancelExpiredPPEOrdersPerStore(StoreInterface $store)
)
->addFieldToFilter(
'created_at',
['lt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . $dueDays . ' DAY')]
['lt' => new Expression('NOW() - INTERVAL ' . $dueDays . ' DAY')]
)
->addFieldToFilter(
'created_at',
['gt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
['gt' => new Expression('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
);

$orderCollection->getSelect()
Expand Down
5 changes: 3 additions & 2 deletions Ui/Component/Listing/Column/Method/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Magento\Framework\App\ResourceConnection;
use Magento\Payment\Helper\Data;
use Zend_Db_Statement_Exception;
use Laminas\Db\Sql\Expression;

class Filter extends \Magento\Payment\Ui\Component\Listing\Column\Method\Options
{
Expand Down Expand Up @@ -81,8 +82,8 @@ public function toOptionArray(): array
->joinInner(
['bmgc' => $giftcardTable],
'bmgc.servicecode = bmg.servicecode',
['giftcard_codes' => new \Zend_Db_Expr('GROUP_CONCAT(DISTINCT ' . $connection->quoteIdentifier('bmgc.servicecode') . ' SEPARATOR "-")'),
'giftcard_titles' => new \Zend_Db_Expr('GROUP_CONCAT(DISTINCT ' . $connection->quoteIdentifier('bmgc.label') . ' SEPARATOR "-")')]
['giftcard_codes' => new Expression('GROUP_CONCAT(DISTINCT ' . $connection->quoteIdentifier('bmgc.servicecode') . ' SEPARATOR "-")'),
'giftcard_titles' => new Expression('GROUP_CONCAT(DISTINCT ' . $connection->quoteIdentifier('bmgc.label') . ' SEPARATOR "-")')]
)
->group('bmg.order_id');

Expand Down
3 changes: 2 additions & 1 deletion Ui/Component/Listing/Column/Method/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory as OrderCollectionFactory;
use Laminas\Db\Sql\Expression;


class Options extends Column
Expand Down Expand Up @@ -105,7 +106,7 @@ private function getGroupTransactionData(array $incrementIds): array
[]
)
->columns([
'giftcard_codes' => new \Zend_Db_Expr("GROUP_CONCAT(DISTINCT group_transaction.servicecode SEPARATOR '-')")
'giftcard_codes' => new Expression("GROUP_CONCAT(DISTINCT group_transaction.servicecode SEPARATOR '-')")
])
->where('order.increment_id IN (?)', $incrementIds)
->group('order.increment_id');
Expand Down
Loading