Hi,
thank you for your work on this module.
I have problem with condition: "Order has a shipping quote from a particular method".
1. Some default quotas are needed in a fake order (see attachment, in default_flatrate_method.patch is dirty (belive that explanatory) solution).
2. Missing js code for such action (change shipping method). I added something like following to .js:
Drupal.behaviors.uc_conditional_payment = function (context) {
$("input[name='quote-option']", context).change(getPaymentOptions);
}
But I have trouble with IE and Chrome, becouse they "react with delay on change of shipping method".
Example:
SM .. shipping meth.
PM .. payment meth.
PM1 -> (SM1, SM2) // PM1 depends on SM1 and SM2
PM2 -> (SM1,)
PM3 -> (SM1, SM2, SM3)
When I select SM1 nothing happend (expect avaible PM1, PM2, PM3). Than I select SM2 and it is displayed PM1, PM2, PM3 (expected PM1, PM3). SM3 display PM1 and PM3 (exp. PM3) and so on.
Cheers,
Honza.
| Comment | File | Size | Author |
|---|---|---|---|
| payment_method_on_shipping_method_click.patch | 467 bytes | hstefl | |
| default_flatrate_method.patch | 1.07 KB | hstefl |
Comments
Comment #1
hstefl commentedComment #2
longwaveThanks for the report. As you found, the order that AJAX events fire and return on the checkout page makes this somewhat complicated to implement; I am not really sure there is a way to do this cleanly, without making the JavaScript more complicated and possibly breaking compatibility with other modules that add JS to the checkout, I'm afraid :(
Comment #3
sin commentedExperimenting with payments depending on shipping methods. Some methods available only for certain cities. I found uc_quote_condition_order_shipping_method() always return FALSE with my shipping methods, but http://drupal.org/node/1157494 helps a lot.
I also have to add a call to getPaymentOptions() from uc_quote.js to get reliable shipping change tracking. So my solution is to add uc_conditional_payment support to uc_quote.
I also add a default method to fake order like this: