本文整理汇总了PHP中comquick2cartHelper::store_authorize方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::store_authorize方法的具体用法?PHP comquick2cartHelper::store_authorize怎么用?PHP comquick2cartHelper::store_authorize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::store_authorize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* 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);
}
示例2:
<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;
示例3: qtcAddShipMethRates
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 == '')
{
示例4:
<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>
示例5: myValidate
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')
示例6: mediaFileAuthorise
/**
* 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;
}
}