/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: PRODUCT LIST ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } // Hide product list in reader mode if the respective setting is enabled if ($this->iso_hide_list && $this->Input->get('product') != '') { return ''; } $this->iso_filterModules = deserialize($this->iso_filterModules, true); $this->iso_productcache = deserialize($this->iso_productcache, true); // Disable the cache if in preview mode if (BE_USER_LOGGED_IN === true) { $this->blnCacheProducts = false; } // Apply limit from filter module if (is_array($this->iso_filterModules)) { // We only do this once. getFiltersAndSorting() then automatically has the correct sorting $this->iso_filterModules = array_reverse($this->iso_filterModules); foreach ($this->iso_filterModules as $module) { if ($GLOBALS['ISO_LIMIT'][$module] > 0) { $this->perPage = $GLOBALS['ISO_LIMIT'][$module]; break; } } } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: UPS RATES AND SERVICE ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = $this->Environment->script . '?do=modules&act=edit&id=' . $this->id; return $objTemplate->parse(); } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: CART ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: PRODUCT READER ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } // Return if no product has been specified if ($this->Input->get('product') == '') { return ''; } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate($blnBackend = false) { if (TL_MODE == 'BE' && !$blnBackend) { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: ORDER DETAILS ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } if ($blnBackend) { $this->backend = true; $this->jumpTo = 0; } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: ORDER HISTORY ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } $this->iso_config_ids = deserialize($this->iso_config_ids); if (FE_USER_LOGGED_IN !== true || !is_array($this->iso_config_ids) || !count($this->iso_config_ids)) { return ''; } $this->import('FrontendUser', 'User'); return parent::generate(); }
/** * Return a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: ADDRESS BOOK ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } if (FE_USER_LOGGED_IN !== true) { return ''; } $this->arrFields = array_unique(array_merge(deserialize($this->Isotope->Config->billing_fields_raw, true), deserialize($this->Isotope->Config->shipping_fields_raw, true))); // Return if there are not editable fields if (!count($this->arrFields) || count($this->arrFields) == 1 && $this->arrFields[0] == '') { return ''; } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: PRODUCT FILTERS ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } // Initialize module data. if (!$this->initializeFilters()) { return ''; } // Hide product list in reader mode if the respective setting is enabled if ($this->iso_hide_list && $this->Input->get('product') != '') { return ''; } $strBuffer = parent::generate(); // Cache request in the database and redirect to the unique requestcache ID if ($this->blnCacheRequest) { $time = time(); $varFilter = is_array($GLOBALS['ISO_FILTERS']) && !empty($GLOBALS['ISO_FILTERS']) ? serialize($GLOBALS['ISO_FILTERS']) : null; $varSorting = is_array($GLOBALS['ISO_SORTING']) && !empty($GLOBALS['ISO_SORTING']) ? serialize($GLOBALS['ISO_SORTING']) : null; $varLimit = is_array($GLOBALS['ISO_LIMIT']) && !empty($GLOBALS['ISO_LIMIT']) ? serialize($GLOBALS['ISO_LIMIT']) : null; // if all filters are null we don't have to cache (this will prevent useless isorc params from being generated) if ($varFilter !== null || $varLimit !== null || $varSorting !== null) { $intCacheId = $this->Database->prepare("SELECT id FROM tl_iso_requestcache WHERE store_id={$this->Isotope->Config->store_id} AND filters" . ($varFilter ? '=' : ' IS ') . "? AND sorting" . ($varSorting ? '=' : ' IS ') . "? AND limits" . ($varLimit ? '=' : ' IS ') . "?")->execute($varFilter, $varSorting, $varLimit)->id; if ($intCacheId) { $this->Database->query("UPDATE tl_iso_requestcache SET tstamp={$time} WHERE id={$intCacheId}"); } else { $intCacheId = $this->Database->prepare("INSERT INTO tl_iso_requestcache (tstamp,store_id,filters,sorting,limits) VALUES ({$time}, {$this->Isotope->Config->store_id}, ?, ?, ?)")->execute($varFilter, $varSorting, $varLimit)->insertId; } $this->Input->setGet('isorc', $intCacheId); $this->redirect($this->generateRequestUrl()); } } return $strBuffer; }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: PRODUCT LIST ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } // Hide product list in reader mode if the respective setting is enabled if ($this->iso_hide_list && $this->Input->get('product') != '') { return ''; } $this->iso_filterModules = deserialize($this->iso_filterModules, true); $this->iso_productcache = deserialize($this->iso_productcache, true); // Disable the cache if in preview mode if (BE_USER_LOGGED_IN === true) { $this->blnCacheProducts = false; } return parent::generate(); }
/** * Display a wildcard in the back end * @return string */ public function generate() { if (TL_MODE == 'BE') { $objTemplate = new BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ISOTOPE ECOMMERCE: STORE CONFIG SWICHER ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; return $objTemplate->parse(); } $this->iso_config_ids = deserialize($this->iso_config_ids); if (!is_array($this->iso_config_ids) || !count($this->iso_config_ids)) { return ''; } if (strlen($this->Input->get('config'))) { if (in_array($this->Input->get('config'), $this->iso_config_ids)) { $_SESSION['ISOTOPE']['config_id'] = $this->Input->get('config'); } $this->redirect(preg_replace('@[?|&]config=' . $this->Input->get('config') . '@', '', $this->Environment->request)); } return parent::generate(); }
/** * Override parent addToUrl function. Use generateFrontendUrl if we want to remove all parameters. * @param string * @param boolean * @return string */ protected function addToUrl($strRequest, $blnIgnoreParams = false) { if ($blnIgnoreParams) { global $objPage; return $this->generateFrontendUrl($objPage->row(), '/' . str_replace(array('=', '&', '&'), '/', $strRequest)); } return parent::addToUrl($strRequest, $blnIgnoreParams); }