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 14
14
use Magento \Framework \Exception \LocalizedException ;
15
15
use Magento \Framework \Json \Helper \Data ;
16
16
use Psr \Log \LoggerInterface ;
17
+ use Magento \Framework \App \Action \HttpPostActionInterface ;
17
18
18
- class UpdateItemQty extends Action
19
+ class UpdateItemQty extends Action implements HttpPostActionInterface
19
20
{
20
21
/**
21
22
* @var Sidebar
@@ -62,14 +63,9 @@ public function __construct(
62
63
63
64
/**
64
65
* @return $this
65
- * @throws LocalizedException
66
66
*/
67
67
public function execute ()
68
68
{
69
- if (!$ this ->getRequest ()->isPost ()) {
70
- throw new LocalizedException (__ ('Wrong request. ' ));
71
- }
72
-
73
69
$ itemId = (int )$ this ->getRequest ()->getParam ('item_id ' );
74
70
$ itemQty = (float )$ this ->getRequest ()->getParam ('item_qty ' ) * 1 ;
75
71
$ itemQty = $ this ->quantityProcessor ->prepareQuantity ($ itemQty );
You can’t perform that action at this time.
0 commit comments