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

inolen’s picture

*bump*

Just updated my Ubercart and noticed this problem still exists.

TR’s picture

Status: Active » Postponed (maintainer needs more info)

Could you please give steps to reproduce this problem?

inolen’s picture

Hey 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.

longwave’s picture

Status: Postponed (maintainer needs more info) » Active

We 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!

longwave’s picture

This 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.

longwave’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.