grep -r Mage::dispatchEvent /path/to/your/Magento/* > events.txt
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
function getBrandName() { | |
var location = window.location.href, | |
taskNumber = location.substr(location.lastIndexOf('/')+1) | |
taskName = document.getElementById("summary-val").innerText.toLowerCase().replace(/\s+\|\s+/g, '|').replace(/[^a-z0-9]/g, '-').replace(/:/g, '').replace(/\|/g, '').replace(/-+/g, '-') | |
; | |
console.log(taskNumber +'-'+ taskName); | |
} | |
getBrandName(); |
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/sh | |
echo 'XXXX' | sudo -S su - | |
sudo su born <<'EOF' | |
cd /var/www/XXX | |
git pull origin master | |
EOF | |
~ |
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
DESCRIBE `enterprise_url_rewrite_redirect`; | |
INSERT INTO `enterprise_url_rewrite_redirect` (`identifier`, `target_path`, `options`, `description`, `category_id`, `store_id`) VALUES ('browse/by-packaging.html', 'browse/package', NULL, NULL, '28', '3'); | |
INSERT IGNORE INTO `enterprise_url_rewrite_redirect_cl` (`redirect_id`) VALUES (NEW.`redirect_id`); | |
SELECT `enterprise_mview_metadata`.* FROM `enterprise_mview_metadata` WHERE (`enterprise_mview_metadata`.`table_name`='enterprise_url_rewrite_redirect'); | |
START TRANSACTION; | |
DELETE `ur` FROM `enterprise_url_rewrite` AS `ur` | |
INNER JOIN `enterprise_url_rewrite_redirect_rewrite` AS `r` ON r.url_rewrite_id = ur.url_rewrite_id WHERE (ur.is_system = 0) AND (ur.entity_type = 1) AND (r.redirect_id = 12); | |
INSERT INTO `enterprise_url_rewrite` (`request_path`, `target_path`, `guid`, `is_system`, `identifier`, `value_id`, `store_id`, `entity_type`) SELECT CONCAT(r.identifier, CASE WHEN ur.inc IS NULL OR `m`.`value` = 1 THEN '' ELSE CONCAT('-', ur.inc) END) AS `request_pat |
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
<script> | |
jQuery.each(jQuery("#general_country_allow option"), function(){ | |
var $this = jQuery(this), val = $this.val(); | |
var arr = ["GB", "FR", "IT", "DE", "NL", "ES", "SE", "DK", "BE", "AT", "IE", "PT", "PL"]; | |
if(jQuery.inArray(val, arr) !== -1) { | |
$this.attr("selected", "selected"); | |
} |
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 | |
class convertCsvToXml { | |
protected $arrCol = ["a", "b", "c"]; | |
protected $arrXPath = [ | |
0 => "product-families/product-family[name='{{f-name}}']/product-models", | |
1 => "product-families/product-family[name='{{f-name}}']/product-models/product-model[name='{{m-name}}']/accessory-types", | |
2 => "product-families/product-family[name='{{f-name}}']/product-models/product-model[name='{{m-name}}']/accessory-types/accessory-type[name='{{a-name}}' or sku='{{sku}}']", | |
]; |
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 | |
/** | |
* Features attributes helper | |
* | |
* @package timezone | |
* @author tuanphpvn@gmail.com | |
*/ | |
class BC_Future_Model_Date extends Mage_Core_Model_Date | |
{ |
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
<html><body>You will be redirected to the PayPal website in a few seconds.<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" id="paypal_standard_checkout" name="paypal_standard_checkout" method="POST"><div><input name="form_key" type="hidden" value="m4Ux3YIWUZc3biqa" /></div><input id="business" name="business" value="tuan.nguyen-meerchant@bluecomgroup.com" type="hidden"/> | |
<input id="invoice" name="invoice" value="145000024" type="hidden"/> | |
<input id="currency_code" name="currency_code" value="USD" type="hidden"/> | |
<input id="paymentaction" name="paymentaction" value="sale" type="hidden"/> | |
<input id="return" name="return" value="http://rsmagento_1_14_01.app/paypal/standard/success/" type="hidden"/> | |
<input id="cancel_return" name="cancel_return" value="http://rsmagento_1_14_01.app/paypal/standard/cancel/" type="hidden"/> | |
<input id="notify_url" name="notify_url" value="http://rsmagento_1_14_01.app/paypal/ipn/" type="hidden"/> | |
<input id="bn" name="bn" value="Magento_Cart_Enterprise" type="hidden"/> | |
<inp |
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
1. Go to Zend_Mail_Transport_Sendmail::_sendMail | |
2. input: | |
Mage::log($this->recipients, Zend_Log::INFO, "email.log"); | |
$this->recipients = preg_replace("/<([^>]*)>/", "<tuanphpvn@gmail.com>", $this->recipients ); |
OlderNewer