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


PHP setMetaData函数代码示例

本文整理汇总了PHP中setMetaData函数的典型用法代码示例。如果您正苦于以下问题:PHP setMetaData函数的具体用法?PHP setMetaData怎么用?PHP setMetaData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: setUpRestIOA

 function setUpRestIOA()
 {
     /**
      * Setup Header Data
      */
     $header_data = "W1t7Im5hbWUiOiJUYWdsaW5lPGEgaHJlZj1cXFwiXFxcIiBjbGFzcz1cXFwiaGNvbi1lZGl0IGVudHlwbyBwZW5jaWxcXFwiPjxcL2E+IiwidmFsdWUiOiJ0YWdsaW5lIiwiYWxpZ24iOiJkZWZhdWx0IiwibWFyZ2luIjoiMDowOjA6MCJ9XSxbeyJjb250YWluZXIiOiJ0b3AtYXJlYSIsImV5ZSI6Im9uIiwicG9zaXRpb24iOiJzdGF0aWMiLCJoZWlnaHQiOiIwIiwiZGF0YSI6W3siYWxpZ24iOiJsZWZ0IiwiZWxlbWVudHMiOlt7InZhbCI6IndwbWwiLCJhbGlnbiI6ImRlZmF1bHQiLCJ0ZXh0IjoiIiwibWFyZ2luIjoiMDowOjA6MCIsIm5hbWUiOiJXUE1MIFNlbGVjdG9yIn0seyJ2YWwiOiJzb2NpYWwiLCJhbGlnbiI6ImRlZmF1bHQiLCJ0ZXh0IjoidHdpdHRlcjx2Yz5odHRwczpcL1wvdHdpdHRlci5jb21cL2FydGlsbGVnZW5jZTxzYz5mYWNlYm9vazx2Yz5odHRwczpcL1wvd3d3LmZhY2Vib29rLmNvbVwvYXJ0aWxsZWdlbmNlPHNjPmZsaWNrcjx2Yz5odHRwOlwvXC9mbGlja3IuY29tXC88c2M+dmltZW88dmM+aHR0cHM6XC9cL3ZpbWVvLmNvbVwvdXNlcjIwMDIyMDg5PHNjPnBpbnRlcmVzdDx2Yz5odHRwczpcL1wvcGludGVyZXN0LmNvbVwvPHNjPmRyaWJiYmxlPHZjPmh0dHA6XC9cL2RyaWJiYmxlLmNvbVwvYXJ0aWxsZWdlbmNlPHNjPnNreXBlPHZjPmNhbGw6YWJoaW4uc2hhcm1hPHNjPiIsIm1hcmdpbiI6IjA6MDowOjAiLCJuYW1lIjoiU29jaWFsIEljb25zIn0seyJ2YWwiOiJ0ZXh0IiwiYWxpZ24iOiJkZWZhdWx0IiwidGV4dCI6IkhlbHBsaW5lICsxIDM0MzMzMzMzMyIsIm1hcmdpbiI6IjEwOjA6MDoxNyIsIm5hbWUiOiJUZXh0ICJ9XX0seyJhbGlnbiI6ImNlbnRlciJ9LHsiYWxpZ24iOiJyaWdodCIsImVsZW1lbnRzIjpbeyJ2YWwiOiJ0b3AtbWVudSIsImFsaWduIjoiZGVmYXVsdCIsInRleHQiOiIwIiwibWFyZ2luIjoiMDowOjA6MCIsIm5hbWUiOiJNZW51IDIifV19XX0seyJjb250YWluZXIiOiJtZW51LWFyZWEiLCJleWUiOiJvbiIsInBvc2l0aW9uIjoic3RhdGljIiwiaGVpZ2h0IjoiMCIsImRhdGEiOlt7ImFsaWduIjoibGVmdCIsImVsZW1lbnRzIjpbeyJ2YWwiOiJsb2dvIiwiYWxpZ24iOiJkZWZhdWx0IiwidGV4dCI6IjAiLCJtYXJnaW4iOiIwOjA6MDowIiwibmFtZSI6IkxvZ28ifV19LHsiYWxpZ24iOiJjZW50ZXIifSx7ImFsaWduIjoicmlnaHQiLCJlbGVtZW50cyI6W3sidmFsIjoic2VhcmNoIiwiYWxpZ24iOiJkZWZhdWx0IiwidGV4dCI6IjAiLCJtYXJnaW4iOiI2OjA6MDowIiwibmFtZSI6IlNlYXJjaCBCYXIifSx7InZhbCI6Im1haW4tbWVudSIsImFsaWduIjoiZGVmYXVsdCIsInRleHQiOiIwIiwibWFyZ2luIjoiMDowOjA6MCIsIm5hbWUiOiJNZW51IDEifV19XX0seyJjb250YWluZXIiOiJ0b3AtZnVsbC1hcmVhIiwiZXllIjoib2ZmIiwicG9zaXRpb24iOiJzdGF0aWMiLCJoZWlnaHQiOiIiLCJkYXRhIjpbeyJhbGlnbiI6ImxlZnQifSx7ImFsaWduIjoiY2VudGVyIn0seyJhbGlnbiI6InJpZ2h0In1dfV1d";
     $header_data = base64_decode($header_data);
     $header_data = json_decode($header_data, true);
     update_option(SN . '_header_construction_data', $header_data);
     update_option(SN . 'font_selector', 'google');
     update_option(SN . 'font_stacks', array('Raleway;;'));
     $images = get_option('ioa_demo_images');
     setMenus();
     setMetaData();
     setWidgets();
     setShopData();
     $page = get_page_by_title('Home');
     update_option('page_on_front', $page->ID);
     update_option('show_on_front', 'page');
     if (function_exists('rev_slider_shortcode')) {
         require_once HPATH . "/installer/rev_import_class.php";
         $c = new CustomREVInstaller();
         $c->importREVSliderFromPost(HPATH . '/installer/slider_export.txt');
         $c->importREVSliderFromPost(HPATH . '/installer/slider_export_1.txt');
         $c->importREVSliderFromPost(HPATH . '/installer/slider_export_2.txt');
     }
 }
开发者ID:severnrescue,项目名称:web,代码行数:27,代码来源:installer.php

示例2: view

 function view()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     $session = JFactory::getSession();
     $params = $mainframe->getParams();
     $ajax = JRequest::getInt('ajax');
     $cart = JModelLegacy::getInstance('cart', 'jshop');
     $cart->load("wishlist");
     $cart->addLinkToProducts(1, "wishlist");
     $cart->setDisplayFreeAttributes();
     $seo = JTable::getInstance("seo", "jshop");
     $seodata = $seo->loadData("wishlist");
     if (getThisURLMainPageShop()) {
         $document = JFactory::getDocument();
         appendPathWay(_JSHOP_WISHLIST);
         if ($seodata->title == "") {
             $seodata->title = _JSHOP_WISHLIST;
         }
         setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     } else {
         setMetaData($seodata->title, $seodata->keyword, $seodata->description, $params);
     }
     $shopurl = SEFLink('index.php?option=com_jshopping&controller=category', 1);
     if ($jshopConfig->cart_back_to_shop == "product") {
         $endpagebuyproduct = xhtmlUrl($session->get('jshop_end_page_buy_product'));
     } elseif ($jshopConfig->cart_back_to_shop == "list") {
         $endpagebuyproduct = xhtmlUrl($session->get('jshop_end_page_list_product'));
     }
     if (isset($endpagebuyproduct) && $endpagebuyproduct) {
         $shopurl = $endpagebuyproduct;
     }
     JPluginHelper::importPlugin('jshoppingcheckout');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayWishlist', array(&$cart));
     $view_name = "cart";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("wishlist");
     $view->assign('config', $jshopConfig);
     $view->assign('products', $cart->products);
     $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;
     }
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:53,代码来源:wishlist.php

示例3: view

 function view()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     JPluginHelper::importPlugin('jshopping');
     JPluginHelper::importPlugin('content');
     $dispatcher = JDispatcher::getInstance();
     $page = JRequest::getVar('page');
     switch ($page) {
         case 'agb':
             $pathway = _JSHOP_AGB;
             break;
         case 'return_policy':
             $pathway = _JSHOP_RETURN_POLICY;
             break;
         case 'shipping':
             $pathway = _JSHOP_SHIPPING;
             break;
         case 'privacy_statement':
             $pathway = _JSHOP_PRIVACY_STATEMENT;
             break;
     }
     appendPathWay($pathway);
     $seo = JTable::getInstance("seo", "jshop");
     $seodata = $seo->loadData("content-" . $page);
     if ($seodata->title == "") {
         $seodata->title = $pathway;
     }
     setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     $statictext = JTable::getInstance("statictext", "jshop");
     $row = $statictext->loadData($page);
     if (!$row->id) {
         JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
         return;
     }
     if ($jshopConfig->use_plugin_content) {
         $obj = new stdClass();
         $params = $mainframe->getParams('com_content');
         $obj->text = $row->text;
         $obj->title = $seodata->title;
         $dispatcher->trigger('onContentPrepare', array('com_content.article', &$obj, &$params, 0));
         $row->text = $obj->text;
     }
     $text = $row->text;
     $dispatcher->trigger('onBeforeDisplayContent', array($page, &$text));
     echo $text;
 }
开发者ID:Tommar,项目名称:vino2,代码行数:48,代码来源:content.php

示例4: groupsinfo

 function groupsinfo()
 {
     $jshopConfig = JSFactory::getConfig();
     setMetaData(_JSHOP_USER_GROUPS_INFO, "", "");
     $group = JTable::getInstance('userGroup', 'jshop');
     $list = $group->getList();
     JPluginHelper::importPlugin('jshoppingcheckout');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayGroupsInfo', array());
     $view_name = "user";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("groupsinfo");
     $view->assign('rows', $list);
     $dispatcher->trigger('onBeforeDisplayGroupsInfoView', array(&$view));
     $view->display();
 }
开发者ID:Tommar,项目名称:vino2,代码行数:17,代码来源:user.php

