Desarrollo de una tienda web

3

Desde verano de 2009 he estado desarrollando la tienda web de Carolan, una tienda de disfraces y otros artículos de fiesta con sede en Las Palmas de Gran Canaria. Ya he perdido el control de las horas totales que he invertido en este proyecto porque se ha convertido en una obsesión por cumplir con las “mejoras prácticas” (best practices).

El pensamiento corriente dice que cuando uno quiere montar una tienda web, coge el sistema de software libre de moda y la monte sin más. La alternativa (desarrollar una tienda a medida, desde cero) seguramente me habría costado el doble, ¿o no? De esto se trata este artículo…

Carolan vende artículos de fiesta y productos de un solo uso. Tienen una gran variedad de artículos como disfraces, copas, servilletas, guirnaldas, decoraciones y mucho más. En realidad tienen más de 20.000 artículos catalogados. Cuando empecé a trabajar con el equipo de Carolan, uno de sus principales deseos era crear una conexión “viva” entre su base de datos y la tienda web para minimizar gastos e incrementar la eficacia. Otro deseo importante era que la web fuera fácil de usar (y los artículos fáciles de encontrar) y dinámica con una portada que variara según la temporada y que la tienda saliera bien en los resultados de los buscadores.

Analizando sus deseos / necesidades determiné que la mejor opción era la adopción de una tienda de software libre. Creía que me ahorraría montón de tiempo pero ahora no lo tengo tan claro y quiero saber qué opinas tú. Aquí resumo las modificaciones que se han tenido que hacer desde que empecé con la instalación de la tienda. Ten en cuenta que no detallo TODAS las modificaciones sino las más gordas / importantes.

URL

Por defecto Zen Cart viene con una opción que te permite hacer las URLs “search engine safe” (legibles a los buscadores). Básicamente convierte
/index.php?main-page=product-info&products-id=1234
en
/index.php/main-page/product-info/products-id/1234
(o algo por el estilo). No está mal pero hoy en día este tipo de transformación no es necesaria.

Lo que sí quería era convertir la URL en algo como /disfraces-y-complementos/disfraz/adulto/mujer/disfraz-abeja-adulto.html para tener palabras claves en la URL. Lo logré con un par de modificaciones al código base de Zen Cart y algunas transformaciones via mod_rewrite. Me ha costado perfeccionar el método pero de momento parece estar funcionando más o menos bien.

Etiqueta Title

El valor de la etiqueta Title por defecto de Zen Cart no se presta a una buena indexación por parte de los buscadores. Tuve que modificarla unos cuanto sitios para que fuera siempre único (no repetido) ya que valores repetidos minimiza la usabilidad.

Optimización de Velocidad y de Código Fuente

Cada vez más la velocidad de una web determina su ranking dentro de los resultados de una búsqueda. He intentado cumplir con todas las sugerencias de Yahoo! and Google referente mejorar la velocidad de la web. Según mis cálculos, la web empezó cargándose en 7 segundos (sin cache, incluyendo lentitud de la red). Tras estos cambios, las peticiones terminan en menos de 1.5 segundos y para implementar estas sugerencias tuve que tocar:

  • el diseño general: se implementaron sprites, se combinaron hojas de estilo y ficheros .js
  • el diseño del perfil de un artículo (minimicé la cantidad de HTML generado por la tienda)
  • el diseño del buscador (se mejoraron el diseño de los enlaces a las páginas siguientes, se modificó la presentación de resultados, se modificó la etiqueta Title de los resultados para incluir los nombres de los productos y no solo el número de la página, se creó un Índice de productos)
  • se modificó el diseño, y el proceso, de “checkout” (pasar por caja)
  • se eliminarón los caracteres “codificados” (á se convirtió en á)
  • se redujo el número de peticiones por página de 40~ a menos de 20
  • se implementó el uso de dominios sin cookies y de una Red Distribuidora de Contenidos (Content Distribution Network – CDN)

En fin, tras todos estos cambios y teniendo en cuenta que sólo utilizan un método de pago, me pregunto si realmente me he ahorrado algo usando zen-cart (lo cual supuso una inversión de tiempo para aprenderlo). ¿Qué opinas tú?

Snow Leopard Apache exit signal Segmentation fault (11)

1

Following my upgrade to Snow Leopard, Apache started producing segfaults for virtually any request. I tried reinstalling the Entroyp.ch PHP package (which doesn’t work with Snow Leopard), commenting LoadModule php5_module in /etc/apache2/httpd.conf, and a host of other things but the thing that ended up solving the problem for me was:

  1. Be sure to use the PHP that comes with Snow Leopard (leave LoadModule php5_module uncommented – don’t use the entroyp.ch package, sorry Marc!)
  2. Comment out LoadModule dav_svn_module /opt/subversion/lib/svn-apache/mod_dav_svn.so

The bottom line is, any modules that were not built against the current (Snow Leopard) version of Apache will probably cause some sort of segfault.

Since the version of PHP that comes with Snow Leopard may be missing some of your favorite extensions, here’s a link to some instructions on how to include them (untested by me): Making Snow Leopard’s PHP 5.3.0 usable in the real world

I sure hope this saves someone the 3 hours of pointless poking around that I lost this morning!

Roof Repair in the Canary Islands

3

While living here I’ve had several opportunities to do home repair or participate in minor constructions jobs. The most recent task was repairing a trough that had developed on the roof of our building and that appeared to be allowing water to collect and filter through to my upstairs neighbor’s ceiling.

My neighbor was going to pour some cement into the trough (a depression in the roof about 2 meters in diameter) and paint over it, but I suggested that maybe we should go a little further. I hate doing things twice. My father was here visiting and what better way to spend your vacation than helping your son repair his roof?

Removing Old PaintWe started by cleaning the affected area, removing the old paint and vacuming out the dust and other junk that had accumulated between the tiles over the years.

Applying ResinWe then applied a “resin” (not sure of the chemical makeup) to help the cement stick and minimize leaking. When the resin dries, it leaves behind a sticky substance not unlike the glue on the back of some price tags (that is impossible to remove).

Depth of DepressionMeasuring depth of depression

The hole we were trying to fill was about 1.5cm deep (about half an inch). Note that we only measured one dimension. More on why later…


Filling with mortarLeveling mortar to fill troughApplying trowel to flattenDepression with mortar prior to paintingDried mortar

I had never poured cement before but my father had, so with his help, we managed to pour a fairly nice patch filling the hole. We used an entire 20 kilo bag of cement (well, 85% of the bag) and were very careful not to let the cement get too wet. The cement dried in a few hours (it was hot and sunny) but we dampened it to keep it from cracking and by the next day, it was ready to be painted.


Starting paint jobThe paint, known as sealent here, seemed to be a “rubberized” acrylic paint with some insulating properties. It is a bit disturbing to think that this is the ONLY thing keeping water from penetrating the tiles, mortar, and cement below. Shouldn’t there be some sort of rubberized layer (at least 1/4 inch thick) glued to the surface with some petroleum based product? Apparently, this paint-only approach is standard here in the islands.

Finished ProductTwo coats (and 24 hours) later, the job was done, and just in time too. It started to rain about 8 hours later. Unfortunately, for all of my good intentions, it looks like this work was mostly for naught. As I stated above, we only measured the depth to fill by one dimension. This is because the neighbor was convinced the water was leaking through where it was accumulating. Failed repairI, however, suspected that filling that one hole would simply push the water to other parts of the greater depression, which is in fact what happened. Thus, to really fix the problem, we’re probably going to have to fill nearly the entire roof with about 2cm of mortar.

In Memory of My Mom

0

Go to Top