Example #1
0
        protected virtual Address GetAddress(AddressInfo source)
        {
            Assert.ArgumentNotNull(source, "source");

            var address = OrderFactory.CreateAddress();

            address.AddressLine          = source.Address;
            address.AddressLine2         = source.Address2;
            address.PostalZone           = source.Zip;
            address.CityName             = source.City;
            address.CountrySubentity     = source.State;
            address.CountrySubentityCode = source.State;
            address.Country         = source.Country != null ? source.Country.Title : string.Empty;
            address.CountryCode     = source.Country != null ? source.Country.Code : string.Empty;
            address.AddressTypeCode = string.Empty;

            return(address);
        }
Example #2
0
        protected virtual ICollection <Sitecore.Ecommerce.Common.Party> GetFreightForwarderParty(ActiveCommerce.Orders.Legacy.Order source)
        {
            Assert.ArgumentNotNull(source, "source");

            var party = OrderFactory.CreateParty();

            party.PostalAddress = OrderFactory.CreateAddress();

            party.Person = OrderFactory.CreatePerson();
            party.PartyIdentification = source.ShippingProvider != null ? source.ShippingProvider.Code : null;
            party.PartyName           = source.ShippingProvider != null ? source.ShippingProvider.Title : null;

            var acShippingProvider = (source.ShippingProvider as ActiveCommerce.Shipping.ShippingProvider);

            party.EndpointID = acShippingProvider != null ? acShippingProvider.ServiceCode : string.Empty;

            return(new Collection <Sitecore.Ecommerce.Common.Party> {
                party
            });
        }