Skip to content

Commit c98b2b5

Browse files
authored
FFWEB-3283: Update SDK documentation
Update SDK documentation
1 parent 7b4c987 commit c98b2b5

7 files changed

Lines changed: 45 additions & 85 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# Changelog
22
## Unreleased
3+
### BREAKING
4+
- IMPORTANT! Update Fact-Finder Web Components library from v4 to v5
5+
36
### Change
4-
- Update SDK documentation
5-
- Add support for Oxid 7.1
6-
- Add support for PHP 8.2
7-
- Update composer libraries
7+
- Add support for Oxid 7.1 and 7.2
8+
- Add support for PHP 8.2 and 8.3
9+
- Upgrade libraries
810
- Improve code style
11+
- Remove proxy feature as it needs refactoring (new version of this feature will be implemented in future release)
12+
- Upgrade Web Components to v5.0.1
13+
- Update SDK documentation
14+
15+
### Fix
16+
- Fix deprecations for Oxid 7.2
17+
- Fix basic auth for HTTP export
918

1019
## [v5.0.0] - 2024.01.11
1120
### BREAKING

README.md

Lines changed: 32 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ process. The second chapter *Backend Configuration* explains the customisation o
99
final chapter *Web Component Integration* describes how the web components interact with the shop system and how to
1010
customise them.
1111

