Hi
warning: Invalid argument supplied for foreach()
this is error i got from the url "admin/ecsettings/location" in section
Physical Dimensions
after some time of RnD
added modified some code... in the file store.admin.inc
// Physical dimensions
$measures = _store_location_measures();
<b>
$weight= array();
$volume= array();
$length= array();
$area= array();
foreach($measures as $key=>$itm){
if ($itm['type'] == 'weight'){
$weight[$key] = $itm['name'];
}
if ($itm['type'] == 'volume'){
$volume[$key] = $itm['name'];
}
if ($itm['type'] == 'length'){
$length[$key] = $itm['name'];
}
if ($itm['type'] == 'area'){
$area[$key] = $itm['name'];
}
}
</b>
$form['dimensions'] = array(
'#collapsible' => TRUE,
'#title' => t('Physical Dimensions'),
'#tree' => FALSE,
'#type' => 'fieldset'
);
$form['dimensions']['ec_measure_weight'] = array(
'#default_value' => variable_get('ec_measure_weight', 'LB'),
'#description' => t('Default unit measure of weight.'),
'#options' => <b>$weight, //$measures['weight'],</b>
'#title' => t('Weight'),
'#type' => 'select'
);
$form['dimensions']['ec_measure_length'] = array(
'#default_value' => variable_get('ec_measure_length', 'IN'),
'#description' => t('Default unit measure of length.'),
'#options' => <b>$length, //$measures['length'],</b>
'#title' => t('Length'),
'#type' => 'select'
);
$form['dimensions']['ec_measure_area'] = array(
'#default_value' => variable_get('ec_measure_area', 'IN2'),
'#description' => t('Default unit measure of area.'),
'#options' => <b>$area, //$measures['area'],</b>
'#title' => t('Area'),
'#type' => 'select'
);
$form['dimensions']['ec_measure_volume'] = array(
'#default_value' => variable_get('ec_measure_volume', 'IN3'),
'#description' => t('Default unit measure of volume.'),
'#options' => <b>$volume, // $measures['volume'],</b>
'#title' => t('Volume'),
'#type' => 'select'
);
Thanks
Vinoth
Comments
Comment #1
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.