PaylaterConfirmationModuleFrontController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setMedia() 0 4 1
A init() 0 6 1
A initContent() 0 15 1
1
<?php
2
/**
3
* 2007-2017 PrestaShop
4
*
5
* NOTICE OF LICENSE
6
*
7
* This source file is subject to the Academic Free License (AFL 3.0)
8
* that is bundled with this package in the file LICENSE.txt.
9
* It is also available through the world-wide-web at this URL:
10
* http://opensource.org/licenses/afl-3.0.php
11
* If you did not receive a copy of the license and are unable to
12
* obtain it through the world-wide-web, please send an email
13
* to [email protected] so we can send you a copy immediately.
14
*
15
* DISCLAIMER
16
*
17
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18
* versions in the future. If you wish to customize PrestaShop for your
19
* needs please refer to http://www.prestashop.com for more information.
20
*
21
*  @author    PrestaShop SA <[email protected]>
22
*  @copyright 2007-2017 PrestaShop SA
23
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
24
*  International Registered Trademark & Property of PrestaShop SA
25
*/
26
27
class PaylaterConfirmationModuleFrontController extends ModuleFrontController
28
{
29
    public function setMedia()
30
    {
31
        parent::setMedia();
32
    }
33
    public function init()
34
    {
35
        parent::init();
36
        $this->display_column_left = false;
37
        $this->display_column_right = false;
38
    }
39
    public function initContent()
40
    {
41
        parent::initContent();
42
        $cart_id = Context::getContext()->cart->id;
43
        $order_id = Order::getOrderByCartId($cart_id);
44
        $order = new Order($order_id);
45
46
        $link = Context::getContext()->link;
47
        $history_link = $link->getPageLink('history');
48
        $this->context->smarty->assign(array(
49
          'total' => $order->total_paid,
50
          'history_link' => $history_link
51
        ));
52
        return $this->setTemplate('confirmation.tpl');
53
    }
54
}
55