Our web design partners at Pride Design have put Paula Rowan’s new website  www.glovesbypaularowan.ie live, I worked very closely with Shane at Pride Design to bring the site to fruition and I am very happy with the outcome!  Paula sells a (self designed) range of luxury gloves through her new website.

 

The website is (once again) built on Drupal 6 with the eCommerece functionality provided by ubercart.  Ubercart worked out very well on this project and it is quickly becoming our preferred eCommerce solution as it provides modern and flexible shopping cart functionality along with the power of drupal.

 

Anyway, if you’re feeling a bit on thee chilly side on this dark and cold month of December why not pop over to www.glovesbypaularowan.ie  and see if a luxury pair of leather gloves can help!

Q: Is it possible to use the ubercart Option Images module (uc_option_image) with a custom product display template, via Content Template (contemplate) or a custom node.tpl.php?

 

A: Yes, you just need to manually call the attribute image into your template with a line of PHP code.

 

The ubercart Option Images module (uc_option_image) is a really nice module that allows you to provide an alternative image for product attribute options - when the visitor views a product and chooses an attribute option (say colour: Red) the attribute displayed image will change to the one for that option - very nice especially for online shops that sell, say clothes in different colours and patterns etc. 

 

The strange thing is that (at the time of writing) the Option Images 6.x-1.4 doesn’t work and doesn’t even install!  Luckily some good folks have worked around the problems and come up with a fixed version that does work (with a bit of TLC) - I have written an article about  getting option images to work with the patched version on the Pride Design website  here –>

 

http://www.pridedesign.ie/content/ubercart-option-images-installs

 

This should hopefully help you to get it up and running…

 

Now, by default this module only attaches the option image to the default ubercart product display, if you are using a custom product template (as I always do) via the Content Template (contemplate) module or via a custom node.tpl.php file then the option images will not be displayed. 

 

To get around this you just have to pop a bit of PHP code into you template at the point at which you want the image to display as follows:

print $node->content['option_image']['#value'];

 

This should do the trick.  If you want only the attribute option image to be displayed (i.e. instead of the product image) then just replace your current product image display code with this.

November 11, 2009

Today our partners at Pride Design in Cork put the new Gael-Taca  (http://www.gael-taca.com/) website live, once again we worked closely with pride on its development.  It is fully content managed site built on drupal 6, but the really interesting thing about it is that it’s multi-lingual - as Gaeilge agus as Bearla! (in Irish and English).

 

In general Drupal proved itself to be well up to the job of multilingual website development, there were just a few strange things to look out for along the way.  One thing I would say though is don’t attempt multi-lingual development without first installing the drupal Internationalization (i18n) module, it is a must!

Good news, this just out on the wire - Drupal has won ‘Best open source PHP Content Management System‘ for the second year running!  Congrats to our favourite CMS and thanks to all the many who volunteered their time to make it so great!

The new Flame By Design (http://www.flamebydesign.ie) website has gone live.  We worked closely with Sinead at Pride Design to get it up and running.  It is another classic content managed drupal 6 website - setup so that the client can easily add and manage the product line up and associated data via a set of specially tailored administration menus.

 

We used the Dynamic Display Block module (ddblock) to present the alternating images on the home page and great use was made of drupal’s taxonomy system to organise and categorise the products. 

 

We wish Flame by Design all the best with their new website!

I have been developing a web application for one of our clients using drupal, it’s a dashboard type data visualisation system that consumes and displays data over an intranet from their software systems.  I have been using google charts with great success.

 

The Chart API module for drupal is very nice, it lets you quite easily incorporate google charts into your web site or application without having to get into the details of the google chart API itself, and the charts themselves look great - just the kind of thing to cheer up a busy software developer.  However it deosn’t seem to support Radar or Polar charts.  There is no mention of them in the documentation, no example on the examples page.  There is also no symbol such as ‘CHART_TYPE_RADAR’ defined in the module as there is for the other chart types, for example ‘CHART_TYPE_LINE’ defined for line charts.

 

So is it possible to plot radar charts using the Chart API module?  I consulted the google chart api and found that the radar chart type is donated as ‘r’, so I tried creating a simple chart and just set it’s type to ‘r’ (rather than say CHART_TYPE_LINE) and it worked just fine!

 

$chart = array( ‘#chart_id’ => ’sink_radar’, ‘#title’ => chart_title(t(’Failures by Sink’), ‘001334′, 15), ‘#type’ => ‘r’, ‘#size’ => chart_size(400, 240), ); $chart['#data'][] = array(20, 30, 15, 70, 90, 20); $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(’sink1′); $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(’sink2′); $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(’sink3′); $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(’sink4′); $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(’sink5′); $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(’sink6′); echo chart_render($chart);

 This code yileds a chart like this:

 

Radar Chart

October 27, 2009

Here’s an interesting thing, the Register reports that the whitehouse has moved its website over to drupal - http://www.whitehouse.gov/

 

It’s a fairly pedestrian website but it’s good to see that the fledgling administration know their web technology!

September 16, 2009

Pride Design (www.pridedesign.ie) has put the new Adare Bridal (www.adarebridal.ie) website live.  Once again we have been working closely with pride on the development of this site.  The site is built using drupal 6 and uses custom CCK types and drupal views to model (pun intended) and display all those fantastic designers and their bridal gowns!

 

The site is a full CMS solution, the client can add, edit or remove content on the site including designers, dresses, special offers etc. by just logging in and using a simple content administration interface.

Just in case I forget how to do it - here a link to a post that tells you how to change the add to cart button in ubercart, http://www.pridedesign.ie/content/ubercart-style-add-cart-button

very handy indeed!

Here’s something I was googling last week - How do you change the text of Drupal’s ‘Home’ breadcrumb to something else? Well, it turns out that a small mod to your theme may be required…

 

While using Drupal 6 to develop a web application we ran into a little snag with Drupal’s breadcrumbs, the app is to integrate in with our client’s existing web site, it will look and feel the same and the visitor should not really know that it is separate from the main website (which is not implemented with drupal).  With drupal this was all easy enough to achieve, but we hit a speed bump when it came to the web app’s breadcrumbs.  Breadcrumb navigation is very important for the new web application, but Drupal always calls the first breadcrumb ‘Home’ - this was a problem as ‘Home’ did not refer to the larger web site’s home page as would be expected, but instead to the first page of the web application.

 

So how do we change the ‘Home’ breadcrumb text to something else, say the title of our web application?  It turns out that there’s no easy way to do this through settings, but thanks to this thread we can see that it is possible via a small change to the active theme. The modification hooks into phptemplate_breadcrumb(), it removes the existing primary breadcrimb (’Home’) and then inserts a replacement with the new text.

 

So to make the change, edit your theme’s template.php file, and search for the function called:

 

phptemplate_breadcrumb()

rename it to:

original_phptemplate_breadcrumb()

Then paste in the following, changing ‘New Home Text’ to what ever you want your ‘Home’ breadcrumb to be called.

function phptemplate_breadcrumb($breadcrumb) {   if (!empty($breadcrumb))   {     // remove the exisitng Home link     $old_home_link = array_shift($breadcrumb);     // insert the new link     array_unshift($breadcrumb,                    l(t(‘New Home Text’), ‘<front>’));     // Get the original function to     // output the breadcrumb     return original_phptemplate_breadcrumb($breadcrumb);   } }

With this theme modification in place the breadcrumbs should display with the new text in place, bit of a pain but at least it’s do-able!

 

 

Hats off to gwen for the tip & code!