public static function getInstance($type = 'TabSet', $options = array(), $name = 'myTabs') { JHtml::_('jquery.framework'); JHtml::_('jquery.ui'); jimport('joomla.html.html.bootstrap'); if (!empty($options)) { if (!empty($options['active'])) { $arr = array('active' => $options['active']); } } JHtml::_('jquery.framework'); JHtml::_('jquery.ui'); //$this->options = $arr; $pane = new OPCPane(); $pane->type = $type; $pane->name = $name; $pane->options = $options; self::$instance = $pane; return $pane; }
?> " /> <?php echo JHTML::_('form.token'); $order_id = $this->orderID; echo '<input type="hidden" id="scrolly" name="scrolly" value="' . JRequest::getVar('scrolly', 0) . '" />'; echo '<input type="hidden" id="op_curtab" name="op_curtab" value="' . JRequest::getVar('op_curtab', '') . '" />'; ?> </form> <div > <div id="opc_order_details"> <?php echo $this->loadTemplate('header'); $pane = OPCPane::getInstance('tabs', array('active' => 'panel01id', 'startOffset' => 0)); echo $pane->startPane('order_general'); echo $pane->startPanel(JText::_('COM_VIRTUEMART_DETAILS'), 'panel01id'); echo $this->loadTemplate('details'); ?> <?php echo $pane->endPanel(); echo $pane->startPanel(JText::_('COM_ONEPAGE_EXPORT_ORDEREXPORTTAB'), 'order_e2'); echo $this->loadTemplate('export'); echo $pane->endPanel(); echo $pane->endPane(); ?> <form action="index.php" method="post" name="orderForm" id="orderForm"><!-- Update order head form -->
/** * Displays the view, collects needed data for the different layouts * * Okey I try now a completly new idea. * We make a function for every tab and the display is getting the right tabs by an own function * putting that in an array and after that we call the preparedataforlayoutBlub * * @author Oscar van Eijk * @author Max Milbers * * Original code from: \components\com_virtuemart\views\user\view.html.php * */ function display($tpl = null) { $useSSL = VmConfig::get('useSSL', 0); $useXHTML = true; $this->assignRef('useSSL', $useSSL); $this->assignRef('useXHTML', $useXHTML); $mainframe = JFactory::getApplication(); $pathway = $mainframe->getPathway(); $layoutName = $this->getLayout(); if (!defined('OPC_IN_REGISTRATION_MODE')) { define('OPC_IN_REGISTRATION_MODE', 1); } require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'language.php'; OPCLang::loadLang(); $this->loadOPC(); // vmdebug('layout by view '.$layoutName); if (empty($layoutName) or $layoutName == 'default') { $layoutName = JRequest::getWord('layout', 'edit'); if ($layoutName == 'default') { $layoutName = 'edit'; } $this->setLayout($layoutName); } if (empty($this->fTask)) { $ftask = 'saveUser'; $this->assignRef('fTask', $ftask); } if (!class_exists('ShopFunctions')) { require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php'; } // vmdebug('my layoutname',$layoutName); if ($layoutName == 'login') { parent::display($tpl); return; } if (!class_exists('VirtuemartModelUser')) { require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'user.php'; } $this->_model = new VirtuemartModelUser(); // $this->_model->setCurrent(); //without this, the administrator can edit users in the FE, permission is handled in the usermodel, but maybe unsecure? $editor = JFactory::getEditor(); //the cuid is the id of the current user $this->_currentUser = JFactory::getUser(); $this->_cuid = $this->_lists['current_id'] = $this->_currentUser->get('id'); $this->assignRef('userId', $this->_cuid); $this->_userDetails = $this->_model->getUser(); $this->assignRef('userDetails', $this->_userDetails); $address_type = JRequest::getWord('addrtype', 'BT'); $this->assignRef('address_type', $address_type); //New Address is filled here with the data of the cart (we are in the cart) if (!class_exists('VirtueMartCart')) { require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php'; } $cart = VirtueMartCart::getCart(); $new = false; if (JRequest::getInt('new', '0') == 1) { $new = true; } if ($new) { $virtuemart_userinfo_id = 0; } else { $virtuemart_userinfo_id = JRequest::getString('virtuemart_userinfo_id', '0', ''); if (empty($virtuemart_userinfo_id)) { require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'mini.php'; $umodel = OPCmini::getModel('user'); //new VirtuemartModelUser(); $uid = JFactory::getUser()->id; $userDetails = $umodel->getUser(); $virtuemart_userinfo_id = $umodel->getBTuserinfo_id(); } } $this->assignRef('virtuemart_userinfo_id', $virtuemart_userinfo_id); $userFields = null; if ((strpos($this->fTask, 'cart') || strpos($this->fTask, 'checkout')) && empty($virtuemart_userinfo_id)) { $fieldtype = $address_type . 'address'; if (method_exists($cart, 'prepareAddressDataInCart')) { $cart->prepareAddressDataInCart($address_type, $new); } if (method_exists($cart, 'prepareAddressFieldsInCart')) { $cart->prepareAddressFieldsInCart(); } $userFields = $cart->{$fieldtype}; $task = JRequest::getWord('task', ''); } else { $userFields = $this->_model->getUserInfoInUserFields($layoutName, $address_type, $virtuemart_userinfo_id); if (!$new && empty($userFields[$virtuemart_userinfo_id])) { $virtuemart_userinfo_id = $this->_model->getBTuserinfo_id(); // vmdebug('Try to get $virtuemart_userinfo_id by type BT', $virtuemart_userinfo_id); } $userFields = $userFields[$virtuemart_userinfo_id]; $task = 'editaddressST'; } require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'loader.php'; /* if (!class_exists('VirtueMartCart')) require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php'); $this->cart = VirtueMartCart::getCart(); */ $OPCloader = new OPCloader(); OPCloader::setRegType(); $action_url = JURI::root(true) . '/index.php?option=com_onepage&view=opc&controller=opc&task=opcregister&nosef=1'; require_once JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'javascript.php'; OPCJavascript::getJavascript($this, $OPCloader, false, $action_url, 'com_onepage', 'opcregister'); $OPCloader->customizeFieldsPerOPCConfig($userFields); OPCloader::loadJavascriptFiles($this); $op_formvars = OPCloader::getFormVars($this); /* foreach ($userFields['fields'] as $key=>$val) { if (isset($val['formcode'])) { $val['formcode'] .= $html; break; } } */ $this->assignRef('userFields', $userFields); if ($layoutName == 'edit') { if ($this->_model->getId() == 0 && $this->_cuid == 0) { $button_lbl = JText::_('COM_VIRTUEMART_REGISTER'); } else { $button_lbl = JText::_('COM_VIRTUEMART_SAVE'); } $this->assignRef('button_lbl', $button_lbl); $this->lUser(); if (JVM_VERSION <= 2) { $this->shopper($userFields); } else { $this->shopper3($userFields); } $this->payment(); $this->lOrderlist(); $this->lVendor(); } $this->_lists['shipTo'] = $this->generateStAddressList($this, $this->_model, $task, $cart); if ($this->_openTab < 0) { $_paneOffset = array(); } else { if (defined('__VM_USER_USE_SLIDERS')) { $_paneOffset = array('startOffset' => $this->_openTab, 'startTransition' => 1, 'allowAllClose' => true); } else { $_paneOffset = array('startOffset' => $this->_openTab); } } // Implement the Joomla panels. If we need a ShipTo tab, make it the active one. // In tmpl/edit.php, this is the 4th tab (0-based, so set to 3 above) jimport('joomla.html.pane'); $pane = OPCPane::getInstance(defined('__VM_USER_USE_SLIDERS') ? 'Sliders' : 'Tabs', $_paneOffset); $this->assignRef('lists', $this->_lists); $this->assignRef('editor', $editor); $this->assignRef('pane', $pane); if ($layoutName == 'mailregisteruser') { $vendorModel = VmModel::getModel('vendor'); // $vendorModel->setId($this->_userDetails->virtuemart_vendor_id); $vendor = $vendorModel->getVendor(); $this->assignRef('vendor', $vendor); } if ($layoutName == 'editaddress') { $layoutName = 'edit_address'; $this->setLayout($layoutName); } if (!$this->userDetails->JUser->get('id')) { $corefield_title = JText::_('COM_VIRTUEMART_USER_CART_INFO_CREATE_ACCOUNT'); } else { $corefield_title = JText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'); } if (strpos($this->fTask, 'cart') || strpos($this->fTask, 'checkout')) { $pathway->addItem(JText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE)); } else { //$pathway->addItem(JText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'), JRoute::_('index.php?option=com_virtuemart&view=user&&layout=edit')); } $pathway_text = JText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'); if (!$this->userDetails->JUser->get('id')) { if (strpos($this->fTask, 'cart') || strpos($this->fTask, 'checkout')) { if ($address_type == 'BT') { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); } else { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); } } else { if ($address_type == 'BT') { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); $title = JText::_('COM_VIRTUEMART_REGISTER'); } else { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); } } } else { if ($address_type == 'BT') { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_BILLTO_LBL'); } else { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); } } $add_product_link = ""; require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'mini.php'; if (OPCmini::isSuperVendor()) { $add_product_link = JRoute::_('/index.php?option=com_virtuemart&tmpl=component&view=product&view=product&task=edit&virtuemart_product_id=0'); $add_product_link = $this->linkIcon($add_product_link, 'COM_VIRTUEMART_PRODUCT_ADD_PRODUCT', 'new', false, false, true, true); } $this->assignRef('add_product_link', $add_product_link); $document = JFactory::getDocument(); $document->setTitle($pathway_text); $pathway->additem($pathway_text); $document->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET'); $this->assignRef('page_title', $pathway_text); $this->assignRef('corefield_title', $corefield_title); $this->assignRef('vmfield_title', $vmfield_title); // if ($onlyindex) return JURI::root(true).'/index.php'; shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName); require_once JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'removemsgs.php'; OPCremoveMsgs::removeMsgs($cart); $jsvalidator = $OPCloader->getJSValidatorScript($this); $op_userfields = $OPCloader->getBTfields($this); $registration_html = $OPCloader->getRegistrationHhtml($this); require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'commonhtml.php'; $reg_html = OPCCommonHtml::getFormVarsRegistration($OPCloader); $op_formvars = $reg_html . $jsvalidator; $op_userfields .= $op_formvars; $onsubmit = $op_onclick = $OPCloader->getJSValidator($this); $op_onclick = ' onclick="' . $op_onclick . '" '; ob_start(); //parent::display($tpl); include_once JPATH_OPC . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'registration_templates.php'; $html = ob_get_clean(); //$html = str_replace('"com_virtuemart"', '"com_onepage"', $html); //$html = str_replace('=com_virtuemart', '=com_onepage', $html); $this->getActions($html); $html = $OPCloader->addListeners($html); echo $html; $extras = $OPCloader->getExtras($this); echo $extras; }
}); </script> <?php $default_config = array('vm_lang' => 0, 'vm_menu_en_gb' => 0, 'selected_menu' => 0, 'menu_' => 0, 'tojlanguage' => '*'); $session = JFactory::getSession(); $config = $session->get('opc_utils', $default_config); include JPATH_SITE . DS . "components" . DS . "com_onepage" . DS . "config" . DS . "onepage.cfg.php"; JToolBarHelper::Title(JText::_('COM_ONEPAGE_XML_EXPORT'), 'generic.png'); // JToolBarHelper::install(); JToolBarHelper::apply(); if (!version_compare(JVERSION, '2.5.0', 'ge')) { $j15 = true; } jimport('joomla.html.pane'); jimport('joomla.utilities.utility'); $pane = OPCPane::getInstance('tabs', array('startOffset' => 0, 'active' => 'paneladw'), 'toptabs'); if (!empty($j15)) { echo '<div>' . JText::_('COM_ONEPAGE_ONLY_J25') . '</div>'; } if (!empty($j15)) { echo '<div style="display: none;">'; } ?> <div id="vmMainPageOPC"> <div id="opc_response"> </div> <div id="opc_status"> </div> <form action="index.php" id="adminForm" method="post"> <?php echo $pane->startPane('pane'); echo $pane->startPanel(JText::_('COM_ONEPAGE_GENERAL_PANEL'), 'paneladw'); ?>
<tr> <td colspan="2" > </td> </tr> </table> </fieldset> <fieldset class="adminform"><legend> <?php echo JText::_('COM_ONEPAGE_TRACKING_ENABLE_TRACKING_HERE'); ?> </legend> <?php $pane2 = OPCPane::getInstance('tabs', array('startOffset' => 0, 'active' => 'pane2P'), 'tab2'); echo $pane2->startPane('pane2a'); jimport('joomla.filesystem.file'); foreach ($this->statuses as $k => $s) { $label = JText::_($s['order_status_name']); $adwords_code[$s['order_status_code']] = JFile::read(JPATH_ROOT . DS . "components" . DS . "com_onepage" . DS . "trackers" . DS . "body.html"); if (!empty($adwords_code[$s['order_status_code']])) { $label .= '...'; } echo $pane2->startPanel($label, 'pane2' . $s['order_status_code']); echo '<label for=="">' . JText::_('COM_ONEPAGE_TRACKING_TRIGGER_WHEN') . '</label>'; echo '<select name="opc_tracking_only_when_' . $s['order_status_code'] . '" id="opc_tracking_only_when' . $s['order_status_code'] . '">'; echo '<option value=""'; if (empty($opc_tracking_only_when[$s['order_status_code']])) { echo ' selected="selected" '; }