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

如何做网站充值网络推广整合平台

如何做网站充值,网络推广整合平台,建立网站wordpress,怎么做网站设计问题: 当商品设置限购为 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.zhongyajixie.com/news/13947.html

相关文章:

  • 做外贸b2b免费网站网页设计制作
  • 手机微网站建设深圳网站建设推广方案
  • 网络哪里能接活做网站优化疫情防控措施
  • 免费自助建站长沙seo优化公司
  • 好用的网站后台管理系统百度关键词热度排名
  • 旗袍网站架构seo排名快速
  • 医药网站建设方案汉中网站seo
  • 做网站怎么插入音乐百度服务热线
  • 济南建网站最好的网站建设免费
  • 广州网站开发公司有哪些seo sem是什么职位
  • 揭阳专业做网站公司优化seo
  • 免费做网站方案2023b站免费推广入口游戏
  • wordpress登录背景搜索引擎关键词排名优化
  • 自己做的网站 打开了没有图片在线查网站的ip地址
  • 用 htmi5做网站刷关键词排名软件
  • it外包公司 能去吗seo免费推广
  • 海南省建设人力资源网站厦门谷歌推广
  • 镇江专业网站建设百度账户
  • 网站做的图上传后字变得很模糊十大流量平台
  • app开发公司选择技巧江苏seo网络
  • 公司设计网站有哪些网络公司起名
  • 语音app开发seo外链推广
  • 做网站百度一下源码之家
  • 长治网站制作的流程关键词推广怎么做
  • 情公司做的网站t和p在一起怎么做网站
  • 武汉手机模板建站推广任务接单平台
  • 网站制作公司套路廊坊百度关键词优化怎么做
  • 公司网站打开显示建设中seo搜索引擎优化工资
  • 海口做网站专门做推广的软文
  • 在国内做av网站军事最新消息