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


PHP JSFactory::loadAdminLanguageFile方法代码示例

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


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

示例1: send

 function send()
 {
     $order_id = JRequest::getInt("order_id");
     $order = JTable::getInstance('order', 'jshop');
     $order->load($order_id);
     JSFactory::loadLanguageFile($order->getLang());
     JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_jshopping/models');
     $checkout = JModelLegacy::getInstance('checkout', 'jshop');
     $checkout->sendOrderEmail($order_id, 1);
     JSFactory::loadAdminLanguageFile();
     $this->setRedirect("index.php?option=com_jshopping&controller=orders&task=show&order_id=" . $order_id, _JSHOP_MAIL_HAS_BEEN_SENT);
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:12,代码来源:orders.php

示例2: send

 function send()
 {
     $order_id = JRequest::getInt("order_id");
     $order = JSFactory::getTable('order', 'jshop');
     $order->load($order_id);
     JSFactory::loadLanguageFile($order->getLang());
     $checkout = JSFactory::getModel('checkout', 'jshop');
     $checkout->sendOrderEmail($order_id, 1);
     JSFactory::loadAdminLanguageFile();
     $this->setRedirect("index.php?option=com_jshopping&controller=orders&task=show&order_id=" . $order_id, _JSHOP_MAIL_HAS_BEEN_SENT);
 }
开发者ID:binhnk0791,项目名称:joomla,代码行数:11,代码来源:orders.php

示例3: defined

*/
defined('_JEXEC') or die('Restricted access');
if (!JFactory::getUser()->authorise('core.manage', 'com_jshopping')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
JTable::addIncludePath(JPATH_COMPONENT_SITE . '/tables');
require_once JPATH_COMPONENT_SITE . "/lib/factory.php";
require_once JPATH_COMPONENT_ADMINISTRATOR . '/functions.php';
$ajax = JRequest::getInt('ajax');
$admin_load_user_id = JRequest::getInt('admin_load_user_id');
$adminlang = JFactory::getLanguage();
if ($admin_load_user_id) {
    JSFactory::setLoadUserId($admin_load_user_id);
}
if (!JRequest::getVar("js_nolang")) {
    JSFactory::loadAdminLanguageFile();
}
$db = JFactory::getDBO();
$jshopConfig = JSFactory::getConfig();
$jshopConfig->setLang($jshopConfig->getFrontLang());
if ($jshopConfig->adminLanguage != $adminlang->getTag()) {
    $config = new jshopConfig($db);
    $config->id = $jshopConfig->load_id;
    $config->adminLanguage = $adminlang->getTag();
    if (!$config->store()) {
        JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
        return 0;
    }
}
if (!$ajax) {
    installNewLanguages();
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:jshopping.php

示例4: _updateStatus


//.........这里部分代码省略.........
        				$currency = $db->loadResult();

        				if ($order_status == "2")
        				{
        					$member= oseRegistry :: call('member');
        					$member->instance($user_id, 'member_id');

        					// get current item
        					$cart->updateParams('payment_mode','m');
        					$paymentInfo = oseRegistry::call('msc')->getPaymentMscInfo($msc_id,$currency,0);
        					$nItem = array('entry_id'=>$msc_id,'entry_type'=>'msc','msc_option'=>oseObject::getValue($paymentInfo,'msc_option'));
        					$cart->addItem($nItem['entry_id'],$nItem['entry_type'],$nItem);

        					$cart->update();

        					// join msc
        					oseRegistry::call('msc')->runAddonAction('register.payment.save',array('member_id'=>$user_id,'payment_method'=>'none'), true, false);
        					$msc_order_id = JRequest::getInt('order_id',0);

        					oseRegistry::call('payment')->getInstance('Order')->confirmOrder($msc_order_id, array());
        				}
        				else
        				{
        					$msc_id= $row->id;
        					$member= oseRegistry :: call('member');
        					$member->instance($user_id, 'member_id');
        					$params = $member->getAddonParams($msc_id,$user_id,0,$params = array());
        					$updated= $msc->runAddonAction('member.msc.cancelMsc', $params);
        				}
                     }
                  }
             }
                
        }
        //////////////////////////////////////////////////////////////////////////
        $vendorinfo = $order->getVendorInfo();
        
        if (in_array($order_status, $jshopConfig->payment_status_return_product_in_stock) && !in_array($prev_order_status, $jshopConfig->payment_status_return_product_in_stock)){
            $order->changeProductQTYinStock("+");            
        }
        
        if (in_array($prev_order_status, $jshopConfig->payment_status_return_product_in_stock) && !in_array($order_status, $jshopConfig->payment_status_return_product_in_stock)){
            $order->changeProductQTYinStock("-");            
        }
        
        $order_history = &JTable::getInstance('orderHistory', 'jshop');
        $order_history->order_id = $order_id;
        $order_history->order_status_id = $order_status;
        $order_history->status_date_added = date("Y-m-d H:i:s");
        $order_history->customer_notify = $notify;
        $order_history->comments = $comments;

        $order_history->store();
        
        $vendors_send_message = ($jshopConfig->vendor_order_message_type==1 || ($order->vendor_type==1 && $jshopConfig->vendor_order_message_type==2));
        $vendor_send_order = ($jshopConfig->vendor_order_message_type==2 && $order->vendor_type == 0 && $order->vendor_id);
        $admin_send_order = 1;
        if ($jshopConfig->admin_not_send_email_order_vendor_order && $vendor_send_order) $admin_send_order = 0;

        $lang = &JSFactory::getLang($order->getLang());
        $new_status = &JTable::getInstance('orderStatus', 'jshop'); 
        $new_status->load($order_status);
        $comments = ($include)?($comments):('');
        $name = $lang->get('name');
        
        $mailfrom = $mainframe->getCfg( 'mailfrom' );
        $fromname = $mainframe->getCfg( 'fromname' );
        
        $view=&$this->getView("orders_show", 'html');
        $view->setLayout("statusorder");        
        $view->assign('order', $order);
        $view->assign('comment', $comments);
        $view->assign('order_status', $new_status->$name);        
        $view->assign('vendorinfo', $vendorinfo);        
        $message = $view->loadTemplate();
            
        //message client
        if ($notify){            
            $subject = sprintf(_JSHOP_ORDER_STATUS_CHANGE_SUBJECT, $order->order_number);
            JUtility::sendMail($mailfrom, $fromname, $order->email, $subject, $message, 0);
        }
        
        //message vendors
        if ($vendors_send_message){
            $subject = sprintf(_JSHOP_ORDER_STATUS_CHANGE_SUBJECT, $order->order_number);
            $listVendors = $order->getVendors();            
            foreach($listVendors as $k=>$datavendor){
                JUtility::sendMail($mailfrom, $fromname, $datavendor->email, $subject, $message, 0);
            }
        }
        
        JSFactory::loadAdminLanguageFile();
        
        $dispatcher->trigger( 'onAfterChangeOrderStatusAdmin', array(&$order_id, &$order_status, &$status_id, &$notify, &$comments, &$include, &$view_order) );
        
        if ($view_order)
            $this->setRedirect("index.php?option=com_jshopping&controller=orders&task=show&order_id=".$order_id, _JSHOP_ORDER_STATUS_CHANGED);
        else
            $this->setRedirect("index.php?option=com_jshopping&controller=orders", _JSHOP_ORDER_STATUS_CHANGED);
    }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:orders.php


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