本文整理汇总了PHP中JSFactory::getConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP JSFactory::getConfig方法的具体用法?PHP JSFactory::getConfig怎么用?PHP JSFactory::getConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSFactory
的用法示例。
在下文中一共展示了JSFactory::getConfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($cachable = false, $urlparams = false)
{
$mainframe = JFactory::getApplication();
$context = "jshoping.list.admin.coupons";
$limit = $mainframe->getUserStateFromRequest($context . 'limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($context . 'limitstart', 'limitstart', 0, 'int');
$filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', "C.coupon_code", 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', "asc", 'cmd');
$jshopConfig = JSFactory::getConfig();
$coupons = JSFactory::getModel("coupons");
$total = $coupons->getCountCoupons();
jimport('joomla.html.pagination');
$pageNav = new JPagination($total, $limitstart, $limit);
$rows = $coupons->getAllCoupons($pageNav->limitstart, $pageNav->limit, $filter_order, $filter_order_Dir);
$currency = JSFactory::getTable('currency', 'jshop');
$currency->load($jshopConfig->mainCurrency);
$view = $this->getView("coupons", 'html');
$view->setLayout("list");
$view->assign('rows', $rows);
$view->assign('currency', $currency->currency_code);
$view->assign('pageNav', $pageNav);
$view->assign('filter_order', $filter_order);
$view->assign('filter_order_Dir', $filter_order_Dir);
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeDisplayCoupons', array(&$view));
$view->displayList();
}
示例2: start
function start()
{
$jshopConfig = JSFactory::getConfig();
$key = JRequest::getVar("key");
if ($key != $jshopConfig->securitykey) {
die;
}
$_GET['noredirect'] = 1;
$_POST['noredirect'] = 1;
$_REQUEST['noredirect'] = 1;
$db = JFactory::getDBO();
$time = time();
$query = "SELECT * FROM `#__jshopping_import_export` where `steptime`>0 and (endstart + steptime < {$time}) ORDER BY id";
$db->setQuery($query);
$list = $db->loadObjectList();
foreach ($list as $ie) {
$alias = $ie->alias;
if (!file_exists(JPATH_COMPONENT_ADMINISTRATOR . "/importexport/" . $alias . "/" . $alias . ".php")) {
print sprintf(_JSHOP_ERROR_FILE_NOT_EXIST, "/importexport/" . $alias . "/" . $alias . ".php");
return 0;
}
include_once JPATH_COMPONENT_ADMINISTRATOR . "/importexport/" . $alias . "/" . $alias . ".php";
$classname = 'Ie' . $alias;
$controller = new $classname($ie->id);
$controller->set('ie_id', $ie->id);
$controller->set('alias', $alias);
$controller->save();
print $alias . "\n";
}
die;
}
示例3: deleteImage
public function deleteImage($id)
{
$image = $this->getImage($id);
if ($image) {
@unlink(JSFactory::getConfig()->image_attributes_path . "/" . $image);
}
}
示例4: view
function view()
{
$jshopConfig = JSFactory::getConfig();
$ajax = JRequest::getInt('ajax');
$dispatcher = JDispatcher::getInstance();
$cartpreview = JSFactory::getModel('cartPreview', 'jshop');
$cart = JSFactory::getModel('cart', 'jshop')->init("wishlist", 1);
JshopHelpersMetadata::wishlist();
$cartpreview->setCart($cart);
$cartpreview->setCheckoutStep(0);
$shopurl = $cartpreview->getBackUrlShop();
$view = $this->getView('cart');
$view->setLayout("wishlist");
$view->assign('config', $jshopConfig);
$view->assign('products', $cartpreview->getProducts());
$view->assign('image_product_path', $jshopConfig->image_product_live_path);
$view->assign('image_path', $jshopConfig->live_path);
$view->assign('no_image', $jshopConfig->noimage);
$view->assign('href_shop', $shopurl);
$view->assign('href_checkout', SEFLink('index.php?option=com_jshopping&controller=cart&task=view', 1));
$dispatcher->trigger('onBeforeDisplayWishlistView', array(&$view));
$view->display();
if ($ajax) {
die;
}
}
示例5: edit
function edit()
{
$jshopConfig = JSFactory::getConfig();
$shipping_id = JRequest::getInt("shipping_id");
$shipping = JTable::getInstance('shippingMethod', 'jshop');
$shipping->load($shipping_id);
$edit = $shipping_id ? $edit = 1 : ($edit = 0);
$_lang = $this->getModel("languages");
$languages = $_lang->getAllLanguages(1);
$multilang = count($languages) > 1;
$_payments = $this->getModel("payments");
$list_payments = $_payments->getAllPaymentMethods(0);
$lists['payments'] = JHTML::_('select.genericlist', $list_payments, 'listpayments[]', 'class="inputbox" size="10" multiple = "multiple"', 'payment_id', 'name', $shipping->getPayments());
$nofilter = array();
JFilterOutput::objectHTMLSafe($shipping, ENT_QUOTES, $nofilter);
$view = $this->getView("shippings", 'html');
$view->setLayout("edit");
$view->assign('shipping', $shipping);
$view->assign('edit', $edit);
$view->assign('languages', $languages);
$view->assign('multilang', $multilang);
$view->assign('lists', $lists);
$view->assign('config', $jshopConfig);
$view->assign('etemplatevar', '');
JPluginHelper::importPlugin('jshoppingadmin');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeEditShippings', array(&$view));
$view->displayEdit();
}
示例6: addTitleHead
function addTitleHead()
{
$jshopConfig = JSFactory::getConfig();
$vendorinfo = $this->_vendorinfo;
$this->Image($jshopConfig->path . 'images/header.jpg', 1, 1, $jshopConfig->pdf_header_width, $jshopConfig->pdf_header_height);
$this->Image($jshopConfig->path . 'images/footer.jpg', 1, 265, $jshopConfig->pdf_footer_width, $jshopConfig->pdf_footer_height);
$this->SetFont('freesans', '', 8);
$this->SetXY(115, 12);
$this->SetTextColor($this->pdfcolors[2][0], $this->pdfcolors[2][1], $this->pdfcolors[2][2]);
$_vendor_info = array();
$_vendor_info[] = $vendorinfo->adress;
$_vendor_info[] = $vendorinfo->zip . " " . $vendorinfo->city;
if ($vendorinfo->phone) {
$_vendor_info[] = _JSHOP_CONTACT_PHONE . ": " . $vendorinfo->phone;
}
if ($vendorinfo->fax) {
$_vendor_info[] = _JSHOP_CONTACT_FAX . ": " . $vendorinfo->fax;
}
if ($vendorinfo->email) {
$_vendor_info[] = _JSHOP_EMAIL . ": " . $vendorinfo->email;
}
$str_vendor_info = implode("\n", $_vendor_info);
$this->MultiCell(80, 3, $str_vendor_info, 0, 'R');
$this->SetTextColor($this->pdfcolors[0][0], $this->pdfcolors[0][1], $this->pdfcolors[0][2]);
}
示例7: getAllCountries
/**
* get list country
*
* @param int $publish (0-all, 1-publish, 2-unpublish)
* @param int $limitstart
* @param int $limit
* @param int $orderConfig use order config
* @return array
*/
function getAllCountries($publish = 1, $limitstart = null, $limit = null, $orderConfig = 1, $order = null, $orderDir = null)
{
$db = JFactory::getDBO();
$jshopConfig = JSFactory::getConfig();
if ($publish == 0) {
$where = " ";
} else {
if ($publish == 1) {
$where = " WHERE country_publish = '1' ";
} else {
if ($publish == 2) {
$where = " WHERE country_publish = '0' ";
}
}
}
$ordering = "ordering";
if ($orderConfig && $jshopConfig->sorting_country_in_alphabet) {
$ordering = "name";
}
if ($order && $orderDir) {
$ordering = $order . " " . $orderDir;
}
$lang = JSFactory::getLang();
$query = "SELECT country_id, country_publish, ordering, country_code, country_code_2, `" . $lang->get("name") . "` as name FROM `#__jshopping_countries` " . $where . " ORDER BY " . $ordering;
$db->setQuery($query, $limitstart, $limit);
return $db->loadObjectList();
}
示例8: fetchElement
function fetchElement()
{
require_once JPATH_SITE . "/components/com_jshopping/lib/factory.php";
$jshopConfig = JSFactory::getConfig();
$db = JFactory::getDBO();
$lang = JFactory::getLanguage()->getTag();
$query = "SELECT m.category_id AS id, IF(`name_{$lang}`<>'',`name_{$lang}`,`name_" . $jshopConfig->frontend_lang . "`) AS title, IF(`name_{$lang}`<>'',`name_{$lang}`,`name_" . $jshopConfig->frontend_lang . "`) AS name, m.category_parent_id AS parent_id, m.category_parent_id as parent\n FROM #__jshopping_categories AS m\n LEFT JOIN #__jshopping_products_to_categories AS f\n ON m.category_id = f.category_id\n WHERE m.category_publish = 1\n ORDER BY ordering";
$db->setQuery($query);
$menuItems = $db->loadObjectList();
$children = array();
if ($menuItems) {
foreach ($menuItems as $v) {
$pt = $v->parent_id;
$list = isset($children[$pt]) ? $children[$pt] : array();
array_push($list, $v);
$children[$pt] = $list;
}
}
jimport('joomla.html.html.menu');
$options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
$this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
$optgroup = $this->_xml->addChild('optgroup', '');
$optgroup->addAttribute('label', 'Categories');
if (count($options)) {
foreach ($options as $option) {
$optgroup->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
}
}
$this->_value = $this->_form->get($this->_name, $this->_default);
$html = parent::fetchElement();
return $html;
}
示例9: edit
function edit()
{
$jshopConfig = JSFactory::getConfig();
$shipping_id = JRequest::getInt("shipping_id");
$shipping = JSFactory::getTable('shippingMethod', 'jshop');
$shipping->load($shipping_id);
$edit = $shipping_id ? $edit = 1 : ($edit = 0);
$_lang = JSFactory::getModel("languages");
$languages = $_lang->getAllLanguages(1);
$multilang = count($languages) > 1;
$params = $shipping->getParams();
$_payments = JSFactory::getModel("payments");
$list_payments = $_payments->getAllPaymentMethods(0);
$active_payments = $shipping->getPayments();
if (!count($active_payments)) {
$active_payments = array(0);
}
$first = array();
$first[] = JHTML::_('select.option', '0', _JSHOP_ALL, 'id', 'name');
$lists['payments'] = JHTML::_('select.genericlist', array_merge($first, $list_payments), 'listpayments[]', 'class="inputbox" size="10" multiple = "multiple"', 'payment_id', 'name', $active_payments);
$nofilter = array();
JFilterOutput::objectHTMLSafe($shipping, ENT_QUOTES, $nofilter);
$view = $this->getView("shippings", 'html');
$view->setLayout("edit");
$view->assign('shipping', $shipping);
$view->assign('params', $params);
$view->assign('edit', $edit);
$view->assign('languages', $languages);
$view->assign('multilang', $multilang);
$view->assign('lists', $lists);
$view->assign('config', $jshopConfig);
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeEditShippings', array(&$view));
$view->displayEdit();
}
示例10: 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>';
}
示例11: display
function display($cachable = false, $urlparams = false)
{
$jshopConfig = JSFactory::getConfig();
$position = JRequest::getInt('position');
$filter = JRequest::getVar('filter');
$path_length = strlen($jshopConfig->image_product_path) + 1;
$html = "<div class='images_list_search'><input type='text' id='filter_product_image_name' value='" . $filter . "'> <input type='button' value='" . _JSHOP_SEARCH . "' onclick='product_images_request(" . $position . ", \"index.php?option=com_jshopping&controller=product_images&task=display\", jQuery(\"#filter_product_image_name\").val())'></div>";
$html .= '<div class="images_list">';
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($jshopConfig->image_product_path), RecursiveIteratorIterator::SELF_FIRST) as $v) {
$filename = substr($v, $path_length);
if ($filter != '' && !substr_count($filename, $filter)) {
continue;
}
if (file_exists($jshopConfig->image_product_path . '/' . 'thumb_' . $filename)) {
$html .= '<div class="one_image">';
$html .= '<table>';
$html .= '<tr><td align="center" valign="middle"><div>';
$html .= $this->_getLinkForImage('<img alt="" title="' . $filename . '" src="' . $jshopConfig->image_product_live_path . '/thumb_' . $filename . '"/>', $filename);
$html .= '</div></td></tr>';
$html .= '<tr><td valign="bottom" align="center"><div>';
$html .= $this->_getLinkForImage($filename, $filename);
$html .= '</div></td></tr>';
$html .= '</table>';
$html .= '</div>';
}
}
$html .= '<div style="clear: both"></div>';
$html .= '</div>';
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeDisplayProductsImagesHTML', array(&$html));
echo $html;
die;
}
示例12: showEndForm
function showEndForm($pmconfigs, $order)
{
$mainframe =& JFactory::getApplication();
$jshopConfig =& JSFactory::getConfig();
$item_name = sprintf(_JSHOP_PAYMENT_NUMBER, $order->order_number);
$notify_url = JURI::root() . "index.php?option=com_jshopping&controller=checkout&task=step7&act=notify&js_paymentclass=pm_ideal&no_lang=1";
$return = JURI::root() . "index.php?option=com_jshopping&controller=checkout&task=step7&act=return&js_paymentclass=pm_ideal";
$cancel_return = JURI::root() . "index.php?option=com_jshopping&controller=checkout&task=step7&act=cancel&js_paymentclass=pm_ideal";
$params_data = $order->getPaymentParamsData();
$bank_id = $params_data['bank_id'];
$amount = intval($order->order_total * 100);
$iDEAL = new iDEAL_Payment($pmconfigs['partnerid']);
if ($pmconfigs['testmode']) {
$iDEAL->setTestMode();
}
if ($iDEAL->createPayment($bank_id, $amount, $item_name, $return, $notify_url)) {
$order1 =& JTable::getInstance('order', 'jshop');
$order1->load($order->order_id);
$order1->transaction = $iDEAL->getTransactionId();
$order1->store();
header("Location: " . $iDEAL->getBankURL());
exit;
} else {
saveToLog("payment.log", "Error: Order ID " . $order->order_id . ". CODE: " . $iDEAL->getErrorCode() . ". MSG: " . $iDEAL->getErrorMessage());
JError::raiseWarning("", $iDEAL->getErrorMessage());
$mainframe->redirect(SEFLink('index.php?option=com_jshopping&controller=checkout&task=step5', 0, 1, $jshopConfig->use_ssl));
exit;
}
}
示例13: display
function display($cachable = false, $urlparams = false)
{
$jshopConfig = JSFactory::getConfig();
$mainframe = JFactory::getApplication();
$context = "jshoping.list.admin.currencies";
$filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', "currency_ordering", 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', "asc", 'cmd');
$current_currency = JTable::getInstance('currency', 'jshop');
$current_currency->load($jshopConfig->mainCurrency);
if ($current_currency->currency_value != 1) {
JError::raiseWarning("", _JSHOP_ERROR_MAIN_CURRENCY_VALUE);
}
$currencies = $this->getModel("currencies");
$rows = $currencies->getAllCurrencies(0, $filter_order, $filter_order_Dir);
$view = $this->getView("currencies", 'html');
$view->setLayout("list");
$view->assign('rows', $rows);
$view->assign('config', $jshopConfig);
$view->assign('filter_order', $filter_order);
$view->assign('filter_order_Dir', $filter_order_Dir);
JPluginHelper::importPlugin('jshoppingadmin');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeDisplayCourencies', array(&$view));
$view->displayList();
}
示例14: addTitleHead
function addTitleHead()
{
$jshopConfig = JSFactory::getConfig();
$vendorinfo = $this->_vendorinfo;
$this->Image($jshopConfig->path . 'images/header.jpg', 1, 1, $jshopConfig->pdf_header_width, $jshopConfig->pdf_header_height);
# $this->Image($jshopConfig->path.'images/footer.jpg',1,265,$jshopConfig->pdf_footer_width,$jshopConfig->pdf_footer_height);
}
示例15: getProductFieldSorting
function getProductFieldSorting($order)
{
if ($order == 4) {
$order = 1;
}
return JSFactory::getConfig()->sorting_products_field_s_select[$order];
}