Documentation / Theme editor / Global foreach collections

All those collections can be used in foreach loops.

General collections

These collections are not related to the store, they are platform-generic.

countries

Contains all the countries defined in the CommerscaleTM database.

Object type

country

Vary by

Variables created by foreach

Use examples

states

Contains all the country states defined in the CommerscaleTM database. They are not contextualized by the country. You have to manually check with an if block if the state matches the country.

Object type

state

Vary by

Variables created by foreach

Use examples

Blog collections

These collections are available site-wide and are related to the blog.

blog.posts.years

Contains all the years in which there is at least one blog post.

Object type

year

Vary by

Variables created by foreach

Use examples

blog.posts.tags

Contains all the tags defined in all the blog posts on the store.

Object type

tag

Vary by

Variables created by foreach

Use examples

Customer collections

These collections are available site-wide and are related to the customer.

customer.orders

Contains all the orders of the customer.

Object type

order

Vary by

Variables created by foreach

Use examples

Product collections

These collections are available site-wide and are related to products.

store.products.vendors

Contains all the unique vendors defined across all the products in store.

Object type

vendor

Vary by

Variables created by foreach

Use examples

store.products.new

Contains all the new products recently added to the store.

Object type

product

Vary by

Variables created by foreach

Use examples

Contains all the most popular products in the store.

Object type

product

Vary by

Variables created by foreach

Use examples

store.products.priceranges

Contains a list of 5 price ranges defined automatically by the system and ranging from the least expensive to the most expensive product.

Object type

pricerange

Vary by

Variables created by foreach

Use examples

store.categories

Contains all the categories of products defined in the store.

Object type

category

Vary by

Variables created by foreach

Use examples

store.collections

Contains all the collections of products defined in the store.

Object type

collection

Vary by

Variables created by foreach

Use examples