Skip to content

Instantly share code, notes, and snippets.

@jeromegv
jeromegv / index.html
Last active Sep 24, 2015
Tilestache on XSCE stack
View index.html
<html>
<head>
<title>Sample: Adding Tilestache to Leaflet</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /><![endif]-->
<script src="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="http://code.jquery.com/jquery-1.11.3.js" type="text/javascript" charset="utf-8"></script>
<script>
$(document).ready(function(){
@jeromegv
jeromegv / get-total-stock-value.md
Last active Sep 29, 2017 — forked from freakdesign/get-total-stock-value.md
JavaScript function to calculate the total stock value within a Shopify store
View get-total-stock-value.md

Get total stock value of all Shopify products + breakdown of inventory stock value for each product vendor

Refers to the freakdesign blog post.

Most people that need to know the total stock value are already likely to be using a third party Inventory Management System, ERP (or similar). If you want to know what your total stock value is you can grab that info via the API - let's look how.

Added feature

Found this script to calculate the total stock value of my inventory on my Shopify store, which was really useful since Shopify doesn't provide that info out of the box. I quickly realized that I also needed to know the breakdown of my inventory value for each vendor (supplier) and each product type that is on my store. I took the original script from freakdesign, unminified it, then added a few lines to display that info for each vendor.