本文整理汇总了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);
示例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);
示例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;
示例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);
示例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();
}
示例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);