4

I have no clue what is the purpose of time_condition field in admin page.

Class File:

Mage_Adminhtml_Block_System_Config_Form_Field_Import ... {
    public function getElementHtml() {
        ...
        $('time_condition').value = '_' + conditionNameElement.value + '/' + Math.random();
        ...
    }
}

I tried to search all *.php, *.phtml, *.js files for this string "time_condition", the result seems no server or client codes using this field. Is this field useful?

2

I found a place where it is used.

Go to System -> Configuration -> Sales -> Shipping Methods -> Table Rates.

Change scope to website.

Now you will see Import fields in configuration list.

This field uses $('time_condition').value.

You can open browser console and search for it.

So I found that when you change "Condition" field, the value of

<input id="time_condition" type="hidden" name="groups[tablerate][fields][import][value]" value="_package_value/0.8849172815680504">

is changed. After it is saved to core_config_data by carriers/tablerate/import path.

But still this config value is never used. At least I did not found any exact occurrences.

7
  • Oleksii, appreciate for your findings. Exactly as you said that value was changed when onchange event occurred on condition field. I did a check on database using below query, seems that value never store in database. select * from CORE_CONFIG_DATA where path like 'carriers/tablerate%';
    – Leongelis
    Mar 10 '14 at 13:15
  • It will be stored if you save(at least once) config for shipping methods. Mar 10 '14 at 13:23
  • The value corresponds to uploaded file name INSERT INTO core_config_data (config_id, scope, scope_id, path, value) VALUES(1036, 'websites', 1, 'carriers/tablerate/import', 'tablerates (1).csv');
    – Leongelis
    Mar 10 '14 at 14:13
  • After file select before saving change "Condition" field. Mar 10 '14 at 15:15
  • Yep, I did it before saving =)
    – Leongelis
    Mar 10 '14 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.