Skip to content

Instantly share code, notes, and snippets.

View ppassmannpriv's full-sized avatar
🎯
Focusing

Pieter Paßmann ppassmannpriv

🎯
Focusing
View GitHub Profile
@ppassmannpriv
ppassmannpriv / Data.php
Created March 11, 2013 13:49
Yay fun Resize an image wherever you want with this fun and nice dandy helper in Magento.
<?php
/**
* @author Pieter Paßmann @ graphodata AG 2013
* @website graphodata.de
* @description Resize any image with your own helper.
*/
class Graphodata_Resizeimg_Helper_Data extends Mage_Core_Helper_Abstract
{
/**
@ppassmannpriv
ppassmannpriv / import.php
Created March 11, 2013 13:34
Get rid of the old product image on the external import (xml)
<?php
public function removeOldProductImages($sku) {
// Produkt laden
$product = Mage::getModel('catalog/product');
if (! ($id = $product->getIdBySku($sku))) {
throw new Exception("! Produkt '".$sku."' wurde nicht gefunden");
}
// Funktioniert nicht: