让ecshop支持小数购买和自定义商品单位

2016-07-07 15:01 来源:www.chinab4c.com 作者:ecshop专家



ALTER TABLE ecs_cart MODIFY goods_number decimal(7,2);

ALTER TABLE ecs_order_goods MODIFY goods_number decimal(7,2);
ALTER TABLE ecs_goods MODIFY goods_number decimal(7,2);
ALTER TABLE ecs_delivery_goods MODIFY send_number decimal(7,2);

ALTER TABLE ecs_order_goods MODIFY send_number decimal(7,2);
3:flow.php
function flow_update_cart($arr)
{
/* 处理 */
foreach ($arr AS $key => $val)
{
$val = make_semiangle($val);
if ($val <= 0 && !is_numeric($key))
{
continue;
}

4:goods.php
修改成
$number= (isset($_REQUEST['number'])) ? $_REQUEST['number'] : 1;

5:flow.php



if (!is_numeric($goods->number) || intval($goods->number) <= 0)
修改成
if (!is_numeric($goods->number) || $goods->number <= 0)

6:admin/order.php的order_list()

检索o.best_time,

7:admin/order.php
删除
array_walk($_REQUEST['send_number'], 'intval_array_walk');

9:
insert into ecs_shop_config (parent_id,code,type) values('1','config_unit','textarea');

$_LANG['cfg_name']['config_unit'] = '数量单位';

10:
alter table ecs_goods add column config_unit varchar(64);


11:admin/goods.php
if($_CFG['config_unit']){

此方法不但能支持购买,而且能避免发货失败的问题

来源:http://www.chinab4c.com

回答:
小数购买有什么实际意义吗?