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 1 commit
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
--- | --- | ---
`product_url_suffix` | String | Product URL Suffix | `.html`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`category_url_suffix` | String | Category URL Suffix | `.html`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`title_separator` | String | Page Title Separator | `-`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`list_mode` | String | List Mode | `grid-list`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`grid_per_page_values` | String | Products per Page on Grid Allowed Values | `9,15,30`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`list_per_page_values` | String | Products per Page on List Allowed Values | `5,10,15,20,25`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`list_per_page_values` | String | Products per Page on List Allowed Values | `5,10,15,20,25`
`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`

`grid_per_page` | Integer | Products per Page on Grid Default Value | `9`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`list_per_page` | Integer | Products per Page on List Default Value | `10`
keharper marked this conversation as resolved.
Show resolved Hide resolved
`catalog_default_sort_by` | String | Default Sort By | `position`
keharper marked this conversation as resolved.
Show resolved Hide resolved

## Example usage

### Query a store's configuation
Expand Down Expand Up @@ -204,6 +220,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