-
Notifications
You must be signed in to change notification settings - Fork 0
/
cart_customer_address.php
48 lines (38 loc) · 1 KB
/
cart_customer_address.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* @author Alok Dubey
* @ 2018
*/
$quote_id=$_REQUEST['quote_id'];
$customer=$_REQUEST['customer_id'];
$firstname=$_REQUEST['firstname'];
$lastname=$_REQUEST['lastname'];
$street=$_REQUEST['street'];
$city=$_REQUEST['city'];
$region=$_REQUEST['region'];
$postcode=$_REQUEST['postcode'];
$country_id=$_REQUEST['country_id'];
$telephone=$_REQUEST['telephone'];
$is_default_billing=$_REQUEST['is_default_billing'];
$storeId=1;
require_once 'soapconfig.php';
require_once 'config.php';
if($customer)
{
$cust = Mage::getModel('customer/customer')->load($customer);
$quote = Mage::getModel('sales/quote')->loadByCustomer($cust);
$quote_id=$quote->getId();
}
$result = $proxy->shoppingCartCustomerAddresses($sessionId, $quote_id, array(array(
'mode' => 'billing',
'firstname' => 'first name',
'lastname' => 'last name',
'street' => 'street address',
'city' => 'city',
'region' => 'region',
'postcode' => 'postcode',
'country_id' => 'US',
'telephone' => '123456789',
'is_default_billing' => 1
)), $storeId);
?>