Search and Find
Service
Title Page
1
Copyright Page
2
Contents at a Glance
4
Table of Contents
6
About the Authors
16
About the Technical Reviewers
17
Acknowledgments
18
Introduction
19
Who This Book Is For
19
How This Book Is Structured
19
Prerequisites
19
Contacting the Authors
20
PART 1: GETTING STARTED WITH MAGENTO
21
Chapter 1: Introduction to Magento
22
What Is Magento?
22
What Is Open Source Software?
22
Magento Versions and License
23
The History Behind Magento
23
Zend: Magento’s Workhorse
23
Who Should Use Magento?
23
Why Magento?
24
Beyond This Guide
25
Chapter 2: Installing Magento
26
System Requirements
26
Automatic Install
27
Getting Started
27
Installation Step 1: What and Where to Download?
27
Installation Step 2: Uploading Magento for Installation
28
Installation Step 3: Setting Correct File Permissions
28
Installation Step 4: Setting up a Magento Database
30
Installation Step 5: Installing Magento
31
What’s Next?
33
Chapter 3: The Public Interface Walk-through
34
Through the Looking Glass
34
Page Header
35
Categories and Category Views
36
Product Page
40
Compare Products
42
CMS Pages and Static Blocks
44
The Checkout Process
45
Step 1: Checkout Method
46
Step 2: Billing Information
46
Step 3: Shipping Information
47
Step 4: Shipping Method
48
Step 5: Payment Method
49
Step 6: Order Review
50
Ship to Multiple Addresses
51
Step 1: Select Addresses
52
Step 2: Shipping Information
52
Step 3: Billing Information
53
Step 4: Place Order
54
Step 5: Order Success
55
What’s Next?
56
Chapter 4: The Administration Interface Walk-through
57
The Administration Interface: The Dashboard
57
The Administration Interface: Sales
59
The Administration Interface: Sales—Orders Grid
59
The Administration Interface: Sales—Invoices Grid
62
The Administration Interface: Sales—Shipments Grid
64
The Administration Interface: Sales—Credit Memos
65
The Administration Interface: Sales—Terms and Conditions
67
The Administration Interface: Sales—Tax
69
The Administration Interface: Catalog
69
The Administration Interface: Catalog—Manage Products
69
The Administration Interface: Catalog—Manage Categories
71
The Administration Interface: Catalog—Attributes
72
The Administration Interface: Catalog—URL Rewrite Management
74
The Administration Interface: Catalog—Search
74
The Administration Interface: Catalog—Reviews and Ratings
75
The Administration Interface: Catalog—Tags
75
The Administration Interface: Catalog—Google Base
76
The Administration Interface: Catalog—Google Sitemap
77
The Administration Interface: Customers
78
The Administration Interface: Customers—Manage Customers
78
The Administration Interface: Customers—Customer Groups
79
The Administration Interface: Customers—Online Customers
79
The Administration Interface: Promotions
80
The Administration Interface: Promotions—Catalog Price Rules
80
The Administration Interface: Promotions—Shopping Cart Price Rules
81
The Administration Interface: Newsletter
82
The Administration Interface: Newsletter—Newsletter Templates
82
The Administration Interface: Newsletter—Newsletter Queue
83
The Administration Interface: Newsletter—Newsletter Subscribers
83
The Administration Interface: Newsletter—Newsletter Problem Reports
84
The Administration Interface: CMS
84
The Administration Interface: CMS—Manage Pages
84
The Administration Interface: CMS—Static Blocks
84
The Administration Interface: CMS—Poll Manager
86
The Administration Interface: Reports
88
The Administration Interface: System
88
The Administration Interface: System—My Account
88
The Administration Interface: System—Notifications
89
The Administration Interface: System— Tools
89
The Administration Interface: System—Web Services
90
The Administration Interface: System—Design
90
The Administration Interface: System—Import/Export
90
The Administration Interface: System—Transactional Emails
91
The Administration Interface: System—Permissions
91
The Administration Interface: System—Magento Connect
91
The Administration Interface: System—Cache Management
91
The Administration Interface: System—Manage Stores
92
The Administration Interface: System—Configuration
93
What’s Next?
94
Chapter 5: Working with Products
95
Getting Started with Categories
95
Product Categories: General Settings
96
Product Categories: Display Settings
96
Product Categories: Custom Design
97
Product Categories: Category Products
97
Product Attributes
98
Product Attributes: Individual Product Attributes
98
Product Attributes: Product Attribute Sets
98
Creating a Simple Product
98
Product Information: General
99
Product Information: Prices
99
Product Information: Meta Information
100
Product Information: Images
101
Product Information: Description
101
Product Information: Design
102
Product Information: Inventory
102
Product Information: Web Sites
103
Product Information: Categories
103
Product Information: Related Products, Up-sells and Cross-sells
104
Product Information: Custom Options
104
Different Types of Products
105
Product Reviews
106
Product tags
106
What’s Next?
106
Chapter 6: Working with Customers
107
Getting Started with Customers
107
Guest Checkout Customers
107
Creating New Customers
109
Importing Customer Information
110
Detailed Customer Information
110
Detailed Customer Information: Customer View
111
Detailed Customer Information: Account Information
112
Detailed Customer Information: Addresses
113
Detailed Customer Information: Orders
114
Detailed Customer Information: Shopping Cart
115
Detailed Customer Information: Wishlist
115
Detailed Customer Information: Newsletter
115
Detailed Customer Information: Product Reviews
116
Detailed Customer Information: Product Tags
116
Customer Groups
117
Customer Groups: Group Product Pricing (Tier Pricing)
118
Online Customers
119
Contacting Customers
119
What’s Next?
120
PART 2: ADVANCED MAGENTO DEVELOPMENT
121
Chapter 7: Working with Orders
122
Getting Started with Orders
122
The Life Cycle of Orders
124
Complete List of Order Status
124
Status Conflicts and Exceptions
125
Contacting Customers
125
Creating an Invoice for an Order
126
Creating a Shipment Order
128
Canceling an Order
130
Placing an Order on Hold
131
Credit Memos
131
Deleting Orders
133
What’s Next?
133
Chapter 8: Configuring Magento
134
Why Do I Need to Configure Magento?
134
Store Information, Emails, and Meta Data
134
Default Home Page
134
Page Titles, Meta Keywords, and Meta Descriptions
136
Store Emails
137
Welcome Message and Page Footer
137
Setting Up Transactional Emails
138
Setting Up a Shipping Method
140
Setting Up a Payment Method
142
Deleting Sample Categories
144
Deleting Sample Products
144
Deleting Test Customers
145
Deleting Test Orders
145
What’s Next?
148
Chapter 9: Customizing Magento’s Appearance
149
A Quick Overview
149
Why This Structure Is Good
150
Potential Problems with This Type of Structure
150
Beyond This Chapter
150
Understanding a Magento Theme
151
Important Theme Areas to Keep in Mind
151
Default and NonDefault Magento Themes
151
The Default Magento Theme
151
Default Theme Layouts
152
Magento File Structure
156
Inside the App Directory
157
Inside the Skin Directory
159
Performing Some Simple Modifications
160
Turn on Developer Hints
160
Modifying a XML Layout File
161
Modifying a PHTML Template File
164
Modifying a CSS file
165
The Blank Theme for Magento
166
Download the Blank Theme
167
Assigning the Blank Theme to Your Store
168
What’s Next?
170
Chapter 10: Magento Extensions
171
Overview
171
Magento Connect Manager
172
Finding an Extension
173
Installing an Extension
173
Uninstalling an Extension
175
Building a Module
175
Rules
176
Directory Structure
176
Simple Hello World Module
178
Files for Hello World Module
178
Verify that the Module Is Registered
180
Displaying Hello World in Blocks
180
Random Products Module
181
Files for Random Products Module
181
Displaying Random Products in Blocks
186
Displaying Random Products in Template files
187
Turning a Module into an Extension
187
Package Info
188
Release Info
189
Maintainers
189
Dependencies
190
Contents
191
Extension Completed
193
Load Local Package
193
Summary
194
What’s Next?
194
Chapter 11: API
195
XML-RPC
195
SOAP
196
PHP with XML-RPC or SOAP?
196
Setting Up Magento for Web Services
197
Roles
197
Role Info
197
Role Resources
198
Users
198
User Info
198
User Role
199
API Coding
199
Using XML-RPC (PEAR Client)
200
Using XML-RPC (Zend Library)
201
Using SOAP (PHP Standard Library)
202
Code Comparison
203
PEAR XML-RPC Example
204
Zend XML-RPC Example
204
SOAP Example
205
Slice and Dice with or without the Operators
205
Example without Operators (Direct Key/Values)
205
Example with Operators
205
Summary
206
What’s Next?
206
Chapter 12: Tips and Tricks
207
Importing Products
207
Importing Products Through a CSV File
208
Importing Products through Scripts
211
Export Orders and Build QuickBooks Invoices
214
Localhost Install for Windows
221
Debug Tricks: Turning on Template Path
222
Modifying Core Files
223
Modifying Template Files
224
Clearing the Database of Test Orders
224
Special Thanks to Branko Ajzele and the Inchoo Team
226
Searching the BugTracker
227
Summary
227
What’s Next?
227
Appendix: API References
228
API Operators
228
API Faults
229
Magento APIs
229
Customer API
229
Customer Set
229
Method: customer.list ($filters)
230
Method: customer.info ($customer_id)
231
Method: customer.create ($data)
232
Method: customer.update ($customer_id, $data)
234
Method: customer.delete ($customer_id)
235
Customer Group Set
236
Method: customer_group.list ()
236
Customer Address Set
236
Method: customer_address.list ($customer_id)
237
Method: customer_address.info ($address_id)
239
Method: customer_address.create ($customer_id, $data)
240
Method: customer_address.update ($address_id, $data)
241
Method: customer_address.delete ($address_id)
243
Directory API
243
Directory Set
243
Method: directory_country.list ()
243
Method: directory_region.list ($country)
244
Catalog API
245
Category Set
245
Method: catalog_category.currentStore ($store_view_code)
246
Method: catalog_category.tree ($parent_category_id, $store_view_code)
246
Method: catalog_category.level ($website_code, $store_view_code, $parent_category_id)
247
Method: catalog_category.info ($category_id, $store_view_code, $attributes)
248
Method: catalog_category.create ($parent_category_id, $data, $store_view_code)
249
Method: catalog_category.update ($category_id, $data, $store_view_code)
251
Method: catalog_category.move ($category_id, $parent_category_id, $after_category_id)
252
Method: catalog_category.delete ($category_id)
253
Method: catalog_category.assignedProducts ($category_id, $store_view_code)
253
Method: catalog_category.assignProduct ($category_id, $product_id, $position)
254
Method: catalog_category.updateProduct ($category_id, $product_id, $position)
255
Method: catalog_category.removeProduct ($category_id, $product_id)
255
Category Attribute Set
256
Method: catalog_category_attribute.currentStore ($store_view_code)
256
Method: catalog_category_attribute.currentStore ($store_view_code)
256
Method: catalog_category_attribute.list ()
256
Method: catalog_category_attribute.options ($attribute_id, $store_view_code)
257
Product Set
258
Method: catalog_product.currentStore ($store_view_code)
258
Method: catalog_product.list ($filters, $store_view_code)
259
Method: catalog_product.info ($product_id, $store_view_code, $attributes)
260
Method: catalog_product.create ($type, $product_attribute_set_id, $sku, $data)
263
Method: catalog_product.update ($product_id, $data, $store_view_code)
264
Method: catalog_product.setSpecialPrice ($product_id, $special_price, $from_date,$to_date, $store_view_code)
265
Method: catalog_product.getSpecialPrice ($product_id, $store_view_code)
265
Method: catalog_product.delete ($product_id)
266
Product Attribute Set
266
Method: catalog_product_attribute.currentStore ($store_view_code)
267
Method: catalog_product_attribute.list ($attribute_set_id)
267
Method: catalog_product_attribute.options ($attribute_id, $store_view_code)
268
Product Attribute Set
269
Method: catalog_product_attribute_set.list ()
269
Product Type Set
269
Method: catalog_product_type.list ()
269
Product Attribute Media Set
270
Method: catalog_product_attribute_media.currentStore ($store_view_code)
271
Method: catalog_product_attribute_media.list ($product_id, $store_view_code)
271
Method: catalog_product_attribute_media.info ($product_id, $file, $store_view_code)
272
Method: catalog_product_attribute_media.types ($product_attribute_set_id)
273
Method: catalog_product_attribute_media.create ($product_id, $data, $store_view_code)
274
Method: catalog_product_attribute_media.update ($product_id, $file, $data,$store_view_code)
275
Method: catalog_product_attribute_media.remove ($product_id, $file)
275
Product Attribute Tier Price Set
276
Method: catalog_product_attribute_tier_price.info ($product_id)
276
Method: catalog_product_attribute_tier_price.update ($product_id, $tierPrices)
277
Product Link Set
278
Method: catalog_product_link.list ($type, $product_id)
278
Method: catalog_product_link.assign ($type, $product_id, $linked_product_id, $data)
279
Method: catalog_product_link.update ($type, $product_id, $linked_product_id, $data)
280
Method: catalog_product_link.remove ($type, $product_id, $linked_product_id)
280
Method: catalog_product_link.types ()
281
Method: catalog_product_link.attributes ($type)
281
Sales API
282
Sales Order Set
282
Method: sales_order.list ($filters)
282
Method: sales_order.info ($order_increment_id)
285
Method: sales_order.addComment ($order_increment_id, $status, $comment, $notify)
291
Method: sales_order.hold ($order_increment_id)
292
Method: sales_order.unhold ($order_increment_id)
292
Method: sales_order.cancel ($order_increment_id)
293
Sales Order Shipment Set
293
Method: sales_order_shipment.list ($filters)
293
Method: sales_order_shipment.info ($shipment_increment_id)
294
Method: sales_order_shipment.create ($order_increment_id, $items, $comment,$email_send, $email_with_comment)
296
Method: sales_order_shipment.addComment ($shipment_increment_id, $comment,$email_send, $email_with_comment)
297
Method: sales_order_shipment.addTrack ($shipment_increment_id, $carrier_key,$tracking_title, $tracking_num)
298
Method: sales_order_shipment.removeTrack ($shipment_increment_id, $tracking_id)
299
Method: sales_order_shipment.getCarriers ($order_increment_id)
299
Sales Order Invoice Set
300
Method: sales_order_invoice.list ($filters)
300
Method: sales_order_invoice.info ($invoice_increment_id)
301
Method: sales_order_invoice.create ($order_increment_id, $items, $comment,$email_send, $email_with_comment)
304
Method: sales_order_invoice.addComment ($invoice_increment_id, $comment,$email_send, $email_with_comment)
305
Method: sales_order_invoice.capture ($invoice_increment_id)
305
Method: sales_order_invoice.void ($invoice_increment_id)
306
Method: sales_order_invoice.cancel ($invoice_increment_id)
306
Inventory API
307
Method: cataloginventory_stock_item.list ($product_ids)
307
Method: cataloginventory_stock_item.update ($product_id, $data)
308
Index
309
All prices incl. VAT