12+
Our Oxid plugin offers a basic working integration for default Oxid Apex theme.
13+
Most projects may require modifications in order to fit their needs.
14+
For more advanced features please check our official [WebComponnents documentation](https://web-components.fact-finder.de/documentation/5.x/install-dist).
15+
1216
## Table of contents
1317
- [Requirements](#requirements)
1418
- [Installation](#installation)
@@ -21,7 +25,6 @@ customise them.
2125
- [Test FTP Connection Button](#test-ftp-connection)
2226
- [Update Field Roles Button](#update-field-roles)
2327
- [Advanced Settings](#advanced-settings)
24-
- [Proxy](#proxy)
2528
- [Features Settings](#features-settings)
2629
- [Using FACT-Finder® on category pages](#using-fact-finder-on-category-pages)
2730
- [Feed Settings](#feed-settings)
@@ -40,8 +43,8 @@ customise them.
4043
- [License](#license)
4144

4245
## Requirements
43-
- OXID eShop 7.0
44-
- PHP version 8.0 or higher
46+
- OXID eShop 7.0 or higher
47+
- PHP version 8.1 or higher
4548

4649
**Note:** For Oxid eShop 6.x and PHP 7, please use SDK version 4.x
4750

@@ -82,111 +85,59 @@ Configuration set here is used by both Web Components and during the server side
8285
Credentials you will be given should be placed here.
8386

8487
* Server URL - FACT-Finder® instance url
85-
**Note:** Server URL should contain a used protocol: (e.g. `https://`) and should end with an endpoint specific for a given version (e.g. in version 7.3 its `FACT-Finder-7.3`, in NG `fact-finder` )
88+
**Note:** Server URL should contain a used protocol: (e.g. `https://`) and should end with `fact-finder` (e.g. `https://my-domain.fact-finder.de/fact-finder`)
8689
* Channel - Channel you want to serve data from
8790
**Note** The number of channel fields is adjusted to the number of active languages used in application. Please make sure you set a correct channel for a given language.
88-
* Username - for importing data to FF
89-
* Password - for importing data to FF
90-
* Username - for fetching data from FF
91-
* Password - for fetching data from FF
92-
* Authorization Prefix
93-
* Authorization Postfix
94-
**Note:** FACT-Finder® NG does not require fields `Authorization Prefix` and `Authorization Postfix` to be set. Please omit these fields in this case.
95-
* Version - Used FACT-Finder® version
96-
**Note:** Module supports FACT-Finder® from version 6.9 up to NG. by selecting the wrong version you may cause the Web Components to be unable to communicate with FACT-Finder®
97-
* API Version - Used FACT-Finder® api version
98-
**Note:** Module supports FACT-Finder® api version `v4` and `v5`. By selecting the wrong api version you may cause the Web Components to be unable to communicate with FACT-Finder®
91+
* Username for the FACT-Finder Import - your username in FACT-Finder account (necessary if you want to automatically execute import data in FACT-Finder).
92+
* Password for the FACT-Finder Import - your password in FACT-Finder account
93+
* FACT-Finder API key - for fetching data from FF (necessary to use Web Components integration)
9994

10095
### Buttons
10196

102-
![Buttons](docs/assets/configuration-buttons2.png "Configuration Buttons")
97+
![Buttons](docs/assets/configuration-buttons.png "Configuration Buttons")
10398

104-
#### Test Connection Button
105-
By clicking the `Test Connection` button you can check if your credentials are correct.
106-
This functionality uses form data, so there is no need to save first.
107-
**Note:** This functionality uses `de` channel input value.
99+
#### Update Field Roles Button
100+
This functionality allows you to update field roles if you have changed them in FACT-Finder.
101+
The field roles are by default configured accordingly to the columns exported by the module.
102+
If you are about change one of the column name that serves as a role e.g. `Master` or `ProductNumber`, that holds the `Master article number` and `Product number` roles respectively, please remember to update the field roles with that functionality
108103

109104
#### Export Feed Button
110-
It is a one of possible ways of exporting feed. You can find more details in section [Admin Panel Export](#admin-panel-export)
105+
It is a one of possible ways of exporting feed. You can find more details in section [Admin Panel Export](#admin-panel-export)
106+
107+
#### Test Connection Button
108+
By clicking the `Test Connection` button you can check if your FACT-Finder API key is correct and SDK could connect with FACT-Finder API successfully.
109+
This functionality uses form data, so there is no need to save first.
110+
**Note:** This functionality uses `de` channel input value.
111111

112112
#### Test FTP Connection Button
113113
This functionality allows you to test if your shop can successfully connect to configured FTP/SFTP server.
114114
It uses parameters passed down with the request so there is no need to save the configuration before.
115115

116-
#### Update Field Roles Button
117-
This functionality allows you to update field roles if you have changed them in FACT-Finder.
118-
The field roles are by default configured accordingly to the columns exported by the module.
119-
If you are about change one of the column name that serves as a role e.g. `Master` or `ProductNumber`, that holds the `Master article number` and `Product number` roles respectively, please remember to update the field roles with that functionality
116+
#### Test Push Import Button
117+
By clicking the `Test Push Import` button you can check if your FACT-Finder username and password is correct.
118+
This functionality uses form data, so there is no need to save first.
119+
**Note:** This functionality uses `de` channel input value.
120+
120121

121122
### Advanced Settings
122123
![Advanced Settings](docs/assets/advanced-settings.png "Advanced settings")
123-
* `Use URL params?` - check this option if you want Web Components to push each used query parameter to the URL,
124-
* `Additional parameters` - here you can define extra parameters for each of these properties: `add-params`, `add-tracking-params`, `keep-url-params`, `parameter-whitelist`.
125-
Values will be passed to the Web Components and used in communication.
126-
You can find more information about mentioned properties purposes in Web Components [documentation](https://web-components.fact-finder.de/api/3.x/ff-communication#tab=api).
127-
* `Anonymize User ID?` - check this option if you want to send user id with tracking requests in anonymized form. By default the regular id field from user table is sent.
128-
* `Use Proxy` - check this option if you want each request sends by Web Components first reach the dedicated module controller which forwards it to the FACT-Finder.
129-
**Note:** If you plan to use proxy, consider reading below paragraph as it requires full instruction how to enable it properly.
124+
* `Anonymize User ID?` - check this option if you want to send user id with tracking requests in anonymized form. By default the regular id field from user table is sent.
130125
* `How to count single click on "Add to cart" button?` - select how would you like to count single click on "Add to cart" button
131126
* `Send the SID as userId when user not logged in?`
132127

133-
#### Proxy
134-
Proxy feature adds a oxid controller which serves as a middleware between Web Components and FACT-Finder®.
135-
The data flow with proxy enabled is illustrated by the graph below.
136-
![Communication Overview](docs/assets/communication-overview.png "Communication Overview")
137-
Having a middleware controller brings many possibilities to customize the request and the response.
138-
In addition, if forwarded request does not result with a correct response, you can implement fallback strategy, starting from this point.
139-
140-
```php
141-
//src/Controller/SearchResultController.php:65
142-
protected function fallback(): void
143-
{
144-
//this function could be used to implement fallback logic in case of any communication error.
145-
$this->showJsonAndExit('');
146-
}
147-
```
148-
149-
To enable proxy you need to change your HTTP server configuration by adding two rewrite rules.
150-
This is necessary because Web Components appends a URL parts to the base URL making it unreadable by the Oxid.
151-
This is because Oxid use query parameters `cl` and `fnc` to instantiate specific controller and execute its function.
152-
There is no routing that use url parts, hence any AJAX requests must target index.php file with the aforementioned parameters.
153-
Without this rules any request will lead to 404.
154-
155-
NGINX
156-
157-
```nginx
158-
location ~ \.ff {
159-
rewrite [a-zA-Z].ff /$1 break;
160-
}
161-
162-
# the the version might need to be adjusted, depends on the API version you use
163-
location ~ /rest/v {
164-
rewrite rest/v[0-9]/[a-zA-Z]*/ /$1 break;
165-
}
166-
```
167-
168-
APACHE
169-
170-
```apache
171-
RewriteRule (.*\.ff)$ /$1 [L]
172-
173-
# the the version might need to be adjusted, depends on the API version you use
174-
RewriteRule /rest/v[0-9] /$1 [L]
175-
```
176-
177128
### Features Settings
178129
![Features Settings](docs/assets/features-settings.png "Features settings")
179130

180131
* `Use FACT-Finder® for category pages?` - check this option to use Web Components in category pages. More information in separate paragraph.
132+
* `Category Path field name` - by default, the module uses a field named `CategoryPath` (default category field name for FactFinder instance). If in your FactFinder instance configuration you have a different field name for Category field then you must set this name here.
181133
* Campaigns - enables `ff-campaign-product` on product page and `ff-campaign-feedbacktext`, `ff-campaign-shopping-cart`on cart page
182134
* Recommendations - enables `ff-recommendation` on product page
183135
* Similar products - enables `ff-similar-products` on product page
184-
* Pushed products - enables `ff-campaign-pushed-products>` on cart page
185-
* Disable cache - controls the usage of search result caches
136+
* Pushed products - enables `ff-campaign-pushed-products>` on cart page
186137

187138
### Using FACT-Finder® on category pages
188139
Module in order to preserve categories URLs and hence SEO get use of standard Oxid routing with the combination of FACT-Finder® availability to pass custom parameters to search request.
189-
Once user lands on category page search event is emitted immediately (thanks to `search-immediate` communication parameter usage).
140+
Once user lands on category page search event is emitted immediately.
190141

191142
### Feed Settings
192143
![Feed Settings](docs/assets/feed-settings.png "Feed settings")
@@ -283,13 +234,13 @@ Here you can find a full [Tracking Guide](https://web-components.fact-finder.de/
283234
This module follows that guide in order to provide tracking of following events:
284235

285236
### Login
286-
This event is tracked automatically by the `ff-communication` element upon receiving `uid` attribute.
237+
This event is tracked automatically by SDK.
287238

288239
### Click on Product
289240
This event is tracked automatically by the `ff-record` element bindings. **Note:** for this to work a directive `data-redirect` has to be added
290241

291242
### Add Product to Cart
292-
We offer a `registerAddToCartListener` function which helps to register `click` events on form submit buttons. **Note:** Example usage can be found in `src/views/frontend/blocks/campaign/product.tpl`
243+
We offer a `registerAddToCartListener` function which helps to register `click` events on form submit buttons. **Note:** Example usage can be found in `views/twig/extensions/themes/default/page/details/inc/productmain.html.twig`
293244

294245
### Place an Order
295246
This event is tracked by the `ff-checkout-tracking` element which is implemented on order confirmation page

docs/assets/advanced-settings.png

67.5 KB
Loading
37.6 KB
Loading
-48.1 KB
Binary file not shown.

docs/assets/features-settings.png

-134 KB
Binary file not shown.

docs/assets/main-settings.png

34.9 KB
Loading

0 commit comments

Comments
 (0)