Ejemplo n.º 1
0
 public function getView($name = '', $type = '', $prefix = '', $config = array())
 {
     $jshopConfig = JSFactory::getConfig();
     if ($type == '') {
         $type = getDocumentType();
     }
     if (empty($config)) {
         $config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $name);
     }
     return parent::getView($name, $type, $prefix, $config);
 }
Ejemplo n.º 2
0
 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;
     }
 }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
 function _showCheckoutNavigation($step)
 {
     $jshopConfig = JSFactory::getConfig();
     if ($jshopConfig->step_4_3) {
         $array_navigation_steps = array('2' => _JSHOP_STEP_ORDER_2, '4' => _JSHOP_STEP_ORDER_4, '3' => _JSHOP_STEP_ORDER_3, '5' => _JSHOP_STEP_ORDER_5);
     } else {
         $array_navigation_steps = array('2' => _JSHOP_STEP_ORDER_2, '3' => _JSHOP_STEP_ORDER_3, '4' => _JSHOP_STEP_ORDER_4, '5' => _JSHOP_STEP_ORDER_5);
     }
     $output = array();
     if ($jshopConfig->without_shipping || $jshopConfig->hide_shipping_step) {
         unset($array_navigation_steps[4]);
     }
     if ($jshopConfig->without_payment || $jshopConfig->hide_payment_step) {
         unset($array_navigation_steps[3]);
     }
     foreach ($array_navigation_steps as $key => $value) {
         if ($key < $step && !($jshopConfig->step_4_3 && $key == 3 && $step == 4) || $jshopConfig->step_4_3 && $key == 4 && $step == 3) {
             $output[] = '<a href="' . SEFLink('index.php?option=com_jshopping&controller=checkout&task=step' . $key, 0, 0, $jshopConfig->use_ssl) . '">' . $value . '</a>';
         } else {
             if ($key == $step) {
                 $output[] = '<span id="active_step">' . $value . '</span>';
             } else {
                 $output[] = $value;
             }
         }
     }
     JPluginHelper::importPlugin('jshoppingcheckout');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayCheckoutNavigator', array(&$output, &$array_navigation_steps));
     $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("menu");
     $view->assign('steps', $output);
     $dispatcher->trigger('onAfterDisplayCheckoutNavigator', array(&$view));
     return $view->loadTemplate();
 }
Ejemplo n.º 5
0
 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);
     $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", $rows);
     $view->assign("count_product_to_row", $count_product_to_row);
     $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();
 }
Ejemplo n.º 6
0
 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;
     }
 }
Ejemplo n.º 7
0
 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();
 }
Ejemplo n.º 8
0
 function get_html_characteristics()
 {
     $jshopConfig = JSFactory::getConfig();
     $category_id = JRequest::getInt("category_id");
     if ($jshopConfig->admin_show_product_extra_field) {
         $dispatcher = JDispatcher::getInstance();
         $characteristic_fields = JSFactory::getAllProductExtraField();
         $characteristic_fieldvalues = JSFactory::getAllProductExtraFieldValueDetail();
         $characteristic_displayfields = JSFactory::getDisplayFilterExtraFieldForCategory($category_id);
         $view_name = "search";
         $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
         $view = $this->getView($view_name, getDocumentType(), '', $view_config);
         $view->setLayout("characteristics");
         $view->assign('characteristic_fields', $characteristic_fields);
         $view->assign('characteristic_fieldvalues', $characteristic_fieldvalues);
         $view->assign('characteristic_displayfields', $characteristic_displayfields);
         $dispatcher->trigger('onBeforeDisplaySearchHtmlCharacteristics', array(&$view));
         $view->display();
     }
     die;
 }
Ejemplo n.º 9
0
 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);
     $view->assign('filter_show', 1);
     $view->assign('filter_show_category', 1);
     $view->assign('filter_show_manufacturer', 0);
     $view->assign('pagination', $pagenav);
     $view->assign('pagination_obj', $pagination);
     $view->assign('display_pagination', $pagenav != "");
     $view->assign("rows", $rows);
     $view->assign("count_product_to_row", $count_product_to_row);
     $view->assign("manufacturer", $manufacturer);
     $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('filters', $filters);
     $view->assign('display_list_products', $display_list_products);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $dispatcher->trigger('onBeforeDisplayProductListView', array(&$view));
     $view->display();
 }
Ejemplo n.º 10
0
 function showmedia()
 {
     $jshopConfig = JSFactory::getConfig();
     $media_id = JRequest::getInt('media_id');
     $file = JTable::getInstance('productfiles', 'jshop');
     $file->load($media_id);
     $scripts_load = '<script type="text/javascript" src="' . JURI::root() . 'media/jui/js/jquery.min.js"></script>';
     //$scripts_load .= '<script type="text/javascript" src="'.JURI::root().'components/com_jshopping/js/jquery/jquery-noconflict.js"></script>';
     $scripts_load .= '<script type="text/javascript" src="' . JURI::root() . 'components/com_jshopping/js/jquery/jquery.media.js"></script>';
     $view_name = "product";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("playmedia");
     $view->assign('config', $jshopConfig);
     $view->assign('filename', $file->demo);
     $view->assign('description', $file->demo_descr);
     $view->assign('scripts_load', $scripts_load);
     JPluginHelper::importPlugin('jshoppingproducts');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayProductShowMediaView', array(&$view));
     $view->display();
     die;
 }
Ejemplo n.º 11
0
 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();
 }
