New answers tagged

0

Create a setup/upgrade script using \Magento\Sales\Setup\SalesSetupFactory and create an event for sales_order_save_before to set the new attribute.


1

Turns out I was authenticated with a customer token, and customers don't have access to that resource (editing it at least). I logged in as admin and am now able to change orders.


0

Try this code $order_id = 000000001; $order_data = $this->orderRepository->get($order_id); if (!empty($order_data)) { foreach ($order_data->getAllItems() as $value) { echo "Product Name: ".$value->getName()." Product ID: ".$value->getProductId(); } } I Hope This Helps You.


1

You need to add all columns in app/code/Vendor/OrderGrid/view/adminhtml/ui_component/sales_order_grid.xml Then you need to control the column visibility dynamically. To do that override the 'prepare' method on the Vendor\OrderGrid\Component\Fields.php like below public function prepare() { parent::prepare(); if ($this->canShowColumn())...


1

Currently there is no table which saves the data to check if a products was added through cross-sell or up-sell property. But for related products, the information is stored in product_options column of sales_order_item table. You can find related_product key in the json of info.


0

API do returns fixed response. If your worry is about optimisation or readability, you can add a custom API point that queries the same repository and then you can parse the response so that only what you need is sent. Also, you may be interested in GraphQl which by design can return any subset of the possible returned data.


0

Add this type of code in your xml my UI component file name : inquiry_record_inquiry_list.xml Datasource name is : inquiry_record_inquiry_list_data_source Column name is : inquiry_records_columns Route name : productinquiry Controller name : productinquiry ...................................................... ..............................................


0

First you change the developer mode if it is production mode using below command . php bin/magento deploy:mode:set developer Check following blog if you face any issue.https://magehit.com/blog/how-to-set-developer-mode-in-magento-2/. After that you run following command php bin/magento setup:di:compile you can see errors if it exist in any module.Than you ...


0

I also get the same issue and solve this as below by change deploy mode from developer to production: bin/magento deploy:mode:set production


Top 50 recent answers are included