New Book: Magento 1.3: PHP Developer’s Guide

Written on January 29th, 2010, by Cristian

Design, develop, and deploy feature-rich Magento online stores with PHP coding.

Design, develop, and deploy feature-rich Magento online stores with PHP coding.

If you are a PHP developer who wants to understand the architecture of Magento, learn how to extend the system with PHP code, add new features, and integrate Magento with a third-party CMS, this book is for you.

You are expected to be a confident PHP 5 developer. No experience of Magento development is expected, although you should be familiar with the operation of Magento. No experience of the Zend framework is expected.

What you will learn from this book

  • Install and upgrade Magento to get ready for development
  • Get familiar with the architecture and internal structure of Magento
  • Learn about the best modules available and what they can do for you out of the box
  • Build a Shipping module for your Magento store to give users options for receiving their items once they have paid for them
  • Create a payment method for Magento and the various aspects that go together to complete the payment process
  • Speed up your module creation process using the Module Creator script
  • Build a basic brand-management module for Magento to manage brands and display their details
  • Integrate your favourite CMS into Magento including a walkthrough of integrating WordPress into Magento
  • Create, update, delete, and retrieve customer data from within Magento by implementing the customer API
  • Integrate Magento data into an existing external web application or script using the Magento Core API
  • Import/export files to retrieve and store information from and to external sources using Excel Spreadsheet or CSV data

Find out more

Develop Magento Admin Module with CoolDash

Written on August 21st, 2009, by Cristian

CoolDash is a blank Magento extension developed by ActiveCodeline for building admin system configuration area. To speed up things you can use this base module. Copy it to your Magento project and change the “ActiveCodeline_CoolDash” namespace with your own, then and add your modules names. The author built it on Magento 1.4alpha but it should work also on Magento 1.3.

Blank extension for building “System > Configuration” area of Magento admin interface.

SystemConfAdminArea

You can download ActiveCodeline_CoolDash from Inhoo.net blog, there you can find also the original module announcement.

Add payment method handling cost

Written on August 9th, 2009, by Cristian

This week I worked at a Magento downpayment payment module which required a way to add handling fee. My problem was that the fee should be added to checkout total once the payment method was check. After looking at Magento API I come with a solution.

The order has a method setShippingAmount and a method getShippingAmount and I tried to use them. I adjust the total shipping amount by increading with my module handling fee.

$shipping_amount = $order->getShippingAmount();
$order->setShippingAmount( $shipping_amount + $mine_handling_amount );

The way that I did it was to create a method updateShippingAmount and add it as observe for checkout_type_onepage_save_order event in the module/etc/config.xml file:

public function updateShippingAmount( $observer )
{
   $MyPaymentMethod = Mage::getSingleton('namespace/mypaymentmethod');

   $order = $observer->getEvent()->getOrder();
   $payment = $order->getPayment()->getData();

   if( $payment['method'] == $MyPaymentMethod->getCode() )
   {
       $shipping_amount =  $order->getShippingAmount();
       $order->setShippingAmount( $shipping_amount + $MyPaymentMethod->getPostHandlingCost() );
   }
}

There may be a few other ways to do it, but this is my way of doing it and wanted to share with other Magento developer. If you know other way to do it please write it below.

Snippi – Magento code snippets

Written on August 7th, 2009, by Cristian

Firefox

Snippi is the community driven Magento code snippet sharing site. Site was started by Branko Ajzele, author of ActiveCodeline.com. Is is not another code sharing site is all about Magento code snippets. If you are a Magento developer this is a place where you can find your answers.

Check out http://snippi.net/

Start e-Commerce business with Magento

Written on July 10th, 2009, by Cristian

magento

Nettuts released a basic Magento video tutorial last week.

Hundreds of ecommerce systems exist, but very few can match the power of Magento. In this screencast, I’ll demonstrate how to download and install Magento to a local host, configure some of the site options, and create simple and configurable products and categories for our test e-commerce site.

If you are curious about Magento and want a basic “how-to” intro, then this is for you:

If you need help on how to install or customize a Magento shop, please contact me.