Shopping Cart Skip Step

Delford Chaffin asked on May 25, 2016 17:54

Is it possible to dynamically skip a step (in this case, the select shipping/billing) in the checkout process? I know I can remove the step, but that doesn't seem to set the payment and shipping options. So far, I have in the OnPreRender event:

InfoDataSet<ShippingOptionInfo> shippingOptions = ShippingOptionInfoProvider.GetShippingOptions(CurrentSite.SiteID, true);
InfoDataSet<PaymentOptionInfo> paymentOptions = PaymentOptionInfoProvider.GetPaymentOptions(CurrentSite.SiteID, true);
if ((shippingOptions.Items.Count == 1) && (paymentOptions.Items.Count == 1))
{
    selectShipping.ShippingID = shippingOptions.Items[0].ShippingOptionID;
    selectPayment.PaymentID = paymentOptions.Items[0].PaymentOptionID;
    ProcessStep();
    int _nextStep = ShoppingCartControl.CurrentStepIndex + 1;
    // ShoppingCartControl.LoadStep(_nextStep);
    // ShoppingCartControl.CurrentStepControl.ButtonNextClickAction();
}

The last two lines that I have commented out throw errors. Is there a command that I can call here that can stop loading this step and move to the next one?

Thanks!

   Please, sign in to be able to submit a new answer.