File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ require dirname (__FILE__ ) . '/app/bootstrap.php ' ;
4
+ $ bootstrap = \Magento \Framework \App \Bootstrap::create (BP , $ _SERVER );
5
+
6
+ class Outslide extends \Magento \Framework \App \Http
7
+ implements \Magento \Framework \AppInterface {
8
+ public function launch ()
9
+ {
10
+ $ appState = $ this ->_objectManager ->get ('Magento\Framework\App\State ' );
11
+ $ appState ->setAreaCode ('frontend ' );
12
+ $ stockState = $ this ->_objectManager ->get ('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku ' );
13
+ $ productSku = 'WT09 ' ;
14
+ $ qty = $ stockState ->execute ($ productSku );
15
+
16
+ echo 'Qty: ' . $ qty [0 ]['qty ' ];
17
+
18
+ return $ this ->_response ;
19
+ }
20
+ }
21
+
22
+ /** @var \Magento\Framework\App\Http $app */
23
+ $ app = $ bootstrap ->createApplication ('Outslide ' );
24
+ $ bootstrap ->run ($ app );
You can’t perform that action at this time.
0 commit comments