Skip to content

Instantly share code, notes, and snippets.

@riconeitzel
riconeitzel / cleanImages.php
Last active Feb 3, 2017 — forked from peterjaap/cleanImages.php
Script to clean up the images tables in a Magento installation. Removes references to non-existing images, removes duplicate images, sets correct default image and deletes orphaned images from the filesystem.
View cleanImages.php
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.
View onepage.phtml
<script type="text/javascript">
Checkout.prototype.gotoSection = Checkout.prototype.gotoSection.wrap(function(parentMethod, section, reloadProgressBlock) {
// Call parent method.
parentMethod(section, reloadProgressBlock);
var _gaq = _gaq || [];
try {
// push current checkout section to google analytics if available.
@riconeitzel
riconeitzel / .gitignore
Last active Dec 28, 2015
Magento 1702 und 1800 .gitignore
View .gitignore
# Full Magento 1.7.0.2 #
########################
/.htaccess.sample
/LICENSE.html
/LICENSE.txt
/LICENSE_AFL.txt
/RELEASE_NOTES.txt
/api.php
/app/.htaccess
/app/Mage.php