Skip to content

Instantly share code, notes, and snippets.

<div class="block-item cleanse col-md-12 visible-desktop">
<div class="content">
<div class="clearfix">
<div class="program-image visible-phone-tablet">
<h3 class="visible-phone">Start Here</h3>
<img class="img-responsive" src="http://skin.cleanprogram.com/2014-02-24-8-26-UTC/skin/frontend/clean/default/images/clean-cleanse-home.jpg" alt="Clean Cleanse">
</div>
<div class="program-detail col-sm-6 col-md-6 col-lg-12">
<h3 class="hidden-phone">Start Here</h3>
<img class="visible-desktop center-block-element" src="http://skin.cleanprogram.com/2014-02-24-8-26-UTC/skin/frontend/clean/default/images/clean-cleanse-home.jpg" alt="Clean Cleanse">
@kalenjordan
kalenjordan / winkles-law.md
Created February 20, 2014 20:06
Winkle's Law

For any problem that can be encountered in Magento, a solution has already been discovered by @philwinkle.

@kalenjordan
kalenjordan / gist:9085832
Created February 19, 2014 03:59
3 Easy Steps To Get Rich Using SEO
1. Make something cool
2. Write stuff
3. Don't suck
@kalenjordan
kalenjordan / magento-admin-gamification.md
Last active August 29, 2015 13:56
Magento Admin Gamification

Magento Admin Gamification

The Idea

The idea is to use gamification in the Magento backend to help to train admins who are new to using Magento with some kind of interactive tutorial along with earning points for doing things like updating their store address in system config and creating a new product, etc.

How Would It Work

Not totally sure, just a rough idea right now. But my thinking is - some combination of an interactive tutorial with points and badges earned for different actions.

@kalenjordan
kalenjordan / repurchase-rate.sql
Last active January 1, 2016 20:59
Magento Repurchase Rate Note: This assumes you don't use guest checkout - if you do, you could probably group by customer_email and get relatively accurate results.
# The number of customers who haveve only purchased once from December 2012 to December 2013
SELECT customers_in_segment
FROM
(
SELECT count(*) AS customers_in_segment, order_count
FROM
(
SELECT customer_id, min(created_at) AS first_order_at, count(*) AS order_count
FROM sales_flat_order
@kalenjordan
kalenjordan / gist:7936461
Created December 12, 2013 22:09
Gmail images
Gmail: Hey, we're caching images now, it's more secure b/c suckas can't inject nastiness on you.
JS: Liars! You're totally making it sound like you're improving privacy by no longer allowing email marketers to track opens using images.
Gmail: But....all we said was we're improving security
JS: Now that's just splitting hairs!
@kalenjordan
kalenjordan / gist:7827914
Created December 6, 2013 16:39
Addon product

I'm trying to figure out what the best way is to implement what I'm calling an "addon product".

The way it works is that when a customer adds the Essentials Shakes to their cart, we want to prompt them to add a Shaker Bottle (it's like a bottle that makes it easy to make shakes) to their order as well for $5.

I would have used a grouped product for this, but you can't combine configurable and grouped products, plus there are issues with subscription orders as well.

So what I'm leaning towards now is maybe a modal that pops up after they add the Essentials to their cart which prompts them to add this other product to their cart.

Somebody has to have run into this use case before.

<?xml version="1.0"?>
<config>
<sections>
<system>
<groups>
<backup>
<fields>
<maintenance>
<comment>supercalifrag</comment>
</maintenance>
@kalenjordan
kalenjordan / autoloader-benchmark.php
Last active December 25, 2015 00:49
Autoloading benchmark - loads ~1k classes in order to benchmark the autoloader. I've used this to compare with and without the AOE ClassPathCache autoloader.
<?php
require_once(dirname(__FILE__) . '/../app/Mage.php');
Mage::app('admin');
$classesRaw = file_get_contents(dirname(__FILE__) . '/data/classes.txt');
$classes = explode("\n", $classesRaw);
echo "Loading " . count($classes) . " classes\r\n";
@kalenjordan
kalenjordan / mass-copyright-replace.sh
Last active December 24, 2015 07:49
Change copyright from 2013 to 2012