private function _renderWarning($warning, $links = false) { if (self::$_warningRendered) { return; } echo '<div style="padding: 10px; text-align: center">'; echo $warning; if ($links) { echo '<br /><br />'; echo 'Please <a href="https://github.com/vqmod/vqmod/releases/tag/v2.5.1-opencart.zip" target="_blank">download VQMod</a> and read '; echo '<a href="https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart" target="_blank">How to installl VQMod</a>'; } echo '</div>'; self::$_warningRendered = true; }
private function _sortOptions(&$options, $sort, $attribute_id, $lang_id) { if ($sort) { list($type, $order) = explode('_', $sort); } else { $type = $order = ''; } if ($attribute_id) { $attribute_id = str_replace(array('a_', 'o_', 'f_'), '', $attribute_id); } self::$_tmp_sort_parameters = array('attribute_id' => $attribute_id, 'type' => $type, 'order' => $order, 'a' => false, 'options' => $options, 'config' => $this->config->get('mega_filter_at_sort_' . $attribute_id . '_' . $lang_id)); if (!self::$_tmp_sort_parameters['type'] && !self::$_tmp_sort_parameters['config']) { self::$_tmp_sort_parameters = NULL; return; } if (!self::$_tmp_sort_parameters['type'] && self::$_tmp_sort_parameters['attribute_id'] !== NULL && self::$_tmp_sort_parameters['config']) { uasort($options, array('ControllerModuleMegaFilter', '_sortItems')); } else { $tmp = array(); foreach ($options as $k => $v) { $tmp['_' . $k] = htmlspecialchars_decode($v['name']); } if ($order == 'desc') { arsort($tmp, $type == 'string' ? SORT_STRING : SORT_NUMERIC); } else { asort($tmp, $type == 'string' ? SORT_STRING : SORT_NUMERIC); } $tmp2 = array(); foreach ($tmp as $k => $v) { $tmp2[trim($k, '_')] = $options[trim($k, '_')]; } $options = $tmp2; } self::$_tmp_sort_parameters = NULL; }
private function _sortOptions(&$options, $sort, $lang_id, $attribute_id = NULL) { if ($sort) { list($type, $order) = explode('_', $sort); } else { $type = $order = ''; } self::$_tmp_sort_parameters = array('attribute_id' => $attribute_id, 'type' => $type, 'order' => $order, 'config' => $this->config->get('mega_filter_at_sort_' . $attribute_id . '_' . $lang_id)); if (!self::$_tmp_sort_parameters['type'] && !self::$_tmp_sort_parameters['config']) { self::$_tmp_sort_parameters = NULL; return; } usort($options, 'ControllerModuleMegaFilter::_sortItems'); self::$_tmp_sort_parameters = NULL; }