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


PHP Varien_Object::getEntityId方法代码示例

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


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

示例1: render

 public function render(Varien_Object $row)
 {
     $html = '';
     $orderId = $row->getEntityId();
     $order = Mage::getModel('sales/order')->load($orderId);
     if (!$order->getId()) {
         return $html;
     }
     if (!$order->canShip() && $order->getStatus() !== Mage_Sales_Model_Order::STATE_CANCELED && $order->getStatus() !== Mage_Sales_Model_Order::STATE_CLOSED) {
         // Order has been shipped. Display shipped carriers.
         $carriers = array();
         $tracks = Mage::getModel('sales/order_shipment_track')->getCollection()->addAttributeToSelect('title')->setOrderFilter($row->getEntityId());
         foreach ($tracks as $track) {
             $carriers[] = $track->getTitle();
         }
         $html = implode(', ', $carriers);
         if (Mage::getStoreConfigFlag('gridactions/general/add_trackingnumber_from_grid_shipped')) {
             if (count($tracks) > 0) {
                 $html .= '<br/>';
             }
             $html .= $this->getCarrierDropdown($row, $order);
         }
     } else {
         if ($order->canShip()) {
             // Order has not yet been shipped. Display drop down.
             $html .= $this->getCarrierDropdown($row, $order);
         }
     }
     return $html;
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:30,代码来源:Carrier.php

示例2: _getValue

 protected function _getValue(Varien_Object $row)
 {
     $str = '<a href="' . $this->getUrl('*/*/disapprove', array('id' => $row->getEntityId())) . '">Disapprove</a>';
     if ($row->getStatus() == 2 && $row->getVisibility() == 1) {
         $str = '<a href="' . $this->getUrl('*/*/approve', array('id' => $row->getEntityId())) . '">Approve</a>';
     }
     return $str;
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:8,代码来源:Approve.php

示例3: _getValue

 protected function _getValue(Varien_Object $row)
 {
     $str = '<a href="' . $this->getUrl('*/*/approve', array('id' => $row->getEntityId())) . '">Approve</a>';
     $p = Mage::getModel('catalog/product')->load($row->getEntityId());
     if ($p->getData('frontendproduct_product_status') == 1) {
         $str = '<a href="' . $this->getUrl('*/*/disapprove', array('id' => $row->getEntityId())) . '">Disapprove</a>';
     }
     return $str;
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:9,代码来源:Approve.php

示例4: render

 public function render(Varien_Object $row)
 {
     $id = $row->getEntityId() ? $row->getEntityId() : $row->getId();
     $modelClass = get_class($row);
     $entity = new $modelClass();
     $entity->load($id);
     $categories = array();
     $categoryIds = $entity->getCategoryIds();
     foreach ($categoryIds as $categoryId) {
         $category = Mage::getModel('catalog/category')->load($categoryId);
         $categories[] = $category->getName();
     }
     return implode(',<br>', $categories);
 }
开发者ID:outeredge,项目名称:edge-magento-module-admingridcolumns,代码行数:14,代码来源:Category.php

示例5: render

 public function render(Varien_Object $row)
 {
     if ($this->_column !== false) {
         $column = $this->_column;
     } else {
         $column = $this->getColumn();
     }
     #$colId = $column->getName() ? $column->getName() : $column->getId();
     $colId = 'tracking-input';
     $orderId = $row->getEntityId();
     $order = Mage::getModel('sales/order')->load($orderId);
     if (!$order->getId()) {
         return '';
     }
     $html = '';
     if ($order->canShip()) {
         $html = '<input name="' . $colId . '-' . $row->getId() . '" rel="' . $row->getId() . '" class="input-text ' . $colId . '" value="' . $row->getData($column->getIndex()) . '" style="width:97%;" onclick="xtentoOnClickJs(this)"/>';
     } else {
         if (!$order->canShip() && $order->getStatus() !== Mage_Sales_Model_Order::STATE_CANCELED && $order->getStatus() !== Mage_Sales_Model_Order::STATE_CLOSED) {
             $trackingNumbers = array();
             if (Mage::helper('xtcore/utils')->mageVersionCompare(Mage::getVersion(), '1.4.0.0', '>=')) {
                 $trackingUrl = Mage::helper('shipping')->getTrackingPopupUrlBySalesModel($order);
             } else {
                 $trackingUrl = Mage::helper('shipping')->getTrackingPopUpUrlByOrderId($order->getEntityId());
             }
             // Starting from Magento 1.6, the trackingnumber field has been renamed from number to track_number
             if (Mage::helper('xtcore/utils')->mageVersionCompare(Mage::getVersion(), '1.6.0.0', '>=')) {
                 $tracks = Mage::getModel('sales/order_shipment_track')->getCollection()->addAttributeToSelect('track_number')->setOrderFilter($row->getEntityId());
                 foreach ($tracks as $track) {
                     $trackingNumbers[] = '<a href="#" onclick="popWin(\'' . $trackingUrl . '\',\'trackorder\',\'width=800,height=600,left=0,top=0,resizable=yes,scrollbars=yes\')" >' . $this->escapeHtml($track->getTrackNumber()) . '</a>';
                 }
             } else {
                 $tracks = Mage::getModel('sales/order_shipment_track')->getCollection()->addAttributeToSelect('number')->setOrderFilter($row->getEntityId());
                 foreach ($tracks as $track) {
                     $trackingNumbers[] = '<a href="#" onclick="popWin(\'' . $trackingUrl . '\',\'trackorder\',\'width=800,height=600,left=0,top=0,resizable=yes,scrollbars=yes\')" >' . $this->escapeHtml($track->getNumber()) . '</a>';
                 }
             }
             $html = implode(', ', $trackingNumbers);
             if (Mage::getStoreConfigFlag('gridactions/general/add_trackingnumber_from_grid_shipped')) {
                 if (count($tracks) > 0) {
                     $html .= '<br/>';
                 }
                 $html .= '<input name="' . $colId . '-' . $row->getId() . '" rel="' . $row->getId() . '" class="input-text ' . $colId . '"
                         value="' . $row->getData($column->getIndex()) . '" style="width:97%;" onclick="xtentoOnClickJs(this)"/>';
             }
         }
     }
     return $html;
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:49,代码来源:Trackingnumber.php

示例6: render

 public function render(Varien_Object $row)
 {
     if (!$row->getEntityId()) {
         $row->setEmail($row->getGuestEmail());
     }
     echo $row->getEmail();
 }
开发者ID:santhosh400,项目名称:ecart,代码行数:7,代码来源:Email.php

示例7: render

 public function render(Varien_Object $row)
 {
     $product_id = $row->getEntityId();
     $supplier_products = Mage::getModel('inventorypurchasing/supplier_product')->getCollection()->addFieldToFilter('product_id', $product_id);
     $content = '';
     $check = 0;
     if (count($supplier_products) == 0) {
         $content = 'No Supplier';
     }
     foreach ($supplier_products as $supplier_product) {
         $supplier_id = $supplier_product->getSupplierId();
         $url = Mage::helper('adminhtml')->getUrl('inventorypurchasingadmin/adminhtml_supplier/edit', array('id' => $supplier_id));
         $supplier = Mage::getModel('inventorypurchasing/supplier')->getCollection()->addFieldToFilter('supplier_id', $supplier_id)->getFirstItem();
         $name = $supplier->getSupplierName();
         if (in_array(Mage::app()->getRequest()->getActionName(), array('exportCsv', 'exportXml', 'exportCsvProductInfo', 'exportXmlProductInfo'))) {
             if ($check) {
                 $content .= ', ' . $name;
             } else {
                 $content .= $name;
             }
         } else {
             $content .= "<a href=" . $url . ">{$name};<a/>" . "<br/>";
         }
         $check++;
     }
     return $content;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:27,代码来源:Supplier.php

示例8: render

 public function render(Varien_Object $row)
 {
     if (!$row->getEntityId()) {
         $row->setLastname($this->__('Guest'));
     }
     echo $row->getLastname();
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:7,代码来源:LastName.php

示例9: render

 public function render(Varien_Object $row)
 {
     try {
         $size = Mage::helper('ampgrid')->getGridThumbSize();
         if (!$row->getThumbnail()) {
             $product = Mage::getModel('catalog/product')->load($row->getEntityId());
             if ($product) {
                 if ($product->getThumbnail()) {
                     $row->setThumbnail($product->getThumbnail());
                 }
             }
         }
         $url = Mage::helper('catalog/image')->init($row, 'thumbnail')->resize($size)->__toString();
         $zoomUrl = '';
         if (Mage::getStoreConfig('ampgrid/attr/zoom')) {
             $zoomUrl = Mage::helper('catalog/image')->init($row, 'thumbnail')->__toString();
         }
         if ($url) {
             $html = '';
             if ($zoomUrl) {
                 $html .= '<a href="' . $zoomUrl . '" rel="lightbox[zoom' . $row->getId() . ']">';
             }
             $html .= '<img src="' . $url . '" alt="" width="' . $size . '" height="' . $size . '" />';
             $html .= '</a>';
             return $html;
         }
     } catch (Exception $e) {
         /* no file uploaded */
     }
     return '';
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:31,代码来源:Thumb.php

示例10: render

 public function render(Varien_Object $row)
 {
     if ($row->getEntityId()) {
         $id = $row->getEntityId();
     } else {
         $id = $row->getProductId();
     }
     $html = '';
     $_product = Mage::getModel('catalog/product')->load($id);
     try {
         $src1 = Mage::helper('catalog/image')->init($_product, 'image')->resize(90);
         $html .= '<img src="' . $src1->__toString() . '" />';
     } catch (Exception $e) {
     }
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:16,代码来源:Productimage.php

示例11: render

 public function render(Varien_Object $row)
 {
     $product_id = $row->getEntityId();
     if ($product_id) {
         $requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('top_filter'));
         if (empty($requestData)) {
             $requestData = Mage::Helper('inventoryreports')->getDefaultOptionsWarehouse();
         }
         $warehouse = $requestData['warehouse_select'];
         $gettime = Mage::Helper('inventoryreports')->getTimeSelected($requestData);
         $datefrom = $gettime['date_from'];
         $dateto = $gettime['date_to'];
         $warehouse_product = Mage::getModel('inventoryplus/warehouse_product')->getCollection()->addFieldToFilter('warehouse_id', $warehouse);
         $supplyneeds = array();
         $total_supplyneeds = 0;
         $method = Mage::getStoreConfig('inventory/supplyneed/supplyneeds_method');
         if ($datefrom && $dateto && $method == 2 && strtotime($datefrom) <= strtotime($dateto)) {
             $max_needs = Mage::helper('inventorysupplyneeds')->calMaxAverage($product_id, $datefrom, $dateto, $warehouse);
         } elseif ($datefrom && $dateto && $method == 1 && strtotime($datefrom) <= strtotime($dateto)) {
             $max_needs = Mage::helper('inventorysupplyneeds')->calMaxExponential($product_id, $datefrom, $dateto, $warehouse);
         } else {
             $max_needs = 0;
         }
         if ($max_needs > 0) {
             $supplyneeds[$product_id] = $max_needs;
             $total_supplyneeds += $max_needs;
         }
     }
     if ($total_supplyneeds == 0) {
         return '0';
     } else {
         return $total_supplyneeds;
     }
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:34,代码来源:Warehouseselected.php

示例12: render

 public function render(Varien_Object $row)
 {
     $product_id = $row->getEntityId();
     $sales_rate = Mage::helper('inventorywarehouse/salesrate')->calculateSalesRate($product_id);
     return '<p style="text-align:center"><label name="sales_rate" id="sales_rate_' . $product_id . '">' . $sales_rate . '</label></p>
             ';
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:7,代码来源:Salesrate.php

示例13: render

 public function render(Varien_Object $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0)
 {
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4 = array();
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4[] = array('@' => array('href' => $this->getUrl('adminhtml/customer/edit', array('id' => $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0->getEntityId())), 'target' => '_blank'), '#' => Mage::helper('sublogin')->__('Edit Customer'));
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4[] = array('@' => array('href' => $this->getUrl('sublogin/adminhtml_index/edit', array('id' => $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0->getId())), 'target' => '_self'), '#' => Mage::helper('sublogin')->__('Edit Sublogin'));
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4[] = array('@' => array('href' => $this->getUrl('sublogin/adminhtml_index/deleteSingleSublogin', array('id' => $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0->getId())), 'target' => '_self'), '#' => Mage::helper('sublogin')->__('Delete Sublogin'));
     return $this->_actionsToHtml($_b4b4ae1cce58b916954ba6a30ef73681af8a36c4);
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:8,代码来源:ActionRenderer.php

示例14: render

 /**
  * Render approval link in each vendor row
  * @param Varien_Object $row
  * @return String
  */
 public function render(Varien_Object $row)
 {
     $html = '';
     if ($row->getEntityId() != '' && $row->getStatus() != Ced_CsMarketplace_Model_Vendor::VENDOR_APPROVED_STATUS) {
         $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId());
         $url = $this->getUrl('*/*/massStatus', array('vendor_id' => $row->getEntityId(), 'status' => Ced_CsMarketplace_Model_Vendor::VENDOR_APPROVED_STATUS, 'inline' => 1));
         $html .= '<a href="javascript:void(0);" onclick="deleteConfirm(\'' . $this->__('Are you sure you want to Approve?') . '\', \'' . $url . '\');" >' . Mage::helper('csmarketplace')->__('Approve') . '</a>';
     }
     if ($row->getEntityId() != '' && $row->getStatus() != Ced_CsMarketplace_Model_Vendor::VENDOR_DISAPPROVED_STATUS) {
         if (strlen($html) > 0) {
             $html .= ' | ';
         }
         $order = Mage::getModel('sales/order')->loadByIncrementId($row->getOrderId());
         $url = $this->getUrl('*/*/massStatus', array('vendor_id' => $row->getEntityId(), 'status' => Ced_CsMarketplace_Model_Vendor::VENDOR_DISAPPROVED_STATUS, 'inline' => 1));
         $html .= '<a href="javascript:void(0);" onclick="deleteConfirm(\'' . $this->__('Are you sure you want to Disapprove?') . '\', \'' . $url . '\');" >' . Mage::helper('csmarketplace')->__('Disapprove') . "</a>";
     }
     return $html;
 }
开发者ID:sixg,项目名称:mkAnagh,代码行数:23,代码来源:Approve.php

示例15: render

 public function render(Varien_Object $row)
 {
     $url = $this->getUrl('marketplace/adminhtml_commission/pay', array('id' => $row->getEntityId()));
     $_approvedStatusId = Mage::getModel('marketplace/selleroptions')->getSellerApprovedStatusId();
     $_sellerStatusId = $row->getStatus();
     if (isset($_approvedStatusId) && $_approvedStatusId == $_sellerStatusId) {
         $html = '<a href="' . $url . '">Pay</a>';
     }
     return $html;
 }
开发者ID:enjoy2000,项目名称:gemz,代码行数:10,代码来源:Paylink.php


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