コード例 #1
0
ファイル: wishlist.php プロジェクト: panickylemon/joomlastayn
 function view()
 {
     $jshopConfig = JSFactory::getConfig();
     $ajax = JRequest::getInt('ajax');
     $dispatcher = JDispatcher::getInstance();
     $cartpreview = JSFactory::getModel('cartPreview', 'jshop');
     $cart = JSFactory::getModel('cart', 'jshop')->init("wishlist", 1);
     JshopHelpersMetadata::wishlist();
     $cartpreview->setCart($cart);
     $cartpreview->setCheckoutStep(0);
     $shopurl = $cartpreview->getBackUrlShop();
     $view = $this->getView('cart');
     $view->setLayout("wishlist");
     $view->assign('config', $jshopConfig);
     $view->assign('products', $cartpreview->getProducts());
     $view->assign('image_product_path', $jshopConfig->image_product_live_path);
     $view->assign('image_path', $jshopConfig->live_path);
     $view->assign('no_image', $jshopConfig->noimage);
     $view->assign('href_shop', $shopurl);
     $view->assign('href_checkout', SEFLink('index.php?option=com_jshopping&controller=cart&task=view', 1));
     $dispatcher->trigger('onBeforeDisplayWishlistView', array(&$view));
     $view->display();
     if ($ajax) {
         die;
     }
 }
コード例 #2
0
ファイル: vendor.php プロジェクト: panickylemon/joomlastayn
 function products()
 {
     $jshopConfig = JSFactory::getConfig();
     $dispatcher = JDispatcher::getInstance();
     $vendor_id = JRequest::getInt("vendor_id");
     JSFactory::getModel('productShop', 'jshop')->storeEndPages();
     $vendor = JSFactory::getTable('vendor', 'jshop');
     $vendor->load($vendor_id);
     $dispatcher->trigger('onBeforeDisplayVendor', array(&$vendor));
     JshopHelpersMetadata::vendorProducts($vendor);
     $productlist = JSFactory::getModel('productList', 'jshop');
     $productlist->setModel($vendor);
     $productlist->load();
     $orderby = $productlist->getOrderBy();
     $image_sort_dir = $productlist->getImageSortDir();
     $filters = $productlist->getFilters();
     $action = $productlist->getAction();
     $products = $productlist->getProducts();
     $pagination = $productlist->getPagination();
     $pagenav = $productlist->getPagenav();
     $sorting_sel = $productlist->getHtmlSelectSorting();
     $product_count_sel = $productlist->getHtmlSelectCount();
     $willBeUseFilter = $productlist->getWillBeUseFilter();
     $display_list_products = $productlist->getDisplayListProducts();
     $manufacuturers_sel = $productlist->getHtmlSelectFilterManufacturer(1);
     $categorys_sel = $productlist->getHtmlSelectFilterCategory(1);
     $allow_review = $productlist->getAllowReview();
     $view = $this->getView('vendor');
     $view->setLayout("products");
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', $productlist->getTmplBlockListProduct());
     $view->assign('template_no_list_product', $productlist->getTmplNoListProduct());
     $view->assign('template_block_form_filter', $productlist->getTmplBlockFormFilter());
     $view->assign('template_block_pagination', $productlist->getTmplBlockPagination());
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
     $view->assign('filter_show', 1);
     $view->assign('filter_show_category', 1);
     $view->assign('filter_show_manufacturer', 1);
     $view->assign('pagination', $pagenav);
     $view->assign('pagination_obj', $pagination);
     $view->assign('display_pagination', $pagenav != "");
     $view->assign("rows", $products);
     $view->assign("count_product_to_row", $productlist->getCountProductsToRow());
     $view->assign("vendor", $vendor);
     $view->assign('action', $action);
     $view->assign('allow_review', $allow_review);
     $view->assign('orderby', $orderby);
     $view->assign('product_count', $product_count_sel);
     $view->assign('sorting', $sorting_sel);
     $view->assign('categorys_sel', $categorys_sel);
     $view->assign('manufacuturers_sel', $manufacuturers_sel);
     $view->assign('filters', $filters);
     $view->assign('willBeUseFilter', $willBeUseFilter);
     $view->assign('display_list_products', $display_list_products);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $dispatcher->trigger('onBeforeDisplayProductListView', array(&$view));
     $view->display();
 }
