/** * Display the view */ public function display($tpl = null) { $this->params = JComponentHelper::getParams('com_quick2cart'); $comquick2cartHelper = new comquick2cartHelper(); $zoneHelper = new zoneHelper(); // Check whether view is accessible to user if (!$zoneHelper->isUserAccessible()) { return; } $qtcshiphelper = new qtcshiphelper(); $app = JFactory::getApplication(); $jinput = $app->input; $user = JFactory::getUser(); $layout = $jinput->get('layout', 'default'); $model = $this->getModel('shipprofileform'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } if ($layout == 'default') { $this->state = $this->get('State'); $this->item = $this->get('Data'); $this->form = $this->get('Form'); // Check whether user is authorized for this zone ? if (!empty($this->item->store_id)) { $status = $comquick2cartHelper->store_authorize('shipprofileform_default', $this->item->store_id); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } // Get store name while edit view if (!empty($this->item->id) && !empty($this->item->store_id)) { $comquick2cartHelper = new comquick2cartHelper(); $this->storeDetails = $comquick2cartHelper->getSoreInfo($this->item->store_id); $this->shipPluglist = $model->getShipPluginListSelect(); } // Get shipping profile_id $shipprofile_id = $app->input->get('id', 0); // Getting saved tax rules. if (!empty($shipprofile_id)) { $this->shipMethods = $model->getShipMethods($shipprofile_id); } } else { $this->qtcShipProfileId = $jinput->get('id'); $this->shipmethId = $jinput->get('shipmethId', 0); $shipProfileDetail = $this->shipProfileDetail = $qtcshiphelper->getShipProfileDetail($this->qtcShipProfileId); // Getting saved tax rules. if (!empty($this->shipmethId) && !empty($shipProfileDetail['store_id'])) { // GET PLUGIN DETAIL $this->plgDetail = $qtcshiphelper->getPluginDetailByShipMethId($this->shipmethId); $this->shipPluglist = $model->getShipPluginListSelect($this->plgDetail['extension_id']); // Get plugin shipping methods $qtcshiphelper = new qtcshiphelper(); $this->response = $qtcshiphelper->qtcLoadShipPlgMethods($this->plgDetail['extension_id'], $shipProfileDetail['store_id'], $this->plgDetail['methodId']); } } $this->_prepareDocument(); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $comquick2cartHelper = new comquick2cartHelper(); $zoneHelper = new zoneHelper(); // Check whether view is accessible to user if (!$zoneHelper->isUserAccessible()) { return; } $app = JFactory::getApplication(); $user = JFactory::getUser(); $this->state = $this->get('State'); $this->item = $this->get('Data'); $this->params = $app->getParams('com_quick2cart'); $this->form = $this->get('Form'); if (!empty($this->item->zone_id)) { $zoneDetail = $zoneHelper->getZoneDetail($this->item->zone_id); // Check whether user is authorized for this zone ? if (!empty($zoneDetail['store_id'])) { $status = $comquick2cartHelper->store_authorize('taxrateform_default', $zoneDetail['store_id']); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } } // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } $this->_prepareDocument(); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $zoneHelper = new zoneHelper(); $comquick2cartHelper = new comquick2cartHelper(); // Check whether view is accessible to user if (!$zoneHelper->isUserAccessible('zoneform', "default", 'form')) { return; } $app = JFactory::getApplication(); $previousId = JFactory::getApplication()->input->get('id'); $user = JFactory::getUser(); $jinput = $app->input; $layout = $jinput->get('layout', ''); $this->state = $this->get('State'); $this->item = $this->get('Data'); $this->params = $app->getParams('com_quick2cart'); $this->form = $this->get('Form'); $model = $this->getModel('zoneform'); if ($this->item) { // Getting countries $country = $model->getCountry(); $this->country = $country; // Getting zone rules $this->geozonerules = $model->getZoneRules(); // Check whether user is authorized for this zone ? if (!empty($this->item->store_id)) { $status = $comquick2cartHelper->store_authorize('zoneform_default'); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } } // For edit zone rules if ($layout === 'setrule') { $this->rule_id = $jinput->get('zonerule_id'); // Getting zone rule detail $this->ruleDetail = $model->getZoneRuleDetail($this->rule_id); if (!empty($this->ruleDetail->country_id)) { // Getting Regions from country $this->getRegionList = $model->getRegionList($this->ruleDetail->country_id); } // Getting countries $country = $model->getCountry(); $this->country = $country; $app->setUserState('com_quick2cart.edit.zone.id', $previousId); } // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } $this->_prepareDocument(); parent::display($tpl); }
<div class="techjoomla-bootstrap" > <div class="well well-small" > <div class="alert alert-error"> <span ><?php echo JText::_('QTC_LOGIN'); ?> </span> </div> </div> </div> <!-- eoc techjoomla-bootstrap --> <?php return false; } $comquick2cartHelper = new comquick2cartHelper(); $authority = $comquick2cartHelper->store_authorize($ck); if (empty($authority)) { ?> <div class="techjoomla-bootstrap" > <div class="well well-small" > <div class="alert alert-error"> <span ><?php echo JText::_('QTC_VIOLATING_UR_ROLE'); ?> </span> </div> </div> </div> <!-- eoc techjoomla-bootstrap --> <?php return false;
JHtml::_('behavior.modal'); require_once JPATH_SITE . '/plugins/tjshipping/qtc_default_zoneshipping/qtc_default_zoneshipping/qtczoneShipHelper.php'; $qtczoneShipHelper = new qtczoneShipHelper(); $comquick2cartHelper = new comquick2cartHelper(); $productHelper = new productHelper(); $zoneHelper = new zoneHelper(); $qtcshiphelper = new qtcshiphelper(); $taxHelper = new taxHelper(); $mainframe = JFactory::getApplication(); $jinput = $mainframe->input; $extension_id = $jinput->get('extension_id'); $methodId = $jinput->get('methodId', 0); $shipMethDetail = $qtcshiphelper->getShipMethDetail($methodId); $itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=vendor&layout=cp'); if (!empty($methodId)) { $status = $comquick2cartHelper->store_authorize('', $shipMethDetail['store_id']); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } ?> <script type="text/javascript"> function qtcAddShipMethRates() { var SelectedZoneVal = document.id('zone_id').value; if(SelectedZoneVal == '') {
/** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { $this->params = JComponentHelper::getParams('com_quick2cart'); $comquick2cartHelper = new comquick2cartHelper(); $storeHelper = new storeHelper(); $model = $this->getModel('vendor'); $mainframe = JFactory::getApplication(); $input = $mainframe->input; $option = $input->get('option'); $task = $input->get('task'); $layout = $input->get('layout', 'cp'); $this->adminCall = $adminCall = $input->get('adminCall', 0, 'INTEGER'); $store_id = $input->get('store_id', '0'); $this->storeinfo = ''; if ($layout != "contactus") { $specialAccess = 0; if ($layout == "createstore") { $user = JFactory::getUser(); if (!$user->id) { echo "<div class=\"techjoomla-bootstrap\" >\n\t\t\t\t\t<div class=\"well\" >\n\t\t\t\t\t\t<div class=\"alert alert-error\">\n\t\t\t\t\t\t\t<span >" . JText::_('QTC_LOGIN') . " </span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>"; return false; } if (!empty($adminCall)) { $specialAccess = $comquick2cartHelper->isSpecialAccess(); } } // Check for multivender COMPONENT PARAM $isMultivenderOFFmsg = $comquick2cartHelper->isMultivenderOFF(); if (!empty($isMultivenderOFFmsg)) { if (!empty($adminCall)) { // CALLED FROM ADMIN if ($specialAccess == 0) { echo $this->specialAccessMsg(); return false; } } else { print $isMultivenderOFFmsg; return false; } } } /*if($layout=="default") { $this->site=1; $filter_order_Dir = $mainframe->getUserStateFromRequest( "$option.filter_order_Dir", 'filter_order_Dir', 'desc', 'word' ); $filter_type = $mainframe->getUserStateFromRequest( "$option.filter_type", 'filter_type', 0, 'string' ); $filter_state = $mainframe->getUserStateFromRequest( $option.'search_list', 'search_list', '', 'string' ); $search = $mainframe->getUserStateFromRequest( $option.'search', 'search','', 'string' ); $search = JString::strtolower( $search ); $limit = ''; $limitstart = ''; $cid[0]=''; if($search==null) $search=''; $model = $this->getModel( 'vendor' ); $task = $input->get('task'); $total = $model->getTotal(); $this->pagination = $pagination = $model->getPagination(); $this->storeinfo = $storeinfo = $comquick2cartHelper->getStoreDetail(); $lists['search_select'] = $search; $lists['search'] = $search; $lists['search_list'] = $filter_state; $lists['order'] = $filter_type; $lists['order_Dir'] = $filter_order_Dir; $lists['limit'] = $limit; $lists['limitstart'] = $limitstart; $this->lists = $lists; }// end of $layout=="mystores" if else */ if ($layout == "createstore") { $this->orders_site = 1; $store_id = $input->get('store_id', '0'); // DEFAULT ALLOW TO CREAT STORE $this->allowToCreateStore = 1; // Means edit task if (!empty($store_id)) { $this->store_authorize = $comquick2cartHelper->store_authorize("vendor_createstore", $store_id); $this->editview = 1; $this->storeinfo = $storeinfo = $comquick2cartHelper->editstore($store_id); // Get weight and length select box $this->legthList = $storeHelper->getLengthClassSelectList($storeid = 0, $this->storeinfo[0]->length_id); $this->weigthList = $storeHelper->getWeightClassSelectList($storeid = 0, $this->storeinfo[0]->weight_id); } else { // NEW STORE TASK:: CK FOR WHETHER WE HV TO ALLOW OR NOT $storeHelper = new storeHelper(); $this->allowToCreateStore = $storeHelper->isAllowedToCreateNewStore(); // Get weight and length select box $this->legthList = $storeHelper->getLengthClassSelectList($storeid = 0, 0); $this->weigthList = $storeHelper->getWeightClassSelectList($storeid = 0, 0); } // START Q2C Sample development $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('system'); $result = $dispatcher->trigger('qtcOnBeforeCreateStore', array($store_id)); // Call the plugin and get the result $beforecart = ''; $OnBeforeCreateStore = ''; if (!empty($result)) { // If more than one plugin returns // $OnBeforeCreateStore = $result[0]; // $OnBeforeCreateStore = join('', $result); $OnBeforeCreateStore = trim(implode("\n", $result)); } $this->OnBeforeCreateStore = $OnBeforeCreateStore; } elseif ($layout == "managestore") { $this->storeDetailInfo = $comquick2cartHelper->getSoreInfoInDetail($store_id); } elseif ($layout == "cp") { $this->catpage_Itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=category'); $this->orders_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=orders'); $this->store_customers_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=orders&layout=mycustomer'); $user = JFactory::getUser(); if ($user->id) { // Chck whetere there is any product or not // Retrun store_id,role etc with order by role,store_id $this->store_role_list = $store_role_list = $comquick2cartHelper->getStoreIds(); // Store_id is changed from manage storeorder view $change_storeto = $input->get('change_store', ''); // When chage store,get latest storeid otherwise( on first load) set first storeid as default $firstStore = !empty($store_role_list[0]['store_id']) ? $store_role_list[0]['store_id'] : ''; $this->store_id = $store_id = !empty($change_storeto) ? $change_storeto : $firstStore; } if (!empty($this->store_id)) { $this->prodcountprodCount = $model->storeProductCount($this->store_id); // $allincome = $this->get( 'AllOrderIncome'); $this->getPeriodicIncomeGrapthData = $model->getPeriodicIncomeGrapthData($store_id); // Get revenue ,total order, and qty $this->getPeriodicIncome = $model->getPeriodicIncome($store_id); // GETTING TOATL SALES $this->totalSales = $model->getTotalSales($store_id); // GETTING TOtal orders $this->totalOrdersCount = $model->getTotalOrdersCount($store_id); // GETTING LAST 5 ORDERS $this->last5orders = $model->getLast5orders($store_id); // Getting store detail $this->storeDetailInfo = $comquick2cartHelper->getSoreInfoInDetail($store_id); // Get customer count for store. $this->storeCustomersCount = $model->getStoreCustomersCount($store_id); // Get top seller products. $product_path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helpers' . DS . 'product.php'; if (!class_exists('productHelper')) { JLoader::register('productHelper', $product_path); JLoader::load('productHelper'); } $productHelper = new productHelper(); $this->topSellerProducts = $productHelper->getTopSellerProducts($store_id, '', 5); } } elseif ($layout == "store") { global $mainframe; $mainframe = JFactory::getApplication(); $jinput = $mainframe->input; // Store_id is changed from STORE view // $change_storeto= $mainframe->getUserStateFromRequest( 'current_store', 'current_store','', 'INTEGER' ); $this->change_prod_cat = $jinput->get('store_cat', '', 'INTEGER'); // GET STORE ID $this->store_id = $store_id = $input->get('store_id'); // RESET ENTITIES // $mainframe->setUserState('store_cat', ''); if (!empty($this->store_id)) { $this->storeDetailInfo = $comquick2cartHelper->getSoreInfoInDetail($store_id); // ALL FETCH ALL CATEGORIES $storeHelper = new storeHelper(); $this->cats = $storeHelper->getStoreCats($this->store_id, $this->change_prod_cat, 1, 'store_cat'); // FETCH ALL STORE PRODUCT JLoader::import('store', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'models'); $model = new Quick2cartModelstore(); $this->allStoreProd = $model->getAllStoreProducts('com_quick2cart', $this->store_id); $pagination = $model->getPagination('com_quick2cart', $this->store_id); $this->pagination = $pagination; } } elseif ($layout == "contactus") { $this->store_id = $input->get('store_id', '0', 'INTEGER'); $this->item_id = $input->get('item_id', '0', 'INTEGER'); } elseif ($layout == "storeinfo") { $this->store_id = $input->get('store_id'); if (!empty($this->store_id)) { $this->storeDetailInfo = $comquick2cartHelper->getSoreInfoInDetail($this->store_id); } } $this->_setToolBar(); parent::display($tpl); }
<script src="<?php echo JUri::root() . 'administrator/components/com_quick2cart/assets/js/geo/jquery.ui.autocomplete.js'; ?> "></script> <script src="<?php echo JUri::root() . 'components/com_quick2cart/assets/js/auto.js'; ?> "></script> <link rel="stylesheet" href="<?php echo JUri::root() . 'administrator/components/com_quick2cart/assets/css/geo/geo.css'; ?> "> <!-- geo target end here --> <?php $comquick2cartHelper = new comquick2cartHelper(); $allowed_role = $comquick2cartHelper->store_authorize("managecoupon_form"); if (empty($allowed_role)) { ?> <div class="<?php echo Q2C_WRAPPER_CLASS; ?> " > <div class="well" > <div class="alert alert-error"> <span ><?php echo JText::_('QTC_VIOLATING_UR_ROLE'); ?> </span> </div> </div> </div>
techjoomla.jQuery('#qtcCreateMethMinField').html(response.minFieldHtml); techjoomla.jQuery('#qtcCreateMethMaxField').html(response.maxFieldHtml); // Change lable techjoomla.jQuery('#qtcCreateMethMinFieldLable').html(response.minFieldLable); techjoomla.jQuery('#qtcCreateMethMaxFieldLable').html(response.maxFieldLable); } } }); } </script> <?php if (!empty($shipFormData['methodId'])) { $status = $comquick2cartHelper->store_authorize('', $shipFormData['store_id']); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } ?> <form name="qtcshipform" id="adminForm" class="form-validate form-horizontal" method="post" onSubmit="return myValidate(this);" > <input type="hidden" name="check" value="post"/> <div class="row-fluid"> <legend id="qtc_shipmethodInfo" ><?php echo JText::_('PLG_QTC_DEFAULT_ZONESHIPPING_SEL_CREATE_SHIPMETHO'); ?> <small><?php //echo JText::_('QTC_BILLIN_DESC')
/** * Display the view */ public function display($tpl = null) { $comquick2cartHelper = new comquick2cartHelper(); $zoneHelper = new zoneHelper(); // Check whether view is accessible to user if (!$zoneHelper->isUserAccessible()) { return; } $app = JFactory::getApplication(); $jinput = $app->input; $user = JFactory::getUser(); $this->params = $app->getParams('com_quick2cart'); $layout = $jinput->get('layout', 'default'); $model = $this->getModel('taxprofileform'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } if ($layout == 'default') { $this->state = $this->get('State'); $this->item = $this->get('Data'); $this->form = $this->get('Form'); // Get taxprofile_id $taxprofile_id = $app->input->get('id', 0); // Getting saved tax rules. if (!empty($taxprofile_id)) { $this->taxrules = $model->getTaxRules($taxprofile_id); } // Check whether user is authorized for this zone ? if (!empty($this->item->store_id)) { $status = $comquick2cartHelper->store_authorize('taxprofileform_default', $this->item->store_id); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } // Get store name while edit view if (!empty($this->item->id) && !empty($this->item->store_id)) { $comquick2cartHelper = new comquick2cartHelper(); $this->storeDetails = $comquick2cartHelper->getSoreInfo($this->item->store_id); // Getting tax rates and Adress types $this->taxrate = $model->getTaxRateListSelect($this->item->store_id, ''); $this->address = $model->getAddressList(); } // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } } else { $this->taxRule_id = $jinput->get('id'); $defaultTaxRateId = ''; $defaultAddressId = ''; // Getting saved tax rules. if (!empty($this->taxRule_id)) { $this->taxrules = $model->getTaxRules('', $this->taxRule_id); if (!empty($this->taxrules)) { $defaultTaxRateId = $this->taxrules[0]->taxrate_id; $defaultAddressId = $this->taxrules[0]->address; } // Get store id of taxrule $taxHelper = new taxHelper(); $store_id = $taxHelper->getStoreIdFromTaxrule($this->taxRule_id); if (empty($store_id)) { $this->qtcStoreNotFoundMsg(); } // Getting tax rates and Adress types $this->taxrate = $model->getTaxRateListSelect($store_id, $defaultTaxRateId); $this->address = $model->getAddressList($defaultAddressId); } } $this->_prepareDocument(); parent::display($tpl); }
/** * mediaFileAuthorise * * @param STRING $file_id file_id * @param STRING $strorecall strorecall * @param STRING $guest_email guest_email * @param STRING $order_item_id order_item_id * * @return html */ public function mediaFileAuthorise($file_id, $strorecall, $guest_email, $order_item_id) { // Get store id associatd with file id $db = JFactory::getDBO(); $query = "SELECT i.`store_id`,`file_id`,`file_display_name`,`filePath`,`purchase_required` FROM `#__kart_itemfiles` AS f\n\t\tLEFT JOIN `#__kart_items` AS i ON f.item_id=i.item_id\n\t\twhere f.`file_id`=" . $file_id; $db->setQuery($query); $fileDetail = $db->loadAssoc(); $comquick2cartHelper = new comquick2cartHelper(); $ret['validDownload'] = 0; $ret['orderItemFileId'] = 0; // FOR STORE AUTHORIZED PERSONS if (!empty($strorecall)) { $ret['validDownload'] = $comquick2cartHelper->store_authorize('product_default', $fileDetail['store_id']); return $ret; } elseif (empty($order_item_id) && $fileDetail['purchase_required'] == 0) { // Called from product detail page // For free media $ret['validDownload'] = 1; return $ret; } else { // Is authorized guest chekout if (!empty($guest_email)) { $orderid = $comquick2cartHelper->getOrderId($order_item_id); $guest_email_chk = $comquick2cartHelper->checkmailhash($orderid, $guest_email); if (empty($guest_email_chk)) { // Not matched $ret['validDownload'] = 0; return $ret; } } // Is expired date/download conunt or not $productHelper = new productHelper(); $ret = $productHelper->validDownload($file_id, $order_item_id); return $ret; } }