shopex 订单号是哪个文件生成的? 不是ecshop
3个回答
推荐于2016-03-27
展开全部
你可以看一下core/shop/controller/ctl.order.php里有一个方法:
function create(){
$this->begin($this->system->mkUrl('cart', 'checkout'));
$this->_verifyMember(false);
foreach($_POST['minfo'] as $k=>$v){
foreach($v as $a=>$b){
$_POST['minfo'][$k][$a]['value'] = strip_tags($b['value']);
}
}
foreach($_POST['delivery'] as $kec=>$kev){
$_POST['delivery'][$kec] = strip_tags($kev);
}
$order = &$this->system->loadModel('trading/order');
$oCart = &$this->system->loadModel('trading/cart');
$oCart->checkMember($this->member);
if($_POST['isfastbuy']){
$cart = $oCart->getCart('all',$_COOKIE['Cart_Fastbuy']);
}else{
$cart = $oCart->getCart('all');
}
if($_POST['delivery']['ship_addr_area']!=''){
$_POST['delivery']['ship_addr'] = str_replace('^\s+|\s+$','',$_POST['delivery']['ship_addr_area'].$_POST['delivery']['ship_addr']);
}
$orderid = $order->create($cart, $this->member,$_POST['delivery'],$_POST['payment'],$_POST['minfo'],$_POST);
if($orderid){
if($_POST['fromCart'] && !$_POST['isfastbuy']){
$oCart->removeCart();
}
/* $this->redirect('index','order',array($orderid)); */
}else{
trigger_error(__('对不起,订单创建过程中发生问题,请重新提交或稍后提交'),E_USER_ERROR);
}
$this->system->setcookie('ST_ShopEx-Order-Buy', md5($this->system->getConf('certificate.token').$orderid));
$account=$this->system->loadModel('member/account');
$account->fireEvent('createorder',$this->member,$this->member['member_id']);
$this->end_only(true, __('订单建立成功'), $this->system->mkUrl('order', 'index', array($orderid)));
$GLOBALS['pageinfo']['order_id'] = $orderid;
$this->redirect('order','index',array($orderid));
}
function create(){
$this->begin($this->system->mkUrl('cart', 'checkout'));
$this->_verifyMember(false);
foreach($_POST['minfo'] as $k=>$v){
foreach($v as $a=>$b){
$_POST['minfo'][$k][$a]['value'] = strip_tags($b['value']);
}
}
foreach($_POST['delivery'] as $kec=>$kev){
$_POST['delivery'][$kec] = strip_tags($kev);
}
$order = &$this->system->loadModel('trading/order');
$oCart = &$this->system->loadModel('trading/cart');
$oCart->checkMember($this->member);
if($_POST['isfastbuy']){
$cart = $oCart->getCart('all',$_COOKIE['Cart_Fastbuy']);
}else{
$cart = $oCart->getCart('all');
}
if($_POST['delivery']['ship_addr_area']!=''){
$_POST['delivery']['ship_addr'] = str_replace('^\s+|\s+$','',$_POST['delivery']['ship_addr_area'].$_POST['delivery']['ship_addr']);
}
$orderid = $order->create($cart, $this->member,$_POST['delivery'],$_POST['payment'],$_POST['minfo'],$_POST);
if($orderid){
if($_POST['fromCart'] && !$_POST['isfastbuy']){
$oCart->removeCart();
}
/* $this->redirect('index','order',array($orderid)); */
}else{
trigger_error(__('对不起,订单创建过程中发生问题,请重新提交或稍后提交'),E_USER_ERROR);
}
$this->system->setcookie('ST_ShopEx-Order-Buy', md5($this->system->getConf('certificate.token').$orderid));
$account=$this->system->loadModel('member/account');
$account->fireEvent('createorder',$this->member,$this->member['member_id']);
$this->end_only(true, __('订单建立成功'), $this->system->mkUrl('order', 'index', array($orderid)));
$GLOBALS['pageinfo']['order_id'] = $orderid;
$this->redirect('order','index',array($orderid));
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
深圳神光
2024-10-28 广告
2024-10-28 广告
作为深圳市神光数据技术有限公司的一员,我们非常注重产品的用户体验和数据操作的便捷性。我们推出的跨境电商选品软件,不仅提供深度的数据分析功能,还支持将数据分析结果轻松导出。用户可以根据自身需求,将分析结果保存为多种格式的文件,便于在团队内部共...
点击进入详情页
本回答由深圳神光提供
展开全部
数据库中.而不是文件..plugins/widgets/transport/这个目录下的文件。用Editplus打开default.html
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
如果你知道了,可以告诉我,我也在学习shopex。不是很熟悉。希望多交流
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询