Skip to content

Instantly share code, notes, and snippets.

kalenjordan

Block or report user

Report or block kalenjordan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .gitconfig
[alias]= branchellow reverse
st = statusutw
ci = commiteen
br = branch-cached
co = checkout
df = diff-graph --decorate --pretty=oneline --abbrev-commit
dc = diff --cachedformat:'%h : %s' --graph --decorate
lg = log -pgraph --decorate --pretty=oneline --abbrev-commit --all
l = log --graph --decorate --pretty=oneline --abbrev-commit
ll = log --pretty=format:'%h : %s' --graph --decorate
View magemail-top-navigation.html
<table class="top-navigation" width="100%" cellpadding="0" cellspacing="0"><tr>
<td class="first"><a href="#">Women</a></td>
<td class="second"><a href="#">Men</a></td>
<td class="third no-border-on-phone"><a href="#">Sale</a></td>
<td class="fourth hidden-on-phone"><a href="#">Home & Decor</span></a></td>
<td class="last hidden-on-phone"><a href="#">Accessories</span></a></td>
</tr></table>
View magemail-indexes.sql
ALTER TABLE `sales_flat_order_item` ADD INDEX `IDX_SALES_FLAT_ORDER_ITEM_PRODUCT_ID` (`product_id`);
ALTER TABLE `cataloginventory_stock_status` ADD INDEX `IDX_CATALOGINVENTORY_STOCK_STATUS_STOCK_STATUS` (`stock_status`);
ALTER TABLE `cataloginventory_stock_status` ADD INDEX `IDX_CATALOGINVENTORY_STOCK_STATUS_PRODUCT_ID` (`product_id`);
ALTER TABLE `sales_flat_order` ADD INDEX `IDX_SALES_FLAT_ORDER_CUSTOMER_EMAIL` (`customer_email`);
ALTER TABLE `sales_flat_order` ADD INDEX `IDX_SALES_FLAT_ORDER_UPDATED_AT` (`updated_at`);
ALTER TABLE `sales_flat_quote` ADD INDEX `IDX_SALES_FLAT_QUOTE_CUSTOMER_EMAIL` (`customer_email`);
ALTER TABLE `sales_flat_quote` ADD INDEX `IDX_SALES_FLAT_QUOTE_UPDATED_AT` (`updated_at`);
ALTER TABLE `sales_flat_quote_item` ADD INDEX `IDX_SALES_FLAT_QUOTE_ITEM_CREATED_AT` (`created_at`);
ALTER TABLE `sales_flat_quote_item` ADD INDEX `IDX_SALES_FLAT_QUOTE_ITEM_UPDATED_AT` (`updated_at`);
ALTER TABLE `catalog_product_entity` ADD INDEX `IDX_CATALOG_PRODUCT_ENTITY_UPDATED_AT` (`updated_at`);
View buzzstream-feed-usage.php
<?php
Api::setConsumerKey($consumerKey);
Api::setConsumerSecret($consumerSecret);
$history = History::getList();
foreach ($history as $historyItem) {
$date = $historyItem->getDate();
$websiteUrls = $historyItem->getWebsiteNamesCsv();
View buzzstream-feed-usage-.php
Api::setConsumerKey($consumerKey);
Api::setConsumerSecret($consumerSecret);
$history = History::getList();
foreach ($history as $historyItem) {
$date = $historyItem->getDate();
$websiteUrls = $historyItem->getWebsiteNamesCsv();
$project = $historyItem->getProjectName();
View magemail-promo-bar-custom-js.html
<script>
MageMailData = typeof(MageMailData) != 'undefined' ? MageMailData : {};
MageMailData.beforeInit = function() {
var cookies = new MageMail_Cookies();
var coupon = cookies.get('mm_coupon');
if (!coupon || coupon == '') {
MageMail_Magento.applyCouponToCart('BLACK_FRIDAY_10_OFF', 'custom_javascript');
cookies.set('mm_countdown', '2015-11-07T04:00:00+00:00'); // UTC
MageMail_Magento.setupCountdownTimer();
}
@kalenjordan
kalenjordan / emoji.csv
Created Nov 15, 2015
emoji.csv that can be used in php apps
View emoji.csv
&#x1f600; grinning face
&#x1f601; grinning face with smiling eyes
&#x1f602; face with tears of joy
&#x1f603; smiling face with open mouth
&#x1f604; smiling face with open mouth and smiling eyes
&#x1f605; smiling face with open mouth and cold sweat
&#x1f606; smiling face with open mouth and tightly-closed eyes
&#x1f609; winking face
&#x1f60a; smiling face with smiling eyes
&#x1f60b; face savouring delicious food
View web-crons.md

I've been thinking about whether it might be easier to use a separate cron file for some of my extension-specific crons and access it over the web, so that I could control the cron schedule on my end without the customer having to worry about configuring it.

I know that running crons over HTTP is generally a bad idea, but I'm just trying to think through the pros and cons.

The main con to having Magento handle this is that many people seem to be running a 5 minute cron, even post-email-queueing, which I don't quite understand. But it is what it is. So now, all of a sudden, in order to enable a feature (order confirmation emails), they're having to go in and update their cron schedule. From a usability point of view, that's quite a bit deeper under the hood than I ever want a customer to have to go in order to enable a feature. If everyone was already running a 1 minute cron, this would make things a lot more seamless, but that just doesn't seem to be the case currently.

Also, I'm concerned that in some

View custom-social-media-markup.html.twig
<table class="custom-social-footer" cellspacing="0" cellpadding="0"><tr>
<td class='social-icon-wrapper'>
<table class="social-icon facebook" cellspacing="0" cellpadding="0"><tr><td>
<a href="https://facebook.com/{{ settings.facebook_handle }}">
<img border="0" src="{{ facebook_image_url }}">
</a>
</td></tr></table>
</td>
<td class='social-icon-wrapper'>
<table class="social-icon instagram" cellspacing="0" cellpadding="0"><tr><td>
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>
You can’t perform that action at this time.