购物车简化.doc_第1页
购物车简化.doc_第2页
购物车简化.doc_第3页
购物车简化.doc_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一、ecshop购买流程简化时间:2010-07-17 12:18来源: 作者:admin 点击:1034 咨询qq:760868471咨询旺旺ecshop购买流程,其实是非常复杂的,也非常的让人感觉很烦琐为了让ecshop购买流程得到进一步的简化。我们可以通过对ecshop的flow.php程序进行改进这样就能方便的让ecshop支持购买流香港公司注册 ecshop购买流程,其实是非常复杂的,也非常的让人感觉很烦琐为了让ecshop购买流程得到进一步的简化。我们可以通过对ecshop的flow.php程序进行改进这样就能方便的让ecshop支持购买流程的优化1:flow.php加以下代码 elseif ($_REQUESTstep = list_shipping) include_once(includes/cls_json.php); $json = new JSON; $result = array(error = , content = , need_insure = 0); /* 取得配送列表 */ $flow_type = isset($_SESSIONflow_type) ? intval($_SESSIONflow_type) : CART_GENERAL_GOODS; $string = trim($_REQUESTstring); $ar = explode(,$string); $region = array($ar0, $ar1, $ar2, $ar3); $_SESSIONflow_consignee = array(); $consigneecountry = $ar0; $consigneeprovince= $ar1; $consigneecity= $ar2; $consigneedistrict= $ar3; $_SESSIONflow_consignee = stripslashes_deep($consignee); $cart_goods = cart_goods($flow_type); / 取得商品列表,计算合计 $order = flow_order_info(); $smarty-assign(order, $order); /* 计算折扣 */ if ($flow_type != CART_EXCHANGE_GOODS & $flow_type != CART_GROUP_BUY_GOODS) $discount = compute_discount(); $smarty-assign(discount, $discountdiscount); $favour_name = empty($discountname) ? : join(, $discountname); $smarty-assign(your_discount, sprintf($_LANGyour_discount, $favour_name, price_format($discountdiscount); /* * 计算订单的费用 */ $total = order_fee($order, $cart_goods, $consignee); $smarty-assign(total, $total); $shipping_list = available_shipping_list($region); $cart_weight_price = cart_weight_price($flow_type); $insure_disabled = true; $cod_disabled = true; / 查看购物车中是否全为免运费商品,若是则把运费赋为零 $sql = SELECT count(*) FROM . $ecs-table(cart) . WHERE session_id = . SESS_ID. AND extension_code != package_buy AND is_shipping = 0; $shipping_count = $db-getOne($sql); foreach ($shipping_list AS $key = $val) $shipping_cfg = unserialize_config($valconfigure); $shipping_fee = ($shipping_count = 0 AND $cart_weight_pricefree_shipping = 1) ? 0 : shipping_fee($valshipping_code, unserialize($valconfigure), $cart_weight_priceweight, $cart_weight_priceamount, $cart_weight_pricenumber); $shipping_list$keyformat_shipping_fee = price_format($shipping_fee, false); $shipping_list$keyshipping_fee = $shipping_fee; $shipping_list$keyfree_money = price_format($shipping_cfgfree_money, false); $shipping_list$keyinsure_formated = strpos($valinsure, %) = false ? price_format($valinsure, false) : $valinsure; /* 当前的配送方式是否支持保价 */ if ($valshipping_id = $ordershipping_id) $insure_disabled = ($valinsure = 0); $cod_disabled = ($valsupport_cod = 0); $smarty-assign(shipping_list, $shipping_list); $smarty-assign(insure_disabled, $insure_disabled); $smarty-assign(cod_disabled, $cod_disabled); $resultcontent = $smarty-fetch(library/shipping.lbi); echo $json-encode($result); exit; 2:flow.dwt里面把consignee.lbi内容拿过来 3:flow.php中增加下拉 include_once(includes/lib_transaction.php); /* 取得购物类型 */ $flow_type = isset($_SESSIONflow_type) ? intval($_SESSIONflow_type) : CART_GENERAL_GOODS; /* * 收货人信息填写界面 */ /* 取得国家列表、商店所在国家、商店所在国家的省列表 */ $smarty-assign(country_list, get_regions(); $smarty-ass

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论