This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright © Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
use Magento\Framework\App\Bootstrap; | |
use Magento\Framework\DB\Adapter\AdapterInterface; | |
use Magento\Framework\DB\Query\Generator; | |
use Magento\Framework\DB\Select\QueryModifierFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -L app/design/frontend -regex '.*\(shipping\|billing\|shipping_method\|payment\).phtml' -exec grep -L formkey {} \; \ | |
| xargs sed -i 's/<\/form>/<?php echo $this->getBlockHtml("formkey") ?><\/form>/g' | |
find -L skin/frontend -name 'opcheckout.js' -exec grep -L form_key {} \; \ | |
| xargs sed -i 's/if (elements\[i\].name=='\''payment\[method\]'\'') {/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CREATE BACKUPS BEFORE RUNNING THIS SCRIPT! | |
for m in $(locate Mage.php | grep -v downloader); do | |
cd $(dirname $(dirname $m)) || (echo && continue) # old locate db | |
MAGE_VERSION=$(php -d error_reporting=0 -r "require 'app/Mage.php'; Mage::app(); echo Mage::getVersion();") | |
if echo $MAGE_VERSION | egrep -q "^[0-9.]+$"; then | |
if [ $MAGE_VERSION "<" 1.4.0.0 ] || [ $MAGE_VERSION ">" 1.7.0.1 ]; then | |
echo -e "No patch available for version $MAGE_VERSION in $(pwd)\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: VAT identification numbers for Greece use "EL", not "GR". | |
COUNTRY_CODES_EU = %w[ | |
AT BE BG CY CZ DK EE FI FR DE GR HU IE IT | |
LV LT LU MT NL PL PT RO SK SI ES SE GB | |
] |