Category Archives: Web Development

Eclipse Indigo Software update URLs

Update URLs for the eclipse plugins I need. Subclipse: http://subclipse.tigris.org/update_1.8.x JBoss Tools: http://download.jboss.org/jbosstools/updates/development/indigo/ JBoss VM Arguments: -Xms256m -Xmx512m

Posted in Web Development | Tagged , , | Leave a comment

Fetch a collection by custom filter in Magento

Example of fetching categories in Magento and filtering by a custom attribute: $categories = Mage::getModel(’catalog/category’)->getCollection(); $categories->addAttributeToSelect(’name’); $categories->addAttributeToFilter(’featured_category’, 1);   foreach($categories as $key => $category) { echo $category->getName(); }

Also posted in Magento | Tagged | Leave a comment

WordPress and OSX Lion local install sluggish performance fix

A mirror of a wordpress installlation on my Macbook ran very sluggish. I was using OSX Lion. The fix was to optimise all the MySQL database tables for the installation! Simple!

Posted in Web Development | Tagged , , | Leave a comment

Disable or customise the tap highlight colour on mobile safari.

When you tap a link, button, or other active element with mobile safari, a brief dark grey highlight appears indicating the element was tapped. The colour of the highlight can be customised, or disabled with the following CSS rule. -webkit-tap-highlight-color: rgba(0,0,0,0); // disable

Also posted in Mobile Web | Tagged , , , | Leave a comment

Custom checkbox and select element styling in webkit browsers.

You can fully customise the style of checkboxes, radio buttons, select elements etc.. in webkit browsers. An example of a custom checkbox is show below. The key CSS rule is -webkit-appearance: none;. This then allows you style the element as a normal block element. Been webkit only, its safari and chrome browsers only at the [...]

Posted in Web Development | Tagged , , | Leave a comment

ExtJS 3.3 error this.addEvents is not a function ‘statesave’

If you get something similar to the above error message in firebug while developing with Ext 3.3, a common cause if you have tried to create a component when omitting the new keyword. var dv = Ext.DataView({…}); // incorrect   var dv = new Ext.DataView({…}); // correct

Posted in Web Development | Tagged , | 1 Comment

Delete all test order data from Magento

These commands can be pasted into PHPMyAdmin, or some similar client. Tested on Magento version 1.4.2.0 SET FOREIGN_KEY_CHECKS=0;   TRUNCATE sales_flat_order; TRUNCATE sales_flat_order_address; TRUNCATE sales_flat_order_grid; TRUNCATE sales_flat_order_item; TRUNCATE sales_flat_order_status_history; TRUNCATE sales_flat_quote; TRUNCATE sales_flat_quote_address; TRUNCATE sales_flat_quote_address_item; TRUNCATE sales_flat_quote_item; TRUNCATE sales_flat_quote_item_option; TRUNCATE sales_flat_order_payment; TRUNCATE sales_flat_quote_payment; TRUNCATE sales_flat_shipment; TRUNCATE sales_flat_shipment_item; TRUNCATE sales_flat_shipment_grid; TRUNCATE sales_flat_invoice; TRUNCATE sales_flat_invoice_grid; TRUNCATE sales_flat_invoice_item; [...]

Also posted in Magento | Leave a comment

Fix the Worldpay Magento Extension for Magento v1.4 and newer.

There is a community extension developed by Phoenix Maiden for the integration of RBS Worldpay payment gateway into the Magento ecommerce system. However, due to changes in the templating engine, it doesn’t work for newer versions of Magento. This is how I fixed it for Magento version 1.4.2.0. I am using version 1.3.1 of the [...]

Also posted in Magento | Tagged | Leave a comment

Add ellipsis text truncating support for firefox

Create the following XML file: <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">   <binding id="none"> <content><children/></content> </binding>   <binding id="ellipsis"> <content> <xul:label crop="end"><children/></xul:label> </content> <implementation> <field name="label"> document.getAnonymousNodes( this )[ 0 ] </field> <field name="style"> this.label.style </field> <property name="display"> <getter> this.style.display </getter> <setter> if( this.style.display != val ) this.style.display= val </setter> </property> <property name="value"> <getter> this.label.value </getter> [...]

Posted in Web Development | Leave a comment

Text overflow with ellipsis on table cells without inner elements

Using the following CSS rules to have IE/webkit browsers apply an ellipsis on table cells text overflows is well documented. table { table-layout: fixed; } table td { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } However, you cannot set a width on the last column of the table if you want IE6/7 to correctly apply [...]

Posted in Web Development | Tagged , , | Leave a comment