Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


ce7

Recommended Posts

Hi,

I have BS Frozen version with few addons, the addon i am having issue is Random Unique Code ( Author copy from Handling Fee (http://addons.oscommerce.com/info/1190) ), they both have same configuration problem.

The correct one (one the right) should show up the description :

9546 Allow Unique Code
Do you want to allow Unique Code?
9546-Error-04.png.789a14fcb0c23db5b280cfd62468b917.png

However it doesn't shop up, as see on the left.
Here are the code:

  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('9546 Display Unique Code', 'MODULE_ORDER_TOTAL_UNIQUECODE_STATUS', 'true', 'Do you want to display the Unique Code?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', '9546 MODULE_ORDER_TOTAL_UNIQUECODE_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
      // BOF Not show up properly
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('9546 Allow Unique Code', 'MODULE_ORDER_TOTAL_UNIQUECODE_HANDLING_FEE', 'true', 'Do you want to allow Unique Codes?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('9546 Unique Code For Orders Under', 'MODULE_ORDER_TOTAL_UNIQUECODE_ORDER_UNDER', '50', 'Add the Unique Code to orders under this amount.', '6', '4', 'currencies->format', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('9546 How many unique code digit?', 'MODULE_ORDER_TOTAL_UNIQUECODE_DIGIT', '2', 'How many unique digit you want to setup?', '6', '8', now())");      
        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('9546 Unique Code', 'MODULE_ORDER_TOTAL_UNIQUECODE_FEE', '5', 'Low order fee.', '6', '5', 'currencies->format', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('9546 Attach Unique Code On Orders Made', 'MODULE_ORDER_TOTAL_UNIQUECODE_DESTINATION', 'both', 'Attach Unique Code for orders sent to the set destination.', '6', '6', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
      // EOF Not show up properly      
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('9546 Tax Class', 'MODULE_ORDER_TOTAL_UNIQUECODE_TAX_CLASS', '0', 'Use the following tax class on the Unique Code.', '6', '7', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); [/php}

Can someone please help and point out what is wrong here?

Many thanks!  Lyn

 

Link to comment
Share on other sites

Ok took some time to look at this, from what I can tell the add-on as it is will not install on frozen, PM me and I will explain the forum is just too silly at the moment. I fixed file and it install fine now see below. Problem is i know nothing about this add-on so you will need to explain to me how and what to test? As I said if you need the fixed file and further info just PM me.

image.thumb.png.bd4f338adbd334fefb38728dd4246124.png

 

Link to comment
Share on other sites

Hello lyn @ce7,

It looks like the configuration constants for the entries which do not show up are missing in the keys function.

Try to add them to the list:

    function keys() {

For the eval code error, edit admin/modules_content.php and change line 297 to:

          eval('$keys .= ' . $value['set_function'] . "'" .  tep_db_input($value['value']) . "', '" . $key . "');");

 

 

Best regards
Rainer

Link to comment
Share on other sites

Hi lyn,

I will pm you the corrected files, uninstall the broken one and install the new one, it should just install now. Then simply PM me the changes you are trying to make and I will test them on my test site first and if they work you can try them.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...