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


PHP JSFactory::loadLanguageFile方法代码示例

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


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

示例1: save

 function save()
 {
     $apply = JRequest::getVar("apply");
     $vendor = JSFactory::getTable('vendor', 'jshop');
     $dispatcher = JDispatcher::getInstance();
     $id = JRequest::getInt("id");
     $vendor->load($id);
     if (!isset($_POST['publish'])) {
         $_POST['publish'] = 0;
     }
     $post = JRequest::get("post");
     $dispatcher->trigger('onBeforeSaveVendor', array(&$post));
     $vendor->bind($post);
     JSFactory::loadLanguageFile();
     if (!$vendor->check()) {
         JError::raiseWarning("", $vendor->getError());
         $this->setRedirect("index.php?option=com_jshopping&controller=vendors&task=edit&id=" . $vendor->id);
         return 0;
     }
     if (!$vendor->store()) {
         JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
         $this->setRedirect("index.php?option=com_jshopping&controller=vendors&task=edit&id=" . $vendor->id);
         return 0;
     }
     $dispatcher->trigger('onAfterSaveVendor', array(&$vendor));
     if ($this->getTask() == 'apply') {
         $this->setRedirect("index.php?option=com_jshopping&controller=vendors&task=edit&id=" . $vendor->id);
     } else {
         $this->setRedirect("index.php?option=com_jshopping&controller=vendors");
     }
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:31,代码来源:vendors.php

示例2: getList

 public static function getList(&$params)
 {
     $db = JFactory::getDBO();
     $jshopConfig = JSFactory::getConfig();
     $jshopConfig->cur_lang = $jshopConfig->frontend_lang;
     JSFactory::loadCssFiles();
     JSFactory::loadLanguageFile();
     $lang = JSFactory::getLang();
     $jshopConfig = JSFactory::getConfig();
     $field_sort = $params->get('sort', 'id');
     $ordering = $params->get('ordering', 'asc');
     $_limit = (int) $params->get('count_cat', 10);
     $catids = $params->get('catids', 0);
     $_catids = array();
     $list = array();
     settype($catids, 'array');
     if (!empty($catids)) {
         $catid = implode(", ", $catids);
         $list = self::getCategory($catid, $field_sort, $ordering, $_limit, 1);
     }
     if (!empty($list)) {
         foreach ($list as $i => $item) {
             $item->_short_desc = self::_cleanText($item->short_description);
             $item->_description = self::_cleanText($item->description);
             $item->_description = $item->_description != '' ? $item->_description : $item->_short_desc;
             self::getJSCImages($item, $params, 'imgcfgcat');
         }
     }
     return $list;
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:30,代码来源:helper.php

示例3: store

 public function store()
 {
     $jshopConfig = JSFactory::getConfig();
     $dispatcher = JDispatcher::getInstance();
     if ($this->getAppAdmin()) {
         $dispatcher->trigger('onBeforeChangeOrderStatusAdmin', array(&$this->order_id, &$this->status, &$this->status_id, &$this->notify, &$this->comments, &$this->include_comment, &$this->view_order));
     } else {
         $dispatcher->trigger('onBeforeChangeOrderStatus', array(&$this->order_id, &$this->status, &$this->sendmessage, &$this->comments));
     }
     $prev_order_status = $this->orderStatusStore();
     if ($this->getAppAdmin()) {
         JSFactory::loadLanguageFile($this->order->getLang());
         JSFactory::getLang($this->order->getLang());
     }
     $this->vendorinfo = $this->order->getVendorInfo();
     $this->tbl_order_status->load($this->status);
     $this->order->updateProductsInStock();
     $this->order->saveOrderHistory($this->notify, $this->comments);
     $this->order_details_url = $this->getOrderDetailsUrl();
     if (!$this->include_comment) {
         $this->comments = '';
     }
     $message = $this->getMessage($this->order, $this->tbl_order_status->getName(), $this->vendorinfo, $this->order_details_url, $this->comments);
     $this->listVendors = $this->getListVendors($this->order);
     $this->vendors_send_message = $this->getVendorSendMessage($this->order);
     $this->vendor_send_order = $this->getVendorSendOrder($this->order);
     $this->admin_send_order = $this->getAdminSendOrder($this->order, $this->listVendors);
     $send_msg_client = $this->getSendMsg('client');
     $send_msg_admin = $this->getSendMsg('admin');
     $send_msg_vendor = $this->getSendMsg('vendor');
     if ($send_msg_client) {
         $this->sendMail('client', $this->order->email, $message, $this->order);
     }
     if ($send_msg_admin) {
         $this->sendMail('admin', $jshopConfig->getAdminContactEmails(), $message, $this->order);
     }
     if ($send_msg_vendor) {
         foreach ($this->listVendors as $k => $datavendor) {
             $this->sendMail('vendor', $datavendor->email, $message, $this->order, $datavendor);
         }
     }
     if ($this->getAppAdmin()) {
         $dispatcher->trigger('onAfterChangeOrderStatusAdmin', array(&$this->order_id, &$this->status, &$this->status_id, &$this->notify, &$this->comments, &$this->include_comment, &$this->view_order, &$prev_order_status));
     } else {
         $dispatcher->trigger('onAfterChangeOrderStatus', array(&$this->order_id, &$this->status, &$this->sendmessage, &$prev_order_status));
     }
     return 1;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:48,代码来源:orderchangestatus.php

示例4: 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

示例5: initLoadJoomshoppingLanguageFile

function initLoadJoomshoppingLanguageFile()
{
    if (!JRequest::getInt('no_lang')) {
        JSFactory::loadLanguageFile();
    }
}
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:6,代码来源:functions.php

示例6: __construct

 public function __construct($params)
 {
     parent::__construct($params);
     JSFactory::loadLanguageFile();
 }
开发者ID:Tommar,项目名称:vino2,代码行数:5,代码来源:joomshopping.php

示例7: jshoppingParseRoute

function jshoppingParseRoute($segments)
{
    $vars = array();
    JSFactory::loadLanguageFile();
    $reservedFirstAlias = JSFactory::getReservedFirstAlias();
    $menu = JFactory::getApplication()->getMenu();
    $menuItem = $menu->getActive();
    JPluginHelper::importPlugin('jshoppingrouter');
    $dispatcher = JDispatcher::getInstance();
    $dispatcher->trigger('onBeforeParseRoute', array(&$vars, &$segments));
    $segments[0] = getSeoSegment($segments[0]);
    if (isset($segments[1])) {
        $segments[1] = getSeoSegment($segments[1]);
    } else {
        $segments[1] = "";
    }
    if (isset($menuItem->query['controller'])) {
        if ($menuItem->query['controller'] == "cart") {
            $vars['controller'] = "cart";
            $vars['task'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "wishlist") {
            $vars['controller'] = "wishlist";
            $vars['task'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "search") {
            $vars['controller'] = "search";
            $vars['task'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "user" && $menuItem->query['task'] == "") {
            $vars['controller'] = "user";
            $vars['task'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "checkout") {
            $vars['controller'] = "checkout";
            $vars['task'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "vendor" && $menuItem->query['task'] == "") {
            $vars['controller'] = "vendor";
            $vars['task'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "content" && $menuItem->query['task'] == "view") {
            $vars['controller'] = "content";
            $vars['page'] = $segments[0];
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($menuItem->query['controller'] == "category" && $menuItem->query['category_id'] && $segments[1] == "") {
            $prodalias = JSFactory::getAliasProduct();
            $product_id = array_search($segments[0], $prodalias, true);
            if (!$product_id) {
                JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
            }
            $vars['controller'] = "product";
            $vars['task'] = "view";
            $vars['category_id'] = $menuItem->query['category_id'];
            $vars['product_id'] = $product_id;
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
    }
    if ($segments[0] && !in_array($segments[0], $reservedFirstAlias)) {
        $catalias = JSFactory::getAliasCategory();
        $category_id = array_search($segments[0], $catalias, true);
        if ($category_id && $segments[1] == "") {
            $vars['controller'] = "category";
            $vars['task'] = "view";
            $vars['category_id'] = $category_id;
            $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
            return $vars;
        }
        if ($category_id && $segments[1] != "") {
            $prodalias = JSFactory::getAliasProduct();
            $product_id = array_search($segments[1], $prodalias, true);
            if (!$product_id) {
                JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
            }
            if ($category_id && $product_id) {
                $vars['controller'] = "product";
                $vars['task'] = "view";
                $vars['category_id'] = $category_id;
                $vars['product_id'] = $product_id;
                $dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
                return $vars;
            }
        }
        if (!$category_id && $segments[1] == "") {
            $manalias = JSFactory::getAliasManufacturer();
//.........这里部分代码省略.........
开发者ID:Tommar,项目名称:vino2,代码行数:101,代码来源:router.php

示例8: save

 function save()
 {
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     $apply = JRequest::getVar("apply");
     JSFactory::loadLanguageFile();
     $dispatcher = JDispatcher::getInstance();
     $user_shop = JSFactory::getTable('userShop', 'jshop');
     $user_id = JRequest::getInt("user_id");
     $post = JRequest::get("post");
     if ($post['f_name'] == "") {
         $post['f_name'] = $post['email'];
     }
     if (!$user_id) {
         $params = JComponentHelper::getParams('com_users');
         $user_shop->bind($post);
         $user_shop->password = $post['password'];
         $user_shop->password2 = $post['password2'];
         if (!$user_shop->check("editaccountadmin.edituser")) {
             JError::raiseWarning('', $user_shop->getError());
             $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit");
             return 0;
         }
         $user = new JUser();
         $data = array();
         $data['groups'][] = $params->get('new_usertype', 2);
         $data['email'] = $post['email'];
         $data['password'] = $post['password'];
         $data['password2'] = $post['password2'];
         $data['name'] = $post['f_name'] . ' ' . $post['l_name'];
         $data['username'] = $post["u_name"];
         $user->bind($data);
         if (!$user->save()) {
             JError::raiseWarning('', $user->getError());
             $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit");
             return 0;
         }
         $user_id = $user->id;
         unset($user);
         $user_shop->user_id = $user_id;
         $user_shop->number = $user_shop->getNewUserNumber();
         unset($user_shop->password);
         unset($user_shop->password2);
         if (!$db->insertObject($user_shop->getTableName(), $user_shop, $user_shop->getKeyName())) {
             JError::raiseWarning('', "Error insert in table " . $user_shop->getTableName());
             $this->setRedirect("index.php?option=com_jshopping&controller=users");
             return 0;
         }
         $post['user_id'] = $user_id;
         if (!$post['number']) {
             $post['number'] = $user_shop->number;
         }
     }
     $user_shop->load($user_id);
     $dispatcher->trigger('onBeforeSaveUser', array(&$post));
     if ($post['birthday']) {
         $post['birthday'] = getJsDateDB($post['birthday'], $jshopConfig->field_birthday_format);
     }
     if ($post['d_birthday']) {
         $post['d_birthday'] = getJsDateDB($post['d_birthday'], $jshopConfig->field_birthday_format);
     }
     $user_shop->bind($post);
     $user_shop->password = JRequest::getVar('password');
     $user_shop->password2 = JRequest::getVar('password2');
     if (!$user_shop->check("editaccountadmin.edituser")) {
         JError::raiseWarning("", $user_shop->getError());
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
         return 0;
     }
     unset($user_shop->password);
     unset($user_shop->password2);
     if (!$user_shop->store()) {
         JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
         return 0;
     }
     $user = new JUser($user_id);
     $data['email'] = JRequest::getVar("email");
     $data['password'] = JRequest::getVar("password");
     $data['password2'] = JRequest::getVar("password2");
     $data['name'] = JRequest::getVar("f_name");
     $data['username'] = JRequest::getVar("u_name");
     $data['block'] = JRequest::getVar("block");
     $user->bind($data);
     $user->save(true);
     $dispatcher->trigger('onAfterSaveUser', array(&$user, &$user_shop));
     if ($this->getTask() == 'apply') {
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
     } else {
         $this->setRedirect("index.php?option=com_jshopping&controller=users");
     }
 }
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:92,代码来源:users.php

示例9: step7

 function step7()
 {
     $checkout = JSFactory::getModel('checkout', 'jshop');
     $wmiframe = JRequest::getInt("wmiframe");
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $session = JFactory::getSession();
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onLoadStep7', array());
     $pm_method = JSFactory::getTable('paymentMethod', 'jshop');
     $str = "url: " . $_SERVER['REQUEST_URI'] . "\n";
     foreach ($_POST as $k => $v) {
         $str .= $k . "=" . $v . "\n";
     }
     saveToLog("paymentdata.log", $str);
     $act = JRequest::getVar("act");
     $payment_method = JRequest::getVar("js_paymentclass");
     $pm_method->loadFromClass($payment_method);
     $paymentsysdata = $pm_method->getPaymentSystemData();
     $payment_system = $paymentsysdata->paymentSystem;
     if ($paymentsysdata->paymentSystemVerySimple) {
         if (JRequest::getInt('no_lang')) {
             JSFactory::loadLanguageFile();
         }
         saveToLog("payment.log", "#001 - Error payment method file. PM " . $payment_method);
         JError::raiseWarning(500, _JSHOP_ERROR_PAYMENT);
         return 0;
     }
     if ($paymentsysdata->paymentSystemError) {
         if (JRequest::getInt('no_lang')) {
             JSFactory::loadLanguageFile();
         }
         saveToLog("payment.log", "#002 - Error payment. CLASS " . $payment_method);
         JError::raiseWarning(500, _JSHOP_ERROR_PAYMENT);
         return 0;
     }
     $pmconfigs = $pm_method->getConfigs();
     $urlParamsPS = $payment_system->getUrlParams($pmconfigs);
     $order_id = $urlParamsPS['order_id'];
     $hash = $urlParamsPS['hash'];
     $checkHash = $urlParamsPS['checkHash'];
     $checkReturnParams = $urlParamsPS['checkReturnParams'];
     $session->set('jshop_send_end_form', 0);
     if ($act == "cancel") {
         $this->cancelPayOrder($order_id);
         return 0;
     }
     if ($act == "return" && !$checkReturnParams) {
         $checkout->setMaxStep(10);
         if (!$wmiframe) {
             $this->setRedirect(SEFLink('index.php?option=com_jshopping&controller=checkout&task=finish', 0, 1, $jshopConfig->use_ssl));
         } else {
             $this->iframeRedirect(SEFLink('index.php?option=com_jshopping&controller=checkout&task=finish', 0, 1, $jshopConfig->use_ssl));
         }
         return 1;
     }
     $order = JSFactory::getTable('order', 'jshop');
     $order->load($order_id);
     if (JRequest::getInt('no_lang')) {
         JSFactory::loadLanguageFile($order->getLang());
         $lang = JSFactory::getLang($order->getLang());
     }
     if ($checkHash && $order->order_hash != $hash) {
         saveToLog("payment.log", "#003 - Error order hash. Order id " . $order_id);
         JError::raiseWarning("", _JSHOP_ERROR_ORDER_HASH);
         return 0;
     }
     if (!$order->payment_method_id) {
         saveToLog("payment.log", "#004 - Error payment method id. Order id " . $order_id);
         JError::raiseWarning("", _JSHOP_ERROR_PAYMENT);
         return 0;
     }
     if ($order->payment_method_id != $pm_method->payment_id) {
         saveToLog("payment.log", "#005 - Error payment method set url. Order id " . $order_id);
         JError::raiseWarning("", _JSHOP_ERROR_PAYMENT);
         return 0;
     }
     $res = $payment_system->checkTransaction($pmconfigs, $order, $act);
     $rescode = $res[0];
     $restext = $res[1];
     $transaction = $res[2];
     $transactiondata = $res[3];
     $status = $payment_system->getStatusFromResCode($rescode, $pmconfigs);
     $order->transaction = $transaction;
     $order->store();
     $order->saveTransactionData($rescode, $status, $transactiondata);
     if ($restext != '') {
         saveToLog("payment.log", $restext);
     }
     if ($status && !$order->order_created) {
         $order->order_created = 1;
         $order->order_status = $status;
         $dispatcher->trigger('onStep7OrderCreated', array(&$order, &$res, &$checkout, &$pmconfigs));
         $order->store();
         if ($jshopConfig->send_order_email) {
             $checkout->sendOrderEmail($order->order_id);
         }
         if ($jshopConfig->order_stock_removed_only_paid_status) {
             $product_stock_removed = in_array($status, $jshopConfig->payment_status_enable_download_sale_file);
         } else {
//.........这里部分代码省略.........
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:101,代码来源:checkout.php

示例10: 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

示例11: save

 function save()
 {
     $apply = JRequest::getVar("apply");
     JSFactory::loadLanguageFile();
     $dispatcher = JDispatcher::getInstance();
     $user_id = JRequest::getInt("user_id");
     $post = JRequest::get("post");
     $dispatcher->trigger('onBeforeSaveUser', array(&$post));
     if ($user_id) {
         $model = JSFactory::getModel('useredit', 'jshop');
         $model->setUserId($user_id);
     } else {
         $model = JSFactory::getModel('userregister', 'jshop');
     }
     $model->setAdminRegistration(1);
     $model->setData($post);
     if (!$model->check('editaccountadmin.edituser')) {
         JError::raiseWarning('', $model->getError());
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_id);
         return 0;
     }
     if (!$model->save()) {
         JError::raiseWarning('', $model->getError());
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_id);
         return 0;
     }
     $user_shop = $model->getUser();
     $user = $model->getUserJoomla();
     $dispatcher->trigger('onAfterSaveUser', array(&$user, &$user_shop));
     if ($this->getTask() == 'apply') {
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
     } else {
         $this->setRedirect("index.php?option=com_jshopping&controller=users");
     }
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:35,代码来源:users.php

示例12: save

 function save()
 {
     $jshopConfig = JSFactory::getConfig();
     $apply = JRequest::getVar("apply");
     JSFactory::loadLanguageFile();
     JPluginHelper::importPlugin('jshoppingadmin');
     $dispatcher = JDispatcher::getInstance();
     $user_shop = JTable::getInstance('userShop', 'jshop');
     $user_id = JRequest::getInt("user_id");
     $user_shop->load($user_id);
     $post = JRequest::get("post");
     $dispatcher->trigger('onBeforeSaveUser', array(&$post));
     if ($post['birthday']) {
         $post['birthday'] = getJsDateDB($post['birthday'], $jshopConfig->field_birthday_format);
     }
     if ($post['d_birthday']) {
         $post['d_birthday'] = getJsDateDB($post['d_birthday'], $jshopConfig->field_birthday_format);
     }
     $user_shop->bind($post);
     $user_shop->password = JRequest::getVar('password');
     $user_shop->password2 = JRequest::getVar('password2');
     if (!$user_shop->check("editaccountadmin.edituser")) {
         JError::raiseWarning("", $user_shop->getError());
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
         return 0;
     }
     unset($user_shop->password);
     unset($user_shop->password2);
     if (!$user_shop->store()) {
         JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
         return 0;
     }
     $user = new JUser($user_id);
     $data['email'] = JRequest::getVar("email");
     $data['password'] = JRequest::getVar("password");
     $data['password2'] = JRequest::getVar("password2");
     $data['name'] = JRequest::getVar("f_name");
     $data['username'] = JRequest::getVar("u_name");
     $data['block'] = JRequest::getVar("block");
     $user->bind($data);
     $user->save(true);
     $dispatcher->trigger('onAfterSaveUser', array(&$user, &$user_shop));
     if ($this->getTask() == 'apply') {
         $this->setRedirect("index.php?option=com_jshopping&controller=users&task=edit&user_id=" . $user_shop->user_id);
     } else {
         $this->setRedirect("index.php?option=com_jshopping&controller=users");
     }
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:49,代码来源:users.php

示例13: buy

 public function buy()
 {
     $jshopConfig = JSFactory::getConfig();
     $dispatcher = JDispatcher::getInstance();
     $order_id = $this->getOrderId();
     $checkHash = $this->getCheckHash();
     $hash = $this->getHash();
     $pmconfigs = $this->getPmConfigs();
     $act = $this->getAct();
     $payment_system = $this->getPaymentSystem();
     $pm_method = $this->getPmMethod();
     $order = JSFactory::getTable('order', 'jshop');
     $order->load($order_id);
     if ($this->getNoLang()) {
         JSFactory::loadLanguageFile($order->getLang());
         $lang = JSFactory::getLang($order->getLang());
     }
     if ($checkHash && $order->order_hash != $hash) {
         saveToLog("payment.log", "#003 - Error order hash. Order id " . $order_id);
         $this->setError(_JSHOP_ERROR_ORDER_HASH);
         return 0;
     }
     if (!$order->payment_method_id) {
         saveToLog("payment.log", "#004 - Error payment method id. Order id " . $order_id);
         $this->setError(_JSHOP_ERROR_PAYMENT);
         return 0;
     }
     if ($order->payment_method_id != $pm_method->payment_id) {
         saveToLog("payment.log", "#005 - Error payment method set url. Order id " . $order_id);
         $this->setError(_JSHOP_ERROR_PAYMENT);
         return 0;
     }
     $res = $payment_system->checkTransaction($pmconfigs, $order, $act);
     $rescode = $res[0];
     $restext = $res[1];
     $transaction = $res[2];
     $transactiondata = $res[3];
     $status = $payment_system->getStatusFromResCode($rescode, $pmconfigs);
     $order->transaction = $transaction;
     $order->store();
     $order->saveTransactionData($rescode, $status, $transactiondata);
     if ($restext != '') {
         saveToLog("payment.log", $restext);
     }
     if ($status && !$order->order_created) {
         $order->order_created = 1;
         $order->order_status = $status;
         $dispatcher->trigger('onStep7OrderCreated', array(&$order, &$res, &$this, &$pmconfigs));
         $order->store();
         if ($jshopConfig->send_order_email) {
             $this->sendOrderEmail($order->order_id);
         }
         $this->changeStatusOrder($order_id, $status, 0);
     }
     if ($status && $order->order_status != $status) {
         $this->changeStatusOrder($order_id, $status, 1);
     }
     $this->setCheckTransactionResCode($rescode);
     $this->setCheckTransactionResText($restext);
     $dispatcher->trigger('onStep7BefereNotify', array(&$order, &$this, &$pmconfigs));
     if ($act == "notify") {
         $payment_system->nofityFinish($pmconfigs, $order, $rescode);
         return 2;
     }
     $payment_system->finish($pmconfigs, $order, $rescode, $act);
     return 1;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:67,代码来源:checkoutbuy.php

示例14:

if (!file_exists(JPATH_SITE . '/components/com_jshopping/jshopping.php')) {
    JError::raiseError(500, "Please install component \"joomshopping\"");
}
$layout = $params->get('layout', 'default');
$display_fileters = 0;
if (JRequest::getVar("controller") == "category" && JRequest::getInt("category_id")) {
    $display_fileters = 1;
}
if (JRequest::getVar("controller") == "manufacturer" && JRequest::getInt("manufacturer_id")) {
    $display_fileters = 1;
}
//if (!$display_fileters) return "";
require_once JPATH_SITE . '/components/com_jshopping/lib/factory.php';
require_once JPATH_SITE . '/components/com_jshopping/lib/functions.php';
JSFactory::loadCssFiles();
JSFactory::loadLanguageFile();
$jshopConfig = JSFactory::getConfig();
$mainframe = JFactory::getApplication();
$show_manufacturers = $params->get('show_manufacturers');
$show_categorys = $params->get('show_categorys');
$show_prices = $params->get('show_prices');
$show_characteristics = $params->get('show_characteristics');
$category_id = JRequest::getInt('category_id');
$manufacturer_id = JRequest::getInt('manufacturer_id');
//$contextfilter = "";
$contextfilter = "jshoping.list.front.product.cat.1";
if (JRequest::getVar("controller") == "category") {
    $contextfilter = "jshoping.list.front.product.cat." . $category_id;
}
if (JRequest::getVar("controller") == "manufacturer") {
    $contextfilter = "jshoping.list.front.product.manf." . $manufacturer_id;
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:31,代码来源:mod_jshopping_filters.php

示例15: step7

    function step7(){
        
        $mainframe =& JFactory::getApplication();
        $jshopConfig = &JSFactory::getConfig();
        $session =& JFactory::getSession();
        $pm_method = &JTable::getInstance('paymentMethod', 'jshop');
        
        if ($jshopConfig->savelog && $jshopConfig->savelogpaymentdata){            
            $str = "url: ".$_SERVER['REQUEST_URI']."\n";
            foreach($_POST as $k=>$v) $str .= $k."=".$v."\n";
            saveToLog("paymentdata.log", $str);
        }
        
        $act = JRequest::getVar("act");        
        $payment_method = JRequest::getVar("js_paymentclass");        
        
         if (!file_exists($jshopConfig->path . 'payments/' . $payment_method."/".$payment_method. '.php')) {
            if (JRequest::getInt('no_lang')) JSFactory::loadLanguageFile();
            saveToLog("payment.log", "#001 - Error payment method file. PM ".$payment_method);
            JError::raiseWarning(500, _JSHOP_ERROR_PAYMENT);            
            return 0;
        } 
        require_once ($jshopConfig->path . 'payments/' . $payment_method."/".$payment_method. '.php');        

        if (!class_exists($payment_method)) {
            if (JRequest::getInt('no_lang')) JSFactory::loadLanguageFile();
            saveToLog("payment.log", "#002 - Error payment. CLASS ".$payment_method);
            JError::raiseWarning(500, _JSHOP_ERROR_PAYMENT);            
            return 0;
        }
        
        $pmconfigs = $pm_method->getConfigsForClassName($payment_method);        
        $payment_system = new $payment_method();
        $urlParamsPS = $payment_system->getUrlParams($pmconfigs);
        
        $order_id = $urlParamsPS['order_id'];
        $hash = $urlParamsPS['hash'];
        $checkHash = $urlParamsPS['checkHash'];
        $checkReturnParams = $urlParamsPS['checkReturnParams'];
        
        $session->set('jshop_send_end_form', 0);
        
        if ($act == "cancel"){
            $this->_cancelPayOrder($order_id);
            return 0;
        }
        
        if ($act == "return" && !$checkReturnParams){
            $this->_setMaxStep(10);
            $this->setRedirect(SEFLink('index.php?option=com_jshopping&controller=checkout&task=finish', 0, 1, $jshopConfig->use_ssl));
            return 1;    
        }               
        
        $order = &JTable::getInstance('order', 'jshop');
        $order->load($order_id);
        
        if (JRequest::getInt('no_lang')){
            JSFactory::loadLanguageFile($order->getLang());
            $lang = &JSFactory::getLang($order->getLang());
        }

        if ($checkHash && $order->order_hash != $hash){
            saveToLog("payment.log", "#003 - Error order hash. Order id ".$order_id);
            JError::raiseWarning("", _JSHOP_ERROR_ORDER_HASH);
            return 0;    
        }
        
        if (!$order->payment_method_id){
            saveToLog("payment.log", "#004 - Error payment method id. Order id ".$order_id);
            JError::raiseWarning("", _JSHOP_ERROR_PAYMENT);
            return 0;    
        }        
                
        $pm_method->load($order->payment_method_id);
        
        if ($payment_method != $pm_method->payment_class){
            saveToLog("payment.log", "#005 - Error payment method set url. Order id ".$order_id);
            JError::raiseWarning("", _JSHOP_ERROR_PAYMENT);
            return 0;
        }
                
        $pmconfigs = $pm_method->getConfigs();
        $res = $payment_system->checkTransaction($pmconfigs, $order, $act);
        $rescode = $res[0];
        $restext = $res[1];        
        
        if ($rescode == 0 || $rescode == 3){        
            saveToLog("payment.log", $restext);
        }
        
        if ($rescode==0){
            $status = 0;
        }elseif($rescode==1){
            $status = $pmconfigs['transaction_end_status'];
        }elseif($rescode==2){
            $status = $pmconfigs['transaction_pending_status'];
        }elseif($rescode==3){
            $status = $pmconfigs['transaction_failed_status'];
        }
        
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:checkout.php


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