当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render方法代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render怎么用?PHP Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 public function render(Varien_Object $row)
 {
     $columnName = $this->getColumn()->getName();
     $columnName = explode('_', $columnName);
     if ($columnName[1]) {
         $resource = Mage::getSingleton('core/resource');
         $readConnection = $resource->getConnection('core_read');
         $installer = Mage::getModel('core/resource');
         $warehouseId = $columnName[1];
         $purchase_order_id = $this->getRequest()->getParam('id');
         $sql = 'SELECT qty_delivery from ' . $installer->getTableName("erp_inventory_delivery_warehouse") . ' WHERE (purchase_order_id = ' . $purchase_order_id . ') AND (product_id = ' . $row->getProductId() . ') AND (warehouse_id = ' . $warehouseId . ') AND (sametime = ' . $row->getSametime() . ')';
         $results = $readConnection->fetchAll($sql);
         $haveDelivery = 0;
         foreach ($results as $result) {
             if ($result['qty_delivery']) {
                 $haveDelivery = 1;
                 echo $result['qty_delivery'];
             }
         }
         if ($haveDelivery == '0') {
             echo 0;
         }
     } else {
         parent::render($row);
     }
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:26,代码来源:Warehouse.php

示例2: render

 public function render(Varien_Object $row)
 {
     $customerId = $row->getId();
     $columnIndex = $this->getColumn()->getIndex() . "";
     $elementId = $columnIndex . $customerId;
     switch ($columnIndex) {
         case 'name':
             $columnIndexCode = 1;
             break;
         case 'email':
             $columnIndexCode = 2;
             break;
         case 'telephone':
             $columnIndexCode = 3;
             break;
         case 'customer_satisfaction_type':
             $columnIndexCode = 4;
             break;
     }
     $url = Mage::helper('adminhtml')->getUrl('*/*/updatefield', array('id' => $customerId, 'columnIndexCode' => $columnIndexCode));
     $html = '<div id="' . $elementId . '" style="min-height:20px;">';
     $html .= parent::render($row);
     $html .= '</div>';
     $html .= '<script type="text/javascript">new Ajax.InPlaceEditor("' . $elementId . '", "' . $url . '", {okText: "", cancelText:".....", highlightColor:"#6ADADA"});</script>';
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:26,代码来源:Inline.php

示例3: render

 public function render(Varien_Object $row)
 {
     if ($row->getData('total_inventory') > 0) {
         return parent::render($row);
     }
     return $this->__('0');
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:7,代码来源:Inventory.php

示例4: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $result = parent::render($row);
     $transaction = Mage::getModel('sagepaysuite2/sagepaysuite_transaction')->load($row->getId(), 'id');
     if ($transaction->getId()) {
         if ((string) Mage::getStoreConfig('payment/sagepaysuite/sync_mode') === 'sync') {
             //check date, if transaction is newer than 7 days check status otherwise just show
             $datetime1 = new DateTime($row->getCreatedAt());
             $datetime2 = new DateTime(Mage::getModel('core/date')->gmtDate(null, "-3 day"));
             $trn_state_id = $transaction->getTxStateId();
             if (empty($trn_state_id) && $datetime1 > $datetime2) {
                 $transaction->updateFromApi();
             }
         }
         $result = $transaction->getStatus();
         if (!is_null($transaction->getTxStateId())) {
             $states = $this->helper('sagepaysuite')->getTxStates();
             $result = '<img src="' . $this->_icon($transaction->getTxStateId()) . '" title="Transaction state: ' . $states["stateid_{$transaction->getTxStateId()}"] . '" />';
         }
         //Fraud
         $fraud = Mage::getModel('sagepayreporting/sagepayreporting_fraud')->loadByOrderId($row->getId());
         if (!is_null($fraud->getThirdmanScore())) {
             $title = $this->__("Fraud: %s. Score is: %s", $fraud->getThirdmanAction(), $fraud->getThirdmanScore());
             $result .= '&nbsp;&nbsp;<img src="' . $this->_fraudIcon($fraud->getThirdmanScore()) . '" title="' . $title . '" />';
         }
         //ReD
         $red = (string) $transaction->getRedFraudResponse();
         if (!empty($red)) {
             $redTitle = $this->__("ReD Status: %s.", $red);
             $result .= '&nbsp;&nbsp;<img src="' . $this->_redFraudIcon($fraud->getThirdmanScore()) . '" title="' . $redTitle . '" />';
         }
     }
     return $result;
 }
开发者ID:MadMaxAi,项目名称:sage-pay-suite-ce,代码行数:40,代码来源:State.php

示例5: render

 /**
  * Render a grid cell for displaying info with css styles
  *
  * @param Varien_Object $row
  *
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $html = parent::render($row);
     $severity = $row->getData('severity');
     $class = "aw-lib-cell-severity-" . $severity;
     return "<div class=" . $class . ">" . $html . "</div>";
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:14,代码来源:Notice.php

示例6: render

 public function render(Varien_Object $row)
 {
     $value = $row->getMemoryUsage();
     if ($value) {
         return number_format($row->getMemoryUsage(), 2) . ' MB';
     }
     return parent::render($row);
 }
开发者ID:aoepeople,项目名称:aoe_scheduler,代码行数:8,代码来源:Memory.php

示例7: render

 /**
  * @param Varien_Object $row
  *
  * @return mixed
  */
 public function render(Varien_Object $row)
 {
     if ($row->getCustomerId() && Mage::getSingleton('admin/session')->isAllowed('customer/manage')) {
         $customerEditUrl = $this->getUrl('*/customer/edit', array('id' => $row->getCustomerId()));
         return sprintf('<a href="%s">%s</a>', $customerEditUrl, parent::render($row));
     }
     return parent::render($row);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:13,代码来源:Customer.php

示例8: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $value = parent::render($row);
     $states = $this->helper('sagepaysuite')->getTxStates();
     if (isset($states["stateid_{$value}"])) {
         $value = $states["stateid_{$value}"];
     }
     return $value;
 }
开发者ID:MadMaxAi,项目名称:sage-pay-suite-ce,代码行数:15,代码来源:TxState.php

示例9: render

 public function render(Varien_Object $row)
 {
     $productId = $row->getProductId();
     $product = Mage::getModel('catalog/product')->load($productId);
     if (!$product->getId()) {
         return $row->getProductName() . '<br/><p class="item-msg error">* This product is not in stock!</p>';
     } else {
         return parent::render($row);
     }
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:10,代码来源:Product.php

示例10: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $result = parent::render($row);
     $customer = Mage::getModel('customer/customer')->load($row->getCustomerId());
     if ($customer->getId()) {
         $href = Mage::helper('adminhtml')->getUrl('adminhtml/customer/edit', array('id' => $customer->getId()));
         $result = '<a href="' . $href . '" target="_blank">' . $customer->getName() . '</a>';
     }
     return $result;
 }
开发者ID:MadMaxAi,项目名称:sage-pay-suite-ce,代码行数:16,代码来源:CustomerId.php

示例11: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $result = parent::render($row);
     $order = Mage::getModel('sales/order')->load($row->getOrderId());
     if ($order->getId()) {
         $href = Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view', array('order_id' => $order->getId()));
         $result = '<a href="' . $href . '" target="_blank">' . $order->getIncrementId() . '</a>';
     }
     return $result;
 }
开发者ID:MadMaxAi,项目名称:sage-pay-suite-ce,代码行数:16,代码来源:OrderId.php

示例12: render

 public function render(Varien_Object $row)
 {
     $columnName = $this->getColumn()->getName();
     $columnName = explode('_', $columnName);
     if ($columnName[1]) {
         $resource = Mage::getSingleton('core/resource');
         $readConnection = $resource->getConnection('core_read');
         $installer = Mage::getModel('core/resource');
         $warehouseId = $columnName[1];
         $purchase_order_id = $this->getRequest()->getParam('id');
         if ($row->getProductId()) {
             $producId = $row->getProductId();
         } else {
             $producId = $row->getEntityId();
         }
         $sql = 'SELECT `qty_order` from ' . $installer->getTableName("erp_inventory_purchase_order_product_warehouse") . ' WHERE (purchase_order_id = ' . $purchase_order_id . ') AND (product_id = ' . $producId . ') AND (warehouse_id = ' . $warehouseId . ')';
         $results = $readConnection->fetchAll($sql);
         if (count($results) > 0) {
             foreach ($results as $result) {
                 if (!array_key_exists('qty_order', $result) || array_key_exists('qty_order', $result) && !$result['qty_order']) {
                     $result['qty_order'] = 0;
                 }
                 if ($this->getColumn()->getEditable()) {
                     echo $result['qty_order'] . '<input name="warehouse_' . $warehouseId . '" class="input-text" type="text" value="' . $result['qty_order'] . '"/>';
                 } else {
                     echo $result['qty_order'];
                 }
             }
         } else {
             $result['qty_order'] = 0;
             if ($this->getColumn()->getEditable()) {
                 echo $result['qty_order'] . '<input name="warehouse_' . $warehouseId . '" class="input-text" type="text" value="' . $result['qty_order'] . '"/>';
             } else {
                 echo $result['qty_order'];
             }
         }
     } else {
         parent::render($row);
     }
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:40,代码来源:Warehouse.php

示例13: render

 public function render(Varien_Object $row)
 {
     $orderId = $row->getId();
     $columnIndex = $this->getColumn()->getIndex() . "";
     $elementId = $columnIndex . $orderId;
     switch ($columnIndex) {
         case 'warranty_date':
             $columnIndexCode = 1;
             break;
         case 'warranty_result':
             $columnIndexCode = 2;
             break;
         default:
             break;
     }
     $url = Mage::helper('adminhtml')->getUrl('inventorycustomeradmin/adminhtml_allcustomers/updateorder', array('order_id' => $orderId, 'columnIndexCode' => $columnIndexCode));
     $html = '<div id="' . $elementId . '" style="min-height:20px;">';
     $html .= parent::render($row);
     $html .= '</div>';
     $html .= '<script type="text/javascript">new Ajax.InPlaceEditor("' . $elementId . '", "' . $url . '", {okText: "", cancelText:".....", highlightColor:"#6ADADA"});</script>';
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:22,代码来源:Recentordersinline.php

示例14: render

 /**
  * Render minimal price for downloadable products
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $p_id = $row->getData($this->getColumn()->getIndex());
     /*
     $this_prod = Mage::getModel('catalog/product')->load($p_id);
     
     $ppkgSku = $this_prod->getPremiumPackagingSku();
     $ppkgId = Mage::getModel('catalog/product')->getIdBySku($ppkgSku);
     
     //print $ppkgSku.'======='.$ppkgId;die;
     if($ppkgId){
     	$pckProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', $ppkgSku);
     	$pckCategoryIds = $pckProduct->getCategoryIds();
     	$pckIsPremium = false;
     	
     	$pckIsPremium	=	Mage::getModel('packaging/packaging')->bool_isPremiumPackaging($pckCategoryIds);
     
     	$flag   = $this_prod->isConfigurable() ? true : false;
     	
     	//print $ppkgSku."===".$ppkgId;
     	
     	//if($flag && $ppkgId){
     	if($pckIsPremium){
     		//return '<span style="color:red;">'.$ppkgSku.'</span>';
     		//return '<input type="checkbox" class="checkbox" value="'.$ppkgSku.'" name="">';
     		
     		//return '<input type="checkbox" class="checkbox" id="pr_'.$p_id.'" value="'.$p_id.'_'.$ppkgId.'" name="ppkg">';
     		return '<input type="checkbox" disabled="disabled" class="checkbox" id="pr_'.$p_id.'" value="'.$ppkgId.'" name="ppkg">';
     	}else{
     		return '';
     	}
     }else{
     	return '';
     }
     */
     return parent::render($row);
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:43,代码来源:Pck.php

示例15: render

 /**
  * Render a grid cell for displaying info with css styles
  *
  * @param Varien_Object $row
  *
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $html = parent::render($row);
     return "<div class=" . self::CELL_CLASS . ">" . $html . "</div>";
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:12,代码来源:Content.php


注:本文中的Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。