예제 #1
0
 public function display($tpl = null)
 {
     if (!isset($this->context)) {
         $this->context = JeproshopContext::getContext();
     }
     $app = JFactory::getApplication();
     $warning = $this->getWarningDomainName();
     $calendarHelper = new JeproshopCalendarHelper();
     $calendarHelper->setDateFrom($app->input->get('date_from', $this->context->employee->stats_date_from));
     $calendarHelper->setDateTo($app->input->get('date_to', $this->context->employee->stats_date_to));
     $stats_compare_from = $this->context->employee->stats_compare_from;
     $stats_compare_to = $this->context->employee->stats_compare_to;
     if (is_null($stats_compare_from) || $stats_compare_from == '0000-00-00') {
         $stats_compare_from = null;
     }
     if (is_null($stats_compare_to) || $stats_compare_to == '0000-00-00') {
         $stats_compare_to = null;
     }
     $calendarHelper->setCompareDateFrom($stats_compare_from);
     $calendarHelper->setCompareDateTo($stats_compare_to);
     $calendarHelper->setCompareOption($app->input->get('compare_date_option', $this->context->employee->stats_compare_option));
     $calendar = $calendarHelper->generate();
     $dashboard_zone_one = '';
     $dashboard_zone_two = '';
     $this->assignRef('warning', $warning);
     $this->assignRef('calendar', $calendar);
     $this->assignRef('dashboard_zone_one', $dashboard_zone_one);
     $this->assignRef('dashboard_zone_two', $dashboard_zone_two);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #2
0
 public function renderEditForm($tpl = null)
 {
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #3
0
 public function renderEditForm($tpl = null)
 {
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $products = $this->tag->getProducts(true);
     $products_unselected = $this->tag->getProducts(false);
     $this->assignRef('products', ${$products});
     $this->assignRef('products_unselected', ${$products_unselected});
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #4
0
 public function renderEditForm($tpl = null)
 {
     if (!isset($this->context)) {
         $this->context = JeproshopContext::getContext();
     }
     $attributes_groups = JeproshopAttributeGroupModelAttributeGroup::getAttributesGroups($this->context->language->lang_id);
     $this->assignRef('attribute_groups', $attributes_groups);
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #5
0
 public function addFeatureValue($tpl = null)
 {
     if (!isset($this->context)) {
         $this->context = JeproshopContext::getContext();
     }
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $features = JeproshopFeatureModelFeature::getFeatures($this->context->language->lang_id);
     $this->assignRef('features', $features);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #6
0
 public function renderDetails($tpl = null)
 {
     $app = JFactory::getApplication();
     $category_id = $app->input->get('category_id');
     $viewCategory = $app->input->get('view_category');
     if ($category_id && $viewCategory) {
         $app->redirect('index.php?option=com_jeproshop&view=product&category_id=' . (int) $category_id . '&view_category=1');
     }
     if (!JeproshopSettingModelSetting::getValue('stock_management')) {
         JError::raiseWarning(JText::_('List of products without available quantities for sale are not displayed because stock management is disabled.'));
     }
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #7
0
 public function renderEditForm($tpl = null)
 {
     if (!isset($this->context)) {
         $this->context = JeproshopContext::getContext();
     }
     $image = COM_JEPROSHOP_SUPPLIER_IMAGE_DIR . $this->supplier->supplier_id . '.jpg';
     $imageUrl = JeproshopImageManager::thumbnail($image, 'supplier_' . $this->supplier->supplier_id . '.' . $this->imageType, 350, $this->imageType, true, true);
     $imageSize = file_exists($image) ? filesize($image) / 1000 : false;
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $address = $this->supplier->getSupplierAddress();
     $this->assignRef('address', $address);
     $countries = JeproshopCountryModelCountry::getStaticCountries($this->context->language->lang_id, false);
     $this->assignRef('countries', $countries);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #8
0
 public function renderEditForm($tpl = null)
 {
     $this->loadObject(true);
     $app = JFactory::getApplication();
     if (!isset($this->context)) {
         $this->context = JeproshopContext::getContext();
     }
     $shop_id = JeproshopContext::getContext()->shop->shop_id;
     $selected_categories = array(isset($this->context->controller->category->parent_id) && $this->context->controller->category->isParentCategoryAvailable($shop_id) ? (int) $this->context->controller->category->parent_id : $app->input->get('parent_id', JeproshopCategoryModelCategory::getRootCategory()->category_id));
     $unidentified = new JeproshopGroupModelGroup(JeproshopSettingModelSetting::getValue('unidentified_group'));
     $guest = new JeproshopGroupModelGroup(JeproshopSettingModelSetting::getValue('guest_group'));
     $default = new JeproshopGroupModelGroup(JeproshopSettingModelSetting::getValue('customer_group'));
     $unidentified_group_information = '<b>' . $unidentified->name[$this->context->language->lang_id] . '</b> ' . JText::_('COM_JEPROSHOP_ALL_PEOPLE_WITHOUT_A_VALID_CUSTOMER_ACCOUNT_MESSAGE');
     $guest_group_information = '<b>' . $guest->name[$this->context->language->lang_id] . '</b> ' . JText::_('COM_JEPROSHOP_CUSTOMER_WHO_PLACED_AN_ORDER_WITH_THE_GUEST_CHECKOUT_MESSAGE');
     $default_group_information = '<b>' . $default->name[$this->context->language->lang_id] . '</b> ' . JText::_('COM_JEPROSHOP_ALL_PEOPLE_WHO_HAVE_CREATED_AN_CREATED_AN_ACCOUNT_ON_THIS_SITE_MESSAGE');
     $this->assignRef('unidentified_group_information', $unidentified_group_information);
     $this->assignRef('guest_group_information', $guest_group_information);
     $this->assignRef('default_group_information', $default_group_information);
     $image = COM_JEPROSHOP_CATEGORY_IMAGE_DIR . $this->context->controller->category->category_id . '.jpg';
     $image_url = JeproshopImageManager::thumbnail($image, 'category_' . $this->context->controller->category->category_id . '.jpg', 350, 'jpg', true, true);
     $imageSize = file_exists($image) ? filesize($image) / 1000 : false;
     $shared_category = JeproshopTools::isLoadedObject($this->context->controller->category, 'category_id') && $this->context->controller->category->hasMultishopEntries();
     $this->assignRef('shared_category', $shared_category);
     $allow_accented_chars_url = (int) JeproshopSettingModelSetting::getValue('allow_accented_chars_url');
     $this->assignRef('allow_accented_chars_url', $allow_accented_chars_url);
     //$this->assignRef('selected_categories', $selected_categories);
     $categories_tree = new JeproshopCategoriesTree('jform_categories_tree', JText::_('COM_JEPROSHOP_CATEGORIES_LABEL'), null, $this->context->language->lang_id);
     $categories_tree->setTreeTemplate('associated_categories')->setSelectedCategories($selected_categories)->setUseCheckBox(true)->setInputName('parent_id');
     $categories_data = $categories_tree->render();
     $this->assignRef('categories_tree', $categories_data);
     $image = JeproshopImageManager::thumbnail(COM_JEPROSHOP_CATEGORY_IMAGE_DIR . '/' . $this->context->controller->category->category_id . '.jpg', 'category_' . (int) $this->context->controller->category->category_id . '.jpg', 350, 'jpg', true);
     $this->assignRef('image', $image ? $image : false);
     $size = $image ? filesize(COM_JEPROSHOP_CATEGORY_IMAGE_DIR . '/' . $this->context->controller->category->category_id . 'jpg') / 1000 : false;
     $this->assignRef('size', $size);
     $category_group_ids = $this->context->controller->category->getGroups();
     $groups = JeproshopGroupModelGroup::getGroups($this->context->language->lang_id);
     //if empty $carrier_groups_ids : object creation : we set the default groups
     if (empty($category_group_ids)) {
         $preSelected = array(JeproshopSettingModelSetting::getValue('unidentified_group'), JeproshopSettingModelSetting::getValue('guest_group'), JeproshopSettingModelSetting::getValue('customer_group'));
         $category_group_ids = array_merge($category_group_ids, $preSelected);
     }
     foreach ($groups as $group) {
         $groupBox = $app->input->get('group_box_' . $group->group_id, in_array($group->group_id, $category_group_ids));
         $this->assignRef('group_box_' . $group->group_id, $groupBox);
     }
     $is_root_category = (bool) $app->input->get('is_root_category');
     $this->assignRef('is_root_category', $is_root_category);
     $helper = new JeproshopHelper();
     $this->assignRef('helper', $helper);
     $this->assignRef('groups', $groups);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }
예제 #9
0
 public function renderStatusList($tpl = null)
 {
     $orderStatusModel = new JeproshopOrderStatusModelOrderStatus();
     $orderStatusList = $orderStatusModel->getOrderStatusList();
     $orderPagination = $orderStatusModel->getPagination();
     $this->assignRef('orderStatusList', $orderStatusList);
     $this->assignRef('statues_pagination', $orderPagination);
     $returnStatues = $orderStatusModel->getOrderReturnStatusList();
     $this->assignRef('returnStatues', $returnStatues);
     $this->addToolBar();
     $this->sideBar = JHtmlSideBar::render();
     parent::display($tpl);
 }