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 | |
/** | |
* | |
* Funcion que devuelve la cadena mas parecida encontrada en un array | |
* @param string $string cadena a sustituir | |
* @param array $values valores en los que buscar la cadena más parecido a la cadena pasada | |
* @param int $acceptanceLevel si nivel de aceptacion es mayor mejora el rendiemiento pero empeora los resultados. | |
* si nivel de aceptacion es 0, no se para hasta encontrar una cadena exacta o el fin del array. | |
* si nivel de aceptacion es > 0, en cuanto encuentre una cadena con ese nivel de aceptacion devuelve el resultado |
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
#funcion rapida para crear una rama de feature desde master en un proyecto. tecleando fr y la rama | |
function fr { git checkout master -b FR#$1;} |
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
iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini |
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 | |
define('MAGENTO', realpath(dirname(__FILE__))); | |
require_once MAGENTO . '/app/Mage.php'; | |
Mage::app(); | |
$app=Mage::app(); | |
Mage::app()->cleanCache(); | |
flush(); |
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
#atributos de catalogo creados por el usuario | |
SELECT attribute_code FROM eav_attribute AS eavAttr | |
WHERE eavAttr.entity_type_id = 4 | |
AND eavAttr.is_user_defined = 1; | |
#atributos de catalogo NO creados por el usuario (magento core) | |
SELECT attribute_code, attribute_id FROM eav_attribute AS eavAttr | |
WHERE eavAttr.entity_type_id = 4 | |
AND eavAttr.is_user_defined = 0; |
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
LOCK TABLES `directory_country_region` WRITE; | |
UPDATE `directory_country_region` | |
SET default_name = 'A Coruña' | |
WHERE region_id = 130; | |
UPDATE `directory_country_region` | |
SET default_name = 'Álava' | |
WHERE country_id = 'ES' AND code = 'Alava'; |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
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
#PARA CUSTOMERS borrando QUOTES más antiguas de 45 días | |
#DELETE FROM sales_flat_quote WHERE (NOT ISNULL(customer_id) AND customer_id != 0) AND updated_at < DATE_SUB(Now(), INTERVAL 45 DAY) LIMIT 15000; | |
SELECT * FROM sales_flat_quote WHERE (NOT ISNULL(customer_id) AND customer_id != 0) AND updated_at < DATE_SUB(Now(), INTERVAL 45 DAY) LIMIT 15000; | |
#PARA NO CUSTOMERS borrando QUOTES más antiguas de 30 días. | |
#DELETE FROM sales_flat_quote WHERE (ISNULL(customer_id) || customer_id = 0) AND updated_at < DATE_SUB(Now(), INTERVAL 30 DAY); | |
SELECT * FROM sales_flat_quote WHERE (ISNULL(customer_id) || customer_id = 0) AND updated_at < DATE_SUB(Now(), INTERVAL 30 DAY) LIMIT 50000; |
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
SET FOREIGN_KEY_CHECKS = 0; | |
#truncate customers | |
truncate customer_entity; | |
truncate customer_address_entity; | |
truncate log_customer; | |
truncate salesrule_customer; | |
truncate salesrule_coupon_usage; | |
truncate newsletter_subscriber; | |
truncate persistent_session; |
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 -f shell/log.php -- clean --days 1 |
OlderNewer