Author: kowloon29320@163.com
Inheritance: extends LonxomController
Beispiel #1
0
 function init()
 {
     parent::init();
     if (!Permission::check("SHOPUSER_ACCOUNT")) {
         Security::permissionFailure();
     }
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('ymarket');
     $this->load->model('ymarket_model');
 }
 function init()
 {
     parent::init();
     //optional, remove if you don't like a minimal amount check
     if ($this->Cart()->Amount() < ShopOrder::$minAmount) {
         if (!Director::urlParam("Action") == "minamount") {
             Director::redirect($this->Link() . "minamount");
         }
         return;
     }
 }
Beispiel #4
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 20.11.2015
 * Time: 20:20
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Asus', 'Notebooks', 'Asus');
$view->DoctypeView('Buy Asus Laptop');
$view->headerView();
$view->GetUI('laptop', 'notebooks');
Beispiel #5
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 20.11.2015
 * Time: 18:25
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Apple', 'Notebooks', 'Apple');
$view->DoctypeView('Buy Macbook');
$view->headerView();
$view->GetUI('laptop', 'notebooks');
Beispiel #6
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 22.11.2015
 * Time: 1:04
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Samsung', 'Gadgets', 'Samsung');
$view->DoctypeView('Buy Galaxy Tab');
$view->headerView();
$view->GetUI('device', 'gadgets');
Beispiel #7
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 28.10.2015
 * Time: 18:57
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Phones', 'Phones', 'All');
$view->DoctypeView('Buy Phone');
$view->headerView();
$view->GetUI('phone', 'phones');
Beispiel #8
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 21.11.2015
 * Time: 1:35
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('AppleTV', 'Television', 'AppleTV');
$view->DoctypeView('Buy Apple TV');
$view->headerView();
$view->GetUI('tv', 'television');
Beispiel #9
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 03.11.2015
 * Time: 23:15
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Samsung', 'Phones', 'Samsung');
$view->DoctypeView('Buy Samsung Phone');
$view->headerView();
$view->GetUI('phone', 'phones');
Beispiel #10
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 22.11.2015
 * Time: 1:04
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Apple', 'Gadgets', 'Apple');
$view->DoctypeView('Buy Ipad');
$view->headerView();
$view->GetUI('device', 'gadgets');
Beispiel #11
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 29.10.2015
 * Time: 8:51
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Apple', 'Phones', 'Apple');
$view->DoctypeView('Buy Iphone');
$view->headerView();
$view->GetUI('phone', 'phones');
Beispiel #12
0
 public function __construct()
 {
     $this->currencyCode = SCurrenciesQuery::create()->filterByIsDefault(true)->findOne()->getCode();
     $this->settings = $this->cms_base->get_settings();
     parent::__construct();
 }
Beispiel #13
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 20.11.2015
 * Time: 20:40
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Television', 'Television', 'All');
$view->DoctypeView('Buy TV');
$view->headerView();
$view->GetUI('tv', 'television');
Beispiel #14
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 21.11.2015
 * Time: 1:32
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('IMac', 'Television', 'IMac');
$view->DoctypeView('Buy IMac');
$view->headerView();
$view->GetUI('tv', 'television');
Beispiel #15
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 21.11.2015
 * Time: 2:06
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('ShowTop', 'Television', 'ShowTop');
$view->DoctypeView('Buy ShowTop');
$view->headerView();
$view->GetUI('tv', 'television');
Beispiel #16
0
 function init()
 {
     parent::init();
 }
Beispiel #17
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 22.11.2015
 * Time: 0:12
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Gadgets', 'Gadgets', 'All');
$view->DoctypeView('Buy Device');
$view->headerView();
$view->GetUI('device', 'gadgets');
Beispiel #18
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 17.11.2015
 * Time: 22:40
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/ShopController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/DefaultModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/ShopView.php';
//initiate the triad
$model = new DefaultModel();
//It is important that the controller and the view share the model
$controller = new ShopController($model);
$view = new ShopView($model);
$controller->actionGetData('Notebooks', 'Notebooks', 'All');
$view->DoctypeView('Buy Laptop');
$view->headerView();
$view->GetUI('laptop', 'notebooks');