/// <summary>
 /// Adds the specified shipping option collection.
 /// </summary>
 /// <param name="shippingOptionCollection">The shipping option collection.</param>
 public void Add(ShippingOptionCollection shippingOptionCollection)
 {
     foreach (ShippingOption shippingOption in shippingOptionCollection)
     {
         this.Add(shippingOption);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the shipping options.
        /// </summary>
        /// <param name="order">The order.</param>
        /// <returns></returns>
        public ShippingOptionCollection GetShippingOptions(Order order)
        {
            ShippingOptionCollection shippingOptionCollection = new ShippingOptionCollection();
            ShippingOptionCollection serviceOptionCollection;

            foreach (IShippingProvider shippingProvider in _shippingProviderCollection)
            {
                serviceOptionCollection = shippingProvider.GetShippingOptions(order);
                if (this.ShippingServiceSettings.ShippingBuffer > 0)
                {
                    foreach (ShippingOption shippingOption in serviceOptionCollection)
                    {
                        shippingOption.Rate = shippingOption.Rate + this.ShippingServiceSettings.ShippingBuffer;
                    }
                }
                shippingOptionCollection.Add(serviceOptionCollection);
            }
            return(shippingOptionCollection);
        }