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

How can I get variable $itemid with using function $_GET in phtml 2.

Can anyone show me?


1 Answer 1


You can achieve this


will get you the all parameters

If you want to get specific param


In your case, It should be like this


I hope this will help


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.