This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const redis = require('redis'); | |
class RedisController { | |
constructor(set, redisConfig = {}) { | |
this.set = set; | |
this.client = redis.createClient(redisConfig); | |
} | |
keyExists(url) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { reactive } from 'vue'; | |
function ApplicationStore(app) { | |
const store = { | |
state: reactive({ | |
// Add new store fields here | |
totalCents: 100, | |
}), | |
// Methods to act on the store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Add right before </body> --> | |
<!-- PolyVitals Start --> | |
<script src="https://d1y9rhsa9a8h4o.cloudfront.net/polyvitals-1.0.5.min.js"></script> | |
<script> | |
if(typeof window.PolyVitals !== 'undefined') { | |
window.PolyVitals.init(); | |
window.addEventListener('DOMContentLoaded', function() { | |
try { | |
window.PolyVitals.report(); | |
} catch(e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Our original Code | |
var variant = {{ current_variant | json }}; | |
if (variant){ | |
var fields = JSON.parse('{{ product.metafields.decify | json }}'); | |
if(typeof fields[variant.id] !== 'undefined') { | |
console.log("Variant found, using custom URL."); | |
document.getElementById("customize-btn").href = fields[variant.id]; | |
} | |
} |