Skip to content

Instantly share code, notes, and snippets.

View andyhausmann's full-sized avatar

Andy Hausmann andyhausmann

View GitHub Profile
@andyhausmann
andyhausmann / Magento JavaScript Console Bugfix
Created May 16, 2012 12:48
Magento // Bring back your JavaScript Console
<layout version="0.1.0">
<default>
<reference name="content">
<block type="core/text" name="fix.console" as="fix.console">
<action method="setText">
<text><![CDATA[<script type="text/javascript">
iframe = document.createElement('iframe');
iframe.style.display = 'none';
document.getElementsByTagName('body')[0].appendChild(iframe);
@andyhausmann
andyhausmann / Magento Snippets
Last active October 9, 2015 05:48 — forked from davidalexander/gist:1086455
Magento Snippets
# Magento Snippets #
## Download extension manually using pear/mage ##
Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
## Clear cache/reindex ##
<?php
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
if (!$installer->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'attribute_name')) {
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'attribute_name', array( // TABLE.COLUMN: DESCRIPTION:
'label' => 'Label', // eav_attribute.frontend_label admin input label
'group' => 'General', // (not a column) tab in product edit screen
'sort_order' => 0, // eav_entity_attribute.sort_order sort order in group
'backend' => 'module/class_name', // eav_attribute.backend_model backend clas
@andyhausmann
andyhausmann / TYPO3 Extension - Hook - Flexform Manipulaltion - T3libBefunc.php
Last active June 7, 2016 15:17
This is a Hook which is responsible for flexform manipulations depending on the chosen controller action (switchableControllerAction). Following Hook file is located in typo3conf/ext/your_ext/Classes/Hooks/T3libBefunc.php You need to register this Hook within your ext_localconf: $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc…
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012-2013 Andy Hausmann <ah@sota-studio.de>, sota studio
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
(function($){
"use strict";
$.pluginName = function(el, options){
var self = this;
self.$el = $(el);
self.el = el;
self.$el.data('pluginName', self);
# TYPO3.Neos:SomeTag provides Meta Tag for the Google Webmaster Tools Site Verification
#
prototype(TYPO3.Neos:SomeTage) < prototype(TYPO3.TypoScript:Tag) {
tagName = 'meta'
attributes {
name = 'some-tag-name'
content = ''
}
-
name: 'Sitemap'
uriPattern: 'sitemap'
defaults:
'@package': 'My.Package'
'@controller': 'Sitemap'
'@action': 'index'
'@format': 'html'
appendExceedingArguments: true
@andyhausmann
andyhausmann / gist:56ae58af55b14ecd56df
Created May 20, 2014 09:15
Twitter Bootstrap and Prototype: How to fix Bootstraps problems.
jQuery(document).ready( function() {
var isBootstrapEvent = false;
if (window.jQuery) {
var all = jQuery('*');
jQuery.each(['hide.bs.dropdown',
'hide.bs.collapse',
'hide.bs.modal',
'hide.bs.tooltip',
'hide.bs.popover'], function(index, eventName) {
all.on(eventName, function( event ) {
{namespace ts=TYPO3\TypoScript\ViewHelpers}
{namespace bootstrap=TYPO3\Twitter\Bootstrap\ViewHelpers}
<!DOCTYPE html>
<html lang="en">
<head>
<f:section name="metadata">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</f:section>
<f:section name="stylesheets">
##
# Create shorthand namespace for our site package name.
# It is available in all included typoscript files.
#
namespace: Site=TYPO3.NeosDemoTypo3Org
include: NodeTypes/*
/**
* Root TypoScript template for the Neos demo website