ecmall二次开发每个商品订购增加备注功能

2010-01-27 00:05 来源:www.chinab4c.com 作者:admin

ecmall二次开发每个商品订购增加备注功能

1:includes/ordertypes/normal.otype.phpfunction submit_order($data)

'beizhu'           =>  $value['beizhu'],

2:order_goods,cart增加备注字段beizhu

3:app/cart.app.php function add()增加以下

$beizhu   = isset($_GET['beizhu']) ? trim($_GET['beizhu']) : 0;

//修改备注

              $where = "spec_id={$spec_id} AND session_id='" . SESS_ID . "'";

        $model_cart =& m('cart');

 

                     /* 修改数量 */

                     $model_cart->edit($where, array(

                           

                            'beizhu'    => $beizhu

                     ));

/* 将商品加入购物车 */

        $cart_item = array(

            'user_id'       => $this->visitor->get('user_id'),

            'session_id'    => SESS_ID,

            'store_id'      => $spec_info['store_id'],

            'spec_id'       => $spec_id,

            'goods_id'      => $spec_info['goods_id'],

            'goods_name'    => addslashes($spec_info['goods_name']),

            'specification' => addslashes(trim($specification)),

            'price'         => $spec_info['price'],

            'quantity'      => $quantity,

            'goods_image'   => addslashes($spec_info['default_image']),

                     'beizhu'           =>$beizhu

        );

4buyer_order.index.html

<p class="price">{$lang.beizhu}: <span>{$goods.beizhu}</span></p>

5:default/seller_order.index.html

<td class="align2">{$order.beizhu|escape}</td>

 来源:中国B4C电子商务

来源于香港公司注册管理专家