Skip to content

Instantly share code, notes, and snippets.

function Component(type) {
this.type = type;
this.tmplName = type + 'ComponentTmpl';
this.placeholder = type + 'Placeholder';
}
Component.prototype.render = function(data) {
var type = this.type;
adrma.template.render({
@RuslanSushko
RuslanSushko / buyNow.js
Last active December 25, 2015 16:18 — forked from adardesign/buyNow.js
(function () {
adrma.session.getSession.done(function gotSession(session) {
var buyNowButton,
productInfoContainer = $(".product-info-container");
if (session.cartCount === 0) {
productInfoContainer.find(".add-to-cart").after('<button class="radius add-to-cart button primary-dark action" data-action="silentAddToCart" type="button">Buy Now</button>');
buyNowButton = productInfoContainer.find("[data-action='silentAddToCart']");
/*!
* MockJax - jQuery Plugin to Mock Ajax requests
*
* Version: 1.4.0
* Released: 2011-02-04
* Source: http://github.com/appendto/jquery-mockjax
* Docs: http://enterprisejquery.com/2010/07/mock-your-ajax-requests-with-mockjax-for-rapid-development
* Plugin: mockjax
* Author: Jonathan Sharp (http://jdsharp.com)
* License: MIT,GPL