public function display($tpl = null) { $app = JFactory::getApplication(); $Itemid = JRequest::getInt('Itemid'); $user = JFactory::getUser(); $session = JFactory::getSession(); $auth = $session->get('auth'); if ($user->id || isset($auth['users_info_id']) && $auth['users_info_id'] > 0) { $app->Redirect('index.php?option=com_redshop&view=account&Itemid=' . $Itemid); } $params = $app->getParams('com_redshop'); JHTML::Script('joomla.javascript.js', 'includes/js/', false); JHTML::Script('jquery-1.4.2.min.js', 'components/com_redshop/assets/js/', false); JHTML::Script('jquery.validate.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); JHTML::Script('jquery.metadata.js', 'components/com_redshop/assets/js/', false); JHTML::Script('registration.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('validation.css', 'components/com_redshop/assets/css/'); $field = new extraField(); // Field_section 7 : Customer Registration $lists['extra_field_user'] = $field->list_all_field(7); // Field_section 8 : Company Address $lists['extra_field_company'] = $field->list_all_field(8); $this->lists = $lists; $this->params = $params; parent::display($tpl); }
function display($tpl = null) { global $mainframe; $mainframe = JFactory::getApplication(); $params = $mainframe->getparams(); $groupeid = JRequest::getVar('groupid'); $profiletypeid = JRequest::getVar('profiletypeid'); $doc = JFactory::getDocument(); $doc->addStyleSheet("components/com_redsocialstream/assets/css/redsocialstream_group.css"); JHTML::Script('jquery.js', 'components/com_redsocialstream/assets/js/', false); JHTML::_('behavior.mootools'); JHTML::_('behavior.framework', true); $model = $this->getModel(); if ($params->get('groupid') != array()) { $group = $model->getgroupdata($params->get('groupid')); $this->assignRef('groupinfo', $group); } $limit = JRequest::getVar('limit'); if ($limit == "") { $limit = $params->get('feedlimit'); } if ($profiletypeid == "") { if ($params->get('profiletypeid') != "") { $profiletypeid = $params->get('profiletypeid'); } } $feedlists = $model->getfeedslist($groupeid, $profiletypeid); $this->feedlists = $feedlists; $this->posts = $model->getposts($groupeid, $profiletypeid, $limit); $this->profiletypeid = $profiletypeid; $this->limit = $limit; parent::display($tpl); }
public function display($tpl = null) { JHTML::stylesheet(Juri::base() . 'media/openhrm/assets/css/stylesheet.css'); JHTML::Script(Juri::base() . 'media/openhrm/assets/js/jwplayer/jwplayer.js'); $this->lesson = $this->get("Items"); $this->pagination = $this->get('Pagination'); // Display the view parent::display($tpl); }
public function display($tpl = null) { JHTML::stylesheet(Juri::base() . 'media/englishconcept/assets/css/stylesheet.css'); //JHTML::Script(Juri::base() . 'media/englishconcept/assets/js/jQuery.jPlayer/jquery.jplayer.min.js'); JHTML::Script(Juri::base() . 'media/englishconcept/assets/js/jwplayer/jwplayer.js'); $this->lesson = $this->get("Items"); $this->pagination = $this->get('Pagination'); // Display the view parent::display($tpl); }
function display($tpl = null) { global $option, $mainframe; $mainframe = JFactory::getApplication(); $params = $mainframe->getparams(); $groupid = $params->get('groupid'); $profiletypes = $params->get('multiprofiletypeid'); if (count($profiletypes) > 0) { $profiletypeid = implode(",", $profiletypes); } $limit = $params->get('feedlimit'); $orderby = $params->get('orderby'); $headline = $params->get('headline'); //Get Group Information $model = $this->getModel(); $group = $model->getgroupdata($groupid); $this->groupinfo = $group; //End $doc = JFactory::getDocument(); $doc->addStyleSheet("components/com_redsocialstream/assets/css/redsocialstream_group.css"); JHTML::Script('jquery.js', 'components/com_redsocialstream/assets/js/', false); JHTML::_('behavior.mootools'); JHTML::_('behavior.framework', true); $this->groupid = $groupid; $this->profiletypeid = $profiletypeid; $this->limit = $limit; $this->orderby = $orderby; $this->headline = $headline; $fbpost = $model->getposts($groupid, FACEBOOK, $limit, $orderby); $twposts = $model->getposts($groupid, TWITTER, $limit, $orderby); $youtubeposts = $model->getposts($groupid, YOUTUBE, $limit, $orderby); $linkedinposts = $model->getposts($groupid, LINKEDIN, $limit, $orderby); if (count($profiletypes) > 0) { if (in_array(FACEBOOK, $profiletypes)) { $this->fbposts = $fbpost; } if (in_array(TWITTER, $profiletypes)) { $this->twposts = $twposts; } if (in_array(YOUTUBE, $profiletypes)) { $this->youtubeposts = $youtubeposts; } if (in_array(LINKEDIN, $profiletypes)) { $this->linkedinposts = $linkedinposts; } } parent::display($tpl); }
public function display($tpl = null) { $app = JFactory::getApplication(); $order_functions = new order_functions(); // Extra_field; $extra_field = new extraField(); $task = JRequest::getCmd('task'); $user = JFactory::getUser(); $uri = JFactory::getURI(); // Preform security checks $session = JFactory::getSession(); $auth = $session->get('auth'); $params = $app->getParams('com_redshop'); $lists = array(); if ($user->id) { $billingaddresses = $order_functions->getBillingAddress($user->id); } elseif (isset($auth['users_info_id']) && $auth['users_info_id']) { $model = $this->getModel('account_shipto'); $billingaddresses = $model->_loadData($auth['users_info_id']); } else { $app->Redirect('index.php?option=com_redshop&view=login&Itemid=' . JRequest::getInt('Itemid')); exit; } if ($task == 'addshipping') { JHTML::Script('jquery-1.4.2.min.js', 'components/com_redshop/assets/js/', false); JHTML::Script('jquery.validate.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); JHTML::Script('registration.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('validation.css', 'components/com_redshop/assets/css/'); $shippingaddresses = $this->get('Data'); if ($shippingaddresses->users_info_id > 0 && $shippingaddresses->user_id != $billingaddresses->user_id) { echo JText::_('COM_REDSHOP_ALERTNOTAUTH'); return; } $lists['shipping_customer_field'] = $extra_field->list_all_field(14, $shippingaddresses->users_info_id); $lists['shipping_company_field'] = $extra_field->list_all_field(15, $shippingaddresses->users_info_id); $this->setLayout('form'); } else { $shippingaddresses = $order_functions->getShippingAddress($user->id); } $this->lists = $lists; $this->shippingaddresses = $shippingaddresses; $this->billingaddresses = $billingaddresses; $this->request_url = $uri->toString(); $this->params = $params; parent::display($tpl); }
public function display($tpl = null) { $app = JFactory::getApplication(); // Request variables $params = $app->getParams('com_redshop'); $task = JRequest::getCmd('task', 'com_redshop'); $Itemid = JRequest::getInt('Itemid'); $pid = JRequest::getInt('product_id'); $layout = JRequest::getCmd('layout'); $config = new Redconfiguration(); $pageheadingtag = ''; $params = $app->getParams('com_redshop'); $document = JFactory::getDocument(); JHTML::Stylesheet('colorbox.css', 'components/com_redshop/assets/css/'); JHTML::Script('jquery.js', 'components/com_redshop/assets/js/', false); JHTML::Script('jquery.colorbox-min.js', 'components/com_redshop/assets/js/', false); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); JHTML::Script('redBOX.js', 'components/com_redshop/assets/js/', false); $model = $this->getModel("wishlist"); $wishlist = $model->getUserWishlist(); $wish_products = $model->getWishlistProduct(); $session_wishlists = $model->getWishlistProductFromSession(); if ($task == 'viewwishlist' || $layout == 'viewwishlist') { $this->setlayout('viewwishlist'); $this->wishlists = $wishlist; $this->wish_products = $wish_products; $this->wish_session = $session_wishlists; $this->params = $params; parent::display($tpl); } elseif ($task == 'viewloginwishlist') { $this->setlayout('viewloginwishlist'); $this->wishlists = $wishlist; $this->params = $params; parent::display($tpl); } else { $this->wish_session = $session_wishlists; $this->wishlist = $wishlist; $this->params = $params; parent::display($tpl); } }
public function display($tpl = null) { $app = JFactory::getApplication(); $redconfig = new Redconfiguration(); $uri = JFactory::getURI(); $Itemid = JRequest::getInt('Itemid'); $session = JFactory::getSession(); $cart = $session->get('cart'); $return = JRequest::getString('return'); if (!$return) { if ($cart['idx'] < 1) { $app->Redirect('index.php?option=com_redshop&view=cart&Itemid=' . $Itemid); } } JHTML::Script('validation.js', 'administrator/components/com_redshop/assets/js/', false); $model = $this->getModel('quotation'); $detail = $model->getData(); $this->detail = $detail; $this->request_url = $uri->toString(); parent::display($tpl); }
public function display($tpl = null) { $app = JFactory::getApplication(); // Request variables $params = $app->getParams('com_redshop'); $document = JFactory::getDocument(); JHTML::Script('redBOX.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('fetchscript.css', 'components/com_redshop/assets/css/'); $pageheadingtag = JText::_('COM_REDSHOP_REDSHOP'); $model = $this->getModel('giftcard'); $giftcard_template = $model->getGiftcardTemplate(); $detail = $this->get('data'); $this->detail = $detail; $this->lists = $lists; $this->template = $giftcard_template; $this->pageheadingtag = $pageheadingtag; $this->params = $params; parent::display($tpl); }
public function display($tpl = null) { $app = JFactory::getApplication(); // Request variables $id = JRequest::getInt('id'); $Itemid = JRequest::getInt('Itemid'); $pid = JRequest::getInt('pid'); $params = $app->getParams('com_redshop'); $pathway = $app->getPathway(); $document = JFactory::getDocument(); // Include Javascript JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Script('json.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('scrollable-navig.css', 'components/com_redshop/assets/css/'); $data = $this->get('data'); $template = $this->get('template'); // Next/Prev navigation end $this->data = $data; $this->template = $template; $this->params = $params; parent::display($tpl); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $extra_field = new extraField(); $params = $app->getParams('com_redshop'); $billingaddresses = $GLOBALS['billingaddresses']; if (count($billingaddresses) <= 0) { $model = $this->getModel('account_billto'); $billingaddresses = $model->_initData(); } $user = JFactory::getUser(); $uri = JFactory::getURI(); $session = JFactory::getSession(); $auth = $session->get('auth'); if (!is_array($auth)) { $auth['users_info_id'] = 0; $session->set('auth', $auth); $auth = $session->get('auth'); } JHTML::Script('jquery-1.4.2.min.js', 'components/com_redshop/assets/js/', false); JHTML::Script('jquery.validate.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); JHTML::Script('registration.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('validation.css', 'components/com_redshop/assets/css/'); // Preform security checks if ($user->id == 0 && $auth['users_info_id'] == 0) { $app->Redirect('index.php?option=com_redshop&view=login&Itemid=' . JRequest::getInt('Itemid')); exit; } $lists['requesting_tax_exempt'] = JHTML::_('select.booleanlist', 'requesting_tax_exempt', 'class="inputbox"', @$billingaddresses->requesting_tax_exempt); // Field_section 7 :Customer Address $lists['extra_field_user'] = $extra_field->list_all_field(7, @$billingaddresses->users_info_id); $lists['extra_field_company'] = $extra_field->list_all_field(8, @$billingaddresses->users_info_id); $this->lists = $lists; $this->billingaddresses = $billingaddresses; $this->request_url = $uri->toString(); $this->params = $params; parent::display($tpl); }
public function display($tpl = null) { $app = JFactory::getApplication(); // Request variables $redTemplate = new Redtemplate(); $user = JFactory::getUser(); $session = JFactory::getSession(); $cart = $session->get('cart'); $layout = JRequest::getCmd('layout'); if (!$cart) { $cart = array(); } $Itemid = JRequest::getInt('Itemid'); if (JRequest::getString('quotemsg') != "") { $app->Redirect('index.php?option=com_redshop&view=cart&Itemid=' . $Itemid, JRequest::getString('quotemsg')); } JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); if (!array_key_exists("idx", $cart) || array_key_exists("idx", $cart) && $cart['idx'] < 1) { $cart_data = $redTemplate->getTemplate("empty_cart"); if (count($cart_data) > 0 && $cart_data[0]->template_desc != "") { $cart_template = $cart_data[0]->template_desc; } else { $cart_template = JText::_("COM_REDSHOP_EMPTY_CART"); } echo eval("?>" . $cart_template . "<?php "); return false; } $Discount = $this->get('DiscountId'); $data = $this->get('data'); if ($layout == 'change_attribute') { $this->setLayout('change_attribute'); } $this->Discount = $Discount; $this->cart = $cart; $this->data = $data; parent::display($tpl); }
require_once JPATH_COMPONENT . '/helpers/product.php'; require_once JPATH_COMPONENT . '/helpers/cart.php'; require_once JPATH_COMPONENT . '/helpers/helper.php'; $carthelper = new rsCarthelper(); $producthelper = new producthelper(); $order_functions = new order_functions(); $redhelper = new redhelper(); $redTemplate = new Redtemplate(); $shippinghelper = new shipping(); $session = JFactory::getSession(); $document = JFactory::getDocument(); // Get redshop helper $Itemid = $redhelper->getCheckoutItemid(); $model = $this->getModel('checkout'); $cart = $session->get('cart'); JHTML::Script('credit_card.js', 'components/com_redshop/assets/js/', false); $billingaddresses = $model->billingaddresses(); if (!count($billingaddresses)) { $msg = JText::_('COM_REDSHOP_LOGIN_USER_IS_NOT_REDSHOP_USER'); $app->Redirect("index.php?option=com_redshop&view=account_billto&return=checkout&Itemid=" . $Itemid, $msg); } $paymentmethod = $redhelper->getPlugins('redshop_payment'); $selpayment_method_id = 0; if (count($paymentmethod) > 0) { $selpayment_method_id = $paymentmethod[0]->element; } $shippingBoxes = $shippinghelper->getShippingBox(); $selshipping_box_post_id = 0; if (count($shippingBoxes) > 0) { $selshipping_box_post_id = $shippingBoxes[0]->shipping_box_id; }
/** * shipping rate calculator */ public function shippingrate_calc() { $document = JFactory::getDocument(); JHTML::Script('commmon.js', 'components/com_redshop/assets/js/', false); $redConfig = new Redconfiguration(); $countryarray = $redConfig->getCountryList(); $post['country_code'] = $countryarray['country_code']; $conutry = $countryarray['country_dropdown']; $statearray = $redConfig->getStateList($post); $state = $statearray['state_dropdown']; $shipping_calc = "<form name='adminForm' id='adminForm'>"; $shipping_calc .= "<label>" . JText::_('COM_REDSHOP_COUNTRY') . "</label><br />"; $shipping_calc .= $conutry; $shipping_calc .= "<div id='div_state_lbl'><label>" . JText::_('COM_REDSHOP_STATE') . "</label></div>"; $shipping_calc .= "<div id='div_state_txt'>" . $state . "</div>"; $shipping_calc .= "<br />"; $shipping_calc .= "<label>" . JText::_('COM_REDSHOP_ZIPCODE') . "</label><br />"; $shipping_calc .= "<input type='text' name='zipcode' id='zip_code' />"; $shipping_calc .= "<br />"; $shipping_calc .= "<input class='blackbutton' type='button' name='shippingcalc' id='shippingcalc' value='" . JText::_('COM_REDSHOP_UPDATE') . "' onClick='javascript:getShippingrate();' />"; $shipping_calc .= "</form>"; return $shipping_calc; }
if ($jscookTree_style == "ThemeXP") { $jscook_tree = "ctThemeXP1"; } if ($jscookTree_style == "ThemeNavy") { $jscook_tree = "ctThemeNavy"; } JHTML::Script('JSCookTree.js', $js_src . '/', false); JHTML::Script('theme.js', $js_src . '/' . $jscookTree_style . '/', false); JHTML::Stylesheet('theme.css', $js_src . '/' . $jscookTree_style . '/'); $_jscook = new redCategoryMenu(); } else { //JHTML::Script('JSCookMenu.js', $urlpath.'includes/js/',false); //JHTML::Script('theme.js', $urlpath.'includes/js/'.$jscookMenu_style.'/',false); //JHTML::Stylesheet('theme.css', $urlpath.'includes/js/'.$jscookMenu_style.'/'); JHTML::Script('JSCookMenu.js', $js_src . '/JSCook/', false); JHTML::Script('theme.js', $js_src . '/JSCook/', false); JHTML::Stylesheet('theme.css', $js_src . '/JSCook/'); $_jscook = new redCategoryMenu(); } // create a unique tree identifier, in case multiple trees are used // (max one per module) $varname = "JSCook_" . uniqid($jscook_type . "_"); $menu_htmlcode = '<div align="left" class="mainlevel" id="div_' . $varname . '"></div> <script type="text/javascript"> //<!-- function ' . $varname . '_addEvent( obj, type, fn ) { if (obj.addEventListener) { obj.addEventListener( type, fn, false ); } else if (obj.attachEvent) { obj["e"+type+fn] = fn;
public function list_all_user_fields($field_section = "", $section_id = 12, $field_type = '', $idx = 'NULL', $isatt = 0, $product_id, $mywish = "", $addwish = 0) { $db = JFactory::getDbo(); $session = JFactory::getSession(); $cart = $session->get('cart'); $url = JURI::base(); $preprefix = ""; if ($isatt == 1) { $preprefix = "ajax_"; } $addtocartFormName = 'addtocart_' . $preprefix . 'prd_' . $product_id; $document = JFactory::getDocument(); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); $q = "SELECT * FROM " . $this->_table_prefix . "fields " . "WHERE field_section = " . $db->quote($section_id) . " " . "AND field_name = " . $db->quote($field_section) . " " . "AND published = 1 " . "AND field_show_in_front = 1 " . "ORDER BY ordering "; $this->_db->setQuery($q); $row_data = $this->_db->loadObjectlist(); $ex_field = ''; $ex_field_title = ''; for ($i = 0; $i < count($row_data); $i++) { $type = $row_data[$i]->field_type; $asterisk = $row_data[$i]->required > 0 ? '* ' : ''; if ($field_type != 'hidden') { $ex_field_title .= '<div class="userfield_label">' . $asterisk . $row_data[$i]->field_title . '</div>'; } $data_value = $this->getSectionFieldDataList($row_data[$i]->field_id, $field_section, $section_id); $text_value = ''; if ($addwish == 1) { $text_value = $mywish; } if ($cart && isset($cart[$idx][$row_data[$i]->field_name])) { if ($type == 12) { $text_value = date("d-m-Y", strtotime($cart[$idx][$row_data[$i]->field_name])); } else { $text_value = $cart[$idx][$row_data[$i]->field_name]; } } if ($field_type == 'hidden') { $ex_field .= '<input type="hidden" name="' . $row_data[$i]->field_name . '" id="' . $row_data[$i]->field_name . '" value=""/>'; } else { if ($row_data[$i]->required == 1) { $req = ' required = "' . $row_data[$i]->required . '"'; } else { $req = ''; } switch ($type) { case 1: // 1 :- Text Field $onkeyup = ''; if (AJAX_CART_BOX == 0) { $onkeyup = $addtocartFormName . '.' . $row_data[$i]->field_name . '.value = this.value'; } $ex_field .= '<div class="userfield_input"><input class="' . $row_data[$i]->field_class . '" type="text" maxlength="' . $row_data[$i]->field_maxlength . '" onkeyup="var f_value = this.value;' . $onkeyup . '" name="extrafields' . $product_id . '[]" id="' . $row_data[$i]->field_name . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" value="' . $text_value . '" size="' . $row_data[$i]->field_size . '" /></div>'; break; case 2: // 2 :- Text Area $onkeyup = ''; if (AJAX_CART_BOX == 0) { $onkeyup = $addtocartFormName . '.' . $row_data[$i]->field_name . '.value = this.value'; } $ex_field .= '<div class="userfield_input"><textarea class="' . $row_data[$i]->field_class . '" name="extrafields' . $product_id . '[]" id="' . $row_data[$i]->field_name . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" cols="' . $row_data[$i]->field_cols . '" onkeyup=" var f_value = this.value;' . $onkeyup . '" rows="' . $row_data[$i]->field_rows . '" >' . $text_value . '</textarea></div>'; break; case 3: // 3 :- Check Box $field_chk = $this->getFieldValue($row_data[$i]->field_id); $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]); for ($c = 0; $c < count($field_chk); $c++) { $checked = ''; if (@in_array($field_chk[$c]->field_value, $chk_data)) { $checked = ' checked="checked" '; } $ex_field .= '<div class="userfield_input"><input class="' . $row_data[$i]->field_class . '" type="checkbox" ' . $checked . ' name="extrafields' . $product_id . '[]" id="' . $row_data[$i]->field_name . "_" . $field_chk[$c]->value_id . '" userfieldlbl="' . $row_data[$i]->field_title . '" value="' . $field_chk[$c]->field_value . '" ' . $req . ' />' . $field_chk[$c]->field_value . '</div>'; } break; case 4: // 4 :- Radio Button $field_chk = $this->getFieldValue($row_data[$i]->field_id); $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]); for ($c = 0; $c < count($field_chk); $c++) { $checked = ''; if (@in_array($field_chk[$c]->field_value, $chk_data)) { $checked = ' checked="checked" '; } $ex_field .= '<div class="userfield_input"><input class="' . $row_data[$i]->field_class . '" type="radio" ' . $checked . ' name="extrafields' . $product_id . '[]" userfieldlbl="' . $row_data[$i]->field_title . '" id="' . $row_data[$i]->field_name . "_" . $field_chk[$c]->value_id . '" value="' . $field_chk[$c]->field_value . '" ' . $req . ' />' . $field_chk[$c]->field_value . '</div>'; } break; case 5: // 5 :-Select Box (Single select) $field_chk = $this->getFieldValue($row_data[$i]->field_id); $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]); $ex_field .= '<div class="userfield_input"><select name="extrafields' . $product_id . '[]" ' . $req . ' id="' . $row_data[$i]->field_name . '" userfieldlbl="' . $row_data[$i]->field_title . '">'; $ex_field .= '<option value="">' . JText::_('COM_REDSHOP_SELECT') . '</option>'; for ($c = 0; $c < count($field_chk); $c++) { if ($field_chk[$c]->field_value != "" && $field_chk[$c]->field_value != "-" && $field_chk[$c]->field_value != "0" && $field_chk[$c]->field_value != "select") { $selected = ''; if (@in_array($field_chk[$c]->field_value, $chk_data)) { $selected = ' selected="selected" '; } $ex_field .= '<option value="' . $field_chk[$c]->field_value . '" ' . $selected . ' >' . $field_chk[$c]->field_value . '</option>'; } } $ex_field .= '</select></div>'; break; case 6: // 6 :- Select Box (Multiple select) $field_chk = $this->getFieldValue($row_data[$i]->field_id); $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]); $ex_field .= '<div class="userfield_input"><select multiple="multiple" size=10 name="extrafields' . $product_id . '[]" ' . $req . ' id="' . $row_data[$i]->field_name . '" userfieldlbl="' . $row_data[$i]->field_title . '">'; for ($c = 0; $c < count($field_chk); $c++) { $selected = ''; if (@in_array(urlencode($field_chk[$c]->field_value), $chk_data)) { $selected = ' selected="selected" '; } $ex_field .= '<option value="' . urlencode($field_chk[$c]->field_value) . '" ' . $selected . ' >' . $field_chk[$c]->field_value . '</option>'; } $ex_field .= '</select></div>'; break; case 10: // File Upload JHTML::Script('jquery-1.js', 'components/com_redshop/assets/js/', false); JHTML::Script('ajaxupload.js', 'components/com_redshop/assets/js/', false); $ajax = ""; if (AJAX_CART_BOX) { $ex_field .= '<script>jQuery.noConflict();</script>'; if ($isatt > 0) { $ajax = "ajax"; $ex_field .= '<div class="userfield_input"><input type="button" class="' . $row_data[$i]->field_class . '" value="' . JText::_('COM_REDSHOP_UPLOAD') . '" id="file' . $ajax . $row_data[$i]->field_name . '" onClick=\'javascript:new AjaxUpload("file' . $ajax . $row_data[$i]->field_name . '",{action:"' . JURI::root() . 'index.php?tmpl=component&option=com_redshop&view=product&task=ajaxupload",data :{mname:"file' . $ajax . $row_data[$i]->field_name . '"}, name:"file' . $ajax . $row_data[$i]->field_name . '",onSubmit : function(file , ext){jQuery("file' . $ajax . $row_data[$i]->field_name . '").text("' . JText::_('COM_REDSHOP_UPLOADING') . '" + file);this.disable();}, onComplete :function(file,response){jQuery("<li></li>").appendTo(jQuery("#ol_' . $ajax . $row_data[$i]->field_name . '")).text(response);var uploadfiles = jQuery("#ol_' . $ajax . $row_data[$i]->field_name . ' li").map(function() {return jQuery(this).text();}).get().join(",");jQuery("#' . $ajax . $row_data[$i]->field_name . '_' . $product_id . '").val(uploadfiles);this.enable();jQuery("#' . $row_data[$i]->field_name . '").val(uploadfiles);}});\' />'; } else { $ex_field .= '<div class="userfield_input"><input type="button" class="' . $row_data[$i]->field_class . '" value="' . JText::_('COM_REDSHOP_UPLOAD') . '" id="file' . $ajax . $row_data[$i]->field_name . '" />'; $ex_field .= '<script> new AjaxUpload("file' . $ajax . $row_data[$i]->field_name . '",{action:"' . JURI::root() . 'index.php?tmpl=component&option=com_redshop&view=product&task=ajaxupload",data :{mname:"file' . $ajax . $row_data[$i]->field_name . '"}, name:"file' . $ajax . $row_data[$i]->field_name . '",onSubmit : function(file , ext){jQuery("file' . $ajax . $row_data[$i]->field_name . '").text("' . JText::_('COM_REDSHOP_UPLOADING') . '" + file);this.disable();}, onComplete :function(file,response){jQuery("<li></li>").appendTo(jQuery("#ol_' . $ajax . $row_data[$i]->field_name . '")).text(response);var uploadfiles = jQuery("#ol_' . $ajax . $row_data[$i]->field_name . ' li").map(function() {return jQuery(this).text();}).get().join(",");jQuery("#' . $ajax . $row_data[$i]->field_name . '_' . $product_id . '").val(uploadfiles);this.enable();jQuery("#' . $row_data[$i]->field_name . '").val(uploadfiles);}}); </script>'; } $ex_field .= '<p>' . JText::_('COM_REDSHOP_UPLOADED_FILE') . ':<ol id="ol_' . $ajax . $row_data[$i]->field_name . '"></ol></p></div>'; $ex_field .= '<input type="hidden" name="extrafields' . $product_id . '[]" id="' . $ajax . $row_data[$i]->field_name . '_' . $product_id . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" />'; } else { $ex_field .= '<div class="userfield_input"><input class="' . $row_data[$i]->field_class . '" type="button" value="' . JText::_('COM_REDSHOP_UPLOAD') . '" name="file' . $row_data[$i]->field_name . '_' . $product_id . '" id="file' . $row_data[$i]->field_name . '_' . $product_id . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" size="' . $row_data[$i]->field_size . '" /><p>' . JText::_('COM_REDSHOP_UPLOADED_FILE') . ':<ol id="ol_' . $row_data[$i]->field_name . '"></ol></p></div>'; $ex_field .= '<input type="hidden" name="extrafields' . $product_id . '[]" id="' . $row_data[$i]->field_name . '_' . $product_id . '" ' . $req . ' userfieldlbl="' . $row_data[$i]->field_title . '" />'; $ex_field .= '<script>jQuery.noConflict();new AjaxUpload("file' . $row_data[$i]->field_name . '_' . $product_id . '",{action:"' . JURI::root() . 'index.php?tmpl=component&option=com_redshop&view=product&task=ajaxupload",data :{mname:"file' . $row_data[$i]->field_name . '_' . $product_id . '"}, name:"file' . $row_data[$i]->field_name . '_' . $product_id . '",onSubmit : function(file , ext){jQuery("' . $row_data[$i]->field_name . '").text("' . JText::_('COM_REDSHOP_UPLOADING') . '" + file);this.disable();}, onComplete :function(file,response){jQuery("<li></li>").appendTo(jQuery("#ol_' . $row_data[$i]->field_name . '")).text(response);var uploadfiles = jQuery("#ol_' . $ajax . $row_data[$i]->field_name . ' li").map(function() {return jQuery(this).text();}).get().join(",");jQuery("#' . $row_data[$i]->field_name . '_' . $product_id . '").val(uploadfiles);jQuery("#' . $row_data[$i]->field_name . '").val(uploadfiles);this.enable();}});</script>'; } break; case 11: // 11 :- Image select $field_chk = $this->getFieldValue($row_data[$i]->field_id); $chk_data = @explode(",", $cart[$idx][$row_data[$i]->field_name]); $ex_field .= '<table><tr>'; for ($c = 0; $c < count($field_chk); $c++) { $ex_field .= '<td><div class="userfield_input"><img id="' . $row_data[$i]->field_name . "_" . $field_chk[$c]->value_id . '" class="pointer imgClass_' . $product_id . '" src="' . REDSHOP_FRONT_IMAGES_ABSPATH . 'extrafield/' . $field_chk[$c]->field_name . '" title="' . $field_chk[$c]->field_value . '" alt="' . $field_chk[$c]->field_value . '" onclick="javascript:setProductUserFieldImage(\'' . $row_data[$i]->field_name . '\',\'' . $product_id . '\',\'' . $field_chk[$c]->field_value . '\',this);"/></div></td>'; } $ex_field .= '</tr></table>'; $ajax = ''; if (AJAX_CART_BOX && $isatt > 0) { $ajax = 'ajax'; } $ex_field .= '<input type="hidden" name="extrafields' . $product_id . '[]" id="' . $ajax . $row_data[$i]->field_name . '_' . $product_id . '" userfieldlbl="' . $row_data[$i]->field_title . '" ' . $req . ' />'; break; case 12: // 12 :- Date Picker $ajax = ''; $req = $row_data[$i]->required; if (AJAX_CART_BOX && $isatt == 0) { $req = 0; } if (AJAX_CART_BOX && $isatt > 0) { $ajax = 'ajax'; } $ex_field .= '<div class="userfield_input">' . JHTML::_('calendar', $text_value, 'extrafields' . $product_id . '[]', $ajax . $row_data[$i]->field_name . '_' . $product_id, $format = '%d-%m-%Y', array('class' => $row_data[$i]->field_class, 'size' => $row_data[$i]->field_size, 'maxlength' => $row_data[$i]->field_maxlength, 'required' => $req, 'userfieldlbl' => $row_data[$i]->field_title, 'errormsg' => '')) . '</div>'; break; case 15: $field_chk = $this->getSectionFieldDataList($row_data[$i]->field_id, 12, $product_id); if (count($field_chk) > 0) { $mainsplit_date_total = preg_split(" ", $field_chk->data_txt); $mainsplit_date = preg_split(":", $mainsplit_date_total[0]); $mainsplit_date_extra = preg_split(":", $mainsplit_date_total[1]); $dateStart = mktime(0, 0, 0, date('m', $mainsplit_date[0]), date('d', $mainsplit_date[0]), date('Y', $mainsplit_date[0])); $dateEnd = mktime(23, 59, 59, date('m', $mainsplit_date[1]), date('d', $mainsplit_date[1]), date('Y', $mainsplit_date[1])); $todayStart = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $todayEnd = mktime(23, 59, 59, date('m'), date('d'), date('Y')); if ($dateStart <= $todayStart && $dateEnd >= $todayEnd) { $ex_field .= '<div class="userfield_input">'; $ex_field .= '' . $asterisk . $row_data[$i]->field_title . ' : <select name="extrafields' . $product_id . '[]" id="' . $row_data[$i]->field_name . '" userfieldlbl="' . $row_data[$i]->field_title . '" ' . $req . ' >'; $ex_field .= '<option value="">' . JText::_('COM_REDSHOP_SELECT') . '</option>'; for ($c = 0; $c < count($mainsplit_date_extra); $c++) { if ($mainsplit_date_extra[$c] != "") { $ex_field .= '<option value="' . date("d-m-Y", $mainsplit_date_extra[$c]) . '" >' . date("d-m-Y", $mainsplit_date_extra[$c]) . '</option>'; } } $ex_field .= '</select></div>'; } } break; } } if (trim($row_data[$i]->field_desc) != '' && $field_type != 'hidden') { $ex_field .= '<div class="userfield_tooltip"> ' . JHTML::tooltip($row_data[$i]->field_desc, $row_data[$i]->field_name, 'tooltip.png', '', '', false) . '</div>'; } } $ex = array(); $ex[0] = $ex_field_title; $ex[1] = $ex_field; return $ex; }
} // Facebook I like Button if (strstr($template_desc, "{facebook_like_button}")) { $uri = JFactory::getURI(); $facebook_link = urlencode($uri->toString()); $facebook_like = '<iframe src="' . $Scheme . '://www.facebook.com/plugins/like.php?href=' . $facebook_link . '&layout=standard&show_faces=true&width=450&action=like&font&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>'; $template_desc = str_replace("{facebook_like_button}", $facebook_like, $template_desc); $jconfig = JFactory::getConfig(); $sitename = $jconfig->getValue('config.sitename'); $this->document->setMetaData("og:url", $uri->toString()); $this->document->setMetaData("og:type", "product"); $this->document->setMetaData("og:site_name", $sitename); } // Google I like Button if (strstr($template_desc, "{googleplus1}")) { JHTML::Script('plusone.js', 'https://apis.google.com/js/', false); $uri = JFactory::getURI(); $google_like = '<g:plusone></g:plusone>'; $template_desc = str_replace("{googleplus1}", $google_like, $template_desc); } if (strstr($template_desc, "{bookmark}")) { $bookmark = '<script type="text/javascript">addthis_pub = "AddThis";</script>'; $bookmark .= '<a href="' . $Scheme . '://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, \'\', \'[URL]\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()">'; $bookmark .= '<img src="' . $Scheme . '://s7.addthis.com/static/btn/lg-share-en.gif" alt="Share" border="0" height="16" width="125"></a>'; $bookmark .= '<script type="text/javascript" src="' . $Scheme . '://s7.addthis.com/js/200/addthis_widget.js"></script>'; $template_desc = str_replace("{bookmark}", $bookmark, $template_desc); } // Extra field display $extraFieldName = $extraField->getSectionFieldNameArray(1, 1, 1); $template_desc = $producthelper->getExtraSectionTag($extraFieldName, $this->data->product_id, "1", $template_desc); // Product thumb image
function getDatas() { if ($this->config['module_mode'] != 'normal') { if (!class_exists('NSP_GK4_' . $this->config['module_mode'])) { require_once dirname(__FILE__) . DS . 'gk_classes' . DS . 'portal_modes' . DS . 'gk.' . strtolower($this->config['module_mode']) . '.php'; } // $method_name = $this->config['module_mode'] . '_getData'; $this->content = $method_name($this); } else { $db = JFactory::getDBO(); if ($this->config["data_source"] == "com_categories" || $this->config["data_source"] == "com_articles" || $this->config["data_source"] == "com_all_articles") { // getting instance of Joomla! com_content source class $newsClass = new NSP_GK4_Joomla_Source(); // Getting list of categories $categories = $this->config["data_source"] != "com_all_articles" ? $newsClass->getSources($this->config) : false; // getting content $amountOfArts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount']; $this->content = $newsClass->getArticles($categories, $this->config, $amountOfArts); } else { if ($this->config["data_source"] == "k2_categories" || $this->config["data_source"] == "k2_tags" || $this->config["data_source"] == "k2_articles" || $this->config["data_source"] == "all_k2_articles") { // getting insance of K2 source class $newsClass = new NSP_GK4_K2_Source(); // Getting list of categories $categories = $this->config["data_source"] != "all_k2_articles" ? $newsClass->getSources($this->config) : false; // getting content $amountOfArts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount']; $this->content = $newsClass->getArticles($categories, $this->config, $amountOfArts); $this->content['comments'] = $newsClass->getComments($this->content, $this->config); } else { if ($this->config["data_source"] == "redshop_categories" || $this->config["data_source"] == "redshop_products" || $this->config["data_source"] == "all_redshop_products") { if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop')) { $newsClass = new NSP_GK4_Redshop_Source(); // get product helper if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'product.php')) { require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'product.php'; } if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'helper.php')) { require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'helper.php'; } if (file_exists(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'category.php')) { require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'category.php'; } if ($this->config['rs_add_to_cart'] == 1) { if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.js.php')) { require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.js.php'; } } // include scripts if (file_exists('components/com_redshop/assets/js/') && $this->config['rs_add_to_cart'] == 1) { JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); //JHTML::Script('jquery.tools.min.js', 'components/com_redshop/assets/js/',false); } require_once JPATH_ROOT . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.js.php'; $doc =& JFactory::getDocument(); $tmpl = JRequest::getCmd('tmpl'); $view = JRequest::getCmd('view'); $layout = JRequest::getCmd('layout'); $for = JRequest::getWord("for", false); if ($tmpl == 'component' && !$for) { $doc->addStyleDeclaration('html { overflow:scroll; }'); } // Getting the configuration require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'redshop.cfg.php'; require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'configuration.php'; $Redconfiguration = new Redconfiguration(); $Redconfiguration->defineDynamicVars(); require_once JPATH_SITE . DS . 'components' . DS . 'com_redshop' . DS . 'helpers' . DS . 'currency.php'; $session = JFactory::getSession('product_currency'); $post = JRequest::get('POST'); $Itemid = JRequest::getVar('Itemid'); if (isset($post['product_currency'])) { $session->set('product_currency', $post['product_currency']); } $currency_symbol = REDCURRENCY_SYMBOL; $currency_convert = 1; if ($session->get('product_currency')) { $currency_symbol = $session->get('product_currency'); $convertPrice = new convertPrice(); $currency_convert = $convertPrice->convert(1); } $script = "window.site_url ='" . JURI::root() . "';\n\t\t\t\t\twindow.AJAX_CART_BOX ='" . AJAX_CART_BOX . "';\n\t\t\t\t\twindow.REDSHOP_VIEW ='" . $view . "';\n\t\t\t\t\twindow.REDSHOP_LAYOUT ='" . $layout . "';\n\t\t\t\t\twindow.AJAX_CART_URL ='" . JRoute::_('index.php?option=com_redshop&view=cart&Itemid=' . $Itemid, false) . "';\n\t\t\t\t\twindow.REDCURRENCY_SYMBOL ='" . REDCURRENCY_SYMBOL . "';\n\t\t\t\t\twindow.CURRENCY_SYMBOL_CONVERT ='" . $currency_symbol . "';\n\t\t\t\t\twindow.CURRENCY_CONVERT ='" . $currency_convert . "';\n\t\t\t\t\twindow.PRICE_SEPERATOR ='" . PRICE_SEPERATOR . "';\n\t\t\t\t\twindow.PRODUCT_OUTOFSTOCK_MESSAGE ='" . JText::_('PRODUCT_OUTOFSTOCK_MESSAGE') . "';\n\t\t\t\t\twindow.PREORDER_PRODUCT_OUTOFSTOCK_MESSAGE ='" . JText::_('PREORDER_PRODUCT_OUTOFSTOCK_MESSAGE') . "';\n\t\t\t\t\twindow.CURRENCY_SYMBOL_POSITION ='" . CURRENCY_SYMBOL_POSITION . "';\n\t\t\t\t\twindow.PRICE_DECIMAL ='" . PRICE_DECIMAL . "';\n\t\t\t\t\twindow.PASSWORD_MIN_CHARACTER_LIMIT ='" . JText::_('PASSWORD_MIN_CHARACTER_LIMIT') . "';\n\t\t\t\t\twindow.THOUSAND_SEPERATOR ='" . THOUSAND_SEPERATOR . "';\n\t\t\t\t\twindow.VIEW_CART ='" . JText::_('VIEW_CART') . "';\n\t\t\t\t\twindow.CONTINUE_SHOPPING ='" . JText::_('CONTINUE_SHOPPING') . "';\n\t\t\t\t\twindow.CART_SAVE ='" . JText::_('CART_SAVE') . "';\n\t\t\t\t\twindow.IS_REQUIRED ='" . JText::_('IS_REQUIRED') . "';\n\t\t\t\t\twindow.ENTER_NUMBER ='" . JText::_('ENTER_NUMBER') . "';\n\t\t\t\t\twindow.USE_STOCKROOM ='" . USE_STOCKROOM . "';\n\t\t\t\t\twindow.USE_AS_CATALOG ='" . USE_AS_CATALOG . "';\n\t\t\t\t\twindow.AJAX_CART_DISPLAY_TIME ='" . AJAX_CART_DISPLAY_TIME . "';\n\t\t\t\t\twindow.SHOW_PRICE ='" . SHOW_PRICE . "';\n\t\t\t\t\twindow.DEFAULT_QUOTATION_MODE ='" . DEFAULT_QUOTATION_MODE . "';\n\t\t\t\t\twindow.PRICE_REPLACE ='" . PRICE_REPLACE . "';\n\t\t\t\t\twindow.PRICE_REPLACE_URL ='" . PRICE_REPLACE_URL . "';\n\t\t\t\t\twindow.ZERO_PRICE_REPLACE ='" . ZERO_PRICE_REPLACE . "';\n\t\t\t\t\twindow.ZERO_PRICE_REPLACE_URL ='" . ZERO_PRICE_REPLACE_URL . "';\n\t\t\t\t\twindow.OPTIONAL_SHIPPING_ADDRESS ='" . OPTIONAL_SHIPPING_ADDRESS . "';\n\t\t\t\t\twindow.SHIPPING_METHOD_ENABLE ='" . SHIPPING_METHOD_ENABLE . "';\n\t\t\t\t\twindow.PRODUCT_ADDIMG_IS_LIGHTBOX ='" . PRODUCT_ADDIMG_IS_LIGHTBOX . "';\n\t\t\t\t\twindow.ALLOW_PRE_ORDER ='" . ALLOW_PRE_ORDER . "';\n\t\t\t\t\twindow.ATTRIBUTE_SCROLLER_THUMB_WIDTH ='" . ATTRIBUTE_SCROLLER_THUMB_WIDTH . "';\n\t\t\t\t\twindow.ATTRIBUTE_SCROLLER_THUMB_HEIGHT ='" . ATTRIBUTE_SCROLLER_THUMB_HEIGHT . "';\n\t\t\t\t\twindow.PRODUCT_DETAIL_IS_LIGHTBOX ='" . PRODUCT_DETAIL_IS_LIGHTBOX . "';\n\t\t\t\t\twindow.PLEASE_ENTER_COMPANY_NAME ='" . JText::_('PLEASE_ENTER_COMPANY_NAME', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_FIRSTNAME ='" . JText::_('YOUR_MUST_PROVIDE_A_FIRSTNAME', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_LASTNAME ='" . JText::_('YOUR_MUST_PROVIDE_A_LASTNAME', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_ADDRESS ='" . JText::_('YOUR_MUST_PROVIDE_A_ADDRESS', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_ZIP ='" . JText::_('YOUR_MUST_PROVIDE_A_ZIP', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_CITY ='" . JText::_('YOUR_MUST_PROVIDE_A_CITY', true) . "';\n\t\t\t\t\twindow.YOUR_MUST_PROVIDE_A_PHONE ='" . JText::_('YOUR_MUST_PROVIDE_A_PHONE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_REQUIRED ='" . JText::_('THIS_FIELD_REQUIRED', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_REMOTE ='" . JText::_('THIS_FIELD_REMOTE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_URL='" . JText::_('THIS_FIELD_URL', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_DATE='" . JText::_('THIS_FIELD_DATE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_DATEISO='" . JText::_('THIS_FIELD_DATEISO', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_NUMBER='" . JText::_('THIS_FIELD_NUMBER', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_DIGITS='" . JText::_('THIS_FIELD_DIGITS', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_CREDITCARD='" . JText::_('THIS_FIELD_CREDITCARD', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_EQUALTO='" . JText::_('THIS_FIELD_EQUALTO', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_ACCEPT='" . JText::_('THIS_FIELD_ACCEPT', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MAXLENGTH='" . JText::_('THIS_FIELD_MAXLENGTH', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MINLENGTH='" . JText::_('THIS_FIELD_MINLENGTH', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_RANGELENGTH='" . JText::_('THIS_FIELD_RANGELENGTH', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_RANGE='" . JText::_('THIS_FIELD_RANGE', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MAX='" . JText::_('THIS_FIELD_MAX', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_MIN='" . JText::_('THIS_FIELD_MIN', true) . "';\n\t\t\t\t\twindow.YOU_MUST_PROVIDE_LOGIN_NAME ='" . JText::_('YOU_MUST_PROVIDE_LOGIN_NAME', true) . "';\n\t\t\t\t\twindow.PROVIDE_EMAIL_ADDRESS ='" . JText::_('PROVIDE_EMAIL_ADDRESS', true) . "';\n\t\t\t\t\twindow.EMAIL_NOT_MATCH ='" . JText::_('EMAIL_NOT_MATCH', true) . "';\n\t\t\t\t\twindow.PASSWORD_NOT_MATCH ='" . JText::_('PASSWORD_NOT_MATCH', true) . "';\n\t\t\t\t\twindow.NOOF_SUBATTRIB_THUMB_FOR_SCROLLER ='" . NOOF_SUBATTRIB_THUMB_FOR_SCROLLER . "';\n\t\t\t\t\twindow.NOT_AVAILABLE ='" . JText::_('NOT_AVAILABLE', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_HEIGHT ='" . JText::_('PLEASE_INSERT_HEIGHT', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_WIDTH ='" . JText::_('PLEASE_INSERT_WIDTH', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_DEPTH ='" . JText::_('PLEASE_INSERT_DEPTH', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_RADIUS ='" . JText::_('PLEASE_INSERT_RADIUS', true) . "';\n\t\t\t\t\twindow.PLEASE_INSERT_UNIT ='" . JText::_('PLEASE_INSERT_UNIT', true) . "';\n\t\t\t\t\twindow.THIS_FIELD_IS_REQUIRED ='" . JText::_('THIS_FIELD_IS_REQUIRED', true) . "';\n\t\t\t\t\twindow.CREATE_ACCOUNT_CHECKBOX ='" . CREATE_ACCOUNT_CHECKBOX . "';\n\t\t\t\t\twindow.SHOW_QUOTATION_PRICE ='" . SHOW_QUOTATION_PRICE . "';"; $document = JFactory::getDocument(); $document->addScriptDeclaration($script); // Getting list of categories $categories = $newsClass->getSources($this->config); // getting content $amountOfProducts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount']; $this->content = $newsClass->getArticles($categories, $this->config, $amountOfProducts); } } else { // VM block $newsClass = new NSP_GK4_VM_Source(); // Getting list of categories $categories = $newsClass->getSources($this->config); // getting content $amountOfProducts = $this->config['news_column'] * $this->config['news_rows'] * $this->config['news_full_pages'] + $this->config['links_amount'] * $this->config['news_short_pages'] * $this->config['links_columns_amount']; $this->content = $newsClass->getProducts($categories, $this->config, $amountOfProducts); $this->content['comments'] = $newsClass->getComments($this->content, $this->config); } } } } }
/** * Display Product Data */ function displayredManufacturer($limit = 0) { $uri = JUri::getInstance(); $url = $uri->root(); $database = JFactory::getDbo(); $Itemid = JRequest::getInt('Itemid', 0); $extra_data = new producthelper(); $document = JFactory::getDocument(); JHTML::Script('jquery-1.js', 'modules/mod_redmanufacturer/js/', false); JHTML::Script('jquery.js', 'modules/mod_redmanufacturer/js/', false); JHTML::Stylesheet('jquery.css', 'modules/mod_redmanufacturer/css/'); echo $this->params->get('pretext', ""); $qlimit = ""; if ($limit > 0) { $qlimit = "LIMIT {$limit}"; } $query = "SELECT m.media_name,ma.manufacturer_name,ma.manufacturer_id FROM #__redshop_manufacturer as ma " . "LEFT JOIN #__redshop_media AS m ON m.`section_id`=ma.manufacturer_id " . "WHERE m.media_section='manufacturer' " . "AND m.published=1 " . "AND ma.published=1 " . $qlimit; $database->setQuery($query); $rows = $database->loadObjectList(); ?> <script type="text/javascript"> var dom1 = {}; dom1.query = jQuery.noConflict(true); var mycarousel_itemList = [ <?php for ($i = 0; $i < count($rows); $i++) { $thumbUrl = RedShopHelperImages::getImagePath($rows[$i]->media_name, '', 'thumb', 'manufacturer', $this->ImageWidth, $this->ImageHeight, USE_IMAGE_SIZE_SWAPPING); ?> {url: "<?php echo $thumbUrl; ?> ", title: '<?php echo $rows[$i]->manufacturer_name; ?> ', ahref: '<a href="<?php echo JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=' . $this->PageLink . '&mid=' . $rows[$i]->manufacturer_id . '&Itemid=' . $Itemid); ?> " title="<?php echo $rows[$i]->manufacturer_name; ?> ">'} <?php if ($i < count($rows) - 1) { ?> , <?php } } ?> ]; function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt) { // The index() method calculates the index from a // given index who is out of the actual item range. var idx = carousel.index(i, mycarousel_itemList.length); carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1])); } ; function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt) { carousel.remove(i); } ; /** * Item html creation helper. */ function mycarousel_getItemHTML(item) { var displayItem = ''; <?php if ($this->show_image == 1) { ?> displayItem = displayItem + item.ahref + '<img src="' + item.url + '" width="<?php echo $this->ImageWidth; ?> " height="<?php echo $this->ImageHeight; ?> " alt="' + item.title + '" /></a><br/>'; <?php } if ($this->show_link_on_product_name == 1) { ?> displayItem = displayItem + item.ahref; <?php } if ($this->show_product_name == 1) { ?> displayItem = displayItem + '<div align="center">' + item.title + '</div>'; <?php } if ($this->show_link_on_product_name == 1) { ?> displayItem = displayItem + '</a>'; <?php } ?> return displayItem; } ; function mycarousel_initCallback(carousel, item, i, state, evt) { var idx = carousel.index(i, mycarousel_itemList.length); carousel.startAuto(idx); } ; dom1.query(function () { dom1.query('#mycarousel').jcarousel({ wrap: '<?php echo $this->ScrollWrap; ?> ', scroll:<?php echo $this->ScrollBehavior; ?> , auto:<?php echo $this->ScrollAuto; ?> , animation: '<?php echo $this->ScrollDelay; ?> ', vertical:<?php echo $this->ScrollDirection; ?> , itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback}, itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}, itemLastOutCallback: mycarousel_initCallback }); }); </script> <style type="text/css"> .jcarousel-skin-tango .jcarousel-container { } .jcarousel-skin-tango .jcarousel-container-horizontal { width: <?php echo $this->ScrollWidth + 10; ?> px; /* Default 140 Aspect 1 image */ height: <?php echo $this->ScrollHeight + 10; ?> px; /* Default 140 Aspect 1 image */ padding-top: 10px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; } /* For vertical scrolling */ .jcarousel-skin-tango .jcarousel-container-vertical { width: <?php echo $this->ScrollWidth + 10; ?> px; height: <?php echo $this->ScrollHeight + 10; ?> px; padding: 10px 10px; } .jcarousel-skin-tango .jcarousel-clip-horizontal { width: <?php echo $this->ScrollWidth; ?> px; /* Default 130 Aspect 1 image change acording to params */ height: <?php echo $this->ScrollHeight; ?> px; /* Default 120 Aspect 1 image change acording to params */ } /* For vertical scrolling */ .jcarousel-skin-tango .jcarousel-clip-vertical { width: <?php echo $this->ScrollWidth; ?> px; height: <?php echo $this->ScrollHeight; ?> px; } .jcarousel-skin-tango .jcarousel-item { padding: 5px; width: <?php echo $this->ImageWidth; ?> px; /* Default image width */ height: <?php echo $this->ImageHeight + 25; ?> px; /* Default image height */ <?php if ($this->ImageBorder == 'yes') { ?> border: 1px solid; <?php } ?> } .jcarousel-skin-tango .jcarousel-item:hover { background-position: 0px -90px; cursor: pointer; } .jcarousel-skin-tango .jcarousel-item-horizontal { margin-right: 20px; } /* For vertical scrolling */ .jcarousel-skin-tango .jcarousel-item-vertical { margin-bottom: 20px; } .jcarousel-skin-tango .jcarousel-item-placeholder { color: #000; } </style> <div class="jcarousel-skin-tango"> <div style="display: block;" class="jcarousel-container jcarousel-container-horizontal"> <div> <ul id="mycarousel" class="jcarousel-list jcarousel-list-horizontal"> <?php for ($i = 0; $i < count($rows); $i++) { $thumbUrl = RedShopHelperImages::getImagePath($rows[$i]->media_name, '', 'thumb', 'manufacturer', 100, 100, USE_IMAGE_SIZE_SWAPPING); ?> <li jcarouselindex="<?php echo $i + 31; ?> " class="jcarousel-item jcarousel-item-horizontal jcarousel-item-<?php echo $i + 31; ?> jcarousel-item-<?php echo $i + 31; ?> -horizontal"> <a href='<?php echo $url; ?> index.php?option=com_redshop&view=manufacturers&layout=<?php echo $this->PageLink; ?> &mid=<?php echo $rows[$i]->manufacturer_id; ?> &Itemid=<?php echo $Itemid; ?> ' title='<?php echo $rows[$i]->manufacturer_name; ?> '> <img src='<?php echo $thumbUrl; ?> ' alt='<?php echo $rows[$i]->media_name; ?> ' width='100' height='100'> </a> </li> <?php } ?> </ul> </div> </div> </div> <?php }
* * @version $Id: view.html.php 2010-06-02 12:34:25 svn $ * @author * @package Joomla * @subpackage Listings * @license Copyright (c) 2010 - All Rights Reserved * * * */ // no direct access defined('_JEXEC') or die('Restricted access'); //initializing variables $media = "components/" . EBOOK_COMPONENT . "/media/"; //loading media JHTML::Script('searchbar.js', $media . 'js/'); ?> <div class="search_wrapper"> <div class="search_container"> <div class="search_settings"> <form action="?option=com_byrdlist&view=listings" id="basic_search" method="post"> <div class="search_left"></div> <div class="search_mid"> <div class="mid_top"> <b>Find</b> <input type="text" id="filter" name="search_filter" onKeyUp="javascript: _search();" /> <!-- <b>in</b> <select id="select_categories" name="_categories_id"> <option></option> </select>
$uname = ''; $uemail = ''; $address = ''; $telephone = ''; $user = JFactory::getUser(); if ($user->id) { $uname = $user->name; $uemail = $user->email; } $Itemid = JRequest::getInt('Itemid'); $pid = JRequest::getInt('pid'); $ask = JRequest::getInt('ask'); $category_id = JRequest::getInt('category_id'); $document = JFactory::getDocument(); $userhelper = new rsUserhelper(); JHTML::Script('jquery.tools.min.js', 'components/com_redshop/assets/js/', false); $template = $redTemplate->getTemplate('ask_question_template'); if (count($template) > 0 && $template[0]->template_desc != "") { $template_desc = $template[0]->template_desc; } else { $template_desc = '<table border="0"><tbody><tr><td>{user_name_lbl}</td><td>{user_name}</td></tr><tr><td>{user_email_lbl}</td><td>{user_email}</td></tr><tr><td>{user_question_lbl}</td><td>{user_question}</td></tr><tr><td></td><td>{send_button}</td></tr></tbody></table>'; } ?> <script type="text/javascript" language="javascript">var J = jQuery.noConflict();</script> <script type="text/javascript" language="javascript"> function validateQuestion() { var frm = document.frmaskquestion; if (frm.your_name.value == '') { alert("<?php echo JText::_('COM_REDSHOP_PLEASE_ENTER_YOUR_NAME');
/** * payment function * * @return void */ public function payment() { $app = JFactory::getApplication(); $redconfig = new Redconfiguration(); $Itemid = JRequest::getVar('Itemid'); $order_id = JRequest::getInt('order_id'); $option = JRequest::getVar('option'); $order = $this->_order_functions->getOrderDetails($order_id); $paymentInfo = $this->_order_functions->getOrderPaymentDetail($order_id); if (count($paymentInfo) > 0) { $paymentmethod = $this->_order_functions->getPaymentMethodInfo($paymentInfo[0]->payment_method_class); if (count($paymentmethod) > 0) { $paymentparams = new JRegistry($paymentmethod[0]->params); $is_creditcard = $paymentparams->get('is_creditcard', 0); if ($is_creditcard) { JHTML::Script('credit_card.js', 'components/com_redshop/assets/js/', false); ?> <form action="<?php echo JRoute::_('index.php?option=com_redshop&view=checkout'); ?> " method="post" name="adminForm" id="adminForm" enctype="multipart/form-data" onsubmit="return CheckCardNumber(this);"> <?php echo $cardinfo = $this->_carthelper->replaceCreditCardInformation($paymentInfo[0]->payment_method_class); ?> <div style="float: right;"> <input type="hidden" name="option" value="com_redshop"/> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> "/> <input type="hidden" name="task" value="process_payment"/> <input type="hidden" name="view" value="order_detail"/> <input type="submit" name="submit" class="greenbutton" value="<?php echo JText::_('COM_REDSHOP_PAY'); ?> "/> <input type="hidden" name="ccinfo" value="1"/> <input type="hidden" name="users_info_id" value="<?php echo $order->user_info_id; ?> "/> <input type="hidden" name="order_id" value="<?php echo $order->order_id; ?> "/> <input type="hidden" name="payment_method_id" value="<?php echo $paymentInfo[0]->payment_method_class; ?> "/> </div> </form><?php } else { $link = 'index.php?option=com_redshop&view=order_detail&layout=checkout_final&oid=' . $order_id . '&Itemid=' . $Itemid; $this->setRedirect($link); } } } }
public function display($tpl = null) { $app = JFactory::getApplication(); $shippinghelper = new shipping(); $order_functions = new order_functions(); $params = $app->getParams('com_redshop'); $option = JRequest::getVar('option'); $Itemid = JRequest::getInt('Itemid'); $issplit = JRequest::getBool('issplit'); $ccinfo = JRequest::getInt('ccinfo'); $task = JRequest::getCmd('task'); $model = $this->getModel('checkout'); $session = JFactory::getSession(); if ($issplit != '') { $session->set('issplit', $issplit); } $payment_method_id = JRequest::getCmd('payment_method_id'); $users_info_id = JRequest::getInt('users_info_id'); $auth = $session->get('auth'); if (empty($users_info_id)) { $users_info_id = $auth['users_info_id']; } $shipping_rate_id = JRequest::getString('shipping_rate_id'); $shippingdetail = explode("|", $shippinghelper->decryptShipping(str_replace(" ", "+", $shipping_rate_id))); if (count($shippingdetail) < 4) { $shipping_rate_id = ""; } $cart = $session->get('cart'); if ($cart['idx'] < 1) { $msg = JText::_('COM_REDSHOP_EMPTY_CART'); $app->Redirect('index.php?option=' . $option . '&Itemid=' . $Itemid, $msg); } if (SHIPPING_METHOD_ENABLE) { if ($users_info_id < 1) { $msg = JText::_('COM_REDSHOP_SELECT_SHIP_ADDRESS'); $link = 'index.php?option=' . $option . '&view=checkout&Itemid=' . $Itemid . '&users_info_id=' . $users_info_id . '&shipping_rate_id=' . $shipping_rate_id . '&payment_method_id=' . $payment_method_id; $app->Redirect($link, $msg); } if ($shipping_rate_id == '' && $cart['free_shipping'] != 1) { $msg = JText::_('COM_REDSHOP_SELECT_SHIP_METHOD'); $link = 'index.php?option=' . $option . '&view=checkout&Itemid=' . $Itemid . '&users_info_id=' . $users_info_id . '&shipping_rate_id=' . $shipping_rate_id . '&payment_method_id=' . $payment_method_id; $app->Redirect($link, $msg); } } if ($payment_method_id == '') { $msg = JText::_('COM_REDSHOP_SELECT_PAYMENT_METHOD'); $link = 'index.php?option=' . $option . '&view=checkout&Itemid=' . $Itemid . '&users_info_id=' . $users_info_id . '&shipping_rate_id=' . $shipping_rate_id . '&payment_method_id=' . $payment_method_id; $app->Redirect($link, $msg); } $paymentinfo = $order_functions->getPaymentMethodInfo($payment_method_id); $paymentinfo = $paymentinfo[0]; $paymentpath = JPATH_SITE . '/plugins/redshop_payment/' . $paymentinfo->element . '/' . $paymentinfo->element . '.xml'; $paymentparams = new JRegistry($paymentinfo->params); $is_creditcard = $paymentparams->get('is_creditcard', ''); $is_subscription = $paymentparams->get('is_subscription', 0); if (@$is_creditcard == 1) { $document = JFactory::getDocument(); JHTML::Script('credit_card.js', 'components/com_redshop/assets/js/', false); } if ($is_subscription) { $subscription_id = $session->set('subscription_id', $subscription_id); } $this->cart = $cart; $this->users_info_id = $users_info_id; $this->shipping_rate_id = $shipping_rate_id; $this->payment_method_id = $payment_method_id; $this->is_creditcard = $is_creditcard; if ($task != '') { $tpl = $task; } parent::display($tpl); }
defined('_JEXEC') or die('Restricted access'); $option = JRequest::getCmd('option'); $session = JFactory::getSession(); $cart = $session->get('cart'); $count = 0; if (isset($cart['idx'])) { $count = $cart['idx']; } require_once JPATH_ROOT . '/administrator/components/com_redshop/helpers/redshop.cfg.php'; require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/configuration.php'; $Redconfiguration = new Redconfiguration(); $Redconfiguration->defineDynamicVars(); $user = JFactory::getUser(); $document = JFactory::getDocument(); $document->addScriptDeclaration("\n\t\tvar base_url = '" . JURI::root() . "';\n\t"); JHTML::Script('search.js', 'modules/mod_redshop_search/js/', false); $enableAjaxsearch = trim($params->get('enableAjaxsearch', '0')); $javaFun = ""; if ($enableAjaxsearch) { $document->addScript(JURI::base() . "administrator/components/com_redshop/assets/js/search.js"); $document->addStyleSheet(JURI::base() . "administrator/components/com_redshop/assets/css/search.css"); $javaFun = "makeUrl();"; } $db = JFactory::getDbo(); if ($user->id > 0) { $query = "SELECT sg.shopper_group_categories FROM `#__redshop_shopper_group` as sg LEFT JOIN #__redshop_users_info as uf ON sg.`shopper_group_id` = uf.shopper_group_id WHERE uf.user_id = " . (int) $user->id . " GROUP BY sg.shopper_group_id AND sg.shopper_group_portal=1"; } else { $query = "SELECT sg.shopper_group_categories FROM `#__redshop_shopper_group` as sg WHERE sg.`shopper_group_id` = '" . SHOPPER_GROUP_DEFAULT_UNREGISTERED . "' AND sg.shopper_group_portal=1"; } $db->setQuery($query); $shoppercatdata = $db->loadResult();
include_once JPATH_COMPONENT . '/helpers/product.php'; include_once JPATH_COMPONENT . '/helpers/cart.php'; $producthelper = new producthelper(); $carthelper = new rsCarthelper(); $redTemplate = new Redtemplate(); $cart = $this->cart; $idx = $cart['idx']; $Itemid = JRequest::getInt('Itemid'); $cart_index = JRequest::getInt('cart_index'); $product_id = JRequest::getInt('pid'); $model = $this->getModel('cart'); $session = JFactory::getSession(); $user = JFactory::getUser(); $document = JFactory::getDocument(); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); ?> <script type="text/javascript"> function cancelForm(frm) { frm.task.value = 'cancel'; frm.submit(); } function submitChangeAttribute() { calculateTotalPrice(<?php echo $product_id; ?> , 0); var requiedAttribute = document.getElementById('requiedAttribute').value; var requiedProperty = document.getElementById('requiedProperty').value; if (requiedAttribute != 0 && requiedAttribute != "") {
public function display($tpl = null) { $app = JFactory::getApplication(); $producthelper = new producthelper(); $redhelper = new redhelper(); $document = JFactory::getDocument(); $print = JRequest::getInt('print'); $layout = JRequest::getCmd('layout', 'default'); $params = $app->getParams('com_redshop'); $Itemid = $app->input->getInt('itemid', null); $mid = 0; $lists = array(); $model = $this->getModel('manufacturers'); $detail = $this->get('data'); $limit = $params->get('maxproduct'); if (!$limit && $detail) { $limit = $detail[0]->product_per_page; } $model->setProductLimit($limit); $pageheadingtag = ''; $disabled = ""; if ($print) { $disabled = "disabled"; } JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); JHTML::Script('fetchscript.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('fetchscript.css', 'components/com_redshop/assets/css/'); if ($layout != 'default') { $manufacturer = $detail[0]; $mid = $manufacturer->manufacturer_id; if ($manufacturer->manufacturer_id) { $document->setMetaData('robots', $manufacturer->metarobot_info); // For page title if (AUTOGENERATED_SEO && SEO_PAGE_TITLE_MANUFACTUR != '') { $pagetitletag = SEO_PAGE_TITLE_MANUFACTUR; $pagetitletag = str_replace("{manufacturer}", $manufacturer->manufacturer_name, $pagetitletag); $pagetitletag = str_replace("{shopname}", SHOP_NAME, $pagetitletag); } if ($manufacturer->pagetitle != '' && AUTOGENERATED_SEO && SEO_PAGE_TITLE_MANUFACTUR != '') { $pagetitletag = $pagetitletag . " " . $manufacturer->pagetitle; $document->setTitle($pagetitletag); } else { if ($manufacturer->pagetitle != '') { $pagetitletag = $manufacturer->pagetitle; $document->setTitle($manufacturer->pagetitle); } elseif (AUTOGENERATED_SEO && SEO_PAGE_TITLE_MANUFACTUR != '') { $document->setTitle($pagetitletag); } else { $pagetitletag = $app->getCfg('sitename'); $document->setTitle($app->getCfg('sitename')); } } if ($layout == 'products') { $pagetitletag = JText::_("COM_REDSHOP_MANUFACTURER_PRODUCT") . " " . $pagetitletag; $document->setTitle($pagetitletag); } // For meta keyword if (AUTOGENERATED_SEO && SEO_PAGE_KEYWORDS_MANUFACTUR != '') { $pagekeywordstag = SEO_PAGE_KEYWORDS_MANUFACTUR; $pagekeywordstag = str_replace("{manufacturer}", $manufacturer->manufacturer_name, $pagekeywordstag); $pagekeywordstag = str_replace("{shopname}", SHOP_NAME, $pagekeywordstag); } if ($manufacturer->metakey != '' && AUTOGENERATED_SEO && SEO_PAGE_KEYWORDS_MANUFACTUR != '') { $pagekeywordstag = $pagekeywordstag . ", " . $manufacturer->metakey; $document->setMetaData('keywords', $pagekeywordstag); } else { if ($manufacturer->metakey != '') { $document->setMetaData('keywords', $manufacturer->metakey); } elseif (AUTOGENERATED_SEO && SEO_PAGE_KEYWORDS_MANUFACTUR != '') { $document->setMetaData('keywords', $pagekeywordstag); } else { $document->setMetaData('keywords', $manufacturer->manufacturer_name); } } // For meta description if (AUTOGENERATED_SEO && SEO_PAGE_DESCRIPTION_MANUFACTUR != '') { $pagedesctag = SEO_PAGE_DESCRIPTION_MANUFACTUR; $pagedesctag = str_replace("{manufacturer}", $manufacturer->manufacturer_name, $pagedesctag); $pagedesctag = str_replace("{shopname}", SHOP_NAME, $pagedesctag); } if ($manufacturer->metadesc != '' && AUTOGENERATED_SEO && SEO_PAGE_DESCRIPTION_MANUFACTUR != '') { $pagedesctag = $pagedesctag . " " . $manufacturer->metadesc; $document->setMetaData('description', $pagedesctag); } else { if ($manufacturer->metadesc != '') { $document->setMetaData('description', $manufacturer->metadesc); } elseif (AUTOGENERATED_SEO && SEO_PAGE_DESCRIPTION_MANUFACTUR != '') { $document->setMetaData('description', $pagedesctag); } else { $document->setMetaData('description', $manufacturer->manufacturer_name); } } if ($manufacturer->metarobot_info != '') { $document->setMetaData('robots', $manufacturer->metarobot_info); } else { if (AUTOGENERATED_SEO && SEO_PAGE_ROBOTS != '') { $pagerobotstag = SEO_PAGE_ROBOTS; $document->setMetaData('robots', $pagerobotstag); } else { $document->setMetaData('robots', "INDEX,FOLLOW"); } } // For page heading if (AUTOGENERATED_SEO && SEO_PAGE_HEADING_MANUFACTUR != '') { $pageheadingtag = SEO_PAGE_HEADING_MANUFACTUR; $pageheadingtag = str_replace("{manufacturer}", $manufacturer->manufacturer_name, $pageheadingtag); } if (trim($manufacturer->pageheading) != '' && AUTOGENERATED_SEO && SEO_PAGE_HEADING_MANUFACTUR != '') { $pageheadingtag = $pageheadingtag . " " . $manufacturer->pageheading; } else { if (trim($manufacturer->pageheading) != '') { $pageheadingtag = $manufacturer->pageheading; } elseif (AUTOGENERATED_SEO && SEO_PAGE_HEADING_MANUFACTUR != '') { $pageheadingtag = $pageheadingtag; } } // FOr Canonical In Manufacturer Page if (AUTOGENERATED_SEO && SEO_PAGE_CANONICAL_MANUFACTUR != '' && $layout != "products") { $canonicalurl = SEO_PAGE_CANONICAL_MANUFACTUR; $manufacturer_products_url = substr_replace(JURI::root(), "", -1) . JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=products&mid=' . $manufacturer->manufacturer_id . '&Itemid=' . $Itemid); $canonicalurl_content = '<link rel="canonical" href="' . $manufacturer_products_url . '" />'; $canonicalurl = str_replace("{manufacturerproductslink}", $canonicalurl_content, $canonicalurl); $document->addCustomTag($canonicalurl); } } else { $document->setMetaData('keywords', $app->getCfg('sitename')); $document->setMetaData('description', $app->getCfg('sitename')); $document->setMetaData('robots', $app->getCfg('sitename')); } $this->setLayout($layout); } // Breadcrumbs $producthelper->generateBreadcrumb($mid); // Breadcrumbs end if ($layout == "products") { $order_by_select = JRequest::getString('order_by', DEFAULT_MANUFACTURER_PRODUCT_ORDERING_METHOD); $order_data = $redhelper->getOrderByList(); } else { $order_by_select = JRequest::getString('order_by', DEFAULT_MANUFACTURER_ORDERING_METHOD); $order_data = $redhelper->getManufacturerOrderByList(); } $lists['order_select'] = JHTML::_('select.genericlist', $order_data, 'order_by', 'class="inputbox" size="1" onchange="document.orderby_form.submit();" ' . $disabled . ' ', 'value', 'text', $order_by_select); $categorylist = $model->getCategoryList(); $temps = array(); $temps[0] = new StdClass(); $temps[0]->value = "0"; $temps[0]->text = JText::_('COM_REDSHOP_SELECT'); $categorylist = array_merge($temps, $categorylist); $filter_by_select = JRequest::getString('filter_by', 0); $lists['filter_select'] = JHTML::_('select.genericlist', $categorylist, 'filter_by', 'class="inputbox" size="1" onchange="document.filter_form.submit();" ' . $disabled . ' ', 'value', 'text', $filter_by_select); $pagination = $this->get('Pagination'); $this->detail = $detail; $this->lists = $lists; $this->pagination = $pagination; $this->pageheadingtag = $pageheadingtag; $this->params = $params; parent::display($tpl); }
public function display($tpl = null) { $app = JFactory::getApplication(); $redTemplate = new Redtemplate(); $lists = array(); $uri = JFactory::getURI(); $params = $app->getParams('com_redshop'); $document = JFactory::getDocument(); $layout = JRequest::getCmd('layout', ''); $model = $this->getModel('search'); if ($layout == 'default') { $pagetitle = JText::_('COM_REDSHOP_SEARCH'); $document->setTitle($pagetitle); } $document = JFactory::getDocument(); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); if (AJAX_CART_BOX == 0) { JHTML::Script('fetchscript.js', 'components/com_redshop/assets/js/', false); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); } // Ajax cart javascript if (AJAX_CART_BOX == 1) { JHTML::Script('fetchscript.js', 'components/com_redshop/assets/js/', false); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Stylesheet('fetchscript.css', 'components/com_redshop/assets/css/'); } if ($layout == 'redfilter') { $session = JSession::getInstance('none', array()); $tagid = JRequest::getInt('tagid', 0); $typeid = JRequest::getInt('typeid', 0); $remove = JRequest::getInt('remove', 0); $Itemid = JRequest::getInt('Itemid', 0); $cntproduct = JRequest::getInt('cnt', 0); $getredfilter = $session->get('redfilter'); if (count($getredfilter) == 0) { $redfilter = array(); } else { $redfilter = $getredfilter; } if ($tagid != 0 && $typeid != 0 && !array_key_exists($typeid, $redfilter)) { $redfilter[$typeid] = $tagid; } if ($remove == 1) { if ($typeid != 0) { unset($redfilter[$typeid]); $session->set('redfilter', $redfilter); $this->setLayout('redfilter'); $model->getRedFilterProduct($remove); echo $model->mod_redProductfilter($Itemid, $typeid) . '~'; } else { $session->destroy('redfilter'); } } $session->set('redfilter', $redfilter); if ($cntproduct == 1) { $mypid = JRequest::getInt('pid', 0); $app->Redirect('index.php?option=com_redshop&view=product&pid=' . $mypid . '&Itemid=' . $Itemid); } } $redHelper = new redhelper(); $order_data = $redHelper->getOrderByList(); $getorderby = JRequest::getString('order_by', DEFAULT_PRODUCT_ORDERING_METHOD); $lists['order_select'] = JHTML::_('select.genericlist', $order_data, 'order_by', 'class="inputbox" size="1" onchange="document.orderby_form.submit();" ', 'value', 'text', $getorderby); $templatedata = $model->getCategoryTemplet(); for ($i = 0; $i < 1; $i++) { $templatedata[$i]->template_desc = $redTemplate->readtemplateFile($templatedata[$i]->template_section, $templatedata[$i]->template_name); } $search = $this->get('Data'); $pagination = $this->get('Pagination'); $this->params = $params; $this->limit = $model->getState('limit'); $this->lists = $lists; $this->templatedata = $templatedata; $this->search = $search; $this->pagination = $pagination; $this->request_url = $uri->toString(); parent::display($tpl); }
public function display($tpl = null) { global $context; $app = JFactory::getApplication(); $prodhelperobj = new producthelper(); $prodhelperobj->generateBreadcrumb(); $Itemid = JRequest::getInt('Itemid'); $layout = JRequest::getCmd('layout'); $params = $app->getParams('com_redshop'); $document = JFactory::getDocument(); $model = $this->getModel(); $user = JFactory::getUser(); $userdata = $model->getuseraccountinfo($user->id); if (!count($userdata) && $layout != 'mywishlist') { $msg = JText::_('COM_REDSHOP_LOGIN_USER_IS_NOT_REDSHOP_USER'); $app->Redirect("index.php?option=com_redshop&view=account_billto&Itemid=" . $Itemid, $msg); } $layout = JRequest::getCmd('layout', 'default'); $mail = JRequest::getInt('mail'); // Preform security checks if ($user->id == 0 && $layout != 'mywishlist' || $user->id == 0 && $layout == 'mywishlist' && !isset($mail)) { $app->Redirect('index.php?option=com_redshop&view=login&Itemid=' . JRequest::getInt('Itemid')); return; } if ($layout == 'mytags') { JLoader::import('joomla.html.pagination'); $this->setLayout('mytags'); $remove = JRequest::getInt('remove', 0); if ($remove == 1) { $model->removeTag(); } $maxcategory = $params->get('maxcategory', 5); $limit = $app->getUserStateFromRequest($context . 'limit', 'limit', $maxcategory, 5); $limitstart = JRequest::getInt('limitstart', 0, '', 'int'); $total = $this->get('total'); $pagination = new redPagination($total, $limitstart, $limit); $this->pagination = $pagination; } if ($layout == 'mywishlist') { $wishlist_id = $app->input->getInt('wishlist_id', 0); // If wishlist Id is not set then redirect to it's main page if ($wishlist_id == 0) { $app->Redirect("index.php?option=com_redshop&view=wishlist&layout=viewwishlist&Itemid=" . $Itemid); } JLoader::import('joomla.html.pagination'); JHTML::Stylesheet('colorbox.css', 'components/com_redshop/assets/css/'); JHTML::Script('jquery.js', 'components/com_redshop/assets/js/', false); JHTML::Script('jquery.colorbox-min.js', 'components/com_redshop/assets/js/', false); JHTML::Script('redBOX.js', 'components/com_redshop/assets/js/', false); JHTML::Script('attribute.js', 'components/com_redshop/assets/js/', false); JHTML::Script('common.js', 'components/com_redshop/assets/js/', false); $this->setLayout('mywishlist'); $remove = JRequest::getInt('remove', 0); if ($remove == 1) { $model->removeWishlistProduct(); } $maxcategory = $params->get('maxcategory', 5); $limit = $app->getUserStateFromRequest($context . 'limit', 'limit', $maxcategory, 5); $limitstart = JRequest::getInt('limitstart', 0, '', 'int'); $total = $this->get('total'); $pagination = new redPagination($total, $limitstart, $limit); $this->pagination = $pagination; } if ($layout == 'compare') { $remove = JRequest::getInt('remove', 0); if ($remove == 1) { $model->removeCompare(); } JLoader::import('joomla.html.pagination'); $this->setLayout('compare'); } $this->user = $user; $this->userdata = $userdata; $this->params = $params; // RedCRM Template // Helper object $helper = new redhelper(); if ($layout == "default" && $helper->isredCRM()) { $tmplPath = JPATH_BASE . '/components/com_redcrm/views/account/tmpl'; $this->addTemplatePath($tmplPath); parent::display('storemanagement'); } // RedCRM Template END parent::display($tpl); }
public function replaceSubPropertyData($product_id = 0, $accessory_id = 0, $relatedprd_id = 0, $attribute_id = 0, $property_id = 0, $subatthtml = "", $layout = "", $selectSubproperty = array()) { $redTemplate = new Redtemplate(); $stockroomhelper = new rsstockroomhelper(); $url = JURI::base(); $attribute_table = ""; $subproperty = array(); $document = JFactory::getDocument(); JHTML::Script('thumbscroller.js', 'components/com_redshop/assets/js/', false); $chkvatArr = $this->_session->get('chkvat'); $chktag = $chkvatArr['chkvat']; $preprefix = ""; $isAjax = 0; if ($layout == "viewajaxdetail") { $preprefix = "ajax_"; $isAjax = 1; } if ($property_id != 0 && $attribute_id != 0) { $attributes = $this->getProductAttribute(0, 0, $attribute_id); $attributes = $attributes[0]; $subproperty_all = $this->getAttibuteSubProperty(0, $property_id); // filter Out of stock data if (!DISPLAY_OUT_OF_STOCK_ATTRIBUTE_DATA && USE_STOCKROOM) { $subproperty = $this->getAttibuteSubPropertyWithStock($subproperty_all); } else { $subproperty = $subproperty_all; } } $stock = 0; if ($accessory_id != 0) { $prefix = $preprefix . "acc_"; } elseif ($relatedprd_id != 0) { $prefix = $preprefix . "rel_"; } else { $prefix = $preprefix . "prd_"; } if ($relatedprd_id != 0) { $product_id = $relatedprd_id; } $product = $this->getProductById($product_id); $producttemplate = $redTemplate->getTemplate("product", $product->product_template); if (strstr($producttemplate[0]->template_desc, "{more_images_3}")) { $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT_3; $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE_3; } elseif (strstr($producttemplate[0]->template_desc, "{more_images_2}")) { $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT_2; $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE_2; } elseif (strstr($producttemplate[0]->template_desc, "{more_images_1}")) { $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT; $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE; } else { $mph_thumb = PRODUCT_ADDITIONAL_IMAGE_HEIGHT; $mpw_thumb = PRODUCT_ADDITIONAL_IMAGE; } if ($subatthtml != "") { if (count($subproperty) > 0) { $attribute_table = $subatthtml; $attribute_table .= '<span id="subprop_lbl" style="display:none;">' . JText::_('COM_REDSHOP_SUBATTRIBUTE_IS_REQUIRED') . '</span>'; $commonid = $prefix . $product_id . '_' . $accessory_id . '_' . $attribute_id . '_' . $property_id; $subpropertyid = 'subproperty_id_' . $commonid; $selectedsubproperty = 0; $imgAdded = 0; $subproperty_woscrollerdiv = ""; if (strstr($subatthtml, "{subproperty_image_without_scroller}")) { $attribute_table = str_replace("{subproperty_image_scroller}", "", $attribute_table); $subproperty_woscrollerdiv .= "<div class='subproperty_main_outer' id='subproperty_main_outer'>"; } $subproperty_scrollerdiv = "<table cellpadding='0' cellspacing='0' border='0'><tr>"; $subproperty_scrollerdiv .= "<td><a id=\"FirstButton\" href=\"javascript:isFlowers" . $commonid . ".scrollReverse();\" onmouseover=\"isFlowers" . $commonid . ".smoothScrollReverse();\" onmouseout=\"isFlowers" . $commonid . ".stopSmoothScroll();\"><img src=\"" . REDSHOP_FRONT_IMAGES_ABSPATH . "leftarrow.jpg\" style=\"margin-top: 12px;margin-right: 6px;\" style=\"margin-top: 3px;\" border=\"0\" /></a></td>"; $subproperty_scrollerdiv .= "<td><div id=\"isFlowersFrame" . $commonid . "\" name=\"isFlowersFrame" . $commonid . "\" style=\"margin: 0px; padding: 0px;position: relative; overflow: hidden;\"><div id=\"isFlowersImageRow" . $commonid . "\" name=\"isFlowersImageRow" . $commonid . "\" style=\"position: absolute; top: 0px;left: 0px;\">"; $subproperty_scrollerdiv .= "<script type=\"text/javascript\">var isFlowers" . $commonid . " = new ImageScroller(\"isFlowersFrame" . $commonid . "\", \"isFlowersImageRow" . $commonid . "\");"; $subprop_Arry = array(); for ($i = 0; $i < count($subproperty); $i++) { if (count($selectSubproperty) > 0) { if (in_array($subproperty[$i]->value, $selectSubproperty)) { $selectedsubproperty = $subproperty[$i]->value; } } else { if ($subproperty[$i]->setdefault_selected) { $selectedsubproperty = $subproperty[$i]->value; } } $stock = $stockroomhelper->getStockAmountwithReserve($subproperty[$i]->value, "subproperty"); if ($subproperty[$i]->subattribute_color_image) { if (is_file(REDSHOP_FRONT_IMAGES_RELPATH . "subcolor/" . $subproperty[$i]->subattribute_color_image)) { $borderstyle = $selectedsubproperty == $subproperty[$i]->value ? " 1px solid " : ""; $thumbUrl = RedShopHelperImages::getImagePath($subproperty[$i]->subattribute_color_image, '', 'thumb', 'subcolor', ATTRIBUTE_SCROLLER_THUMB_WIDTH, ATTRIBUTE_SCROLLER_THUMB_HEIGHT, USE_IMAGE_SIZE_SWAPPING); $subprop_Arry[] = $thumbUrl; $subproperty_woscrollerdiv .= "<div id='" . $subpropertyid . "_subpropimg_" . $subproperty[$i]->value . "' class='subproperty_image_inner'><a onclick='setSubpropImage(\"" . $product_id . "\",\"" . $subpropertyid . "\",\"" . $subproperty[$i]->value . "\");calculateTotalPrice(\"" . $product_id . "\",\"" . $relatedprd_id . "\");displayAdditionalImage(\"" . $product_id . "\",\"" . $accessory_id . "\",\"" . $relatedprd_id . "\",\"" . $property_id . "\",\"" . $subproperty[$i]->value . "\");'><img class='redAttributeImage' src='" . $thumbUrl . "'></a></div>"; $subproperty_scrollerdiv .= "isFlowers" . $commonid . ".addThumbnail(\"" . $thumbUrl . "\",\"javascript:isFlowers" . $commonid . ".scrollImageCenter('" . $i . "');setSubpropImage('" . $product_id . "','" . $subpropertyid . "','" . $subproperty[$i]->value . "');calculateTotalPrice('" . $product_id . "','" . $relatedprd_id . "');displayAdditionalImage('" . $product_id . "','" . $accessory_id . "','" . $relatedprd_id . "','" . $property_id . "','" . $subproperty[$i]->value . "');\",\"\",\"\",\"" . $subpropertyid . "_subpropimg_" . $subproperty[$i]->value . "\",\"" . $borderstyle . "\");"; $imgAdded++; } } $attributes_subproperty_vat_show = 0; $attributes_subproperty_withoutvat = 0; if ($subproperty[$i]->subattribute_color_price > 0) { $pricelist = $this->getPropertyPrice($subproperty[$i]->value, 1, 'subproperty'); if (count($pricelist) > 0) { $subproperty[$i]->subattribute_color_price = $pricelist->product_price; } $attributes_subproperty_withoutvat = $subproperty[$i]->subattribute_color_price; if (!empty($chktag)) { $attributes_subproperty_vat_show = $this->getProducttax($product_id, $subproperty[$i]->subattribute_color_price); } $attributes_subproperty_vat_show += $subproperty[$i]->subattribute_color_price; if (SHOW_PRICE && (!DEFAULT_QUOTATION_MODE || DEFAULT_QUOTATION_MODE && SHOW_QUOTATION_PRICE) && !$attributes->hide_attribute_price) { $subproperty[$i]->text = urldecode($subproperty[$i]->subattribute_color_name) . " (" . $subproperty[$i]->oprand . $this->getProductFormattedPrice($attributes_subproperty_vat_show) . ")"; } else { $subproperty[$i]->text = urldecode($subproperty[$i]->subattribute_color_name); } } else { $subproperty[$i]->text = urldecode($subproperty[$i]->subattribute_color_name); } $attribute_table .= '<input type="hidden" id="' . $subpropertyid . '_oprand' . $subproperty[$i]->value . '" value="' . $subproperty[$i]->oprand . '" />'; $attribute_table .= '<input type="hidden" id="' . $subpropertyid . '_proprice' . $subproperty[$i]->value . '" value="' . $attributes_subproperty_vat_show . '" />'; $attribute_table .= '<input type="hidden" id="' . $subpropertyid . '_proprice_withoutvat' . $subproperty[$i]->value . '" value="' . $attributes_subproperty_withoutvat . '" />'; $attribute_table .= '<input type="hidden" id="' . $subpropertyid . '_stock' . $subproperty[$i]->value . '" value="' . $stock . '" />'; } if (!$mph_thumb) { $mph_thumb = 50; } if (!$mpw_thumb) { $mpw_thumb = 50; } $atth = 50; $attw = 50; if (defined('ATTRIBUTE_SCROLLER_THUMB_HEIGHT') && ATTRIBUTE_SCROLLER_THUMB_HEIGHT) { $atth = ATTRIBUTE_SCROLLER_THUMB_HEIGHT; } if (defined('ATTRIBUTE_SCROLLER_THUMB_WIDTH') && ATTRIBUTE_SCROLLER_THUMB_WIDTH) { $attw = ATTRIBUTE_SCROLLER_THUMB_WIDTH; } $subproperty_scrollerdiv .= "\r\n\t\t\t\tisFlowers" . $commonid . ".setThumbnailHeight(" . $atth . ");\r\n\t\t\t\tisFlowers" . $commonid . ".setThumbnailWidth(" . $attw . ");\r\n\t\t\t\tisFlowers" . $commonid . ".setThumbnailPadding(5);\r\n\t\t\t\tisFlowers" . $commonid . ".setScrollType(0);\r\n\t\t\t\tisFlowers" . $commonid . ".enableThumbBorder(false);\r\n\t\t\t\tisFlowers" . $commonid . ".setClickOpenType(1);\r\n\t\t\t\tisFlowers" . $commonid . ".setThumbsShown(" . NOOF_SUBATTRIB_THUMB_FOR_SCROLLER . ");\r\n\t\t\t\tisFlowers" . $commonid . ".setNumOfImageToScroll(1);\r\n\t\t\t\tisFlowers" . $commonid . ".renderScroller();\r\n\t \t\t </script>"; $subproperty_scrollerdiv .= "<div id=\"divsubimgscroll" . $commonid . "\" style=\"display:none\">" . implode("#_#", $subprop_Arry) . "</div>"; $subproperty_scrollerdiv .= "</div></div></td>"; $subproperty_scrollerdiv .= "<td><a id=\"FirstButton\" href=\"javascript:isFlowers" . $commonid . ".scrollForward();\" onmouseover=\"isFlowers" . $commonid . ".smoothScrollForward();\" onmouseout=\"isFlowers" . $commonid . ".stopSmoothScroll();\"><img src=\"" . REDSHOP_FRONT_IMAGES_ABSPATH . "rightarrow.jpg\" style=\"margin-top: 12px;margin-right: 6px;\" style=\"margin-top: 3px;\" border=\"0\" /></a></td>"; $subproperty_scrollerdiv .= "</tr></table>"; if (strstr($subatthtml, "{subproperty_image_without_scroller}")) { $subproperty_woscrollerdiv .= "</div>"; } if (USE_ENCODING) { $displayPropertyName = mb_convert_encoding(urldecode($subproperty[0]->property_name), "ISO-8859-1", "UTF-8"); } else { $displayPropertyName = urldecode($subproperty[0]->property_name); } if ($subproperty[0]->subattribute_color_title != "") { if (USE_ENCODING) { $displayPropertyName = mb_convert_encoding(urldecode($subproperty[0]->subattribute_color_title), "ISO-8859-1", "UTF-8"); } else { $displayPropertyName = urldecode($subproperty[0]->subattribute_color_title); } } $tmp_array = array(); $tmp_array[0] = new stdClass(); $tmp_array[0]->value = 0; $tmp_array[0]->text = JText::_('COM_REDSHOP_SELECT') . " " . $displayPropertyName; $new_subproperty = array_merge($tmp_array, $subproperty); $chklist = ''; $display_type = ''; if (isset($subproperty[0]->setdisplay_type) === true) { $display_type = $subproperty[0]->setdisplay_type; } if ($subproperty[0]->setmulti_selected) { $display_type = 'checkbox'; } if ($display_type == 'checkbox' || $display_type == 'radio') { for ($chk = 0; $chk < count($subproperty); $chk++) { $checked = ""; if (count($selectSubproperty) > 0) { if (in_array($subproperty[$chk]->value, $selectSubproperty)) { $checked = "checked"; } } else { if ($subproperty[$chk]->setdefault_selected) { $checked = "checked"; } } $scrollerFunction = ""; if ($imgAdded > 0 && strstr($attribute_table, "{subproperty_image_scroller}")) { $scrollerFunction = "isFlowers" . $commonid . ".scrollImageCenter(\"" . $chk . "\");"; } $chklist .= "<div class='attribute_multiselect_single'><input type='" . $display_type . "' " . $checked . " value='" . $subproperty[$chk]->value . "' name='" . $subpropertyid . "[]' id='" . $subpropertyid . "' class='inputbox' onClick='javascript:" . $scrollerFunction . "calculateTotalPrice(\"" . $product_id . "\",\"" . $relatedprd_id . "\");displayAdditionalImage(\"" . $product_id . "\",\"" . $accessory_id . "\",\"" . $relatedprd_id . "\",\"" . $property_id . "\",\"" . $subproperty[$chk]->value . "\");' /> " . $subproperty[$chk]->text . "</div>"; } } else { $scrollerFunction = ""; if ($imgAdded > 0 && strstr($attribute_table, "{subproperty_image_scroller}")) { $scrollerFunction = "isFlowers" . $commonid . ".scrollImageCenter(this.selectedIndex-1);"; } $chklist = JHTML::_('select.genericlist', $new_subproperty, $subpropertyid . '[]', ' id="' . $subpropertyid . '" class="inputbox" size="1" required="' . $subproperty[0]->setrequire_selected . '" subpropName="' . $displayPropertyName . '" onchange="javascript:' . $scrollerFunction . 'calculateTotalPrice(\'' . $product_id . '\',\'' . $relatedprd_id . '\');displayAdditionalImage(\'' . $product_id . '\',\'' . $accessory_id . '\',\'' . $relatedprd_id . '\',\'' . $property_id . '\',this.value);" ', 'value', 'text', $selectedsubproperty); } $lists['subproperty_id'] = $chklist; if ($imgAdded == 0 || $isAjax == 1) { $subproperty_scrollerdiv = ""; } if ($subproperty[0]->setrequire_selected == 1) { $displayPropertyName = ASTERISK_POSITION > 0 ? $displayPropertyName . "<span id='asterisk_right'> * </span>" : "<span id='asterisk_left'>* </span>" . $displayPropertyName; } $attribute_table = str_replace("{property_title}", $displayPropertyName, $attribute_table); $attribute_table = str_replace("{subproperty_dropdown}", $lists['subproperty_id'], $attribute_table); if (strstr($subatthtml, "{subproperty_image_without_scroller}")) { $attribute_table = str_replace("{subproperty_image_scroller}", "", $attribute_table); $attribute_table = str_replace("{subproperty_image_without_scroller}", $subproperty_woscrollerdiv, $attribute_table); } elseif (strstr($subatthtml, "{subproperty_image_scroller}")) { $attribute_table = str_replace("{subproperty_image_scroller}", $subproperty_scrollerdiv, $attribute_table); $attribute_table = str_replace("{subproperty_image_without_scroller}", "", $attribute_table); } } } return $attribute_table; }
if ($params->get('categorysorttype') == "catnamedesc") { $sortparam = "category_name DESC"; } if ($params->get('categorysorttype') == "newest") { $sortparam = "category_id DESC"; } if ($params->get('categorysorttype') == "catorder") { $sortparam = "ordering ASC"; } // The tree generator $vmTigraTree = new redTigraTreeMenu(); // A unique name for our tree (to support multiple instances of the menu) $varname = uniqid("TigraTree_"); $document = JFactory::getDocument(); JHTML::Script('tree_tpl.js.php', $js_src . '/tigratree/', false); JHTML::Script('tree.js', $js_src . '/tigratree/', false); // Create the menu output $menu_htmlcode = "<div class=\"{$class_mainlevel}\" style=\"text-align:left;\">\r\n<script type=\"text/javascript\"><!--\r\nvar TREE_ITEMS_{$varname} = [\n"; // Create the root node $menu_htmlcode .= "['" . $root_label . "', '" . JRoute::_($urlpath . 'index.php') . "',\n"; // Get the actual category items $vmTigraTree->traverse_tree_down($menu_htmlcode, $category_id = '0', $level = '0', $shopper_group_id); $menu_htmlcode .= "]];\r\n\r\nvar o_tree_{$varname} = new tree(TREE_ITEMS_{$varname}, TREE_TPL);\r\nitem_expand(o_tree_{$varname}, {$Treeid});\r\no_tree_{$varname}.select({$Treeid});\r\n--></script>\n"; // Add a linked list in case JavaScript is disabled $menu_htmlcode .= "<noscript>\n"; $menu_htmlcode .= $redproduct_menu->get_category_tree($params, $category_id, $class_mainlevel, $list_css_class = "mm123", $highlighted_style = "font-style:italic;", $shopper_group_id); $menu_htmlcode .= "\n</noscript>\n"; $menu_htmlcode .= "</div>"; echo $menu_htmlcode; class redTigraTreeMenu {