本文整理汇总了PHP中Magento\Quote\Model\Quote\Item::hasCustomPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::hasCustomPrice方法的具体用法?PHP Item::hasCustomPrice怎么用?PHP Item::hasCustomPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Quote\Model\Quote\Item
的用法示例。
在下文中一共展示了Item::hasCustomPrice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: usedCustomPriceForItem
/**
* Define if specified item has already applied custom price
*
* @param Item $item
* @return bool
*/
public function usedCustomPriceForItem($item)
{
return $item->hasCustomPrice();
}
示例2: addQuoteItem
/**
* Push `addEcommerceItem' with quote item data to given tracker
*
* @param \Magento\Quote\Model\Quote\Item $item
* @param \Henhed\Piwik\Model\Tracker $tracker
* @return \Henhed\Piwik\Helper\Tracker
*/
public function addQuoteItem(Quote\Item $item, TrackerModel $tracker)
{
$tracker->addEcommerceItem($item->getSku(), $item->getName(), false, $item->hasCustomPrice() ? (double) $item->getCustomPrice() : (double) $item->getPriceInclTax(), (double) $item->getQty());
return $this;
}