├── .readme-img ├── cart.png ├── dynamic-product.jpg ├── product-list.jpg └── product.png ├── LICENSE ├── README.md ├── v1 ├── add-to-cart │ ├── cart.html │ └── index.html ├── cart │ └── index.html ├── category-list │ └── index.html ├── order-status │ └── index.html ├── product-full │ └── index.html ├── product-search │ └── index.html ├── products-dynamic │ ├── README.md │ ├── cart.html │ ├── categories.html │ ├── index.html │ └── product.html ├── products-list │ └── index.html └── view-cart │ └── index.html └── v2 ├── add-to-cart ├── cart.html └── index.html ├── auth-button └── index.html ├── cart └── index.html ├── category-list └── index.html ├── order-status └── index.html ├── product-full └── index.html ├── product-search └── index.html ├── products-dynamic ├── README.md ├── cart.html ├── categories.html ├── index.html └── product.html ├── products-list └── index.html ├── user-settings └── index.html └── view-cart └── index.html /.readme-img/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reflow-HQ/examples/08a5c20a373e55a0c1e6821670967ddc3098a55a/.readme-img/cart.png -------------------------------------------------------------------------------- /.readme-img/dynamic-product.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reflow-HQ/examples/08a5c20a373e55a0c1e6821670967ddc3098a55a/.readme-img/dynamic-product.jpg -------------------------------------------------------------------------------- /.readme-img/product-list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reflow-HQ/examples/08a5c20a373e55a0c1e6821670967ddc3098a55a/.readme-img/product-list.jpg -------------------------------------------------------------------------------- /.readme-img/product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reflow-HQ/examples/08a5c20a373e55a0c1e6821670967ddc3098a55a/.readme-img/product.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 ReflowToolkit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reflow Examples 2 | 3 | This repo contains a few examples which demonstrate what is possible with the [Reflow Ecommerce Toolkit](https://reflowhq.com). Browse this repo's directories to see the source code. 4 | 5 | ## Product Page 6 | 7 | ![product page](./.readme-img/product.png) 8 | 9 | Demonstrates how the [Product](https://reflowhq.com/docs/product.html) component renders a page, complete with a media gallery and add to cart button. 10 | 11 | [Demo](https://reflow-hq.github.io/examples/v2/product-full/index.html) | [Source Code](./v2/product-full) 12 | 13 | ## Product List 14 | 15 | ![product list](./.readme-img/product-list.jpg) 16 | 17 | This example which shows a straightforward use of the [Product List](https://reflowhq.com/docs/product-list.html) component. 18 | 19 | [Demo](https://reflow-hq.github.io/examples/v2/products-list/index.html) | [Source Code](./v2/products-list) 20 | 21 | ## Shopping Cart 22 | 23 | ![cart](./.readme-img/cart.png) 24 | 25 | Shows how easy it is to combine a [Shopping Cart](https://reflowhq.com/docs/shopping-cart.html) and [Add to Cart](https://reflowhq.com/docs/add-to-cart.html) buttons. 26 | 27 | [Demo](https://reflow-hq.github.io/examples/v2/cart/index.html) | [Source Code](./v2/cart) 28 | 29 | ## Dynamic Product 30 | 31 | ![dynamic product](./.readme-img/dynamic-product.jpg) 32 | 33 | Demonstrates a full online store, by combining a Shopping Cart, Product List and Product. More info is available in the `products-dynamic` folder. 34 | 35 | [Demo](https://reflow-hq.github.io/examples/v2/products-dynamic/index.html) | [Source Code](./v2/products-dynamic) -------------------------------------------------------------------------------- /v1/add-to-cart/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Shopping Cart 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 |
20 |
21 |
22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /v1/add-to-cart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Add to Cart Examples 7 | 8 | 9 | 10 | 11 | 12 | 16 |
17 | 18 |

Add to Cart Examples

19 | 20 |
21 | 22 |

Full example with quantities and variants.

23 |
24 | 25 |
26 | 27 |

Button, quantity and custom text.

28 |
30 | 31 |
32 | 33 |

Button only, without a shopping cart url. Won't display a "See Cart" button in the notification.

34 | 35 |
37 | 38 |
39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /v1/cart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Shopping Cart 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 |
19 |
20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /v1/category-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Categories 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 |

Categories (unstyled)

15 |
16 | 17 |
18 | 19 |

Categories (horizontal-bar)

20 |
21 | 22 |
23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /v1/order-status/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Order Status 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /v1/product-full/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Reflow Example 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /v1/product-search/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Product Search 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 |
15 | 16 |
17 | 18 |
19 | 20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /v1/products-dynamic/README.md: -------------------------------------------------------------------------------- 1 | # Dynamic Products Example 2 | 3 | This example demonstrates how to link components together to create a fully featured store with products, categories and a shopping cart. 4 | 5 | ## Dynamic Products 6 | 7 | The [Products](https://reflowtoolkit.github.io/examples/v1/products-dynamic/index.html) example demonstrates how you can link a [Product List](https://reflowhq.com/docs/product-list.html) and a [Product](https://reflowhq.com/docs/product.html) component together, so that clicking an item in the list leads you to a full product page. 8 | 9 | ### How it works 10 | 11 | * Product List has the `data-reflow-product-link` attribute set to `./product.html?product={id}`. This instructs Reflow to wrap each list item in a link, and replace the `{id}` placeholder with the actual product id. 12 | * The product page looks for the `product` query parameter, and sets the `data-reflow-product` attribute on the tag on page load. 13 | 14 | ## Dynamic Categories 15 | 16 | In the [Categories](https://reflowtoolkit.github.io/examples/v1/products-dynamic/categories.html) example you can learn how to connect a [Category List](https://reflowhq.com/docs/category-list.html) and a [Product List](https://reflowhq.com/docs/product-list.html) component together. This creates a navigation menu for browsing all categories and products from the store. 17 | 18 | ### How it works 19 | 20 | * Category List has the `data-reflow-category-link` attribute set to `./index.html?category={id}` (the product list example page). This instructs Reflow to wrap each list item in a link, and replace the `{id}` placeholder with the actual category id. 21 | * The product list page looks for the `category` query parameter, and sets the `data-reflow-category` attribute on the tag on page load. It then lists all products from the specified category. 22 | 23 | ## Shopping Cart 24 | 25 | The [Cart](https://reflowtoolkit.github.io/examples/v1/products-dynamic/cart.html) example displays a shopping cart where you can see all the [Products](https://reflowhq.com/docs/product.html) that were added for purchase. 26 | 27 | ### How it works 28 | 29 | * The Product component has the `data-reflow-shoppingcart-url` attribute set to `./cart.html`. 30 | * This links the components together, so that when the **Add to Cart** button is pressed products are correctly added for purchase. -------------------------------------------------------------------------------- /v1/products-dynamic/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Shopping Cart 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /v1/products-dynamic/categories.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Products 7 | 8 | 9 | 10 | 11 | 12 | 17 |
18 | 19 |

Categories

20 |
21 | 22 |
23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /v1/products-dynamic/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Products 7 | 8 | 9 | 10 | 11 | 12 | 17 |
18 | 19 |

Products

20 |
22 | 23 |
24 | 25 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /v1/products-dynamic/product.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Product Page 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 |
21 | 22 |
23 | 24 |

Similar Products

25 | 26 |
27 |
28 | 29 | 34 |
35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /v1/products-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Products 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 |

Products

15 |
16 | 17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /v1/view-cart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | View Cart 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 | 25 |
26 | 27 | 28 |
View Cart
29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /v2/add-to-cart/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Shopping Cart 7 | 11 | 12 | 13 | 14 | 15 | 21 | 22 |
23 |
24 |
25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /v2/add-to-cart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Add to Cart Examples 7 | 11 | 12 | 13 | 14 | 15 | 21 |
22 |

Add to Cart Examples

23 | 24 |
25 | 26 |

Full example with quantities and variants.

27 |
32 | 33 |
34 | 35 |

Button, quantity and custom text.

36 |
43 | 44 |
45 | 46 |

47 | Button only, without a shopping cart url. Won't display a "See Cart" 48 | button in the notification. 49 |

50 | 51 |
57 |
58 | 59 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /v2/auth-button/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Auth Button 7 | 11 | 12 | 13 | 14 | 15 |
16 |
20 |
21 | 22 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /v2/cart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Shopping Cart 7 | 11 | 12 | 13 | 14 | 15 |
16 |
22 |
28 |
34 |
35 | 36 |
37 |
38 |
39 | 40 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /v2/category-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Categories 7 | 11 | 12 | 13 | 14 | 15 |
16 |

Categories (unstyled)

17 |
18 | 19 |
20 | 21 |

Categories (horizontal-bar)

22 |
27 |
28 | 29 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /v2/order-status/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Order Status 7 | 11 | 12 | 13 | 14 | 15 | 24 | 25 |
28 |
29 |
30 | 31 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /v2/product-full/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Reflow Example 7 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /v2/product-search/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Product Search 7 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 |
19 | 20 |
24 |
25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /v2/products-dynamic/README.md: -------------------------------------------------------------------------------- 1 | # Dynamic Products Example 2 | 3 | This example demonstrates how to link components together to create a fully featured store with products, categories and a shopping cart. 4 | 5 | ## Dynamic Products 6 | 7 | The [Products](https://reflowtoolkit.github.io/examples/v2/products-dynamic/index.html) example demonstrates how you can link a [Product List](https://reflowhq.com/docs/product-list.html) and a [Product](https://reflowhq.com/docs/product.html) component together, so that clicking an item in the list leads you to a full product page. 8 | 9 | ### How it works 10 | 11 | * Product List has the `data-reflow-product-link` attribute set to `./product.html?product={id}`. This instructs Reflow to wrap each list item in a link, and replace the `{id}` placeholder with the actual product id. 12 | * The product page looks for the `product` query parameter, and sets the `data-reflow-product` attribute on the tag on page load. 13 | 14 | ## Dynamic Categories 15 | 16 | In the [Categories](https://reflowtoolkit.github.io/examples/v2/products-dynamic/categories.html) example you can learn how to connect a [Category List](https://reflowhq.com/docs/category-list.html) and a [Product List](https://reflowhq.com/docs/product-list.html) component together. This creates a navigation menu for browsing all categories and products from the store. 17 | 18 | ### How it works 19 | 20 | * Category List has the `data-reflow-category-link` attribute set to `./index.html?category={id}` (the product list example page). This instructs Reflow to wrap each list item in a link, and replace the `{id}` placeholder with the actual category id. 21 | * The product list page looks for the `category` query parameter, and sets the `data-reflow-category` attribute on the tag on page load. It then lists all products from the specified category. 22 | 23 | ## Shopping Cart 24 | 25 | The [Cart](https://reflowtoolkit.github.io/examples/v2/products-dynamic/cart.html) example displays a shopping cart where you can see all the [Products](https://reflowhq.com/docs/product.html) that were added for purchase. 26 | 27 | ### How it works 28 | 29 | * The Product component has the `data-reflow-shoppingcart-url` attribute set to `./cart.html`. 30 | * This links the components together, so that when the **Add to Cart** button is pressed products are correctly added for purchase. -------------------------------------------------------------------------------- /v2/products-dynamic/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Shopping Cart 7 | 11 | 12 | 13 | 14 | 15 | 24 | 25 |
26 |
27 |
28 | 29 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /v2/products-dynamic/categories.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Products 7 | 11 | 12 | 13 | 14 | 15 | 24 |
25 |

Categories

26 |
31 |
32 | 33 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /v2/products-dynamic/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Products 7 | 11 | 12 | 13 | 14 | 15 | 24 |
25 |

Products

26 |
34 |
35 | 36 | 43 | 44 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /v2/products-dynamic/product.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Product Page 7 | 11 | 12 | 13 | 14 | 15 | 24 | 25 |
26 | 27 |
32 | 33 |

Similar Products

34 | 35 |
43 | 44 | 50 |
51 | 52 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /v2/products-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Products 7 | 11 | 12 | 13 | 14 | 15 |
16 |

Products

17 |
21 |
22 | 23 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /v2/user-settings/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | User Settings 7 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /v2/view-cart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | View Cart 7 | 11 | 12 | 13 | 14 | 15 |
16 |
22 |
28 |
34 |
35 | 36 |
39 | 40 |
46 | 53 | 56 | 57 |
58 | 59 | 60 |
66 | View Cart 67 |
68 |
69 | 70 | 75 | 76 | 77 | --------------------------------------------------------------------------------