Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Coupon.php
Go to the documentation of this file.
1 <?php
7 
12 class Coupon extends \Magento\Checkout\Block\Cart\AbstractCart
13 {
21  public function __construct(
22  \Magento\Framework\View\Element\Template\Context $context,
23  \Magento\Customer\Model\Session $customerSession,
24  \Magento\Checkout\Model\Session $checkoutSession,
25  array $data = []
26  ) {
27  parent::__construct($context, $customerSession, $checkoutSession, $data);
28  $this->_isScopePrivate = true;
29  }
30 
35  public function getCouponCode()
36  {
37  return $this->getQuote()->getCouponCode();
38  }
39 }
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, array $data=[])
Definition: Coupon.php:21