This file contains hidden or 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 requests | |
| import json | |
| import uuid | |
| # Some identifiers for ONE particular store and product | |
| # Replace for your own testing | |
| class GuestShopper: | |
| def __init__(self): |
This file contains hidden or 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
| /* Returns a promise */ | |
| fetchCommerceUrl(url) { | |
| let apiver = 'v64.0'; | |
| let commercebase = '/webruntime/api/services/data/' + apiver + '/commerce'; | |
| let fullurl = commercebase + url; | |
| console.log('Begin fetchCommerceUrl on ', fullurl); | |
| return fetch(fullurl, { | |
| method: 'GET', |
This file contains hidden or 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 checkoutApi from "commerce/checkoutApi"; | |
| import cartApi from "commerce/cartApi"; | |
| console.log("cartApi:", cartApi); | |
| console.log("cartApi keys:", Object.keys(cartApi)); | |
| // Optional: Log function names individually | |
| Object.keys(cartApi).forEach((key) => { | |
| console.log(`cartApi[${key}] =`, cartApi[key]); | |
| }); |
This file contains hidden or 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
| --- | |
| --- Table to store sync_status results. | |
| --- mostly a counter for how sync failures | |
| --- | |
| CREATE TABLE IF NOT EXISTS "public"."sync_status" ( | |
| id serial, | |
| "createddate" timestamp with Time Zone NOT NULL DEFAULT now(), | |
| "lastmodifieddate" timestamp with Time Zone NOT NULL DEFAULT now(), | |
| "count_fail" integer DEFAULT 1, | |
| "recordid" integer not null, |
This file contains hidden or 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
| /* | |
| * RecordTypeAccessor_Test | |
| * | |
| * Test method and example usage of https://gist.github.com/nocrates/07342092bcac673b62e8 | |
| * | |
| * (c) Appirio 2013 | |
| */ | |
| @isTest | |
| public class RecordTypeAccessor_Test { |
This file contains hidden or 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
| /* | |
| RecordTypeAccessor | |
| (c) Appirio, 2013 | |
| See https://gist.github.com/nocrates/5f8748b6ea6cdbba37a6 for test method and example usage | |
| */ | |
| public class RecordTypeAccessor { |
This file contains hidden or 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
| # Thanks to https://gist.github.com/qiaoxueshi/5910150 | |
| # brew install gource | |
| # git clone git://git.libav.org/libav.git | |
| # cd libav | |
| # ./configure --disable-yasm | |
| # make && make install | |
| gource \ | |
| -s .06 \ | |
| -1280x720 \ |
This file contains hidden or 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
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
| <div class="row"> | |
| <div class="col-md-6 col-sm-6 hidden-xs">Apple</div> | |
| <div class="col-md-6 col-sm-6 col-xs-12">Orange</div> | |
| <div class="hidden-md hidden-sm col-xs-12 visible-xs-inline">Apple</div> | |
| </div> |