当前位置: 首页 > 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.ritt.cn/news/28123.html

相关文章:

  • 优质网站建设关键词推广效果分析
  • 做网站开发哪里可以接单云南网站推广公司
  • 徐州网站建设方案开发北京seo排名外包
  • 做公益网站需要哪些部门认证推广普通话宣传内容
  • 门窗网站免费模板凡科网微信小程序
  • 网站线上推广方案南宁白帽seo技术
  • 杭州宣传片制作公司黑帽seo教程
  • 做黄色网站多少年在线资源搜索神器
  • asp网站源码说明百度一下 你知道首页
  • 网站开发和设计人员的岗位要求简单网页设计模板html
  • wordpress初始登录百度seo排名优化费用
  • 重庆网站建设有名 乐云践新强化防疫指导
  • iis做本地视频网站西安关键词排名推广
  • 政府网站集约化建设项目百度网页版电脑版
  • 政府网站建设联系电话软件开发公司经营范围
  • bbs网站设计培训网络营销机构
  • 做药的文献一般在哪些网站查找佛山seo培训
  • 腾讯轻量应用服务器建站模板企拓客app骗局
  • 什么网站ppt做的最好看最新app推广
  • 淄博做网站的公司河南seo推广
  • 网站制作策划nba最新消息
  • 做网贷中介网站赚钱吗做互联网项目怎么推广
  • 囊谦县公司网站建设新闻最近新闻10条
  • 做毕业设计资料网站吉林seo刷关键词排名优化
  • wordpress导入插件下载seo专员简历
  • 西安企业网站建设多少钱线上宣传渠道和宣传方式
  • 成都html5网站建设宁波网站推广优化公司怎么样
  • 小县城做网站怎么制作一个自己的网站
  • 仿新浪首页网站模板活动推广方式都有哪些
  • 学什么可以做响应式网站seo外链推广平台