Skip to content

Instantly share code, notes, and snippets.

<?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");
@sandermangel
sandermangel / price.phtml without Weee
Last active November 13, 2018 15:13
The price.phtml template without all the Weee stuff
<?php
/**
* Updated price.phtml without WEEE
*
* NOTICE OF LICENSE
*
* This source file is subject to the MIT License
* It is available through the world-wide-web at this URL:
* http://opensource.org/licenses/mit-license.php
*
@wsakaren
wsakaren / magento2_install
Last active August 29, 2015 14:11
Installing Magento2 - The quick way
So we all hate reading docs. Here is the quick setup for installing Magento2. If you want the long route - http://devdocs.magento.com/
I'm assuming you have composer, PHP 5.4+ and MySQL5.6+. If you have MAMP installed time to go sort that as it wont work (MAMP is on MySQL5.5.x).
1. Install Composer - curl -sS https://getcomposer.org/installer | php
2. mv composer.phar /usr/local/bin/composer (might need to sudo)
3. Goto base httpdocs directory
4. git clone git@github.com:magento/magento2.git
5. Set permissions (like you do in Magento 1.x)
6. cd magento2
@razbakov
razbakov / modman-generator.sh
Last active August 9, 2016 16:28
Generate modman file
#!/bin/sh
#
# Generates magento modman file
#
# INSTALLATION:
# Save this file to /opt/deploy/tools/modman-generator.sh
# ln -s /opt/deploy/tools/modman-generator.sh /usr/local/bin/mg
# chmod a+x /usr/local/bin/mg
#
# USAGE:
@conroyp
conroyp / setup_mailcatcher.sh
Created August 23, 2014 17:31
Mailcatcher installation script for Ubuntu 14.04
#!/bin/bash
# Install dependencies
apt-get install libsqlite3-dev ruby1.9.1-dev
# Install the gem
gem install mailcatcher
# Make it start on boot
echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
update-rc.d cron defaults
@molotovbliss
molotovbliss / gist:c36c25b7a08afda2848b
Last active November 16, 2016 02:20 — forked from magentogirl/gist:e8dc6aa7c74d021f85cc
Disable Magento Logging observers & unused Core Modules via XML
<?xml version="1.0"?>
<config>
<frontend>
<events>
<!-- disble logs -->
<controller_action_predispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_predispatch>
<controller_action_postdispatch>
<observers><log><type>disabled</type></log></observers>
@magentogirl
magentogirl / gist:e8dc6aa7c74d021f85cc
Last active January 8, 2019 11:32
config.xml to disable Magento Logging
<?xml version="1.0"?>
<config>
<frontend>
<events>
<!--disable logs-->
<controller_action_predispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_predispatch>
<controller_action_postdispatch>
<observers><log><type>disabled</type></log></observers>
@azet
azet / proper_bash.md
Last active August 29, 2015 14:02
hitchhikers guide to writing useful and modern bash scripts
@peterjaap
peterjaap / exportAttributesToCsv.php
Created December 10, 2013 15:31
Export Magento attributes and their options to a human-readable CSV file.
<?php
chdir(dirname(__FILE__));
require_once '../app/Mage.php';
Mage::app();
umask(0);
$productModel = Mage::getModel('Mage_Catalog_Model_Product');
$categoryModel = Mage::getModel('Mage_Catalog_Model_Category');
@therouv
therouv / magento-db-cleanup.sql
Last active November 10, 2020 06:54
DB cleanup script for Magento with some common database tables.
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;