mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
【优化】优化单品非sku下弹窗格式化数据异常,更换新的购物车及下单按钮。
This commit is contained in:
@@ -564,6 +564,14 @@ namespace CoreCms.Net.Services
|
||||
good.weight = product.weight;
|
||||
good.buyPinTuanCount = product.buyPinTuanCount;
|
||||
good.buyPromotionCount = product.buyPromotionCount;
|
||||
|
||||
if (!string.IsNullOrEmpty(good.labelIds))
|
||||
{
|
||||
var ids = CommonHelper.StringToIntArray(good.labelIds);
|
||||
var lbs = await _labelServices.QueryAsync(true, true, 3600);
|
||||
good.labels = lbs.Where(p => ids.Contains(p.id)).ToList();
|
||||
}
|
||||
|
||||
//获取商品最小价格
|
||||
good.minPrice = products.Any() ? products.OrderBy(p => p.price).First().price : product.price;
|
||||
//获取商品最大价格
|
||||
@@ -704,7 +712,7 @@ namespace CoreCms.Net.Services
|
||||
var buyPinTuanCount = 0;
|
||||
var isMaxGroupOrSeckillGoodsNums = false;
|
||||
var buyPromotionCount = 0;
|
||||
if (type == "pinTuan")
|
||||
if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant())
|
||||
{
|
||||
//把拼团的一些属性等加上
|
||||
var pinTuanRule = pinTuanRuleServices.QueryMuchFirst<CoreCmsPinTuanRule, CoreCmsPinTuanGoods, CoreCmsPinTuanRule>(
|
||||
@@ -843,7 +851,7 @@ namespace CoreCms.Net.Services
|
||||
{
|
||||
result = new CoreCmsProductsView();
|
||||
result._id = product.id.ToString();
|
||||
result.name = product.name;
|
||||
result.name = good.name;
|
||||
result.goods_thumb = product.images;
|
||||
result.buyPinTuanCount = buyPinTuanCount;
|
||||
result.buyPromotionCount = buyPromotionCount;
|
||||
@@ -857,7 +865,7 @@ namespace CoreCms.Net.Services
|
||||
item.goods_name = good.name;
|
||||
item.image = o.images;
|
||||
item.price = o.price - gradePrice; //减去会员等级价格
|
||||
item.sku_name_arr = new List<string> { "商品信息", product.name };
|
||||
item.sku_name_arr = new List<string> { "默认" };
|
||||
item.stock = o.stock;
|
||||
if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant())
|
||||
{
|
||||
@@ -881,10 +889,10 @@ namespace CoreCms.Net.Services
|
||||
new Product_Spec_listItem(){
|
||||
list = new List<Product_Sku_list>{
|
||||
new Product_Sku_list{
|
||||
name = product.name
|
||||
name = "默认"
|
||||
}
|
||||
},
|
||||
name = "商品信息"
|
||||
name = "默认"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user