当前位置: 首页>>代码示例>>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;未经允许,请勿转载。