Magento 2.2.2 Plugin how to add custom field in request api

I’ve create a plugin to listen to api POST /V1/order/:orderId/refund and I would like to receive custom field. I’ve added a field for testing like: name:[‘test’] Body E.G: { “items”: [ { “extension_attributes”: {}, “order_item_id”: 7, “qty”: 1 } ], “isOnline”: false, “notify”: true, “appendComment”: true, “name”: [ { “test”: “ok” } ], //THIS IS…

Magento 2.2.2 Plugin how to add custom field in request api

I’ve create a plugin to listen to api POST /V1/order/:orderId/refund and I would like to receive custom field. I’ve added a field for testing like: name:[‘test’] Body E.G: { “items”: [ { “extension_attributes”: {}, “order_item_id”: 7, “qty”: 1 } ], “isOnline”: false, “notify”: true, “appendComment”: true, “name”: [ { “test”: “ok” } ], //THIS IS…

Magento 2.2.2 Plugin how to add custom field in request api

I’ve create a plugin to listen to api POST /V1/order/:orderId/refund and I would like to receive custom field. I’ve added a field for testing like: name:[‘test’] Body E.G: { “items”: [ { “extension_attributes”: {}, “order_item_id”: 7, “qty”: 1 } ], “isOnline”: false, “notify”: true, “appendComment”: true, “name”: [ { “test”: “ok” } ], //THIS IS…

Magento 2 Filter product collection by multiple attributes with OR

In Magento 2.3.3, How Can I Filter Product Collection by Multiple Attributes? First attribute SKU needs to check using “IN” second attribute is yes/no value. I need to filter collection by SKU array OR custom_attribute. I have tried few things but it did not return expected results. $collection = $layer->getProductCollection()->addAttributeToFilter( array( array(“attribute”=>”sku”,array(‘in’ => $skus)), array(“attribute”=>”universal_fitment”,”eq”=>1)…

Magento 2 – Custom route is redirect to catalogsearch

In Magento 2, I defined routes for a custom module like this : <?xml version=”1.0″ ?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:App/etc/routes.xsd”> <router id=”standard”> <route frontName=”myroute” id=”myroute”> <module name=”Vendor_ModuleName”/> </route> </router> </config> But when I enter : https://mywebsite.com/myroute I am redirected to : https://mywebsite.com/catalogsearch/result/?q=myroute&amnoroute Do you have any idea to solve this problem ?

Magento2 Ui Component not rendering second parameter from URL while using ResourceModel collection

Here I am passing two params in URL “store_id” and “careg”. But “careg” parameter not rendering in resourcemodel collection. <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”component” xsi:type=”string”>Magento_Ui/js/grid/provider</item> <item name=”update_url” xsi:type=”url” path=”mui/index/render”/> <item name=”filter_url_params” xsi:type=”array”> <item name=”store_id” xsi:type=”string”>*</item> <item name=”careg” xsi:type=”string”>*</item> </item> <item name=”storageConfig” xsi:type=”array”> <item name=”indexField” xsi:type=”string”>id</item> </item> </item> </argument>