Widgets are small sets of code that you can add to your store. In widgets you can display a large variety of data: from simple links to dynamic code. You can find an example of a widget in one of my previous posts. (more…)
I remember the day when I was asked to develop my first Magento extension. I was scared as I knew what a beast Magento was and that developing modules is a challenging task even for very experienced PHP developers. There were no good sources of information back in the day – no books, no detailed tutorials, except for a very basic, Hello World extensions. I mean there were and still are articles where you can understand some basics, also you’re always allowed to view the source of Magento core and well-written community extensions to understand how to write an extension but still there was a gap and a lack of a practical, hands-on guide to building Magento modules from scratch. Then Magento published its own Magento Extension Developer’s Guide and few months ago, in September 2013, Packt Publishing released a new 128 pages book called Getting Started with Magento Extension Development by Branko Ajzele.
Who is the author?
He currently works as a Chief Technology Officer at Inchoo, based in Osijek, Croatia.
I think if you are going to work with Magento experience you would definitely find yourself reading an Inchoo’s blog and Branko’s great articles there.
Who this book is for?
This book is written for developers who have a few years of previous experience with PHP and some MVC PHP frameworks, who are trying to build their first Magento extensions. Though I think that if you did few projects with Magento, installed some free and paid extensions, looked through their code and are familiar with modules’ structure you can get from this book even more. The experienced Magento developers can also find some interesting information and gain some new knowledge.
What you will learn from this book (Content Overview)?
Chapter 1 – An Overview of Magento Extensions. In this chapter, Branko describes all needed directories, explains a lot of terms that will be needed for the development proccess such as Code Pools, Theme structure, XML Layouts, Models, Blocks, Helpers, controllers, in other words if you don’t have any previous experience with Magento you will be all set after this chapter.
Chapter 2, Building the Extension – Maximum Order Amount. In this chapter you will build a simple, yet not dummy, but a real-world extension using the event/observer pattern. The extension uses Magento sales_quote_save_before and displays ‘No single order allowed with amount over %s’ in Checkout Cart page if total amount is more than value, defined in Magento admin area.
Chapter 3, Building the Extension – Logger. This chapter describes a way to show all standard Magento logs in the admin panel instead of var/ folder. You will learn how to create your grids, create Database tables without raw SQL and more.
Chapter 4, Building the Extension – Shipping. You will build a custom Shipping extension where price would be set depending on your logic.
Chapter 5, Building the Extension – Payment. Here you will learn how to build on-site (user stays on your store without redirect) Magento payment method – Stripe.
Chapter 6, Packaging and Publishing Your Extension, shows you a way how to pack and upload your extensions on Magento Connect.
This book covers a lot for an only 128 pages book and shows you an example of practical, real-world extensions that every Magento developer will be working on someday (custom Shipping and Payment methods, creating your DB tables, grids, system configuration files, using event/observer system and more). Step-by-step guide that goes with you through the whole proccess of a Magento extension development – from the planning an extension’s logic, registering modules, creating all files and folders to detailed explanation of every method and property used in the business logic.
To my regret Branko does not comment his code, although he provides a detailed explanation below in the text, but comments would definitely make code more readable.
In my opinion Chapter 6 is not essential and could be dropped (a link to Magento Connect guidelines would be more than enough), and the space in the book could be used for another extension or introducing some useful information such as unit testing or debugging techniques.
To sum up the book is well written and covers the basics of getting modules up and running, worth your time and money, and recommended to those who’re doing their first steps in Magento extension development.