{"id":230957,"date":"2014-07-24T15:29:03","date_gmt":"2014-07-24T11:29:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=230957"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=230957","title":{"rendered":"<span class=\"post_title\">Magento \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\tMagento \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u043c\u0438. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c Alexa, Magento \u2014 \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u043c\u0438 \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430 \u0444\u0435\u0432\u0440\u0430\u043b\u044c 2013 \u0433.<\/p>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0437 \u0432\u0441\u0435\u0445 e-commerce \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u044f \u043e\u0442\u0434\u0430\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e Magento:  <\/p>\n<ul>\n<li>EAV-\u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 Connect (\u043f\u0443\u0441\u0442\u044c \u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u043e)<\/li>\n<li>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li>\u041b\u0435\u0433\u043a\u043e\u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0439 out-of-the-box \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d<\/li>\n<li>\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0438 \u043c\u043e\u0449\u043d\u0430\u044f \u0430\u0434\u043c\u0438\u043d\u043a\u0430<\/li>\n<li>\u0412 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f ecommerce<\/li>\n<\/ul>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u043d\u043e \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<p>  \u041b\u044e\u0431\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 Magento \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0441\u0442\u0438\u0441\u044c \u0432 local (\u0438\u043b\u0438 community, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 connect)<br \/>  \u0418\u0442\u0430\u043a, \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437:  <\/p>\n<ul>\n<li><b>app\/etc\/modules\/[Namespace]_[Module].xml<\/b> \u2014 bootstrap-\u0444\u0430\u0439\u043b \u043c\u043e\u0434\u0443\u043b\u044f. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f (<b>core|community|local<\/b>) \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (depends)<\/li>\n<li><b>app\/code\/local\/[Namespace]\/[Module]<\/b> \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f<br \/> \n<ul>\n<li><b>etc<\/b> \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f (<b>config.xml|system.xml|adminhtml.xml|api.xml|api2.xml &#8230;<\/b>)<\/li>\n<li><b>controllers<\/b> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f<\/li>\n<li><b>data<\/b> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435<\/li>\n<li><b>sql<\/b> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446<\/li>\n<li><b>Block<\/b> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0431\u043b\u043e\u043a\u043e\u0432<\/li>\n<li><b>Helper<\/b> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/li>\n<li><b>Model<\/b> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/li>\n<\/ul>\n<p>  <\/li>\n<\/ul>\n<p>  \u041f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430: Magento \u0441\u043f\u0435\u0440\u0432\u0430 \u0433\u0440\u0443\u0437\u0438\u0442 <b>app\/etc\/local.xml<\/b> \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0411\u0414, \u0441\u0435\u0441\u0441\u0438\u0439, \u043a\u044d\u0448\u0430 \u0438 \u0442.\u0434., \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 bootstrap-\u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0437 <b>app\/etc\/modules\/*.xml<\/b>, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 <b>&lt;depends&gt;<\/b>, \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 <b>app\/code\/*\/*\/*\/etc\/config.xml<\/b>, \u0441\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 XML \u0432 \u043e\u0434\u0438\u043d \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 XML, \u0438 \u0441\u043d\u043e\u0432\u0430 \u0433\u0440\u0443\u0437\u0438\u0442 app\/etc\/local.xml \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 XML, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0443\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 local.xml, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <\/p>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438, \u0441\u043c\u044b\u0441\u043b \u0432\u0441\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 Magento \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0434\u0440\u0430 (\u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f) \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Magento \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432:<br \/>  1) \u0438, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u2014 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<br \/>  2) Rewrite \u043a\u043b\u0430\u0441\u0441\u0430<br \/>  3) \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 override<\/p>\n<h5>\u0421\u043e\u0431\u044b\u0442\u0438\u044f<\/h5>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0432 Magento \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430. \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <\/p>\n<pre><code class=\"php\">Mage::dispatchEvent('namespace_module_something', array('model' =&gt; $this, 'something' =&gt; $that))<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:  <\/p>\n<pre><code class=\"php\">\/\/ app\/code\/local\/Namespace\/Module\/Observer.php public function someName(Varien_Event_Observer $observer) {   $model = $observer-&gt;getModel(); \/\/ getData('model')   $something = $observer-&gt;getSomething(); \/\/ getData('something') } <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 config.xml \u0432 \u043d\u043e\u0434\u0435 <b>events<\/b>:  <\/p>\n<pre><code class=\"xml\">&lt;config&gt;   &lt;global&gt;         &lt;events&gt;             &lt;namespace_module_something&gt;                 &lt;observers&gt;                     &lt;some_name&gt;                         &lt;class&gt;namespace_module\/observer&lt;\/class&gt;                         &lt;method&gt;someName&lt;\/method&gt;                     &lt;\/some_name&gt;                 &lt;\/observers&gt;             &lt;\/namespace_module_something&gt;         &lt;\/events&gt;   &lt;\/global&gt; &lt;\/config&gt; <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0436\u0435, \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u2014 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 events \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u043f\u043e\u043c\u0438\u043c\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0435\u0449\u0435 \u0438 \u0432 frontend \/ adminhtml \/ crontab<\/p>\n<h5>Rewrite \u043a\u043b\u0430\u0441\u0441\u0430<\/h5>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438, \u0445\u0435\u043b\u043f\u0435\u0440\u044b \u0438 \u0431\u043b\u043e\u043a\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0435\u0437\u0434\u0435 \u0432 \u043a\u043e\u0434\u0435, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0431\u0440\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:  <\/p>\n<ul>\n<li>Mage::getModel() \/ Mage::getSingleton()<\/li>\n<li>Mage::helper()<\/li>\n<li>Mage::getBlockSingleton \/ Mage_Core_Model_Layout::createBlock<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e getModelClassName \/ getHelperClassName \/ getBlockClassName \u0432 Mage_Core_Model_Config<br \/>  \u041f\u0435\u0440\u0432\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0438\u0434\u0435\u0442 \u0430\u043b\u0438\u0430\u0441 \u043c\u043e\u0434\u0435\u043b\u0438\/\u0445\u0435\u043b\u043f\u0435\u0440\u0430\/\u0431\u043b\u043e\u043a\u0430: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, catalog\/product<br \/>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u0435\u0440\u043d\u043e, \u0442.\u043a. \u0443\u0431\u044c\u0435\u0442 \u043d\u0430\u043f\u0440\u043e\u0447\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 rewrite-\u043e\u0432 \u2014 \u043f\u043e \u0441\u0443\u0442\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c new Namespace_Module_Model_Something() \u2014 \u0432\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u044b\u0445 \u0438\u043c\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:   <\/p>\n<pre><code class=\"php\"> fgetcsv($handle, 0, Namespace_Module_Model_Something::DELIMITER, Namespace_Module_Model_Something::ENCLOSURE, Namespace_Module_Model_Something::ESCAPE ) <\/code><\/pre>\n<p>  \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e DELIMITER\/ENCLOSURE\/ESCAPE \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u043c. \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0430\u0437\u0430\u0434 \u0431\u044b\u043b\u0430 \u0432 Mage_ImportExport \u043c\u043e\u0434\u0443\u043b\u0435, \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0435\u0439 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435.<br \/>  \u0418\u0442\u0430\u043a, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"xml\">&lt;config&gt;     &lt;modules&gt;         &lt;Namespace_Module&gt;         &lt;\/Namespace_Module&gt;     &lt;\/modules&gt;     &lt;global&gt;         &lt;models&gt;             &lt;namespace_module&gt;                 &lt;class&gt;Namespace_Module_Model&lt;\/class&gt;             &lt;\/namespace_module&gt;         &lt;\/models&gt;         &lt;helpers&gt;             &lt;namespace_module&gt;                 &lt;class&gt;Namespace_Module_Helper&lt;\/class&gt;             &lt;\/namespace_module&gt;         &lt;\/helpers&gt;         &lt;blocks&gt;             &lt;namespace_module&gt;                 &lt;class&gt;Namespace_Module_Block&lt;\/class&gt;             &lt;\/namespace_module&gt;         &lt;\/blocks&gt;     &lt;\/global&gt; &lt;\/config&gt; <\/code><\/pre>\n<p>  \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u0438, \u0445\u0435\u043b\u043f\u0435\u0440\u044b \u0438 \u0431\u043b\u043e\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e\u0434 \u0430\u043b\u0438\u0430\u0441\u043e\u043c namespace_module<br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e Namespace_Module_Model_Modelname, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Mage::getModel(&#8216;namespace_module\/modelname&#8217;) (\u0438\u043b\u0438 Mage::getSingleton, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d). \u0421 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u0438 \u0445\u0435\u043b\u043f\u0435\u0440\u0430\u043c\u0438 \u0442\u0430 \u0436\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0441 \u043e\u0434\u043d\u0438\u043c \u043b\u0438\u0448\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c: Mage::helper(&#8216;namespace_module&#8217;) \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0445\u0435\u043b\u043f\u0435\u0440 \u043c\u043e\u0434\u0443\u043b\u044f: Namespace_Module_Helper_Data<br \/>  \u0422\u0430\u043a \u0436\u0435 \u044d\u0442\u043e\u0442 \u0445\u0435\u043b\u043f\u0435\u0440 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 ($this-&gt;__(\u00abSomestring\u00bb)), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043e\u0442 Mage_Core_Helper_Abstract.<br \/>  \u0414\u043b\u044f \u0440\u0435\u0432\u0440\u0430\u0439\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<pre><code class=\"xml\">... &lt;models&gt;   &lt;catalog&gt;     &lt;rewrite&gt;       &lt;product&gt;Namespace_Module_Model_Product&lt;\/product&gt;     &lt;\/rewrite&gt;   &lt;\/catalog&gt; &lt;\/models&gt; ... <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0435\u0432\u0440\u0430\u0439\u0442. \u0412 XML \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u043e\u0432\u0430\u0440\u0430 \u043d\u0430 Namespace_Module_Model_Product, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c Mage::getModel(&#8216;catalog\/product&#8217;) \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0435\u0437\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c Namespace_Module_Model_Product<\/p>\n<h5>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 override<\/h5>\n<p>  \u041d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0432 Abstract-\u043a\u043b\u0430\u0441\u0441\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u043c \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432).<br \/>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, <b>include_path = app\/code\/local; app\/code\/community; app\/code\/core; lib<\/b>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0432 community \u0438\u043b\u0438 core \u043a\u043b\u0430\u0441\u0441\u0435, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e, \u0447\u0442\u043e \u0438 \u0444\u0430\u0439\u043b, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 local: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 local\/Mage\/Catalog\/Model\/Abstract.php, \u0438 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0438\u0437 local \u0432\u043c\u0435\u0441\u0442\u043e core.<br \/>  \u041d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0442.\u043a. \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Magento \u0444\u0430\u0439\u043b \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c (\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0430), \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u043b\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h5>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h5>\n<p>  \u0417\u0430\u0434\u0430\u043d\u0438\u0435: \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435 \u00abis_exported\u00bb \u0434\u043b\u044f \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435.<br \/>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c bootstrap:<br \/>  <b>app\/etc\/modules\/Easy_Export.xml<\/b>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;config&gt;     &lt;modules&gt;         &lt;Easy_Export&gt;             &lt;active&gt;true&lt;\/active&gt;             &lt;codePool&gt;local&lt;\/codePool&gt; \t\t\t&lt;depends&gt; \t\t\t\t&lt;Mage_Sales\/&gt; \t\t\t&lt;\/depends&gt;         &lt;\/Easy_Export&gt;     &lt;\/modules&gt; &lt;\/config&gt; <\/code><\/pre>\n<p>  \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Mage_Sales, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u0435\u043c Mage_Sales. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0432\u0441\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 Magento, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0441 \u043d\u0443\u043b\u044f, \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u00ab\u0443\u043f\u0430\u0441\u0442\u044c\u00bb \u0432\u0432\u0438\u0434\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b sales_flat_order, \u0435\u0441\u043b\u0438 \u0412\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c.<br \/>  <b>app\/code\/local\/Easy\/Export\/etc\/config.xml<\/b>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;config&gt;     &lt;modules&gt;         &lt;Easy_Export&gt; \t\t\t&lt;version&gt;0.0.1&lt;\/version&gt;         &lt;\/Easy_Export&gt;     &lt;\/modules&gt;     &lt;global&gt; \t\t&lt;resources&gt;             &lt;easy_export_setup&gt;                 &lt;setup&gt;                     &lt;module&gt;Easy_Export&lt;\/module&gt;                     &lt;class&gt;Mage_Sales_Model_Resource_Setup&lt;\/class&gt;                 &lt;\/setup&gt;             &lt;\/easy_export_setup&gt;         &lt;\/resources&gt;          &lt;helpers&gt;             &lt;easy_export&gt;                 &lt;class&gt;Easy_Export_Helper&lt;\/class&gt;             &lt;\/easy_export&gt;         &lt;\/helpers&gt;         &lt;blocks&gt;             &lt;easy_export&gt;                 &lt;class&gt;Easy_Export_Block&lt;\/class&gt;             &lt;\/easy_export&gt;         &lt;\/blocks&gt;     &lt;\/global&gt; &lt;\/config&gt; <\/code><\/pre>\n<p>  \u0432 \u043d\u043e\u0434\u0435 \u00abresources\u00bb \u043f\u043e \u0441\u0443\u0442\u0438 \u0443\u043a\u0430\u0437\u0430\u043d, \u0447\u0442\u043e \u0443 \u043c\u043e\u0434\u0443\u043b\u044f \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0447\u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 Mage_Sales_Model_Resource_Setup<br \/>  \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c <b>app\/code\/local\/Easy\/Export\/sql\/easy_export_setup\/mysql4-install-0.0.1.php<\/b>  <\/p>\n<pre><code class=\"php\"> \/* @var $this Mage_Sales_Model_Resource_Setup *\/ $this-&gt;addAttribute('order', 'is_exported', array('type' =&gt; 'int', 'grid' =&gt; true)); <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c int-\u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0437\u0430\u043a\u0430\u0437\u043e\u0432, grid =&gt; true \u0442\u0430\u043a \u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0433\u0440\u0438\u0434\u0430 \u044d\u0442\u0438\u043c \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c. \u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0431\u0443\u043a\u0432 \u0432 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u0435\u0439 \u2014 \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u2014 (get)setSomeValue \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e (get)setData(&#8216;some_value&#8217;), \u043d\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 (get)setData(&#8216;SomeValue&#8217;)<\/p>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u0437\u0430\u043a\u0430\u0437\u044b \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0435 EAV, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432\u0432\u0438\u0434\u0443 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 EAV \u2014 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u0441 \u043f\u043e\u043b-\u0442\u044b\u0441\u044f\u0447\u0435\u0439 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0437\u0430\u043a\u0430\u0437 \u2014 \u043d\u0435\u0432\u044b\u0433\u043e\u0434\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043a\u0430\u0437\u044b \u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u2014 \u0438\u043d\u0432\u043e\u0439\u0441\u044b, \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u043a\u0432\u043e\u0442\u044b, \u0430\u0434\u0440\u0435\u0441\u0430 \u2014 \u044d\u0442\u043e \u043f\u043b\u043e\u0441\u043a\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0443\u044e grid-\u0442\u0430\u0431\u043b\u0438\u0446\u0443.<br \/>  \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DDL-\u043c\u0435\u0442\u043e\u0434\u044b, \u0442.\u043a. \u0438\u0441\u043f\u043e\u043b\u044c\u043e\u0432\u0430\u0442\u044c <b>$this-&gt;run($sql)<\/b> \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ALTER TABLE \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 run \u043d\u0435 \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u043a\u044d\u0448 \u0442\u0430\u0431\u043b\u0438\u0446 Zend \u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0434\u043e\u043b\u0433\u043e \u00ab\u0437\u0430\u043b\u0438\u043f\u043d\u0443\u0442\u044c\u00bb \u0432 \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u0447\u0438\u043d \u043d\u0435\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f \ud83d\ude42<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0437\u0430\u043a\u0430\u0437\u043e\u0432.<br \/>  \u0427\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 community-\u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u2014 JOIN-\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 grid-\u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043b\u044e\u0434\u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 &#8216;sales\/order_grid_collection&#8217;, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u0431\u043b\u043e\u043a Mage_Adminhtml_Block_Sales_Order_Grid, \u0447\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0432\u0435\u0440\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438: \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u0438\u0442\u0430\u043a \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 grid-\u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439?<br \/>  \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0431\u043b\u043e\u043a Mage_Adminhtml_Block_Sales_Order_Grid. \u0415\u0433\u043e \u0430\u043b\u0438\u0430\u0441 \u2014 adminhtml\/sales_order_grid:  <\/p>\n<pre><code class=\"xml\">....         &lt;blocks&gt;             &lt;adminhtml&gt;                 &lt;rewrite&gt;                     &lt;sales_order_grid&gt;Easy_Export_Block_Adminhtml_Sales_Order_Grid&lt;\/sales_order_grid&gt;                 &lt;\/rewrite&gt;             &lt;\/adminhtml&gt;         &lt;\/blocks&gt; .... <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b Adminhtml \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0431\u043b\u043e\u043a\u0430 \u2014 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u0441 \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0438 \u0441 \u0444\u0440\u043e\u043d\u0442\u0430 \u2014 \u0432\u0435\u0434\u044c Sales_Order_Grid \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 Adminhtml, \u0430 \u043d\u0435 Sales, \u0438 \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0449\u0435 \u0438 sales\/order_history \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 Block\/Order \u0440\u044f\u0434\u043e\u043c \u0441 Grid.php \u0435\u0449\u0435 \u0438 History.php, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0435\u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0445\u0435.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <b>app\/code\/local\/Easy\/Export\/Block\/Sales\/Order\/Grid.php<\/b>:  <\/p>\n<pre><code class=\"php\"> &lt;?php class Easy_Export_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid {     protected function _prepareColumns()     {         parent::_prepareColumns();                  $options = array(             null =&gt; $this-&gt;helper('eav')-&gt;__('No'),             1    =&gt; $this-&gt;helper('eav')-&gt;__('Yes'),         );          $this-&gt;addColumnAfter(             'is_exported',             array(                 'header' =&gt; $this-&gt;__('Exported'),                 'index' =&gt; 'is_exported',                 'type'  =&gt; 'options',                 'width' =&gt; '70px',                 'options' =&gt; $options             ),            'status'         );         $this-&gt;sortColumnsByOrder();     } } <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 Exported \u0432 \u0433\u0440\u0438\u0434, \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430. \u0422\u0430\u043a \u043a\u0430\u043a type = options, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 id =&gt; value.<br \/>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e eav\/entity_attribute_source_boolean \u043d\u0435\u043b\u044c\u0437\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c No = 0, \u0430 \u043d\u0435 NULL, \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:  <\/p>\n<pre><code class=\"php\"> &lt;?php require 'app\/Mage.php'; Mage::app('admin'); Mage::getModel('sales\/order')-&gt;load(194)-&gt;setIsExported(1)-&gt;save(); <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 is_exported \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043e\u0431\u0435\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u043f\u0440\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 Mage_Sales_Model_Abstract::_afterCommitCallback \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f updateGridRecords \u0438\u0437 \u0440\u0435\u0441\u0443\u0440\u0441-\u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u043a\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0439 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 grid-\u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0441 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438):  <\/p>\n<pre><code class=\"xml\">&lt;config&gt;     &lt;global&gt; ...         &lt;models&gt;             &lt;easy_export&gt;                 &lt;class&gt;Easy_Export_Model&lt;\/class&gt;             &lt;\/easy_export&gt;         &lt;\/models&gt;         &lt;events&gt;             &lt;sales_order_save_commit_after&gt;                 &lt;observers&gt;                     &lt;easy_export_order&gt;                         &lt;class&gt;easy_export\/observer&lt;\/class&gt;                         &lt;method&gt;exportOrder&lt;\/method&gt;                     &lt;\/easy_export_order&gt;                 &lt;\/observers&gt;             &lt;\/sales_order_save_commit_after&gt;         &lt;\/events&gt; ...     &lt;\/global&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f? \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 app\/Mage.php, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 dispatchEvent \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"php\">     public static function dispatchEvent($name, array $data = array())     {         Mage::log($name, LOG_DEBUG, 'events', true); <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c afterCommit, \u0442.\u043a. \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430. \u0415\u0441\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e afterSave, \u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439 \u0442\u043e \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0433 \u0443\u0436\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e, \u0442.\u043a. \u0432\u0441\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430 \u0438 \u0437\u0430\u043a\u0430\u0437 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 (\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c).<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0430\u043c \u043a\u043b\u0430\u0441\u0441 Observer <b>app\/code\/local\/Easy\/Export\/Model\/Observer.php<\/b>:  <\/p>\n<pre><code class=\"php\"> &lt;?php class Easy_Export_Model_Observer {     public function exportOrder(Varien_Event_Observer $observer)     {         $order = $observer-&gt;getOrder();         \/* @var $order Mage_Sales_Model_Order *\/         if (!$order-&gt;getIsExported() && $order-&gt;getState() == Mage_Sales_Model_Order::STATE_PROCESSING) {             try {                 Mage::getModel('easy_export\/order')-&gt;export($order);                 $order-&gt;setIsExported(1)-&gt;addStatusHistoryComment('Exported order');             } catch (Exception $ex) {                 $order-&gt;addStatusHistoryComment('Failed exporting order: ' . $ex-&gt;getMessage())-&gt;save();             }         }     } } <\/code><\/pre>\n<p>  \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438 \u0437\u0430\u043a\u0430\u0437 \u0443\u0436\u0435 \u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043a\u0430\u0437\u044b \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 PROCESSING \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0434 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u2014 \u044d\u0442\u043e \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043a\u0430\u0437\u044b.<\/p>\n<p>  \u041d\u0443 \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446 easy_export\/order <b>app\/code\/local\/Easy\/Export\/Model\/Order.php<\/b>  <\/p>\n<pre><code class=\"php\"> &lt;?php class Easy_Export_Model_Order {     public function export(Mage_Sales_Model_Order $order)     {         Mage::throwException('Not implemented');     } } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430  <\/p>\n<pre><code class=\"php\"> &lt;?php require 'app\/Mage.php'; Mage::app('admin'); Mage::getModel('sales\/order')-&gt;load(188)-&gt;setDummyValue(1)-&gt;save(); <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0448\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u2014 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 Magento \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 _origData = _data, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f beforeSave\/afterSave\/afterCommit \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439:<br \/>  <code>22\/07\/2014 6:43:43 AM|Processing Customer Not Notified  Failed exporting order: Not implemented <\/code>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 config.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;config&gt;     &lt;modules&gt;         &lt;Easy_Export&gt;             &lt;version&gt;0.0.1&lt;\/version&gt;         &lt;\/Easy_Export&gt;     &lt;\/modules&gt;     &lt;global&gt;         &lt;resources&gt;             &lt;easy_export_setup&gt;                 &lt;setup&gt;                     &lt;module&gt;Easy_Export&lt;\/module&gt;                     &lt;class&gt;Mage_Sales_Model_Resource_Setup&lt;\/class&gt;                 &lt;\/setup&gt;             &lt;\/easy_export_setup&gt;         &lt;\/resources&gt;         &lt;models&gt;             &lt;easy_export&gt;                 &lt;class&gt;Easy_Export_Model&lt;\/class&gt;             &lt;\/easy_export&gt;         &lt;\/models&gt;         &lt;helpers&gt;             &lt;easy_export&gt;                 &lt;class&gt;Easy_Export_Helper&lt;\/class&gt;             &lt;\/easy_export&gt;         &lt;\/helpers&gt;         &lt;blocks&gt;             &lt;easy_export&gt;                 &lt;class&gt;Easy_Export_Block&lt;\/class&gt;             &lt;\/easy_export&gt;             &lt;adminhtml&gt;                 &lt;rewrite&gt;                     &lt;sales_order_grid&gt;Easy_Export_Block_Adminhtml_Sales_Order_Grid&lt;\/sales_order_grid&gt;                 &lt;\/rewrite&gt;             &lt;\/adminhtml&gt;         &lt;\/blocks&gt;         &lt;events&gt;             &lt;sales_order_save_commit_after&gt;                 &lt;observers&gt;                     &lt;easy_export_order&gt;                         &lt;class&gt;easy_export\/observer&lt;\/class&gt;                         &lt;method&gt;exportOrder&lt;\/method&gt;                     &lt;\/easy_export_order&gt;                 &lt;\/observers&gt;             &lt;\/sales_order_save_commit_after&gt;         &lt;\/events&gt;     &lt;\/global&gt; &lt;\/config&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u0432\u043e\u0442 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u043c \u043e\u0431\u0440\u0430\u043e\u043c \u0432 12 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u043a\u0435\u043b\u0435\u0442 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0432 Magento \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0437\u0430\u043a\u0430\u0437\u0430. \u0414\u0430\u043b\u044c\u0448\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0412\u0430\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 Easy_Export_Model_Order. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/230957\/\"> http:\/\/habrahabr.ru\/post\/230957\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\tMagento \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u043c\u0438. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c Alexa, Magento \u2014 \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u043c\u0438 \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430 \u0444\u0435\u0432\u0440\u0430\u043b\u044c 2013 \u0433.<\/p>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0437 \u0432\u0441\u0435\u0445 e-commerce \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u044f \u043e\u0442\u0434\u0430\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e Magento:  <\/p>\n<ul>\n<li>EAV-\u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 Connect (\u043f\u0443\u0441\u0442\u044c \u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u043e)<\/li>\n<li>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li>\u041b\u0435\u0433\u043a\u043e\u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0439 out-of-the-box \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d<\/li>\n<li>\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0438 \u043c\u043e\u0449\u043d\u0430\u044f \u0430\u0434\u043c\u0438\u043d\u043a\u0430<\/li>\n<li>\u0412 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f ecommerce<\/li>\n<\/ul>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-230957","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/230957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230957"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/230957\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}