Velo: Wix Stores "Products" Collection Fields

Tip: Before continuing, make sure you've read Working with Wix App Collections.

To use the Products collection in code, refer to it as "Stores/Products".

Copy
1
// Query all products
2
wixData.query("Stores/Products")
3
.find()
4
.then((results) => {
5
// handle the results
6
});
7
8
// Query all products, including variants and hidden products (optional)
9
wixData.query("Stores/Products")
10
.find({
11
appOptions: {
12
// Include product variants in the query. Default is `false`.
13
includeVariants: true,
14
// Include hidden products in the query. Default is `false`.
15
includeHiddenProducts: true
16
}
17
})
18
.then((results) => {
19
// handle the results
20
});

This document describes the permissions and fields in your Products collection. 

Important:

  • You can query up to 100 items from the Products collection. Trying to query more than 100 items by raising the wix-data limit will result in an error.
  • You can use up to 5 filters in one query. This limit can be extended by using the 'and' operator to combine queries.

Permissions

The Products collection has the following permissions:

  • Read: Anyone 
  • Create: None
  • Update: None
  • Delete: None

You cannot change the Products collection's permissions. 

Fields

Note: This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s dashboard.

The field name is listed as the heading of each section, with the field ID listed in parentheses, like this: Name (name). The fields appear in this document in the order in which they appear in your collection by default.

ID (_id)

Description: The product ID (GUID) that was created by the server. This is a system field and is hidden by default.

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: Yes

Can be filtered: eq, ne, hasSome, contains, startsWith

Read-only: Yes

Name (name)

Description: The name of the product.

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No Can be sorted: Yes Can be filtered: eq, ne, hasSome, contains, startsWith

Read-only: Yes

Updated Date (_updatedDate)

Description: Date and time the product was last changed.

Type: Date

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: Yes

Can be filtered: eq, ne, lt, lte, gt, gte

Read-only: Yes

Description (description)

Description: The product description in rich text.

Type: Rich text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: eq, ne, hasSome, contains, startsWith

Read-only: Yes

Main Media (mainMedia)

Description: Displays the main media item (image or video) for this product as it appears in the Store Manager.

Type: Image

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Media Items (mediaItems)

Description: Lists all the media items available for this product in an array of JSON objects.

Type: Media Gallery Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No Read-only: Yes

Copy
1
[
2
{
3
type: "Image",
4
src: "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg/#originWidth=1970&originHeight=1120",
5
title: "title",
6
description: "whatever first line\nthe second line.",
7
link: "https://www.whatever.com"
8
},
9
{
10
type: "Video",
11
src: "wix:video://v1/11062b_03c50f8fe4a34cc297a984e483a282ef/simpsons.mov#posterUri=96fbec_52cd5b00f7fd48e0a83bc1fb1dfb06ea.jpg &posterWidth=1920&posterHeight=1080",
12
title: "title",
13
description: "whatever first line\nthe second line.",
14
link: "https://www.whatever.com",
15
thumbnail: "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg/#originWidth=1970&originHeight=1120"
16
}
17
]

SKU (sku)

Description: The product's stock-keeping unit number.

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: Yes  Can be filtered: Yes Read-only: Yes

Ribbon (ribbon)

Description: The product's ribbon. Used to highlight relevant information about a product. For example, "New Arrival" or "5 items left".

Note: This field replaces the deprecated `ribbons` field.

Type: Text

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: No

Currency (currency)

Description: The product's currency. Because stores only have one currency, this value is the same for all products.

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Price (price)

Description: The product's price.

Type: Number

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: Yes

Can be filtered: eq, ne, hasSome, lt, lte, gt, gte

Read-only: Yes

Discounted Price (discountedPrice)

Description: The discounted price, if any. If no discount is configured, the full price is displayed.

Type: Number

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Formatted Price (formattedPrice)

Description: The price formatted with the currency (e.g., $20).

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Formatted Discounted Price (formattedDiscountedPrice)

Description: The discounted price formatted with the currency (e.g., $15).

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Price Per Unit (pricePerUnit)

Description: The product's base price per unit, automatically calculated based on provided pricePerUnitData (e.g., 0.3).

Type: Number

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: Yes

Can be filtered: No

Read-only: Yes

Formatted Price Per Unit (formattedPricePerUnit)

Description: The product's base price per unit, formatted with the currency (e.g., $0.30)

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Price Per Unit Data (pricePerUnitData)

Description: Price per unit quantities and measurement units.

Type: JSON

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: No

Copy
1
{
2
"totalQuantity": 1,
3
"totalMeasurementUnit": "KG",
4
"baseQuantity": 100,
5
"baseMeasurementUnit": "G"
6
}

Track Inventory (trackInventory)

Description: Indicates whether inventory is tracked for this product.

Type: Boolean

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

In Stock (inStock)

Description: Indicates whether the product is in stock.

Type: Boolean

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Quantity In Stock (quantityInStock)

Description: The number of items currently in stock. Only relevant for products whose "TrackInventory" field is "True".

Type: Number

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Additional Info Sections (additionalInfoSections)

Description: Displays the Additional Info sections you have in your store in an array of JSON objects.

