diff --git a/docs/Usage-Guide.md b/docs/Usage-Guide.md index 9c929b5..8c22410 100644 --- a/docs/Usage-Guide.md +++ b/docs/Usage-Guide.md @@ -244,7 +244,10 @@ changes, so data cannot be edited in XbyK safely, but new custom or reusable fie safely. User can select content item folders where content items are synchronized. Content item folders can be selected independently for each content type. These settings can be found in -Configuration -> K13Ecommerce -> K13Ecommerce settings. +Configuration -> K13Ecommerce -> K13Ecommerce settings. Content items are not moved if root folder is selected. + +With enabled product page synchronization (see [How to enable automatic product page synchronization?](#prodpagesync)) content type `K13Store.ProductPage` (in chosen web channel) +is created for every content item of type `K13Store.ProductSKU`. No price data is synced, because catalog prices need calculator evaluation in context of user's cart and standalone requests via `IProductService` are required. @@ -369,7 +372,7 @@ For checkout process these content types (for pages) are restored: Let the product synchronization finish. Check `K13-Store product synchronization done.` in debug console or check Event log for errors. 4. Create pages for Store: 1. Store page (of type `K13Store - Store page`) - 2. Product pages (of type `K13Store - Product page`) - for each page select corresponding Product SKU from content hub. + 2. Product pages (of type `K13Store - Product page`) - for each page select corresponding Product SKU from content hub (or use automatic synchronization as described [here](#prodpagesync)). 2. Categories pages (of type `K13Store - Category page`) - for each page select product pages in category 3. Cart/Checkout steps pages 1. Cart content page @@ -418,7 +421,48 @@ Here are links for some specific parts of shopping cart: - Payment gateway - Is not part of this PoC solution, you need to implement integration with specific payment gateway. **API for updating orders (and their statuses) is under development**. - [Order creation](https://github.com/Kentico/xperience-by-kentico-ecommerce/blob/main/examples/DancingGoat-K13Ecommerce/Controllers/KStore/CheckoutController.cs#L315) - - - - +### How to enable automatic product page synchronization? +Go to Configuration -> K13Ecommerce -> Page Path mapping rules. Here you can manage rules for automatic creating product pages (`K13Store.ProductPage`) +from synchronized content items of type `K13Store.ProductSKU`. + +Synchronization is disabled when rules are empty. + +By creating mapping rule you can specify how KX 13 NodeAliasPath (stored in content item) should be mapped into XbyK page path. +Rules are ordered. The first rule that matches NodeAliasPath will be used. You can use variable tokens when creating mapping rules - see below. + +Examples: + +1. Straightforward copying structure from KX 13 to XbyK: + - Mapping rule: + - K13 NodeAliasPath: /\{Product\} + - XbK Page path: /\{Product\} + - Channel name: Dancing Goat Pages + - In variable `Product` will be stored whole NodeAliasPath and as such will be mapped to tree path of created product page. E.g.: + - /DancingGoatStore/Coffee/Arabica -> /DancingGoatStore/Coffee/Arabica + - /DancingGoatStore/Grinders/Electric/Grinder_GAGGIA_MD_15 -> /DancingGoatStore/Grinders/Electric/Grinder_GAGGIA_MD_15 + +2. Copying only items which are place in category folder as subfolder of DancingGoatStore. Items which are not placed in DancingGoatStore could be +mapped e.g. in another folder or web channel: + - Mapping rule: + - K13 NodeAliasPath: /DancingGoatStore/\{Category\}/\{Product\} + - XbK Page path: /Store/Products/\{Category\}/\{Product\} + - Channel name: Dancing Goat Pages + - In variable `Category` will be stored first folder after "DancingGoatStore", `Product` will be rest of path. E.g.: + - /DancingGoatStore/Coffee/Arabica -> /Store/Products/Coffee/Arabica + - /DancingGoatStore/Grinders/Electric/Grinder_GAGGIA_MD_15 -> /Store/Products/Grinders/Electric/Grinder_GAGGIA_MD_15 + - /DancingGoatStore/Paper_Filter would not be matched (as the path is not compound from at least two parts of path after "DancingGoatStore") + - /AnotherStore/Coffee/Robusta would not be matched (as the path does not start with "DancingGoatStore") + +3. Is it possible to skip part of NodeAliasPath (only once) for creating flattened structure: + - Mapping rule: + - K13 NodeAliasPath: /.../\{Product\} + - XbK Page path: /Store/\{Product\} + - Channel name: Dancing Goat Pages + - In variable `Product` will be stored only last part of NodeAliasPath (so product name) and mapped in folder "Store" in XbyK web channel: + - /DancingGoatStore/Coffee/Arabica -> /Store/Arabica + - /DancingGoatStore/Paper_Filter -> /Store/Paper_Filter + - /AnotherStore/Coffee/Robusta -> /Store/Robusta + + +It is up to the user's responsibility not to create rules that map different content items NodeAliasPath to a single product page tree path. +Such a case leads to an overwrite of the linked content item for a particular page. \ No newline at end of file