Questions tagged [post-data]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
3answers
8k 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 ...
5
votes
1answer
8k 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 ...
4
votes
2answers
3k 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\...
4
votes
4answers
1k 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:...
4
votes
3answers
5k 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/...
4
votes
3answers
3k views

No response from POST to custom REST Api route

I set up a working custom route for Magento's REST Api. It works fine for GET requests, as the _retrieve() function of the corresponding V1.php class is being called as expected and returns the data. ...
4
votes
1answer
3k views

Product POST call to Magento REST API results in 302 and redirect (Nginx)

Having an issue when POST'ing to the Magento 1.9 REST API. Magento is being served by Nginx 1.8.0 using OAuth (successfully authenticating). My Magento rewrite config for the API looks like this: ...
4
votes
2answers
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
2answers
2k 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 ...
3
votes
1answer
14k 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 ...
3
votes
2answers
2k 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 ...
3
votes
1answer
114 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": "...
3
votes
2answers
106 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'); $...
3
votes
0answers
905 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 !
3
votes
1answer
312 views

problem with 1.9.1.1 & email template

After some actions - especially relating to transactional emails - in the frontend (e.g. new customer signup, newsletter signup, forgot password etc.) there's a blank page (e.g. www.domain.com/...
2
votes
1answer
3k views

Magento Admin Form Post Data Missing

I am developing a custom magento (1.9) module and have created a form in the admin to add / edit an entity called "subscription". This will either create a new subscription object or edit an ...
2
votes
3answers
748 views

IndexController: loadLayout() not working inside postAction() (Helper_Data not found)

I always get following error when calling $this->loadLayout() inside postAction() of my IndexController: Fatal error: Class 'Mage_Package_MyModule_Helper_Data' not found in C:\xampp\apps\magento\...
2
votes
1answer
1k 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
1answer
660 views

why magento use complicated method?

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate"> and <form action="<?php echo $this->getUrl('customer/account/createpost'); ?>" ...
2
votes
2answers
595 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 ...
2
votes
1answer
586 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 ...
2
votes
0answers
117 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::...
2
votes
0answers
184 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 ...
2
votes
1answer
2k views

Send order information to a third party payment gateway

I have to make a new payment module which redirect to a third party payment gateway. When the customer click the PAY button the POST parameters (order details) need to be sent to the gateway. (And ...
1
vote
2answers
4k 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' ...
1
vote
3answers
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 ...
1
vote
2answers
40 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
1answer
455 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
5k views

Magento 1.9 Get post data from contact form in a view

I'm trying to get a success message on the contact page. When the form is send i want to show the message. So i need the post data from the form. I tried this: $postdata = Mage::app()->...
1
vote
1answer
25 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/...
1
vote
1answer
238 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 ...
1
vote
0answers
21 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&...
1
vote
1answer
427 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 ...
1
vote
1answer
51 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"&...
1
vote
1answer
85 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 ...
1
vote
0answers
29 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 ...
1
vote
0answers
43 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 ...
1
vote
0answers
42 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
46 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 ...
1
vote
0answers
211 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 ...
0
votes
2answers
4k 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
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?
0
votes
1answer
74 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....
0
votes
2answers
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); $...
0
votes
1answer
281 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
3answers
1k 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+'&...
0
votes
2answers
752 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'])) { $...
0
votes
2answers
5k 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
807 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 ...
0
votes
1answer
313 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'...