# product

> Shoplazza Theme 中的 product Liquid 对象：承载店铺中的一个商品，含 variants、选项、媒体和价格等全部属性。

店铺中的一个商品。

  
    
      
        Properties
      

      
        Type
      

      
        Description
      
    
  

  
    
      
        `available`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品至少有一个 variant 可购买，则返回 `true`；否则返回 `false`。  

        variant 满足以下任一条件即视为可购买：  

        * `variant.inventory_quantity` 大于 0。  
        * `inventory_policy` 设置为 `continue`。
      
    

    
      
        `compare_at_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品任意 variant 的**对比价格**，以店铺货币的主单位表示（例如 `33` 经 money 过滤器显示为 `$33.00`），并非最小单位。

        该值以客户当地（展示）货币输出。
      
    

    
      
        `compare_at_price_max`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品任意 variant 的最高**对比价格**，以店铺货币的主单位表示（例如 `33` 经 money 过滤器显示为 `$33.00`），并非最小单位。

        该值以客户当地（展示）货币输出。
      
    

    
      
        `compare_at_price_min`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品任意 variant 的最低**对比价格**，以店铺货币的主单位表示（例如 `33` 经 money 过滤器显示为 `$33.00`），并非最小单位。

        该值以客户当地（展示）货币输出。
      
    

    
      
        `created_at`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的创建日期时间。
      
    

    
      
        `display_fake_sales`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品启用了虚拟销量，则返回 `true`；否则返回 `false`。  

        当商品启用虚拟销量时，商品销量等于当前真实销量加上虚拟销量（`商品销量 = 当前真实销量 + 虚拟销量`）。
      
    

    
      
        `fake_sales`
      

      
        [number](../basics/liquid-types#number)
      

      
        商品的虚拟销量。
      
    

    
      
        `handle`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的 [handle](../basics/handles)。
      
    

    
      
        `has_only_default_variant`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品没有任何选项，则返回 `true`；否则返回 `false`。
      
    

    
      
        `id`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的 ID。
      
    

    
      
        `image`
      

      
        [image](./image)
      

      
        商品关联的第一张图片。
      
    

    
      
        `images`
      

      
        an array of [image](./image)
      

      
        商品关联的图片。
      
    

    
      
        `metafields`
      

      

      

      
        应用于商品的 [metafields](./metafield)。
      
    

    
      
        `inventory_policy`
      

      
        [string](../basics/liquid-types#string) from a set of values
      

      
        商品缺货时是否继续销售。
      
    

    
      
        `inventory_quantity`
      

      
        [number](../basics/liquid-types#number)
      

      
        商品所有 variant 的库存数量。
      
    

    
      
        `inventory_tracking`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品启用了库存跟踪，则返回 `true`；否则返回 `false`。
      
    

    
      
        `mixed_wholesale`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品支持混合批发，则返回 `true`；否则返回 `false`。
      
    

    
      
        `need_variant_image`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品启用了图片必填，则返回 `true`；否则返回 `false`。
      
    

    
      
        `options`
      

      
        an array of [product\_option](./product_option)
      

      
        商品的选项。
      
    

    
      
        `price`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品任意 variant 的价格，以店铺货币的主单位表示（例如 `33` 经 money 过滤器显示为 `$33.00`），并非最小单位。

        该值以客户当地（展示）货币输出。
      
    

    
      
        `price_max`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品任意 variant 的最高价格，以店铺货币的主单位表示（例如 `33` 经 money 过滤器显示为 `$33.00`），并非最小单位。

        该值以客户当地（展示）货币输出。
      
    

    
      
        `price_min`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品任意 variant 的最低价格，以店铺货币的主单位表示（例如 `33` 经 money 过滤器显示为 `$33.00`），并非最小单位。

        该值以客户当地（展示）货币输出。
      
    

    
      
        `price_varies`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      

      
    

    
      
        `published`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品已发布，则返回 `true`；否则返回 `false`。
      
    

    
      
        `published_at`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的发布日期时间。
      
    

    
      
        `requires_shipping`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品需要配送，则返回 `true`；否则返回 `false`。
      
    

    
      
        `sales`
      

      
        [number](../basics/liquid-types#number)
      

      
        商品的销售量。
      
    

    
      
        `spu`
      

      
        [string](../basics/liquid-types#string)
      

      
        SPU 指具有相同值和属性的商品。
      
    

    
      
        `tags`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的 tags。
      
    

    
      
        `taxable`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        若商品应收税，则返回 `true`；否则返回 `false`。
      
    

    
      
        `title`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的标题。
      
    

    
      
        `updated_at`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的更新日期时间。
      
    

    
      
        `url`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的相对 URL。
      
    

    
      
        `variants`
      

      
        an array of [variant](./variant)
      

      
        商品的 variants。
      
    

    
      
        `vendor`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品的供应商。
      
    

    
      
        `vendor_url`
      

      
        [string](../basics/liquid-types#string)
      

      
        商品供应商的 URL。
      
    
  

### inventory\_policy 可选值

| Possible values   | Description                                        |
| :---------------- | :------------------------------------------------- |
| auto\_unpublished | 商品缺货时自动下架。                               |
| continue          | 商品缺货时继续销售。                               |
| deny              | 商品缺货时停止销售。                               |

```json title="对象"
{
  "id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
  "title": "Zoe Fedora",
  "brief": "",
  "description": "Sporty yet sophisticated, this short-sleeve ribbed crewneck is made from super-fine Egyptian cotton with stretch that hugs in all the right places. Finished with varsity stripe detail on the cuff and hem. 55% linen, 45% cotton oversized relax fit cotton herringbone drawcord cold delicate machine wash Model is 177cm, wearing size S. This is a demo store. You can purchase products like this from rag&bone<\/a>.",
  "vendor": "Nero",
  "vendor_url": "",
  "has_only_default_variant": false,
  "requires_shipping": true,
  "taxable": false,
  "inventory_policy": "deny",
  "inventory_quantity": 503,
  "inventory_tracking": true,
  "published": true,
  "handle": "zoe-fedora",
  "spu": "",
  "note": "",
  "need_variant_image": true,
  "fake_sales": 0,
  "display_fake_sales": false,
  "independent_seo": false,
  "updated_at": "2022-02-10T02:30:48Z",
  "created_at": "2022-02-10T02:30:49Z",
  "mixed_wholesale": false,
  "product_type": "",
  "tags": "Color_DarkGray,Color_Lightcoral,Location_Colorado,Price_$200-$300",
  "available": true,
  "price_min": "255",
  "price": "255",
  "price_max": "255",
  "compare_at_price_min": "0",
  "compare_at_price": "0",
  "compare_at_price_max": "0",
  "retail_price_min": "0",
  "retail_price_max": "0",
  "url": "\/products\/zoe-fedora",
  "published_at": "2022-02-10T02:30:49Z",
  "sales": 21,
  "image": {
    "src": "\/\/img.staticdj.com\/ca250f986a8799da153565a6a8ea55d2.jpeg",
    "path": "ca250f986a8799da153565a6a8ea55d2.jpeg",
    "width": 1280,
    "height": 1710,
    "alt": "Zoe Fedora Nero Noe - stg",
    "aspect_ratio": 0.7485380116959064
  },
  "meta_title": "Zoe Fedora",
  "meta_description": "Sporty yet sophisticated, this short-sleeve ribbed crewneck is made from super-fine Egyptian cotton with stretch that hugs in all the right places. Finished with varsity stripe detail on the cuff and hem. 55% linen, 45% cotton oversized relax fit cotton herringbone drawcord cold delicate machine wash Model is 177cm, wearing size S. This is a demo store. You can purchase products like this from rag&bone<\/a>.",
  "meta_keyword": "",
  "options": [
    {
      "id": "afc6fa3b-c895-49eb-8d1c-fc099f78f7a8",
      "name": "Color",
      "position": 1,
      "values": [
        "DarkOliveGreen",
        "Moccasin"
      ]
    },
    {
      "id": "25085627-8c3a-4c78-b0e2-38efe4a27490",
      "name": "Size",
      "position": 2,
      "values": [
        "S",
        "M",
        "L"
      ]
    }
  ],
  "variants": [
    {
      "id": "83196e5a-b25f-42c3-8df5-359d83ea7ae8",
      "product_id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
      "title": "DarkOliveGreen-S",
      "weight_unit": "kg",
      "inventory_quantity": 74,
      "sku": "WJW19F1014LA14-1",
      "barcode": "",
      "position": 1,
      "option1": "DarkOliveGreen",
      "option2": "S",
      "option3": "",
      "note": "",
      "image": {
        "src": "\/\/img.staticdj.com\/9974fe2bd69a80624c2c47976568b252.jpeg",
        "path": "9974fe2bd69a80624c2c47976568b252.jpeg",
        "width": 1280,
        "height": 1710,
        "alt": "Zoe Fedora Nero Noe - stg",
        "aspect_ratio": 0.7485380116959064
      },
      "wholesale_price": [
        {
          "price": 255,
          "min_quantity": 1
        }
      ],
      "weight": "0",
      "compare_at_price": "0",
      "price": "255",
      "retail_price": "0",
      "available": true,
      "url": "\/products\/zoe-fedora?variant=83196e5a-b25f-42c3-8df5-359d83ea7ae8",
      "available_quantity": 74,
      "options": [
        {
          "name": "Color",
          "value": "DarkOliveGreen"
        },
        {
          "name": "Size",
          "value": "S"
        }
      ],
      "off_ratio": 0,
      "flashsale_info": [],
      "sales": 21
    },
    {
      "id": "e675452a-0dc1-4d89-a4f3-bdd4f94c99ee",
      "product_id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
      "title": "DarkOliveGreen-M",
      "weight_unit": "kg",
      "inventory_quantity": 83,
      "sku": "WJW19F1014LA14-2",
      "barcode": "",
      "position": 2,
      "option1": "DarkOliveGreen",
      "option2": "M",
      "option3": "",
      "note": "",
      "image": {
        "src": "\/\/img.staticdj.com\/9974fe2bd69a80624c2c47976568b252.jpeg",
        "path": "9974fe2bd69a80624c2c47976568b252.jpeg",
        "width": 1280,
        "height": 1710,
        "alt": "Zoe Fedora Nero Noe - stg",
        "aspect_ratio": 0.7485380116959064
      },
      "wholesale_price": [
        {
          "price": 255,
          "min_quantity": 1
        }
      ],
      "weight": "0",
      "compare_at_price": "0",
      "price": "255",
      "retail_price": "0",
      "available": true,
      "url": "\/products\/zoe-fedora?variant=e675452a-0dc1-4d89-a4f3-bdd4f94c99ee",
      "available_quantity": 83,
      "options": [
        {
          "name": "Color",
          "value": "DarkOliveGreen"
        },
        {
          "name": "Size",
          "value": "M"
        }
      ],
      "off_ratio": 0,
      "flashsale_info": [],
      "sales": 21
    },
    {
      "id": "b3bc5cde-1a3e-47de-a85b-634ef75082f7",
      "product_id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
      "title": "DarkOliveGreen-L",
      "weight_unit": "kg",
      "inventory_quantity": 90,
      "sku": "WJW19F1014LA14-3",
      "barcode": "",
      "position": 3,
      "option1": "DarkOliveGreen",
      "option2": "L",
      "option3": "",
      "note": "",
      "image": {
        "src": "\/\/img.staticdj.com\/9974fe2bd69a80624c2c47976568b252.jpeg",
        "path": "9974fe2bd69a80624c2c47976568b252.jpeg",
        "width": 1280,
        "height": 1710,
        "alt": "Zoe Fedora Nero Noe - stg",
        "aspect_ratio": 0.7485380116959064
      },
      "wholesale_price": [
        {
          "price": 255,
          "min_quantity": 1
        }
      ],
      "weight": "0",
      "compare_at_price": "0",
      "price": "255",
      "retail_price": "0",
      "available": true,
      "url": "\/products\/zoe-fedora?variant=b3bc5cde-1a3e-47de-a85b-634ef75082f7",
      "available_quantity": 90,
      "options": [
        {
          "name": "Color",
          "value": "DarkOliveGreen"
        },
        {
          "name": "Size",
          "value": "L"
        }
      ],
      "off_ratio": 0,
      "flashsale_info": [],
      "sales": 21
    },
    {
      "id": "fb1e52f8-ff9c-46c8-8a7b-57f42fa9e81c",
      "product_id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
      "title": "Moccasin-S",
      "weight_unit": "kg",
      "inventory_quantity": 87,
      "sku": "WJW19F1014LA14-4",
      "barcode": "",
      "position": 4,
      "option1": "Moccasin",
      "option2": "S",
      "option3": "",
      "note": "",
      "image": {
        "src": "\/\/img.staticdj.com\/0921bb7355653c5f5b73a819cfe6bffe.jpeg",
        "path": "0921bb7355653c5f5b73a819cfe6bffe.jpeg",
        "width": 1280,
        "height": 1710,
        "alt": "Zoe Fedora Nero Noe - stg",
        "aspect_ratio": 0.7485380116959064
      },
      "wholesale_price": [
        {
          "price": 255,
          "min_quantity": 1
        }
      ],
      "weight": "0",
      "compare_at_price": "0",
      "price": "255",
      "retail_price": "0",
      "available": true,
      "url": "\/products\/zoe-fedora?variant=fb1e52f8-ff9c-46c8-8a7b-57f42fa9e81c",
      "available_quantity": 87,
      "options": [
        {
          "name": "Color",
          "value": "Moccasin"
        },
        {
          "name": "Size",
          "value": "S"
        }
      ],
      "off_ratio": 0,
      "flashsale_info": [],
      "sales": 21
    },
    {
      "id": "f06049a2-6627-422f-a181-707b8579ae3d",
      "product_id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
      "title": "Moccasin-M",
      "weight_unit": "kg",
      "inventory_quantity": 79,
      "sku": "WJW19F1014LA14-5",
      "barcode": "",
      "position": 5,
      "option1": "Moccasin",
      "option2": "M",
      "option3": "",
      "note": "",
      "image": {
        "src": "\/\/img.staticdj.com\/0921bb7355653c5f5b73a819cfe6bffe.jpeg",
        "path": "0921bb7355653c5f5b73a819cfe6bffe.jpeg",
        "width": 1280,
        "height": 1710,
        "alt": "Zoe Fedora Nero Noe - stg",
        "aspect_ratio": 0.7485380116959064
      },
      "wholesale_price": [
        {
          "price": 255,
          "min_quantity": 1
        }
      ],
      "weight": "0",
      "compare_at_price": "0",
      "price": "255",
      "retail_price": "0",
      "available": true,
      "url": "\/products\/zoe-fedora?variant=f06049a2-6627-422f-a181-707b8579ae3d",
      "available_quantity": 79,
      "options": [
        {
          "name": "Color",
          "value": "Moccasin"
        },
        {
          "name": "Size",
          "value": "M"
        }
      ],
      "off_ratio": 0,
      "flashsale_info": [],
      "sales": 21
    },
    {
      "id": "1c13e798-b3e7-4df9-ad9c-35a2a1310ae7",
      "product_id": "588ed0ce-40af-44c7-8dea-afa18b489ef8",
      "title": "Moccasin-L",
      "weight_unit": "kg",
      "inventory_quantity": 90,
      "sku": "WJW19F1014LA14-6",
      "barcode": "",
      "position": 6,
      "option1": "Moccasin",
      "option2": "L",
      "option3": "",
      "note": "",
      "image": {
        "src": "\/\/img.staticdj.com\/0921bb7355653c5f5b73a819cfe6bffe.jpeg",
        "path": "0921bb7355653c5f5b73a819cfe6bffe.jpeg",
        "width": 1280,
        "height": 1710,
        "alt": "Zoe Fedora Nero Noe - stg",
        "aspect_ratio": 0.7485380116959064
      },
      "wholesale_price": [
        {
          "price": 255,
          "min_quantity": 1
        }
      ],
      "weight": "0",
      "compare_at_price": "0",
      "price": "255",
      "retail_price": "0",
      "available": true,
      "url": "\/products\/zoe-fedora?variant=1c13e798-b3e7-4df9-ad9c-35a2a1310ae7",
      "available_quantity": 90,
      "options": [
        {
          "name": "Color",
          "value": "Moccasin"
        },
        {
          "name": "Size",
          "value": "L"
        }
      ],
      "off_ratio": 0,
      "flashsale_info": [],
      "sales": 21
    }
  ],
  "images": [
    {
      "src": "\/\/img.staticdj.com\/ca250f986a8799da153565a6a8ea55d2.jpeg",
      "path": "ca250f986a8799da153565a6a8ea55d2.jpeg",
      "width": 1280,
      "height": 1710,
      "alt": "Zoe Fedora Nero Noe - stg",
      "aspect_ratio": 0.7485380116959064
    },
    {
      "src": "\/\/img.staticdj.com\/4b1ea3524b2c2b0ad0e04e02aaa9b1c8.jpeg",
      "path": "4b1ea3524b2c2b0ad0e04e02aaa9b1c8.jpeg",
      "width": 1280,
      "height": 1710,
      "alt": "Zoe Fedora Nero Noe - stg",
      "aspect_ratio": 0.7485380116959064
    },
    {
      "src": "\/\/img.staticdj.com\/9974fe2bd69a80624c2c47976568b252.jpeg",
      "path": "9974fe2bd69a80624c2c47976568b252.jpeg",
      "width": 1280,
      "height": 1710,
      "alt": "Zoe Fedora Nero Noe - stg",
      "aspect_ratio": 0.7485380116959064
    },
    {
      "src": "\/\/img.staticdj.com\/4b1ea3524b2c2b0ad0e04e02aaa9b1c8.jpeg",
      "path": "4b1ea3524b2c2b0ad0e04e02aaa9b1c8.jpeg",
      "width": 1280,
      "height": 1710,
      "alt": "Zoe Fedora Nero Noe - stg",
      "aspect_ratio": 0.7485380116959064
    },
    {
      "src": "\/\/img.staticdj.com\/0921bb7355653c5f5b73a819cfe6bffe.jpeg",
      "path": "0921bb7355653c5f5b73a819cfe6bffe.jpeg",
      "width": 1280,
      "height": 1710,
      "alt": "Zoe Fedora Nero Noe - stg",
      "aspect_ratio": 0.7485380116959064
    },
    {
      "src": "\/\/img.staticdj.com\/f3c255209b09906dd7ae2926401a2be3.jpeg",
      "path": "f3c255209b09906dd7ae2926401a2be3.jpeg",
      "width": 1280,
      "height": 1710,
      "alt": "Zoe Fedora Nero Noe - stg",
      "aspect_ratio": 0.7485380116959064
    }
  ],
  "redirect": false,
  "redirect_url": "",
  "retail_price": "0",
  "price_varies": true,
  "off_ratio": 0,
  "flashsale_info": []
}
```
