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"
.
This document describes the permissions and fields in your Products collection.
Important:
By default, querying hidden products requires the appropriate permissions. However, you can allow your visitors to temporarily bypass this requirement by setting the suppressAuth
property to true
.
The Products collection has the following permissions:
You cannot change the Products collection's permissions.
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.
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
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
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: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
Format of the JSON object
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
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
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
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
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
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
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
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
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:
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
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