Skip to content

Instantly share code, notes, and snippets.

@ceckoslab
ceckoslab / gist:4523798
Last active December 11, 2015 01:29
My suggestion for question: "Magento observer not firing" at: http://stackoverflow.com/questions/14301861/magento-observer-not-firing
<modules>
<Hatclub_MembershipHandler>
<version>1.0.0</version>
</Hatclub_MembershipHandler>
</modules>
<global>
......
......
......
</global>
@ceckoslab
ceckoslab / gist:4605577
Created January 23, 2013 13:27
A tool, that copied all Product ( name, description and short_description ) from Engslish to Trukish store view
<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
$englishStoreViewId = 4;
$turkishStoreViewId = 6;
ini_set('display_errors', 1);
@ceckoslab
ceckoslab / gist:5116108
Created March 8, 2013 12:20
New order transactional email content - DE / EN
//DE
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td align="center" valign="top" style="padding:20px 0 20px 0">
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
<!-- [ header starts here] -->
<tr>
@ceckoslab
ceckoslab / gist:6120823
Last active December 20, 2015 11:09
Simple script, that shows / extract all email addresses of customers, who made orders in the Magento shop
<?php
/**
* @author Tsvetan Stoychev <ceckoslab@gmail.com>
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
ini_set('max_execution_time', 0);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
@ceckoslab
ceckoslab / gist:6549634
Created September 13, 2013 11:44
Deleting all grouped DUMMY prices ... thanks to MagePsycho and his article: Updating product prices in Magento in an easier & faster way - http://www.blog.magepsycho.com/updating-product-prices-in-magento-in-easier-faster-way/
<?php
/**
* @author MagePsycho <info@magepsycho.com>
* @website http://www.magepsycho.com
* @category Export / Import
*/
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
@ceckoslab
ceckoslab / delete-non-admin-prices.php
Last active December 25, 2015 16:09
Simple Magento script, that deletes all non admin store associated prices ... basically we will keep only the default prices values and will delete all website associated price values.
<?php
/**
* @author MagePsycho <info@magepsycho.com>
* @author ceckoslab <ceckoslab@gmail.com>
* @website http://www.magepsycho.com
* @website http://ceckoslab.com
*/
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
@ceckoslab
ceckoslab / .gitignore
Created December 2, 2013 08:58
Git ignore file, that I use for Magento projects
/app/etc/local.xml
/var/
/media/
/includes/
/downloader/
/index.php
/tmp/
/.htaccess
.idea
@ceckoslab
ceckoslab / config snippet.xml
Last active August 29, 2015 14:00
Jarlssen_ChooserWidget - config snippet
<config>
...........
...........
...........
<default>
<jarlssen_chooser_widget>
<chooser_defaults>
<catalog_product_widget_chooser>
<input_label>Product</input_label>
<button_text>Select Product...</button_text>
@ceckoslab
ceckoslab / module declaration and dependencies.xml
Last active August 29, 2015 14:00
Jarlssen_ChooserWidget - module declaration and dependencies
<?xml version="1.0"?>
<config>
<modules>
<My_CustomExtension>
<active>true</active>
<codePool>local</codePool>
<depends>
<Jarlssen_ChooserWidget/>
</depends>
</My_CustomExtension>
@ceckoslab
ceckoslab / config array example.php
Last active August 29, 2015 14:00
Jarlssen_ChooserWidget - $config array example
$categoryConfig = array(
'input_name' => 'entity_link',
'input_label' => $this->__('Product'),
'button_text' => $this->__('Select Product...'),
'required' => true
);