# default_product

> default_product Liquid 对象：提供默认的商品数据，让 Shoplazza Theme 在没有真实数据时也能渲染商品版式。

默认商品数据。

  
    
      
        Properties
      

      
        Type
      

      
        Description
      
    
  

  
    
      
        `available`
      

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

      
        若商品的至少一个 variant 有货，则返回 `true`；否则返回 `false`。

        variant 有货的条件是 `variant.inventory_quantity` 大于 0。
      
    

    
      
        `compare_at_price`
      

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

      
        商品任意 variant 的**对比价格**，以店铺货币的主单位表示，而非最小单位。

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

    
      
        `compare_at_price_max`
      

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

      
        商品任意 variant 的最高**对比价格**，以店铺货币的主单位表示，而非最小单位。

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

    
      
        `compare_at_price_min`
      

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

      
        商品任意 variant 的最低**对比价格**，以店铺货币的主单位表示，而非最小单位。

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

    
      
        `compare_at_price_varies`
      

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

      
        若商品的各 variant **对比价格**不同，则返回 `true`；否则返回 `false`。
      
    

    
      
        `description`
      

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

      
        商品的描述。
      
    

    
      
        `has_only_default_variant`
      

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

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

    
      
        `id`
      

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

      
        商品的 ID。
      
    

    
      
        `image`
      

      
        [image](./image)
      

      
        商品关联的第一张图片。
      
    

    
      
        `images`
      

      
        An array of [image](./image)
      

      
        商品关联的所有图片。
      
    

    
      
        `inventory_quantity`
      

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

      
        商品所有 variants 的库存数量。
      
    

    
      
        `isMock`
      

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

      
        Return `true`.
      
    

    
      
        `off_ratio`
      

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

      
        商品的折扣比率。
      
    

    
      
        `options`
      

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

      
        商品的选项名称。
      
    

    
      
        `published`
      

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

      
        Return `true`.
      
    

    
      
        `price`
      

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

      
        商品任意 variant 的价格，以店铺货币的主单位表示，而非最小单位。

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

    
      
        `price_max`
      

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

      
        商品任意 variant 的最高价格，以店铺货币的主单位表示，而非最小单位。

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

    
      
        `price_min`
      

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

      
        商品任意 variant 的最低价格，以店铺货币的主单位表示，而非最小单位。

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

    
      
        `price_varies`
      

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

      
        若商品的各 variant 价格不同，则返回 `true`；否则返回 `false`。
      
    

    
      
        `selected_or_first_available_variant`
      

      
        [variant](./variant)
      

      
        商品当前选中的或第一个有货的 variant。
      
    

    
      
        `tags`
      

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

      
        商品的 tags。
      
    

    
      
        `url`
      

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

      
        商品的相对 URL。
      
    

    
      
        `variants`
      

      
        An array of [variant](./variant)
      

      
        商品的 variants。
      
    

    
      
        `vendor`
      

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

      
        商品的供应商。
      
    
  

