Skip to content

Commit

Permalink
Remove deprecated name parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
timowestnosto committed Nov 1, 2024
1 parent d6f5d34 commit 53ac41a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ init({
categoryCssSelector: '#MainContent',

categoryQuery: {
name: 'serp',
products: {
categoryId: "1234567",
categoryPath: "dresses",
Expand All @@ -35,7 +34,7 @@ init({

#### categoryQuery parameter as function 

In the example above, we supply autocomplete query parameters as an object. Additionally, categoryQuery parameters can also be supplied as a function. The function flavor can be used for building complex query parameters and provides access to other pre-defined configuration parameters. Section below shows an example of categoryQuery supplied as a function which provides the product variationId by accessing the pre-defined categoryId() and categoryPath() methods from the default configuration.
In the example above, we supply autocomplete query parameters as an object. Additionally, `categoryQuery` parameter can also be supplied as a function. The function flavor can be used for building complex query parameters and provides access to other pre-defined configuration parameters. Section below shows an example of `categoryQuery` supplied as a function which provides the product `variationId` by accessing the pre-defined `categoryId` and `categoryPath` methods from the default configuration.

```javascript
import { init } from '@nosto/preact'
Expand All @@ -50,7 +49,6 @@ init({

categoryQuery: () => {
return {
name: 'serp',
products: {
categoryId: this.categoryId(),
categoryPath: this.categoryPath(),
Expand All @@ -65,11 +63,11 @@ init({
{% hint style="info" %}
If you want to integrate only Categories without Search or Autocomplete, ensure that the following entries are removed or commented out: 

serpComponent
`serpComponent`

historyComponent
`historyComponent`

autocompleteComponent
`autocompleteComponent`
{% endhint %}

### Handling native results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ init({

#### autocompleteQuery parameter as function 

In the example above, we supply autocomplete query parameters as an object. Additionally, autocompleteQuery parameters can also be supplied as a function. The function flavor can be used for building complex query parameters and provides access to other pre-defined configuration parameters. Section below shows an example of autocompleteQuery supplied as a function which provides the product variationId by accessing the pre-defined variationId() method from the default configuration.
In the example above, we supply autocomplete query parameters as an object. Additionally, the `autocompleteQuery` parameter can also be supplied as a function. The function flavor can be used for building complex query parameters and provides access to other pre-defined configuration parameters. Section below shows an example of `autocompleteQuery` supplied as a function which provides the product variation id by accessing the pre-defined `variationId` method from the default configuration.

{% code title="index.js" %}
```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ init({
query: 'q',
},
serpQuery: {
name: 'serp',
products: {
size: 20,
from: 0,
Expand All @@ -32,7 +31,7 @@ init({

#### serpQuery parameter flavors 

In the example above, we supply serp query parameters as an object. Additionally, serpQuery parameters can also be supplied as a function. The function flavor can be used for building complex query parameters and provides access to other pre-defined configuration parameters. Section below shows an example of serpQuery supplied as a function which provides the product variationId by accessing the pre-defined variationId() method from the default configuration.
In the example above, we supply serp query parameters as an object. Additionally, the `serpQuery` parameter can also be supplied as a function. The function flavor can be used for building complex query parameters and provides access to other pre-defined configuration parameters. Section below shows an example of `serpQuery` supplied as a function which provides the product variation id by accessing the pre-defined `variationId` method from the default configuration.

<pre class="language-javascript" data-title="index.js"><code class="lang-javascript"><strong>import { init } from '@nosto/preact'
</strong>
Expand All @@ -52,7 +51,6 @@ init({
},
serpQuery() {
return {
name: 'serp',
products: {
size: 20,
from: 0,
Expand Down Expand Up @@ -129,7 +127,6 @@ init({
},
compressUrlParameters: true,
serpQuery: {
name: 'serp',
products: {
size: 20,
from: 0,
Expand Down

0 comments on commit 53ac41a

Please sign in to comment.