├── README.md ├── bigcommerce-points-products-dropdown ├── README.md └── smile-points-products-dropdown.html ├── bigcommerce-points-slider ├── README.md ├── smile-points-slider.html └── sweettooth-points-slider.html ├── bigcommerce-stencil-files ├── README.md └── files 4.zip ├── points-products-dropdown ├── README.md ├── smile-points-products-dropdown.html └── sweettooth-points-products-dropdown.html ├── shopify-points-products-dropdown ├── README.md ├── smile-points-products-dropdown.liquid └── sweettooth-points-products-dropdown.liquid ├── shopify-points-slider ├── README.md ├── smile-points-slider.liquid └── sweettooth-points-slider.liquid ├── smile-dev.png ├── welcome-developers.png └── welcome1.png /README.md: -------------------------------------------------------------------------------- 1 |  2 | 3 | ## Welcome to Smile.io 4 | 5 | This repo is home to a growing number of code samples to help integrate Smile deeply into your store. We hope these samples save you time and help document best practices. PRs are always welcome to help improve these samples for everyone. 6 | 7 | ## List of code samples 8 | 9 | - PointsProducts dropdown 10 | - BigCommerce points slider 11 | - Shopify points slider 12 | - Shopify PointsProducts dropdown 13 | 14 | ## Contributing 15 | 16 | We need you! This repo is built to make developer lives easier while building with Smile. If you have new examples, improvements to existing ones, or anything else you think will help others please submit a PR so we can get the conversations going. 🙏 17 | -------------------------------------------------------------------------------- /bigcommerce-points-products-dropdown/README.md: -------------------------------------------------------------------------------- 1 | # BigCommerce PointsProducts Dropdown 2 | 3 | This file will explain how to get setup. 4 | 5 | ## Implementation 6 | 7 | 1. Ensure you have Smile.io setup on your store 8 | 1. Copy the code in the `smile-points-products-dropdown.html` file in this repo 9 | 1. Add the code snippet below to your checkout 10 | 1. Add your public API key to the snippet 11 | 1. Implement adding the discount code to your cart in the `applyPointsPurchaseToCart` callback 12 | 1. You're all set! 13 | 14 | ## Snippets 15 | 16 | ### Points dropdown container 17 | 18 | Add the following code to your checkout in the location you want to show the points dropdown. 19 | ```html 20 |
21 | ``` 22 | -------------------------------------------------------------------------------- /bigcommerce-points-products-dropdown/smile-points-products-dropdown.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 10 | 14 | 15 | 191 | 192 | 227 | -------------------------------------------------------------------------------- /bigcommerce-points-slider/README.md: -------------------------------------------------------------------------------- 1 | # Points Slider 2 | 3 | This file will explain how to get setup. 4 | 5 | ## Implementation 6 | 7 | 1. Ensure you have Smile.io setup on your store 8 | 1. Copy the code in the `smile-points-slider.html` file in this repo 9 | 1. Add the code snippet below to your checkout 10 | 1. Add your public API key to the snippet 11 | 1. Implement adding the discount code to your cart in the `applyPointsPurchaseToCart` callback 12 | 1. You're all set! 13 | 14 | ## Snippets 15 | 16 | ### Points slider container 17 | 18 | Add the following code to your checkout in the location you want to show the points slider: 19 | ```html 20 | 21 | ``` 22 | 23 | Be sure to replace `TODO` with the ID of the points product that you want to use with the slider! 24 | -------------------------------------------------------------------------------- /bigcommerce-points-slider/smile-points-slider.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 22 | 23 | 312 | 313 | 368 | -------------------------------------------------------------------------------- /bigcommerce-points-slider/sweettooth-points-slider.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 10 | 14 | 15 | 226 | 227 | 282 | -------------------------------------------------------------------------------- /bigcommerce-stencil-files/README.md: -------------------------------------------------------------------------------- 1 | # BigCommerce Stencil Setup 2 | 3 | These are the files required to setup Smile.io with your Stencil theme. Check out our docs [here](https://docs.smile.io/docs/install-smile/bigcommerce/explainer-page-using-stencil). 4 | -------------------------------------------------------------------------------- /bigcommerce-stencil-files/files 4.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smile-io/code-samples/2d26bf8fb13fe9cf7814b9325fd277bfee17a97c/bigcommerce-stencil-files/files 4.zip -------------------------------------------------------------------------------- /points-products-dropdown/README.md: -------------------------------------------------------------------------------- 1 | # PointsProducts Dropdown 2 | 3 | This file will explain how to get setup. 4 | 5 | ## Implementation 6 | 7 | 1. Ensure you have Smile.io setup on your store 8 | 1. Copy the code in the `smile-points-products-dropdown.html` file in this repo 9 | 1. Add the code snippet below to your checkout 10 | 1. Implement adding the discount code to your cart in the `applyPointsPurchaseToCart` callback 11 | 1. You're all set! 12 | 13 | ## Snippets 14 | 15 | ### Points dropdown container 16 | 17 | Add the following code to your checkout in the location you want to show the points dropdown. 18 | ```html 19 | 20 | ``` 21 | -------------------------------------------------------------------------------- /points-products-dropdown/smile-points-products-dropdown.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 184 | 185 | 220 | -------------------------------------------------------------------------------- /points-products-dropdown/sweettooth-points-products-dropdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 183 | 184 | 219 | -------------------------------------------------------------------------------- /shopify-points-products-dropdown/README.md: -------------------------------------------------------------------------------- 1 | # Shopify PointsProducts Dropdown 2 | 3 | This file will explain how to get setup. 4 | 5 | ## Implementation 6 | 7 | 1. Create a new **Snippet** in Shopify called `smile-points-products-dropdown.liquid` 8 | 2. Paste the code from this sample file in your new snippet 9 | 3. Hide rewards you don't want to offer at checkout using `hidePointsProductIds` 10 | 4. Include the following snippet before the closing `