Skip to content

Instantly share code, notes, and snippets.

View karen-white's full-sized avatar

Karen White karen-white

View GitHub Profile
@karen-white
karen-white / uninstall.js
Created January 15, 2019 18:10
Create the uninstall route
const express = require('express'),
router = express.Router(),
BigCommerce = require('node-bigcommerce');
const bigCommerce = new BigCommerce({
secret: 'Your Client Secret',
responseType: 'json'
});
router.get('/', (req, next) => {
try {
@karen-white
karen-white / load.js
Created January 15, 2019 18:08
Load route
const express = require('express'),
router = express.Router(),
BigCommerce = require('node-bigcommerce');
const bigCommerce = new BigCommerce({
secret: 'your Client Secret',
responseType: 'json'
});
router.get('/', (req, res, next) => {
try {
@karen-white
karen-white / auth.js
Created January 15, 2019 18:01
Create Auth route
const express = require('express'),
router = express.Router(),
BigCommerce = require('node-bigcommerce');
const bigCommerce = new BigCommerce({
clientId: 'your Client Id from app registration',
secret: 'your Client Secret from app registration',
callback: 'https://your-ngrokURL/auth',
responseType: 'json'
});
@karen-white
karen-white / navigation-list.html
Created January 9, 2019 23:46
Hide subcategory when all products are out of stock
{{#if children}}
<a class="navPages-action has-subMenu{{#if is_active}} activePage{{/if}}" href="{{url}}" data-collapsible="navPages-{{id}}">
{{name}} <i class="icon navPages-action-moreIcon" aria-hidden="true"><svg><use xlink:href="#icon-chevron-down" /></svg></i>
</a>
<div class="navPage-subMenu" id="navPages-{{id}}" aria-hidden="true" tabindex="-1">
<ul class="navPage-subMenu-list">
<li class="navPage-subMenu-item">
<a class="navPage-subMenu-action navPages-action" href="{{url}}">{{lang 'category.view_all.name' category=name}}</a>
</li>
{{#each children}}