不用飞了,大家可以到这里看看www.verygoodbuy.com
我想在shipping mothed 里面加一个下拉框,里面列举送货的地址和费用,
因为代码是下载过来改的,我看了好久,在这个问题上没有进展.
源代码可以到这里下载www.oscommerce.com下载,我整理一下,然后再发点代码上来.请大家执教!
zairwolf(君子兰) ,你说的QQ是多少呢。。谢谢各位!
我想在shipping mothed 里面加一个下拉框,里面列举送货的地址和费用,
因为代码是下载过来改的,我看了好久,在这个问题上没有进展.
源代码可以到这里下载www.oscommerce.com下载,我整理一下,然后再发点代码上来.请大家执教!
zairwolf(君子兰) ,你说的QQ是多少呢。。谢谢各位!
解决方案 »
- 配置Apache+PHP的一点小感受
- 散分~~求记事本代码
- $_SERVER 这个变量是系统定义变量吗?但我在PHP手册中怎么找不到?
- 随机调用图片
- 请问向目录下的index.php传值时可以写成两个样子吧
- update数据更新问题
- ■■■■■■如何使用正则表达式去掉括号内的字符??
- php老是抱的一个错误,自己看不懂,高手帮忙看看,谢谢!
- 为什么出现enable open files的字样啊???(很急帮帮我啊)
- 在windows下mysql+php+apache如何配置session()
- 高分问:exec("/bin/tar -xf /usr/local/update/newfile")不执行问题
- 初学:PHP+MS SQL SERVER ???
/* Released under the GNU General Public License*/ class tollzipzones {
var $code, $title, $description, $enabled, $num_zones, $surcharge_factor;// class constructor:w function tollzipzones() {
$this->code = 'tollzipzones';
$this->title = MODULE_SHIPPING_TOLLZIPZONES_TEXT_TITLE;
$this->description = MODULE_SHIPPING_TOLLZIPZONES_TEXT_DESCRIPTION;
$this->icon = DIR_WS_ICONS . 'toll_sml.gif';
$this->enabled = MODULE_SHIPPING_TOLLZIPZONES_STATUS; // Customize this setting for the number of zones needed (no change required by default)
$this->num_zones = 1; //More options can be added later for Express, Overnight etc when someone codes it.
$this->types = array('Toll Off-Peak' => 'std'); // Change this surcharge factor to increase your profit margin on freight
}// class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes;
$shzones_array = array();
$shzones = tep_db_query("select * from " . TABLE_SHZONES ."");
while ($shzones_values = tep_db_fetch_array($shzones)){ $shzones_array[] = array('zone_id' => $shzones_values['zone_id'],
'zone_name' => $shzones_values['zone_name'],
'fee' => $shzones_values['fee']);
}
$shzones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
$shzones = $shzones_array;
for ($i=0, $n=sizeof($shzones); $i<$n; $i++) {
$shzones_array[] = array('id' => $shzones[$i]['zone_id'], 'text' => $shzones[$i]['zone_name'] , 'fee' => $shzones[$i]['fee']);
} $field = '<select name="zones"';
$values=$shzones_array;
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
if ($default == $values[$i]['id']) {
$field .= ' SELECTED';
} $field .= '>'.tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . tep_output_string($values[$i]['fee'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_TOLLZIPZONES_TEXT_TITLE,
'methods' => array(array('id' => $this_code,
'title' => MODULE_SHIPPING_TOLLZIPZONES_TEXT_DESCRIPTION,
'cost' => $cost+ MODULE_SHIPPING_TOLLZIPZONES_HANDLING)));
//1.10 added to calculate 10% GST on freight in Australia
if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);
if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_TOLLZIPZONES_INVALID_ZONE;
return $this->quotes;
}
function install() {
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Enable Toll Postcode Zones Method', 'MODULE_SHIPPING_TOLLZIPZONES_STATUS', '1', 'Do you want to offer Toll postcode/zone rate shipping?', '6', '0', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_TOLLZIPZONES_HANDLING', '0', 'Handling Fee for this shipping method', '6', '0', now())");
} function remove() {
$keys = '';
$keys_array = $this->keys();
for ($i=0; $i<sizeof($keys_array); $i++) {
$keys .= "'" . $keys_array[$i] . "',";
}
$keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
} function keys() {
$keys = array(
'MODULE_SHIPPING_TOLLZIPZONES_STATUS',
'MODULE_SHIPPING_TOLLZIPZONES_HANDLING',
); return $keys;
}
}
?>
怎么样把下拉框中被选中的项得值传到$this->quotes里面来!