Skip to content

Commit

Permalink
Improve 0.x documentation (#61)
Browse files Browse the repository at this point in the history
* Improve 0.x documentation

* Update full json

* Update docs/README.md

Co-authored-by: Thalyta Fabrine <[email protected]>

Co-authored-by: Thalyta Fabrine <[email protected]>
  • Loading branch information
chrsmutti and thalytafabrine authored May 5, 2020
1 parent f730ebd commit 03c3aa9
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 50 deletions.
6 changes: 2 additions & 4 deletions docs/Banner.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
📢 Use this project, [contribute](https://github.com/vtex-apps/search) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).

# Banner

`Banner` is a component used in the `vtex.store.search.v2`. It is a simple banner with the difference that you can configure the banner that will appear for each query.
Expand Down Expand Up @@ -54,9 +52,9 @@
| `horizontalAlignment` | `String` | Defines the horizontal alignment for the banner | `"center"` |

The possible values for `horizontalAlignment` are:
| Values |
| Values |
| --------- |
| `"left"` |
| `"left"` |
| `"right"` |
| `"center"`|

Expand Down
2 changes: 0 additions & 2 deletions docs/DidYouMean.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
📢 Use this project, [contribute](https://github.com/vtex-apps/search) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).

# DidYouMean

`DidYouMean` is a component used in the `vtex.store.search.v2` to suggest a possible misspelling correction to the current query.
Expand Down
75 changes: 33 additions & 42 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
# VTEX Search
> :warning:
>
> **Warning:** You’re reading the documentation for `[email protected]`.
>
> Consider chatting with Search & Personalization team about a migration.
>
> You can read about [latest version](https://github.com/vtex-apps/search/).
The VTEX Search is an app that handles the result of our Search and Engagement API, used to provide
# VTEX Intelligent Search

The VTEX Search is an app that handles the result of our Search and Personalization API, used to provide
a more complete search experience.

:loudspeaker: **Disclaimer:** Don't fork this project; use, contribute, or open issue with your feature request.

## Table of Contents

- [Usage](#usage)
- [Indexing Process](#indexing-process)
- [Custom Search Page URL](#custom-search-page-url)
- [Autocomplete](#autocomplete)
- [Order Options](#order-options)
- [Search Result Complements](#search-result-complements)
- [PriceRange](#pricerange)
- [Plug & Play](#plug--play)
- [Catalog Integration](#catalog-integration)
- [Admin Permission](#admin-permission)
- [Google Analytics Configuration](#google-analytics-configuration)
- [Blocks API](#blocks-api)
- [Demo Store-Theme](#demo-store-theme)
- [Configuration](#configuration)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)

## Usage

The first step to start using this app is to install the `vtex.search` and the `vtex.admin-search` in the desired workspace, using:
The first step to start using this app is to install the `vtex.search@0.x` and the `vtex.admin-search` in the desired workspace, using:

```sh
vtex install vtex.search vtex.admin-search
vtex install vtex.search@0.x vtex.admin-search
```

This app uses our store builder with the blocks architecture.
Expand All @@ -54,6 +60,16 @@ Then, add the `store.search.v2` block into your app theme.
}
```

### Indexing Process

After installing our suite of apps, your workspace is ready to begin it's Search journey, but first we need to index your
account's catalog in our Search Engine.

Go to your Admin page and click on the menu [Search > Integration Settings](https://help.vtex.com/tracks/vtex-intelligent-search--19wrbB7nEQcmwzDPl1l4Cb/6wKQgKmu2FT6084BJT7z5V)
and start the Indexing Process.

![](https://images.ctfassets.net/alneenqid6w5/6Dhh6x6Roi1vRePJDtbOFY/d642a9f13d421ef3f3062a5ff261ff39/config-int-EN.png)

### Custom Search Page URL

This will provide your store with a new route `/search` that will handle all search navigation
Expand Down Expand Up @@ -136,9 +152,10 @@ This app has three new components to improve the search result experience. They
Add any of these components into the `search-result-layout.desktop` or the `search-result-layout.mobile` block.

```json
"search-result-layout.desktop": {
{
"search-result-layout.desktop": {
"children": [
"flex-layout.row#didyoumean",
"flex-layout.row#did-you-mean",
"flex-layout.row#suggestion",
"flex-layout.row#banner-one",
"flex-layout.row#result"
Expand All @@ -152,19 +169,25 @@ Add any of these components into the `search-result-layout.desktop` or the `sear
}
}
},
"flex-layout.row#didyoumean": {

"flex-layout.row#did-you-mean": {
"children": ["did-you-mean"]
},
"flex-layout.row#suggestion": {
"children": ["search-suggestions"]
},
"flex-layout.row#banner-one": {
"children": ["search-banner#one"]
},

"search-banner#one": {
"props": {
"area": "one",
"blockClass": "myBanner",
"horizontalAlignment": "center"
}
}
}
```

### PriceRange
Expand Down Expand Up @@ -198,34 +221,6 @@ to work perfectly with our own, it should resemble both these components as clos
If you're using any type of custom components on your `store-theme` we can't guarantee the _Plug & Play_
functionality of the components provided by this app.

### Catalog Integration

For this new search experience to work properly a Token and App Key need to be generated. You can follow an in-depth tutorial on how to create both the Token and the App Key
[here](https://help.vtex.com/tutorial/criar-appkey-e-apptoken-para-autenticar-integracoes).
Finally, in the admin's sidebar, click on **Search** and then on **Integration Settings**. Inform the generated keys and click on **Save**

You'll also need to set up the affiliate API endpoint, you can follow [this tutorial](https://help.vtex.com/tutorial/configuring-affiliates--tutorials_187)
on how to properly set up this step.

The Search endpoint used for the affiliate API should be:

```
http://api.biggylabs.com.br/track-api/v2/affiliate
```

If you end up having any questions about this step, feel free to send an e-mail to `[email protected]`
with the subject `[YOUR STORE] Search App - Catalog Integration`.

### Admin Permission

If you are facing the following error message:

```
User indicated by VtexIdclientAutCookie is not authorized to access the indicated resource
```

your user doesn't have permission to change the search configurations. Ask an admin to give you the `Search Settings - General Settings` permission.

### Google Analytics Configuration

Our search engine uses `_query` as the querystring for the search term. If you want to track the search in GA you need to register it.
Expand All @@ -250,10 +245,6 @@ When implementing this app as a block, various inner blocks may be available.

You can find our demo store-theme with our search app already installed and configured by following this [`repository`](https://github.com/vtex-apps/search-demo-theme).

### Configuration

:hammer: Work in Progress...

## Troubleshooting

You can check if others are passing through similar issues [here](https://github.com/vtex-apps/search/issues). Also, feel free to [open issues](https://github.com/vtex-apps/search/issues/new) or contribute with pull requests.
Expand Down
2 changes: 0 additions & 2 deletions docs/Suggestions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
📢 Use this project, [contribute](https://github.com/vtex-apps/search) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).

# Suggestions

`Suggestions` is a component used in the `vtex.store.search.v2` to suggest search terms similar to the current query.
Expand Down

0 comments on commit 03c3aa9

Please sign in to comment.