URL: http://alanstorm.com/magento_attribute_migration_generator
#/usr/bin/env php
<?php
URL: http://alanstorm.com/magento_attribute_migration_generator
#/usr/bin/env php
<?php
public function statAction(){ | |
$fileName = 'report.csv'; | |
$io = new Varien_Io_File(); | |
$path = Mage::getBaseDir('var') . DS . 'export' . DS; | |
$name = md5(microtime()); | |
$file = $path . DS . $name . '.csv'; | |
$io->setAllowCreateFolders(true); | |
$io->open(array('path' => $path)); | |
$io->streamOpen($file, 'w+'); | |
$io->streamLock(true); |
$product = Mage::getModel('catalog/product') | |
->setStoreId($store->getId()) | |
->load($product->getId()); | |
$gallery = $product->getMediaGallery(); | |
$mediaAttribute = array('image', 'small_image', 'thumbnail'); | |
if($gallery && count($gallery['images'])) { | |
$product_attributes = $product->getTypeInstance()->getSetAttributes(); | |
$gal_backend = $product_attributes['media_gallery']->getBackend(); |
#!/bin/bash | |
find app/code/core/Mage app/code/core/Enterprise app/code/core/Zend lib/Varien lib/Mage lib/Zend -type f | grep -v '\.svn' | sort -d -f -k1 | xargs md5sum | awk {'print $2, $1'} > 1.11.2.0.local.md5 | |
diff 1.11.2.0.base.md5 1.11.2.0.local.md5 |
<!-- | |
SET META ROBOTS | |
--> | |
<!-- | |
Search pages | |
--> | |
<catalogsearch_result_index> | |
<reference name="head"> | |
<action method="setRobots"><meta>NOINDEX,NOFOLLOW</meta></action> | |
</reference> |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getModel(" | |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getResourceModel(" | |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getSingleton(" | |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']" | |
find . -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape(" | |
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape(" | |
find ./app/code/local -name "*/Block/*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']" | |
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "\$_[GET|REQUEST|SERVER|POST]" | |
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct" | |
find . -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct" |
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Academic Free License (AFL 3.0) | |
* that is bundled with this package in the file LICENSE_AFL.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/afl-3.0.php |
#!/bin/bash | |
if [ ! "$1" ]; then | |
echo "No commit reference found! Please add the commit hash of your upgrade." | |
exit | |
fi | |
function echocolor() { # $1 = string | |
COLOR='\033[1;33m' | |
NC='\033[0m' |
Malware that steal card numbers during checkout, targeting Magento based stores | |
www.3guysgolfcarts.com - Regexp("onepage|checkout") | |
www.marisaperry.com - eval(atob( | |
bocolife.com - regexp('onestepcheckout') | |
www.vimedis.fr - regexp("checkout") | |
some others to try | |
https://accesscards.co.uk | |
https://www.actiumplus.dk |
#!/bin/bash | |
# Marko Martinović | |
# Print command traces | |
set -x | |
# SSH user | |
SSHUSER="" | |
# SSH host |