示例5: step5

 function step5()
 {
     $checkout = JModelLegacy::getInstance('checkout', 'jshop');
     $checkout->checkStep(5);
     JPluginHelper::importPlugin('jshoppingcheckout');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onLoadCheckoutStep5', array());
     appendPathWay(_JSHOP_CHECKOUT_PREVIEW);
     $seo = JTable::getInstance("seo", "jshop");
     $seodata = $seo->loadData("checkout-preview");
     if ($seodata->title == "") {
         $seodata->title = _JSHOP_CHECKOUT_PREVIEW;
     }
     setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     $cart = JModelLegacy::getInstance('cart', 'jshop');
     $cart->load();
     $session = JFactory::getSession();
     $jshopConfig = JSFactory::getConfig();
     $user = JFactory::getUser();
     if ($user->id) {
         $adv_user = JSFactory::getUserShop();
     } else {
         $adv_user = JSFactory::getUserShopGuest();
     }
     $sh_method = JTable::getInstance('shippingMethod', 'jshop');
     $shipping_method_id = $cart->getShippingId();
     $sh_method->load($shipping_method_id);
     $sh_mt_pr = JTable::getInstance('shippingMethodPrice', 'jshop');
     $sh_mt_pr->load($cart->getShippingPrId());
     if ($jshopConfig->show_delivery_time_checkout) {
         $deliverytimes = JSFactory::getAllDeliveryTime();
         $deliverytimes[0] = '';
         $delivery_time = $deliverytimes[$sh_mt_pr->delivery_times_id];
         if (!$delivery_time && $jshopConfig->delivery_order_depends_delivery_product) {
             $delivery_time = $cart->getDelivery();
         }
     } else {
         $delivery_time = '';
     }
     if ($jshopConfig->show_delivery_date) {
         $delivery_date = $cart->getDeliveryDate();
         if ($delivery_date) {
             $delivery_date = formatdate($cart->getDeliveryDate());
         }
     } else {
         $delivery_date = '';
     }
     $pm_method = JTable::getInstance('paymentMethod', 'jshop');
     $payment_method_id = $cart->getPaymentId();
     $pm_method->load($payment_method_id);
     $lang = JSFactory::getLang();
     $field_country_name = $lang->get("name");
     $invoice_info = array();
     $country = JTable::getInstance('country', 'jshop');
     $country->load($adv_user->country);
     $invoice_info['f_name'] = $adv_user->f_name;
     $invoice_info['l_name'] = $adv_user->l_name;
     $invoice_info['firma_name'] = $adv_user->firma_name;
     $invoice_info['street'] = $adv_user->street;
     $invoice_info['zip'] = $adv_user->zip;
     $invoice_info['state'] = $adv_user->state;
     $invoice_info['city'] = $adv_user->city;
     $invoice_info['country'] = $country->{$field_country_name};
     $invoice_info['home'] = $adv_user->home;
     $invoice_info['apartment'] = $adv_user->apartment;
     if ($adv_user->delivery_adress) {
         $country = JTable::getInstance('country', 'jshop');
         $country->load($adv_user->d_country);
         $delivery_info['f_name'] = $adv_user->d_f_name;
         $delivery_info['l_name'] = $adv_user->d_l_name;
         $delivery_info['firma_name'] = $adv_user->d_firma_name;
         $delivery_info['street'] = $adv_user->d_street;
         $delivery_info['zip'] = $adv_user->d_zip;
         $delivery_info['state'] = $adv_user->d_state;
         $delivery_info['city'] = $adv_user->d_city;
         $delivery_info['country'] = $country->{$field_country_name};
         $delivery_info['home'] = $adv_user->d_home;
         $delivery_info['apartment'] = $adv_user->d_apartment;
     } else {
         $delivery_info = $invoice_info;
     }
     $tmp_fields = $jshopConfig->getListFieldsRegister();
     $config_fields = $tmp_fields['address'];
     $count_filed_delivery = $jshopConfig->getEnableDeliveryFiledRegistration('address');
     $checkout_navigator = $this->_showCheckoutNavigation(5);
     $small_cart = $this->_showSmallCart(5);
     $view_name = "checkout";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("previewfinish");
     $dispatcher->trigger('onBeforeDisplayCheckoutStep5', array(&$sh_method, &$pm_method, &$delivery_info, &$cart, &$view));
     $lang = JSFactory::getLang();
     $name = $lang->get("name");
     $sh_method->name = $sh_method->{$name};
     $view->assign('sh_method', $sh_method);
     $view->assign('payment_name', $pm_method->{$name});
     $view->assign('delivery_info', $delivery_info);
     $view->assign('invoice_info', $invoice_info);
     $view->assign('action', SEFLink('index.php?option=com_jshopping&controller=checkout&task=step5save', 0, 0, $jshopConfig->use_ssl));
     $view->assign('config', $jshopConfig);
//.........这里部分代码省略.........
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:101,代码来源:checkout.php

示例6: products

 function products()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $session = JFactory::getSession();
     $session->set("jshop_end_page_buy_product", $_SERVER['REQUEST_URI']);
     $session->set("jshop_end_page_list_product", $_SERVER['REQUEST_URI']);
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $vendor_id = JRequest::getInt("vendor_id");
     $vendor = JSFactory::getTable('vendor', 'jshop');
     $vendor->load($vendor_id);
     $dispatcher->trigger('onBeforeDisplayVendor', array(&$vendor));
     appendPathWay($vendor->shop_name);
     $seo = JSFactory::getTable("seo", "jshop");
     $seodata = $seo->loadData("vendor-product-" . $vendor_id);
     if (!isset($seodata->title) || $seodata->title == "") {
         $seodata = new stdClass();
         $seodata->title = $vendor->shop_name;
         $seodata->keyword = $vendor->shop_name;
         $seodata->description = $vendor->shop_name;
     }
     setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     $action = xhtmlUrl($_SERVER['REQUEST_URI']);
     $products_page = $jshopConfig->count_products_to_page;
     $count_product_to_row = $jshopConfig->count_products_to_row;
     $context = "jshoping.vendor.front.product";
     $contextfilter = "jshoping.list.front.product.vendor." . $vendor_id;
     $orderby = $mainframe->getUserStateFromRequest($context . 'orderby', 'orderby', $jshopConfig->product_sorting_direction, 'int');
     $order = $mainframe->getUserStateFromRequest($context . 'order', 'order', $jshopConfig->product_sorting, 'int');
     $limit = $mainframe->getUserStateFromRequest($context . 'limit', 'limit', $products_page, 'int');
     if (!$limit) {
         $limit = $products_page;
     }
     $limitstart = JRequest::getInt('limitstart');
     if ($order == 4) {
         $order = 1;
     }
     $orderbyq = getQuerySortDirection($order, $orderby);
     $image_sort_dir = getImgSortDirection($order, $orderby);
     $field_order = $jshopConfig->sorting_products_field_s_select[$order];
     $filters = getBuildFilterListProduct($contextfilter, array("vendors"));
     $total = $vendor->getCountProducts($filters);
     jimport('joomla.html.pagination');
     $pagination = new JPagination($total, $limitstart, $limit);
     $pagenav = $pagination->getPagesLinks();
     $dispatcher->trigger('onBeforeFixLimitstartDisplayProductList', array(&$limitstart, &$total, 'vendor'));
     if ($limitstart >= $total) {
         $limitstart = 0;
     }
     $rows = $vendor->getProducts($filters, $field_order, $orderbyq, $limitstart, $limit);
     addLinkToProducts($rows, 0, 1);
     foreach ($jshopConfig->sorting_products_name_s_select as $key => $value) {
         $sorts[] = JHTML::_('select.option', $key, $value, 'sort_id', 'sort_value');
     }
     insertValueInArray($products_page, $jshopConfig->count_product_select);
     foreach ($jshopConfig->count_product_select as $key => $value) {
         $product_count[] = JHTML::_('select.option', $key, $value, 'count_id', 'count_value');
     }
     $sorting_sel = JHTML::_('select.genericlist', $sorts, 'order', 'class = "inputbox" size = "1" onchange = "submitListProductFilters()"', 'sort_id', 'sort_value', $order);
     $product_count_sel = JHTML::_('select.genericlist', $product_count, 'limit', 'class = "inputbox" size = "1" onchange = "submitListProductFilters()"', 'count_id', 'count_value', $limit);
     $_review = JSFactory::getTable('review', 'jshop');
     $allow_review = $_review->getAllowReview();
     if ($jshopConfig->show_product_list_filters) {
         $first_el = JHTML::_('select.option', 0, _JSHOP_ALL, 'manufacturer_id', 'name');
         $_manufacturers = JSFactory::getTable('manufacturer', 'jshop');
         $listmanufacturers = $_manufacturers->getList();
         array_unshift($listmanufacturers, $first_el);
         if (isset($filters['manufacturers'][0])) {
             $active_manufacturer = $filters['manufacturers'][0];
         } else {
             $active_manufacturer = '';
         }
         $manufacuturers_sel = JHTML::_('select.genericlist', $listmanufacturers, 'manufacturers[]', 'class = "inputbox" onchange = "submitListProductFilters()"', 'manufacturer_id', 'name', $active_manufacturer);
         $first_el = JHTML::_('select.option', 0, _JSHOP_ALL, 'category_id', 'name');
         $categories = buildTreeCategory(1);
         array_unshift($categories, $first_el);
         if (isset($filters['categorys'][0])) {
             $active_category = $filters['categorys'][0];
         } else {
             $active_category = 0;
         }
         $categorys_sel = JHTML::_('select.genericlist', $categories, 'categorys[]', 'class = "inputbox" onchange = "submitListProductFilters()"', 'category_id', 'name', $active_category);
     } else {
         $categorys_sel = null;
         $manufacuturers_sel = null;
     }
     $willBeUseFilter = willBeUseFilter($filters);
     $display_list_products = count($rows) > 0 || $willBeUseFilter;
     $dispatcher->trigger('onBeforeDisplayProductList', array(&$rows));
     $view_name = "vendor";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("products");
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', "list_products/list_products.php");
     $view->assign('template_no_list_product', "list_products/no_products.php");
     $view->assign('template_block_form_filter', "list_products/form_filters.php");
     $view->assign('template_block_pagination', "list_products/block_pagination.php");
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
//.........这里部分代码省略.........
开发者ID:olegverstka,项目名称:monax.dev,代码行数:101,代码来源:vendor.php

示例7: view

 function view()
 {
     $jshopConfig = JSFactory::getConfig();
     if ($jshopConfig->user_as_catalog) {
         return 0;
     }
     $db = JFactory::getDBO();
     $session = JFactory::getSession();
     $mainframe = JFactory::getApplication();
     $params = $mainframe->getParams();
     $ajax = JRequest::getInt('ajax');
     $cart = JSFactory::getModel('cart', 'jshop');
     $cart->load();
     $cart->addLinkToProducts(1);
     $cart->setDisplayFreeAttributes();
     $seo = JSFactory::getTable("seo", "jshop");
     $seodata = $seo->loadData("cart");
     if (getThisURLMainPageShop()) {
         $document = JFactory::getDocument();
         appendPathWay(_JSHOP_CART);
         if ($seodata->title == "") {
             $seodata->title = _JSHOP_CART;
         }
         setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     } else {
         setMetaData($seodata->title, $seodata->keyword, $seodata->description, $params);
     }
     $shopurl = SEFLink('index.php?option=com_jshopping&controller=category', 1);
     if ($jshopConfig->cart_back_to_shop == "product") {
         $endpagebuyproduct = xhtmlUrl($session->get('jshop_end_page_buy_product'));
     } elseif ($jshopConfig->cart_back_to_shop == "list") {
         $endpagebuyproduct = xhtmlUrl($session->get('jshop_end_page_list_product'));
     }
     if ($endpagebuyproduct) {
         $shopurl = $endpagebuyproduct;
     }
     $statictext = JSFactory::getTable("statictext", "jshop");
     $tmp = $statictext->loadData("cart");
     $cartdescr = $tmp->text;
     $weight_product = $cart->getWeightProducts();
     if ($weight_product == 0 && $jshopConfig->hide_weight_in_cart_weight0) {
         $jshopConfig->show_weight_order = 0;
     }
     if ($jshopConfig->shop_user_guest == 1) {
         $href_checkout = SEFLink('index.php?option=com_jshopping&controller=checkout&task=step2&check_login=1', 1, 0, $jshopConfig->use_ssl);
     } else {
         $href_checkout = SEFLink('index.php?option=com_jshopping&controller=checkout&task=step2', 1, 0, $jshopConfig->use_ssl);
     }
     $tax_list = $cart->getTaxExt(0, 1);
     $show_percent_tax = 0;
     if (count($tax_list) > 1 || $jshopConfig->show_tax_in_product) {
         $show_percent_tax = 1;
     }
     if ($jshopConfig->hide_tax) {
         $show_percent_tax = 0;
     }
     $hide_subtotal = 0;
     if (($jshopConfig->hide_tax || count($tax_list) == 0) && !$cart->rabatt_summ) {
         $hide_subtotal = 1;
     }
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayCart', array(&$cart));
     $view_name = "cart";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("cart");
     $view->assign('config', $jshopConfig);
     $view->assign('products', $cart->products);
     $view->assign('summ', $cart->getPriceProducts());
     $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', $href_checkout);
     $view->assign('discount', $cart->getDiscountShow());
     $view->assign('free_discount', $cart->getFreeDiscount());
     $view->assign('use_rabatt', $jshopConfig->use_rabatt_code);
     $view->assign('tax_list', $cart->getTaxExt(0, 1));
     $view->assign('fullsumm', $cart->getSum(0, 1));
     $view->assign('show_percent_tax', $show_percent_tax);
     $view->assign('hide_subtotal', $hide_subtotal);
     $view->assign('weight', $weight_product);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $view->assign('cartdescr', $cartdescr);
     $dispatcher->trigger('onBeforeDisplayCartView', array(&$view));
     $view->display();
     if ($ajax) {
         die;
     }
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:90,代码来源:cart.php

示例8: view

 function view()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     $dispatcher = JDispatcher::getInstance();
     $page = JRequest::getVar('page');
     switch ($page) {
         case 'agb':
             $pathway = _JSHOP_AGB;
             break;
         case 'return_policy':
             $pathway = _JSHOP_RETURN_POLICY;
             break;
         case 'shipping':
             $pathway = _JSHOP_SHIPPING;
             break;
         case 'privacy_statement':
             $pathway = _JSHOP_PRIVACY_STATEMENT;
             break;
     }
     appendPathWay($pathway);
     $seo = JSFactory::getTable("seo", "jshop");
     $seodata = $seo->loadData("content-" . $page);
     if ($seodata->title == "") {
         $seodata->title = $pathway;
     }
     setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     $statictext = JSFactory::getTable("statictext", "jshop");
     $order_id = JRequest::getInt('order_id');
     $cartp = JRequest::getInt('cart');
     if ($jshopConfig->return_policy_for_product && $page == 'return_policy' && ($cartp || $order_id)) {
         if ($cartp) {
             $cart = JSFactory::getModel('cart', 'jshop');
             $cart->load();
             $list = $cart->getReturnPolicy();
         } else {
             $order = JSFactory::getTable('order', 'jshop');
             $order->load($order_id);
             $list = $order->getReturnPolicy();
         }
         $listtext = array();
         foreach ($list as $v) {
             $listtext[] = $v->text;
         }
         $row = new stdClass();
         $row->id = -1;
         $row->text = implode('<div class="return_policy_space"></div>', $listtext);
     } else {
         $row = $statictext->loadData($page);
     }
     if (!$row->id) {
         JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
         return;
     }
     if ($jshopConfig->use_plugin_content) {
         $obj = new stdClass();
         $params = $mainframe->getParams('com_content');
         $obj->text = $row->text;
         $obj->title = $seodata->title;
         $dispatcher->trigger('onContentPrepare', array('com_content.article', &$obj, &$params, 0));
         $row->text = $obj->text;
     }
     $text = $row->text;
     $dispatcher->trigger('onBeforeDisplayContent', array($page, &$text));
     $view_name = "content";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("content");
     $view->assign('text', $text);
     $dispatcher->trigger('onBeforeDisplayContentView', array(&$view));
     $view->display();
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:73,代码来源:content.php

示例9: result

 function result()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     $lang = JSFactory::getLang();
     $user = JFactory::getUser();
     $session = JFactory::getSession();
     $session->set("jshop_end_page_buy_product", $_SERVER['REQUEST_URI']);
     $session->set("jshop_end_page_list_product", $_SERVER['REQUEST_URI']);
     $params = $mainframe->getParams();
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $product = JSFactory::getTable('product', 'jshop');
     $seo = JSFactory::getTable("seo", "jshop");
     $seodata = $seo->loadData("search-result");
     if (getThisURLMainPageShop()) {
         appendPathWay(_JSHOP_SEARCH);
         if ($seodata->title == "") {
             $seodata->title = _JSHOP_SEARCH;
         }
         setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     } else {
         setMetaData($seodata->title, $seodata->keyword, $seodata->description, $params);
     }
     $post = JRequest::get('request');
     if (isset($post['setsearchdata']) && $post['setsearchdata'] == 1) {
         $session->set("jshop_end_form_data", $post);
     } else {
         $data = $session->get("jshop_end_form_data");
         if (count($data)) {
             $post = $data;
         }
     }
     $category_id = intval($post['category_id']);
     $manufacturer_id = intval($post['manufacturer_id']);
     if (isset($post['date_to'])) {
         $date_to = $post['date_to'];
     } else {
         $date_to = null;
     }
     if (isset($post['date_from'])) {
         $date_from = $post['date_from'];
     } else {
         $date_from = null;
     }
     if (isset($post['price_to'])) {
         $price_to = saveAsPrice($post['price_to']);
     } else {
         $price_to = null;
     }
     if (isset($post['price_from'])) {
         $price_from = saveAsPrice($post['price_from']);
     } else {
         $price_from = null;
     }
     if (isset($post['include_subcat'])) {
         $include_subcat = intval($post['include_subcat']);
     } else {
         $include_subcat = 0;
     }
     $search = trim($post['search']);
     $search_type = $post['search_type'];
     if (!$search_type) {
         $search_type = "any";
     }
     $context = "jshoping.searclist.front.product";
     $orderby = $mainframe->getUserStateFromRequest($context . 'orderby', 'orderby', $jshopConfig->product_sorting_direction, 'int');
     $order = $mainframe->getUserStateFromRequest($context . 'order', 'order', $jshopConfig->product_sorting, 'int');
     $limit = $mainframe->getUserStateFromRequest($context . 'limit', 'limit', $jshopConfig->count_products_to_page, 'int');
     if (!$limit) {
         $limit = $jshopConfig->count_products_to_page;
     }
     $limitstart = JRequest::getInt('limitstart', 0);
     if ($order == 4) {
         $order = 1;
     }
     if ($jshopConfig->admin_show_product_extra_field) {
         if (isset($post['extra_fields'])) {
             $extra_fields = $post['extra_fields'];
         } else {
             $extra_fields = array();
         }
         $extra_fields = filterAllowValue($extra_fields, "array_int_k_v+");
     }
     $categorys = array();
     if ($category_id) {
         if ($include_subcat) {
             $_category = JSFactory::getTable('category', 'jshop');
             $all_categories = $_category->getAllCategories();
             $cat_search[] = $category_id;
             searchChildCategories($category_id, $all_categories, $cat_search);
             foreach ($cat_search as $key => $value) {
                 $categorys[] = $value;
             }
         } else {
             $categorys[] = $category_id;
         }
     }
     $orderbyq = getQuerySortDirection($order, $orderby);
//.........这里部分代码省略.........
开发者ID:olegverstka,项目名称:monax.dev,代码行数:101,代码来源:search.php

示例10: view

 function view()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $session = JFactory::getSession();
     $session->set("jshop_end_page_buy_product", $_SERVER['REQUEST_URI']);
     $session->set("jshop_end_page_list_product", $_SERVER['REQUEST_URI']);
     JPluginHelper::importPlugin('jshoppingproducts');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $manufacturer_id = JRequest::getInt('manufacturer_id');
     $category_id = JRequest::getInt('category_id');
     $label_id = JRequest::getInt('label_id');
     $vendor_id = JRequest::getInt('vendor_id');
     $manufacturer = JTable::getInstance('manufacturer', 'jshop');
     $manufacturer->load($manufacturer_id);
     $manufacturer->getDescription();
     JPluginHelper::importPlugin('jshopping');
     $dispatcher->trigger('onBeforeDisplayManufacturer', array(&$manufacturer));
     if ($manufacturer->manufacturer_publish == 0) {
         JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
         return;
     }
     if (getShopManufacturerPageItemid() == JRequest::getInt('Itemid')) {
         appendPathWay($manufacturer->name);
     }
     if ($manufacturer->meta_title == "") {
         $manufacturer->meta_title = $manufacturer->name;
     }
     setMetaData($manufacturer->meta_title, $manufacturer->meta_keyword, $manufacturer->meta_description);
     $action = xhtmlUrl($_SERVER['REQUEST_URI']);
     if (!$manufacturer->products_page) {
         $manufacturer->products_page = $jshopConfig->count_products_to_page;
     }
     $count_product_to_row = $manufacturer->products_row;
     if (!$count_product_to_row) {
         $count_product_to_row = $jshopConfig->count_products_to_row;
     }
     $context = "jshoping.manufacturlist.front.product";
     $contextfilter = "jshoping.list.front.product.manf." . $manufacturer_id;
     $orderby = $mainframe->getUserStateFromRequest($context . 'orderby', 'orderby', $jshopConfig->product_sorting_direction, 'int');
     $order = $mainframe->getUserStateFromRequest($context . 'order', 'order', $jshopConfig->product_sorting, 'int');
     $limit = $mainframe->getUserStateFromRequest($context . 'limit', 'limit', $manufacturer->products_page, 'int');
     if (!$limit) {
         $limit = $manufacturer->products_page;
     }
     $limitstart = JRequest::getInt('limitstart');
     $orderbyq = getQuerySortDirection($order, $orderby);
     $image_sort_dir = getImgSortDirection($order, $orderby);
     $field_order = $jshopConfig->sorting_products_field_s_select[$order];
     $filters = getBuildFilterListProduct($contextfilter, array("manufacturers"));
     $total = $manufacturer->getCountProducts($filters);
     jimport('joomla.html.pagination');
     $pagination = new JPagination($total, $limitstart, $limit);
     $pagenav = $pagination->getPagesLinks();
     $dispatcher->trigger('onBeforeFixLimitstartDisplayProductList', array(&$limitstart, &$total, 'manufacturer'));
     if ($limitstart >= $total) {
         $limitstart = 0;
     }
     $rows = $manufacturer->getProducts($filters, $field_order, $orderbyq, $limitstart, $limit);
     addLinkToProducts($rows, 0, 1);
     foreach ($jshopConfig->sorting_products_name_s_select as $key => $value) {
         $sorts[] = JHTML::_('select.option', $key, $value, 'sort_id', 'sort_value');
     }
     insertValueInArray($manufacturer->products_page, $jshopConfig->count_product_select);
     //insert products_page count
     foreach ($jshopConfig->count_product_select as $key => $value) {
         $product_count[] = JHTML::_('select.option', $key, $value, 'count_id', 'count_value');
     }
     $sorting_sel = JHTML::_('select.genericlist', $sorts, 'order', 'class = "inputbox" size = "1" onchange = "submitListProductFilters()"', 'sort_id', 'sort_value', $order);
     $product_count_sel = JHTML::_('select.genericlist', $product_count, 'limit', 'class = "inputbox" size = "1" onchange = "submitListProductFilters()"', 'count_id', 'count_value', $limit);
     $_review = JTable::getInstance('review', 'jshop');
     $allow_review = $_review->getAllowReview();
     if ($jshopConfig->show_product_list_filters) {
         $filter_categorys = $manufacturer->getCategorys();
         $first_category = array();
         $first_category[] = JHTML::_('select.option', 0, _JSHOP_ALL, 'id', 'name');
         if (isset($filters['categorys'][0])) {
             $active_category = $filters['categorys'][0];
         } else {
             $active_category = 0;
         }
         $categorys_sel = JHTML::_('select.genericlist', array_merge($first_category, $filter_categorys), 'categorys[]', 'class = "inputbox" onchange = "submitListProductFilters()"', 'id', 'name', $active_category);
     } else {
         $categorys_sel = '';
     }
     if ($jshopConfig->use_plugin_content) {
         changeDataUsePluginContent($manufacturer, "manufacturer");
     }
     $display_list_products = count($rows) > 0 || willBeUseFilter($filters);
     $dispatcher->trigger('onBeforeDisplayProductList', array(&$rows));
     $view_name = "manufacturer";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("products");
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', "list_products/list_products.php");
     $view->assign('template_block_form_filter', "list_products/form_filters.php");
     $view->assign('template_block_pagination', "list_products/block_pagination.php");
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
//.........这里部分代码省略.........
开发者ID:Tommar,项目名称:vino2,代码行数:101,代码来源:manufacturer.php

示例11: display

 function display($cachable = false, $urlparams = false)
 {
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $ajax = JRequest::getInt('ajax');
     $jshopConfig = JSFactory::getConfig();
     $user = JFactory::getUser();
     JSFactory::loadJsFilesLightBox();
     $session = JFactory::getSession();
     $tmpl = JRequest::getVar("tmpl");
     if ($tmpl != "component") {
         $session->set("jshop_end_page_buy_product", $_SERVER['REQUEST_URI']);
     }
     $product_id = JRequest::getInt('product_id');
     $category_id = JRequest::getInt('category_id');
     $attr = JRequest::getVar("attr");
     $back_value = $session->get('product_back_value');
     if (!isset($back_value['pid'])) {
         $back_value = array('pid' => null, 'attr' => null, 'qty' => null);
     }
     if ($back_value['pid'] != $product_id) {
         $back_value = array('pid' => null, 'attr' => null, 'qty' => null);
     }
     if (!is_array($back_value['attr'])) {
         $back_value['attr'] = array();
     }
     if (count($back_value['attr']) == 0 && is_array($attr)) {
         $back_value['attr'] = $attr;
     }
     JPluginHelper::importPlugin('jshoppingproducts');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadProduct', array(&$product_id, &$category_id, &$back_value));
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $product = JTable::getInstance('product', 'jshop');
     $product->load($product_id);
     $listcategory = $product->getCategories(1);
     if (!getDisplayPriceForProduct($product->product_price)) {
         $jshopConfig->attr_display_addprice = 0;
     }
     $attributesDatas = $product->getAttributesDatas($back_value['attr']);
     $product->setAttributeActive($attributesDatas['attributeActive']);
     $attributeValues = $attributesDatas['attributeValues'];
     $attributes = $product->getBuildSelectAttributes($attributeValues, $attributesDatas['attributeSelected']);
     if (count($attributes)) {
         $_attributevalue = JTable::getInstance('AttributValue', 'jshop');
         $all_attr_values = $_attributevalue->getAllAttributeValues();
     } else {
         $all_attr_values = array();
     }
     $session->set('product_back_value', array());
     $product->getExtendsData();
     $category = JTable::getInstance('category', 'jshop');
     $category->load($category_id);
     $category->name = $category->getName();
     $dispatcher->trigger('onBeforeCheckProductPublish', array(&$product, &$category, &$category_id, &$listcategory));
     if ($category->category_publish == 0 || $product->product_publish == 0 || !in_array($product->access, $user->getAuthorisedViewLevels()) || !in_array($category_id, $listcategory)) {
         JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
         return;
     }
     if (getShopMainPageItemid() == JRequest::getInt('Itemid')) {
         appendExtendPathway($category->getTreeChild(), 'product');
     }
     appendPathWay($product->name);
     if ($product->meta_title == "") {
         $product->meta_title = $product->name;
     }
     setMetaData($product->meta_title, $product->meta_keyword, $product->meta_description);
     $product->hit();
     $product->product_basic_price_unit_qty = 1;
     if ($jshopConfig->admin_show_product_basic_price) {
         $product->getBasicPriceInfo();
     } else {
         $product->product_basic_price_show = 0;
     }
     $view_name = "product";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     if ($product->product_template == "") {
         $product->product_template = "default";
     }
     $view->setLayout("product_" . $product->product_template);
     $_review = JTable::getInstance('review', 'jshop');
     if (($allow_review = $_review->getAllowReview()) > 0) {
         $arr_marks = array();
         $arr_marks[] = JHTML::_('select.option', '0', _JSHOP_NOT, 'mark_id', 'mark_value');
         for ($i = 1; $i <= $jshopConfig->max_mark; $i++) {
             $arr_marks[] = JHTML::_('select.option', $i, $i, 'mark_id', 'mark_value');
         }
         $text_review = '';
         $select_review = JHTML::_('select.genericlist', $arr_marks, 'mark', 'class="inputbox" size="1"', 'mark_id', 'mark_value');
     } else {
         $select_review = '';
         $text_review = $_review->getText();
     }
     if ($allow_review) {
         JSFactory::loadJsFilesRating();
     }
     if ($jshopConfig->product_show_manufacturer_logo || $jshopConfig->product_show_manufacturer) {
         $product->manufacturer_info = $product->getManufacturerInfo();
         if (!isset($product->manufacturer_info)) {
//.........这里部分代码省略.........
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:101,代码来源:product.php

示例12: last

 function last()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $session = JFactory::getSession();
     $session->set("jshop_end_page_buy_product", $_SERVER['REQUEST_URI']);
     $session->set("jshop_end_page_list_product", $_SERVER['REQUEST_URI']);
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $product = JSFactory::getTable('product', 'jshop');
     $params = $mainframe->getParams();
     $header = getPageHeaderOfParams($params);
     $prefix = $params->get('pageclass_sfx');
     $seo = JSFactory::getTable("seo", "jshop");
     $seodata = $seo->loadData("lastproducts");
     setMetaData($seodata->title, $seodata->keyword, $seodata->description, $params);
     $count_product_to_row = $jshopConfig->count_products_to_row_last;
     $contextfilter = "jshoping.list.front.product.last";
     $filters = getBuildFilterListProduct($contextfilter, array());
     $rows = $product->getLastProducts($jshopConfig->count_products_to_page_last, null, $filters);
     addLinkToProducts($rows, 0, 1);
     $_review = JSFactory::getTable('review', 'jshop');
     $allow_review = $_review->getAllowReview();
     $display_list_products = count($rows) > 0;
     $jshopConfig->show_sort_product = 0;
     $jshopConfig->show_count_select_products = 0;
     $jshopConfig->show_product_list_filters = 0;
     $dispatcher->trigger('onBeforeDisplayProductList', array(&$rows));
     $view_name = "products";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("products");
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', "list_products/list_products.php");
     $view->assign('template_block_form_filter', "list_products/form_filters.php");
     $view->assign('template_block_pagination', "list_products/block_pagination.php");
     $view->assign("header", $header);
     $view->assign("prefix", $prefix);
     $view->assign("rows", $rows);
     $view->assign("count_product_to_row", $count_product_to_row);
     $view->assign('allow_review', $allow_review);
     $view->assign('display_list_products', $display_list_products);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $dispatcher->trigger('onBeforeDisplayProductListView', array(&$view));
     $view->display();
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:46,代码来源:products.php

示例13: product

 public static function product($category, $product)
 {
     $Itemid = JRequest::getInt('Itemid');
     if (getShopMainPageItemid() == $Itemid) {
         appendExtendPathway($category->getTreeChild(), 'product');
     }
     $app = JFactory::getApplication();
     $menu = $app->getMenu();
     $menuItem = $menu->getItem($Itemid);
     if ($menuItem->query['view'] != 'product') {
         appendPathWay($product->name);
     }
     if ($product->meta_title == "") {
         $product->meta_title = $product->name;
     }
     setMetaData($product->meta_title, $product->meta_keyword, $product->meta_description);
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:17,代码来源:metadata.php

示例14: step5

    function step5(){
        
        $this->_check(5);
            
        appendPathWay(_JSHOP_CHECKOUT_PREVIEW);
        $seo = &JTable::getInstance("seo", "jshop");
        $seodata = $seo->loadData("checkout-preview");
        if ($seodata->title==""){
            $seodata->title = _JSHOP_CHECKOUT_PREVIEW;
        }
        setMetaData($seodata->title, $seodata->keyword, $seodata->description);
        
        $this->_showCheckoutNavigation(5);
        
        $cart = &JModel::getInstance('cart', 'jshop');
        $cart->load();              
        
        $session =& JFactory::getSession();        
        $jshopConfig = &JSFactory::getConfig(); 
        $user = &JFactory::getUser();
        if ($user->id){
            $adv_user = &JSFactory::getUserShop();
        }else{
            $adv_user = &JSFactory::getUserShopGuest();    
        }
        
        $this->_showSmallCart(5);
                
        $sh_method = &JTable::getInstance('shippingMethod', 'jshop');
        $shipping_method_id = $cart->getShippingId();
        $sh_method->load($shipping_method_id);
        
        $pm_method = &JTable::getInstance('paymentMethod', 'jshop');
        $payment_method_id = $cart->getPaymentId();
		$pm_method->load($payment_method_id);        
				
        $lang = &JSFactory::getLang();
        
		if ($adv_user->delivery_adress){
            $country = &JTable::getInstance('country', 'jshop');
            $country->load($adv_user->d_country);
            
			$delivery_info['f_name'] = $adv_user->d_f_name;
            $delivery_info['l_name'] = $adv_user->d_l_name;
			$delivery_info['firma_name'] = $adv_user->d_firma_name;
			$delivery_info['street'] = $adv_user->d_street;
			$delivery_info['zip'] = $adv_user->d_zip;
			$delivery_info['state'] = $adv_user->d_state;
            $delivery_info['city'] = $adv_user->d_city;
            $field_country_name = $lang->get("name");
			$delivery_info['country'] = $country->$field_country_name;
		} else {
            $country = &JTable::getInstance('country', 'jshop');
            $country->load($adv_user->country);
            
			$delivery_info['f_name'] = $adv_user->f_name;
			$delivery_info['l_name'] = $adv_user->l_name;
            $delivery_info['firma_name'] = $adv_user->firma_name;
			$delivery_info['street'] = $adv_user->street;
			$delivery_info['zip'] = $adv_user->zip;
			$delivery_info['state'] = $adv_user->state;
            $delivery_info['city'] = $adv_user->city;
            $field_country_name = $lang->get("name");
			$delivery_info['country'] = $country->$field_country_name;
		}
        
        JPluginHelper::importPlugin('jshoppingcheckout');
        $dispatcher =& JDispatcher::getInstance();
        $dispatcher->trigger( 'onBeforeDisplayCheckoutStep5', array(&$sh_method, &$pm_method, &$delivery_info) );
		
		$view_name = "checkout";
        $view_config = array("template_path"=>JPATH_COMPONENT."/templates/".$jshopConfig->template."/".$view_name);
        $view = &$this->getView($view_name, 'html', '', $view_config);
        $view->setLayout("previewfinish");        
                
        $lang = &JSFactory::getLang();
        $name = $lang->get("name");
        $sh_method->name = $sh_method->$name;
		$view->assign('sh_method', $sh_method );    
		$view->assign('payment_name', $pm_method->$name);
		$view->assign('delivery_info', $delivery_info);
        $view->assign('action', SEFLink('index.php?option=com_jshopping&controller=checkout&task=step5save',0,0, $jshopConfig->use_ssl));       
		$view->assign('config', $jshopConfig);
        
    	$view->display();
    }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:86,代码来源:checkout.php

示例15: view

 function view()
 {
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     $jshopConfig = JSFactory::getConfig();
     $session = JFactory::getSession();
     $session->set("jshop_end_page_buy_product", $_SERVER['REQUEST_URI']);
     $session->set("jshop_end_page_list_product", $_SERVER['REQUEST_URI']);
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $category_id = JRequest::getInt('category_id');
     $category = JSFactory::getTable('category', 'jshop');
     $category->load($category_id);
     $category->getDescription();
     $dispatcher->trigger('onAfterLoadCategory', array(&$category, &$user));
     if (!$category->category_id || $category->category_publish == 0 || !in_array($category->access, $user->getAuthorisedViewLevels())) {
         JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
         return;
     }
     $manufacturer_id = JRequest::getInt('manufacturer_id');
     $label_id = JRequest::getInt('label_id');
     $vendor_id = JRequest::getInt('vendor_id');
     $view_name = "category";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     if ($category->category_template == "") {
         $category->category_template = "default";
     }
     $view->setLayout("category_" . $category->category_template);
     $jshopConfig->count_products_to_page = $category->products_page;
     $context = "jshoping.list.front.product";
     $contextfilter = "jshoping.list.front.product.cat." . $category_id;
     $orderby = $mainframe->getUserStateFromRequest($context . 'orderby', 'orderby', $jshopConfig->product_sorting_direction, 'int');
     $order = $mainframe->getUserStateFromRequest($context . 'order', 'order', $jshopConfig->product_sorting, 'int');
     $limit = $mainframe->getUserStateFromRequest($context . 'limit', 'limit', $category->products_page, 'int');
     if (!$limit) {
         $limit = $category->products_page;
     }
     $limitstart = JRequest::getInt('limitstart');
     $orderbyq = getQuerySortDirection($order, $orderby);
     $image_sort_dir = getImgSortDirection($order, $orderby);
     $field_order = $jshopConfig->sorting_products_field_select[$order];
     $filters = getBuildFilterListProduct($contextfilter, array("categorys"));
     if (getShopMainPageItemid() == JRequest::getInt('Itemid')) {
         appendExtendPathWay($category->getTreeChild(), 'category');
     }
     $orderfield = $jshopConfig->category_sorting == 1 ? "ordering" : "name";
     $sub_categories = $category->getChildCategories($orderfield, 'asc', $publish = 1);
     $dispatcher->trigger('onBeforeDisplayCategory', array(&$category, &$sub_categories));
     if ($category->meta_title == "") {
         $category->meta_title = $category->name;
     }
     setMetaData($category->meta_title, $category->meta_keyword, $category->meta_description);
     $total = $category->getCountProducts($filters);
     $action = xhtmlUrl($_SERVER['REQUEST_URI']);
     $dispatcher->trigger('onBeforeFixLimitstartDisplayProductList', array(&$limitstart, &$total, 'category'));
     if ($limitstart >= $total) {
         $limitstart = 0;
     }
     $products = $category->getProducts($filters, $field_order, $orderbyq, $limitstart, $limit);
     addLinkToProducts($products, $category_id);
     jimport('joomla.html.pagination');
     $pagination = new JPagination($total, $limitstart, $limit);
     $pagenav = $pagination->getPagesLinks();
     foreach ($jshopConfig->sorting_products_name_select as $key => $value) {
         $sorts[] = JHTML::_('select.option', $key, $value, 'sort_id', 'sort_value');
     }
     insertValueInArray($category->products_page, $jshopConfig->count_product_select);
     //insert category count
     foreach ($jshopConfig->count_product_select as $key => $value) {
         $product_count[] = JHTML::_('select.option', $key, $value, 'count_id', 'count_value');
     }
     $sorting_sel = JHTML::_('select.genericlist', $sorts, 'order', 'class = "inputbox" size = "1" onchange = "submitListProductFilters()"', 'sort_id', 'sort_value', $order);
     $product_count_sel = JHTML::_('select.genericlist', $product_count, 'limit', 'class = "inputbox" size = "1" onchange = "submitListProductFilters()"', 'count_id', 'count_value', $limit);
     $_review = JSFactory::getTable('review', 'jshop');
     $allow_review = $_review->getAllowReview();
     if (!$category->category_ordertype) {
         $category->category_ordertype = 1;
     }
     $manufacuturers_sel = '';
     if ($jshopConfig->show_product_list_filters) {
         $filter_manufactures = $category->getManufacturers();
         $first_manufacturer = array();
         $first_manufacturer[] = JHTML::_('select.option', 0, _JSHOP_ALL, 'id', 'name');
         $manufacuturers_sel = JHTML::_('select.genericlist', array_merge($first_manufacturer, $filter_manufactures), 'manufacturers[]', 'class = "inputbox" onchange = "submitListProductFilters()"', 'id', 'name', $filters['manufacturers'][0]);
     }
     if ($jshopConfig->use_plugin_content) {
         changeDataUsePluginContent($category, "category");
     }
     $willBeUseFilter = willBeUseFilter($filters);
     $display_list_products = count($products) > 0 || $willBeUseFilter;
     $dispatcher->trigger('onBeforeDisplayProductList', array(&$products));
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', "list_products/list_products.php");
     $view->assign('template_no_list_product', "list_products/no_products.php");
     $view->assign('template_block_form_filter', "list_products/form_filters.php");
     $view->assign('template_block_pagination', "list_products/block_pagination.php");
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
     $view->assign('filter_show', 1);
//.........这里部分代码省略.........
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:101,代码来源:category.php


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