本文整理汇总了PHP中Magento\CatalogInventory\Api\StockConfigurationInterface::getNotifyStockQty方法的典型用法代码示例。如果您正苦于以下问题:PHP StockConfigurationInterface::getNotifyStockQty方法的具体用法?PHP StockConfigurationInterface::getNotifyStockQty怎么用?PHP StockConfigurationInterface::getNotifyStockQty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\CatalogInventory\Api\StockConfigurationInterface
的用法示例。
在下文中一共展示了StockConfigurationInterface::getNotifyStockQty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: useNotifyStockQtyFilter
/**
* Add Notify Stock Qty Condition to collection
*
* @param null|int $storeId
* @return $this
*/
public function useNotifyStockQtyFilter($storeId = null)
{
$this->joinInventoryItem(['qty']);
$notifyStockExpr = $this->getConnection()->getCheckSql($this->_getInventoryItemField('use_config_notify_stock_qty') . ' = 1', (int) $this->stockConfiguration->getNotifyStockQty($storeId), $this->_getInventoryItemField('notify_stock_qty'));
$this->getSelect()->where($this->_getInventoryItemField('qty') . ' < ?', $notifyStockExpr);
return $this;
}
示例2: getNotifyStockQty
/**
* Retrieve Notify for Quantity Below data wrapper
*
* @return float
*/
public function getNotifyStockQty()
{
if ($this->getUseConfigNotifyStockQty()) {
return $this->stockConfiguration->getNotifyStockQty($this->getStoreId());
}
return (double) $this->getData(static::NOTIFY_STOCK_QTY);
}