The text displayed to the user when the order is below the minimum is in the variable uc_minimum_subtotal_text, but there is nowhere in the UI to actually set this:

~/Sites/_sandbox/ubercart-DRUPAL-6--2 joachim$ ack uc_minimum_subtotal_text
uc_cart/uc_cart.module
265:  $conf['i18n_variables'][] = 'uc_minimum_subtotal_text';

uc_cart/uc_cart.pages.inc
84:      drupal_set_message(variable_get('uc_minimum_subtotal_text', t('The minimum order subtotal for checkout is !min.', array('!min' => uc_price($min, $context)))), 'error');

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

Patch.

This could be more graceful with token replacement for the minimum value (and maybe other stuff like site name, site email, etc).
But this works for now and I'm too pushed for time to go digging for how that stuff is done :/

tr’s picture

Status: Needs review » Needs work

Currently, the uc_minimum_subtotal_text variable can be changed using Locale or String Overrides, and it can be translated. There is just no UI to change it. The problem with your patch is that the minimum subtotal shown in the message can't be changed except by hardwiring it in. For example, when you first set up a store, uc_minimum_subtotal will be zero, so the uc_minimum_subtotal_text will get set to "The minimum order subtotal for checkout is $0.00", and the amount will *stay* $0.00 even if the uc_minimum_subtotal variable is changed. So the only way to make the message reflect correct value is to explicitly change the message from the admin menu when the minimum subtotal is changed. This makes it impossible for the value to change based on the store's currency, for example. That's in contrast to the way it is now, where the message will always display the proper value because the substitution is done dynamically. In fact, the message variable is never set, so it's never used and can safely be eliminated

If you want to roll a patch to add a token for the minimum subtotal, and to do token replacement on the message text in the admin menu, I'd be willing to try that out and commit the patch if it works.

tr’s picture

Status: Needs work » Closed (works as designed)