How to use function $_GET in Magento 2?How to get product category id on product detail page Magento 2TypeError: element.prop is not a function - Magento 2How to get Tier Price of product magento2?How to get order details in a Magento2 custom controller action?Magento 2: call helper function in ui component formLoad custom product detail page instead of default in Magento 2How to echo or vardump product detail on cart pageHow to get the order item id in Magento 2 (not the order ID)?How get Image Url by product_id or other wayHow to display product by using order Item_Id in Magento 2?
Other than a swing wing, what types of variable geometry have flown?
Why no ";" after "do" in sh loops?
How may I concisely assign different values to a variable, depending on another variable?
Terence Tao–type books in other fields?
What is the lowest-speed bogey a jet fighter can intercept/escort?
kids pooling money for Lego League and taxes
How can I tell if there was a power cut while I was out?
Is it legal for private citizens to "impound" e-scooters?
Can I go to the UK from the Schengen on train?
Are there any examples of technologies have been lost over time?
expansion with *.txt in the shell doesn't work if no .txt file exists
What does "a good player" mean in the movie Training day?
Where to place an artificial gland in the human body?
Replacing tongue and groove floorboards: but can't find a match
How do I run a game when my PCs have different approaches to combat?
Convert a string like 4h53m12s to a total number of seconds in JavaScript
"I you already know": is this proper English?
Why isn't there a serious attempt at creating a third mass-appeal party in the US?
Commercial jet accompanied by small plane near Seattle
Character is called by their first initial. How do I write it?
Why did Saturn V not head straight to the moon?
How important is a good quality camera for good photography?
Why was Sauron not trying to find the Ring, and instead of preparing for war?
Explanation for a joke about a three-legged dog that walks into a bar
How to use function $_GET in Magento 2?
How to get product category id on product detail page Magento 2TypeError: element.prop is not a function - Magento 2How to get Tier Price of product magento2?How to get order details in a Magento2 custom controller action?Magento 2: call helper function in ui component formLoad custom product detail page instead of default in Magento 2How to echo or vardump product detail on cart pageHow to get the order item id in Magento 2 (not the order ID)?How get Image Url by product_id or other wayHow to display product by using order Item_Id in Magento 2?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have below code in phtml 1:
<?php $itemid = $item->getItemId() ?>
<a href="<?php echo $this->getUrl('history/customer/detail',
['item_id' =>$itemid]); ?>">Product Detail
</a>
How can I get variable $itemid with using function $_GET in phtml 2.
Can anyone show me?
Thanks.
magento2 get
add a comment |
I have below code in phtml 1:
<?php $itemid = $item->getItemId() ?>
<a href="<?php echo $this->getUrl('history/customer/detail',
['item_id' =>$itemid]); ?>">Product Detail
</a>
How can I get variable $itemid with using function $_GET in phtml 2.
Can anyone show me?
Thanks.
magento2 get
add a comment |
I have below code in phtml 1:
<?php $itemid = $item->getItemId() ?>
<a href="<?php echo $this->getUrl('history/customer/detail',
['item_id' =>$itemid]); ?>">Product Detail
</a>
How can I get variable $itemid with using function $_GET in phtml 2.
Can anyone show me?
Thanks.
magento2 get
I have below code in phtml 1:
<?php $itemid = $item->getItemId() ?>
<a href="<?php echo $this->getUrl('history/customer/detail',
['item_id' =>$itemid]); ?>">Product Detail
</a>
How can I get variable $itemid with using function $_GET in phtml 2.
Can anyone show me?
Thanks.
magento2 get
magento2 get
edited Jul 16 at 16:38
Taschert
19510 bronze badges
19510 bronze badges
asked Jul 16 at 6:25
Michael TaoMichael Tao
588 bronze badges
588 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can achieve this
$this->getRequest()->getParams();
will get you the all parameters
If you want to get specific param
$this->getRequest()->getParam('something');
In your case, It should be like this
$this->getRequest()->getParam('item_id');
I hope this will help
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%2f282185%2fhow-to-use-function-get-in-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can achieve this
$this->getRequest()->getParams();
will get you the all parameters
If you want to get specific param
$this->getRequest()->getParam('something');
In your case, It should be like this
$this->getRequest()->getParam('item_id');
I hope this will help
add a comment |
You can achieve this
$this->getRequest()->getParams();
will get you the all parameters
If you want to get specific param
$this->getRequest()->getParam('something');
In your case, It should be like this
$this->getRequest()->getParam('item_id');
I hope this will help
add a comment |
You can achieve this
$this->getRequest()->getParams();
will get you the all parameters
If you want to get specific param
$this->getRequest()->getParam('something');
In your case, It should be like this
$this->getRequest()->getParam('item_id');
I hope this will help
You can achieve this
$this->getRequest()->getParams();
will get you the all parameters
If you want to get specific param
$this->getRequest()->getParam('something');
In your case, It should be like this
$this->getRequest()->getParam('item_id');
I hope this will help
edited Jul 16 at 6:43
answered Jul 16 at 6:29
Muhammad HashamMuhammad Hasham
5,72610 gold badges31 silver badges80 bronze badges
5,72610 gold badges31 silver badges80 bronze badges
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%2f282185%2fhow-to-use-function-get-in-magento-2%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