1. in upgrade script:
<?php $installer = new Mage_Sales_Model_Resource_Setup('core_setup'); /** * Add 'checkout_process' attribute for entities */ $entities = array( 'quote', 'order' ); $options = array( 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER, 'visible' => true, 'required' => false ); foreach ($entities as $entity) { $installer->addAttribute($entity, 'checkout_process', $options); } $installer->endSetup();
2. in config.xml file:
<global>
<fieldsets>
<sales_convert_quote>
<checkout_process><to_order>*</to_order></checkout_process>
</sales_convert_quote>
<sales_convert_order>
<checkout_process><to_quote>*</to_quote></checkout_process>
</sales_convert_order>
<fieldsets>
<events>
<checkout_type_onepage_save_order>
<observers>
<change_checkout_process_observer>
<type>singleton</type>
<class>mycheckout/observer</class>
<method>saveCheckoutProcessToOrder</method>
</change_checkout_process_observer>
</observers>
</checkout_type_onepage_save_order>
</events>
</global>
in Observer file:
public function saveCheckoutProcessToOrder($observer) { $event = $observer->getEvent(); $order = $event->getOrder(); $quote = $event->getQuote(); $ordered_items = $order->getAllItems(); foreach ($ordered_items as $item) { $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $item->getSku()); $checkout_process= $product->getData('checkout_process'); $order->setData('checkout_process', $checkout_process); $quote->setData('checkout_process', $checkout_process); return $this; } }
相关推荐
magento custom menu 可以自己定制的导航菜单
NULL 博文链接:https://hudeyong926.iteye.com/blog/1728074
“#magento2custom”
Magento Order Export
magento入门原版书.。。The Definitive Guide to Magento.pdf
You’ll start by getting a general understanding of what Magento is, why and how you should use it, and whether it is possible and feasible to migrate from an old web store to Magento 2. As you work ...
Ajax-Magento-ajax-add-to-cart.zip,[模块magento 1]magento ajax添加到购物车-ajoter vos produits au panier en ajax/感谢ajax将您的产品添加到购物车,ajax代表异步javascript和xml。它是多种web技术的集合,包括...
Chapter 6, Creating a Magento 2 Theme, discusses the Magento 2 blank theme and how to use the fallback to create seasonal variations. It also explains how the new theme is set up and where files are ...
Get a hands-on introduction to custom shipping and payment methods ☆ 出版信息:☆ [作者信息] Branko Ajzele [出版机构] Packt Publishing [出版日期] 2013年09月25日 [图书页数] 128页 [图书语言] 英语...
Apress.The.Definitive.Guide.to.Magento.Dec.2009.pdf Apress于2009重磅推出的Magento上手书籍,原书地址:http://www.apress.com/book/view/9781430272298
Chapter 6, Creating a Magento 2 Theme, discusses the Magento 2 blank theme and how to use the fallback to create seasonal variations. It also explains how the new theme is set up and where files are ...
Magento cloud - Developing and Maintaining your Cloud Project.
两本关于Magento的点子书 希望大家喜欢 Apress.The.Definitive.Guide.to.Magento.Dec Magento 1.3 Theme Design
magento-custom-stock-status Magento:自定义库存状态兼容:1.5、1.6、1.6.1、1.6.2.0、1.7、1.8、1.8.1、1.9、1.13、1.14 注意:安装前检查社区版本视图文件
New GUI added 10 predefined block positions on each page Ability to place any block in any position by easily ... Meets Magento programming practices for most versions and customizations compatibility
概述该存储库包含将Magento 2与TurnTo的Social Commerce服务连接的Magento 2扩展。 与Magento社区和企业版2.1.x-2.3.x兼容。安装说明使用Composer安装(推荐) 在您的Magento根安装目录中运行以下命令: composer ...
magento数据结构分析 magento数据字典
一般magento是不可以删除订单的,有了这个就可以删除了,不过删除完就无法再恢复,此插件在1.7.0.2上可以使用
magik shoes magento 模板, magento 1.7 模板