當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Object::getCustomerId方法代碼示例

本文整理匯總了PHP中Varien_Object::getCustomerId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Object::getCustomerId方法的具體用法?PHP Varien_Object::getCustomerId怎麽用?PHP Varien_Object::getCustomerId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Varien_Object的用法示例。


在下文中一共展示了Varien_Object::getCustomerId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: render

 public function render(Varien_Object $row)
 {
     $customer = Mage::getModel('customer/customer')->load($row->getCustomerId());
     if ($customer) {
         return sprintf('<a target="_blank" href="%s">%s</a>', $this->getUrl('adminhtml/customer/edit', array('id' => $customer->getId())), $customer->getName());
     }
     return $row->getCustomerId();
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:8,代碼來源:Customer.php

示例3: render

    public function render(Varien_Object $row)
    {
        if ($row->getCustomerId()) {
            return sprintf('
				<a href="%s" title="%s">%s</a>', $this->getUrl('adminhtml/customer/edit/', array('_current' => true, 'id' => $row->getCustomerId())), Mage::helper('catalog')->__('View Customer Detail'), $row->getCustomerEmail());
        } else {
            return sprintf('%s', $row->getCustomerEmail());
        }
    }
開發者ID:ashfaqphplhr,項目名稱:artificiallawnsforturf,代碼行數:9,代碼來源:Customeremail.php

示例4: render

 public function render(Varien_Object $row)
 {
     $links = '';
     if ($row->getCustomerId()) {
         $links .= '<a href="' . $this->getUrl('adminhtml/customer/edit', array('id' => $row->getCustomerId())) . '" title="' . $this->__('View Customer') . '">' . $this->__('View Customer') . '</a><br/>';
     }
     $links .= '<a href="' . $this->getUrl('adminhtml/sales_order/view', array('order_id' => $row->getOrderId())) . '" title="' . $this->__('View Order') . '">' . $this->__('View Order') . '</a>';
     return $links;
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:9,代碼來源:View.php

示例5: render

 /**
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     if ($row->getCustomerId()) {
         $name = $row->getFirstname() . ' ' . $row->getLastname();
         $result = sprintf('<a href="%s">%s</a>', Mage::getUrl('adminhtml/customer/edit', array('id' => $row->getCustomerId())), $name);
     } else {
         $result = 'Guest';
     }
     return $result;
 }
開發者ID:q2taras,項目名稱:magento-oneclickorder,代碼行數:14,代碼來源:Customer.php

示例6: render

 public function render(Varien_Object $row)
 {
     if (is_null($row->getCustomerId())) {
         return Mage::helper('review')->__('Guest');
     } elseif ($row->getCustomerId() == 0) {
         return Mage::helper('review')->__('Administrator');
     } elseif ($row->getCustomerId() > 0) {
         return Mage::helper('review')->__('Customer');
     }
     //		return ($row->getCustomerId() ? Mage::helper('review')->__('Customer') : Mage::helper('review')->__('Guest'));
 }
開發者ID:codercv,項目名稱:urbansurprisedev,代碼行數:11,代碼來源:Type.php

示例7: render

 public function render(Varien_Object $row)
 {
     if (is_null($row->getCustomerId())) {
         if ($row->getStoreId() == Mage_Core_Model_App::ADMIN_STORE_ID) {
             return Mage::helper('review')->__('Administrator');
         } else {
             return Mage::helper('review')->__('Guest');
         }
     } elseif ($row->getCustomerId() > 0) {
         return Mage::helper('review')->__('Customer');
     }
     //		return ($row->getCustomerId() ? Mage::helper('review')->__('Customer') : Mage::helper('review')->__('Guest'));
 }
開發者ID:QiuLihua83,項目名稱:magento-enterprise-1.13.1.0,代碼行數:13,代碼來源:Type.php

示例8: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $id = $row->getCustomerId();
     if (!$id) {
         return '&nbsp;';
     }
     return sprintf('<a href="%s">%s</a>', $this->getUrl('*/catalog_product_review', array('customerId' => $id)), AO::helper('adminhtml')->__('Show reviews'));
 }
開發者ID:ronseigel,項目名稱:agent-ohm,代碼行數:14,代碼來源:Report_Grid_Column_Renderer_Customer.php

示例9: _getCustomerEmail

 private function _getCustomerEmail(Varien_Object $row)
 {
     $email = $row->getData($this->getColumn()->getIndex());
     if (!$email) {
         $email = trim(Mage::getModel('customer/customer')->load($row->getCustomerId())->getEmail());
     }
     return $email;
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:8,代碼來源:Email.php

示例10: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $id = $row->getCustomerId();
     if (!$id) {
         return Mage::helper('Mage_Adminhtml_Helper_Data')->__('Show Reviews');
     }
     return sprintf('<a href="%s">%s</a>', $this->getUrl('*/catalog_product_review', array('customerId' => $id)), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Show Reviews'));
 }
開發者ID:relue,項目名稱:magento2,代碼行數:14,代碼來源:Customer.php

示例11: render

 /**
  * Render customer info to grid column html
  * 
  * @param Varien_Object $row
  */
 public function render(Varien_Object $row)
 {
     $actionName = $this->getRequest()->getActionName();
     if (strpos($actionName, 'export') === 0) {
         return $row->getCustomerEmail();
     }
     return sprintf('<a target="_blank" href="%s">%s</a>', $this->getUrl('adminhtml/customer/edit', array('id' => $row->getCustomerId())), $row->getCustomerEmail());
 }
開發者ID:kanotest15,項目名稱:cbmagento,代碼行數:13,代碼來源:Customer.php

示例12: validate

 /**
  * Validate Customer Rule Condition
  *
  * @param Varien_Object $object
  *
  * @return bool
  */
 public function validate(Varien_Object $object)
 {
     $customer = Mage::getModel('customer/customer')->load($object->getCustomerId());
     if (!$customer->getId()) {
         return false;
     }
     return Mage_Rule_Model_Condition_Product_Abstract::validate($customer);
 }
開發者ID:xiaoguizhidao,項目名稱:easy-shipping-rules,代碼行數:15,代碼來源:Customer.php

示例13: render

 public function render(Varien_Object $recurring)
 {
     $customer = Mage::getModel('customer/customer')->load($recurring->getCustomerId());
     //        $name = $customer->getFirstname().' '.$customer->getLastname();
     //        var_dump($row->getData());
     $html = '<a ';
     $html .= 'id="customer_' . $this->getColumn()->getId() . '" ';
     $html .= 'href="' . Mage::helper("adminhtml")->getUrl("adminhtml/customer/edit/id/" . $customer->getId() . "/") . '"/>';
     $html .= $recurring->getShippingAddressObj()->format('html');
     $html .= '</a><br/>';
     return $html;
 }
開發者ID:Jonathonbyrd,項目名稱:Optimized-Magento-1.9.x,代碼行數:12,代碼來源:Customer.php

示例14: validate

 /**
  * Validate Address Rule Condition
  *
  * @param Varien_Object|Mage_Sales_Model_Order|Mage_Sales_Model_Quote $object
  * @return bool
  */
 public function validate(Varien_Object $object)
 {
     /* @var $object Mage_Sales_Model_Order|Mage_Sales_Model_Quote */
     //Get infos from billing address
     $toValidate = new Varien_Object();
     $customer_id = $object->getCustomerId();
     $orders_count = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_id', $customer_id)->count();
     $toValidate->setOrdersCount($orders_count);
     $toValidate->setCustomerIsGuest(is_null($object->getCustomerIsGuest()) ? 0 : $object->getCustomerIsGuest());
     $toValidate->setDiffAddresses($this->_addressesesAreDifferent($object));
     $toValidate->setCustomerGroup($object->getCustomerGroupId());
     return parent::validate($toValidate);
 }
開發者ID:hipay,項目名稱:hipay-fullservice-sdk-magento1,代碼行數:19,代碼來源:Customer.php

示例15: _afterSave

 protected function _afterSave(Varien_Object $address)
 {
     if ($address->getId() && ($address->getIsDefaultBilling() || $address->getIsDefaultShipping())) {
         $customer = Mage::getModel('customer/customer')->load($address->getCustomerId());
         if ($address->getIsDefaultBilling()) {
             $customer->setDefaultBilling($address->getId());
         }
         if ($address->getIsDefaultShipping()) {
             $customer->setDefaultShipping($address->getId());
         }
         $customer->save();
     }
     return $this;
 }
開發者ID:Rinso,項目名稱:magento-mirror,代碼行數:14,代碼來源:Address.php


注:本文中的Varien_Object::getCustomerId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。