Questions tagged [post-data]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
90 views

Form key validation

Can't succeed to make a post frontend form to work <form class="form" name="download-form" action="<?= $block->getUrl('booklets/booklet/email') ?>"...
  • 1,024
1 vote
1 answer
132 views

Magento2: url redirection in controller_action_predispatch observer with setting post parameters

I am working on cms page restriction for specific customer group.I am using controller_action_predispatch event observer to check whether the current page is set for restriction and the current ...
1 vote
0 answers
324 views

Magento 2 REST API Add validation for data interface payload

I have created a custom REST API to save data into my table. My table contains many fields so I am using the DataInterface structure for payload. Now I need to add a validation like as below { "...
0 votes
1 answer
178 views

Disable First & Last name in customer account and pass the existing value to POST

I want to prevent customers from changing their first and last name once they're registered but I want to allow them to change the password in a customer account. I added disabled = "disabled&...
1 vote
1 answer
591 views

Magento 2 Invalid Form Key when post to a controller

I'm trying to send a form from a Java Spring Application to Magento. What I'm doing in Java is just creating an standard form and on action I wrote Magento's controller path. Like this: http://ip/...
-3 votes
3 answers
550 views

I want to develop custom grid module with add buttons in Magento2 [duplicate]

I want to create custom module in which grid in backend with all add,edit,delete,and mass delete and also with buttons in grid for reset,back,delete,save and display it on frontend. so can anyone have ...
  • 537
0 votes
1 answer
782 views

multiple image in array in input field custom form in magento 2.4

Now i am using input field file[] array so how to $filesData = $this->getRequest()->getFiles('files'); use foreach loop <input type="file" name="file[]" id="file"...
1 vote
1 answer
819 views

How to open new tab on button click and send post data?

I've been trying to make my button open a new tab, the same way my form is doing but I've discovered that window.open() doesn't work on POST requests. SO, is there any other way I can make my button ...
  • 71
1 vote
0 answers
42 views

Error 400 while trying to POST to orders

When I try to create an order, I get the error 400, can someone help me? Things that may help you guys help me I'm using NodeJS with Express Data that I'm trying to post { "entity&...
  • 21
0 votes
1 answer
147 views

Magento 2 can't remove post params when reload

I'm trying to import stock using csv. When I click on submit, the import functionality works fine. But when i click on reload when it is posting then it loads until the post function completes. <?...
  • 816
1 vote
2 answers
120 views

Undefined property: SimpleMagento\\Custom\\Controller\\Test\\First\\Interceptor::$getRequest ....... In controller

Error in controller :- Undefined property: SimpleMagento\Custom\Controller\Test\First\Interceptor::$getRequest .......While fetching data from custom form. Can someone provide me solution or how to ...
1 vote
1 answer
802 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 ...
3 votes
1 answer
153 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
1 answer
281 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
1 answer
644 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
3 answers
2k 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
4 answers
2k 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:...
  • 98
3 votes
2 answers
420 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
2 answers
1k 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
1 answer
916 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,057
1 vote
1 answer
129 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"&...
2 votes
2 answers
1k 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 ...
  • 31
3 votes
1 answer
2k 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
0 answers
275 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
2 answers
7k 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-...
  • 1,655
0 votes
1 answer
835 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
3 answers
17k 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
2 answers
6k 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
2 answers
2k 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
1 answer
118 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 ...
  • 660
0 votes
1 answer
100 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
2 answers
6k 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' ...
  • 7,534
0 votes
1 answer
1k 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
0 answers
32 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 ...
  • 11
0 votes
1 answer
343 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
0 answers
45 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 ...
  • 11
0 votes
1 answer
802 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 ...
  • 2,777
8 votes
3 answers
10k 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,777
2 votes
0 answers
195 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 ...
  • 21
0 votes
0 answers
308 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/...
  • 784
4 votes
2 answers
4k 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,782
1 vote
0 answers
43 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
0 answers
48 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 ...
  • 143
0 votes
1 answer
370 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 ...
  • 11.5k
0 votes
2 answers
2k 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
0 answers
939 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
3 answers
3k 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 ...
  • 387
0 votes
1 answer
3k 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?
  • 3
4 votes
2 answers
3k 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
2 answers
3k 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 ...