Currently browsing

MVC Developers Part 6 – Entity Attribute Value

In our last article we told you there were two types of models in Magento. Regular, or “simple” models, and entity attribute value (or EAV) model. We also told you this was a bit of a fib. Here is where we come clean.

The following is part of a longer series on Magento aimed at developers familiar with PHP MVC development. Although each article can be read stand alone, each article is based on concepts and code covered in previous articles. If you are confused, especially to catch up on the earlier work first.

Magento – Programmatically insert new attribute option

magento add attribute options programmaticallymagento create attribute programmaticallymagento add image label programaticallymagento add attribute option programmaticallymagento add attribute programmaticallyWell, adding new attribute option from code seems to be easy at first. But in fact, it took me sometime to find out a solution. The main problem is that we need …

Create Magento order invoice programmatically

magento create invoice programmaticallycreate invoice magento programmaticallymagento create order programmaticallyHere is a quick and easy way to create order invoice programmatically. Suppose, $_order contains your order. viagra generic now Here goes the code to create invoice:- if($_order->canInvoice()) { /** * Create invoice * The invoice will be in ‘Pending’ state …

Magento Model Code Generation

This is a quick one for advanced users, is a recent problem, I answered StackOverflow inspired.

Magento as well as about an abstract system as one of the advantages is the opportunity it presents metaprogramming. Drops action in a controller (which is the following code, you can define an internal function in PHP)