Type: JSON

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Copy
1
[
2
{
3
"title": "PRODUCT INFO",
4
"description": "I'm a product detail."
5
},
6
...
7
]

Product Options (productOptions)

Description: Displays the defined product options and choices as a complex JSON object. Also supports easy querying and filtering.

Type: JSON

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

You can query the Products collection and filter datasets connected to the collection based on the product options you have defined in your store. The product options are stored in a complex JSON object, with the choices for each option stored as an array of objects (see below). Rather than searching through each choice, you can use special syntax that only requires the product option name and the values of choices available for that option. You can filter this field using these functions: eq, ne, hasSome, hasAll.

For example, if you have a product option called "Size," you can use productOptions.size.value in your code (note that the case of the name doesn't matter). If you have a product option called "Color," you use productOptions.color.value. You can also use any custom options you may have defined. The name you use is the name of the option in your store.

Copy
1
// filter a dataset by color
2
3
import wixData from 'wix-data';
4
5
$w('#myDataset').setFilter(wixData.filter()
6
.hasSome('productOptions.color.value', ['#0000ff', ...])
7
)
Copy
1
// query the "Stores/Products" collection by color
2
3
import wixData from 'wix-data';
4
5
wixData.query('Stores/Products')
6
.hasSome('productOptions.color.value', ['#0000ff', ...])
7
.find()
8
.then(console.log)

Format of the JSON object

Copy
1
{
2
"Option1":
3
{
4
"optionType": "color",
5
"name": "Option1",
6
"choices":
7
[
8
{
9
"value": "#0000ff",
10
"mainMedia": "missing-media.png",
11
"mediaItems": [],
12
"inStock": true,
13
"visible": true
14
}
15
]
16
...
17
},
18
"Option2":
19
{
20
"optionType": "drop_down",
21
"name": "Size",
22
"choices":
23
[
24
{
25
"value": "Large",
26
"mainMedia": "wix:image://v1/anImage.jpg/file.jpg#originWidth=1000&originHeight=1000",
27
"mediaItems":
28
[
29
{
30
"id": "anImage.jpg",
31
"src": "wix:image://v1/anImage.jpg/file.jpg#originWidth=1000&originHeight=1000",
32
"description": "",
33
"title": "title",
34
"type": "Image"
35
},
36
...
37
]
38
"inStock": true,
39
"visible": true
40
},
41
...
42
]
43
}
44
}

Product Page Url (productPageUrl)

Description: Displays the URL for the product's page on your site.

Type: URL

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Manage Variants (manageVariants)

Description: Indicates whether product variants are managed for this store.

Type: Boolean

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Custom Text Fields (customTextFields)

Description: Displays any custom fields you may have set up in an array of JSON objects.

Type: JSON

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Copy
1
[
2
{
3
"title": "custom text",
4
"maxLength": 500,
5
"mandatory": true
6
}
7
...
8
]

Product Type (productType)

Description:The type of product (physical or digital).

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: Yes

Can be filtered: eq, ne, hasSome, contains, startsWith

Read-only: Yes

Slug (slug)

Description: The product's slug, which is its URL-friendly name that is unique across the store.

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: Yes

Can be sorted: Yes

Can be filtered: eq, ne, hasSome, contains, startsWith

Read-only: Yes

Weight (weight)

Description: The product's weight.

Type: Number

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Collections (collections)

Description: The collections the product belongs to.

Type: Reference (Multiple Items)

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: hasSome

Read-only: Yes

Inventory Item (inventoryItemId)

Description: The item's ID in the Stores/InventoryItems collection that corresponds to the product.

Type: Text

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: Yes

Discount (discount)

Description: Discount deducted from the product's original price. Type: JSON Can connect to data: No Can use in dynamic page URL: No Can be sorted: No Can be filtered: No Read-only: No Note: "type" is one of the following:

  • "NONE": Pass this value to remove a discount.
  • "AMOUNT": Discount amount. In the example below, the discount is 5 ($ / € / £ / ¥ / etc.), depending on the product's currency.
  • "PERCENT": Discount is a percentage.
Copy
1
{
2
"type": "AMOUNT",
3
"value": 5
4
}

SEO Data (seoData)

Description: Lists any custom SEO data for the product as an array of SEO tag JSON objects. Learn more.

Type: JSON

Can connect to data: No

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: No

Read-only: No

Copy
1
{
2
"tags": [
3
{
4
"type": "title",
5
"children": "Indonesian Blend",
6
"custom": false,
7
"disabled": false
8
},
9
{
10
"type": "meta",
11
"props": {
12
"name": "description",
13
"content": "Half Java Arabica, half Bali Robusta - big flavor with a biggish kick."
14
},
15
"children": "",
16
"custom": false,
17
"disabled": false
18
},
19
{
20
"type": "meta",
21
"props": {
22
"name": "robots",
23
"content": "index"
24
},
25
"children": "",
26
"custom": false,
27
"disabled": false
28
}
29
...
30
]
31
}

Brand (brand)

Description: Product brand.

Type: Text

Can connect to data: Yes

Can use in dynamic page URL: No

Can be sorted: No

Can be filtered: Yes

Read-only: Yes

Was this helpful?
Yes
No