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
for user in $(cut -f1 -d: /etc/passwd); do echo $user; sudo crontab -u $user -l; done |
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
<!-- añadir esto al local.xml para quitar la categoría de los filtros de layered navigation --> | |
<catalog_category_layered> | |
<reference name="catalog.leftnav"> | |
<action method="unsetChild"><child>category_filter</child></action> | |
</reference> | |
</catalog_category_layered> |
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 guarda la fecha y hora en que se produce un pedido (o cualquier cambio en otra entidad) | |
#en hora universal. Luego a la hora de mostrar la hora localmente, tenemos que asegurarnos que usamos esta llamada: | |
Mage::getSingleton('core/date')->date(null, $order->getCreatedAt()); |
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
<!-- con esto podemos usarlo en layout xml de CMS o categorías concretas para alterar comportamiento para esa pagina nada más --> | |
<reference name="head"> | |
<action method="setRobots"><value>NOINDEX,FOLLOW</value></action> | |
</reference> |
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 cargar fuentes desde origin externo | |
## o local cuando es balanceada la carga en magento | |
## para que se carguen las fuentes desde el subdominio | |
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
</IfModule> | |
</FilesMatch> |
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 to view all products without weight in database: | |
#TAKE CARE that weight attribute id is the right value | |
SELECT p.sku, w.value FROM catalog_product_entity as p | |
LEFT JOIN catalog_product_entity_decimal as w ON (p.entity_id = w.entity_id AND w.attribute_id = 101) | |
WHERE w.value IS NOT NULL; | |
#insert weight in catalog_product_entity_decimal for all products without value in that table: | |
#TAKE CARE to use the right entity_ids (depending on magento version) |
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
<!-- con esto podemos usarlo en layout xml de CMS o categorías concretas para alterar comportamiento para esa pagina nada más --> | |
<reference name="head"> | |
<action method="removeItem"><type>link_rel</type><href>http://loladerek.es/propuestas-lola-derek/cojines-de-moda</href></action> | |
<action method="removeItem"><type>link_rel</type><href>http://loladerek.es/propuestas-lola-derek/cojines-de-moda?___SID=U</href></action> | |
<action method="addLinkRel"><rel>canonical</rel><href>http://loladerek.es/decoracion/textil-hogar/cojines</href></action> | |
</reference> |
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
curl -I -H 'Host:my.site.com' http://localhost:6081/ |
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 special_from_date and special_to_date 77 y 78 | |
SELECT * FROM eav_attribute WHERE attribute_code LIKE 'special%date' AND entity_type_id=4; | |
#SELECT el atributo special_price | |
SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'special_price' AND entity_type_id=4; |
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 @storeId = 10; | |
(SELECT subscriber_email as email FROM newsletter_subscriber WHERE store_id = @storeId) | |
UNION DISTINCT | |
(SELECT customer_email FROM sales_flat_order WHERE store_id = @storeId); |