egroupware : ext js is dominating the opensource community

No we will not enter the debate over the right to license freely available libraries : ext js javascript framework is a wonderful set of rich interface components that now power a great deal of opensource applications, including matuire egroupware frameworks such as sugar crm, tine 2.0, and the young and promising cojoon. Cojoon is a webmail and feed readers that has contributed a lot to ext js + zend framweork development  : it ambitions to become a full featured groupware. Tine 2.0, made by a group of devloperse whosplit from egroupware one year ago, have successfully come up with a news release last month. It now comes with a task manager and time tracking modules.

Magento product : display new product icon on product list

If you're working on Magento Ecommerce layouts and template design, you might have had a look at some nasty bugs, such the sort by price bug that's occuring on Magento's latest release (1.2..1). If you've spent a few minutes reading the fix for that bug on Magento's forums, you know what product collection means. Product Collection in Magento means an easy way of listing products for specific blocks : the big drawback is that product collections store arrays of products, and products inside don't always come fully loaded of details. That's why the few hacks below are useful to get the very basic attribute of every product on a decent ecommerce store : is that product new or not, and should I tell my customer which products are new ???


How to load new attribute : in Magento the new attribute is defined by two database fields (or attributes) : new from and new to .

  • Using these parameters in list.phtml requires you to modify the attribute set returned by the Mage_Catalog_Block_Product_List class to be found in app\code\core\Mage\Catalog\Block\Product\List.php
  • in function _getProductCollection, paste the following line
  • obvisouly this comes just after the product collection definition around line 75 of the List.php
    $this->_productCollection = $layer->getProductCollection();
  • your list.phtml template now has access to the data and checking that a product is new is as simple as performing PHP based date comparisons. We provide here basic comparison that will only work for products where both news_from and news_to have been filled. Add the following PHP code somewhere in your productcollection loop and the work is done !
    $now = date("Y-m-d");
    $newsFrom= substr($_product->getData('news_from_date'),0,10);
    $newsTo=  substr($_product->getData('news_to_date'),0,10);
    if ($now>=$newsFrom && $now<=$newsTo)
    {?> <h3 class="nouveauteProductList" >NEW PRODUCT!<h3><?};

This hack will be used on RueDeSiam's website (to be released next month,bookmark it now!)

ajaXplorer vs extplorer vs ajax file manager


We've not covered PHP based file explorers yet : they are indeed an essential component of any serious web application. When Ajax comes in the game, browsing, uploading and dealing with files is as easy online as it can be on your desktop. Thos willing to develop might be interested in extjs grid views, while application developpers looking for a working and bug free component have the choice of two or three opensource components available. All of them have the following features

  • access control
  • flash based and  / or FTP upload for big files 
  • file viewing / previewing
  • drag and drop folders

The choice is rought. For integration into a Wysiwyg editor such as FCKEDitor, we preferred the  Ajax file manager from PHPLetter because it is light and does not come with a huge infrastructure. For a quick access to web based files, we prefered ExtPLorer because the interface is based on the famous ext js library. As a new challenger on this area, ajaXplorer comes with a nice polished layout (picture above), a MP3 player (DEWPLayer) and a FLV player. But lacks translation into most languages.

Magento custom attributes display on product page

The flexibility created by the attribute feature in Magento allows limitless possibilities : vairous product types can be created and each of them can go with specific attributes, meaning specific form fields for the admin, that are inserted in the product view (template/product/view.phtml) for public display. The functions availble for each user defined attributes are very simple to guess : they are dynamically created for each attribute create using , as explained in the Pratthost developer zone blog...
Read more

Magento Specials prices

There is a feature that prsetashop comes with in its default installation, that is cruelly missing in Magento : the ability to display specials on the website, either on the margin of the home page and category pages, or inside a specifi page. But as always, there are already many discussions going on about this subject, and a community extension has been released, does the job fine but the whole subject  needs more investigation.

  • The Catalog Sale Item community extension comes with its own xml layout page,  phtml design template, and Mage_Catalog_Block_Layer_View / Mage_Core_Block_Template class extensions. It creates a new page that displays all products currently on sale.
  • Activecodeline publishes some code that extends the product list view to enable sorting products by specials price.
  • Inchoo publishes an alternative category list view that displays only products in promotion or with special price, to be selecetd from the category / custom design menu.
  • Magento's forum has a dedicated "special price products" discussion that exlains how to use the product collection with specific query attributes to select only proucts with special price.

Work in serenity with Tivoli Audio Music system


No this is not advertising, Yes I am thinking about a new category dedicated to sound applications and hardware. While developping websites involves high concentration that can be achieved in perfect silence the ambiance induced by nice music can surely participate in some unique creative and inspirationnal process that every professionnal needs at some stage. Anyway enough bullsh...t, hava look at this nice stereo system that will render ipod and other MP3 better that the file format can express. And like they say, it looks as good as it sounds. Finished with real wood that makes it look old, it comes with a CD player : this is really vintage stuff.