Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have some taxes that depend upon the chosen shipping quote method. Currently serializeOrder()
doesn't include that information in the order, which causes uc_quote_condition_order_shipping_method()
to try to infer the quote method from the name of the line item. In my case I had methods with identical names and was getting bugs. I'm about to attach a patch that adds the method's machine name to the order. I haven't tested it with anything other than uc_taxes
.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#9 | 1157494-uc_payment-shipping-method.patch | 1.1 KB | longwave |
#1 | uc_payment_serializeorder_quote_method-1157494-1.patch | 1.12 KB | AndyF |
Comments
Comment #1
AndyF CreditAttribution: AndyF commentedComment #3
AndyF CreditAttribution: AndyF commentedThink it failed due to #1096900: Releases should not be tested.
Comment #4
longwaveIt is much easier for the maintainers to accept patches against -dev if possible.
Comment #5
AndyF CreditAttribution: AndyF commentedSorry, yep, I did check that there were no differences between the dev file and 2.4's, but must've been on autopilot when setting the version on this issue! I haven't tested on dev however.
Comment #6
AndyF CreditAttribution: AndyF commented#1: uc_payment_serializeorder_quote_method-1157494-1.patch queued for re-testing.
Comment #7
sin CreditAttribution: sin commentedExactly the same problem but with uc_conditional_payment + http://drupal.org/node/952532. The patch works with 2.4. Thank you!
Comment #8
sin CreditAttribution: sin commentedIt saved me the second time, the same issue with #952532: Dependency on shipping method. Please commit.
Comment #9
longwaveThis patch is functionally the same, just reformatted to fit the coding standards a bit better. This seems to work for me, if someone else can confirm then it can be committed.
Comment #10
TR CreditAttribution: TR commentedI think it's fundamentally wrong to have shipping-specific code in uc_payment.js. If it's a matter of serializing all the line items, then the code should look for line items in general, and not specifically named line items like shipping. Otherwise this same problem gets pushed to another type of line item, and won't work for custom line items.
Comment #11
longwaveIt is far too much work to refactor all the checkout JavaScript in 6.x to handle all possible cases, especially where other contrib may be relying on code that is already present. Committing this and #1132378: Checkout page does not contain order UID for AJAX-based conditional action calls will fix bugs in CA support for core checkout functionality, at this stage of the game I think this is the best we can aim for.
Comment #12
longwaveCommitted #9.