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 shopify = new Shopify({ shopName:shop, accessToken: resulFromDataBase.access_token ,apiVersion:'2021-10' }); | |
shopify.theme.list({}).then(async (meta)=>{ | |
meta.forEach(element => { | |
if (element.role ==='main'){ | |
console.log(element.id); | |
themeid = element.id ; | |
// I need to tell Shopify which asset im looking for and the value | |
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
{% if linklists[settings.sidebar_linklist_1].links.size == 0 %} | |
<div class="section-header"> | |
<p class="section-header__title h4">Shop by Collection</p> | |
</div> | |
{{ 'layout.sidebar_onboarding.shop_by_collection_description_html' | t }} | |
{% endif %} | |
{% for i in (1..5) %} | |
{% capture setting_key %}sidebar_linklist_{{ i }}{% endcapture %} |
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
? | |
//class KitWuBook | |
class KitWuBook { | |
//vars | |
// private $var = 'default'; | |
const HOST = 'https://wubook.net:443/xrws/'; | |
private $srv; | |
private $acc = ; |
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
/** | |
* ./routes/api.js | |
* This is where you'll set up any REST api endpoints you plan on using. | |
*/ | |
const express = require('express'); | |
const router = express.Router(); | |
router.get('/', (req, res, next) => { | |
var xmlrpc = require('xmlrpc') |
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
{% assign tabStuff = tabStuff | split :"," %} | |
{% if product.tags contains 'tabs_1'%} | |
{% assign tabs = "Tasting Notes, Food Complements, Vinification" | split :"," %} | |
{% elsif product.tags contains "tabs_2" %} | |
{% assign tabs = "Tasting Notes, Food Complements, Vintage, Vinification, Awards" | split :"," %} | |
{% else product.tags contains "tabs_3" %} |
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
$(document).ready(function(){ | |
$( ".product" ).each(function(index) { | |
// hi ---> .product is the class name that represents the product element. | |
var title = $(this).find('a.title-5').html(); | |
// I have above said we are now looking inside the current product div before looking in the next one | |
// this represents the current product div the loop is in / on. we then use jquery .find() to look for elements inside this div and then .html() grabs the content | |
// Add to cart code here. | |
$.post('/cart/add.js', { | |
quantity: 1, |
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 express = require('express'); | |
const Shop = require('../models/Shop'); | |
const Shopify = require('shopify-node-api'); | |
const config = require('../config'); | |
const generateNonce = require('../helpers').generateNonce; | |
const buildWebhook = require('../helpers').buildWebhook; | |
const bodyParser = require('body-parser'); | |
const url = require('url'); | |
const querystring = require('querystring'); | |
const router = express.Router(); |
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
db.collection('admin').insert({accessToken: accessToken , email: 'admin@gmail.com' } , (err, result) => { | |
if (err) return console.log(err) | |
console.log('saved to database' + accessToken); | |
res.render('pages/main-dash'); | |
//res.render('index', { accessToken: JSON.stringify(accessToken)} ); | |
}) |
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
var express = require('express'); | |
var router = express.Router(); | |
var app = express(); | |
const nonce = require('nonce')(); | |
const cookie = require('cookie'); | |
const forwardingAddress = "https://bonitoco.herokuapp.com/"; | |
var apiSecret = process.env.SHOPIFY_API_SECRET; | |
var apiKey = process.env.SHOPIFY_API_KEY ; | |
const scopes = 'read_products'; |
NewerOlder