Skip to content

Instantly share code, notes, and snippets.

View barbazul's full-sized avatar

Barbazul barbazul

View GitHub Profile
@barbazul
barbazul / dabblet.css
Created December 16, 2011 13:16
Previewer test
/**
* Previewer test
*/
background: #f06;
background: linear-gradient(left bottom,
hsla(340, 100%, 50%,.7), yellow);
min-width: 100px;
width: 2in;
transition-duration: 6s;
/**
* Buttons
*/
a.button {
padding: 10px 20px;
background-image: linear-gradient(bottom, rgb(23,188,245) 0%, rgb(51,226,255) 50%);
border: 1px solid rgb(23,188,245);
border-radius: 10px;
}
@barbazul
barbazul / dabblet.css
Created November 9, 2012 20:25
Playing with shadows
/**
* Playing with shadows
*/
div {
border:1px solid #e1e1e1;
box-shadow: 0 2px 0 #FFF inset;
background: #0000FF;
min-height: 100%;
color: #f68d3f;
@barbazul
barbazul / gist:5236813
Created March 25, 2013 12:35
Get a collection of products without image, ordered by an attribute
<?php
require_once 'app/Mage.php';
Mage::app();
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect(array('name', 'sku', 'isbn'))
->addAttributeToFilter('image', array('null' => true))
->addAttributeToSort('editorial');
@barbazul
barbazul / import.csv
Created April 9, 2013 21:10
Sample file for import
sku _store _attribute_set _type _category _root_category _product_websites name description short_description price special_price cost weight manufacturer image small_image thumbnail status visibility image_label thumbnail_label small_image_label msrp_enabled msrp_display_actual_price_type tax_class_id inchoo_featured_product relevance sales color_bodies_bebe talle_bodies_bebe color_buzo talle_buzo color_calza talle_calza color_campera talle_campera color_chaleco talle_chaleco color_leggins talle_leggins color_munecas color_pantalon talle_pantalon color_polera talle_polera color_pollera talle_pollera color_remera talle_remera color_set_de_bebe talle_set_de_bebe color_tapado talle_tapado color_traje_de_bano talle_traje_de_bano color_vestido talle_vestido color_camisa talle_camisa color_ropa_dormir talle_ropa_dormir color_bermuda talle_bermuda color_short talle_short color_piloto talle_piloto color_saco talle_saco color_sweater talle_sweater color_ropa_interior talle_ropa_interior color_ropa_cama talle_ropa_cam
@barbazul
barbazul / runcron.php
Created May 8, 2013 17:01
Como disparar el cron de SemExpert_Oca a mano
<?php
include_once 'app/Mage.php';
Mage::app();
Mage::getModel('oca/order_shipment')->job();
@barbazul
barbazul / rewrites.php
Last active January 3, 2016 15:19
Detect conflicting rewrites in a Magento installation
<?php
function get_flag($value) {
$value = strtolower($value);
return $value === TRUE || ($value !== 'false' && !!$value);
}
$modules_dir = dir('app/etc/modules/');
$rewrites = array();
$conflicts = array();
@barbazul
barbazul / post-checkout
Created October 8, 2014 18:52
Git post-chekout clear Magento cache
#!/usr/bin/php
<?php
if(file_exists('app/Mage.php')) require 'app/Mage.php';
else require '../../app/Mage.php';
Mage::app();
Mage::getModel('core/cache')->flush();
-- Tapo todas las casillas de email que estén configuradas
UPDATE core_config_data SET value = "user@domain.com" WHERE value like '%@%';
-- Piso todas las casillas de correos de clientes que no sean nuestras
UPDATE customer_entity SET email = CONCAT('user', entity_id, '@domain.com')
WHERE email NOT LIKE '%semexpert%';
-- Borro las direcciones de todos los cliente
DELETE FROM customer_address_entity;
@barbazul
barbazul / README.md
Created December 19, 2017 17:19
Plantilla de README para modulos Magento

${PROJECT_NAME}

Escribir un párrafo describiendo el proyecto. Intentá explicarle al lector, de qué se trata el proyecto.

Build Status

#[[## Referencias]]#

Agregar acá links a los tickets de Redmine que correspondan o a la documentación en Drive