magento分类下的博客

11 Magento Default System Configuration Values

piaoling  2011-05-03 15:24:06

This is more of an addendum to my previous articles on the System Configuration system than an entirely new article. Go back and read up if anything’s over your head. When you create a new System Configuration path, Magento doesn’t store a default value. This is true even for the default stock system configuration. You can confirm this by looking at the core_config_data table. mysql> select * from core_config_data ; +-----------+---------+----------+----------------------------+------------+ | config_id | scope | scope_id | path | value | +------......

类别 :  magento(258)  |  浏览(2691)  |  评论(0)

10 Magento System Overrides and Upgradability

piaoling  2011-05-03 15:23:31

An oft-touted and often overused feature of The Magento Ecommerce System is the ability to override core system behavior. Another oft-discussed topic for Magento developers is upgradability, and how overrides get in the way of that. Today we’re going to look at the various ways overrides make switching versions difficult. Before we begin, it’s important to point out we’re talking about changing the core “Business Logic” of Magento. Changes to phtml templates are both expected and common in all but the simplest of stores. Hacking the Source The “least ......

类别 :  magento(258)  |  浏览(2645)  |  评论(0)

9 Varien Data Collections

piaoling  2011-05-03 15:22:37

Originally, as a PHP programmer, if you wanted to collect together a group of related variables you had one choice, the venerable Array. While it shares a name with C’s array of memory addresses, a PHP array is a general purpose dictionary like object combined with the behaviors of a numerically indexed mutable array. In other languages the choice isn’t so simple. You have multiple data structures to chose from, each offering particular advantages in storage, speed and semantics. The PHP philosophy was to remove this choice from the client programmer and give them one useful dat......

类别 :  magento(258)  |  浏览(4455)  |  评论(0)

8 In Depth Magento System Configuration

piaoling  2011-05-03 15:20:59

Last time we talked about Magento’s System Configuration system. If you missed it, you’ll want to go back and catch up. So, we glossed over a lot of the tags you could use within an individual field. <fields> <!-- ... ---> <fieldname translate="label"> <label>Field Name</label> <frontend_type>text</frontend_type> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0<......

类别 :  magento(258)  |  浏览(2795)  |  评论(0)

7 Custom Magento System Configuration

piaoling  2011-05-03 15:20:10

One of the more powerful parts of the Magento eCommerce System is the Admin’s System Config section. As a developer, it will allow you to quickly and easily setup forms elements that allow your end-users to configure their Magento System and your custom modules. Like a lot of things in Magento, it can be intimidating the first time you attempt to setup a new configuration section from scratch, but once you’ve done it once the power of (nearly) code-less forms will become addictive. Let’s get started. We’ll be building off the module we created in the Magento Contro......

类别 :  magento(258)  |  浏览(2698)  |  评论(0)

6 Magento ORM: Entity Attribute Value; Part 1

piaoling  2011-05-03 15:18:51

In our last article we told you there were two kinds of Models in Magento. Regular, or “simple” Models, and Entity Attribute Value (or EAV) Models. We also told you this was a bit of a fib. Here’s where we come clean. The following is part of a longer series about Magento aimed at developers familiar with PHP MVC development. While each article can be read stand alone, each article does build on concepts and code covered in previous articles. If you’re confused, be sure to catch up on the older stuff first. ALL Magento Models inherit from the Mage_Core_Model_Abstra......

类别 :  magento(258)  |  浏览(4572)  |  评论(0)

5 Magento Setup Resources

piaoling  2011-05-03 15:17:56

On any fast paced software development project, the task of keeping the development and production databases in sync become a sticky wicket. Magento offers a system to create a versioned resource migration scripts that can help your team deal with this often contentious part of the development process. The following is part of a longer series about Magento aimed at developers familiar with PHP MVC development. While each article can be read stand alone, each article does build on concepts and code covered in previous articles. If you’re confused, be sure to catch up on the older stuff......

类别 :  magento(258)  |  浏览(2766)  |  评论(0)

4 Magento Models and ORM Basics

piaoling  2011-05-03 15:17:19

The implementation of a “Models Tier” is a huge part of any MVC framework. It represents the data of your application, and most applications are useless without data. Magento Models play an even bigger role, as they typically contain the “Business Logic” that’s often (right or wrong) relegated to the Controller or Helper methods in other PHP MVC frameworks. The following is part of a longer series about Magento aimed at developers familiar with PHP MVC development. While each article can be read stand alone, each article does build on concepts covered in previo......

类别 :  magento(258)  |  浏览(2891)  |  评论(0)

3.2 Directory Climbing in Magento Layout

piaoling  2011-05-03 15:16:08

Just a quick note on some updates I’ve made to the Layouts, Blocks and Templates article. Previously, the example code given had demoed a technique for storing your phtml template files along with your module files by climbing the directory tree up to app/, and then back down to your module template="../../../../../code/local/[etc...]" One of the early Magento Books I’d read included the technique, and demoing it in the article re-enforced where Magento stored its templates in relation to module files. I’ve since rewritten the article to remove all referenc......

类别 :  magento(258)  |  浏览(3247)  |  评论(0)

3.1 Layouts, Blocks and Templates

piaoling  2011-05-03 15:14:55

Continuing along with Magento, we’re going to skip models for the time being, and jump to the right side of our flowchart to look at Layouts and Blocks. Unlike many popular PHP MVC systems, Magento’s Action Controller does not pass a data object to the view or set properties on the view object. Instead, the View component of Model, View, Controller directly references system models to get the information it needs for display. One consequence of this design decision is that the View has been separated into Blocks and Templates. Blocks are PHP objects, Templates are “raw&r......

类别 :  magento(258)  |  浏览(6530)  |  评论(0)
  • Page:21/26  258 Blogs
    <<
    >>
    20088
    周日 周一 周二 周三 周四 周五 周六

    文章分类