Ejemplo n.º 12
0
 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);
     $view->assign('filter_show_category', 0);
     $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', $category->products_row);
     $view->assign('image_category_path', $jshopConfig->image_category_live_path);
     $view->assign('noimage', $jshopConfig->noimage);
     $view->assign('category', $category);
     $view->assign('categories', $sub_categories);
     $view->assign('count_category_to_row', $jshopConfig->count_category_to_row);
     $view->assign('allow_review', $allow_review);
     $view->assign('product_count', $product_count_sel);
     $view->assign('sorting', $sorting_sel);
     $view->assign('action', $action);
     $view->assign('orderby', $orderby);
     $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();
 }
Ejemplo n.º 13
0
 function showmedia()
 {
     $jshopConfig = JSFactory::getConfig();
     $media_id = JRequest::getInt('media_id');
     $file = JSFactory::getTable('productfiles', 'jshop');
     $file->load($media_id);
     $scripts_load = '<script type="text/javascript" src="' . JURI::root() . 'components/com_jshopping/js/jquery/jquery-' . $jshopConfig->load_jquery_version . '.min.js"></script>';
     $scripts_load .= '<script type="text/javascript" src="' . JURI::root() . 'components/com_jshopping/js/jquery/jquery-noconflict.js"></script>';
     $scripts_load .= '<script type="text/javascript" src="' . JURI::root() . 'components/com_jshopping/js/jquery/jquery.media.js"></script>';
     $scripts_load .= '<script type="text/javascript" src="' . JURI::root() . 'media/system/js/modal.js"></script>';
     $scripts_load .= '<script type="text/javascript" src="' . JURI::root() . 'media/system/js/modalpic.js"></script>';
     $scripts_load .= '<link rel="stylesheet" type="text/css" src="' . JURI::root() . 'media/system/css/modal.css" />';
     $view_name = "product";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("playmedia");
     $view->assign('config', $jshopConfig);
     $view->assign('filename', $file->demo);
     $view->assign('description', $file->demo_descr);
     $view->assign('scripts_load', $scripts_load);
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayProductShowMediaView', array(&$view));
     $view->display();
     die;
 }
	<table style='font-size:13px;'  class='table table-striped table-hover table-bordered' width=100%>
	<thead>
	<tr>
	<th>Office Code</th>
	<th>Document Date</th>
	<th>Subject</th>
	<th>Document Type</th>
	</tr>
	</thead>
	<tbody>
	<?php 
    $routing_Option = "<select class='form-control'  name='updateFile'>";
    for ($i = 0; $i < $nm; $i++) {
        $row = $rs->fetch_assoc();
        $document_type = getDocumentType($db, $row['document_type']);
        $docId = $row['ref_id'];
        ?>
		<tr>
		<td><?php 
        echo $row['sending_office'];
        ?>
</td>
		<td><?php 
        echo date("Y-m-d", strtotime($row['document_date']));
        ?>
</td>
		<td><a href='submit.php?updateFile='<?php 
        echo $docId;
        ?>
'><?php 
Ejemplo n.º 15
0
                console.log(event.data);
        };

        var сonnectEditor = function () {

            docEditor = new DocsAPI.DocEditor("iframeEditor",
                {
                    width: "100%",
                    height: "100%",

                    type: "<?php 
echo $_GET["action"] != "embedded" ? "desktop" : "embedded";
?>
",
                    documentType: "<?php 
echo getDocumentType($filename);
?>
",
                    document: {
                        title: fileName,
                        url: "<?php 
echo $fileuri;
?>
",
                        fileType: fileType,
                        key: "<?php 
echo getDocEditorKey($fileuri);
?>
",
                        vkey: "<?php 
echo getDocEditorValidateKey($fileuri);
Ejemplo n.º 16
0
 function finish()
 {
     $checkout = JSFactory::getModel('checkout', 'jshop');
     $checkout->checkStep(10);
     $jshopConfig = JSFactory::getConfig();
     $session = JFactory::getSession();
     $order_id = $session->get('jshop_end_order_id');
     $document = JFactory::getDocument();
     $document->setTitle(_JSHOP_CHECKOUT_FINISH);
     appendPathWay(_JSHOP_CHECKOUT_FINISH);
     $statictext = JSFactory::getTable("statictext", "jshop");
     $rowstatictext = $statictext->loadData("order_finish_descr");
     $text = $rowstatictext->text;
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayCheckoutFinish', array(&$text, &$order_id));
     if (trim(strip_tags($text)) == "") {
         $text = '';
     }
     $view_name = "checkout";
     $view_config = array("template_path" => $jshopConfig->template_path . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("finish");
     $view->assign('text', $text);
     $view->display();
     if ($order_id) {
         $order = JSFactory::getTable('order', 'jshop');
         $order->load($order_id);
         $pm_method = JSFactory::getTable('paymentMethod', 'jshop');
         $payment_method_id = $order->payment_method_id;
         $pm_method->load($payment_method_id);
         $paymentsysdata = $pm_method->getPaymentSystemData();
         $payment_system = $paymentsysdata->paymentSystem;
         if ($payment_system) {
             $pmconfigs = $pm_method->getConfigs();
             $payment_system->complete($pmconfigs, $order, $pm_method);
         }
         $dispatcher->trigger('onAfterDisplayCheckoutFinish', array(&$text, &$order, &$pm_method));
     }
     $cart = JSFactory::getModel('cart', 'jshop');
     $cart->load();
     $cart->getSum();
     $cart->clear();
     $checkout->deleteSession();
 }