本文整理汇总了PHP中comquick2cartHelper::createCouponAuthority方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::createCouponAuthority方法的具体用法?PHP comquick2cartHelper::createCouponAuthority怎么用?PHP comquick2cartHelper::createCouponAuthority使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::createCouponAuthority方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* 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)
{
$app = JFactory::getApplication();
$user = JFactory::getUser();
if (!$user->id) {
?>
<div class="<?php
echo Q2C_WRAPPER_CLASS;
?>
my-coupons">
<div class="well" >
<div class="alert alert-error">
<span><?php
echo JText::_('QTC_LOGIN');
?>
</span>
</div>
</div>
</div>
<?php
return false;
}
$zoneHelper = new zoneHelper();
// Check whether view is accessible to user
if (!$zoneHelper->isUserAccessible()) {
return;
}
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = $app->getParams('com_quick2cart');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
throw new Exception(implode("\n", $errors));
}
$this->publish_states = array('' => JText::_('JOPTION_SELECT_PUBLISHED'), '1' => JText::_('JPUBLISHED'), '0' => JText::_('JUNPUBLISHED'));
// Get toolbar path
$comquick2cartHelper = new comquick2cartHelper();
$this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
// get store id (list))from model and pass to getManagecoupon()
$this->store_role_list = $store_role_list = $comquick2cartHelper->getStoreIds();
if ($this->store_role_list) {
$this->store_id = $store_id = !empty($change_storeto) ? $change_storeto : $store_role_list[0]['store_id'];
$this->selected_store = $store_id;
if ($this->store_id) {
//$this->authorized_store_id= storeid of user
$this->authorized_store_id = $authorized_store_id = $comquick2cartHelper->createCouponAuthority($store_id);
}
}
// Setup TJ toolbar
$this->addTJtoolbar();
$this->_prepareDocument();
parent::display($tpl);
}