How to get session variable value in payment page?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
How to get session variable value from shipping
page to payment
page ?
magento2 checkout payment magento-2.1.7
add a comment |Â
up vote
1
down vote
favorite
How to get session variable value from shipping
page to payment
page ?
magento2 checkout payment magento-2.1.7
What you want to get from session variable?
– Rohan Hapani
2 hours ago
If we select length value in shipping page its length must be displayed under shipping method in payment page as i uploaded both image Rohan Hapani
– trilok kumar
2 hours ago
can you please update code which you have use for set the value
– Rakesh Varma
1 hour ago
protected $_checkoutSession; public function __construct( ........ MagentoCheckoutModelSession $checkoutSession, ........ ) ........ $this->_checkoutSession = $checkoutSession; ........ public function getCheckoutSession() return $this->_checkoutSession; this i used but its not working for me Rakesh Varma
– trilok kumar
1 hour ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How to get session variable value from shipping
page to payment
page ?
magento2 checkout payment magento-2.1.7
How to get session variable value from shipping
page to payment
page ?
magento2 checkout payment magento-2.1.7
magento2 checkout payment magento-2.1.7
edited 1 hour ago


PRINCE
6,6902935
6,6902935
asked 2 hours ago


trilok kumar
1268
1268
What you want to get from session variable?
– Rohan Hapani
2 hours ago
If we select length value in shipping page its length must be displayed under shipping method in payment page as i uploaded both image Rohan Hapani
– trilok kumar
2 hours ago
can you please update code which you have use for set the value
– Rakesh Varma
1 hour ago
protected $_checkoutSession; public function __construct( ........ MagentoCheckoutModelSession $checkoutSession, ........ ) ........ $this->_checkoutSession = $checkoutSession; ........ public function getCheckoutSession() return $this->_checkoutSession; this i used but its not working for me Rakesh Varma
– trilok kumar
1 hour ago
add a comment |Â
What you want to get from session variable?
– Rohan Hapani
2 hours ago
If we select length value in shipping page its length must be displayed under shipping method in payment page as i uploaded both image Rohan Hapani
– trilok kumar
2 hours ago
can you please update code which you have use for set the value
– Rakesh Varma
1 hour ago
protected $_checkoutSession; public function __construct( ........ MagentoCheckoutModelSession $checkoutSession, ........ ) ........ $this->_checkoutSession = $checkoutSession; ........ public function getCheckoutSession() return $this->_checkoutSession; this i used but its not working for me Rakesh Varma
– trilok kumar
1 hour ago
What you want to get from session variable?
– Rohan Hapani
2 hours ago
What you want to get from session variable?
– Rohan Hapani
2 hours ago
If we select length value in shipping page its length must be displayed under shipping method in payment page as i uploaded both image Rohan Hapani
– trilok kumar
2 hours ago
If we select length value in shipping page its length must be displayed under shipping method in payment page as i uploaded both image Rohan Hapani
– trilok kumar
2 hours ago
can you please update code which you have use for set the value
– Rakesh Varma
1 hour ago
can you please update code which you have use for set the value
– Rakesh Varma
1 hour ago
protected $_checkoutSession; public function __construct( ........ MagentoCheckoutModelSession $checkoutSession, ........ ) ........ $this->_checkoutSession = $checkoutSession; ........ public function getCheckoutSession() return $this->_checkoutSession; this i used but its not working for me Rakesh Varma
– trilok kumar
1 hour ago
protected $_checkoutSession; public function __construct( ........ MagentoCheckoutModelSession $checkoutSession, ........ ) ........ $this->_checkoutSession = $checkoutSession; ........ public function getCheckoutSession() return $this->_checkoutSession; this i used but its not working for me Rakesh Varma
– trilok kumar
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
I'm not sure this below code will be useful for you or not. But, you can use the below code in your custom module to set, unset session
protected $_checkoutSession;
public function __construct(
........
MagentoCheckoutModelSession $checkoutSession,
........
)
........
$this->_checkoutSession = $checkoutSession;
........
public function getCheckoutSession()
return $this->_checkoutSession;
By using getCheckoutSession() you can get value from session.
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
add a comment |Â
up vote
1
down vote
protected $_checkoutSession;
public function __construct(
....
public function __construct(
MagentoCheckoutModelSession $checkoutSession
)
$this->_checkoutSession = $checkoutSession;
public function getCheckoutSession()
return $this->_checkoutSession;
Where you want set your value
$this->getCheckoutSession()->setShippingValue('someValueHere');
Where you want to get that value
$this->getCheckoutSession()->getShippingValue(); //someValueHere
Then you unset the value:
$this->getCheckoutSession()->unsShippingValue();
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I'm not sure this below code will be useful for you or not. But, you can use the below code in your custom module to set, unset session
protected $_checkoutSession;
public function __construct(
........
MagentoCheckoutModelSession $checkoutSession,
........
)
........
$this->_checkoutSession = $checkoutSession;
........
public function getCheckoutSession()
return $this->_checkoutSession;
By using getCheckoutSession() you can get value from session.
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
add a comment |Â
up vote
1
down vote
I'm not sure this below code will be useful for you or not. But, you can use the below code in your custom module to set, unset session
protected $_checkoutSession;
public function __construct(
........
MagentoCheckoutModelSession $checkoutSession,
........
)
........
$this->_checkoutSession = $checkoutSession;
........
public function getCheckoutSession()
return $this->_checkoutSession;
By using getCheckoutSession() you can get value from session.
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I'm not sure this below code will be useful for you or not. But, you can use the below code in your custom module to set, unset session
protected $_checkoutSession;
public function __construct(
........
MagentoCheckoutModelSession $checkoutSession,
........
)
........
$this->_checkoutSession = $checkoutSession;
........
public function getCheckoutSession()
return $this->_checkoutSession;
By using getCheckoutSession() you can get value from session.
I'm not sure this below code will be useful for you or not. But, you can use the below code in your custom module to set, unset session
protected $_checkoutSession;
public function __construct(
........
MagentoCheckoutModelSession $checkoutSession,
........
)
........
$this->_checkoutSession = $checkoutSession;
........
public function getCheckoutSession()
return $this->_checkoutSession;
By using getCheckoutSession() you can get value from session.
answered 2 hours ago


Rohan Hapani
4,01821459
4,01821459
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
add a comment |Â
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
Can you please elaborate the above code Rohan Hapani
– trilok kumar
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
You can use this below code in your controller, block, helper etc. $this->_checkoutSession will be return object of checkoutSession data which is store in checkout page session
– Rohan Hapani
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
No its not working for me Rohan Hapani
– trilok kumar
1 hour ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
It's whole object of checkout session. You need to get like this : $this->getCheckoutSession()->getCustomFunction(); //write your function which you want to get value from checkout session
– Rohan Hapani
31 mins ago
add a comment |Â
up vote
1
down vote
protected $_checkoutSession;
public function __construct(
....
public function __construct(
MagentoCheckoutModelSession $checkoutSession
)
$this->_checkoutSession = $checkoutSession;
public function getCheckoutSession()
return $this->_checkoutSession;
Where you want set your value
$this->getCheckoutSession()->setShippingValue('someValueHere');
Where you want to get that value
$this->getCheckoutSession()->getShippingValue(); //someValueHere
Then you unset the value:
$this->getCheckoutSession()->unsShippingValue();
add a comment |Â
up vote
1
down vote
protected $_checkoutSession;
public function __construct(
....
public function __construct(
MagentoCheckoutModelSession $checkoutSession
)
$this->_checkoutSession = $checkoutSession;
public function getCheckoutSession()
return $this->_checkoutSession;
Where you want set your value
$this->getCheckoutSession()->setShippingValue('someValueHere');
Where you want to get that value
$this->getCheckoutSession()->getShippingValue(); //someValueHere
Then you unset the value:
$this->getCheckoutSession()->unsShippingValue();
add a comment |Â
up vote
1
down vote
up vote
1
down vote
protected $_checkoutSession;
public function __construct(
....
public function __construct(
MagentoCheckoutModelSession $checkoutSession
)
$this->_checkoutSession = $checkoutSession;
public function getCheckoutSession()
return $this->_checkoutSession;
Where you want set your value
$this->getCheckoutSession()->setShippingValue('someValueHere');
Where you want to get that value
$this->getCheckoutSession()->getShippingValue(); //someValueHere
Then you unset the value:
$this->getCheckoutSession()->unsShippingValue();
protected $_checkoutSession;
public function __construct(
....
public function __construct(
MagentoCheckoutModelSession $checkoutSession
)
$this->_checkoutSession = $checkoutSession;
public function getCheckoutSession()
return $this->_checkoutSession;
Where you want set your value
$this->getCheckoutSession()->setShippingValue('someValueHere');
Where you want to get that value
$this->getCheckoutSession()->getShippingValue(); //someValueHere
Then you unset the value:
$this->getCheckoutSession()->unsShippingValue();
answered 33 mins ago


PRINCE
6,6902935
6,6902935
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246771%2fhow-to-get-session-variable-value-in-payment-page%23new-answer', 'question_page');
);
Post as a guest
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
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
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
What you want to get from session variable?
– Rohan Hapani
2 hours ago
If we select length value in shipping page its length must be displayed under shipping method in payment page as i uploaded both image Rohan Hapani
– trilok kumar
2 hours ago
can you please update code which you have use for set the value
– Rakesh Varma
1 hour ago
protected $_checkoutSession; public function __construct( ........ MagentoCheckoutModelSession $checkoutSession, ........ ) ........ $this->_checkoutSession = $checkoutSession; ........ public function getCheckoutSession() return $this->_checkoutSession; this i used but its not working for me Rakesh Varma
– trilok kumar
1 hour ago