File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1414use Magento \Framework \Exception \LocalizedException ;
1515use Magento \Framework \Json \Helper \Data ;
1616use Psr \Log \LoggerInterface ;
17+ use Magento \Framework \App \Action \HttpPostActionInterface ;
1718
18- class UpdateItemQty extends Action
19+ class UpdateItemQty extends Action implements HttpPostActionInterface
1920{
2021 /**
2122 * @var Sidebar
@@ -62,14 +63,9 @@ public function __construct(
6263
6364 /**
6465 * @return $this
65- * @throws LocalizedException
6666 */
6767 public function execute ()
6868 {
69- if (!$ this ->getRequest ()->isPost ()) {
70- throw new LocalizedException (__ ('Wrong request. ' ));
71- }
72-
7369 $ itemId = (int )$ this ->getRequest ()->getParam ('item_id ' );
7470 $ itemQty = (float )$ this ->getRequest ()->getParam ('item_qty ' ) * 1 ;
7571 $ itemQty = $ this ->quantityProcessor ->prepareQuantity ($ itemQty );
You can’t perform that action at this time.
0 commit comments