예제 #1
0
 function ishop_module_front()
 {
     $this->_module_name = 'ishop';
     $this->_common_obj =& ishop_module_common::getInstance(true);
     parent::_constructor();
     $this->context = null;
 }
예제 #2
0
 function common_call($front_call = null)
 {
     $this->_module_name = 'ishop';
     $this->_common_obj = ishop_module_common::getInstance();
     $this->_common_obj->module_name = $this->_module_name;
     $this->_tree = $this->_common_obj->obj_tree;
 }
예제 #3
0
 function getDiscountsSelector($userDiscount = null)
 {
     if (Common::is_module_exists('ishop')) {
         Common::call_common_instance('ishop');
         $ishop =& ishop_module_common::getInstance();
         return XHTML::arr_select_opt($ishop->getDiscoutsSchemes(), $userDiscount, true);
     }
 }
예제 #4
0
 function setcurrentcurrency()
 {
     global $TDB;
     if ($_REQUEST['changecurrency']) {
         return ishop_module_common::changecurrency();
     }
     if (!$_SESSION['currency'] && ($cur = $TDB->selectIN('*', 'ishop_currency', 'ismain=1'))) {
         $_SESSION['currency'] = $cur[1];
     }
 }
예제 #5
0
 function getDiscountForCategory($id)
 {
     static $dscheme;
     if ($this->ishop && $_SESSION['siteuser']['authorized']) {
         Common::call_common_instance('ishop');
         $ishop =& ishop_module_common::getInstance();
         if (!$dscheme) {
             $dscheme = $ishop->getDiscountScheme($_SESSION['siteuser']['userdata']['DiscountScheme']);
         }
         if ($dscheme) {
             $this->_tree->GetFullBonesUp($id);
             if ($fbu = XARRAY::arr_to_keyarr($this->_tree->FullBonesMas, 'id', 'id')) {
                 foreach ($fbu as $bone) {
                     if (($fkey = array_search($bone, array_flip($dscheme))) !== false) {
                         return $fkey;
                     }
                 }
             }
         }
     }
 }