modules/acm_sku/src/StockManager.php
public function getStockQuantity(string $sku) {
    $stock = $this->getStock($sku);

    if (empty($stock['status'])) {
      return 0;
    }

    // @TODO: For now there is no scenario in which we have quantity in float.
    // We have kept the database field to match what is there in MDC and code
    // can be updated later to match that. Casting it to int for now.
    return (int) $stock['quantity'];
  }
public function getStockQuantity(string $sku) {
    $stock = $this->getStock($sku);

    if (empty($stock['status'])) {
      return 0;
    }

    // @TODO: For now there is no scenario in which we have quantity in float.
    // We have kept the database field to match what is there in MDC and code
    // can be updated later to match that. Casting it to int for now.
    return (int) $stock['quantity'];
  }
public function getStockQuantity ( string $ sku ) { $ stock = $ this -> getStock ( $ sku ) ; if ( empty ( $ stock [ 'status' ] ) ) { return 0 ; } // @TODO: For now there is no scenario in which we have quantity in float. // We have kept the database field to match what is there in MDC and code // can be updated later to match that. Casting it to int for now. return ( int ) $ stock [ 'quantity' ] ; }
Get stock quantity.

@param string $sku
SKU string.

@return int
Quantity, 0 if status flag is set to false.
Get stock quantity .