├── .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 | 
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 | 
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 | 
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 | 
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 |
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 |
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 |