当前位置: 首页>>代码示例>>PHP>>正文


PHP EnmasseHelper::getSetting方法代码示例

本文整理汇总了PHP中EnmasseHelper::getSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP EnmasseHelper::getSetting方法的具体用法?PHP EnmasseHelper::getSetting怎么用?PHP EnmasseHelper::getSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EnmasseHelper的用法示例。


在下文中一共展示了EnmasseHelper::getSetting方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkAccess

 private function checkAccess()
 {
     $userGroup = JFactory::getUser()->groups;
     $delivererGroup = EnmasseHelper::getSetting()->delivery_group;
     if (!in_array($delivererGroup, $userGroup)) {
         $msg = JText::_('NO_PRIVILEDGE_FOR_ACCESSING');
         JFactory::getApplication()->redirect(JURI::base(), $msg, 'error');
     } else {
         return true;
     }
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:11,代码来源:deliverer.php

示例2: payOutCoupons

 public function payOutCoupons()
 {
     $nAuthorId = $this->checkAccess();
     $arCouponId = JRequest::getVar('cid', array(), 'post', 'array');
     $filter = JRequest::getVar('filter', array(), 'method', 'array');
     $nDealId = isset($filter['deal_id']) ? $filter['deal_id'] : '';
     //check deal belong to this merchant or not
     if (empty($nDealId) || !JModel::getInstance('deal', 'EnmasseModel')->checkMerchantOfDeal($nAuthorId, $nDealId)) {
         $msg = JText::_('INVALID_DEAL_ID');
         $link = 'index.php?option=com_enmasse&controller=merchant&task=dealCouponMgmt';
         JFactory::getApplication()->redirect($link, $msg, 'error');
     }
     //get coupon list with status is Not_Paid_Out of this deal
     $arCoupon = JModel::getInstance('invty', 'EnmasseModel')->getNotPaidOutCouponByDealId($nDealId);
     if (empty($arCoupon)) {
         $msg = JText::_('MERCHANT_COUPONS_ALREADY_IN_PROCESS');
         $link = JRoute::_("index.php?option=com_enmasse&controller=merchant&task=dealCouponMgmt&filter[deal_id]={$nDealId}");
         JFactory::getApplication()->redirect($link, $msg, 'error');
     }
     //calculate the coupon ids that have status is "Not_Paid_Out"
     //we must compare with cid array variable because merchant can also selected the paid out coupons at client
     $arNPOId = array_keys($arCoupon);
     $arCouponId = array_intersect($arCouponId, $arNPOId);
     //update status of calculated coupon of the deal to 'Should_Be_Paid_Out'
     if (empty($arCouponId)) {
         $msg = JText::_('MERCHANT_COUPONS_ALREADY_IN_PROCESS');
         $link = JRoute::_("index.php?option=com_enmasse&controller=merchant&task=dealCouponMgmt&filter[deal_id]={$nDealId}");
         JFactory::getApplication()->redirect($link, $msg, 'error');
     } else {
         JModel::getInstance('invty', 'EnmasseModel')->payOutCoupons($arCouponId);
     }
     //send message to admin
     $mailer = JFactory::getMailer();
     $oMer = JModel::getInstance('merchant', 'enmasseModel')->getByUserName(JFactory::getUser()->get('username'));
     $oDeal = JModel::getInstance('deal', 'enmasseModel')->getById($nDealId);
     $sender = array(JFactory::getUser()->email, $oMer->name);
     $mailto = EnmasseHelper::getSetting()->customer_support_email;
     $recipient = array($mailto);
     //admin email was config in enmasse_setting;
     $subject = JText::sprintf('MERCHANT_PAY_OUT_EMAIL_SUBJECT', $oDeal->deal_code);
     $body = JText::sprintf('MERCHANT_PAY_OUT_EMAIL_BODY', $oMer->name, $oDeal->name);
     $mailer->setSubject($subject);
     $mailer->setBody($body);
     $mailer->addRecipient($recipient);
     $mailer->setSender($sender);
     $send =& $mailer->Send();
     //update successful, redirect to merchant home page
     $msg = JText::_('MERCHANT_COUPONS_PAY_OUT_SUCCESS');
     $link = JRoute::_("index.php?option=com_enmasse&controller=merchant&task=dealCouponMgmt&filter[deal_id]={$nDealId}");
     JFactory::getApplication()->redirect($link, $msg);
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:51,代码来源:merchant.php

示例3: getCouponBg

 function getCouponBg()
 {
     $oSetting = EnmasseHelper::getSetting();
     return $oSetting->coupon_bg_url;
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:5,代码来源:setting.php


注:本文中的EnmasseHelper::getSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。