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

Commit bcee23e

Browse files
authored
GraphQL: StoreConfig attribute updates (#8369)
* GraphQL: StoreConfig attribute updates * Update store-config.md
1 parent 5c789a6 commit bcee23e

File tree

3 files changed

+47
-32
lines changed

3 files changed

+47
-32
lines changed

src/_includes/graphql/store-config.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Attribute | Data Type | Description | Default or example value
2525
`cms_home_page` | String | Returns the name of the CMS page that identifies the home page for the store | `home`
2626
`cms_no_cookies` | String | Identifies a specific CMS page that appears when cookies are not enabled for the browser | `enable-cookies`
2727
`cms_no_route` | String | Identifies a specific CMS page that you want to appear when a 404 “Page Not Found” error occurs | `no-route`
28-
`code` | String | A unique identifier for the store | `default`
28+
`code` | String | Deprecated. Use `store_code` instead. A unique identifier for the store | `default`
2929
`copyright` | String | The copyright statement that appears at the bottom of each page | Copyright © 2013-present Magento, Inc. All rights reserved.
3030
`default_description` | String | The description that provides a summary of your site for search engine listings and should not be more than 160 characters in length | null
3131
`default_display_currency_code` | String | The code representing the currency displayed on the store | `USD`
@@ -39,7 +39,9 @@ Attribute | Data Type | Description | Default or example value
3939
`head_includes` | String | Contains scripts that must be included in the HTML before the closing `<head>` tag | `<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"{{MEDIA_URL}}styles.css\" />`
4040
`head_shortcut_icon` | String | Uploads the small graphic image that appears in the address bar and tab of the browser | null
4141
`header_logo_src` | String | The path to the logo that appears in the header | null
42-
`id` | Int | The ID number assigned to the store | `1`
42+
`id` | Int | Deprecated. Use `store_code` instead. The ID number assigned to the store | `1`
43+
`is_default_store` | Boolean | Indicates whether the store view has been designated as the default within the store group | true or false
44+
`is_default_store_group` | Boolean | Indicates whether the store group has been designated as the default within the website | true or false
4345
`list_mode` | String | The format of the search results list | `grid-list`
4446
`list_per_page` | Int | The default number of products per page in List View | `10`
4547
`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`
@@ -80,12 +82,18 @@ Attribute | Data Type | Description | Default or example value
8082
`secure_base_url` | String | The store's fully-qualified secure base URL | `https://magentohost.example.com/`
8183
`send_friend` | [SendFriendConfiguration](#SendFriendConfiguration) | Email to a Friend configuration | Not applicable
8284
`show_cms_breadcrumbs` | Int | Determines if a breadcrumb trail appears on all CMS pages in the catalog. Options: `0` (No) or `1` (Yes) | 1
83-
`store_name` | String | The store's name | `My Store`
85+
`store_code` | ID | The unique ID of the store view. In the Admin, this is called the Store View Code. When making a GraphQL call, assign this value to the `Store` header to provide the scope | `default`
86+
`store_group_code` | ID | The unique ID assigned to the store group. In the Admin, this is called the Store Name | `main_website_store`
87+
`store_group_name` | String | The label assigned to the store group | Main Website Store
88+
`store_name` | String | The label assigned to the store view | Default Store View
89+
`store_sort_order` | Int | The store view sort order | 10
8490
`timezone` | String | The store's time zone | `America/Chicago`
8591
`title_prefix` | String | A prefix that appears before the title to create a two- or three-part title | null
8692
`title_separator` | String | Identifies the character that separates the category name and subcategory in the browser title bar | `-`
8793
`title_suffix` | String | A suffix that appears after the title to create a two-or three part title | null
88-
`website_id` | Integer | The ID number assigned to the parent website | `1`
94+
`website_code` | ID | The unique ID for the website | `base`
95+
`website_id` | Integer | Deprecated. The field should not be used on the storefront. The ID number assigned to the parent website | `1`
96+
`website_name` | String | The label assigned to the website | Main Website
8997
`weight_unit` | String | The weight unit for products | `lbs`, `kgs`, or similar
9098
`welcome` | String | Text that appears in the header of the page and includes the name of customers who are logged in | Default welcome msg!
9199

src/guides/v2.4/graphql/queries/available-stores.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ The following query returns information about the store's basic catalog configur
2121
```graphql
2222
query {
2323
availableStores(useCurrentGroup: true) {
24-
id
25-
code
26-
website_id
24+
store_code
25+
store_name
26+
is_default_store
27+
store_group_code
28+
is_default_store_group
2729
locale
2830
base_currency_code
2931
default_display_currency_code
@@ -37,7 +39,6 @@ query {
3739
secure_base_link_url
3840
secure_base_static_url
3941
secure_base_media_url
40-
store_name
4142
}
4243
}
4344
```
@@ -49,9 +50,11 @@ query {
4950
"data": {
5051
"availableStores": [
5152
{
52-
"id": 1,
53-
"code": "default",
54-
"website_id": 1,
53+
"store_code": "default",
54+
"store_name": "Default Store View",
55+
"is_default_store": true,
56+
"store_group_code": "main_website_store",
57+
"is_default_store_group": true,
5558
"locale": "en_US",
5659
"base_currency_code": "USD",
5760
"default_display_currency_code": "USD",
@@ -64,13 +67,14 @@ query {
6467
"secure_base_url": "http://example.com/",
6568
"secure_base_link_url": "http://example.com/",
6669
"secure_base_static_url": "http://example.com/pub/static/version1606976517/",
67-
"secure_base_media_url": "http://example.com/pub/media/",
68-
"store_name": "Default Store View"
70+
"secure_base_media_url": "http://example.com/pub/media/"
6971
},
7072
{
71-
"id": 2,
72-
"code": "de",
73-
"website_id": 1,
73+
"store_code": "de",
74+
"store_name": "Europe Store View",
75+
"is_default_store": false,
76+
"store_group_code": "main_website_store",
77+
"is_default_store_group": true,
7478
"locale": "de_DE",
7579
"base_currency_code": "USD",
7680
"default_display_currency_code": "EUR",
@@ -83,8 +87,7 @@ query {
8387
"secure_base_url": "http://example.com/",
8488
"secure_base_link_url": "http://example.com/",
8589
"secure_base_static_url": "http://example.com/pub/static/version1606976517/",
86-
"secure_base_media_url": "http://example.com/pub/media/",
87-
"store_name": "Europe Store View"
90+
"secure_base_media_url": "http://example.com/pub/media/"
8891
}
8992
]
9093
}

src/guides/v2.4/graphql/queries/store-config.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ The `storeConfig` query can return `base` and `extended` store configuration set
2020
```graphql
2121
{
2222
storeConfig {
23-
id
24-
code
25-
website_id
23+
store_code
24+
store_name
25+
is_default_store
26+
store_group_code
27+
is_default_store_group
2628
locale
2729
base_currency_code
2830
default_display_currency_code
@@ -46,22 +48,24 @@ The `storeConfig` query can return `base` and `extended` store configuration set
4648
{
4749
"data": {
4850
"storeConfig": {
49-
"id": 1,
50-
"code": "default",
51-
"website_id": 1,
51+
"store_code": "default",
52+
"store_name": "Default Store View",
53+
"is_default_store": true,
54+
"store_group_code": "main_website_store",
55+
"is_default_store_group": true,
5256
"locale": "en_US",
5357
"base_currency_code": "USD",
5458
"default_display_currency_code": "USD",
5559
"timezone": "America/Chicago",
5660
"weight_unit": "lbs",
57-
"base_url": "http://magentohost.example.com/",
58-
"base_link_url": "http://magentohost.example.com/",
59-
"base_static_url": "http://magentohost.example.com/pub/static/version1536249714/",
60-
"base_media_url": "http://magentohost.example.com/pub/media/",
61-
"secure_base_url": "http://magentohost.example.com/",
62-
"secure_base_link_url": "http://magentohost.example.com/",
63-
"secure_base_static_url": "http://magentohost.example.com/pub/static/version1536249714/",
64-
"secure_base_media_url": "http://magentohost.example.com/pub/media/"
61+
"base_url": "http://example.com/",
62+
"base_link_url": "http://example.com/",
63+
"base_static_url": "http://example.com/pub/static/version1606976517/",
64+
"base_media_url": "http://example.com/pub/media/",
65+
"secure_base_url": "http://example.com/",
66+
"secure_base_link_url": "http://example.com/",
67+
"secure_base_static_url": "http://example.com/pub/static/version1606976517/",
68+
"secure_base_media_url": "http://example.com/pub/media/"
6569
}
6670
}
6771
}

0 commit comments

Comments
 (0)