Download - Magento Book Part01
MAGENTOUA.WORDPRESS.COM
Magento 2010
magentoua.wordpress.com
- magentoua.wordpress.com. , . , Magento . 10 , . , Magento, , . Magento magentoua.wordpress.com http://twitter.com/magentoua. , Magento [email protected]
2
magentoua.wordpress.com
.......................................................................................................................................................... 3 Magento? ................................................................................................................................... 4 Magento ............................................................................. 7 Magento: .............................................................................17 5 , Magento ......................................................................................20 Magento ........................................................................................................ 22 Static Block Magento? ............................................ 26 (CMS Page) Magento. .........................................................30 css Magento?.................................................................................................. 34 (Compare) Magento? ................................................ 35 Magento. .................................................................................................................. 37
3
magentoua.wordpress.com
Magento?
Magento , Open Software License (OSL 3.0). Zend Framework. Sourceforge Community Choice Awards 2008 Magento .
Linux UNIX- (Windows , )
- Apache (1.x 2.x) PHP 5.2.0 , /:o o o o o o
PDO/MySQL MySQLi Mcrypt Mhash Simplexml DOM
MySQL 4.1.20 Sendmail- . Magento SMTP.
4
magentoua.wordpress.com
o o o
o o o o o o
o o o
, , , , .
o o o
() . . , ( , . . )
o
. . 5
magentoua.wordpress.com
/ ( , , )
(SEO) o o
: http://magentoua.wordpress.com/2009/09/25/what-is-magento/
6
magentoua.wordpress.com
Magento 1 Magento Magento. www.magentoecommerce.com/download Magento. Downloader , Full Release, .
Sample data ( ), Magento . , . No, thanks. Just take me to the download page. 2 XAMPP Lite XAMPP Lite , . XAMPP Lite Apache, MySQL 5.1, PHP 5.2, phpMyAdmin 3.1 . XAMPP. ( ), Magento. zip zip-, http://www.apachefriends.org/en/xampp-windows.html#646.
7
magentoua.wordpress.com
XAMPP Lite . X:/xampplite ( X ). 3 XAMPP Lite Magento . XAMPP Lite. . D:\xampplite\apache\bin\php.ini D:\xampplite\php\php.ini 4 . :;extension=php_curl.dll ;extension=php_mcrypt.dll ;extension=php_mcrypt_filter.dll ;extension=php_mhash.dll
extension=php_curl.dll extension=php_mcrypt.dll extension=php_mcrypt_filter.dll extension=php_mhash.dll
8
magentoua.wordpress.com 4 libmysql.dll Magento libmysql . http://windows.php.net/downloads/snaps/php-5.2-win32-VC6-x86-latest.zip libmysql.dll D:\xampplite\apache\bin\ D:\xampplite\php\.
5 XAMPP Lite
D:\xampplite\xampp-control.exe .
9
magentoua.wordpress.com
6 http://127.0.0.1/phpmyadmin http://localhost/phpmyadmin, phpMyAdmin. (magento create (. .- ).
7 sample data Magento sample data Magento. .
10
magentoua.wordpress.com
import magento_sample_data_for_1.2.0.sql 1.
OK . ( 20 ). - . :
11
magentoua.wordpress.com
8 Magento magento-1.3.0.tar.bz2 1 htdocs : D:\xampplite\htdocs\magento\. , index.php. :
localhost/magento . Magento . .
12
magentoua.wordpress.com
. Configuration . , .
(account). . Encryption Key .
13
magentoua.wordpress.com
, next .
9 Go to Frontend, localhost/magento/. , sample data, one-page-checkout . .
14
magentoua.wordpress.com
10 Backend Magento (Backend ), IP 127.0.0.1 localhost. cookie ( Firefox 3.0 cookies , , ), . Magento cookie .
http://127.0.0.1/magento/admin/ . (Dashboard).
15
magentoua.wordpress.com
: . , . : app/code/core/Mage/Core/Model/Session/Abstract/Varien.php 70 :session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath() // //$this->getCookie()->getDomain(), //$this->getCookie()->isSecure(), //$this->getCookie()->getHttponly() );
: http://magentoua.wordpress.com/2009/09/30/magento-install/
16
magentoua.wordpress.com
Magento: Magento . , . , . Magento . , . Magento . . .
17
magentoua.wordpress.com . : .htaccess mod_rewrite fancy URL ( ) PHP, Magento . .htaccess.sample .htaccess .htaccess . cron.php cron job , , Magento . favicon.ico favicon Magento ; url . index.php Magento , . index.php.sample index.php, index.php. LICENSE_AFL.txt Academic Free License Magento. LICENSE.txt Open Software License Magento. pear downloader SSH. Magento. php.ini php.ini PHP , Magento . , , , php.ini . ,
. : 404 , 404 . app (), (), , . Magento. , . downloader downloader Magento SSH. js , Javascript - Javascript. lib PHP Magento. Magento, . Zend Framework . media . . 18
magentoua.wordpress.com pkginfo , , , . report , , Magento . skin . , Javascript, CSS Flash , . , ( ). var Magento. , ( ), , .
: http://magentoua.wordpress.com/2010/03/01/file-structure/
19
magentoua.wordpress.com
5 , Magento , . Magento . Magento . 5 , , Magento ;) .
1. Magento FTP( , Magento ). Magento downloader ( ), Magento. 2. (http://magentoua.wordpress.com/docs), , . 2. Magento (fallbacks) default . package . . , Magento . blank, default, blank, . Magento fallback non-default .
20
magentoua.wordpress.com 3. Magento. ? , app/code/core. , app/code/local . : app/code/core/Mage/Checkout/Block/Success.php app/code/local/Mage/Checkout/Block/Success.php, . Magento. 4. PHP 4. System->Configuration->Advanced->Disable modules . ( Compare products) .xml .phtml . 5. 5 . cms block , ! . , Magento. System->Cache Management.
: http://magentoua.wordpress.com/2010/03/16/5-beginner-errors/
21
magentoua.wordpress.com
Magento, Magento . (default), . Magento , . . SSH . : /app/design/frontend/default/default/ /skin/frontend/default/default/ css new_package. : /app/design/frontend/default/default/ () /app/design/frontend/new_package/default/ , /skin/frontend/default/default/ css /skin/frontend/new_package/default/ ,
22
magentoua.wordpress.com
. , , Magento . . , . . System > Configuration > Design . Current package name new_package, Default : default ( modern, blank etc., ). Save config .
23
magentoua.wordpress.com
Javascript. - css javascript/ajax , . . /skin/frontend/default/new_theme/css/. css , . : 1. @import url('new_styles.css'); css ( reset.css) 2. /skin/frontend/default/new_theme/layout/page.xml css addCss: new_styles.css
24
magentoua.wordpress.com , , . Javascript / AJAX . /js addJs: /skin/frontend/default/new_theme/layout/page.xml ( - xml , , ) js new_script.js
, new_script.js , , .
: http://magentoua.wordpress.com/2009/10/07/new-theme-create/
25
magentoua.wordpress.com
Static Block Magento? , CMS block HTML, . , , , . ( , , rss ..). , HTML . CMS->Static Blocks->Add New Block.
Block Title: , CMS->Static Blocks.
Identifier: id, .xml
Status: Enabled , disabled , . 26
magentoua.wordpress.com Content: HTML, .
Save Block, . . (, , ) Catalog->Manage Categories .
General Information ( Display Settings) Display Mode CMS Block. : Products only . Static block only , . Static block and products , . , . , , Block Title. . , , : 1. ( ), 2. xml , 3. .phtml , 4. Magento ( ), 5. . 27
magentoua.wordpress.com , , ( ). app/design/frontend/your_package/your_theme/layout/page.xml :
block header : block_name
block : block_name
block_name Identifier, , cms_block_name , .phtml . app/design/frontend/your_package/your_theme/template/page/html/header.phtml :
28
magentoua.wordpress.com System->Cache Management
( F5). (CMS Page) CMS block ( (Home Page)), : 1. 2. CMS->Manage Pages 3. Content, :{{block type="cms/block" block_id="block_name" template="cms/content.phtml"}}
( F5) .
: http://magentoua.wordpress.com/2009/11/05/how-to-add-and-edit-cms-block/
29
magentoua.wordpress.com
(CMS Page) Magento.
Magento. (About Us), (Shipping information), (Privacy & Security), (Return Policy) .. CMS HTML . ! (Admin Panel) www.yourmagentosite/admin
CMS->Manage Pages Add New Page. .
30
magentoua.wordpress.com Page Information : 1. General Information ( ) 2. Custom Design ( ) 3. Meta Data ( ) General Information Page Title , CMS->Manage Pages. SEF URL Identifier . about-us www.yourmagentosite/about-us Status Enabled: , Disabled: . Content , .
Custom Design Custom Theme ( ) Custom Theme From/Custom Theme To ( ) Layout : , . .
31
magentoua.wordpress.com Layout Update XML . (layout), . , .
Meta Data Keywords . Description ( )
Save Page .
: http://magentoua.wordpress.com/2009/11/16/create-cms-page/ 32
magentoua.wordpress.com
33
magentoua.wordpress.com
css Magento? css Magento. , Shadowbox Lightbox, css . , css , . css . external.css. : skin/frontend/vash_package/vasha_tema/css. , . app/design/fronted/vash_package/vasha_tema/layout/ page.xml addCss. : css/external.css
, .
: http://magentoua.wordpress.com/2010/05/25/magento-add-css/
34
magentoua.wordpress.com
(Compare) Magento?
Magento, . . - System-> Cache Management . . , ! 1. : app/design/frontend/yourpackage/yourtheme/layout/reports.xml :
2. app/design/frontend/yourpackage/yourtheme/template/reports/home_product_viewed.phtml : | Manage Pages Home Page). :
:
? : , Magento www.example.com. : 1. {{block id='block_id'}} block_id ( CMS > Static Blocks.) :{{block id='footer_links'}}
Footer Links. 2. {{block type='module/package_classname' template='path/to/template.phtml'}} module/package_classname path/to/template.phtml. module/package_classname Block . ( , core/text_list Mage_Core_Block_Text_List, app/code/core/Mage/Core/Block/Text/List.php) Block package_ . ( tag/popular Mage_Tag_Block_Popular, app/code/core/Mage/Tag/Block/Popular.php) template , ( . tag/popular.phtml ) 38
magentoua.wordpress.com :{{block type='core/template' template='cms/custom_page.phtml'}}
cms/custom_page.phtml /e-mail. 3. {{htmlescape var='' allowed_tags=''}} HTML , var, , allowed_tags ( HTML ). :{{htmlescape var='Hello'}}
Hello, , . 4. {{layout handle=''}} HTML layout. handle layout handle, . default. 5. {{media url=''}} URL media, ., http://www.example.com/media/. url - URL. : {{media url='catalog/product/l/a/large_phone.jpg'}} http://www.example.com/media/catalog/product/l/a/large_phone.jpg.
6. {{skin url=''}} URL skin , ., http://www.example.com/skin/frontend/default/default/. url - URL. : default default package.{{skin url='images/media/about.jpg'}}
39
magentoua.wordpress.comhttp://www.example.com/skin/frontend/default/default/images/media/about.jpg
7. {{store url=''}} base URL . url , (http://www.example.com/). url - base url , (/) url. . customer/account. :{{store url='about-magento-demo-store'}}
http://www.example.com/index.php/about-magento-demo-store/
8. {{store direct_url=''}} {{store url=''}}, (/). , . coffee/kona-fancy-whole-bean.html
: http://magentoua.wordpress.com/2010/06/01/magento-special-tags/
40