當前位置: 首頁>>代碼示例>>PHP>>正文


PHP comquick2cartHelper::createCouponAuthority方法代碼示例

本文整理匯總了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);
    }
開發者ID:BetterBetterBetter,項目名稱:B3App,代碼行數:62,代碼來源:view.html.php


注:本文中的comquick2cartHelper::createCouponAuthority方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。