Example #1
0
        protected override void LoadData()
        {
            _shippingAddresses = ShippingProvider.GetShippingAddresses(DistributorID, Locale);
            _pickupLocations   = ShippingProvider.GetDeliveryOptions(DeliveryOptionType.Pickup,
                                                                     ShippingProvider.GetDefaultAddress());

            if (HLConfigManager.Configurations.PickupOrDeliveryConfiguration.AllowPickUpFromCourier)
            {
                _pickupRrefList = ProductsBase.GetShippingProvider()
                                  .GetPickupLocationsPreferences(DistributorID, CountryCode);
            }
        }
        protected override void loadData()
        {
            _shippingAddresses = ShippingProvider.GetShippingAddresses(DistributorID, Locale);

            // Retrieve the pickupoption from the cache, not hardcoded to pickup, unless nothing is loaded, so use default
            _pickupLocations = ShippingProvider.GetDeliveryOptions(DeliveryOptionType.Pickup,
                                                                   ShippingProvider.GetDefaultAddress());
            _pickupRrefList = ProductsBase.GetShippingProvider()
                              .GetPickupLocationsPreferences(DistributorID, CountryCode);
            // Showing the right options according xml configurations.
            if (!HLConfigManager.Configurations.PickupOrDeliveryConfiguration.AllowPickUpFromCourier &&
                DeliveryType.Items.FindByValue("PickupFromCourier") != null)
            {
                DeliveryType.Items.Remove(DeliveryType.Items.FindByValue("PickupFromCourier"));
            }
        }
Example #3
0
 protected virtual void shippingAddressDeleted(ShippingAddress_V02 shippingAddress)
 {
     _shippingAddresses = ShippingProvider.GetShippingAddresses(DistributorID, Locale);
     // this is to get primary address, if previous one deleted
     //DeliveryOption deliveryOption = getSelectedAddress(args.ShippingAddress.ID, DeliveryOptionType.Shipping);
     if (_shippingAddresses != null)
     {
         //After delete pass the primary shipping ID to update shipping info..
         if (_shippingAddresses.Count > 0)
         {
             DeliveryOption primaryDeliveryOption = _shippingAddresses.Find(s => s.IsPrimary);
             if (primaryDeliveryOption != null)
             {
                 updateShippingInfo(primaryDeliveryOption.ID, ProductsBase.DeliveryOptionID,
                                    DeliveryOptionType.Shipping);
             }
         }
         else
         {
             ProductsBase.ClearCart();
         }
         reload();
     }
 }
Example #4
0
 protected void reloadShipping()
 {
     _shippingAddresses = ShippingProvider.GetShippingAddresses(DistributorID, Locale);
 }