Write good product descriptions!

Write good product descriptions!

It never fails to amaze me how many people are creating stores and populating them with 1 line product descriptions. I’m stunned by this, as stores set up like this are bound to fail despite our best efforts to make them search engine friendly.

Whoever said “a picture is worth a thousand words” probably never managed to get a website ranked highly in the search engines! As far as Google, Yahoo or Altavista are concerned, a picture is not worth anything. Continue reading

How to Fake an Uploaded File

Our store software contains an extensive set of routines for processing uploaded images and resizing them into various image sizes. We’ve recently been adding some code to support a bulk import function and it’s become necessary to somehow fake uploading a file, given a specific URL for an image.

The basic plan is to use Net::HTTP to connect to the remote server and grab the image and save it in a temporary file. It turns out that Rails contains a UploadedTempfile class which is a subclass of Tempfile, and this is used by the CGI routines to handle any uploaded files.

Continue reading