Skip to content

Instantly share code, notes, and snippets.

@avanderhoorn
avanderhoorn / ShoppingCart.cs
Last active December 19, 2015 19:28
Show the content of a shopping cart style of component you might have written - Your Code, Your Plugins
public class ShoppingCart
{
//...
public static ShoppingCart GetCart(HttpContextBase context)
{
var cart = new ShoppingCart();
cart.ShoppingCartId = cart.GetCartId(context);
return cart;
}
@avanderhoorn
avanderhoorn / SystemConfiguration.cs
Created July 12, 2013 07:13
Your code, Your Plugins - Simple Tab to expose custom configuration settings
public static class Configuration
{
public static ConfigurationModel Current { get; set; }
}
public class ConfigurationModel
{
public string Currency { get; set; }
public double TaxRate { get; set; }
@avanderhoorn
avanderhoorn / GlimpseClientSidePluginExample.js
Created August 9, 2012 08:40
Glimpse Client Side Plugin Example
var glimpseClientTimelinePlugin = (function ($, glimpse) {
var //Support
wireListener = function () {
glimpse.pubsub.subscribe('action.timeline.data.updated', function(topic, payload) { dataUpdated(payload); });
},
dataUpdated = function(data) {
alert('test');
},
//Main