```json title="对象"
{
  "product_type_id": 35,
  "type": "三级家具2.22",
  "vendor_id": 0,
  "vendor": "0010",
  "images": [
    {
      "src": "//cdn.shoplazza.com/f18bdd5ba3dcd37046dac6e91a8c490d.svg",
      "aspect_ratio": 1,
      "width": 150,
      "height": 150,
      "path": "f18bdd5ba3dcd37046dac6e91a8c490d.svg",
      "alt": ""
    },
    {
      "src": "//cdn.shoplazza.com/52e4b22240cc14ed239649449cc05ba2.svg",
      "aspect_ratio": 1,
      "width": 150,
      "height": 150,
      "path": "52e4b22240cc14ed239649449cc05ba2.svg",
      "alt": ""
    },
    {
      "src": "//cdn.shoplazza.com/3141a35e324af9904b4bcc5d3eb57be5.svg",
      "aspect_ratio": 1,
      "width": 150,
      "height": 150,
      "path": "3141a35e324af9904b4bcc5d3eb57be5.svg",
      "alt": ""
    },
    {
      "src": "//cdn.shoplazza.com/68d822e8c7c56ec28e10f50bf0bebfe9.svg",
      "aspect_ratio": 1,
      "width": 150,
      "height": 150,
      "path": "68d822e8c7c56ec28e10f50bf0bebfe9.svg",
      "alt": ""
    },
    {
      "src": "//cdn.shoplazza.com/0d4db1cd287c8c660840e482fa6948ac.svg",
      "aspect_ratio": 1,
      "width": 150,
      "height": 150,
      "path": "0d4db1cd287c8c660840e482fa6948ac.svg",
      "alt": ""
    }
  ],
  "seo_meta_id": 28,
  "url": "/products/advertisement-af-klmkl",
  "handle": "advertisement-af-klmkl",
  "meta_title": "Knit Top Sneakers Knit Top",
  "meta_description": "",
  "meta_keyword": "",
  "update_time": "2018-01-29 23:12:44",
  "title": "Product Title",
  "brief": "brief title",
  "id": 20,
  "isMock": true,
  "inventory_management": true,
  "price": 88.88,
  "price_min": 88.88,
  "price_max": 88.88,
  "price_varies": false,
  "compare_at_price": 99.99,
  "compare_at_price_min": 99.99,
  "compare_at_price_max": 99.99,
  "compare_at_price_varies": 99.99,
  "off_ratio": 50,
  "inventory_quantity": 4,
  "published": true,
  "ex_links": [],
  "size_guide": null,
  "image": {
    "src": "//cdn.shoplazza.com/f18bdd5ba3dcd37046dac6e91a8c490d.svg",
    "aspect_ratio": 1,
    "width": 150,
    "height": 150,
    "path": "f18bdd5ba3dcd37046dac6e91a8c490d.svg",
    "alt": ""
  },
  "featured_image": "https://img.staticdj.com/f18bdd5ba3dcd37046dac6e91a8c490d.svg",
  "tags": [],
  "description": "<img src='https://cdn.shoplazza.com/624eca21fb52542e87a31db584b239a3.jpg' width='100%' height='auto'>",
  "content": "<img src='https://cdn.shoplazza.com/624eca21fb52542e87a31db584b239a3.jpg' width='100%' height='auto'>",
  "variants": [
    {
      "id": 789,
      "sku": "件",
      "inventory_management": true,
      "inventory_quantity": 4,
      "barcode": "",
      "requires_shipping": false,
      "weight": "10",
      "weight_unit": "g",
      "price": 88.88,
      "compare_at_price": 99.99,
      "off_ratio": 50,
      "taxable": false,
      "fulfillment": "0",
      "incoming": 0,
      "inventory_policy": "continue",
      "available": true,
      "url": "/products/advertisement-af-klmkl?variant=789",
      "sales": 0,
      "image": null,
      "featured_image": null,
      "option": [
        {
          "product_option_id": 2651,
          "option": "color",
          "option_value": "blue",
          "sort_order": 0
        },
        {
          "product_option_id": 2652,
          "option": "Size",
          "option_value": "s ",
          "sort_order": 1
        }
      ],
      "title": "blue/s ",
      "options": [
        "blue",
        "s "
      ],
      "option1": "blue",
      "option2": "s "
    },
    {
      "id": 790,
      "sku": "件",
      "inventory_management": false,
      "inventory_quantity": 0,
      "barcode": "",
      "requires_shipping": false,
      "weight": "10",
      "weight_unit": "g",
      "price": 88.88,
      "compare_at_price": 99.99,
      "off_ratio": 50,
      "taxable": false,
      "fulfillment": "0",
      "incoming": 0,
      "inventory_policy": "continue",
      "available": true,
      "url": "/products/advertisement-af-klmkl?variant=790",
      "sales": 0,
      "image": null,
      "featured_image": null,
      "option": [
        {
          "product_option_id": 2653,
          "option": "color",
          "option_value": "blue",
          "sort_order": 0
        },
        {
          "product_option_id": 2654,
          "option": "Size",
          "option_value": "m",
          "sort_order": 1
        }
      ],
      "title": "blue/m",
      "options": [
        "blue",
        "m"
      ],
      "option1": "blue",
      "option2": "m"
    },
    {
      "id": 791,
      "sku": "件",
      "inventory_management": false,
      "inventory_quantity": 0,
      "barcode": "",
      "requires_shipping": false,
      "weight": "10",
      "weight_unit": "g",
      "price": 88.88,
      "compare_at_price": 99.99,
      "off_ratio": 50,
      "taxable": false,
      "fulfillment": "0",
      "incoming": 0,
      "inventory_policy": "continue",
      "available": true,
      "url": "/products/advertisement-af-klmkl?variant=791",
      "sales": 0,
      "image": null,
      "featured_image": null,
      "option": [
        {
          "product_option_id": 2655,
          "option": "color",
          "option_value": "black",
          "sort_order": 0
        },
        {
          "product_option_id": 2656,
          "option": "Size",
          "option_value": "s ",
          "sort_order": 1
        }
      ],
      "title": "black/s ",
      "options": [
        "black",
        "s "
      ],
      "option1": "black",
      "option2": "s "
    },
    {
      "id": 792,
      "sku": "件",
      "inventory_management": false,
      "inventory_quantity": 0,
      "barcode": "",
      "requires_shipping": false,
      "weight": "10",
      "weight_unit": "g",
      "price": 88.88,
      "compare_at_price": 99.99,
      "off_ratio": 50,
      "taxable": false,
      "fulfillment": "0",
      "incoming": 0,
      "inventory_policy": "continue",
      "available": true,
      "url": "/products/advertisement-af-klmkl?variant=792",
      "sales": 0,
      "image": null,
      "featured_image": null,
      "option": [
        {
          "product_option_id": 2657,
          "option": "color",
          "option_value": "black",
          "sort_order": 0
        },
        {
          "product_option_id": 2658,
          "option": "Size",
          "option_value": "m",
          "sort_order": 1
        }
      ],
      "title": "black/m",
      "options": [
        "black",
        "m"
      ],
      "option1": "black",
      "option2": "m"
    },
    {
      "id": 793,
      "sku": "件",
      "inventory_management": false,
      "inventory_quantity": 0,
      "barcode": "",
      "requires_shipping": false,
      "weight": "10",
      "weight_unit": "g",
      "price": 88.88,
      "compare_at_price": 99.99,
      "off_ratio": 50,
      "taxable": false,
      "fulfillment": "0",
      "incoming": 0,
      "inventory_policy": "continue",
      "available": true,
      "url": "/products/advertisement-af-klmkl?variant=793",
      "sales": 0,
      "image": null,
      "featured_image": null,
      "option": [
        {
          "product_option_id": 2659,
          "option": "color",
          "option_value": "yellow",
          "sort_order": 0
        },
        {
          "product_option_id": 2660,
          "option": "Size",
          "option_value": "s ",
          "sort_order": 1
        }
      ],
      "title": "yellow/s ",
      "options": [
        "yellow",
        "s "
      ],
      "option1": "yellow",
      "option2": "s "
    },
    {
      "id": 794,
      "sku": "件",
      "inventory_management": false,
      "inventory_quantity": 0,
      "barcode": "",
      "requires_shipping": false,
      "weight": "10",
      "weight_unit": "g",
      "price": 88.88,
      "compare_at_price": 99.99,
      "off_ratio": 50,
      "taxable": false,
      "fulfillment": "0",
      "incoming": 0,
      "inventory_policy": "continue",
      "available": true,
      "url": "/products/advertisement-af-klmkl?variant=794",
      "sales": 0,
      "image": null,
      "featured_image": null,
      "option": [
        {
          "product_option_id": 2661,
          "option": "color",
          "option_value": "yellow",
          "sort_order": 0
        },
        {
          "product_option_id": 2662,
          "option": "Size",
          "option_value": "m",
          "sort_order": 1
        }
      ],
      "title": "yellow/m",
      "options": [
        "yellow",
        "m"
      ],
      "option1": "yellow",
      "option2": "m"
    }
  ],
  "sales": 0,
  "options": [
    {
      "name": "color",
      "values": [
        "blue",
        "black",
        "yellow"
      ]
    },
    {
      "name": "Size",
      "values": [
        "s ",
        "m"
      ]
    }
  ],
  "available": true,
  "has_only_default_variant": false,
  "selected_or_first_available_variant": {
    "id": 789,
    "sku": "件",
    "inventory_management": false,
    "inventory_quantity": 0,
    "barcode": "",
    "requires_shipping": false,
    "weight": "10",
    "weight_unit": "g",
    "price": 88.88,
    "compare_at_price": 99.99,
    "off_ratio": 50,
    "taxable": false,
    "fulfillment": "0",
    "incoming": 0,
    "inventory_policy": "continue",
    "available": true,
    "url": "/products/advertisement-af-klmkl?variant=789",
    "sales": 0,
    "image": null,
    "featured_image": null,
    "option": [
      {
        "product_option_id": 2651,
        "option": "color",
        "option_value": "blue",
        "sort_order": 0
      },
      {
        "product_option_id": 2652,
        "option": "Size",
        "option_value": "s ",
        "sort_order": 1
      }
    ],
    "title": "blue/s ",
    "options": [
      "blue",
      "s "
    ],
    "option1": "blue",
    "option2": "s "
  }
}
```
