Has anyone had the system skip this step if you only have one option available? For example we only accept credit card transactions so it seems a waste to have the user land on the step of the checkout process and do nothing but click next? Ideally, I'd just like to skip it alltogether if there's only one payment option.
Page 1 of 1
Skip Payment Method Checkout Step if Only one option is available
#2
Posted 16 August 2010 - 03:07 PM
Hi, Mitch!
Yes, you can do that.
1. Define some API code for your payment method. For example "default". You can do that on the Edit Payment Method page.
2. On the Checkout page, in the Post Action Code field add the following code:
3. You can remove the Payment Method step from the checkout progress partial if you want. Then, on the Shipping Method checkout partial you need to add the following hidden field:
I made a minor update in the shop module to support the "review" value. Please update your copy.
Thank you
Yes, you can do that.
1. Define some API code for your payment method. For example "default". You can do that on the Edit Payment Method page.
2. On the Checkout page, in the Post Action Code field add the following code:
$default_method = Shop_PaymentMethod::find_by_api_code('default');
Shop_CheckoutData::set_payment_method($default_method->id);3. You can remove the Payment Method step from the checkout progress partial if you want. Then, on the Shipping Method checkout partial you need to add the following hidden field:
<input type="hidden" name="skip_to" value="review"/>
I made a minor update in the shop module to support the "review" value. Please update your copy.
Thank you
#3
Posted 20 August 2010 - 11:47 AM
Aleksey,
This worked great when the user had to select a shipping option.
However, I now have a "service" type product that has no shipping options obviously after following the documentation to get it setup. I figured I'd pretty easily be able to skip the review step, but it seems it's going right to the payment selection again on these products...
Here's the code I'm using on the shipping_info partial:
I'm thinking it has to do with:
But I'm not sure, it seems like the autoskip shipping is automatically dumping me to the payment method step, even though it doesn't exist in my steps array... any thoughts?
Thanks!
This worked great when the user had to select a shipping option.
However, I now have a "service" type product that has no shipping options obviously after following the documentation to get it setup. I figured I'd pretty easily be able to skip the review step, but it seems it's going right to the payment selection again on these products...
Here's the code I'm using on the shipping_info partial:
if(!$shipping_required) echo '<input type="hidden" name="skip_to" value="review"/>';
I'm thinking it has to do with:
<input name="auto_skip_shipping" value="1" type="hidden"/>
But I'm not sure, it seems like the autoskip shipping is automatically dumping me to the payment method step, even though it doesn't exist in my steps array... any thoughts?
Thanks!
#4
Posted 20 August 2010 - 05:29 PM
Hi, Mitch!
I just added the auto_skip_to field support. It allows to skip the shipping and payment method steps. Please read a description in the bottom of this page: http://lemonstandapp...ts_or_services/
Thank you
I just added the auto_skip_to field support. It allows to skip the shipping and payment method steps. Please read a description in the bottom of this page: http://lemonstandapp...ts_or_services/
Thank you
Share this topic:
Page 1 of 1

Help














