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.
In the case that uc_cart_checkout_form() creates a new UcOrder(), the quotes pane initially delivers you incorrect quotes as $order->products has not been set when it generates them in uc_checkout_pane_quotes().
$order->products is not set in uc_cart_checkout_form(), and I notice that the cart pane inside of uc_checkout_pane_cart() simply has:
case 'view':
$order->products = uc_cart_get_contents();
to fix this issue. I've added a similar line to uc_checkout_pane_quotes() as a solution for now.
Comments
Comment #1
inolen CreditAttribution: inolen commented*bump*
Just updated my Ubercart and noticed this problem still exists.
Comment #2
TR CreditAttribution: TR commentedCould you please give steps to reproduce this problem?
Comment #3
inolen CreditAttribution: inolen commentedHey TR,
I think I just realized why this bug was happening solely to me - I had my shipping quotes pane above my shopping cart pane. If you have them as normal, I think the hack I mentioned from the shipping cart pane is applied before the shipping quotes pane is rendered.
So, try making your shipping quote pane as your first pane during checkout, add some items and press checkout.
Comment #4
longwaveWe should build the $order object as much as possible before invoking any of the panes to avoid this. Presumably if you disable the cart contents pane, the order goes through checkout with no products at all!
Comment #5
longwaveThis is sort of related to #1057488: Order object lifetime and save issues in Ajax checkout. I think the whole order object lifetime could be streamlined during checkout which would avoid problems like this.
Comment #6
longwaveFix committed: http://drupalcode.org/project/ubercart.git/commitdiff/07fe5f0