Skip to main content

Questions tagged [parameter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
619 views

Magento 2: How to pass the parameters to another URL?

I'm new in magento 2, my question is how to send parameters with results responses to another url whenever i click "Place Order" and before proceeding to success page. Using event and ...
vinz vinz's user avatar
4 votes
4 answers
2k views

How to show data in grid based on url parameter in magento 2 custom form?

I created a custom form to save the data(category - table_category). In the form page i have a grid which shows Faqs related to the category. Currently i am getting all the faqs(table_faq), which are ...
Mujahidh's user avatar
  • 2,813
0 votes
1 answer
65 views

how do I write a paremeterized delete query using json_extract?

I would like to write a query like delete from inventory_reservation where JSON_EXTRACT(metadata, '$.object_increment_id') = '<increment_id>' So I created my expression in my code like $...
gabtzi's user avatar
  • 666
0 votes
1 answer
3k views

Magento 2: Graphql how to pass productids as parameter (array) in query

I'm trying to pass productids in the query but I'm not sure how to define it and also need to loop through it, I'm using for each it's showing SyntaxError. I have tried using the productids as ["...
Mohit Rane's user avatar
  • 1,965
1 vote
4 answers
1k views

Get 'utm_' campaign parameters in controller

I am trying to get the campaign values from the URL parameters, for tracking in Magento, inside a controller action. I am using \Magento\Framework\App\RequestInterface->getParam('utm_source') and ...
Dan's user avatar
  • 31
1 vote
1 answer
6k views

In InstallCommand.php line 274: Parameter validation failed

I have problem installing magento 2.4.2 It shows me an error (In InstallCommand.php line 274:Parameter validation failed ) Help me Thanks php bin/magento setup:install --base-url=http://127.0.0.1/...
user97988's user avatar
1 vote
0 answers
391 views

How to access widget configuration options in Block class?

Although there's a similar question asked, it doesn't have an answer as the comment there refers to a question which has a comment that shows how to access the admin panel configuration parameters in ...
askepott's user avatar
  • 113
1 vote
0 answers
114 views

How can you have multiple dependences for a single parameter in a widget.xml file?

Like many things with Magento widgets, this should be simple but clearly isn't. How can I use the same depends logic but for multiple parameter values? so <depends> <parameter name="...
Pyper's user avatar
  • 11
1 vote
0 answers
112 views

Magento2 : How To Access Custom Parameter's of Admin Url in admin login page

this is my admin url : http://127.0.0.1/m2-test/index.php/admin?username=test and i want to access username value in admin login.phtml i have tried with $_GET["username"] but it will return nothing ...
Sanjay Shiyal's user avatar
0 votes
2 answers
40 views

How to Get API Paramter?

I use a custom API with Delete Method. I would get this paramter. { "id":"1" } How can i get it in my api response? etc/webapi.xml <?xml version="1.0"?> <routes xmlns:xsi="http://www....
Ibrahim Aldar's user avatar
0 votes
0 answers
712 views

Magento 2 - Pass Currency Param in URL

I want to add Currency parameter in Magento 2 page URL.Like www.example.com/product.html?currency=GBP Is there any way to do this? Need help.Thanks EDIT: Created a plugin but not working di.xml &...
Shoaib Saleem's user avatar
8 votes
2 answers
3k views

Submit custom form in Magento 2.3 admin

I'm creating a custom form in Magento 2.3 admin. Vendor/Module/view/adminhtml/layout/route_folder_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Rizwan Dhuka's user avatar
2 votes
2 answers
3k views

Magento 2 pass data from template phtml to js file

I want to call an ajax function on a button click. All other things are working fine. But I can't read the parameter which is passed to the js. How can I do it? Here is my code. Phtml file <...
Jancy Abraham's user avatar
2 votes
2 answers
7k views

Magento2 : How To Get Parameters from URL In Controller

http://mystagesite.com/magento232/custom/module/check/?params=<%3Fxml+version%3D"1.0"+encoding%3D"UTF-8"+standalone%3D"yes"%3F>6<%2FRESPONSECODE>Invalid+Session+Token%3A+Session+has+Timed+Out<...
Sanjay Shiyal's user avatar
1 vote
1 answer
352 views

Append extra param for my Magento 2 entire site dynamically

my requirement is like one magento site with having some query params. By starting website with www.abc.com/?id=1-2-3 like this i want carry this query param my entire site can any one how can achieve ...
Pawankumar's user avatar
0 votes
1 answer
583 views

Error occurred when creating object

I have a plugin with constructor <?php namespace Vendor\Contact\Plugin\Controller\Index; use \Zend_Validate; use Magento\Contact\Controller\Index\Post; use Magento\Framework\App\Request\Http; use ...
Михайло Годованюк's user avatar
0 votes
0 answers
918 views

Create Custom API with multiple values of a parameter magento 2

I am trying to create a new API which calls the existing methods to get products data inside my custom method I wanted to accept multiple values of a parameter (comma separated) eg. parameters key ...
SharmaV's user avatar
  • 129
0 votes
0 answers
22 views

Magento Router getParams() duplication reach 100 iteration

Not sure why I am having this issue any help appreciated. When I check: $request->getModuleName(), it is already set and $request->getControllerName() is also already set, the only one that isn'...
Juliano Vargas's user avatar
1 vote
2 answers
4k views

Magento 2: How to pass custom params with url?

I want to pass custom params( product id and currency) with product page url dynamically. Example url: https://example.com/boys-5-piece-blue-suit-eric.html?id=123&currency=GBP Need help
Shoaib Saleem's user avatar
0 votes
1 answer
2k views

how i can get parameter value of url parameter in customer registration success observer magento 2

I have set link like this http://localhost/magento/customer/account/create/?param_id=20 how I can get that (param_id) value in customer registration success observer in Magento 2 how I can do ...
prabhakaran7's user avatar
  • 1,087
1 vote
1 answer
3k views

Pass parameter to controller from template Magento 2

I am creating product programmatically on controller action. I want to send price value from template file. This is my controller: public function execute() { if (!$this->session->...
Ajwad Syed's user avatar
  • 1,591
0 votes
1 answer
202 views

What's the logic of inherited constructor order parameters

I have this module class namespace VendorName\Module\Block\Magento\Framework\Pricing; use Magento\Framework\Pricing\Amount\AmountInterface; use Magento\Framework\Pricing\Price\PriceInterface; use ...
tarek fellah's user avatar
1 vote
2 answers
3k views

Magento 2 - Controller with parameter

I want to create the controller which get the parameter like http://example.com/manufacturerpages/index/id/497 When I do this, It goes to 404 error plus I am also not able to get the id in ...
Muhammad Hasham's user avatar
0 votes
1 answer
842 views

How to create custom api with parameters in magento1?

How to create custom api with multiple parameters passed in the api call file in magento1. I have added the code in request call. But it is not working. Thanks in advance wsdl.xml file <?xml ...
user78358's user avatar
3 votes
2 answers
4k views

Magento 2 - Unable to Get Request Params in controller

I am trying to get input data in the controller but controller not getting url params. <?php namespace Crud\Crudatfrontend\Controller\Result; use Magento\Framework\App\Action\Context; use ...
Bhakti Thakkar's user avatar
0 votes
1 answer
4k views

Magento 1.9 - Mage->app()->getRequest()->getParam() not working

I am fetching the URL params as below. Mage::app()->getRequest()->getParam('test'); Debugging with echo before the above statement, it works fine. But placing echo after this statement return ...
Ejilarasan J's user avatar
3 votes
3 answers
2k views

Magento 2 get product id from admin product edit page

I am creating a custom grid on the product edit page, for the grid collection I need to filter based on the product id, for that I am trying to get the product id from the URL using below code $this-&...
senthil's user avatar
  • 1,729
2 votes
4 answers
4k views

how to pass a variable from one phtml to another?

I have two phtml which have its own unique block file. I need to pass variable from one phtml to another. PHTML 1 <?php $option_id = 20; ?> <a href="<?php echo $baseUrl ?>/...
Ramesh KR's user avatar
  • 876
4 votes
1 answer
570 views

Do bound parameters get escaped using the Core/Resource model?

Consider the following example: $connection = Mage::getSingleton('core/resource')->getConnection('core_read'); $email_address = $_GET['email']; $sql = 'SELECT * FROM `foo` WHERE `email_address` = ...
Moose's user avatar
  • 7,495
1 vote
2 answers
2k views

filter_url_params in magento 2 Ui component is not working properly anybody have solution

I want to show data according to the id that is shown in my URL..... my URL is http://dev.magento.com/admin/customer/index/edit/id/1/key/...
Asad Ullah's user avatar
  • 1,461
0 votes
1 answer
57 views

Dynamically change template based on user type

We're about to move to Magento 2.3. Trying to understand whether a product page can display one of two actions based on the visitor/customer type. I have one product with two different customer types....
Karl Te Aika's user avatar
0 votes
0 answers
567 views

How to get or append some extra query param to url

I have added some links in top. i want get query param from url and append in to every links in top dynamically like my links are = test1, test2, test3 My mail url is = https://apcd.com When ...
Pawankumar's user avatar
1 vote
1 answer
2k views

Magento 2 pass multiple parameters in the admin grid action url

In Magento 2.2.5, I am sending the id in the url now, But, I want send multiple parameters in the admin grid action url. I created admin grid using layout Blocks. Not used ui component. How to ...
Saravanan DS's user avatar
  • 1,126
2 votes
2 answers
13k views

magento 2 redirect url with parameters from controller

I am trying to redirect to a different controller from one controller . I also want to set an Url parameter along with the redirect. But this is throwing me an error Uncaught Error: Call to ...
Melvin's user avatar
  • 43
2 votes
0 answers
15 views

Parameter to give permissions to Role in order to modify customer information

I would like to have a parameter which if selected Yes, the dealers of the webpage aren't able to modify any customer information. If selected No, nothing happens and they can modify anything they ...
Raül's user avatar
  • 790
0 votes
1 answer
188 views

Which Magento 2 core function creates the url for the static folder files including css, js and images

I want to add a parameter at the end of the static content urls, but i am unable to find a global method where i can make a change and it starts reflecting on the all static content urls. My file and ...
Sourabh Kumar Sharma's user avatar
3 votes
1 answer
3k views

Pass variable from phtml to js

I am trying to pass variable to js but it is not working. My phtml code is like this- <script type="text/x-magento-init"> { ".open-modal-form": { "Vendor_Mod/js/modal-...
Gagan's user avatar
  • 1,478
1 vote
1 answer
3k views

Magento 2.2. Get error with ''@param string[] $types' in REST API

Using magento 2.2. I create rest api for edit address which need pass param in 'array of string' but i get an error: Doc: Magento Configure services as web APIs Used array of string for pass param ...
Bong Channarith's user avatar
7 votes
2 answers
2k views

How can I pass a URL parameter to admin grid data provider?

I have a custom admin grid, which lists only the orders that contain the product given as a URL parameter. My URL is of form https://www.example.com/admin/mymodule/orders/index/product_id/123/ I ...
Juho Jaakkola's user avatar
0 votes
1 answer
310 views

Magento 1.9 - Append current url with parameters

I want to add currency param with current url like www.example.com to www.example.com/?currency=USD Want to load website with param by default because default currency is USD. I found this ...
Shoaib Saleem's user avatar
1 vote
3 answers
2k views

How to call helper class in controller magento 2?

I have a helper class with parameter as shown below. I need this function to work on a specific controller. But returns this error. My helper Code below <?php namespace Rk\Wallet\Helper; class ...
Ramesh KR's user avatar
  • 876
0 votes
1 answer
2k views

Magento remarketing tag

I have a magento remarketing tag but I can not configure it correctly. I have the following parameters: var google_tag_params = { ecomm_prodid: 'REPLACE_WITH_VALUE', ecomm_pagetype: '...
Matheus Portela's user avatar
4 votes
1 answer
66 views

Page not found while trying access controller with parameter in url

i created a simple controller like this: namespace Namespace\Module\Controller\Confirm; class Index extends \Magento\Framework\App\Action\Action { protected $resultPageFactory; public ...
Idham Choudry's user avatar
14 votes
1 answer
5k views

Magento2 plugin around method different between callable and Closure paramters on param $proceed

I have checked magento2 ,There are two types of parameters that can be sent to around method \Closure $proceed example aroundSave(\Magento\Catalog\Model\Product $subject, \closure $proceed) callable ...
Amit Bera's user avatar
  • 77.6k
1 vote
1 answer
2k views

How to send parameter to controller

I found this code below at AddressesPost.php for addresses.phtml. How can addresses.phtml send parameter continue or new_address so AddressesPost.php can getParam('continue') or getParam('new_address')...
Edwin Widhiyanto's user avatar
4 votes
0 answers
883 views

Magento 2: dataprovider getData() get called twice losing my requestdata

In magento 2 I created a grid through UI components. It gets populated with my dataprovide class getData method: public function getData() { $questionSetId = $this->request->getParam('...
Prometheus's user avatar
6 votes
4 answers
14k views

Get parameters from URL Magento 2

Assume I have a URL like this, http://mystore.com/cms/sales/order/view/order_id/286/ I want to get values of the order_id which is 286, Please help with some example or snippet in Magento 2.
nuwaus's user avatar
  • 2,324
3 votes
0 answers
392 views

Magento 2 custom module friendly URL's

I have my url structured like so: "http://domain.com/post" where post is my module's main router url. Then for each post I have: http://domain.com/post/category/view/id/1. and my url rewrite is ...
Juliano Vargas's user avatar
8 votes
1 answer
10k views

magento 2 api route with input parameter

I'm trying to create an api route with input parameters but I'm not getting the expected result. Here is my webapi.xml: <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/2001/...
steros's user avatar
  • 1,622
0 votes
1 answer
7k views

Magento 2 - How to handle POST request with many parameters in Rest API?

I'm confusing about the correct way to send parameter to POST request in Magento 2 API For example, now I need to send a request body like this: { "first_name":"test_first", "last_name":"...
0xh8h's user avatar
  • 485