Magento Themes and Magento Extensions

Magento L.E.S.S.

Share
Posted on June 28th, 2011 | Posted by admin

Sometimes its all about title, right?! So, what is LESS? Well, its my fancy acronym for something utterly simply but very practical. It stands for (L)ocalhost (E)mail (S)erver (S)imulator. Basically its neither email server or simulator in the real sense of word. Its just a little trick you can apply on the “app/code/core/Mage/Core/Model/Email/Template.php” file to compensate for lack of the local email server in your development environment while developing for Magento.

Magento hadles lot of email sending, for various cases such as: Register new customer, New order created, Forgot password, etc. One of the downside of not having email server set in your local environment is that you cannot easily test all the transactional emails Magento handles. So if you are assigned task of lets say customizing email templates, possibly adding new variables to email templates, etc., then you need a good testing ground.

Works out of the box!

Share
Posted on June 27th, 2011 | Posted by admin

Every now and then someone in the social web world asks for eCommerce solution recommendation. One of the awesome trends I noticed in these answers is the answer of a “happy customer” that goes something like this:

I tried XYZ and it’s awesome! You should try it two. I don’t understand any of this HTML, php, CSSS mumbo-jumbo, but this XYZ cart works out of the box!

The sad part is, people tend to fall for that. What’s bad with it “working out of the box” you ask? Well, most of the open source carts I ever saw work “out of the box”, including Magento. Certain features, however, require additional set-up, and some even advanced custom development.

Did you ever ask yourself how come someone goes through years and years of learning all of this HTML and php mumbo-jumbo if they could simply use the “works out of the box” solution for everything?

Keeping your Magento fit with built in profiler

Share
Posted on June 27th, 2011 | Posted by admin

Default Magento installation has this great feature called “Profiler” that can play important role with your custom Magento development. This feature is meant to be be used for developer only. If used properly it can help you get valuable information of certain code parts during development.

To turn the “Profiler” on you have to do two things:

  • Login to your Magento admin, go to “System > Configuration > Advanced > Developer > Debug > Profiler > Yes
  • Open your root index.php file of your Magento installation then look for commented“Varien_Profiler::enable();” part and uncomment it. If there is no “Varien_Profiler::enable();” then place it somewhere before “Mage::run($mageRunCode,
  • Automated testing of Magento with Watir

    Share
    Posted on June 27th, 2011 | Posted by admin

    Few months ago I was attending this web conference where among various topic one covered the “Automated testing”. To be honest I never looked into any “automated testing” tools until then. This was the first time I heard about this tool called Watir. Shortly put, Watir (pronounced water), is an open-source (BSD) family of Ruby libraries for automating web browsers.

    First thing some of you might notice is that Watir is written in Ruby, and your Magento is written in PHP so how does this relate? Actually it does not. Meaning Watir is not one of those include it in your script then use it tools. Basically it does not interact with your code whatsoever. Consider it as fully independent/separated app that runs desired browser and simulates real user sitting in front of the browser doing all sort of input text filling and form submitting, link clicking etc. Watir also checks results, such as whether expected text appears on the page.

    How to extend Magento core controller?

    Share
    Posted on June 27th, 2011 | Posted by admin

    Hi, today I’ll show you how to edit Magento’s core module without messing with core files themselves, or “the right way of doing things”.:D

    First of all, I chose Magento’s Customer module and its Account controller as an example. First, you need to find it in Magento’s Core folder (full path: “app/code/core/Mage/Customer/controllers/AccountController.php“).

    First step is to create and place folders in your module that will override Magento’s core controller. On to that part:

    1. First, create this file in same folder structure:app/code/local/Inchoo/Coreextended/controllers/Frontend/Customer/AccountController.php. (of course, you can always replace Inchoo with desired namespace, and Coreextended with some other module name, but you’ll need to edit the rest accordingly).
    2. Then create xml for our module located here:app/code/local/Inchoo/Coreextended/etc/config.xml (same analogy as above applies)
    3. And finally, create this file app/etc/modules/Inchoo_Coreextended.xml.