Monthly Archives: junio, 2012

Cómo correr IE 7,8 o 9 en Snow Leopard o Lion

junio 29th, 2012 Posted by Chotosoft, Internet Explorer, mac 0 thoughts on “Cómo correr IE 7,8 o 9 en Snow Leopard o Lion”
La manera más fácil de correr IE 7, 8 o 9 en Snow o Lion, es corriendo una Virtual Machine en VirtualBox.
Primero hay que descargar Virtual Box desde acá.
Y luego hay que descargar las imágenes de las VM que se quiera utilizar:
IE 7 sólamente
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="7" bash
IE 8 sólamente
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="8" bash
IE 9 sólamente
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="9" bash
IE 7, 8 y 9
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="9" bash

iOS URL decode | Objective C

junio 27th, 2012 Posted by objective-c 0 thoughts on “iOS URL decode | Objective C”

Para realizar un URLDecode en iOS hay que realizar dos pasos:

  • Reemplazar los caracteres “+” por ” “
  • Reemplazar los %

Se puede realizar de la siguiente manera.

 

 NSString *decoded = [[message stringByReplacingOccurrencesOfString:@"+" withString:@" "] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

cache_dir is not writable | Magento 1.6.2

junio 17th, 2012 Posted by magento 0 thoughts on “cache_dir is not writable | Magento 1.6.2”
Luego de subir mi instalación fresquita de Magento me encontré con este problema:
cache_dir is not writable
La solución fue darle permisos 777 a la carpeta /var


chmod -R 777 var/

Mage registry key “_resource_helper/core” already exists | Magento 1.6.2

junio 17th, 2012 Posted by magento 0 thoughts on “Mage registry key “_resource_helper/core” already exists | Magento 1.6.2”

Luego de desarrollar mi site de Magento en local y subirlo al servidor me encontré con el siguiente error:

Mage registry key "_resource_helper/core" already exists

El problema lo pude resolver con los siguientes pasos: 

Eliminando la cache y las sessiones :

 
rm -rf var/cache/* var/session/*

Y luego haciendo un fix de los permisos de los archivos:

 


#for magento 1.5+
find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

Cómo obtener todos los posibles valores de los atributos de un producto configurable.

junio 16th, 2012 Posted by magento, php 0 thoughts on “Cómo obtener todos los posibles valores de los atributos de un producto configurable.”

Para obtener todos los posibles valores de los atributos un producto configurable se puede utilizar el siguiente código:

 


// Collect options applicable to the configurable product
$productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
$attributeOptions = array();
foreach ($productAttributeOptions as $productAttribute) {
foreach ($productAttribute['values'] as $attribute) {
$attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];
}
}

Cómo ordenar los atributos de un producto configurable

junio 16th, 2012 Posted by magento 0 thoughts on “Cómo ordenar los atributos de un producto configurable”

Estoy haciendo un Magento para vender remeras.

Cada remera es un producto configurable que tiene dos atributos: Color y Talla.

Por defecto salía primero el Color y luego la Talla, y yo necesitaba mostrar primero el Color. Aparentemente Magento ordena los atributos por el ID de manera descendiente.

La solución que encontré es la lanzando esta query por phpMyAdmin

UPDATE catalog_product_super_attribute SET position = 1 WHERE attribute_id = ‘your_attribute_id’ 

Más info acá.

Cómo eliminar el sufijo .html de las páginas de productos y categorías en Magento

junio 16th, 2012 Posted by magento 0 thoughts on “Cómo eliminar el sufijo .html de las páginas de productos y categorías en Magento”

Hay que ir en el administrador a System > Config > Catalog y eliminar el sufijo “.html”.

 

Luego hay que volver a reindexar. System > Index Management > Reindex all

Couldn’t resolve host ‘magento-community’

junio 16th, 2012 Posted by magento 0 thoughts on “Couldn’t resolve host ‘magento-community’”
Estaba intentando descargar un módulo de Magento y me daba el siguiente error: 
Couldn’t resolve host ‘magento-community’
Para solucionarlo hay que anteponer el host de Magento: http://connect20.magentocommerce.com/
Por ejemplo:

http://connect20.magentocommerce.com/community/banner 

isEnabledViewSwitcher

junio 15th, 2012 Posted by magento 0 thoughts on “isEnabledViewSwitcher”

Para quitar el módulo View By del front de Magento hay que ir a Sistema > Catalog > Catalog y seleccionar o bien “Grid only” o bien “List only”.

 

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`catalog_product_entity`, CONSTRAINT `FK_CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY (`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_i)

junio 15th, 2012 Posted by magento 0 thoughts on “SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`catalog_product_entity`, CONSTRAINT `FK_CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY (`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_i)”

Luego de hacer un upgrade de Magento 1.4.2 a Magento 1.6.2 el script de importación de productos dejó de funcionar.

Estuve horas buscando este error


SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
update a child row: a foreign key constraint fails
(`magento_sdny_new`.`catalog_product_entity`, CONSTRAINT
`FK_CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY
(`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_i)


 
Finalmente descubrí aquí que este error se debe a esta línea específicamente:

$pr_simple->setAttributeSetId(9);

Y se puede deber a dos razones:

  • O bien no se está proveyendo ningún valor en el setAttributeSetId($id).
  • O bien el valor que se está proveyendo no existe en la instalación de Magento.

Otra cosa que tuve que hacer es ir a Sistema > Index Management y setear el índice “Product Prices” como manual.

Copyright © 2018 programadorfreelanceargentina.com

Programador Freelance Argentina