public function __construct($user_obj)
 {
     global $ilUser;
     parent::__construct();
     if (isset($_SESSION['shop_user_id']) && $_SESSION['shop_user_id'] != ANONYMOUS_USER_ID) {
         ilPaymentShoppingCart::_assignObjectsToUserId($_SESSION['shop_user_id']);
         $this->user_obj = new ilObjUser($_SESSION['shop_user_id']);
     } else {
         if ($user_obj != NULL) {
             $this->user_obj = $user_obj;
         } else {
             if ($ilUser->getId() != ANONYMOUS_USER_ID) {
                 $this->user_obj = $ilUser;
                 $_SESSION['shop_user_id'] = null;
             } else {
                 $this->session_id = session_id();
             }
         }
     }
     $this->coupon_obj = new ilPaymentCoupons($this->user_obj);
     $ppSet = ilPaypalSettings::getInstance();
     $this->paypalConfig = $ppSet->getAll();
     //		$this->epSet = ilEPaySettings::getInstance();
     //		$this->epayConfig = $this->epSet->getAll();
     $this->checkCouponsOfShoppingCart();
     #$this->default_currency = ilPaymentCurrency::_getDefaultCurrency();
 }
 public function __construct($user_obj)
 {
     parent::__construct();
     $this->ctrl->saveParameter($this, 'baseClass');
     $this->user_obj = $user_obj;
     $this->pobject = new ilPaymentObject($this->user_obj);
 }
 public function __construct($user_obj)
 {
     parent::__construct();
     $this->user_obj = $user_obj;
     $this->lng->loadLanguageModule('crs');
     ilDatePresentation::setUseRelativeDates(false);
 }
 public function __construct($user_obj)
 {
     parent::__construct();
     $this->ctrl->saveParameter($this, 'baseClass');
     $this->user_obj = $user_obj;
     $this->__initCouponObject();
 }
 public function __construct()
 {
     global $ilErr;
     parent::__construct();
     $this->oCurrentNewsItem = new ilShopNewsItem((int) $_GET['news_id']);
     $this->lng->loadLanguageModule('news');
     $this->ilErr = $ilErr;
 }
 public function __construct($user_obj)
 {
     parent::__construct();
     $this->user_obj = $user_obj;
     $this->trustee_obj = new ilPaymentTrustees($this->user_obj);
     $this->lng->loadLanguageModule('crs');
     $this->ctrl->saveParameter($this, 'baseClass');
 }
 public function __construct($user_obj)
 {
     parent::__construct();
     $this->user_obj = $user_obj;
     $this->session_id = session_id();
     $this->coupon_obj = new ilPaymentCoupons($this->user_obj);
     $ppSet = ilPaypalSettings::getInstance();
     $this->paypalConfig = $ppSet->getAll();
     //		$this->epSet = ilEPaySettings::getInstance();
     //		$this->epayConfig = $this->epSet->getAll();
     $this->checkCouponsOfShoppingCart();
     #$this->default_currency = ilPaymentCurrency::_getDefaultCurrency();
 }
 public function __construct()
 {
     parent::__construct();
     // set filter
     $this->setCombination($_SESSION['shop_advanced_search']['combination']);
     $this->setString($_SESSION['shop_advanced_search']['string']);
     $this->setDetails($_SESSION['shop_advanced_search']['details']);
     $this->setTopicId($_SESSION['shop_advanced_search']['topic']);
     // set sorting
     $this->setSortingTypeTopics($_SESSION['shop_advanced_search']['order_topics_sorting_type']);
     $this->setSortingDirectionTopics($_SESSION['shop_advanced_search']['shop_topics_sorting_direction']);
     $this->setSortField($_SESSION['shop_advanced_search']['shop_order_field']);
     $this->setSortDirection($_SESSION['shop_advanced_search']['shop_order_direction']);
 }
 public function __construct($_post = '')
 {
     parent::__construct();
     global $ilCtrl;
     $this->cur_ref_id = (int) $_GET['ref_id'];
     $this->cmd = $ilCtrl->getCmd();
     // set filter settings
     $this->setType($_SESSION['shop_content']['type']);
     $this->setString($_SESSION['shop_content']['text']);
     $this->setTopicId($_POST['filter_topic_id']);
     // set sorting
     $this->setSortingTypeTopics($_SESSION['shop_content']['order_topics_sorting_type']);
     $this->setSortingDirectionTopics($_SESSION['shop_content']['shop_topics_sorting_direction']);
     #		$this->setSortField($_SESSION['shop_content']['shop_order_field']);
     $this->setSortField($_POST['order_field']);
     $this->setSortDirection($_SESSION['shop_content']['shop_order_direction']);
     $this->genSet = ilPaymentSettings::_getInstance();
 }
 public function __construct($user_obj, $pay_method)
 {
     global $lng, $tpl, $ilCtrl, $ilTabs;
     parent::__construct();
     $this->lng = $lng;
     $this->ctrl = $ilCtrl;
     $this->tpl = $tpl;
     $this->user_obj = $user_obj;
     $this->pmethod_obj = new ilPayMethods($pay_method);
     $this->session_var = $this->pmethod_obj->getPmTitle();
     $this->pm_id = $pay_method;
     $this->psc_obj = new ilPaymentShoppingCart($this->user_obj);
     $this->coupon_obj = new ilPaymentCoupons($this->user_obj);
     if (!is_array($_SESSION[$this->session_var]['personal_data'])) {
         $_SESSION[$this->session_var]['personal_data']['firstname'] = $this->user_obj->getFirstname();
         $_SESSION[$this->session_var]['personal_data']['lastname'] = $this->user_obj->getLastname();
         if (strpos('_' . $this->user_obj->getStreet(), ' ') > 0) {
             $houseNo = substr($this->user_obj->getStreet(), strrpos($this->user_obj->getStreet(), ' ') + 1);
             $street = substr($this->user_obj->getStreet(), 0, strlen($this->user_obj->getStreet()) - (strlen($houseNo) + 1));
             $_SESSION[$this->session_var]['personal_data']['street'] = $street;
             $_SESSION[$this->session_var]['personal_data']['house_number'] = $houseNo;
         } else {
             $_SESSION[$this->session_var]['personal_data']['street'] = $this->user_obj->getStreet();
             $_SESSION[$this->session_var]['personal_data']['house_number'] = '';
         }
         $_SESSION[$this->session_var]['personal_data']['po_box'] = '';
         $_SESSION[$this->session_var]['personal_data']['zipcode'] = $this->user_obj->getZipcode();
         $_SESSION[$this->session_var]['personal_data']['city'] = $this->user_obj->getCity();
         $_SESSION[$this->session_var]['personal_data']['country'] = $this->__getCountryCode($this->user_obj->getCountry());
         $_SESSION[$this->session_var]['personal_data']['email'] = $this->user_obj->getEmail();
         $_SESSION[$this->session_var]['personal_data']['language'] = $this->user_obj->getLanguage();
     }
     if (!is_array($_SESSION['coupons'][$this->session_var])) {
         $_SESSION['coupons'][$this->session_var] = array();
     }
     $this->__loadTemplate();
     $this->error = '';
     $this->lng->loadLanguageModule('payment');
     $ilTabs->clearTargets();
     $ilTabs->clearSubTabs();
 }
Example #11
0
 public function __construct()
 {
     parent::__construct();
     global $ilCtrl;
     if (isset($_POST['cmd']) && $_POST['cmd'] == 'setFilter') {
         $this->cmd = 'setFilter';
     } else {
         $this->cmd = $ilCtrl->getCmd();
     }
     $this->cur_ref_id = (int) $_GET['ref_id'];
     $this->settings = ilPaymentSettings::_getInstance();
     $this->ilShopSearchResult = ilShopSearchResult::_getInstance(SHOP_CONTENT);
     // set filter settings
     $this->setType($_SESSION['shop_content']['type']);
     $this->setString($_SESSION['shop_content']['text']);
     $this->setTopicId($_POST['filter_topic_id']);
     // set sorting
     $this->setSortingTypeTopics($_SESSION['shop_content']['order_topics_sorting_type']);
     $this->setSortingDirectionTopics($_SESSION['shop_content']['shop_topics_sorting_direction']);
     $this->setSortField($_POST['order_field']);
     $this->setSortDirection($_SESSION['shop_content']['shop_order_direction']);
 }
 public function __construct()
 {
     parent::__construct();
 }
 public function __construct($user_obj)
 {
     parent::__construct();
     $this->user_obj = $user_obj;
 }