Proper way to disable checkout elements/modules when not needed?
Hi all -
I have a store that has a mix of shippable and non-shippable products. When a customer orders all non-shippable products, I'd like to hide the shipping method and the shipping fields.
I tried doing so by using hook_form_alter and unsetting the appropriate fields, but doing so yields an AJAX error when selecting different payment methods (e.g., Credit Card, Pay by Check). Doesn't seem like this is the proper way to do things...
I suppose this should all be done using Rules, but am unsure what to react on and so on ... anyone have any thoughts?
Many thanks,
John / NEAR DARK
Comments
Any solutions?
Hi, did you find out how to do this?
Very interested in any advice on how to disable the shipping page, based on fields in a product.
Hiding shipping pane
Hi, this isn't the same exact thing you were talking about but it does who how to hide the shipping pane for another example.
http://www.drupalcommerce.org/questions/3304/how-hide-checkout-panes-bas...
Just seems like you'd need to change a few if statements. Also , you need to make sure that the shipping address is on a checkout page that is after, your initial checkout page.