Skip to content

Instantly share code, notes, and snippets.

View antoinekociuba's full-sized avatar

Antoine Kociuba antoinekociuba

View GitHub Profile
@antoinekociuba
antoinekociuba / add-checkout-form-key.sh
Last active June 19, 2017 20:17 — forked from grafikchaos/add-checkout-form-key.sh
Magento SUPEE-9767 Checkout Form Key Theme Patch
find -L app/design/frontend -name 'shipping.phtml' -or -name 'billing.phtml' -or -name 'shipping_method.phtml' -or -name 'payment.phtml' -or -name 'addresses.phtml' \
| xargs grep -L formkey \
| xargs perl -i -pe 's/<\/form>/<?php echo \$this->getBlockHtml("formkey") ?>\n<\/form>/g'
find -L skin/frontend -name 'opcheckout.js' \
| xargs grep -L form_key \
| xargs perl -i -pe 's/if \(elements\[i\]\.name=='\''payment\[method\]'\''\) \{/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g'
find -L js -name 'payment.js' \
@antoinekociuba
antoinekociuba / .gitignore_magento
Created April 25, 2017 14:25 — forked from herveguetin/.gitignore_magento
Magento .gitignore example
######################
# Magento .gitignore #
######################
# Magento Core unnecessary files #
##################################
/errors/local.xml
/index.php
/install.php
/mage