Skip to content

Instantly share code, notes, and snippets.

View martingust's full-sized avatar

Martin Gustafsson martingust

View GitHub Profile
@martingust
martingust / Cart.cshtml
Created April 11, 2019 11:18
Klarna checkout
@model ShoppingCartModel
@{
Layout = "_ColumnsOne";
//title
Html.AddTitleParts(T("PageTitle.ShoppingCart").Text);
//page class
Html.AppendPageCssClassParts("html-shopping-cart-page");
}
@if (!Model.OnePageCheckoutEnabled)
@martingust
martingust / NopStartup.cs
Last active December 1, 2017 08:57
Custom Action Filters in nopCommerce v4
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Nop.Core.Infrastructure;
namespace Nop.Plugin.Misc.CustomActionFilterDemo.Filters
{
public class NopStartup : INopStartup
{
@martingust
martingust / index.html
Last active August 16, 2016 12:22
Virtual Repeat change height to top of document
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Change height to top of document</h1>
@martingust
martingust / gist:44ebf1f795628a229741
Created June 11, 2015 13:38
Repeat PR for issue #45
System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-templating'], function (_export) {
'use strict';
var inject, ObserverLocator, calcSplices, getChangeRecords, BoundViewFactory, ViewSlot, customAttribute, bindable, templateController, Repeat;
var _createDecoratedClass = (function () { function defineProperties(target, descriptors, initializers) { for (var i = 0; i < descriptors.length; i++) { var descriptor = descriptors[i]; var decorators = descriptor.decorators; var key = descriptor.key; delete descriptor.key; delete descriptor.decorators; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor || descriptor.initializer) descriptor.writable = true; if (decorators) { for (var f = 0; f < decorators.length; f++) { var decorator = decorators[f]; if (typeof decorator === 'function') { descriptor = decorator(target, key, descriptor) || descriptor; } else { throw new TypeError('The decorator for method ' + descriptor.key +