Skip to content

Instantly share code, notes, and snippets.

@avoelkl
avoelkl / gist:04274589141a80cf1fcf
Last active August 29, 2015 14:04
Magento 1.9. Slideshow. Insert via CMS > Pages on homepage.
<div class="slideshow-container">
<ul class="slideshow">
<li><a href="linkhere"><img src="{{media url="wysiwyg/slide-1.jpg"}}" alt="" /></a></li>
<li><a href="linkhere"><img src="{{media url="wysiwyg/slide-2.jpg"}}" alt="" /></a></li>
<li><a href="linkhere"><img src="{{media url="wysiwyg/slide-3.jpg"}}" alt="" /></a></li>
</ul>
<div class="slideshow-pager">&nbsp;</div>
<span class="slideshow-prev">&nbsp;</span>
<span class="slideshow-next">&nbsp;</span>
</div>
@avoelkl
avoelkl / gist:39d299238e22512931b4
Created August 6, 2014 11:48
Magento 1.9 Promos
<ul class="promos">
<li><a href="#"> <img src="{{media url="wysiwyg/homepage-three-column-promo-01.png"}}" alt="" /> </a></li>
<li><a href="#"> <img src="{{media url="wysiwyg/homepage-three-column-promo-02.png"}}" alt="" /> </a></li>
<li><a href="#"> <img src="{{media url="wysiwyg/homepage-three-column-promo-03.png"}}" alt="" /> </a></li>
</ul>
@avoelkl
avoelkl / gist:49563c516d6cb318eb34
Last active November 17, 2020 07:41
Non-blocking and quick database dumps for large databases

How-to

Add --single-transaction and --quick to your mysqldump command.

--single-transaction

sets the isolation mode to REPEATABLE READ and starts a transaction before dumping data. useful for InnoDB tables, dumps the consistent state without blocking any applications.

--quick

@avoelkl
avoelkl / magestackday.md
Last active June 18, 2016 15:54
MageStackDay little helpers

MageStackDay notes & queries

Some notes from the MageStackDay chat:

  • save your votes. Marius can close unlimited nrs of questions so he'll do that, just vote / flag once is enough!
  • If you can clean up the spelling and grammar on the question, feel free to do so, as it would be easier for non-english speakers
  • use your votes

Queries

Questions to work on

<?php
/**
* Generate modman file from Magento Connect 2.0 package.xml
*
* Usage:
*
* php package2modman.php path/to/package.xml > path/to/modman
*
*/
require_once(getcwd()."/app/Mage.php");
### Keybase proof
I hereby claim:
* I am avoelkl on github.
* I am annavoelkl (https://keybase.io/annavoelkl) on keybase.
* I have a public key whose fingerprint is 03EB 35B6 57FF 341C DFA0 426C FF90 0BFB 049B 48C7
To claim this, I am signing this object:
@avoelkl
avoelkl / gist:3ed0fdc5d7fd171ea591
Last active August 29, 2015 14:20
All the times & dates & places for #mhlej15 & #mm15de
@avoelkl
avoelkl / OpenSTV
Created September 1, 2015 20:27
MagentoSE Election 2015
Created with the ballots file from:
http://magento.stackexchange.com/election/1
OpenSTV version 1.7 (http://www.OpenSTV.org/)
Suggested donation for using OpenSTV for an election is $50. Please go to
http://www.OpenSTV.org/donate to donate via PayPal, Google Checkout, or
Amazon Payments.
@avoelkl
avoelkl / upgrade-0.1.67-0.1.68.php
Last active December 2, 2015 10:44
SUPEE-6788 variable + block setup script. 1.) Create a new module or extend a current one. 2.) Create a new install or setup script with the variables and blocks which are not whitelisted yet.
<?php
/**
* Created by PhpStorm.
* User: a.voelkl
* Date: 30.10.2015
* Time: 13:21
*/
/** @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
@avoelkl
avoelkl / create_website_scope.php
Last active December 14, 2015 10:39 — forked from yireo/create_website_scope.php
Magento script to create a new Website, new Store Group, new Store View and new Root Catalog - all linked together.
<?php
$name = 'Shop:Name';
$code = 'shop';
// Create the root catalog
$category = Mage::getModel('catalog/category');
$category->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID);
$category->setData('name', $name);
$category->setData('url_key', $code);
$category->setData('display_mode', 'PRODUCTS');