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


PHP SoapClient::customerCustomerList方法代碼示例

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


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

示例1: array

<?php

//$mageFilename = '/mnt/data/html/zuri/public_html/app/Mage.php';
$mageFilename = '../app/Mage.php';
require_once $mageFilename;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
umask(0);
Mage::app("default");
$complexFilter = array('complex_filter' => array(array('key' => 'email', 'value' => array('key' => 'eq', 'value' => '126004@zoffio.com'))));
$proxy = new SoapClient('http://52.11.138.2/index.php/api/v2_soap/?wsdl');
$sessionId = $proxy->login('testapi', 'justdoit');
$customerList = $proxy->customerCustomerList($sessionId, $complexFilter);
print_r($customerList);
開發者ID:shebin512,項目名稱:Magento_Zoff,代碼行數:15,代碼來源:customerList.php

示例2: SoapClient

<?php

$apiUrlV2 = "http://your.magento.host/api/v2_soap?wsdl";
$apiUser = 'your_wsdl_api_user';
$apiKey = 'your_wsdl_api_key';
$client = new SoapClient($apiUrlV2);
// retreive session id from login
$sessionId = $client->login($apiUser, $apiKey);
$filterByEmail = 'example@gmail.com';
// using complex filter
$complexFilter = array('complex_filter' => array(array('key' => 'email', 'value' => array('key' => 'eq', 'value' => $filterByEmail))));
$result = $client->customerCustomerList($sessionId, $complexFilter);
var_dump($result);
開發者ID:anop72,項目名稱:magento_scripts,代碼行數:13,代碼來源:php_magento_customer_list_filter_email.php

示例3: objectToArray

<?php

$proxy = new SoapClient('http://finaonation.com/shop/api/v2_soap/?wsdl');
// TODO : change url
$sessionId = $proxy->login('apiintegrator', 'ap11ntegrator');
// TODO : change login and pwd if necessary
/*
$result = $proxy->customerCustomerCreate($sessionId, array('email' => 'customer-mail@example.org', 'firstname' => 'Dough', 'lastname' => 'Deeks', 'password' => 'password'));
print_r($result);
exit;
*/
$result = $proxy->customerCustomerList($sessionId);
$res = objectToArray($result);
$res = json_encode($res);
print_r($res);
function objectToArray($object)
{
    if (!is_object($object) && !is_array($object)) {
        return $object;
    }
    if (is_object($object)) {
        $object = get_object_vars($object);
    }
    return array_map('objectToArray', $object);
}
exit;
開發者ID:gopi158,項目名稱:Sample,代碼行數:26,代碼來源:soapclient.php

示例4: SoapClient

<?php

$apiUrlV2 = "http://your.magento.host/api/v2_soap?wsdl";
$apiUser = 'your_wsdl_api_user';
$apiKey = 'your_wsdl_api_key';
$client = new SoapClient($apiUrlV2);
// retreive session id from login
$sessionId = $client->login($apiUser, $apiKey);
$result = $client->customerCustomerList($sessionId);
var_dump($result);
開發者ID:anop72,項目名稱:magento_scripts,代碼行數:10,代碼來源:php_connect_magento_wsdl.php

示例5: customerSaveAfter

 /**
  * Dummy Function for testing and code
  * TODO remove the function from config.xml and here
  *
  * @param Varien_Event_Observer $observer            
  * @return Zoffio_WmsApi_Model_Observer
  */
 public function customerSaveAfter(Varien_Event_Observer $observer)
 {
     if (self::$_observerExecutionCounter > 1) {
         return $this;
     }
     self::$_observerExecutionCounter++;
     Mage::log(__CLASS__ . "_" . __FUNCTION__, null, 'shebin.log');
     // $event = $observer->getEvent();
     $customer = $observer->getCustomer();
     Mage::log(get_class($customer), null, 'shebin.log');
     $customer_id = $customer->getId();
     $zoff_domain = 'zoffio.com';
     $wms_email_id = $customer_id . "@" . $zoff_domain;
     Mage::log($wms_email_id, null, 'shebin.log');
     $complexFilter = array('complex_filter' => array(array('key' => 'email', 'value' => array('key' => 'eq', 'value' => $wms_email_id))));
     // Mage::log($complexFilter, null, 'shebin.log');
     // Mage::log(self::$_apiPassword, null, 'shebin.log');
     // establish the connection to WMS api
     $proxy = new SoapClient(self::$_apiUrl);
     $sessionId = $proxy->login(self::$_apiUser, self::$_apiPassword);
     try {
         $customerList = $proxy->customerCustomerList($sessionId, $complexFilter);
     } catch (Exception $e) {
         Mage::log($e->getMessage(), null, 'shebin.log');
         Mage::log($e->getTraceAsString(), null, 'shebin.log');
     }
     // Mage::log($event->getData(),null,'shebin.log');
     // Mage::log($customer->getData(), null, 'shebin.log');
     Mage::log($customerList, null, 'shebin.log');
     // If Customer doesn't exist in the WMS
     if (empty($customerList)) {
         // Add the customer
         $customer_details = array('email' => $wms_email_id, 'firstname' => $customer->getFirstname(), 'lastname' => $customer->getLastname(), 'website_id' => $customer->getWebsiteId(), 'store_id' => $customer->getStoreId(), 'group_id' => $customer->getGroupId());
         Mage::log($customer_details, null, 'shebin.log');
         try {
             $result = $proxy->customerCustomerCreate($sessionId, $customer_details);
         } catch (Exception $e) {
             Mage::log($e->getMessage(), null, 'shebin.log');
             // Mage::getSingleton('core/session')->addWarning("Zoffio WMS
             // API : ".$wms_email_id." : ".$e->getMessage());
         }
         Mage::log($result, null, 'shebin.log');
         return $this;
     }
     $proxy->endSession($sessionId);
     // closing session
     return $this;
     // Mage::log($observer->getData(),null,'shebin.log');
     // Mage::dispatchEvent('admin_session_user_login_success',
     // array('user'=>$user));
     // $user = $observer->getEvent()->getUser();
     // $user->doSomething();
 }
開發者ID:shebin512,項目名稱:Magento_Zoff,代碼行數:60,代碼來源:Observer.php

示例6: SoapClient

<?php

//phpinfo();
$api_url_v2 = "www.choiceuae.ae/api/v2_soap/?wsdl=1";
$username = 'Ninad';
$password = 'ninad123';
$cli = new SoapClient($api_url_v2);
//retreive session id from login
$session_id = $cli->login($username, $password);
//call customer.list method
$result = $cli->customerCustomerList($session_id);
print_r($result);
開發者ID:sshegde123,項目名稱:wmp8,代碼行數:12,代碼來源:info.php


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