How to get current store ID in async controller The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to call a model method from controller in Magento2Magento2 - Custom Controller throws errorI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?Controller override issue Magento 2Magento 2: How to override newsletter Subscriber modelMagento 2: Plugin class does not existMagento 2: I Want to add multiple product using checkboxMagento 2.3 Can't view module's front end page output?Magento 2.3.0 - The store that was requested wasn't foundMagento 2.3.0 - Set up multiple websites, stores, and store views
Are there continuous functions who are the same in an interval but differ in at least one other point?
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
1960s short story making fun of James Bond-style spy fiction
Huge performance difference of the command find with and without using %M option to show permissions
How did passengers keep warm on sail ships?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
Is this wall load bearing? Blueprints and photos attached
Why are PDP-7-style microprogrammed instructions out of vogue?
Do working physicists consider Newtonian mechanics to be "falsified"?
Did the new image of black hole confirm the general theory of relativity?
For what reasons would an animal species NOT cross a *horizontal* land bridge?
"is" operation returns false even though two objects have same id
What aspect of planet Earth must be changed to prevent the industrial revolution?
Can we generate random numbers using irrational numbers like π and e?
Sort list of array linked objects by keys and values
How do spell lists change if the party levels up without taking a long rest?
Why can't wing-mounted spoilers be used to steepen approaches?
Intergalactic human space ship encounters another ship, character gets shunted off beyond known universe, reality starts collapsing
Why can't devices on different VLANs, but on the same subnet, communicate?
Why doesn't a hydraulic lever violate conservation of energy?
Is every episode of "Where are my Pants?" identical?
What's the point in a preamp?
What information about me do stores get via my credit card?
Windows 10: How to Lock (not sleep) laptop on lid close?
How to get current store ID in async controller
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to call a model method from controller in Magento2Magento2 - Custom Controller throws errorI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?Controller override issue Magento 2Magento 2: How to override newsletter Subscriber modelMagento 2: Plugin class does not existMagento 2: I Want to add multiple product using checkboxMagento 2.3 Can't view module's front end page output?Magento 2.3.0 - The store that was requested wasn't foundMagento 2.3.0 - Set up multiple websites, stores, and store views
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have an AJAX request POSTing data to a controller in my Magento module.
$.ajax(
url: "/page/section/profile?isAjax=true",
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
Starting at http://my-website/store2 I post to the /profile
endpoint, where I'm trying to access the current store ID in the following (simplified) controller code:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoStoreModelStoreManagerInterface
*/
private $storeManager;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoStoreModelStoreManagerInterface $storeManager
)
$this->storeManager = $storeManager;
parent::__construct($context);
public function execute()
$storeId = $this->storeManager->getStore()->getId(); // returns 1
$websiteId = $this->getRequest()->getParam('website', 0); // returns 0
return [$storeId, $websiteId];
however this always returns store ID 1 (default) instead of the expected store ID 2.
I am not currently logged in to Magento admin.
I have tried to obtain this data via e.g. $this->getRequest()->getParam('website')
, in the controller, but that doesn't seem to help either.
magento2 magento2.3
add a comment |
I have an AJAX request POSTing data to a controller in my Magento module.
$.ajax(
url: "/page/section/profile?isAjax=true",
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
Starting at http://my-website/store2 I post to the /profile
endpoint, where I'm trying to access the current store ID in the following (simplified) controller code:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoStoreModelStoreManagerInterface
*/
private $storeManager;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoStoreModelStoreManagerInterface $storeManager
)
$this->storeManager = $storeManager;
parent::__construct($context);
public function execute()
$storeId = $this->storeManager->getStore()->getId(); // returns 1
$websiteId = $this->getRequest()->getParam('website', 0); // returns 0
return [$storeId, $websiteId];
however this always returns store ID 1 (default) instead of the expected store ID 2.
I am not currently logged in to Magento admin.
I have tried to obtain this data via e.g. $this->getRequest()->getParam('website')
, in the controller, but that doesn't seem to help either.
magento2 magento2.3
which data are you trying to get using the getParam function?
– magefms
Apr 9 at 8:31
@magefms I have tried to get 'website'. This returns 0.
– strangerpixel
Apr 9 at 8:49
can you post your controller code
– magefms
Apr 9 at 8:50
check updated answer @strangerpixel
– magefms
Apr 9 at 9:10
add a comment |
I have an AJAX request POSTing data to a controller in my Magento module.
$.ajax(
url: "/page/section/profile?isAjax=true",
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
Starting at http://my-website/store2 I post to the /profile
endpoint, where I'm trying to access the current store ID in the following (simplified) controller code:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoStoreModelStoreManagerInterface
*/
private $storeManager;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoStoreModelStoreManagerInterface $storeManager
)
$this->storeManager = $storeManager;
parent::__construct($context);
public function execute()
$storeId = $this->storeManager->getStore()->getId(); // returns 1
$websiteId = $this->getRequest()->getParam('website', 0); // returns 0
return [$storeId, $websiteId];
however this always returns store ID 1 (default) instead of the expected store ID 2.
I am not currently logged in to Magento admin.
I have tried to obtain this data via e.g. $this->getRequest()->getParam('website')
, in the controller, but that doesn't seem to help either.
magento2 magento2.3
I have an AJAX request POSTing data to a controller in my Magento module.
$.ajax(
url: "/page/section/profile?isAjax=true",
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
Starting at http://my-website/store2 I post to the /profile
endpoint, where I'm trying to access the current store ID in the following (simplified) controller code:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoStoreModelStoreManagerInterface
*/
private $storeManager;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoStoreModelStoreManagerInterface $storeManager
)
$this->storeManager = $storeManager;
parent::__construct($context);
public function execute()
$storeId = $this->storeManager->getStore()->getId(); // returns 1
$websiteId = $this->getRequest()->getParam('website', 0); // returns 0
return [$storeId, $websiteId];
however this always returns store ID 1 (default) instead of the expected store ID 2.
I am not currently logged in to Magento admin.
I have tried to obtain this data via e.g. $this->getRequest()->getParam('website')
, in the controller, but that doesn't seem to help either.
magento2 magento2.3
magento2 magento2.3
edited Apr 9 at 9:05
strangerpixel
asked Apr 9 at 8:17
strangerpixelstrangerpixel
1116
1116
which data are you trying to get using the getParam function?
– magefms
Apr 9 at 8:31
@magefms I have tried to get 'website'. This returns 0.
– strangerpixel
Apr 9 at 8:49
can you post your controller code
– magefms
Apr 9 at 8:50
check updated answer @strangerpixel
– magefms
Apr 9 at 9:10
add a comment |
which data are you trying to get using the getParam function?
– magefms
Apr 9 at 8:31
@magefms I have tried to get 'website'. This returns 0.
– strangerpixel
Apr 9 at 8:49
can you post your controller code
– magefms
Apr 9 at 8:50
check updated answer @strangerpixel
– magefms
Apr 9 at 9:10
which data are you trying to get using the getParam function?
– magefms
Apr 9 at 8:31
which data are you trying to get using the getParam function?
– magefms
Apr 9 at 8:31
@magefms I have tried to get 'website'. This returns 0.
– strangerpixel
Apr 9 at 8:49
@magefms I have tried to get 'website'. This returns 0.
– strangerpixel
Apr 9 at 8:49
can you post your controller code
– magefms
Apr 9 at 8:50
can you post your controller code
– magefms
Apr 9 at 8:50
check updated answer @strangerpixel
– magefms
Apr 9 at 9:10
check updated answer @strangerpixel
– magefms
Apr 9 at 9:10
add a comment |
2 Answers
2
active
oldest
votes
You can try like this in your controller:
$this->request()->getParam('website',0);
UPDATE:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoFrameworkAppRequestHttp
*/
protected $request;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoFrameworkAppRequestHttp $request
)
$this->request= $request;
parent::__construct($context);
public function execute()
return $this->request->getParam('website',0);
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
how about changing website to store likereturn $this->request->getParam('store',0);
?
– magefms
Apr 9 at 9:21
@strangerpixel I see your code in your post, it return 0 because you are not injectingMagentoFrameworkAppRequestHttp $request
in your constructor
– magefms
Apr 9 at 9:29
I have tried it locally, it's the same outcome as$this->getRequest()
, which returns aMagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.
– strangerpixel
Apr 9 at 9:34
add a comment |
It turned out I needed to post data to the appropriate store URL, defined in the block beforehand.
Block:
public function getEndpointWithStoreCode()
return $this->storeManager->getStore()->getBaseUrl(
MagentoFrameworkUrlInterface::URL_TYPE_WEB,
true
) . "/page/section/profile?isAjax=true";
Template:
<script type="text/x-magento-init">
"*":
"my_module/js/profile" :
"profileEndpoint" : "<?= $block->getEndpointWithStoreCode() ?>"
JS:
$.ajax(
url: config.profileEndpoint,
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
By POSTing directly to /store2/page/section/profile
, the right store scope is locked in.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269320%2fhow-to-get-current-store-id-in-async-controller%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can try like this in your controller:
$this->request()->getParam('website',0);
UPDATE:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoFrameworkAppRequestHttp
*/
protected $request;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoFrameworkAppRequestHttp $request
)
$this->request= $request;
parent::__construct($context);
public function execute()
return $this->request->getParam('website',0);
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
how about changing website to store likereturn $this->request->getParam('store',0);
?
– magefms
Apr 9 at 9:21
@strangerpixel I see your code in your post, it return 0 because you are not injectingMagentoFrameworkAppRequestHttp $request
in your constructor
– magefms
Apr 9 at 9:29
I have tried it locally, it's the same outcome as$this->getRequest()
, which returns aMagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.
– strangerpixel
Apr 9 at 9:34
add a comment |
You can try like this in your controller:
$this->request()->getParam('website',0);
UPDATE:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoFrameworkAppRequestHttp
*/
protected $request;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoFrameworkAppRequestHttp $request
)
$this->request= $request;
parent::__construct($context);
public function execute()
return $this->request->getParam('website',0);
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
how about changing website to store likereturn $this->request->getParam('store',0);
?
– magefms
Apr 9 at 9:21
@strangerpixel I see your code in your post, it return 0 because you are not injectingMagentoFrameworkAppRequestHttp $request
in your constructor
– magefms
Apr 9 at 9:29
I have tried it locally, it's the same outcome as$this->getRequest()
, which returns aMagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.
– strangerpixel
Apr 9 at 9:34
add a comment |
You can try like this in your controller:
$this->request()->getParam('website',0);
UPDATE:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoFrameworkAppRequestHttp
*/
protected $request;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoFrameworkAppRequestHttp $request
)
$this->request= $request;
parent::__construct($context);
public function execute()
return $this->request->getParam('website',0);
You can try like this in your controller:
$this->request()->getParam('website',0);
UPDATE:
use MagentoFrameworkAppActionContext;
use MagentoFrameworkAppResponseInterface;
use MagentoFrameworkAppActionAction;
class Profile extends Action
/**
* @var MagentoFrameworkAppRequestHttp
*/
protected $request;
/**
* Profile constructor
*
* @param Context $context
*/
public function __construct(
Context $context,
MagentoFrameworkAppRequestHttp $request
)
$this->request= $request;
parent::__construct($context);
public function execute()
return $this->request->getParam('website',0);
edited Apr 9 at 9:10
answered Apr 9 at 8:54
magefmsmagefms
2,6342528
2,6342528
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
how about changing website to store likereturn $this->request->getParam('store',0);
?
– magefms
Apr 9 at 9:21
@strangerpixel I see your code in your post, it return 0 because you are not injectingMagentoFrameworkAppRequestHttp $request
in your constructor
– magefms
Apr 9 at 9:29
I have tried it locally, it's the same outcome as$this->getRequest()
, which returns aMagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.
– strangerpixel
Apr 9 at 9:34
add a comment |
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
how about changing website to store likereturn $this->request->getParam('store',0);
?
– magefms
Apr 9 at 9:21
@strangerpixel I see your code in your post, it return 0 because you are not injectingMagentoFrameworkAppRequestHttp $request
in your constructor
– magefms
Apr 9 at 9:29
I have tried it locally, it's the same outcome as$this->getRequest()
, which returns aMagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.
– strangerpixel
Apr 9 at 9:34
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
Unfortunately that still returns 0 for 'website'.
– strangerpixel
Apr 9 at 9:17
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
did you run the upgrade and other required commands?
– magefms
Apr 9 at 9:18
how about changing website to store like
return $this->request->getParam('store',0);
?– magefms
Apr 9 at 9:21
how about changing website to store like
return $this->request->getParam('store',0);
?– magefms
Apr 9 at 9:21
@strangerpixel I see your code in your post, it return 0 because you are not injecting
MagentoFrameworkAppRequestHttp $request
in your constructor– magefms
Apr 9 at 9:29
@strangerpixel I see your code in your post, it return 0 because you are not injecting
MagentoFrameworkAppRequestHttp $request
in your constructor– magefms
Apr 9 at 9:29
I have tried it locally, it's the same outcome as
$this->getRequest()
, which returns a MagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.– strangerpixel
Apr 9 at 9:34
I have tried it locally, it's the same outcome as
$this->getRequest()
, which returns a MagentoFrameworkAppRequestInterface
. To your earlier point, 'store' param is also null. The request object in the controller only gives access to the params I have explicitly posted to it.– strangerpixel
Apr 9 at 9:34
add a comment |
It turned out I needed to post data to the appropriate store URL, defined in the block beforehand.
Block:
public function getEndpointWithStoreCode()
return $this->storeManager->getStore()->getBaseUrl(
MagentoFrameworkUrlInterface::URL_TYPE_WEB,
true
) . "/page/section/profile?isAjax=true";
Template:
<script type="text/x-magento-init">
"*":
"my_module/js/profile" :
"profileEndpoint" : "<?= $block->getEndpointWithStoreCode() ?>"
JS:
$.ajax(
url: config.profileEndpoint,
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
By POSTing directly to /store2/page/section/profile
, the right store scope is locked in.
add a comment |
It turned out I needed to post data to the appropriate store URL, defined in the block beforehand.
Block:
public function getEndpointWithStoreCode()
return $this->storeManager->getStore()->getBaseUrl(
MagentoFrameworkUrlInterface::URL_TYPE_WEB,
true
) . "/page/section/profile?isAjax=true";
Template:
<script type="text/x-magento-init">
"*":
"my_module/js/profile" :
"profileEndpoint" : "<?= $block->getEndpointWithStoreCode() ?>"
JS:
$.ajax(
url: config.profileEndpoint,
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
By POSTing directly to /store2/page/section/profile
, the right store scope is locked in.
add a comment |
It turned out I needed to post data to the appropriate store URL, defined in the block beforehand.
Block:
public function getEndpointWithStoreCode()
return $this->storeManager->getStore()->getBaseUrl(
MagentoFrameworkUrlInterface::URL_TYPE_WEB,
true
) . "/page/section/profile?isAjax=true";
Template:
<script type="text/x-magento-init">
"*":
"my_module/js/profile" :
"profileEndpoint" : "<?= $block->getEndpointWithStoreCode() ?>"
JS:
$.ajax(
url: config.profileEndpoint,
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
By POSTing directly to /store2/page/section/profile
, the right store scope is locked in.
It turned out I needed to post data to the appropriate store URL, defined in the block beforehand.
Block:
public function getEndpointWithStoreCode()
return $this->storeManager->getStore()->getBaseUrl(
MagentoFrameworkUrlInterface::URL_TYPE_WEB,
true
) . "/page/section/profile?isAjax=true";
Template:
<script type="text/x-magento-init">
"*":
"my_module/js/profile" :
"profileEndpoint" : "<?= $block->getEndpointWithStoreCode() ?>"
JS:
$.ajax(
url: config.profileEndpoint,
type: "POST",
data: "profileId=" + profile.id,
success: function (result)
);
By POSTing directly to /store2/page/section/profile
, the right store scope is locked in.
answered Apr 9 at 13:06
strangerpixelstrangerpixel
1116
1116
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269320%2fhow-to-get-current-store-id-in-async-controller%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
which data are you trying to get using the getParam function?
– magefms
Apr 9 at 8:31
@magefms I have tried to get 'website'. This returns 0.
– strangerpixel
Apr 9 at 8:49
can you post your controller code
– magefms
Apr 9 at 8:50
check updated answer @strangerpixel
– magefms
Apr 9 at 9:10