It would be nice to allow for a configurable COD message

the default found on line 136 of
ubercart\payment\uc_payment_pack\uc_payment_pack.module
has been stored in the "variables" table but there is nowhere for the user to set it

      $details = variable_get('uc_cod_policy', t('Full payment is expected upon delivery or prior to pick-up.'));
CommentFileSizeAuthor
#2 544596_cod_message.patch734 bytesIsland Usurper

Comments

giorgosk’s picture

correction
the 'uc_cod_policy' variable is never stored in the 'variable' table
because we never call variable_set('uc_cod_policy','....

Island Usurper’s picture

Status: Active » Fixed
StatusFileSize
new734 bytes

Looks like it was just an oversight. Added a form element to the payment method settings.

giorgosk’s picture

Seemed like an oversight ;-)

Thanks patch is working

giorgosk’s picture

Title: Configurable COD message » Translatable and configurable COD message
Status: Fixed » Active

The message needs the option to be translatable by the admin I assume

added the t() function

$details = t(variable_get('uc_cod_policy', t('Full payment is expected upon delivery or prior to pick-up.')));

but still does not work ...
have the feeling it is related to the ajaxy update functionality !!!

giorgosk’s picture

Tried also

putting 'uc_cod_policy', in settings.php to make it internationalization variable
and visiting the admin/store/settings/payment/edit/methods for each language
lets you create a string for each language

$conf['i18n_variables'] = array(
...
...
...
'uc_cod_policy',
);

but it does not seem work !!!

the settings pages will actually let you configure seperate string for each language but on the checkout page only the english is displayed (no matter what the language)

Island Usurper’s picture

Title: Translatable and configurable COD message » Configurable COD message
Status: Active » Fixed

It's not the variable itself. (I have a patch to make all of the Ubercart variables translatable, so this was convenient for me to test.) Instead, it's because the path to the AHAH callback to get the payment method details isn't including the langcode at the front. If you set your account's default language to something else, it will show up in that language.

Since the problem will affect more than just the COD policy message, I've made a new issue at #546022: Make AHAH callbacks translated during checkout/editing orders and set this one back to fixed.

Status: Fixed » Closed (fixed)

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