当前位置:网站首页>Happy shopkeeper source code -- Introduction to happy shopkeeper system development mode
Happy shopkeeper source code -- Introduction to happy shopkeeper system development mode
2022-06-25 12:28:00 【Procedure 15528175269】

For enterprises participating in advertising e-commerce , Advertising e-commerce is a long process , In this process, enterprises should draw up a long-term development plan for e-commerce , Instead of rushing for success . The positioning of enterprises should be accurate ,“ Communicative E-commerce ” It gives enterprises more opportunities to directly touch the policy consumers , Therefore, enterprises should find out their own positioning .
Some core codes of the happy shopkeeper system are shared :
public function confirm(Request $request)
{
$temp = ShippingTemplates::get(1);
if (!$temp) return app('json')->fail(' The default template is not configured , Can't place an order ');
list($cartId) = UtilService::postMore(['cartId'], $request, true);
if (!is_string($cartId) || !$cartId) return app('json')->fail(' Please submit the purchased goods ');
$uid = $request->uid();
$cartGroup = StoreCart::getUserProductCartList($uid, $cartId, 1);
if (count($cartGroup['invalid'])) return app('json')->fail($cartGroup['invalid'][0]['productInfo']['store_name'] . ' Has lapsed !');
if (!$cartGroup['valid']) return app('json')->fail(' Please submit the purchased goods ');
$cartInfo = $cartGroup['valid'];
$addr = UserAddress::where('uid', $uid)->where('is_default', 1)->find();
$priceGroup = StoreOrder::getOrderPriceGroup($cartInfo, $addr);
if ($priceGroup === false) {
return app('json')->fail(StoreOrder::getErrorInfo(' Freight template does not exist '));
}
$other = [
'offlinePostage' => sys_config('offline_postage'),
'integralRatio' => sys_config('integral_ratio')
];
$usableCoupons = StoreCouponUser::getUsableCouponList($uid, $cartGroup, $priceGroup['totalPrice']);
$usableCoupon = isset($usableCoupons[0]) ? $usableCoupons[0] : null;
$cartIdA = explode(',', $cartId);
$seckill_id = 0;
$combination_id = 0;
$bargain_id = 0;
$box_id = 0;
if (count($cartIdA) == 1) {
$seckill_id = StoreCart::where('id', $cartId)->value('seckill_id');
$combination_id = StoreCart::where('id', $cartId)->value('combination_id');
$bargain_id = StoreCart::where('id', $cartId)->value('bargain_id');
$box_id = StoreCart::where('id', $cartId)->value('box_id');
}
$data['deduction'] = $seckill_id || $combination_id || $bargain_id || $box_id;
$data['usableCoupon'] = $usableCoupon;
$data['addressInfo'] = UserAddress::getUserDefaultAddress($uid);
$data['seckill_id'] = $seckill_id;
$data['combination_id'] = $combination_id;
$data['bargain_id'] = $bargain_id;
$data['box_id'] = $box_id;
$data['cartInfo'] = $cartInfo;
$data['priceGroup'] = $priceGroup;
$data['orderKey'] = StoreOrder::cacheOrderInfo($uid, $cartInfo, $priceGroup, $other);
$data['offlinePostage'] = $other['offlinePostage'];
$vipId = UserLevel::getUserLevel($uid);
$user = $request->user();
if (isset($user['pwd'])) unset($user['pwd']);
$user['vip'] = $vipId !== false ? true : false;
if ($user['vip']) {
$user['vip_id'] = $vipId;
$user['discount'] = UserLevel::getUserLevelInfo($vipId, 'discount');
}
$data['userInfo'] = $user;
$data['integralRatio'] = $other['integralRatio'];
$data['offline_pay_status'] = (int)sys_config('offline_pay_status') ?? (int)2;
$data['store_self_mention'] = (int)sys_config('store_self_mention') ?? 0;// Whether store self collection is enabled
$data['system_store'] = ($res = SystemStore::getStoreDispose()) ? $res : [];// Store information
return app('json')->successful($data);
}边栏推荐
- R language uses GLM function to build Poisson logarithmic linear regression model, processes three-dimensional contingency table data to build saturation model, and poisgof function of epidisplay pack
- Time series analysis - how to use unit root test (ADF) correctly?
- The dist function of R language calculates the distance between two samples in dataframe data, returns the distance matrix between samples, and specifies the distance calculation method through the me
- Execution order of MySQL query statements join, on and where
- R language uses ordinal or. The display function obtains the summary statistical information of the ordered logistic regression model (the odds ratio and its confidence interval corresponding to the v
- The cloud native data lake has passed the evaluation and certification of the ICT Institute with its storage, computing, data management and other capabilities
- Dark horse shopping mall ---8 Microservice gateway and JWT token
- 图片打标签之获取图片在ImageView中的坐标
- A commonly used statistical modeling method -- difference analysis
- ECSHOP upload video_ ECSHOP video list, video classification, video related product guide
猜你喜欢

ECSHOP upload video_ ECSHOP video list, video classification, video related product guide

为什么ping不通网站 但是却可以访问该网站?

揭秘GaussDB(for Redis):全面對比Codis

黑馬暢購商城---3.商品管理

Today, I will explain to you what is DFI and its development prospects

confluence7.4.X升级实录

flutter常用命令及问题

Use PHP script to view the opened extensions
![[oceanbase] Introduction to oceanbase and its comparison with MySQL](/img/1c/bd2bcddb7af4647407d2bc351f5f5d.png)
[oceanbase] Introduction to oceanbase and its comparison with MySQL

Découvrir gaussdb (pour redis): une comparaison complète avec Codis
随机推荐
什么是Flink?Flink能用来做什么?
ECSHOP product attribute color specification size stock item No. automatic combination
R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter, spe
Mysql database logs binlog save aging (expire\u logs\u days)
How to use ARIMA model for prediction?
R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、epiDisplay包的poisgof函数对拟合的泊松回归模型进行拟合优度检验(检验模型效果)
Record a debugging when curl has no return value
Dynamic proxy
为什么ping不通网站 但是却可以访问该网站?
Recyclerview scrolls to the specified location
Linear regression of common mathematical modeling models for College Students
Is it safe to open an account and buy stocks on the Internet?
R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的计数个数、均值和中位数、在每个函数内部指定na.rm参数、通过list指定函数列表
plt. GCA () picture frame and label
Repair the error that ECSHOP background orders prompt insufficient inventory when adding goods. Please reselect
属性分解 GAN 复现 实现可控人物图像合成
The latest IT learning route in 2020
Dark horse shopping mall ---6 Brand, specification statistics, condition filtering, paging sorting, highlighting
Pd1.4 to hdmi2.0 adapter cable disassembly.
19. Implementation of MVVM architecture based on WPF event to command