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 07c325f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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 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.

```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 @@ -21,7 +21,6 @@ init({
query: 'q',
},
serpQuery: {
name: 'serp',
products: {
size: 20,
from: 0,
Expand Down Expand Up @@ -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 07c325f

Please sign in to comment.