1. Fist, Add a shipped status in backend
2.rewrite Mage_Adminhtml_Sales_Order_ShipmentController
<config> <admin> <routers> <adminhtml> <args> <modules> <Bysoft_Mysales before="Mage_Adminhtml">Bysoft_Mysales</Bysoft_Mysales> </modules> </args> </adminhtml> </routers> </admin>
<?php include_once("Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php"); class Bysoft_Mysales_Sales_Order_ShipmentController extends Mage_Adminhtml_Sales_Order_ShipmentController { protected function _saveShipment($shipment) { $shipment->getOrder()->setIsInProcess(true); $order = $shipment->getOrder(); $order = Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId()); $state = 'processing'; $status = 'shipped'; $comment = 'Changing state to Processing and status to shipped Status'; $isCustomerNotified = false; $order->setState($state, $status, $comment, $isCustomerNotified); $order->save(); $transactionSave = Mage::getModel('core/resource_transaction') ->addObject($shipment) ->save(); return $this; } }
3. add a confirm controller for frontend , make cusotmer to confirm the order
<config> <frontend> <routers> <mysales> <use>standard</use> <args> <module>Bysoft_Mysales</module> <frontName>mysales</frontName> </args> </mysales> </routers> </frontend>
<?php class Bysoft_Mysales_ConfirmController extends Mage_Core_Controller_Front_Action { public function saveAction() { $order_id = Mage::app()->getRequest()->getParam('order_id'); if(Mage::getSingleton('customer/session')->isLoggedIn()) { $customerData = Mage::getSingleton('customer/session')->getCustomer(); $customer_id = $customerData->getId(); $order = Mage::getModel('sales/order')->load($order_id); if ( $order->getCustomerId() == $customer_id) { $order->setData('state', "complete"); $order->setStatus("complete"); $history = $order->addStatusHistoryComment('Order status to complete by customer confirm.', false); $history->setIsCustomerNotified(false); $order->save(); $message = $this->__('You have confirmed the order.'); Mage::getSingleton('core/session')->addSuccess($message); $this->_redirectReferer(); } else { return ; } } else { return ; } } }
相关推荐
- **Receipt of Goods**: RMAs that involve physically receiving returned goods and processing credits if applicable. - **Sales Agreements**: Contracts between the seller and buyer for the supply of ...
在Laravel框架中进行开发时,"status"通常指的是应用中的状态管理,这涉及到数据模型的状态字段、状态更新逻辑以及与用户界面的交互。在Cartalist平台中,"status"可能涉及订单状态、用户账户状态、商品库存状态等多...
语言:Deutsch,English,Français ... 此扩展名可让您只搜索亚马逊直接销售和发货的产品。 只需在亚马逊网站上单击蓝色按钮... 亚马逊的隐私政策有关Http://www.amazon.com/gp/help/customer/display.html?nodeid=468496
moving world, no software project can afford to go through development, then an integration phase of unpredictable length and complexity, and finally be shipped to the customer — just to find out ...
Today, Windows developers rely upon the power, flexibility and reliability of the SMS and Pager Toolkit by ActiveXperts Software.SMS and Pager Toolkit is a COM component, and provides SMS and Pager ...
Further on, containers are shipped and run everywhere without any hassle, hitches, and hurdles. The containerization concept has made IT infrastructures and processes agile and adaptive. This means ...
CRC Press ARM Assembly Language Fundamentals and Techniques 2009 William Hohl Publication Date: March 13, 2009 | ISBN-10: 1439806101 | ISBN-13: 978-1439806104 | Edition: 1 Written by the director of ...
TheResource Strings Wizard allows you to extract and add to translation data the resource strings of your project even if they are hidden somewhere in a .dcu (.obj) file without the source code. ...
英语中的“state”和“status”虽然在中文中都可翻译为“状态”,但在实际使用中,它们有着明显的差异。了解这些差异对于精确地表达思想和理解英文文本至关重要。 首先,“state”一词通常用于描述一种持续性或稳定...
Where are the rest of the utilities, such as make and gdb? Jan-Jaap has made most of these tools available from his site, and I see no reason to duplicate them. His site can be reached from the ...
// Get all orders for a customer that are shipped List orders = Order.where("customer_email", "dummyemail@dummy.com", "status", "shipped"); // Get all orders for the product ...
TWAIN defines a standard software protocol and API (application programming interface) for communication between software applications and...Source software and do not need to be shipped by applications.
WHERE customerNumber = cust_no AND status = 'Shipped'; -- 计算取消订单数 SELECT COUNT(*) INTO canceled FROM orders WHERE customerNumber = cust_no AND status = 'Canceled'; -- 计算解决订单数 ...
Cisco Shipped developer Vagrant box (shipped-devbox) 构建代码。 提供 CentOS 7 x86_64(最低) 码头工人 Docker-compose 要求 VirtualBox >= 4.3.14 打包机 制作 互联网 Packer安装注意事项:将可执行文件复制...
).- Added the property FileStream to the class TAtachedFile and the procedure SaveToStream, this was done by Brian Sheperd- The address separator (in the TO: field) is ‘,‘ and ‘;‘ now (before it ...
-允许您从亚马逊添加产品-自动向您显示最终价格-结帐并将订单放置在shipped.io网站上-交货最快到家门口(最多2-3周)有什么问题吗? 我们希望收到您的来信:-给我们发电子邮件info@shipped.io-检查我们的网站“ ...
With more than 1.5 billion devices shipped to date and dozens of licensees, the RivieraWaves Bluetooth IP is widely deployed in consumer and IoT devices with many of the world's leading ...
With more than 1.5 billion devices shipped to date and dozens of licensees, the RivieraWaves Bluetooth IP is widely deployed in consumer and IoT devices with many of the world's leading ...