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


PHP JSFactory::getModel方法代码示例

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


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

示例1: getFilterListProduct

 public function getFilterListProduct()
 {
     $jshopConfig = JSFactory::getConfig();
     $request = JSFactory::getModel('searchrequest', 'jshop');
     $manufacturer_id = $request->getManufacturerId();
     $date_to = $request->getDateTo();
     $date_from = $request->getDateFrom();
     $price_to = $request->getPriceTo();
     $price_from = $request->getPriceFrom();
     $search = $request->getSearch();
     $search_type = $request->getSearchType();
     $extra_fields = $request->getExtraFields();
     $categorys = $request->getCategorys();
     $filters = array();
     $filters['categorys'] = $categorys;
     if ($manufacturer_id) {
         $filters['manufacturers'][] = $manufacturer_id;
     }
     $filters['price_from'] = $price_from;
     $filters['price_to'] = $price_to;
     if ($jshopConfig->admin_show_product_extra_field) {
         $filters['extra_fields'] = $extra_fields;
     }
     $filters['search'] = $search;
     $filters['date_from'] = $date_from;
     $filters['date_to'] = $date_to;
     $filters['search_type'] = $search_type;
     return $filters;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:29,代码来源:productssearch.php

示例2: display

 function display($cachable = false, $urlparams = false)
 {
     $db = JFactory::getDBO();
     $addons = JSFactory::getModel("addons");
     $rows = $addons->getList();
     $back64 = base64_encode("index.php?option=com_jshopping&controller=addons");
     foreach ($rows as $k => $v) {
         if (file_exists(JPATH_COMPONENT_SITE . "/addons/" . $v->alias . "/config.tmpl.php")) {
             $rows[$k]->config_file_exist = 1;
         } else {
             $rows[$k]->config_file_exist = 0;
         }
         if (file_exists(JPATH_COMPONENT_SITE . "/addons/" . $v->alias . "/info.tmpl.php")) {
             $rows[$k]->info_file_exist = 1;
         } else {
             $rows[$k]->info_file_exist = 0;
         }
         if (file_exists(JPATH_COMPONENT_SITE . "/addons/" . $v->alias . "/version.tmpl.php")) {
             $rows[$k]->version_file_exist = 1;
         } else {
             $rows[$k]->version_file_exist = 0;
         }
     }
     $view = $this->getView("addons", 'html');
     $view->setLayout("list");
     $view->assign('rows', $rows);
     $view->assign('back64', $back64);
     $view->sidebar = JHtmlSidebar::render();
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayAddons', array(&$view));
     $view->displayList();
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:32,代码来源:addons.php

示例3: edit

 function edit()
 {
     $country_id = JRequest::getInt("country_id");
     $countries = JSFactory::getModel("countries");
     $country = JSFactory::getTable('country', 'jshop');
     $country->load($country_id);
     $first[] = JHTML::_('select.option', '0', _JSHOP_ORDERING_FIRST, 'ordering', 'name');
     $rows = array_merge($first, $countries->getAllCountries(0));
     $lists['order_countries'] = JHTML::_('select.genericlist', $rows, 'ordering', 'class="inputbox" size="1"', 'ordering', 'name', $country->ordering);
     $_lang = JSFactory::getModel("languages");
     $languages = $_lang->getAllLanguages(1);
     $multilang = count($languages) > 1;
     $edit = $country_id ? $edit = 1 : ($edit = 0);
     JFilterOutput::objectHTMLSafe($country, ENT_QUOTES);
     $view = $this->getView("countries", 'html');
     $view->setLayout("edit");
     $view->assign('country', $country);
     $view->assign('lists', $lists);
     $view->assign('edit', $edit);
     $view->assign('languages', $languages);
     $view->assign('etemplatevar', '');
     $view->assign('multilang', $multilang);
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeEditCountries', array(&$view));
     $view->displayEdit();
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:26,代码来源:countries.php

示例4: edit

 function edit()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     $id = JRequest::getInt("id");
     $vendor = JSFactory::getTable('vendor', 'jshop');
     $vendor->load($id);
     if (!$id) {
         $vendor->publish = 1;
     }
     $_countries = JSFactory::getModel("countries");
     $countries = $_countries->getAllCountries(0);
     $lists['country'] = JHTML::_('select.genericlist', $countries, 'country', 'class = "inputbox" size = "1"', 'country_id', 'name', $vendor->country);
     $nofilter = array();
     JFilterOutput::objectHTMLSafe($vendor, ENT_QUOTES, $nofilter);
     $view = $this->getView("vendors", 'html');
     $view->setLayout("edit");
     $view->assign('vendor', $vendor);
     $view->assign('lists', $lists);
     $view->assign('etemplatevar', '');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeEditVendors', array(&$view));
     $view->displayEdit();
 }
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:25,代码来源:vendors.php

示例5: showEndForm

 function showEndForm($pmconfigs, $order)
 {
     $jshopConfig = JSFactory::getConfig();
     $pm_method = $this->getPmMethod();
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query->clear();
     $query->update('#__jshopping_orders')->set($db->quoteName('order_created') . ' = 1 ')->where($db->quoteName('order_id') . ' = ' . (int) $order->order_id);
     $db->setQuery($query);
     echo '<div id="begateway_erip">';
     try {
         $db->execute();
         $model = JSFactory::getModel('orderMail', 'jshop');
         $model->setData($order->order_id, 0);
         $model->send();
         if ($pmconfigs['auto'] == '1') {
             JPluginHelper::importPlugin('PlgSystemJoomShoppingErip');
             $dispatcher = JEventDispatcher::getInstance();
             $result = $dispatcher->trigger('onBeforeChangeOrderStatusAdmin', array($order->order_id, $this->getStatusId(), 'auto'));
             if (!$result) {
                 throw new Exception(JText::_('PLG_JSERIPPAYMENT_ORDER_ERROR'));
             }
             $instruction = JText::_('PLG_JSERIPPAYMENT_ERIP_INSTRUCTION');
             $instruction = str_replace('#TABS#', '<strong>' . $pmconfigs['tree_path_email'] . '</strong>', $instruction);
             $instruction = str_replace('#ORDER_ID#', '<strong>' . $order->order_id . '</strong>', $instruction);
             echo nl2br($instruction);
         } else {
             echo nl2br(JText::_('PLG_JSERIPPAYMENT_ORDER_CONFIRMATION'));
         }
     } catch (RuntimeException $e) {
         echo JText::_('PLG_JSERIPPAYMENT_ORDER_ERROR');
     }
     echo '</div>';
 }
开发者ID:beGateway,项目名称:joomshopping-erip-payment-plugin,代码行数:34,代码来源:pm_erip.php

示例6: edit

 function edit()
 {
     $id = JRequest::getInt("id");
     $configdisplayprice = JSFactory::getTable('configDisplayPrice', 'jshop');
     $configdisplayprice->load($id);
     $list_c = $configdisplayprice->getZones();
     $zone_countries = array();
     foreach ($list_c as $v) {
         $obj = new stdClass();
         $obj->country_id = $v;
         $zone_countries[] = $obj;
     }
     $display_price_list = array();
     $display_price_list[] = JHTML::_('select.option', 0, _JSHOP_PRODUCT_BRUTTO_PRICE, 'id', 'name');
     $display_price_list[] = JHTML::_('select.option', 1, _JSHOP_PRODUCT_NETTO_PRICE, 'id', 'name');
     $lists['display_price'] = JHTML::_('select.genericlist', $display_price_list, 'display_price', '', 'id', 'name', $configdisplayprice->display_price);
     $lists['display_price_firma'] = JHTML::_('select.genericlist', $display_price_list, 'display_price_firma', '', 'id', 'name', $configdisplayprice->display_price_firma);
     $countries = JSFactory::getModel("countries");
     $lists['countries'] = JHTML::_('select.genericlist', $countries->getAllCountries(0), 'countries_id[]', 'size = "10", multiple = "multiple"', 'country_id', 'name', $zone_countries);
     JFilterOutput::objectHTMLSafe($configdisplayprice, ENT_QUOTES);
     $view = $this->getView("config_display_price", 'html');
     $view->setLayout("edit");
     $view->assign('row', $configdisplayprice);
     $view->assign('lists', $lists);
     $view->assign('etemplatevar', '');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeEditConfigDisplayPrice', array(&$view));
     $view->displayEdit();
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:29,代码来源:configdisplayprice.php

示例7: products

 function products()
 {
     $jshopConfig = JSFactory::getConfig();
     $dispatcher = JDispatcher::getInstance();
     $vendor_id = JRequest::getInt("vendor_id");
     JSFactory::getModel('productShop', 'jshop')->storeEndPages();
     $vendor = JSFactory::getTable('vendor', 'jshop');
     $vendor->load($vendor_id);
     $dispatcher->trigger('onBeforeDisplayVendor', array(&$vendor));
     JshopHelpersMetadata::vendorProducts($vendor);
     $productlist = JSFactory::getModel('productList', 'jshop');
     $productlist->setModel($vendor);
     $productlist->load();
     $orderby = $productlist->getOrderBy();
     $image_sort_dir = $productlist->getImageSortDir();
     $filters = $productlist->getFilters();
     $action = $productlist->getAction();
     $products = $productlist->getProducts();
     $pagination = $productlist->getPagination();
     $pagenav = $productlist->getPagenav();
     $sorting_sel = $productlist->getHtmlSelectSorting();
     $product_count_sel = $productlist->getHtmlSelectCount();
     $willBeUseFilter = $productlist->getWillBeUseFilter();
     $display_list_products = $productlist->getDisplayListProducts();
     $manufacuturers_sel = $productlist->getHtmlSelectFilterManufacturer(1);
     $categorys_sel = $productlist->getHtmlSelectFilterCategory(1);
     $allow_review = $productlist->getAllowReview();
     $view = $this->getView('vendor');
     $view->setLayout("products");
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', $productlist->getTmplBlockListProduct());
     $view->assign('template_no_list_product', $productlist->getTmplNoListProduct());
     $view->assign('template_block_form_filter', $productlist->getTmplBlockFormFilter());
     $view->assign('template_block_pagination', $productlist->getTmplBlockPagination());
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
     $view->assign('filter_show', 1);
     $view->assign('filter_show_category', 1);
     $view->assign('filter_show_manufacturer', 1);
     $view->assign('pagination', $pagenav);
     $view->assign('pagination_obj', $pagination);
     $view->assign('display_pagination', $pagenav != "");
     $view->assign("rows", $products);
     $view->assign("count_product_to_row", $productlist->getCountProductsToRow());
     $view->assign("vendor", $vendor);
     $view->assign('action', $action);
     $view->assign('allow_review', $allow_review);
     $view->assign('orderby', $orderby);
     $view->assign('product_count', $product_count_sel);
     $view->assign('sorting', $sorting_sel);
     $view->assign('categorys_sel', $categorys_sel);
     $view->assign('manufacuturers_sel', $manufacuturers_sel);
     $view->assign('filters', $filters);
     $view->assign('willBeUseFilter', $willBeUseFilter);
     $view->assign('display_list_products', $display_list_products);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $dispatcher->trigger('onBeforeDisplayProductListView', array(&$view));
     $view->display();
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:58,代码来源:vendor.php

示例8: mailSend

 public function mailSend()
 {
     $data = array();
     $data['product_id'] = $this->getProductId();
     $data['review'] = $this->review;
     $mail = JSFactory::getModel('reviewMail', 'jshop');
     $mail->setData($data);
     return $mail->send();
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:9,代码来源:productreview.php

示例9: clearAllDataCheckout

 public function clearAllDataCheckout()
 {
     extract(js_add_trigger(get_defined_vars(), "before"));
     $cart = JSFactory::getModel('cart', 'jshop');
     $cart->load();
     $cart->getSum();
     $cart->clear();
     $this->deleteSession();
     extract(js_add_trigger(get_defined_vars(), "after"));
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:10,代码来源:checkoutfinish.php

示例10: start

 function start()
 {
     $_GET['noredirect'] = 1;
     $_POST['noredirect'] = 1;
     $_REQUEST['noredirect'] = 1;
     $key = JRequest::getVar("key");
     $model = JSFactory::getModel('importExportStart', 'jshop');
     if ($model->checkKey($key)) {
         $model->executeList();
     }
     die;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:12,代码来源:importexport.php

示例11: showAdminFormParams

 function showAdminFormParams($params)
 {
     $array_params = array('user_id', 'project_id', 'project_password', 'notify_password', 'transaction_end_status', 'transaction_pending_status', 'transaction_failed_status');
     foreach ($array_params as $key) {
         if (!isset($params[$key])) {
             $params[$key] = '';
         }
     }
     $orders = JSFactory::getModel('orders', 'JshoppingModel');
     //admin model
     include dirname(__FILE__) . "/adminparamsform.php";
 }
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:12,代码来源:pm_sofortueberweisung.php

示例12: remove_to_cart

 function remove_to_cart()
 {
     header("Cache-Control: no-cache, must-revalidate");
     $ajax = JRequest::getInt('ajax');
     $number_id = JRequest::getInt('number_id');
     $cart = JSFactory::getModel('checkout', 'jshop')->removeWishlistItemToCart($number_id);
     if ($ajax) {
         print getOkMessageJson($cart);
         die;
     }
     $this->setRedirect(SEFLink('index.php?option=com_jshopping&controller=cart&task=view', 1, 1));
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:12,代码来源:wishlist.php

示例13: display

 function display($cachable = false, $urlparams = false)
 {
     $languages = JSFactory::getModel("languages");
     $rows = $languages->getAllLanguages(0);
     $jshopConfig = JSFactory::getConfig();
     $view = $this->getView("languages_list", 'html');
     $view->assign('rows', $rows);
     $view->assign('default_front', $jshopConfig->getFrontLang());
     $view->assign('defaultLanguage', $jshopConfig->defaultLanguage);
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayLanguage', array(&$view));
     $view->display();
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:13,代码来源:languages.php

示例14: result

 function result()
 {
     $jshopConfig = JSFactory::getConfig();
     JSFactory::getModel('productShop', 'jshop')->storeEndPages();
     JshopHelpersMetadata::searchResult();
     $modellist = JSFactory::getModel('productssearch', 'jshop');
     $productlist = JSFactory::getModel('productList', 'jshop');
     $productlist->setModel($modellist);
     $productlist->load();
     $orderby = $productlist->getOrderBy();
     $image_sort_dir = $productlist->getImageSortDir();
     $action = $productlist->getAction();
     $products = $productlist->getProducts();
     $pagination = $productlist->getPagination();
     $pagenav = $productlist->getPagenav();
     $total = $productlist->getTotal();
     $filters = $productlist->getFilters();
     $sorting_sel = $productlist->getHtmlSelectSorting();
     $product_count_sel = $productlist->getHtmlSelectCount();
     $allow_review = $productlist->getAllowReview();
     $search = $filters['search'];
     if (!$total) {
         $this->noresult($search);
         return 0;
     }
     $view = $this->getView("search");
     $view->setLayout("products");
     $view->assign('search', $search);
     $view->assign('total', $total);
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', $productlist->getTmplBlockListProduct());
     $view->assign('template_block_form_filter', $productlist->getTmplBlockFormFilter());
     $view->assign('template_block_pagination', $productlist->getTmplBlockPagination());
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
     $view->assign('filter_show', 0);
     $view->assign('filter_show_category', 0);
     $view->assign('filter_show_manufacturer', 0);
     $view->assign('pagination', $pagenav);
     $view->assign('pagination_obj', $pagination);
     $view->assign('display_pagination', $pagenav != "");
     $view->assign('product_count', $product_count_sel);
     $view->assign('sorting', $sorting_sel);
     $view->assign('action', $action);
     $view->assign('orderby', $orderby);
     $view->assign('count_product_to_row', $productlist->getCountProductsToRow());
     $view->assign('rows', $products);
     $view->assign('allow_review', $allow_review);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     JDispatcher::getInstance()->trigger('onBeforeDisplayProductListView', array(&$view));
     $view->display();
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:51,代码来源:search.php

示例15: showAdminFormParams

 function showAdminFormParams($params)
 {
     $lang = JFactory::getLanguage();
     require_once dirname(dirname(__DIR__)) . '/lang/' . __CLASS__ . '/' . $lang->getTag() . '.php';
     $array_params = array('email_received', 'token', 'test_token', 'transaction_end_status', 'transaction_pending_status', 'transaction_failed_status');
     foreach ($array_params as $key) {
         if (!isset($params[$key])) {
             $params[$key] = '';
         }
     }
     $orders = JSFactory::getModel('orders', 'JshoppingModel');
     // Admin model
     include dirname(__FILE__) . "/adminparamsform.php";
 }
开发者ID:uinerd,项目名称:Code,代码行数:14,代码来源:pm_pagseguro.php


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