Skip to content

Instantly share code, notes, and snippets.

View stnadmin's full-sized avatar

Don Schwarz stnadmin

View GitHub Profile
@stnadmin
stnadmin / ingram-onix-conversion.json
Created November 21, 2016 16:42
This is used in the process of converting an ONIX XML file to a CSV file that we can digest.
{
"row-selector": "/ONIXmessage/product",
"columns": {
"product_sku": "concat('ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244)",
"mfg_product_sku": "productidentifier/b221[contains(., '03')]/following-sibling::b244",
"brand_id": "publisher/b081",
"product_s_desc": "concat(title/b203,' by ',contributor/b035[contains(., 'A01')]/following-sibling::b036, ' and published by ', publisher/b081)",
"product_desc": "othertext/d102[contains(., '1')]/following-sibling::d104",
"product_thumb_image": "concat('http://stoysnetcdn.com/ingr/ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244, '/ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244, '.jpg')",
"product_full_image": "concat('http://stoysnetcdn.com/ingr/ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244, '/')",
@stnadmin
stnadmin / gist:c4136f339ce5066d3aae
Created September 28, 2015 17:30
Needed styles to support banner styled carousel
.moduletable-carousel {
position:relative;
left:200px;
top:0px;
padding: 0;
height: 110px;
width:754px;
}
.moduletable-carousel .carousel-window {
position: absolute;
@stnadmin
stnadmin / gist:3227436b5a9e4c946253
Created September 28, 2015 17:28
Carousel JS script
$(function () {
"use strict";
var root = $('html.onecol #pos-banner .moduletable-carousel'),
next = $('<div class="carousel-next"></div>'),
prev = $('<div class="carousel-prev"></div>'),
perPage = 4,
page = 0,
window = $('<div class="carousel-window"></div>'),
shuttle = $('<div class="carousel-shuttle"></div>'),
<div id="cat-desc-img">
<img alt="" class="shop-cat-img" src="/images/stories/category-placeholder.jpg" style="width: 493px; height: 319px;" /></div>
<div id="cat-desc-txt">
<h4>Title Here</h4>
p>Category description here</p>
</div>
<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );
header('X-UA-Compatible: IE=Edge');
// This will turn on the StarField corner icon.
$STN_tpl['StarField'] = false;
// You can cut'n'paste the codes here.
$STN_tpl['StarField_CNP'] = <<<CNP
<span id="siteseal"><script src="https://seal.starfieldtech.com/getSeal?sealID=iT8sV1o2aQOjr8mf0UigKGyrj239Vt6uYlnCAsabbmc3jv7veAzwcix6LXM" type="text/javascript"></script></span>
<link rel="stylesheet" type="text/css" href="css/winter.css" id="siteCSS"/>
<script type="text/javascript">
// Get current month
var currDate=new Date();
var currMonth = currDate.getDate();
// Month returned by getDate() is 0 to 11 so add 1
currMonth = parseInt(currMonth) + 1;
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
"ProductID","Description","Saleprice","onhand","upc","GRP","S. Group","Vendor","Vend P code","Last.Rcvd","LastUpdate","WebOnly Status","Active Status","Discontinued status"
"spawn","image spawn","2.9900","2","709853002147","comicdept","comic-book","diamond","","2014-10-07 12:41:27.043","2014-10-10 12:25:44.237","0","True","0"
"spcardcom","assorted sport card common",".1500","-88","spcardcom","sportsdept","spcd-common","hsnj","","2009-02-11 00:00:00.000","2014-10-15 17:57:26.950","0","True","0"
"pol900/12","1 8th superman snap kit","38.9900","1","849398002032","models","model-misc","greatplanes","","2014-10-10 13:57:23.630","2014-10-10 13:57:23.630","0","True","0"
"lego41039","friends-sunshine ranch","69.9900","4","673419207867","buildertoy","buildertoy","lego","","2014-10-14 16:59:52.230","2014-10-14 16:59:52.230","0","True","0"
"613297784937","13 14 panini totally certified hockey","26.9900","0","613297784937","sportsdept","hockey","panini","","2009-02-11 00:00:00.000","2014-10-14 11:12:12.630","0","True","0
@stnadmin
stnadmin / fpss_10
Created November 7, 2013 16:40
Version 10 of FPSS style
#site-main #fpss-outer-container {
background-color: #fff;
margin: 0;
margin-bottom: 15px;
padding: 0;
border: 0;
}
#site-main #fpss-outer-container #navi-outer {
font-size: 14px;
position: relative;