title: Have a proplem with ctp. I pass the value from controller. In ctp display Notice (8). How to fix it
body: <p>How to fix the Notice (8): Undefined variable: percentage [APP/Template/Cart/checkout.ctp, line 182]</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>if ($this-&gt;request-&gt;is('post')) {
              $CheckCoupon = $this-&gt;Campaign-&gt;find('all')
                      -&gt;where(['Campaign.discount_coupon_id' =&gt; $this-&gt;request-&gt;data('coupon')])-&gt;first();
              $percentage = $CheckCoupon['discount_percentage'];  
  </code></pre>
  
  <p><strong>Ctp:</strong></p>
  
  <pre><code>&lt;?php 
  $actualTotalAmount=$subtotal;
  $discountPercent=$percentage;
  $discountAmount=($actualTotalAmount)*($discountPercent/100 );
  $requestAmount=$discTotalamount=($actualTotalAmount)-$discountAmount;
  ?&gt;
  </code></pre>