Browse files

Shipping changes

Signed-off-by: Gergely <t-gely@freemail.hu>
  • Loading branch information...
1 parent 8228476 commit a29b1232b293e7d900856d9943b6a6b2c998f9a4 @tgely committed Mar 14, 2011
View
10 ...e/Admin/includes/functions/cfg_parameters/osc_cfg_set_shipping_methods_checkbox_field.php
@@ -7,22 +7,24 @@
it under the terms of the GNU General Public License v2 (1991)
as published by the Free Software Foundation.
*/
-
+// Note: To get languages Def need shipping class or have to define title in payment admin language file!
use osCommerce\OM\Core\Registry;
-
+ use osCommerce\OM\Core\OSCOM;
+
function osc_cfg_set_shipping_methods_checkbox_field($default, $key = null) {
$OSCOM_Database = Registry::get('Database');
$name = (empty($key)) ? 'configuration_value' : 'configuration[' . $key . '][]';
$shipping_array = array();
- $Qshipping = $OSCOM_Database->query("select code from :table_templates_boxes where modules_group = 'Shipping' order by code");
+ $Qshipping = $OSCOM_Database->query('select title, code from :table_templates_boxes where modules_group = :shipping order by title');
+ $Qshipping->bindValue(':shipping', 'Shipping');
$Qshipping->execute();
while ( $Qshipping->next() ) {
$shipping_array[] = array('id' => $Qshipping->value('code') . '_' . $Qshipping->value('code'),
- 'text' => $Qshipping->value('code'));
+ 'text' => OSCOM::getDef($Qshipping->value('title')));
}
return osc_draw_checkbox_field($name, $shipping_array, explode(',', $default), null, '<br />');

0 comments on commit a29b123

Please sign in to comment.