Skip to content

Instantly share code, notes, and snippets.

View upandfine's full-sized avatar

Samuel Sommer upandfine

View GitHub Profile
@upandfine
upandfine / import.php
Created December 15, 2016 17:32 — forked from nhp/import.php
Script for usage of avs_fastsimpleimport and configurable products
<?php
/**
* Created by JetBrains PhpStorm.
* User: npreuss
* Date: 3/25/13
* Time: 12:53 PM
* To change this template use File | Settings | File Templates.
*/
require_once 'app/Mage.php';
umask( 0 );
@upandfine
upandfine / shell_delete_unused_images
Created December 15, 2016 17:32 — forked from aleron75/shell_delete_unused_images
Delete no more used Product Images on Magento
<?php
require_once 'abstract.php';
class Mage_Shell_CheckImages extends Mage_Shell_Abstract
{
const CATALOG_PRODUCT = '/catalog/product';
const CACHE = '/cache/';
protected function _glob_recursive($pattern, $flags = 0)
@upandfine
upandfine / local.xml
Created December 15, 2016 17:31 — forked from nhp/local.xml
Webfont in magento local.xml layout einbinden
default>
<reference name="root">
<reference name="head">
<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
<block type="core/text" name="google.font.oswald">
<action method="setText">
<text><![CDATA[<link href='http://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>]]></text>
</action>
</block>
</reference>
@upandfine
upandfine / customer_export.php
Created December 15, 2016 17:31 — forked from nhp/customer_export.php
Magento customer migration from one instance to another even with version changes (max tested difference: mageCE 1.5 > 1.9)
<?php
set_time_limit(0);
$pathTo = '../../';
$magentoFilename = $pathTo . 'app/Mage.php';
require_once $magentoFilename;
umask(0);
<?php
/**
* Generate modman file from Magento Connect 2.0 package.xml
*
* Usage:
*
* php package2modman.php path/to/package.xml > path/to/modman
*
*/
require_once(__DIR__ . "/../www/app/Mage.php");

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
<?php
/**
* Class Extra_Static_Model_Observer
*
* @category Model
* @package Extra_Static
* @author AOE Magento Team <team-magento@aoe.com>
* @license none none
* @link www.aoe.com