def_payment_msg missing (causing JS error) on checkout page if "Show the order total preview on the payment pane." not checked

Project: 
Ubercart
Category: 
bug report
Version: 
Ubercart 1.3
Priority: 
critical
Status: 
fixed

This is a bit of an evil bug.

With "Show the order total preview on the payment pane." (/admin/store/settings/checkout/edit/panes) not set, the http://api.ubercart.org/api/function/uc_checkout_pane_payment/1.0 is never called. And its in uc_checkout_pane_payment that def_payment_msg is set, with it not there, JS errors and quits.

This problem is further compacted by the bug I'm about to submit, which is that if there is no JS, there is no selection of shipping - which means in some cases, you cant check out.

Re: def_payment_msg missing (causing JS error) on checkout page

I have no clue why I'm defining that variable in that if statement. I moved it up and am committing the change. Also, I posted a follow-up patch at d.o as a reminder for myself (or anyone willing to get it done) that variables don't need to be defined inline but can use the 'setting' $type to add the variable to the Drupal.setting object. I'd like to update all my modules to do this for D6.

Reference: http://api.drupal.org/api/function/drupal_add_js/6