Since a couple of days I had been playing around with various shipping method modules and installing & uninstalling them to see which fit the requirements. Then when I tried to ship an order from the backend, I would just get the error and on checking the logs, saw the error message "Invalid model for shipping method:" with a huge unintelligible stack trace.
I suspected foul play between my custom theme and the various shipping methods modules that I had tried so I removed all of them and then tried but got the same result. On reinstalling the modules, I noticed that the configuration data was being pre-populated automatically and this got me thinking.
I poked around in the database and found that the configuration info is stored in the table core_config_data. In this table, I saw rows of data for all the modules that I was playing around with!
I deleted all these errant rows carefully, then cleared Magento cache and tried again and eureka! The order was processed & completed successfully!
Friday, February 25, 2011
Wednesday, February 23, 2011
Set Default Quantity to 1 in Magento
By default, the quantity box on the product page is always blank and that is not very user friendly. It would be great if the box would be set to "1" by default .
Now this can be done without any programming - only through configuration changes in the backend as follows:
Abracadabra! The work is done - now products page quantity box is defaulted to 1.
Now this can be done without any programming - only through configuration changes in the backend as follows:
- Go to Admin Panel -> System -> Configuration -> Inventory-> Product Stock Options from the Menu
- Click on Add Minimum Qty button (next to Minimum Qty Allowed in Shopping Cart option)
- Choose Customer Group: ALL GROUPS as you want this to be applied to all users
- Enter 1 for Minimum Qty
- Save Config
Abracadabra! The work is done - now products page quantity box is defaulted to 1.
Saturday, January 22, 2011
Flying with Froyo on Vibrant
Froyo is now available for T-Mobile Samsung Galaxy S Vibrant, however to really get it, you need to have the charged to more than 75% and have the Samsung Kies Mini downloaded & installed. This release is not OTA and the full fledged Samsung Kies software dos not work for USA hence the Mini is required.
Downloading Kies downloader was quite fast, however the actual installer download took some time but the install was a breeze. Hooked up my phone to the laptop and was told that an update is available and I started it. The downloading took about 15 minutes and then the actual install another 7 minutes. Here are the steps:
Downloading Kies downloader was quite fast, however the actual installer download took some time but the install was a breeze. Hooked up my phone to the laptop and was told that an update is available and I started it. The downloading took about 15 minutes and then the actual install another 7 minutes. Here are the steps:
- Setup Vibrant as follows:
- Go to Menu > Settings > Applications and check the box beside "Unknown Sources"
- Go to Menu > Settings > Applications > USB Settings and select "Ask on connection"
- Download Samsung Kies Mini from Samsun website.
- Install Kies Mini
- Ensure that the battery on your phone is more than 75% charged
- Take a backup of your data from the phone
- Start Kies Mini and connect the phone to the PC
- On phone prompt, choose "Samsung Kies" as the connect method on the phone
- Kies will show that an update is available, click on the "Phone Upgrade" button on the left
- A disclaimer Caution screen pops up - Read the Caution statements
- Click the checkbox for "I have read and understood...", and click the Upgrade button
- Kies will download the upgrade from the server - this took about 15 minutes for me
- Once the files are downloaded, Kies will start the upgrade process and the phone screen will change to reflect this with icons and info of what step is being performed
- After the installation finishes, click on the "Ok" button in the last screen to complete it.
- Now the phone should reboot by itself and now you can disconnect your phone from the PC
My phone just kept waiting for about 5 minutes in the initial screen that displays the Vibrant logo and then came up.
Here are the differences that I see right off the bat:
- Menu icons are colorful
- Phone seems to be a bit faster than before
- T-Mobile TV is now available - this is a pad service so not that interesting for now
- Option to add Samsung widgets on the home screen using the long press is not available any more
- WiFi calling is now available - but this still uses plan minutes so is useful only in places where T-Mobile or any other roaming GSM signal is not available, but a Wi-Fi signal is available.
- There is a new app for Google Search
- USB / Wi-Fi tethering is now available from Settings > Wireless and network > Mobile AP and Settings > Wireless and network > Tethering
- In the pull down menu from the top notification bar, there is a new icon to control Auto-Rotation
Here are the current version numbers:
- Firmware version: 2.2
- Baseband version: T959UVKA6
- Kernel version: 2.6.32.9
- Build number: FROYO.UVKA6
Yay!!! Finally on Froyo!!!
Friday, January 21, 2011
Android 2.2 Froyo now available on T-Mobile Samsung Galaxy S
Good news !!! Finally Android 2.2 Froyo is now made available to T-Mobile Samsung Vibrant Galaxy S users after months of waiting.
Sad part is that this update is not available over the air (OTA) so the user needs to download Samsung Kies Mini from Samsung website and install it. This upgrade includes Wi-Fi calling, USB / Wi-Fi tethering, and various software enhancements. The update is build number T959UVKA6 also known as KA6.
The full instructions for the update are available on the T-Mobile site.
Note that AT&T Samsung Captivate is still not ready for Froyo as the update is only a maintenance release as per Samsung website.
Sad part is that this update is not available over the air (OTA) so the user needs to download Samsung Kies Mini from Samsung website and install it. This upgrade includes Wi-Fi calling, USB / Wi-Fi tethering, and various software enhancements. The update is build number T959UVKA6 also known as KA6.
The full instructions for the update are available on the T-Mobile site.
Note that AT&T Samsung Captivate is still not ready for Froyo as the update is only a maintenance release as per Samsung website.
Tuesday, December 21, 2010
11 Free Productivity Tools for the office
Here's a list of 11 Free Tools to increase productivity at Work:
Other good free softwares that I also considered were:
Please let me know if you see other good free software worthy of including in the above list!
- 7-Zip:
Category: Compression/Decompression
Details: Compression utility that can handle almost all possible formats
URL: http://www.7-zip.org
- Eclipse:
Category: IDE
Details: Very popular IDE that supports a vast array of languages and configurations
URL: http://www.eclipse.org
- FileZilla:
Category: FTP Client (& Server)
Details: FTP Client and server with lots of options
URL: http://filezilla-project.org
- PuTTY:
Category: Telnet/SSH
Details: Very simple but powerful Telnet/SSH client
URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/
- PuTTy Connection Manager:
Category: Telnet/SSH
Details: Allows docking of multiple PuTTY session windows as Tabs and allows user to create a database of connections that includes user names, passwords, script to run after login, etc.
URL: http://puttycm.free.fr
- Notepad++:
Category: Editor
Details: Very simple, but powerful and full featured editor that supports syntax highlighting, plug-ins, macros, regexes, etc.
URL: http://notepad-plus-plus.org
- OpenOffice:
Category: Office Software
Details: Full featured replacement for the cos$tly M$ Office Suite of products. Includes software for word processing, spreadsheets, presentations, graphics, databases and more.
URL: http://www.openoffice.org
- PDFCreator:
Category: Office Software
Details: Create PDF files from any application.
URL: http://www.pdfforge.org/pdfcreator/
- VirtualDimension:
Category: Desktop Manager
Details: Fast and full-featured virtual desktop manager that allows you to create virtual desktops on Windows just like X-Win.
URL: http://virt-dimension.sourceforge.net
- VistaSwitcher:
Category: Task Manager
Details: Replaces the default Windows Alt-Tab dialog with a nice box that shows a list of all running tasks, with their names and preview snapshots, and enables the user to take actions on them using the mouse and keyboard shortcuts.
URL: http://www.ntwind.com/software/vistaswitcher/
- WinMerge:
Category: Development
Details: Visual diff and merge tool for Windows that can compare both folders and files
URL: http://winmerge.org
Other good free softwares that I also considered were:
- PSPad:
Category: Editor
Details: Another powerful and full featured editor that supports syntax highlighting, plug-ins, macros, regexes, etc.
URL: http://www.pspad.com
- PDFReDirect:
Category: Office Software
Details: Another simple software to create PDF files.
URL: http://www.exp-systems.com
- DiffMerge:
Category: Development
Details: Visual diff and merge tool for Windows, Mac OS X and Linux that can compare both folders and files
URL: http://www.sourcegear.com/diffmerge/
- Toad Free:
Category: Database Access
Details: Free version of the powerful Toad for Oracle with a few features disabled.
URL: http://www.toadworld.com/Freeware/tabid/680/Default.aspx
- SQLDeveloper for Oracle:
Category: Database Access
Details: Oracle client provided by Oracle
URL: http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
Please let me know if you see other good free software worthy of including in the above list!
Friday, October 8, 2010
S/W Update for T-Mobile Samsung Vibrant Galaxy S
This morning, T-Mobile pushed a software update to my Samsung Vibrant Galaxy S - however, the phone would not install it as the battery level was lower than 75%!
After the install, here are the major changes that I noticed:
After the install, here are the major changes that I noticed:
- HD Camcorder is now available in the list of applications
- Media Hub now works but the previews work only on Wi-Fi :( This should have been allowed on 3G - I would sure like to watch the preview while traveling on the bus/train!
- Task Manager app is provided, however, I did not find it very useful as it did not show many of the running applications which the Advanced Task Killer free app shows.
- Firmware version: 2.1-update1
- Baseband version: T959UVJI6
- Kernel version: 2.6.29
- Build number: ECLAIR.UVJI6
Tuesday, October 5, 2010
Created a simple TTS app with App Inventor
With my Samsung Vibrant phone, even though I am still struggling with connectivity to Ubuntu 9.04, I was able to connect very smoothly to Windows7!!!
So to test it out, I created a simple app that has a text box and a button. On pressing the button, the text that was entered in the text box is spoken out aloud by the app. If there is no text in the box, then a default message is read out.
To create this first app, it took only 2 minutes!!!
This shows that the App Inventor is pretty good and quite promising.
However, there are a few cons as well - the created software when installed on the phone, takes a huge amount of space; 3.55Mb to be precise for this simple app! Also, I cannot share this app with others or upload it to the Android Marketplace - it can only be shared with others who have an App Inventor account. Well, you can't have your cake and eat it too!
So to test it out, I created a simple app that has a text box and a button. On pressing the button, the text that was entered in the text box is spoken out aloud by the app. If there is no text in the box, then a default message is read out.
To create this first app, it took only 2 minutes!!!
This shows that the App Inventor is pretty good and quite promising.
However, there are a few cons as well - the created software when installed on the phone, takes a huge amount of space; 3.55Mb to be precise for this simple app! Also, I cannot share this app with others or upload it to the Android Marketplace - it can only be shared with others who have an App Inventor account. Well, you can't have your cake and eat it too!
Monday, October 4, 2010
Unable to connect Samsung Vibrant to App Inventor on Ubuntu9.04
The good news is that almost 2.5 months after I applied for access to Google Android App Inventor, I got the access on 1st October.
Now the bad news is that I am unable to connect my Samsung Galaxy S Vibrant to App Inventor on my machine running Ubuntu 9.04. Here is what I have tried till now after installing App Inventor Extras software for Linux:
I ensured the below settings were done before connecting the phone:
On connecting the phone, I see the USB Icon which mentions that USB is connected and also a Red exclamation alert icon mentioning that USB debugging is connected. I also ensured that OpenJDK is also not installed on my machine as that is known to cause clashes with Android SDK.
Then I opened a shell, logged in as root (using sudo -s) and then did the following:
Now rebooted the machine and again with sudo -s, ran the following commands:
I tried the above sequence of steps with these versions of UDEV rules as well, but to no avail:
and
Here is the log from the Java console:
I am at a loss as to what else to check as all these steps are a compilation of the knowledge in the google groups as well as other blogs on the topic. If anyone has any ideas/pointers/suggestions, please let me know - Thanks.
Now the bad news is that I am unable to connect my Samsung Galaxy S Vibrant to App Inventor on my machine running Ubuntu 9.04. Here is what I have tried till now after installing App Inventor Extras software for Linux:
I ensured the below settings were done before connecting the phone:
- Settings > Applications > Unknown sources is checked
- Settings > Applications > Development > USB debugging is checked
- Settings > Applications > Development > Stay awake is checked
- Settings > Sound and display > Orientation is un-checked
On connecting the phone, I see the USB Icon which mentions that USB is connected and also a Red exclamation alert icon mentioning that USB debugging is connected. I also ensured that OpenJDK is also not installed on my machine as that is known to cause clashes with Android SDK.
Then I opened a shell, logged in as root (using sudo -s) and then did the following:
# lsusb | grep 'Sam'
Bus 001 Device 003: ID 04e8:681c Samsung Electronics Co., Ltd
# vi /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="681c", MODE="0666"
Now rebooted the machine and again with sudo -s, ran the following commands:
# /etc/init.d/udev restart * Stopping kernel event manager... [ OK ] * Starting kernel event manager... [ OK ] # cd /usr/google/appinventor-extras/commands-for-Appinventor # ./adb kill-server # ./adb devices * daemon not running. starting it now * * daemon started successfully * List of devices attached # ./adb usb error: device not found
I tried the above sequence of steps with these versions of UDEV rules as well, but to no avail:
# vi /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
and
# vi /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb_device", SYSFS{idVendor}=="04e8", MODE="0666"
Here is the log from the Java console:
Creating the REPL controller
Changing the REPL communication button text to Communicating...
Disabling REPL communication button.
********* Actually invoking CreateAndSend
Restarting repl controller (true)
ReplController sending (begin (require com.google.youngandroid.runtime) (setup-repl-environment "<<" ":" "@@" "Success" "Failure" "=="">>" '((">>""&2")("<<""&1")("&""&0"))))
**** devicesPluggedIn: 0 isPluggedIn: false connectionHappy: false
************************** commIndicator was unexpectedly
connected!!!! COMMUNICATING
Changing REPL communication button to Connect.
Re-enabling REPL communication button.
Communication with REPL failed: java.io.IOException: App Inventor
cannot find any phones.
Please plug in a phone and try again.
I am at a loss as to what else to check as all these steps are a compilation of the knowledge in the google groups as well as other blogs on the topic. If anyone has any ideas/pointers/suggestions, please let me know - Thanks.
Wednesday, September 22, 2010
How to use Syntax Highlighter 3 in Blogger
Syntax Highlighter version 3.0.83 has been released and there are quite a few changes in the way things work now. I realized this when the rendering on this site broke after I modified it to use the latest release. So, here is the steps required to setup the "hosted" version of the latest Syntax Highlighter (version 3.0.83) and integrate with your Blogger/Blogspot blog.
In the above code, I have put in brushes for the languages that I use frequently. Modify the brushes according to your needs - check the full list of supported brushes here and use whichever you need.
Apart from these configuration changes, you can change the theme as well. SyntaxHighlighter comes bundled with 7 themes and I personally like the default one. However, you can choose the theme that you fancy the most by simply replacing the name of the theme in this line:
So you can replace shThemeDefault in the above line with any one of the following themes:
Installation
- Navigate to Dashboard > Design > Edit HTML
- Backup the current template by clicking on the link Download Full Template
- In the textarea, press CTRL+F to find the code </head>
- Copy the below code and paste it just above
<!-- Syntax Highlighter Additions START --> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/> <script language='javascript' type='text/javascript'> SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.all(); </script> <!-- Syntax Highlighter Additions END -->
- Preview your changes and make modifications as required
- Save the template
In the above code, I have put in brushes for the languages that I use frequently. Modify the brushes according to your needs - check the full list of supported brushes here and use whichever you need.
Configuration
Apart from choosing the brushes that you need, there are other configuration parameters that you can setup as well. Check out the details here. More useful ones are the ones that allow you to change the starting line number, highlight specific lines, disable auto-linking of URLs and html-script option to highlight mixture of HTML/XML code.Apart from these configuration changes, you can change the theme as well. SyntaxHighlighter comes bundled with 7 themes and I personally like the default one. However, you can choose the theme that you fancy the most by simply replacing the name of the theme in this line:
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
So you can replace shThemeDefault in the above line with any one of the following themes:
- Django - shThemeDjango
- Eclipse - shThemeEclipse
- Emacs - shThemeEmacs
- Fade to Grey - shThemeFadeToGrey
- Midnight - shThemeMidnight
- RDark - shThemeRDark
Usage
To use it in your blog post, there are a couple of things that need to be done.- Escape all code by replacing any occurrences of:
- < with <
- > with >
- Enclose the escaped code between <pre class="brush:[brush_name];[optional_params]"> and </pre>
- Setup the proper brush name (based on the code being highlighted) in the opening pre tag. Using the correct brush will ensure proper highlighting of the code
New Features in 3.0.83
The new version brings with it quite a few new features - here's an overview:Auto-Loading of Brushes
Now all the brushes need not be pre-loaded on every page. You can load only the required brushes on the pages that need those brushes. Use the shAutoloader.js and then load the brushes as required
For more details on using this feature, check out the instructions here. Note that this might not be so useful for a blogger account as we do not modify the javascript for each page/post.No usage of Flash
Earlier, Flash was being used to copy the code to clipboard. This has now been removed and a simpler & better way to do this has been implemented. Also, the user can now simply double-click anywhere in the code to select it and then use the standard CTRL+C to copy it.
Code copy without line numbers
Now the copied code excludes line numbers and the extra leading tabs/spaces to make it usable directly - very convenient!
Add Title
Now you can add a title to the code block by title="[title_name]"
More under the hood
More improvements and changes under the hood like better CSS support, easier integration with CommonJS & node.js, etc.Monday, September 20, 2010
Search & replace text in multiple files in Unix
To search a particular string in multiple files and replace all occurrences with a new string, you can use the following handy Perl one-liner:
Here, the -p switch wraps the script inside a loop, executing once for each input file which is denoted by the last arguement *.php.
The -i switch allows inline modification of the file; you can optionally save a backup of the original file by providing the backup file name template after this switch as -i *.bak.
The -e switch executes the following piece of code.
The string of code 's#search_string#replace_string#g' searches for search_string and replaces it with replace_string globally. You can use any other character like "/" to delimit the search & replace strings. Remember to replace the place-holder text with the actual text and also escape it properly.
perl -pi -e 's#search_string#replace_string#g' *.php
Here, the -p switch wraps the script inside a loop, executing once for each input file which is denoted by the last arguement *.php.
The -i switch allows inline modification of the file; you can optionally save a backup of the original file by providing the backup file name template after this switch as -i *.bak.
The -e switch executes the following piece of code.
The string of code 's#search_string#replace_string#g' searches for search_string and replaces it with replace_string globally. You can use any other character like "/" to delimit the search & replace strings. Remember to replace the place-holder text with the actual text and also escape it properly.
Subscribe to:
Posts (Atom)
loading..