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
<!-- 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
#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
############################################ | |
## 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
<!-- 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
#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
<!-- 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
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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 10; |
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
############################################ | |
## rewrites to https y www | |
#First rewrite any request to the wrong domain to use the correct one (here www.) | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
#Now, rewrite to HTTPS: | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |