本文整理汇总了PHP中Mage_Core_Model_Mysql4_Collection_Abstract::addItem方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Mysql4_Collection_Abstract::addItem方法的具体用法?PHP Mage_Core_Model_Mysql4_Collection_Abstract::addItem怎么用?PHP Mage_Core_Model_Mysql4_Collection_Abstract::addItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Mysql4_Collection_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Mysql4_Collection_Abstract::addItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addItem
/**
* Don't add item to the collection if only fixed are allowed and its carrier is not fixed
*
* @param Mage_Sales_Model_Quote_Address_Rate $rate
* @return Mage_Sales_Model_Mysql4_Quote_Address_Rate_Collection;
*/
public function addItem(Varien_Object $rate)
{
if ($this->_allowFixedOnly && (!$rate->getCarrierInstance() || !$rate->getCarrierInstance()->isFixed())) {
return $this;
}
return parent::addItem($rate);
}
示例2: addItem
public function addItem(Varien_Object $item)
{
/** @var $item Payone_Core_Model_Domain_Config_PaymentMethod */
$item->afterLoadPrepareData();
return parent::addItem($item);
}
示例3: addItem
/**
* Overload default addItem method to set environment for the rules
*
* @param Mage_Rule_Model_Abstract $rule
* @return Mage_Rule_Model_Mysql4_Rule_Collection
*/
public function addItem(Varien_Object $rule)
{
$rule->setEnv($this->getEnv())->setIsCollectionValidated(true);
parent::addItem($rule);
return $this;
}
示例4: addItem
public function addItem(Varien_Object $item)
{
$item->setStoreIds(explode(',', $item->getStoreIds()));
return parent::addItem($item);
}