コード例 #3
0
ファイル: search.php プロジェクト: panickylemon/joomlastayn
 function result()
 {
     $jshopConfig = JSFactory::getConfig();
     JSFactory::getModel('productShop', 'jshop')->storeEndPages();
     JshopHelpersMetadata::searchResult();
     $modellist = JSFactory::getModel('productssearch', 'jshop');
     $productlist = JSFactory::getModel('productList', 'jshop');
     $productlist->setModel($modellist);
     $productlist->load();
     $orderby = $productlist->getOrderBy();
     $image_sort_dir = $productlist->getImageSortDir();
     $action = $productlist->getAction();
     $products = $productlist->getProducts();
     $pagination = $productlist->getPagination();
     $pagenav = $productlist->getPagenav();
     $total = $productlist->getTotal();
     $filters = $productlist->getFilters();
     $sorting_sel = $productlist->getHtmlSelectSorting();
     $product_count_sel = $productlist->getHtmlSelectCount();
     $allow_review = $productlist->getAllowReview();
     $search = $filters['search'];
     if (!$total) {
         $this->noresult($search);
         return 0;
     }
     $view = $this->getView("search");
     $view->setLayout("products");
     $view->assign('search', $search);
     $view->assign('total', $total);
     $view->assign('config', $jshopConfig);
     $view->assign('template_block_list_product', $productlist->getTmplBlockListProduct());
     $view->assign('template_block_form_filter', $productlist->getTmplBlockFormFilter());
     $view->assign('template_block_pagination', $productlist->getTmplBlockPagination());
     $view->assign('path_image_sorting_dir', $jshopConfig->live_path . 'images/' . $image_sort_dir);
     $view->assign('filter_show', 0);
     $view->assign('filter_show_category', 0);
     $view->assign('filter_show_manufacturer', 0);
     $view->assign('pagination', $pagenav);
     $view->assign('pagination_obj', $pagination);
     $view->assign('display_pagination', $pagenav != "");
     $view->assign('product_count', $product_count_sel);
     $view->assign('sorting', $sorting_sel);
     $view->assign('action', $action);
     $view->assign('orderby', $orderby);
     $view->assign('count_product_to_row', $productlist->getCountProductsToRow());
     $view->assign('rows', $products);
     $view->assign('allow_review', $allow_review);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     JDispatcher::getInstance()->trigger('onBeforeDisplayProductListView', array(&$view));
     $view->display();
 }
コード例 #4
0
ファイル: cart.php プロジェクト: panickylemon/joomlastayn
 function view()
 {
     $jshopConfig = JSFactory::getConfig();
     if (!JshopHelpersCart::checkView()) {
         return 0;
     }
     $dispatcher = JDispatcher::getInstance();
     $ajax = JRequest::getInt('ajax');
     JshopHelpersMetadata::cart();
     $cart = JSFactory::getModel('cart', 'jshop')->init('cart', 1);
     $cartpreview = JSFactory::getModel('cartPreview', 'jshop');
     $cartpreview->setCart($cart);
     $cartpreview->setCheckoutStep(0);
     $shopurl = $cartpreview->getBackUrlShop();
     $cartdescr = $cartpreview->getCartStaticText();
     $href_checkout = $cartpreview->getUrlCheckout();
     $show_percent_tax = $cartpreview->getShowPercentTax();
     $hide_subtotal = $cartpreview->getHideSubtotal();
     $checkout_navigator = JSFactory::getModel('checkout', 'jshop')->showCheckoutNavigation('0');
     $view = $this->getView('cart');
     $view->setLayout("cart");
     $view->assign('config', $jshopConfig);
     $view->assign('products', $cartpreview->getProducts());
     $view->assign('summ', $cartpreview->getSubTotal());
     $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', $cartpreview->getDiscount());
     $view->assign('free_discount', $cartpreview->getFreeDiscount());
     $view->assign('use_rabatt', $jshopConfig->use_rabatt_code);
     $view->assign('tax_list', $cartpreview->getTaxExt());
     $view->assign('fullsumm', $cartpreview->getFullSum());
     $view->assign('show_percent_tax', $show_percent_tax);
     $view->assign('hide_subtotal', $hide_subtotal);
     $view->assign('weight', $cartpreview->getWeight());
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $view->assign('cartdescr', $cartdescr);
     $view->assign('checkout_navigator', $checkout_navigator);
     $dispatcher->trigger('onBeforeDisplayCartView', array(&$view));
     $view->display();
     if ($ajax) {
         die;
     }
 }
