Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Document catalog configuration added to storeConfig query #4920

Merged
merged 4 commits into from
Jul 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions guides/v2.3/graphql/reference/store-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ Attribute | Data Type | Description
`no_route` | String | Contains the URL of the default page that you want to appear when if a 404 “Page not Found” error occurs
`show_cms_breadcrumbs` | Int | Determines if a breadcrumb trail appears on all CMS pages in the catalog. Options: `0` (No) or `1` (Yes)

### Supported Catalog attributes

Use the `catalog` attributes to retrieve information about the store's catalog. These attributes are defined in the `CatalogGraphQl` module.

keharper marked this conversation as resolved.
Show resolved Hide resolved
Attribute | Data Type | Description | Example
--- | --- | ---
`catalog_default_sort_by` | String | The default sort order of the search results list | `position`
`category_url_suffix` | String | The suffix applied to category pages, such as `.htm` or `.html` | `.html`
`grid_per_page` | Integer | The default number of products per page in Grid View | `9`
`grid_per_page_values` | A list of numbers that define how many products can be displayed in List View | `9,15,30`
`list_mode` | String | The format of the search results list | `grid-list`
`list_per_page` | Integer | The default number of products per page in List View | `10`
`list_per_page_values` | String | A list of numbers that define how many products can be displayed in List View | `5,10,15,20,25`
`product_url_suffix` | String | The suffix applied to product pages, such as `.htm` or `.html` | `.html`
`title_separator` | String | Identifies the character that separates the category name and subcategory in the browser title bar | `-`

### Extend configuration data

You can add your own configuration to the `Store` endpoint within your own module.
Expand Down Expand Up @@ -233,6 +249,48 @@ The following query returns information about the store's content pages.
}
```

### Query a store's Catalog configuration

The following query returns information about the store's catalog configuration.

**Request**

keharper marked this conversation as resolved.
Show resolved Hide resolved
```text
{
storeConfig {
product_url_suffix
category_url_suffix
title_separator
list_mode
grid_per_page_values
list_per_page_values
grid_per_page
list_per_page
catalog_default_sort_by
}
}
```

**Response**

```json
{
"data": {
"storeConfig": {
"product_url_suffix": ".html",
"category_url_suffix": ".html",
"title_separator": "-",
"list_mode": "grid-list",
"grid_per_page_values": "9,15,30",
"list_per_page_values": "5,10,15,20,25",
"grid_per_page": 9,
"list_per_page": 10,
"catalog_default_sort_by": "position"
}
}
}
```

### Include website information with `products` query results

The [ProductInterface]({{ page.baseurl }}/graphql/reference/products.html#ProductInterface) can include information about the `Website` object.
Expand Down