文档
测试

(自付运费-老)购物车字段说明

GET

响应参数

参数名
类型
描述
必填
isEuropean
是否是欧洲buyer
必填
unavailable_products
array
不可用产品信息数组
必填
accounting_type
(twig好像没用到 ) ,,,,oc_customer核算类型
必填
name
店铺名称
必填
cart_id_arr
(twig好像没用到 ) 当前店铺分组中的购物车cart_ids
必填
url
店铺链接
必填
contract_url
店铺联系
必填
products
array
参考stores.products中的字段备注
必填
no_contact
1-未和seller建立联系
必填
stores
套娃类型的array
必填
accounting_type
oc_customer中的字段,核算类型 (twig好像没啥用)
必填
cart_id_arr
当前店铺分组中的购物车cart_ids(twig好像没啥用)
必填
name
店铺名称
必填
url
店铺链接
必填
contract_url
店铺联系
必填
is_service_fee_including_tax
服务费是否包含税(twig好像没用到)
必填
products
array
数组,twig 88行
必填
cart_id
购物车cart_id
必填
type_id
存在于oc_cart表,交易类型,用于持久化购物车环境的交易类型,type_id字典值维护在oc_setting表,code:transaction_type
必填
agreement_id
oc_cart表 ,各个交易类型设计的协议记录主键ID,若为普通类别,值为null(twig好像没啥用)
必填
agreement_code
协议号
必填
product_type
商品类型 0常规 1 现货保证金 2期货保证金 3 补运费
必填
default_price
默认价
必填
transaction_info
array
数组
必填
transaction_type
array
数组
必填
type
0-普通 1-返点 2-现货 3-期货 4-议价
必填
id
必填
price_show
type = 1,2,3,4展示这个price_show
必填
agreement_code
协议号
必填
agreement_show_quantity
当type=1时,Available Quantity:{{ v.agreement_show_quantity }},,返点时,取baseinfo中的quantity,来自oc_product中的quantity
必填
left_qty
当type=2/3时,Product QTY Remaining:{{ v.left_qty }}
必填
qty
当type=4时,Product QTY Remaining:{{ v.qty }}
必填
base_info
array
数组((twig好像没用到))
必填
first_get
array
数组((twig好像没用到))
必填
thumb
缩略图
必填
popupImage
大图
必填
name
商品Name
必填
option
数组,oc_cart中的option,代码中注释写的是“产品option暂时未使用”
必填
name
必填
value
必填
type
必填
recurring
不知道是干啥的!!,,oc_cart表中的字段
必填
quantity
购物车中的字段,oc_cart中的quantity
必填
price
{{ product.price }},,,格式化后的价格,加了货币符号,取的是$unit_price
必填
discount
不为null时,,展示{{100-product.discount}}% OFF,,,例如59% OFF
必填
total
单价*数量,,,$unit_price * $product['quantity']
必填
stock
[twig没啥用了,代码被注释掉了 ]默认为true,,if ($option_value_query->row['subtract'] && (!$option_value_query->row['quantity'] || ($option_value_query->row['quantity'] < $cart['quantity']))) 时,,,$stock = false; 如果未设置这个变量,, 取!(!configDB('config_stock_checkout') || configDB('config_stock_warning'))
必填
seller_name
(twig好像没用到这个变量)
必填
seller_href
(twig好像没用到这个变量)
必填
href
产品链接,如果产品can_buy为true时,data-href="{{ product.href }}"
必填
quote_amount
(twig好像没用到这个变量)
必填
str_quote_amount
(twig好像没用到这个变量)
必填
str_quote_service_fee
(twig好像没用到这个变量)
必填
str_service_fee
(twig好像没用到这个变量)
必填
quoteFlag
购物车中的数量 = 议价采购数量 && oc_product_quote中的status 不为TIMEOUT超时,则为ture,否则是false
必填
futuresFlag
当FuturesMarginAgreement::query()->where('id', '=', $product['agreement_id'])->value('version') 等于3时,为TRUE
必填
sku
oc_product中的sku
必填
tag
Array
标签数组
必填
quote_amount_per
(twig好像没用到这个变量)
必填
str_quote_amount_per
(twig好像没用到这个变量)
必填
quote_service_fee
(twig好像没用到这个变量)
必填
service_fee
(twig好像没用到这个变量)
必填
isMarginAdvanceProduct
Bool
是否为保证金头款商品
必填
isFuturesAdvanceProduct
bool
是否为期货头款商品
必填
margin_expire_alert
(twig好像没用到这个变量)
必填
rebate_expire_alert
(twig好像没用到这个变量)
必填
margin_batch_out_stock
(twig好像没用到这个变量)
必填
freight_per
(twig好像没用到这个变量)
必填
freight_total
(twig好像没用到这个变量)
必填
origin_price
(twig好像没用到这个变量)
必填
service_fee_per_calc
(twig好像没用到这个变量)
必填
product_price_per_calc
(twig好像没用到这个变量)
必填
service_fee_per
欧洲展示Discounted Service Value
必填
product_price_per
欧洲展示Discounted Product Value
必填
quote_price_per
(twig好像没用到这个变量)
必填
quote_service_fee_per
(twig好像没用到这个变量)
必填
freight
(twig好像没用到这个变量)
必填
freight_rate
(twig好像没用到这个变量)
必填
package_fee
(twig好像没用到这个变量)
必填
base_freight
(twig好像没用到这个变量)
必填
overweight_surcharge
(twig好像没用到这个变量)
必填
overweight_surcharge_show
(twig好像没用到这个变量)
必填
transaction_type_qty
Array
可售数量,Available Qty,现货期货取transaction_type_qty[0],否则 循环该数据,取key ==product.type_id~"_"~product.agreement_code时的val,具体代码在Line 240
必填
qty_type_str
String
默认是Available 、当限量折扣开始时期取Non-promotional,当前是否用限时限量折扣购买取Promotional
必填
volume
(twig好像没用到这个变量)
必填
volume_inch
(twig好像没用到这个变量)
必填
can_change_cart
(twig好像没用到这个变量)
必填
can_buy
$product['buyer_flag'] && $product['product_status'] && $product['store_status'] && !$product['fine_cannot_buy']
必填
color
(twig好像没用到这个变量)
必填
color_str
(twig好像没用到这个变量)
必填
priceUp
Array
用来控制线条的样式以及未来的价格???
必填
status
必填
add_price
The price will go up by {{ product.priceUp.add_price }}
必填
effect_time
倒计时,具体没看懂用意,用在jq里面
必填
weight_total
(twig好像没用到这个变量)
必填
weight_list_str
(twig好像没用到这个变量)
必填
wth_str
(twig好像没用到这个变量)
必填
combo
(twig好像没用到这个变量)
必填
show_tiered_pricing
bool
如果存在的话,用来展示Discounted Unit Price,Discounted Product Value,Discounted Service Value,Price by quantity
必填
tiered_prices
Array
必填
format_price
如:£100.0
必填
price
(twig好像没用到这个变量)
必填
msg
Price
必填
selected
bool
是否选中
必填
original_price
(twig好像没用到这个变量)
必填
service_tiered_prices
Array
(twig好像没用到这个变量)
必填
format_default_price
Normal Transaction时取{{ product.format_default_price }}
必填
campaigns
Array
为促销活动格式化活动内容,获取某些产品(包含定金产品)参加的满减或满送活动
必填
type
0->other;1->banner; 2->满送;3->满减
必填
code
促销活动主表oc_marketing_campaign中的code
必填
promotion_content
必填
cart_sort_time
购物车排序时间
必填
item_cost
(twig好像没用到这个变量)
必填
totals
array
必填
code
如total,service_fee
必填
title
如Order Total
必填
value
100.0
必填
sort_order
20
必填
discounts_amount
array
折扣????
必填
amount
必填
amount_text
必填
gifts
array
优惠券???
必填
is_coupon
bool
必填
condition_remark
{{ gift.condition_remark }}
必填
format_coupon_price
{{ gift.format_coupon_price }}Coupon 和 This order qualifies for a&nbsp;{{ gift.format_coupon_price }} off coupon that you can use on your next purchase
必填
delivery_type
0-一件代发 1-自付运费 2-云送仓
必填
enableQuote
(twig好像没用到) 是否启用议价,国别为 (81:德 107:日 222:英 223:美)为TRUE
必填
all_totals
twig好像没用到
必填
select_coupon_ids
twig好像没用到
必填
product_value_show_vat
twig好像没用到
必填
num
count购物车中的商品数量
必填
error_warning
twig好像没用到
必填
attention
twig好像没用到
必填
img_vat_url
twig好像没用到
必填
totalNum
twig好像没用到
必填
allItemNum
twig好像没用到
必填
isCollectionFromDomicile
twig好像没用到
必填
module_marketplace_status
twig好像没用到
必填
action
URL
编辑的地址
必填
checkInnerAutoBuyUrl
URL
是否是内部自动购买
必填
checkPickUpCartUrl
URL
自提
必填
preOrderUrl
URL
预览
必填

说明 / 示例

# products.can_buy `$can_buy = $product['buyer_flag'] && $product['product_status'] && $product['store_status'] && !$product['fine_cannot_buy'] ? 1:0;` buyer_flag:oc_product中的字段,是否允许单独售卖,1允许,0不允许 product_status:oc_product中的字段,取status,0已下架,1已上架,-1待上架 store_status:产品对应oc_customer中seller的status fine_cannot_buy:初始值为0,,当获取精细化管理价格时,product_display 不为1,则fine_cannot_buy = 1,标记为无权下单购买,后端在代码storage/modification/system/library/cart/cart.php Line 399行 # products.show_tiered_pricing 如果存在并且isEuropean = true的话, 用来展示Discounted Unit Price,Discounted Product Value,Discounted Service Value,Price by quantity(阶梯价) ` // #3099 获取非协议价格选中的价格(普通,精细化,阶梯价) if ($product['type_id'] == ProductTransactionType::NORMAL && isset($wkProQuoteDetailsByProductIds[$product['product_id']])) { $showTieredPricing = true; `