I want to make a shopify theme using react.
You have a bunch of template files that have access to global server-side variables with liquid e.g. {{ product.title }}. Think wordpress or any other theme-based system.
/theme
| # In this campaign we wanted to have 50% of every product unless the cart value was 200 or more | |
| # If the 200 or more, the maximum discount that could apply was 100 | |
| # Wanted to spread that the discount amount across all line items proporinate to its value in the cart | |
| # Do/change following (if required): | |
| # 1. Create a new coupon code in Shopify | |
| # 2. Replace the coupon code evaluation value ('DISCOUNT_CODE') with the new code on line 13 | |
| # 3. Change the cart subtotal evaluation amount (Money.new(cents:20000)) on lines 16, 39 | |
| # 4. Change the max_discount value (100) on line 18 | |
| # 5. Change the discount amount (0.5) on line 41 |
| # In this campaign we wanted to have 50% of every product unless the cart value was 200 or more | |
| # If the 200 or more, the maximum discount that could apply was 100 | |
| # Wanted to spread that the discount amount across all line items proporinate to its value in the cart | |
| # Do/change following (if required): | |
| # 1. Create a new coupon code in Shopify | |
| # 2. Replace the coupon code evaluation value ('DISCOUNT_CODE') with the new code on line 13 | |
| # 3. Change the cart subtotal evaluation amount (Money.new(cents:20000)) on lines 16, 39 | |
| # 4. Change the max_discount value (100) on line 18 | |
| # 5. Change the discount amount (0.5) on line 41 |
| const AWS = require("aws-sdk"); // from AWS SDK | |
| const fs = require("fs"); // from node.js | |
| const path = require("path"); // from node.js | |
| // configuration | |
| const config = { | |
| s3BucketName: 'your.s3.bucket.name', | |
| folderPath: '../dist' // path relative script's location | |
| }; |
| { | |
| "name": "TODO-put-your-project-name-here", | |
| "alias": [ | |
| "TODO-put-your-domain-here.com", | |
| "www.TODO-put-your-domain-here.com" | |
| ], | |
| "static": { | |
| "headers": [ | |
| { | |
| "source": "**/*.@(html)", |
| FB.api({ method: 'pages.isFan', page_id: '{PAGE_ID}' }, function(response) { | |
| if (response) { | |
| alert("user has liked the page"); | |
| } else { | |
| alert("user has not liked the page"); | |
| } | |
| }); |
| upstream example-webpack { | |
| server 127.0.0.1:8080; | |
| } | |
| upstream example-backend { | |
| server 127.0.0.1:3000; | |
| } | |
| server { | |
| listen 80; |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
This gist assumes:
| new content |