Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 80220

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

3 votes
1 answer
2k views

How to rewrite QuoteManagement in magento 2

I'm trying to extend the class "QuoteManagement", but when I try to make the payment, an error is returned. My code: di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema …
Luis Faconi's user avatar
1 vote
0 answers
474 views

Magento 2 : How to create custom API

I'm trying to create a POST call to a custom API for magento 2 , but I do not know how to do this. What is the correct way to do this request? Code: webapi.xml <?xml version="1.0"?> <routes xml …
Luis Faconi's user avatar
0 votes
Accepted

As capture the token that came through the head and send it to a function that I created mys...

I found a possibility: use Magento\Framework\Webapi\Rest\Request; $header = $this->request->getHeader('Authorization');
Luis Faconi's user avatar
0 votes
1 answer
26 views

As capture the token that came through the head and send it to a function that I created mys...

I'm trying to customize the Magento API Engine 2. I would like to know if there is any time of the request, before arriving at webapi.xml to capture the token that came through the head and send it to …
Luis Faconi's user avatar
1 vote
0 answers
254 views

Override PlaceOrder and change Grand Total

I am modifying the placeOrder function of the QuoteManagement class, based on some information I found through searches, I was able to change the method so that an order is generated for each seller, …
Luis Faconi's user avatar
2 votes
5 answers
10k views

Filter customer collection by custom attribute in magento 2

I created a custom attribute for customer and would like to filter my collection through it. My UpgradeData: if (version_compare($context->getVersion(), '1.0.6', '<')) { $attributesInfo = [ …
Luis Faconi's user avatar
2 votes
0 answers
268 views

Add product with customized option in the cart through API

I'm having a problem adding a product with custom options in the Magento cart 2.3.1. After defining a custom option as multiple selection, I tried to add the product to the cart with the following re …
Luis Faconi's user avatar