コード例 #5
0
ファイル: content.php プロジェクト: panickylemon/joomlastayn
 function view()
 {
     $model = JSFactory::getModel('contentPage', 'jshop');
     $page = JRequest::getVar('page');
     $order_id = JRequest::getInt('order_id');
     $cartp = JRequest::getInt('cart');
     $seodata = JshopHelpersMetadata::content($page);
     $model->setSeodata($seodata);
     $text = $model->load($page, $order_id, $cartp);
     if ($text === false) {
         JError::raiseError(404, $model->getError());
         return 0;
     }
     $view = $this->getView("content");
     $view->setLayout("content");
     $view->assign('text', $text);
     JDispatcher::getInstance()->trigger('onBeforeDisplayContentView', array(&$view));
     $view->display();
 }
コード例 #6
0
ファイル: product.php プロジェクト: panickylemon/joomlastayn
 function display($cachable = false, $urlparams = false)
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $user = JFactory::getUser();
     $dispatcher = JDispatcher::getInstance();
     $model = JSFactory::getModel('productShop', 'jshop');
     $ajax = JRequest::getInt('ajax');
     $tmpl = JRequest::getVar("tmpl");
     $product_id = JRequest::getInt('product_id');
     $category_id = JRequest::getInt('category_id');
     $attr = JRequest::getVar("attr");
     JSFactory::loadJsFilesLightBox();
     if ($tmpl != "component") {
         $model->storeEndPageBuy();
     }
     $back_value = $model->getBackValue($product_id, $attr);
     $dispatcher->trigger('onBeforeLoadProduct', array(&$product_id, &$category_id, &$back_value));
     $dispatcher->trigger('onBeforeLoadProductList', array());
     $product = JSFactory::getTable('product', 'jshop');
     $product->load($product_id);
     $category = JSFactory::getTable('category', 'jshop');
     $category->load($category_id);
     $category->name = $category->getName();
     $model->setProduct($product);
     $listcategory = $model->getCategories(1);
     $model->prepareView($back_value);
     $model->clearBackValue();
     $attributes = $model->getAttributes();
     $all_attr_values = $model->getAllAttrValues();
     if (!$product->checkView($category, $user, $category_id, $listcategory)) {
         JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
         return;
     }
     JshopHelpersMetadata::product($category, $product);
     $product->hit();
     $allow_review = $model->getAllowReview();
     $text_review = $model->getTextReview();
     $select_review = $model->getSelectReview();
     $hide_buy = $model->getHideBuy();
     $available = $model->getTextAvailable();
     $default_count_product = $model->getDefaultCountProduct($back_value);
     $displaybuttons = $model->getDisplayButtonsStyle();
     $product_images = $product->getImages();
     $product_videos = $product->getVideos();
     $product_demofiles = $product->getDemoFiles();
     $dispatcher->trigger('onBeforeDisplayProductList', array(&$product->product_related));
     $view = $this->getView("product");
     $view->setLayout("product_" . $product->product_template);
     $dispatcher->trigger('onBeforeDisplayProduct', array(&$product, &$view, &$product_images, &$product_videos, &$product_demofiles));
     $view->assign('config', $jshopConfig);
     $view->assign('image_path', $jshopConfig->live_path . '/images');
     $view->assign('noimage', $jshopConfig->noimage);
     $view->assign('image_product_path', $jshopConfig->image_product_live_path);
     $view->assign('video_product_path', $jshopConfig->video_product_live_path);
     $view->assign('video_image_preview_path', $jshopConfig->video_product_live_path);
     $view->assign('product', $product);
     $view->assign('category_id', $category_id);
     $view->assign('images', $product_images);
     $view->assign('videos', $product_videos);
     $view->assign('demofiles', $product_demofiles);
     $view->assign('attributes', $attributes);
     $view->assign('all_attr_values', $all_attr_values);
     $view->assign('related_prod', $product->product_related);
     $view->assign('path_to_image', $jshopConfig->live_path . 'images/');
     $view->assign('live_path', JURI::root());
     $view->assign('enable_wishlist', $jshopConfig->enable_wishlist);
     $view->assign('action', SEFLink('index.php?option=com_jshopping&controller=cart&task=add', 1));
     $view->assign('urlupdateprice', SEFLink('index.php?option=com_jshopping&controller=product&task=ajax_attrib_select_and_price&product_id=' . $product_id . '&ajax=1', 1, 1));
     if ($allow_review) {
         JSFactory::loadJsFilesRating();
         $modelreviewlist = JSFactory::getModel('productReviewList', 'jshop');
         $modelreviewlist->setModel($product);
         $modelreviewlist->load();
         $review_list = $modelreviewlist->getList();
         $pagination = $modelreviewlist->getPagination();
         $pagenav = $pagination->getPagesLinks();
         $view->assign('reviews', $review_list);
         $view->assign('pagination', $pagenav);
         $view->assign('pagination_obj', $pagination);
         $view->assign('display_pagination', $pagenav != "");
     }
     $view->assign('allow_review', $allow_review);
     $view->assign('select_review', $select_review);
     $view->assign('text_review', $text_review);
     $view->assign('stars_count', floor($jshopConfig->max_mark / $jshopConfig->rating_starparts));
     $view->assign('parts_count', $jshopConfig->rating_starparts);
     $view->assign('user', $user);
     $view->assign('shippinginfo', SEFLink($jshopConfig->shippinginfourl, 1));
     $view->assign('hide_buy', $hide_buy);
     $view->assign('available', $available);
     $view->assign('default_count_product', $default_count_product);
     $view->assign('folder_list_products', "list_products");
     $view->assign('back_value', $back_value);
     $view->assign('displaybuttons', $displaybuttons);
     $dispatcher->trigger('onBeforeDisplayProductView', array(&$view));
     $view->display();
     $dispatcher->trigger('onAfterDisplayProduct', array(&$product));
     if ($ajax) {
         die;
     }
 }
