Skip to content

Commit 5a648c2

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-3233: Admin can still place order even without payment method
1 parent 41f6f32 commit 5a648c2

File tree

2 files changed

+9
-5
lines changed
  • app/code/Magento/Sales
    • Controller/Adminhtml/Order/Create
    • view/adminhtml/templates/order/create/billing/method

2 files changed

+9
-5
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ public function execute()
4545
$this->_getOrderCreateModel()->setPaymentData($paymentData);
4646
$this->_getOrderCreateModel()->getQuote()->getPayment()->addData($paymentData);
4747
}
48-
elseif ($this->getRequest()->isPost()) {
49-
$paymentData = array('method' => '');
50-
$this->_getOrderCreateModel()->getQuote()->getPayment()->addData($paymentData);
51-
}
5248

5349
$order = $this->_getOrderCreateModel()
5450
->setIsValidate(true)

app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,13 @@ script;
9292
<?= /* @noEscape */
9393
$secureRenderer->renderTag('script', [], $scriptString, false) ?>
9494
<?php else: ?>
95-
<div class="admin__message-empty"><?= $escaper->escapeHtml(__('No Payment Methods')); ?></div>
95+
<div class="admin__message-empty"><?= $escaper->escapeHtml(__('No Payment Methods')); ?>
96+
<span class="no-display">
97+
<input id="p_method"
98+
value=""
99+
type="text"
100+
name="payment[method]" class="admin__control-radio"
101+
checked="checked"/>
102+
</span>
103+
</div>
96104
<?php endif; ?>

0 commit comments

Comments
 (0)