This file contains hidden or 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 | |
/** | |
* @return integer | |
* @param double $lat_from latitude | |
* @param double $lon_from longitude | |
* @param double $lat_to latitude | |
* @param double $lon_to longitude | |
* @param string $unit The format of return ('km' =>kilometers,'mts'=>meters ) | |
* | |
*/ |
This file contains hidden or 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 | |
/** | |
* Check value to find if it was serialized. | |
* | |
* If $data is not an string, then returned value will always be false. | |
* Serialized data is always a string. | |
* | |
* @param string $data Value to check to see if was serialized. | |
* @param bool $strict Optional. Whether to be strict about the end of the string. Default true. | |
* @return bool False if not serialized and true if it was. |
This file contains hidden or 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 | |
const LOG = 'my.log'; | |
/** | |
* @return void | |
* @param $var The variable passed | |
* @param string $label | |
* @param boolean $backtrace | |
*/ |
This file contains hidden or 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
grep -rin -B2 -A2 "Mage::dispatchEvent" pathToMagentoRoot/app/* > events.txt |
This file contains hidden or 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
SELECT | |
-- cpe.entity_id as product_id, | |
cpe.sku, | |
cpsal.value as variant_name, | |
eaov.value as variant_default, | |
eaov_it.value as variant_it, | |
eaov_en.value as variant_en, | |
eaov_de.value as variant_de, | |
eaov_fr.value as variant_fr, |
This file contains hidden or 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
-- Search products descriptions | |
SELECT | |
cpe.entity_id, | |
cpe.sku, | |
cs.name as store, | |
cpet_d.value as description, | |
cpet_sd.value as short_description | |
FROM `catalog_product_entity` as cpe |
This file contains hidden or 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 | |
/** | |
* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version); | |
* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all | |
* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info() | |
* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems. | |
* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento | |
* @author Magento Inc. | |
*/ |
This file contains hidden or 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
# Magento exclude core | |
.htaccess.sample | |
.modgit/ | |
.modman/ | |
app/code/community/Phoenix/Moneybookers/ | |
app/code/community/Cm/RedisSession/ | |
app/code/core/ | |
app/design/adminhtml/default/default/ | |
app/design/frontend/base/ | |
app/design/frontend/rwd/ |
This file contains hidden or 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 | |
/** | |
* @return string | |
* @param string $url | |
* @param array $params | |
*/ | |
public function removeQueryString($url,$params=array()) | |
{ | |
if(count($params)){ | |
foreach ($params as $value) { |
This file contains hidden or 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 | |
/** | |
* @return void | |
* @param $var The variable passed | |
* @param string $module The name of module | |
* @param integer limit The limit for each | |
*/ | |
public function log($var,$module,$limit =2) | |
{ | |
OlderNewer