11 Magento Default System Configuration Values
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 | +------......
10 Magento System Overrides and Upgradability
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 ......
9 Varien Data Collections
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......
8 In Depth Magento System Configuration
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<......
7 Custom Magento System Configuration
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......
6 Magento ORM: Entity Attribute Value; Part 1
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......
5 Magento Setup Resources
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......
4 Magento Models and ORM Basics
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......
3.2 Directory Climbing in Magento Layout
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......
3.1 Layouts, Blocks and Templates
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......
- Page:21/26 258 Blogs
周日 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 |
文章分类
- 默认(751)
- 日志(47)
- 感悟(15)
- testIT(4)
- PHP_XML(5)
- PHP(78)
- 明星(1)
- 笑话(31)
- 毕业论文(2)
- 生活(60)
- HTML(11)
- CSS(6)
- 考研(3)
- JS(21)
- 简历(6)
- svn(3)
- 音乐(1)
- 学习(7)
- jQuery(9)
- 英语口语(9)
- 书籍(2)
- magento(258)
- apache(12)
- 创意(4)
- 设计(4)
- 休闲(1)
- IT咨询(11)
- 工作(23)
- ubuntu(21)
- bysoft(1)
- zend(1)
- web(2)
- software(1)
- sql(5)
- 娱乐(5)
- photoshop(3)
- zend framework(2)
- nginx(3)
- 小说(1)
- 名言(1)
- 牛人(1)
- Mysql(6)
- vim(2)
- wordpress(8)
- drupal(1)