本文整理汇总了PHP中Mage_Sales_Model_Quote_Item::getData方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote_Item::getData方法的具体用法?PHP Mage_Sales_Model_Quote_Item::getData怎么用?PHP Mage_Sales_Model_Quote_Item::getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote_Item
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote_Item::getData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getItemHtml
public function getItemHtml(Mage_Sales_Model_Quote_Item $item)
{
if ($item instanceof Unirgy_DropshipSplit_Model_Cart_Vendor) {
$blockName = "vendor_{$item->getVendor()->getId()}_{$item->getPart()}";
return $this->getLayout()->createBlock('udsplit/cart_vendor', $blockName)->addData($item->getData())->setQuote($item->getQuote1())->toHtml();
}
$renderer = $this->getItemRenderer($item->getProductType())->setItem($item);
return $renderer->toHtml();
}
示例2: _getQtyByItem
protected function _getQtyByItem(Mage_Sales_Model_Quote_Item $item)
{
$item_list = $item->getData();
$qty = $item_list['qty'];
/*
$id=$item_list['product_id'];
$model=Mage::getModel('dailydeals/dailydeals');
$collectiondeal=Mage::getModel('dailydeals/dailydeals')->getCollection()->addFieldToFilter('related_product',$id)->getData();
if(!empty($collectiondeal)){
$deal_qty=$collectiondeal[0]['deal_qty'];
$deal_id=$collectiondeal[0]['dailydeals_id'];
$remaining_qty=$deal_qty-$qty;
$deal_id=$collectiondeal[0]['dailydeals_id'];
$data['qty_sold']=$qty;
$data['remaining_qty']=$remaining_qty;
$model->setData($data)->setId($deal_id);
$model->save();
return $remaining_qty;
}*/
return $qty;
}
示例3: unstashLineItemData
/**
* @param Mage_Sales_Model_Quote_Item $lineItem
* @param Vbw_Punchout_Model_Sales_Stash $stash
* @param Mage_Checkout_Model_Cart $cartObj
* @param $options
*/
public function unstashLineItemData($lineItem, $stash, $cartObj, $options)
{
$customData = Mage::getStoreConfig('vbw_punchout/order/stash_item_list');
$customData = unserialize($customData);
if (!empty($customData)) {
foreach ($customData as $datum) {
$info = $stash->stash($datum['key']);
if (!empty($info) || is_numeric($info)) {
if (preg_match('/^([^\\/]+)\\/([^\\/]+)$/', $datum['key'], $s)) {
$src = $s[1];
$code = $s[2];
switch ($src) {
case "option":
$option = array('code' => $code, 'value' => $info);
$lineItem->addOption($option);
}
} else {
$lineItem->setData($datum['key'], $info);
}
}
}
}
Mage::dispatchEvent('punchout_cart_item_unstash', array('stash_item' => $stash, 'item' => $lineItem, 'cart' => $cartObj, 'options' => $options));
Mage::helper('vbw_punchout')->debug('unstash item ' . print_r(Mage::helper('vbw_punchout/debug')->debugData($lineItem->getData()), true));
}