Magento 1.4 and TBT Enhanced Grid 1.2

If you have just upgraded to Magento 1.4.0.1 and installed the latest TBT enhanced grid version 1.2 and you are encountering an error regarding the PDO::quote expecting a String instead of an object, here is the solution:

1) Open up app\code\community\TBT\Enhancedgrid\Block\Catalog\Product\Grid.php

2) Goto line 171 and find
private function loadColumnOptions($attr_code) {
$attr = Mage::getModel(’eav/entity_attribute’)->loadByCode(’catalog_product’, $attr_code);
if(sizeof($attr->getData()) > 0) {
if($attr->getFrontendInput() == ’select’) {
$values = Mage::getResourceModel(’eav/entity_attribute_option_collection’)
->setAttributeFilter($attr->getId())
->setStoreFilter($this->_getStore()->getId(), false)

the bold code is what you need to add because the store filter takes the store ID instead of the store object. What happens on the backend is Magento basically takes the value and makes it part of an SQL statement so an object doesn’t really make sense.

Hope this helps anyone stuck with this issue.

Funny Viral Video (Tackfilm)

Had a big laugh out of this video. Try it out at http://en.tackfilm.se/

You upload your photo and voila! See yourself in an inspiring video.

Looking for GWT developers

I have a friend looking for a GWT developer in Singapore. If you know of anyone, or think you are skilled in this area. Please post a comment below and I will get back to you.

Quick tip: Find out current php script executing user

Got this quick snippet of code from http://www.davidmorison.com/node/23 on how to find the current php script executing user. Useful to determine if suexec is running properly.

passthru("whoami");
?>

How to show error description in Magento 1.4

Simply go to your magento installation folder, locate the errors folder and you will find local.xml.sample, simply duplicate the file and rename it local.xml

Fashion: SHIRTPAL Singapore Launch

SHIRTFest! Singapore

As some of my friends might have known, I had been working on a project called SHIRTPAL which is an online fashion retail venture dealing with custom tailored dress shirts.

Today I am happy to announce that we are having our first event this weekend on the 6th February, Saturday in Singapore where we are inviting people to come down to have their measurements taken by our professional tailor from Singapore and also our Bangkok tailor who has flown in for the event.

We also thought it would be nice to share some knowledge on dress shirts like what to wear and how to do color coordination with your pants and ties etc. so we put together a 15 minutes short seminar (crash course) to get anyone started on custom dress shirts.

Shirt prices are based on their fabric and generally ranges from $55 – $75 with some premium ones at $95. We are giving a $10 discount at the event for any 2 shirts bought. SHIRTPAL’s fabric sources come from Bangkok and Japan.

More details and appointment booking information are available on the events page at http://sg.shirtpal.com/singapore

Try out the customization tool at http://www.shirtpal.com/unique

p.s. Drop me a note if you are coming :)

Virtualmin MySQL Backup using strftime

If you are trying to make MySQL backups in Virtualmin that create individual time-based folders like

12-11-2009
13-11-2009

You can turn on strftime substitution in the module config for MySQL in Webmin. This is off by default.

Here is the screen shot:

Capture

Cheers and happy new year to everyone :)

Pictionary Singapore

Pictionary Singapore is having a charity sale for the Children’s Cancer Foundation.

If you would like to own numbered sets of the limited Singaporean edition and do your part for charity, follow these links to eBay to bid for the uniquely Singaporean sets:

0001
0002
0003
0004
0005
0006
1788
* Those are the serial number of the sets

Facebook: Sending App to user notifications through Javascript

If you refer to facebook’s documentation at http://developers.facebook.com/docs/?u=facebook.jslib.FB.ApiClient.notifications_send, you will notice that there are no parameters to specify an app_to_user notification type. To achieve this, you have to use the callMethod from the apiClient.

Here is a code snippet on how this can be achieved in a Facebook Connect site.

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
 <script type="text/javascript">
	FB_RequireFeatures(["XFBML"], function(){ 
		FB.Facebook.init("API KEY", "relative_path_to/xd_receiver.htm"); 
		FB.Facebook.apiClient.callMethod("notifications_send",{to_ids:[000000000],notification:"hello",type:"app_to_user"},function(){alert("notification sent");});	
	});
</script>

This code sends a notification from the app to the specified user ids. When the notification is done, a javascript alert box tells us the task is completed.

Multitouch slides for TAC09 coming soon

The Actionscript Conference has finally come to an end. It was a great conference and I got to meet a lot of people that I haven’t seen in some time and got to know even more cool people this time round.

I will be posting the slides for my multi touch session at TAC09 on this blog very soon.

Edit: The slides have been uploaded here

The Actionscript Conference – Multi-Touch in Flash

Cheers and keep a lookout for Flex Usergroup (http://fug.sg) meetups very soon ;)