Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<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>
<?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 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 / 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 / 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.

<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">

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.
/* 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 August 29, 2015 13:57
Gray out rows in a grid if a status column is inactive
// 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";
}
});
@kalenjordan
kalenjordan / tar-magento.sh
Created March 27, 2014 13:03
Tar Magento Files
tar --exclude="media" --exclude="includes" --exclude="var" -cvf var/files.tar .