本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例6: render
public function render(Varien_Object $row)
{
if (!$row->getEntityId()) {
$row->setEmail($row->getGuestEmail());
}
echo $row->getEmail();
}
示例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;
}
示例8: render
public function render(Varien_Object $row)
{
if (!$row->getEntityId()) {
$row->setLastname($this->__('Guest'));
}
echo $row->getLastname();
}
示例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 '';
}
示例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;
}
示例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;
}
}
示例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>
';
}
示例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);
}
示例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;
}
示例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;
}