1

My client wants to bypass payment options if a custom chooses shipping outside the US. I have figured out some of the parts using rules but I cannot figure out how to 1) skip the payment selection step or 2) hide the other shipping options.

For option 2, would I disable all payment methods in the Admin UI and then, using a series of rules, enable the ones I want based on the shipping method selected? That seems a little backward but it might work.

2 Answers 2

2

I would recommend you to disable payment method by default on which you have to operate(enable/disable). In rules you can check the condition where you have to enable the particular payment method & in action you can simply enable the payment method you want to.

This is what I have done in one project...as in action part it's hard to find remove option.

1
  • This worked perfectly. So at /admin/commerce/config/payment-methods, I disabled all of the payment method rules and create two new ones (International Shipping and Domestic Shipping). One tested for the Billing address NOT equal to US and other for Billing Address equal to US. Based on the conditions in each one, I enabled whatever payment methods I wanted the customer to see for that situation.
    – zkent
    Apr 19, 2013 at 17:26
0

Try this module rules_form

Rules Forms Support provides a Rules based method for controlling forms and their elements. The module can be used to alter any form provided by Drupal core or contributed modules. Change element titles, descriptions, weights, and more, or validate form data and set form errors. Rules forms saves time and cost by affording site builders the ability to monitor and alter forms without the need to implement a custom module.

1
  • Yes..very nice module.
    – RajeevK
    Apr 20, 2013 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.