当前位置: 首页 > news >正文

网站上传附件目录格式模板网站好优化吗

网站上传附件目录格式,模板网站好优化吗,全国领先网站制作,网站制作容易吗怎么样问题: 当商品设置限购为 1 时,够买数量未超过限购,但是还是提示超出限购数量 修复方法: 修改代码路径: app\common\repositories\store\order\StoreOrderCreateRepository.php 修改代码一: i s p a y s a r r a y u n i q u e ( a r r a y c o l u m n ( is_pays array_un…

问题: 当商品设置限购为 1 时,够买数量未超过限购,但是还是提示超出限购数量

修复方法:

修改代码路径:

app\common\repositories\store\order\StoreOrderCreateRepository.php
修改代码一: i s p a y s = a r r a y u n i q u e ( a r r a y c o l u m n ( is_pays = array_unique(array_column( ispays=arrayunique(arraycolumn(merchantCart[‘list’],‘is_pay’));
if ( count($is_pays) > 1 || $is_pays[0] == 1) throw new ValidateException(‘存在已购买商品请重新添加购物车’);
// 获取每个商品的ID数组
p r o d u c t i d s = a r r a y c o l u m n ( product_ids = array_column( productids=arraycolumn(merchantCart[‘list’],‘product_id’);
n u m d a t a = a r r a y c o l u m n ( num_data = array_column( numdata=arraycolumn(merchantCart[‘list’],‘cart_num’);
i d n u m = [ ] ; / / 获取每个商品 I D 出现的次数及购买数量,作为验证限购数量使用 f o r e a c h ( id_num = []; // 获取每个商品ID出现的次数及购买数量,作为验证限购数量使用 foreach ( idnum=[];//获取每个商品ID出现的次数及购买数量,作为验证限购数量使用foreach(product_ids as $key => $value) {
i d n u m [ id_num[ idnum[value] = isset( i d n u m [ id_num[ idnum[value]) ? i d n u m [ id_num[ idnum[value] + n u m d a t a [ num_data[ numdata[key] : n u m d a t a [ num_data[ numdata[key];
}
c o u n t L i s t = c o u n t ( countList = count( countList=count(merchantCart[‘list’]);
修改后的样子:在这里插入图片描述
修改代码二:

$count = i d n u m [ id_num[ idnum[cart[‘product_id’]];
if (($count) > $cart[‘product’][‘once_max_count’]) {
throw new ValidateException(‘[超出限购总数:’ . c a r t [ ′ p r o d u c t ′ ] [ ′ o n c e m a x c o u n t ′ ] . ′ ] ′ . m b s u b s t r ( cart['product']['once_max_count'] . ']' . mb_substr( cart[product][oncemaxcount].].mbsubstr(cart[‘product’][‘store_name’], 0, 10) . ‘…’);
}
$pay_count = s t o r e O r d e r R e p o s i t o r y − > g e t M a x C o u n t N u m b e r ( storeOrderRepository->getMaxCountNumber( storeOrderRepository>getMaxCountNumber(cart[‘uid’], c a r t [ ′ p r o d u c t i d ′ ] ) ; i f ( ( cart['product_id']); if (( cart[productid]);if((count + $pay_count) > $cart[‘product’][‘once_max_count’]) {
throw new ValidateException(‘[超出限购总数:’ . c a r t [ ′ p r o d u c t ′ ] [ ′ o n c e m a x c o u n t ′ ] . ′ ] ′ . m b s u b s t r ( cart['product']['once_max_count'] . ']' . mb_substr( cart[product][oncemaxcount].].mbsubstr(cart[‘product’][‘store_name’], 0, 10) . ‘…’);
}
修改后的样子:在这里插入图片描述
最后:修改完了需要重启swoole服务

http://www.yayakq.cn/news/727290/

相关文章:

  • 建设小游戏网站空间类型选择网页设计做军事网站的感想
  • 门户网站建设工序教育公司 网站建设
  • 定制网站建设公司电话行政审批网站开发文档
  • 郑州网站建设灵秀昌大建设怎么样
  • 省财政厅经济建设处网站企业网络方案设计思路
  • 悟空建站seo服务自助建网站
  • 越秀区营销型网站建设宜昌市住房和城乡建设厅官方网站
  • 网站建设能带来流量么做化工行业网站
  • 建设谷歌公司网站费用河南省最新通知
  • 网站标准字体线上推广费用预算
  • 网站开发php和ui做网站需要的企业
  • 艺商网站最权威的公文写作网站
  • 网站模块标准版昆明云南微网站建设
  • 网站推广 公司成都网上注册公司流程
  • 中小学网站建设论文番禺网站开发哪家专业
  • 网站开发工程师的要求php网站制作教程
  • 网站域名 文件夹有电脑网站怎么做手机网站
  • 有没有可以做翻译的网站北京 做网站
  • 湖北公司响应式网站建设推荐成品网站w灬源码伊甸3m8u
  • 网站页面设计说明怎么写企业网站的开发流程
  • 网页设计班级网站用什么做首页深圳品牌策划
  • 珠海网站建设网络推广个人做淘宝客网站不能备案吗
  • 南昌商城网站建设公司网站建设实施规范
  • 百度站长资源平台一个网络空间如何做两个网站
  • ppt哪个网站质量高付费wordpress主题
  • 东莞南城电子网站建设西宁的网站设计
  • 369网站建设中心用户反馈数据分析软件园
  • ios移动网站开发详解网上自学电脑课程
  • 艺术学校网站模板同一个服务器可以做多个网站
  • 电子外贸网站模板商城网站建设软件