---
title: "cart"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/sline/object/cart'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/sline/object/cart.md'
---

# cart


    客户的购物车。

    



    <div>
    
        ## 属性

        
<ObjectProperty
    name="cart_level_discount_applications"
    types={[<Mdx>array of [discount_application](https://developer.shopline.com/zh-hans-cn/docs/sline/object/discount-application.md)</Mdx>]}
>
<ObjectSummary>
购物车折扣详情列表。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="discount_applications"
    types={[<Mdx>array of [discount_application](https://developer.shopline.com/zh-hans-cn/docs/sline/object/discount-application.md)</Mdx>]}
>
<ObjectSummary>
订单折扣详情列表。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="empty"
    types={[<Mdx>boolean</Mdx>]}
>
<ObjectSummary>
购物车中是否包含商品：
- `true`：购物车中不包含商品。
- `false`：购物车中包含商品。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="item_count"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
购物车中的商品数量。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="items"
    types={[<Mdx>array of [line_item](https://developer.shopline.com/zh-hans-cn/docs/sline/object/line-item.md)</Mdx>]}
>
<ObjectSummary>
购物车商品行列表。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="items_subtotal_price"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
应用所有订单项折扣后的购物车商品价格总额，不包含购物车折扣及运费，是否包含税费以店铺的税收设置为准。


该值以客户的本地货币输出，且以此货币的子单位计。

:::tip{title="提示"} 
使用 [money_with_currency](https://developer.shopline.com/zh-hans-cn/docs/sline/filter/money-with-currency.md) filter 输出格式化的金额。 
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="original_total_price"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
应用任何折扣前的购物车商品价格总额。

该值以客户的本地货币输出，且以此货币的子单位计。

:::tip{title="提示"} 
使用 [money_with_currency](https://developer.shopline.com/zh-hans-cn/docs/sline/filter/money-with-currency.md) filter 输出格式化的金额。 
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="requires_shipping"
    types={[<Mdx>boolean</Mdx>]}
>
<ObjectSummary>
购物车中是否包含需要运输的商品。
- `true`：购物车中包含需要运输的商品。
- `false`：购物车中不包含需要运输的商品。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="total_discount"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
购物车的所有折扣总额。

该值以客户的本地货币输出，且以此货币的子单位计。

:::tip{title="提示"} 
使用 [money_with_currency](https://developer.shopline.com/zh-hans-cn/docs/sline/filter/money-with-currency.md) filter 输出格式化的金额。 
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="total_price"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
应用所有折扣后的购物车商品价格总额。

该值以客户的本地货币输出，且以此货币的子单位计。

:::tip{title="提示"} 
使用 [money_with_currency](https://developer.shopline.com/zh-hans-cn/docs/sline/filter/money-with-currency.md) filter 输出格式化的金额。 
:::
</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="total_weight"
    types={[<Mdx>integer</Mdx>]}
>
<ObjectSummary>
购物车中所有商品的总重量（以克为单位）。


</ObjectSummary>
</ObjectProperty>
        
    
    </div>


