Helpcenter +918010117117 https://help.storehippo.com/s/573db3149f0d58741f0cc63b/ms.settings/5256837ccc4abf1d39000001/57614ef64256dc6851749879-480x480.png" [email protected] https://www.facebook.com/StoreHippohttps://twitter.com/StoreHippohttps://www.linkedin.com/company/hippoinnovations/https://plus.google.com/+Storehippo/posts
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India

ms.userAddresses

This widget manages addresses of the logged in user.


Variables

addresses
Array containing addresses of the logged in user.
addressReturns main address from the address.
cityReturns city from the address.
countryReturns country from the address.
full_nameReturns the name of user whose name is save against the correspoding user address.
phoneReturns the phone from the address (if available).
stateReturns state from the address.
zipReturns zip from the address.

Methods

remove_address(address)Used to delete an address from an array.
add_address(newAddress)Used to add a new address to the user addresses.
save_address(address)Used to update an existing address from the user addresses.
listAddresses()List all the addresses of the logged in user.

Examples

Address list from user addresses (vuejs themes)

<ms-userAddresses>
    <template v-for="address in addresses">
        <p>{{address.full_name}}</p>
        <p>{{address.email}}</p>
        <p>{{address.phone}}</p>
        <p>{{address.address</p>
        <p>{{address.city}}</p>
        <p>{{address.state}}</p>
        <p>{{address.country}}</p>
        <p>{{address.zip}}</p>
    </template>
    //If u want to delete address form user addresses
    <span role="button" class="badge text-bg-danger small"
          @click="deleteAddress(address)">
     {{ms.filters.translate('Remove')}}
     </span>
</ms-userAddresses>

Address list from user addresses (angular themes)

<div ms-widget="ms.userAddresses">
     <div data-ng-repeat="address in  addresses" >
        <p>{{address.full_name}}</p>
        <p>{{address.email}}</p>
        <p>{{address.phone}}</p>
        <p>{{address.address</p>
        <p>{{address.city}}</p>
        <p>{{address.state}}</p>
        <p>{{address.country}}</p>
        <p>{{address.zip}}</p>
    </div>
     //If u want to delete address form user addresses
     <button data-ng-click="remove_address(address)" 
     class="btn btn-danger btn-sm ms-mb-s" title="Delete">
        Remove
      </button>
</div>