コード例 #7
0
ファイル: products.php プロジェクト: panickylemon/joomlastayn
 function last()
 {
     JshopHelpersMetadata::productsLast();
     $this->verySimpleProductList('last');
 }
コード例 #8
0
ファイル: user.php プロジェクト: panickylemon/joomlastayn
 function groupsinfo()
 {
     $jshopConfig = JSFactory::getConfig();
     JshopHelpersMetadata::userGroupsinfo();
     $group = JSFactory::getTable('userGroup', 'jshop');
     $list = $group->getList();
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayGroupsInfo', array());
     $view = $this->getView('user');
     $view->setLayout("groupsinfo");
     $view->assign('rows', $list);
     $dispatcher->trigger('onBeforeDisplayGroupsInfoView', array(&$view));
     $view->display();
 }
コード例 #9
0
ファイル: checkout.php プロジェクト: panickylemon/joomlastayn
 function finish()
 {
     $checkout = JSFactory::getModel('checkoutFinish', 'jshop');
     $checkout->checkStep(10);
     $jshopConfig = JSFactory::getConfig();
     $order_id = $checkout->getEndOrderId();
     $text = $checkout->getFinishStaticText();
     JshopHelpersMetadata::checkoutFinish();
     JDispatcher::getInstance()->trigger('onBeforeDisplayCheckoutFinish', array(&$text, &$order_id));
     $view = $this->getView("checkout");
     $view->setLayout("finish");
     $view->assign('text', $text);
     $view->display();
     if ($order_id) {
         $checkout->paymentComplete($order_id, $text);
     }
     $checkout->clearAllDataCheckout();
 }