@graphcommerce/docs 9.1.0-canary.26 → 9.1.0-canary.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.29
4
+
5
+ ## 9.1.0-canary.28
6
+
7
+ ## 9.1.0-canary.27
8
+
3
9
  ## 9.1.0-canary.26
4
10
 
5
11
  ## 9.1.0-canary.25
@@ -22,6 +22,14 @@ The is composed of five packages:
22
22
  - `@graphcommerce/algolia-personalization`
23
23
  - `@graphcommerce/algolia-recommend`
24
24
 
25
+ ## Preparation: Search Overlay UI
26
+
27
+ Algolia goes hand-in-hand with a proper search UI. We've got a separate 'Magento
28
+ Search Overlay' package that adds a search overlay experience to GraphCommerce.
29
+ This search overlay is not dependent on Algolia so you can use it with default
30
+ Magento. So before starting, install the `@graphcommerce/magento-search-overlay`
31
+ package first.
32
+
25
33
  ## Installation and configuration of Algolia for GraphCommerce
26
34
 
27
35
  ### Preparation
@@ -67,23 +75,18 @@ necessary configuration to your `graphcommerce.config.js` file:
67
75
  module.exports = {
68
76
  // Other configuration...
69
77
  algolia: {
70
- // Configure your Algolia application ID.
71
- // Stores > Configuration > Algolia Search > Credentials and Basic Setup > Application ID
72
- applicationId: 'SAME_AS_MAGENTO',
78
+ // Configure your Algolia application ID. [Algolia API Keys Dashboard](https://www.algolia.com/account/api-keys)
79
+ applicationId: '',
73
80
 
74
- // Configure your Algolia Search Only API Key.
75
- // Stores > Configuration > Algolia Search > Credentials and Basic Setup > Search-only (public) API key
76
- searchOnlyApiKey: 'SAME_AS_MAGENTO',
81
+ // Configure your Search API Key. [Algolia API Keys Dashboard](https://www.algolia.com/account/api-keys)
82
+ // Make sure the API key has the following ACL: search, listIndexes and settings [Lookup here](https://dashboard.algolia.com/account/api-keys/restricted)
83
+ searchOnlyApiKey: '',
77
84
 
78
85
  // Stores > Configuration > Algolia Search > Credentials and Basic Setup > Index name prefix
79
86
  indexNamePrefix: 'SAME_AS_MAGENTO',
80
87
 
81
88
  // By default the catalog will not use algolia. Set this to true to enable Algolia for the catalog.
82
89
  catalogEnabled: true,
83
-
84
- // Enable Algolia customer group pricing.
85
- // Please be aware that personalization needs to be enabled as well to make this work.
86
- customerGroupPricingEnabled: true,
87
90
  },
88
91
  }
89
92
  ```
@@ -245,6 +248,59 @@ module.
245
248
 
246
249
  ## Additional Configuration
247
250
 
251
+ ### Facets
252
+
253
+ 1. Navigate to
254
+ `Stores > Configuration > Algolia Search > Instant Search Results Page`
255
+ 2. Set `Number of values per facet` to `1000` or a value that is high enough to
256
+ fetch everyting at once.
257
+
258
+ ### Visibility
259
+
260
+ By default Algolia will index all products will have fields like, however those
261
+ fields are NOT filterable.
262
+
263
+ - `visibility_search: 1`
264
+ - `visibility_catalog: 1`
265
+
266
+ To properly support the visibility filter the visibility attribute needs to be
267
+ added to the index:
268
+
269
+ 1. Navigate to
270
+ `Stores > Configuration > Algolia Search > Instant Search Results Page`
271
+ 2. Add `visibility` to Facets and set it to `Filter only`
272
+
273
+ ### Suggestions
274
+
275
+ 1. Create a query suggestions index in your
276
+ [Algolia dashboard: Query Suggestions](https://dashboard.algolia.com/query-suggestions)
277
+ based on your products indexes.
278
+ 2. The name of the index will be auto-completed as:
279
+ `${index}_query_suggestions`.
280
+ 3. Do this for all product indexes.
281
+
282
+ ```tsx
283
+ const config = {
284
+ algolia: {
285
+ /*
286
+ * To enable Algolia suggestions, please provide the Suffix that is used for your suggestions index.
287
+ * For the index `magento2_demo_en_US_query_suggestions` this would be `_query_suggestions`
288
+ */
289
+ suggestionsSuffix: '_query_suggestions,
290
+ },
291
+ }
292
+ ```
293
+
294
+ ⚠️ Warning: This does not use the Magento 2 Algolia suggestions feature. That
295
+ feature only syncs Magento's suggestions to Algolia and doesn't use the Algolia
296
+ Suggestions feature.
297
+
298
+ 1. Navigate to
299
+ `Stores > Configuration > Algolia Search > Credentials and Basic Setup`\
300
+ 2. Set `Enable Query Suggestions Index` to `No`.
301
+ 3. Cleanup remaining indexes in the
302
+ [indices overview](https://dashboard.algolia.com/indices)
303
+
248
304
  ### Sorting Options
249
305
 
250
306
  To configure sorting options for your Algolia-powered search, you need to enable
@@ -259,17 +315,30 @@ treated as a separate (virtual) index in Algolia.
259
315
 
260
316
  ### Customer Group Pricing
261
317
 
318
+ ```tsx
319
+ const config = {
320
+ algolia: {
321
+ customerGroupPricingEnabled: true,
322
+ },
323
+ }
324
+ ```
325
+
262
326
  To enable customer group pricing, make sure customers groups prices are mapped
263
327
  to algolia.
264
328
  `Stores > Configuration > Algolia Search > Advanced > Enable Customer Groups`.
265
329
 
330
+ ⚠️ Warning: Magento needs to be configured the same as
331
+ customerGroupPricingEnabled, else sorting index selection will not work properly
332
+ for customer group pricing.
333
+
266
334
  ⚠️ Warning: Catalog price rules for a specific customer group do not seem to be
267
- indexed.It seems only: `[Product] > Advanced Pricing > Customer Group Price`
335
+ indexed. It seems only: `[Product] > Advanced Pricing > Customer Group Price`
268
336
  gets indexed.
269
337
 
270
- Note: The GraphQL API does not expose the customer group_id by default. We're
271
- doing an additional REST API call to get the value. This means a somewhat slower
272
- (few hundred ms) when the Customer is loaded.
338
+ ⚠️ Warning: The GraphQL API does not expose the customer group_id by default. To
339
+ make this functionality work, an additional REST API call is made when loggin
340
+ the customer in. This means a somewhat slower (few hundred ms) when the Customer
341
+ is loaded.
273
342
 
274
343
  ### Customization
275
344
 
@@ -291,6 +360,3 @@ implementation.
291
360
 
292
361
  For more information and detailed documentation, visit the GraphCommerce GitHub
293
362
  repository and Algolia's developer documentation. Happy coding!
294
-
295
- TODO: INSERT GRAPHIC - Diagram illustrating the architecture of Algolia
296
- integration in GraphCommerce
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@graphcommerce/docs",
3
3
  "homepage": "https://www.graphcommerce.org/docs",
4
4
  "repository": "github:graphcommerce-org/graphcommerce/docs",
5
- "version": "9.1.0-canary.26",
5
+ "version": "9.1.0-canary.29",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.26"
8
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.29"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }