The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [post-data]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
23 views

Magento 2 how to receive a webhook body?

I'm doing an integration with a system called Sift Science. What I need to accomplish is to receive a response whenever someone in Sift Science performs an action (for example> Approve account, ban ...
0
votes
0answers
8 views

Magento 2: Get Raw POST data whenever /shipping-information API is hit

I am using a headless magento 2 for my store, and am having some data consistency problems with shipping addresses. To troubleshoot this, I was thinking about saving the POST body whenever these API ...
0
votes
0answers
15 views

How to save file in directory using ajax post with php in magento 2

I have a Js code in my phtml like below. var data = new FormData(); data.append("data" , "the_text_you_want_to_save"); var xhr = new XMLHttpRequest(); xhr.open( 'post', 'http://mysite/...
3
votes
1answer
25 views

install Magento 2 API Client

I want to install this dial but I do not understand or obtain GIT_USER_ID and GIT_REPO_ID.git https://github.com/netz98/magento2-swagger-api-client-demo { "repositories": [ { "type": "...
0
votes
1answer
28 views

How to retrieve manufacturer id?

How to retrieve manufacturer id? $api = new maRest("www.host.com/magento/"); $api->connect("user","xxxxxxx"); $manufacturers = array( "option" => array( 'label' => "Sony", ...
0
votes
1answer
30 views

How to solve Post/Get Method use in postman with Magento controller?

I am using Magento controller URL with Postman. When I select Get Method in postman then it runs perfectly with execute method. But when I use the Post Method that time it breaks from the execute() ...
0
votes
2answers
97 views

How to Post data from ajax get by post not working in postman?

Below is my code when I try to post data but not working URL is http://localhost/test1/modulename/login/request my ajax code for javascript var request_data = 'id='+id+'&name='+name+'&...
4
votes
4answers
197 views

Magento 2 frontend route only allow POST method

I'm using magento 2.2.5 and created a frontend route like this: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
3
votes
2answers
23 views

Magento 2 Set $_POST to an empty Array()

I can't seem to find a way to set $_POST to an empty array. I have a form in phtml action to self I can get $_POST values the following ways: $this->getRequest()->getPostValue('form_key'); $...
0
votes
0answers
21 views

“Unable to save stock item” error when using /v1/products REST call

I'm attempting to use cURL to update the stock for an item - it connects, and the item exists (tried using an invalid sku to test), using the below code. However, it throws an error, and I can't ...
0
votes
1answer
158 views

Direct use of $_FILES Superglobal detected. In magento 2

Direct use of $_FILES Superglobal detected. I have Used for get image file in backend. protected function getTmpFileName() { $tmpName = null; if (isset($_FILES['groups'])) { $...
1
vote
1answer
54 views

how to use post method to contoller and phtml for button event in magento 2

I have a button in phtml file some.phtml <button class="example-button-1 example-button-3 :active" type="button" id="acceptnow" ><span>Active</span></button> I want to ...
1
vote
1answer
18 views

Magento 2 ui form multiselect field not checked not in $_POST

I have multiselectin my form displaying all store view available one is selected when I save only one show in the post array: <field name="store"> <argument name="data" xsi:type="array"&...
0
votes
0answers
24 views

Adminhtml form how to post and save image data

Trying to customize my module a bit but I'm stuck. My custom form won't send any information about attached images or files, regardless of what I'm doing it just does not send anything except text, ...
2
votes
2answers
182 views

How to save data from a checkout text form

I've tried multiple ways and sources of trying to save data in Magento 2.3 and I cannot think of what more I can try to get this working. I'm trying to add a simple textarea and save the data somehow ...
0
votes
1answer
350 views

Magento 2 - Request from Javascript is returned with Status code 302

I´m sending a POST request with data via XMLHttpRequest. The response that I´m getting do have the status code 302. Javascript function: function createCSV() { let xhttp = new XMLHttpRequest(); ...
2
votes
0answers
66 views

How to post form data from Unit Test controller to custom controller | Magento 2

I have a custom module with form. I want to post values from unit test file to my custom module controller. I tried $this->request = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::...
0
votes
2answers
2k views

Magento2 : How to make a redirect with params

I have a form with several inputs.(text and file). <form id="form-configurator" class="form-configurator " name="formconfigurator" action="index/toto" method="post" enctype="multipart/form-...
0
votes
1answer
99 views

Magento 1.9: How do I know if my form is working? Handling post information

I was looking in implement a form that collect a customers name and email information by writing the information into a CSV file. I'm completely new to Magento and got help with the following code ...
0
votes
2answers
10k views

Sending ajax POST data to controller

This is my ajax request: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ ...
0
votes
2answers
1k views

Magento 2 | Get Post Params

I created my own admin route. This is it's controller: Route controller <?php class Mediabase extends \Magento\Sales\Controller\Adminhtml\Order { public function execute() { ...
0
votes
1answer
532 views

Magento 2.2.4 : post data in url

I want to get parameters from my page to the second. My values are submitted in the first page, but I can't achieve to get data on my second page (where I want to display theses data). I'm trying this ...
1
vote
1answer
67 views

Product grid not posting values M2

I am using this extension https://github.com/webspeaks/productsgrid_magento2/tree/master/Webspeaks/ProductsGrid for my custom module where am attaching the product to the series. But when I post data ...
0
votes
1answer
57 views

Magento2: Web service Call POST method

I wanted to call Web service using POST method and attache the Data values. Here is my URL : http://api.geonames.org/citiesJSON which takes below data in POST. north=44.1&south=-9.9&east=-22....
1
vote
2answers
1k views

how to get post data in Magento Model File - Magento 2x

I want to get POST data in Model file, Which is my custom file of AccountManagement /app/code/[Vendor]/[Module]/Model/AccountManagement.php Note: I can access it through $_POST, 'superglobal' ...
0
votes
1answer
389 views

Magento2.2 Custom form not sending data via email

I have followed this post about creating a form that sends data to a specific email. The module works, but the form isn't sending data to the given email. For simplicity I am going to paste the code ...
1
vote
0answers
25 views

Magento Admin Strip of Post Data

all, Got problem on catalog product page of Magento admin. I have a customer tab called DC, which sets design and colour for a product. A product has multiple designs and one design has multiple ...
0
votes
1answer
229 views

Where can I edit the post product review action/handler?

I'm trying to resolve this ridiculous issue that nobody can shed any light on Unable to post product reviews on secondary store site; displays recaptcha error but no recaptcha is present in form? It'...
1
vote
0answers
40 views

Inserted text via JS is not in POST

I've got a custom backend module. This module has a form created with xml and .phtml file. In form there's some inputs, selects and textarea (the problem). In .phtml file there's only buttons which ...
0
votes
1answer
536 views

Call an external URL and post data to it (same as an HTML form does) from a controller

Is it possible to use $this->_redirect() in a controller to call an external url and post data to it the same way an HTML form does in Magento 2.2? If yes, how? If no, any suggested alternatives ...
5
votes
2answers
4k views

How to post data to a payment provider when placing an order in Magento 2

The issue I'm trying to integrate an online credit card payment service in Magento 2.2, but it's tough to understand all the docs on this topic at first, so I'm looking for some guidance. What I ...
2
votes
0answers
173 views

AddToCart using GET and Query String in Magento 2.2

I am currently migrating a store from Magento 1.7 to Magento 2.2 On many of our product pages there is a button to order a free sample which is achieved by adding a product 'free sample' with options ...
0
votes
0answers
257 views

Magento Admin Form Data blank when got Session Error message

I am checking a field for unique data, I put this code: if ($data = $this->getRequest()->getPost()) { if($data['cs']['company_name']){ $checkCollection = Mage::getModel('test/...
3
votes
2answers
2k views

How to get post values in catalog_product_save_after observer in Magento 2?

<?php namespace Maxime\Helloworld\Observer; use Magento\Framework\Event\ObserverInterface; class Productsaveafter implements ObserverInterface { public function execute(\Magento\Framework\...
1
vote
0answers
40 views

How to treat POST data incoming to Magento

I prepare little integration for Magento 2.1 with some other app, comunicating with reqeusts containing $_POST data. Are there any good practices how to treat such a data incoming to store? Should I ...
1
vote
0answers
45 views

POST data not seen in stores after 1.7 -> 1.9 upgrade

I recently upgraded our Magento from v1.7 to v1.9.3.2, and now I'm noticing something strange - none of the POST requests seem to be working on the stores, but they do work on the Magento admin ...
0
votes
1answer
282 views

Add function in a custom attribute on save - Magento 1.9

I want to do some function in my custom attribute on saving in customer/account/edit,my idea is 1-rewrite the editPostAction() or 2- create an observer on this saving event. So i rewritted the ...
0
votes
2answers
1k views

What is second argument in getRequest()->getPost()

What is the use of second argument in getRequest()->getPost? $products = $this->getRequest()->getPost('products', -1); $products = $this->getRequest()->getPost('products', 1); $...
3
votes
0answers
703 views

Magento2 NodeJS: SOAP or REST API?

Does anyone know a good module that can use HTTP VERBS like POST and PUT ?. I tried this one magento2 but only managed to use GET and DELETE ... Hope someone has a few ideas !
1
vote
3answers
2k views

Magento New Product Attribute Not Saving

I am having an issue in Magento where custom product attributes are not updating. When setting the new attributes under Catalog->Manage Products->Product->General, the post data for that specific ...
0
votes
1answer
1k views

How to generate formkey in Magento and send a POST request?

Magento uses some sort of form key to send POST data. I want to send POST data to a controller in Magento and receive it. How do I do that?
4
votes
2answers
2k views

How to send post data with redirect from magento 2 for a payment gateway?

we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php public function execute() { $order = $this->getOrder(); if ($order->getBillingAddress()) { $...
3
votes
2answers
1k views

magento 2 get empty post array in version 2.0.5

I tried every possible thing get when I using the get method it works fine but post does not send any value. using this in my controller. $post = $this->getRequest()->getPostValue(); but got ...
1
vote
0answers
205 views

Error on cart and checkout In magento2

I am just testing magento2 from product page so i added one hidden field and added data URI of image like following data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABU But when i go to the cart or ...
3
votes
1answer
12k views

Magento 2 simple form submit

To understand the new magento 2 design structure i'm trying to create a simple frontend form submitting module. In it i'm submitting a number in an input box and i want to multiply it by 2 and display ...
0
votes
1answer
125 views

saveAction stores empty object

Whenever I fill a form and click "Save", magento doesn't get the form data. It just saves an empty object in the database. I can't figure out why. Here's my form and file structure: Form File ...
4
votes
3answers
4k views

Magento 2 checkout new field is excluded from post data

I have this module for add newsletter subscription to checkout page in a Magento 2 project. I have added a checkbox field by following code: app/code/MyNamespace/MyModule/Plugin/Checkout/Model/...
2
votes
1answer
510 views

Magento does not pass empty varible in POST data

I am using Magento community and I have below problem. I have created a module which adds a product to customer groups. I have added checkboxes for all the customer groups in a tab using Ajax tab ...
3
votes
2answers
1k views

Magento 2 how to pass order id's from sales order grid to my module controller

I am working on a custom module. I need order data in my own controller. I want users to use the checkboxes to select orders so i can use the order id's/data in my controller. How do I do this? What ...
5
votes
1answer
7k views

Magento 2: How to get Post data in backend/adminhtml?

I have added a massaction to the sales order grid in Magento 2. I want to pass on the POST data (the checked orders) to my custom controller/page which is setup and working as expected. How do I ...