Our blog

 

Check this out:

http://jsfiddle.net/ – handy :)

More Reading:

  • no matching posts found..


 

If you use the Magento event / observer system for extending Magento (if you don't you should) then you will find this little script handy for parsing out all of the events in the latest (eg Magento 1.4) version of Magento.

This is a Linux shell script so either use it on your server or if you run a decent desktop OS you should be able to run it on your desktop.

There are two parameters you need to define.

CODE:
  1. #!/bin/bash
  2. # Find all Magento Events, include file names, line numbers and the preceding 6 lines of code
  3.  
  4. #Please define these two
  5. ABSOLUTE_PATH_TO_MAGENTO_ROOT=/home/joseph/Projects/Magento/
  6. ABSOLUTE_PATH_TO_OUTPUT_FILE_INC_FILE_NAME= /home/joseph/magentoEvents.txt
  7.  
  8. #here is the command
  9. find $ABSOLUTE_PATH_TO_MAGENTO_ROOT  -name "*.php" | xargs -L10 grep -n -B 6 "dispatchEvent" .> $ABSOLUTE_PATH_TO_OUTPUT_FILE_INC_FILENAME
  10.  
  11. # save this file as magentoevents.sh
  12. # then do command: chmod +x magentoevents.sh
  13. # then to run, do command: ./magentoevents.sh

More Reading:



 

http://symfony-reloaded.org/, a quick run down on the latest version of Symfony.

It's looking really good, especially exciting is the promise of massive performance advantages (3 times faster than Zend!).

More Reading:



 

If you have any issues with the default Flash based image uploader for the Magento admin, check out this extension which replaces it with a much slicker, faster and less - well flash - image uploader.

http://www.magentocommerce.com/extension/1756/no-flash-uploader

nice :)

More Reading:



 

If you use table prefixes (you should) but you need to get the name of a table without having to hardcode in the table prefix, use this little snippet:

PHP:
  1. $tableName = Mage::getSingleton('core/resource')->getTableName('catalog_product_option');

More Reading:



 

A nice little shell script for quickly install WordPress on Linux::

#!/bin/bash
wget http://wordpress.org/latest.zip
unzip latest.zip
cp -rf ./wordpress/* ./

More Reading:



 

1] Download the latest version of ( XAMPP For Linux ) here
2] Install it. To install lampp, extract and put in /opt directory. Remember to extract it as ROOT.
3] Download Development package from same site.
4] Extract it, copy and paste "include" folder from Development package to /opt/lampp directory. ( This package would use for compiling XDebug source )
5] Run command;  sudo /opt/lampp/bin/pecl update-channels. this would update the pecl channels database at your local pc.
6] Run command sudo /opt/lampp/bin/pecl install Xdebug. And wait for finishing the process.
7] Now xdebug.so file has been created in /opt/lampp/lib/php/extensions/ directory.
8] Now Open the file php.ini and add the line zend_extension="/opt/lampp/lib/php/extensions/path_to_xdebug.so". at the end of file.
9] Restart Lampp & Check enabled or not using phpinfo();

TESTING INSTALLATION::
======================

1] Ensure LAMP is started/running (i.e apache, mysql)
2] Open your favorite browser i.e FireFox
3] Type http://localhost (if all is well this should take you to the Xampp homepage and ask you to select your prefered language!. This ensures your htdocs web folder is reachable and web server is working fine.)
4] Type http://localhost/phpmyadmin (if all is well this should take you to the mysql admin homepage!. This ensures your mysql database is configured correctly and ready is ready to go!)

NOTE:
=====
If the installation is not done as root, you may experience few security issues while testing your installation:

- http://localhost - may throw errors relating to permissions while trying to open files notably 'lang.tmp.php'
- http://localhost/phpmyadmin - may throw errors relating to not been able to read 'config.php' and also connection to mysql database may fail.

Solution:
=========
Re-Install lampp as root to eliminate such problems.

Thanks to: http://www.webhelp2u.com/article/install-xdebug-on-lampp

More Reading:



 

If you need to work collaboratively on some Javascript then check out JS Bin

It's just like pastebin, but with Javascript compatability, handy.

More Reading:



 

If your shiny new Magento 1.4 is displaying this error message at the bottom of the page then you might want to apply this fix.

Fatal error: Exception thrown without a stack frame in Unknown on line 0

The solution is to comment out a small section of code in

app/code/core/Mage/Core/Model/Cache.php

line 180

PHP:
  1. /*try {
  2.                     if (class_exists($type, true)) {
  3.                         $implements = class_implements($type, true);
  4.                         if (in_array('Zend_Cache_Backend_Interface', $implements)) {
  5.                             $backendType = $type;
  6.                         }
  7.                     }
  8.                 } catch (Exception $e) {
  9.                 }*/

found the solution here:
http://www.magentocommerce.com/boards/viewthread/76782/

More Reading:



 

The latest and greatest version of Magneto has just been released (last Friday).

This release includes some great new features like WYSIWYG editors on the admin side, performance improvements and loads more.

Here's what has been added:

  • Implemented 3D Secure credit card validation (Visa and Mastercard)
  • Full reimplementation of PayPal modules, includes lot of new functionality and numerous bugfixes
  • Full review of frontend themes, introduced design cross-package fallback and the base/default theme. Includes SEO and accessibility enhancements. Changes are oriented to dramatically reduce themes maintenance.
  • Added ability to define arbitrary cache backends
  • Optimized performance of sales reports, added new sales report types
  • Added image/media uploader/browser, that can browse entire media folder
  • Optimized performance of search indexer
  • Made order processing workflow more informative and severe
  • Reimplemented 404 and report pages, introduced 503 page, specifically for maintenance purposes
  • Improved javascript files merging, added CSS files merging
  • Added Widgets functionality, added several widgets out of the box
  • Added Custom Variables functionality
  • Added lot of new System Configuration options
  • Improved order placement reliability
  • Added WYSIWYG for CMS and Catalog
  • Optimized cache initialization during startup
  • Optimized export from grids in admin area
  • Improved tax and discount totals calculation
  • Replaced admin notification flash popup into a simple HTML overlay
  • Implemented product and category URLs per store view
  • Added ability to configure entry point using virtualhost environment configuration, rather than creating another physical entry point
  • Optimized simple product view without custom options

More Reading: