Creating Magento order programmatically and charging saved credit card.

Creating order is the basic functionality of Magento but its the trickiest one at the same time for developers. Yes, its true because its not straight forward like instantiating model, assigning some values and saving it. Sometimes you may want to create auto orders using some cron script.
Continue reading “Creating Magento order programmatically and charging saved credit card.”

Add custom Javascript in Magento admin form

In previous post we learnt how to render custom html in tabs block. Now lets add custom JavaScript in Magento admin form. Magento is flexible enough to insert your custom JavaScript code snippets in forms created by your very own Magento modules & extensions. Continue reading “Add custom Javascript in Magento admin form”

Keeping your Yii Models Lean – Use Behaviors

Active Record models are fantastic for consolidating “black box” logic and keeping your models self-aware of their business logic, but what do you do when the business rules and object specific operations keep adding up?

Continue reading “Keeping your Yii Models Lean – Use Behaviors”

How to save multiple related models in Yii [Complete Solution]

Scenario:
You are in a situation where you have two related tables a Parent and a child table. You need to create a user experience in which user presses Save button only once, meaning by, user enters all the data in parent model fields, then enters data in all child model fields, optionally generates more child model fields and then presses the save button.
Continue reading “How to save multiple related models in Yii [Complete Solution]”

Table ‘DATEBASE_NAME.AuthAssignment’ doesn’t exist

If you have used Rights module for RBAC in your Yii application and you deploy it on Linux based server, you may encounter this error.

Problem:
If you have used Rights module for RBAC in your Yii application and you deploy it on Linux based server, you may encounter this error. Continue reading “Table ‘DATEBASE_NAME.AuthAssignment’ doesn’t exist”

How to separate front and admin panel in yii-framework

In my previous post I demonstrated you how to render different layout for different user role, now lets move a step forward and see how to create separate front and admin panel in a Yii based application.
Continue reading “How to separate front and admin panel in yii-framework”

Configure Authorize.net in Magento

Magento has various built-in payment methods, one of them is Authorize.net. To enable and configure Authorize.net as your payment processor, you should have API Login ID and Transaction Key. You can get these credentials from your Authorize.net account.
Continue reading “Configure Authorize.net in Magento”

Magento: Add radio/checkbox custom column in Admin Grid

Magento grids are very useful for displaying/filtering and sorting data. Their flexibility is endless, you can customize them in any way. One may want to add a new radio button or checkbox column for rapid marking.
Continue reading “Magento: Add radio/checkbox custom column in Admin Grid”

Yii password, repeat password fields

Yii framework has awesome input validation mechanism, one of the many validation rules is “compare” rule. You can utilize it for creating confirmation fields to verify user input. Its a good practice to get password input twice while creating signup and change password forms. Continue reading “Yii password, repeat password fields”