Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace VendorModuleController;
- class Save extends MagentoFrameworkAppActionAction
- {
- public function __construct(
- MagentoSalesModelOrderItem $orderItem,
- MagentoFrameworkAppActionContext $context,
- MagentoFrameworkViewResultPageFactory $resultPageFactory
- ) {
- $this->orderItem = $orderItem;
- $this->result_page_factory = $resultPageFactory;
- parent::__construct($context);
- }
- public function execute()
- {
- $orderId = 1;
- $order = $this->orderItem->getById($quote_id);
- $order->setCustomField('data you want to save');
- $order->save();
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement