private void SetShipping()
    {
        string  shippingID;
        decimal shippingCost, handlingFee;

        ExtractListItemValue(uxShippingRadioList.SelectedValue, out shippingID, out shippingCost, out handlingFee);

        ShippingOption shippingOption = DataAccessContext.ShippingOptionRepository.GetOne(
            StoreContext.Culture, shippingID);

        if (shippingOption.ShippingOptionType.IsRealTime &&
            StoreContext.ShoppingCart.ContainsRecurringProduct())
        {
            //uxShippingDetails.DisplayRecurringWarningMessage();
            return;
        }

        ShippingChoice shippingChoice = new ShippingChoice(
            ExtractNameFromListItemText(uxShippingRadioList.SelectedItem.Text), shippingCost, handlingFee);

        ShippingMethod shippingMethod = shippingOption.CreateShippingMethod(shippingChoice);

        StoreContext.CheckoutDetails.ShippingMethod          = shippingMethod;
        StoreContext.CheckoutDetails.EstimatedShippingSelect = uxShippingRadioList.SelectedItem.Text;
    }
예제 #2
0
    private void SetShippingAndRedirect()
    {
        string  shippingID;
        decimal shippingCost, handlingFee;

        ExtractListItemValue(uxShippingDetails.ShippingOptionList.SelectedValue,
                             out shippingID, out shippingCost, out handlingFee);

        ShippingOption shippingOption = DataAccessContext.ShippingOptionRepository.GetOne(
            StoreContext.Culture, shippingID);

        if (shippingOption.ShippingOptionType.IsRealTime &&
            StoreContext.ShoppingCart.ContainsRecurringProduct())
        {
            uxShippingDetails.DisplayRecurringWarningMessage();
            return;
        }

        ShippingChoice shippingChoice = new ShippingChoice(
            ExtractNameFromListItemText(uxShippingDetails.ShippingOptionList.SelectedItem.Text), shippingCost, handlingFee);

        ShippingMethod shippingMethod = shippingOption.CreateShippingMethod(shippingChoice);

        StoreContext.CheckoutDetails.ShippingMethod = shippingMethod;

        if (!(Request.QueryString["skiplogin"] == "true"))
        {
            Response.Redirect("Payment.aspx");
        }
        else
        {
            Response.Redirect("Payment.aspx?skiplogin=true");
        }
    }
예제 #3
0
    public ShippingMethod GetSelectedShippingMethod()
    {
        string  shippingID;
        decimal shippingCost, handlingFee;

        if (uxShippingRadioList.SelectedValue == "")
        {
            return(ShippingMethod.Null);
        }

        ExtractListItemValue(uxShippingRadioList.SelectedValue,
                             out shippingID, out shippingCost, out handlingFee);

        ShippingOption shippingOption = DataAccessContext.ShippingOptionRepository.GetOne(
            CurrentCulture, shippingID);

        if (shippingOption.ShippingOptionType.IsRealTime &&
            StoreContext.ShoppingCart.ContainsRecurringProduct())
        {
            uxRecurringWarringLabel.Text = RecurringWarring;
            //return;
        }

        ShippingChoice shippingChoice = new ShippingChoice(
            ExtractNameFromListItemText(uxShippingRadioList.SelectedItem.Text), shippingCost, handlingFee);

        ShippingMethod shippingMethod = shippingOption.CreateShippingMethod(shippingChoice);

        //StoreContext.CheckoutDetails.ShippingMethod = shippingMethod;

        return(shippingMethod);
    }