Skip to content

Instantly share code, notes, and snippets.

View image-fetch-observer-config.xml
<global>
<events>
<kj_magemail_product_image_fetch_after>
<observers>
<namespace_kj_magemail_product_image_fetch_after>
<class>KJ_MageMail_Model_Observer</class>
<method>productImageFetchAfter</method>
</namespace_kj_magemail_product_image_fetch_after>
</observers>
</kj_magemail_product_image_fetch_after>
View Observer.php
<?php
/**
* @param $observer Varien_Event_Observer
*/
public function productImageFetchAfter($observer)
{
/** @var Varien_Object $data */
$data = $observer->getData('data');
@kalenjordan
kalenjordan / magento-admin-gamification.md
Last active Aug 29, 2015
Magento Admin Gamification
View magento-admin-gamification.md

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 / 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
View winkles-law.md

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="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">
View editing-content-on-frontend.md

Edit Content over the Frontend

Background

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
*
* http://magemail.co/free-custom-reports-module-for-magento/
*/
/*
* Number of items in order
*
* Useful to find out whether customers are buying a given product
@kalenjordan
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");
[].forEach.call(statuses, function (status) {
if (status.textContent.indexOf("Inactive") > -1) {
status.up('tr').style.color = "#aaa";
status.up('tr').down('a').style.color = "#aaa";
}
});
View tar-magento.sh
tar --exclude="media" --exclude="includes" --exclude="var" -cvf var/files.tar .