Skip to content

Instantly share code, notes, and snippets.

View image-fetch-observer-config.xml
View Observer.php
* @param $observer Varien_Event_Observer
public function productImageFetchAfter($observer)
/** @var Varien_Object $data */
$data = $observer->getData('data');
kalenjordan /
Last active Aug 29, 2015
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 / gist:9085832
Created Feb 19, 2014
3 Easy Steps To Get Rich Using SEO
View gist:9085832
1. Make something cool
2. Write stuff
3. Don't suck

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

View bootstrap-example.html
<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="" alt="Clean Cleanse">
<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="" alt="Clean Cleanse">

Edit Content over the Frontend


Content editing is always a little bit of a hassle. Sometimes your team might not know where a given piece of content exists - whether in CMS Pages, Static Blocks, Product content, or static HTML.

The Idea

Give admins the ability to edit content directly through the frontend via something like a blogger-style interface (you guys remember the blogger days, right?).

The Featuh's

  • Load via AJAX after page load - only shows if the admin is viewing the page.
View custom-reports.sql
/* Here are some example custom report queries for use with the custom
* reports module
* Number of items in order
* Useful to find out whether customers are buying a given product
kalenjordan / admin-grid-status.js
Last active Aug 29, 2015
Gray out rows in a grid if a status column is inactive
View admin-grid-status.js
// Drop this javascript in the page where your grid is - maybe using a .phtml
// in before_body_end or whatever.
var statuses = document.querySelectorAll(".admin-autoemail-adminhtml-rule-index td");
[], function (status) {
if (status.textContent.indexOf("Inactive") > -1) {
status.up('tr').style.color = "#aaa";
status.up('tr').down('a').style.color = "#aaa";
tar --exclude="media" --exclude="includes" --exclude="var" -cvf var/files.tar .