Friday, February 25, 2011

Fix Magento Invalid model for shipping method

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!

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:

  1. Go to Admin Panel -> System -> Configuration -> Inventory-> Product Stock Options from the Menu
  2. Click on Add Minimum Qty button (next to Minimum Qty Allowed in Shopping Cart option)
  3. Choose Customer Group: ALL GROUPS as you want this to be applied to all users
  4. Enter 1 for Minimum Qty
  5. Save Config

Abracadabra! The work is done - now products page quantity box is defaulted to 1.


Related Posts Plugin for WordPress, Blogger...