From a614aee387b739870df6449edfad928a4733e9a4 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 16 Jan 2024 15:38:29 +0530 Subject: [PATCH 01/76] Updated the adminimportcontroller to allow the admin to import rooms, room types, hotels, orders, etc. using the csv files. --- .../controllers/import/helpers/form/form.tpl | 135 +- controllers/admin/AdminImportController.php | 2703 +++++++++++------ docs/csv_import/alias_import.csv | 8 +- docs/csv_import/bookings_import.csv | 4 + docs/csv_import/categories_import.csv | 7 +- docs/csv_import/customers_import.csv | 20 +- docs/csv_import/hotels_import.csv | 3 + docs/csv_import/room_types_import.csv | 3 + docs/csv_import/rooms_import.csv | 3 + docs/csv_import/service_products_import.csv | 4 + 10 files changed, 1957 insertions(+), 933 deletions(-) create mode 100644 docs/csv_import/bookings_import.csv create mode 100644 docs/csv_import/hotels_import.csv create mode 100644 docs/csv_import/room_types_import.csv create mode 100644 docs/csv_import/rooms_import.csv create mode 100644 docs/csv_import/service_products_import.csv diff --git a/admin/themes/default/template/controllers/import/helpers/form/form.tpl b/admin/themes/default/template/controllers/import/helpers/form/form.tpl index 5bf19d342..f82dfa8cf 100644 --- a/admin/themes/default/template/controllers/import/helpers/form/form.tpl +++ b/admin/themes/default/template/controllers/import/helpers/form/form.tpl @@ -25,7 +25,7 @@
{block name="leadin"}{/block}
{if $module_confirmation}
- {l s='Your .CSV file has been successfully imported into your shop. Don\'t forget to re-build the products\' search index.'} + {l s='Your .CSV file has been successfully imported to your website.'}
{/if}
@@ -63,7 +63,12 @@
  • {l s='Note that the Category import does not support having two categories with the same name.'}
  • -
  • {l s='Note that you can have several products with the same reference.'}
  • +
+
+
+
    +
  • {l s='Note that the bookings import with active mail feature will make the import process very slow.'}
  • +
  • {l s='You can disable the mail feature from Advanced Parameters > E-mail'}
@@ -199,42 +204,40 @@
- +
-
{l s='e.g. '} 1; Blouse; 129.90; 5
+
{l s='e.g. '} 6; 1; The Sunshine Luxury
-
{l s='e.g. '} Blouse; red.jpg, blue.jpg, green.jpg; 129.90
+
{l s='e.g. '} The Sunshine Luxury; News Paper:2.jpg, Gym:7.jpg

- +
- +
- +
- + -->
- + - diff --git a/admin/themes/default/template/controllers/normal_products/helpers/tree/tree_header.tpl b/admin/themes/default/template/controllers/normal_products/helpers/tree/tree_headere.tpl similarity index 100% rename from admin/themes/default/template/controllers/normal_products/helpers/tree/tree_header.tpl rename to admin/themes/default/template/controllers/normal_products/helpers/tree/tree_headere.tpl diff --git a/admin/themes/default/template/controllers/normal_products/helpers/tree/tree_toolbar.tpl b/admin/themes/default/template/controllers/normal_products/helpers/tree/tree_toolbar.tpl deleted file mode 100644 index 0a817f113..000000000 --- a/admin/themes/default/template/controllers/normal_products/helpers/tree/tree_toolbar.tpl +++ /dev/null @@ -1,31 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} -
- {if isset($actions)} - {foreach from=$actions item=action} - {$action->render()} - {/foreach} - {/if} -
\ No newline at end of file diff --git a/admin/themes/default/template/helpers/tree/tree.tpl b/admin/themes/default/template/helpers/tree/tree.tpl index 9f9e6839b..066863e89 100644 --- a/admin/themes/default/template/helpers/tree/tree.tpl +++ b/admin/themes/default/template/helpers/tree/tree.tpl @@ -29,4 +29,64 @@ {$nodes} {/if} - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/themes/default/template/helpers/tree/tree_categories.tpl b/admin/themes/default/template/helpers/tree/tree_categories.tpl index 36b6f6602..e1291f627 100644 --- a/admin/themes/default/template/helpers/tree/tree_categories.tpl +++ b/admin/themes/default/template/helpers/tree/tree_categories.tpl @@ -69,7 +69,7 @@ $(this).parent().addClass("tree-selected"); $(this).parents('ul.tree').each(function(){ $(this).show(); - $(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open'); + $(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open'); }); } } @@ -92,7 +92,7 @@ $(this).parent().addClass("tree-selected"); $(this).parents('ul.tree').each(function(){ $(this).show(); - $(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open'); + $(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open'); }); } } diff --git a/admin/themes/default/template/helpers/tree/tree_hotels.tpl b/admin/themes/default/template/helpers/tree/tree_hotels.tpl deleted file mode 100644 index 36b6f6602..000000000 --- a/admin/themes/default/template/helpers/tree/tree_hotels.tpl +++ /dev/null @@ -1,102 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} -
- {if isset($header)}{$header}{/if} - {if isset($nodes)} -
    - {$nodes} -
- {/if} -
- diff --git a/admin/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl b/admin/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl index 47c7c0ac6..a4452eb38 100644 --- a/admin/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl +++ b/admin/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl @@ -24,9 +24,10 @@ *}
  • - {if isset($node['id_category']) && $node['id_category'] != $root_category} - - {/if} + {* {if isset($node['value']) && $node['value'] != $root_category} *} + {if !isset($node['input_name'])}test{/if} + + {* {/if} *} diff --git a/admin/themes/default/template/helpers/tree/tree_node_folder_radio.tpl b/admin/themes/default/template/helpers/tree/tree_node_folder_radio.tpl index be55f981c..511d52458 100644 --- a/admin/themes/default/template/helpers/tree/tree_node_folder_radio.tpl +++ b/admin/themes/default/template/helpers/tree/tree_node_folder_radio.tpl @@ -24,9 +24,9 @@ *}
  • - {if $node['id_category'] != $root_category} - - {/if} + {* {if $node[$input_id] != $root_category} *} + + {* {/if} *} diff --git a/admin/themes/default/template/helpers/tree/tree_node_hotel_folder_checkbox.tpl b/admin/themes/default/template/helpers/tree/tree_node_hotel_folder_checkbox.tpl deleted file mode 100644 index 3e826b714..000000000 --- a/admin/themes/default/template/helpers/tree/tree_node_hotel_folder_checkbox.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} -
  • - - {if isset($node['id_hotel'])} - - {* {if isset($node['id_category']) && $node['id_category'] != $root_category} *} - {/if} - - - -
      - {$children|escape:'UTF-8'} -
    -
  • diff --git a/admin/themes/default/template/helpers/tree/tree_node_hotel_item_checkbox.tpl b/admin/themes/default/template/helpers/tree/tree_node_hotel_item_checkbox.tpl deleted file mode 100644 index 4353d6e88..000000000 --- a/admin/themes/default/template/helpers/tree/tree_node_hotel_item_checkbox.tpl +++ /dev/null @@ -1,31 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} -
  • - - - - - -
  • \ No newline at end of file diff --git a/admin/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl b/admin/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl index ba4b7201c..e4db8e373 100644 --- a/admin/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl +++ b/admin/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl @@ -24,8 +24,8 @@ *}
  • - + -
  • \ No newline at end of file + diff --git a/admin/themes/default/template/helpers/tree/tree_node_item_radio.tpl b/admin/themes/default/template/helpers/tree/tree_node_item_radio.tpl index 68fdb1b3c..fd03456fa 100644 --- a/admin/themes/default/template/helpers/tree/tree_node_item_radio.tpl +++ b/admin/themes/default/template/helpers/tree/tree_node_item_radio.tpl @@ -24,7 +24,7 @@ *}
  • - + diff --git a/classes/helper/HelperTree.php b/classes/helper/HelperTree.php new file mode 100644 index 000000000..f3545e058 --- /dev/null +++ b/classes/helper/HelperTree.php @@ -0,0 +1,135 @@ + +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*/ + +class HelperTreeCore extends TreeCore +{ + + const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_radio.tpl'; + const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_radio.tpl'; + + + private $_use_search; + private $_use_bulk_actions; + private $_use_checkbox; + private $_show_collapse_expand_button = true; + + + public function setUseSearch($value) + { + $this->_use_search = (bool)$value; + return $this; + } + + public function useSearch() + { + return (isset($this->_use_search) && $this->_use_search); + } + + public function setUseBulkActions($value) + { + $this->_use_bulk_actions = (bool)$value; + return $this; + } + + public function useBulkActions() + { + return (isset($this->_use_bulk_actions) && $this->_use_bulk_actions); + } + + public function setUseCheckBox($value) + { + $this->_use_checkbox = (bool)$value; + return $this; + } + + public function useCheckBox() + { + return (isset($this->_use_checkbox) && $this->_use_checkbox); + } + + public function setShowCollapseExpandButton($value) + { + $this->_show_collapse_expand_button = (bool)$value; + return $this; + } + + public function showCollapseExpandButton() + { + return (isset($this->_show_collapse_expand_button) && $this->_show_collapse_expand_button); + } + + public function render($data = null) + { + + if ($this->useCheckBox()) { + if($this->useBulkActions()) { + $check_all = new TreeToolbarLink( + 'Check All', + '#', + 'checkAll($(\'#'.$this->getId().'\')); return false;', + 'icon-check-sign'); + $check_all->setAttribute('id', 'check-all-'.$this->getId()); + $uncheck_all = new TreeToolbarLink( + 'Uncheck All', + '#', + 'uncheckAll($(\'#'.$this->getId().'\')); return false;', + 'icon-check-empty'); + $uncheck_all->setAttribute('id', 'uncheck-all-'.$this->getId()); + $this->addAction($check_all); + $this->addAction($uncheck_all); + } + $this->setNodeFolderTemplate('tree_node_folder_checkbox.tpl'); + $this->setNodeItemTemplate('tree_node_item_checkbox.tpl'); + $this->setAttribute('use_checkbox', $this->useCheckBox()); + } + + if ($this->useSearch()) { + $this->addAction(new TreeToolbarSearch( + 'dasdasd', + $this->getId().'-search') + ); + $this->setAttribute('use_search', $this->useSearch()); + } + + if ($this->showCollapseExpandButton()) { + $collapse_all = new TreeToolbarLink( + 'Collapse All', + '#', + '$(\'#'.$this->getId().'\').tree(\'collapseAll\');$(\'#collapse-all-'.$this->getId().'\').hide();$(\'#expand-all-'.$this->getId().'\').show(); return false;', + 'icon-collapse-alt'); + $collapse_all->setAttribute('id', 'collapse-all-'.$this->getId()); + $expand_all = new TreeToolbarLink( + 'Expand All', + '#', + '$(\'#'.$this->getId().'\').tree(\'expandAll\');$(\'#collapse-all-'.$this->getId().'\').show();$(\'#expand-all-'.$this->getId().'\').hide(); return false;', + 'icon-expand-alt'); + $expand_all->setAttribute('id', 'expand-all-'.$this->getId()); + $this->addAction($collapse_all); + $this->addAction($expand_all); + } + + + return parent::render($data); + } + + + + +} \ No newline at end of file diff --git a/classes/helper/HelperTreeCategories.php b/classes/helper/HelperTreeCategories.php index 7b9e04b0a..4c328122c 100644 --- a/classes/helper/HelperTreeCategories.php +++ b/classes/helper/HelperTreeCategories.php @@ -32,6 +32,7 @@ class HelperTreeCategoriesCore extends TreeCore private $_disabled_categories; private $_input_name; + private $_input_id; private $_lang; private $_root_category; private $_selected_categories; @@ -69,6 +70,8 @@ class HelperTreeCategoriesCore extends TreeCore foreach ($categories[$rootCategoryId] as $category) { $categoryId = (int)$category['id_category']; $tree[$categoryId] = $category; + $tree[$categoryId]['value'] = $category['id_category']; + $tree[$categoryId]['input_name'] = 'categoryBox'; if (Category::hasChildren($categoryId, $this->getLang(), false, $this->getShop()->id)) { $categoryChildren = Category::getChildren( @@ -144,7 +147,8 @@ class HelperTreeCategoriesCore extends TreeCore } $tree = Category::getCategoryInformations(array($root_category), $lang); - + $tree[$root_category]['value'] = $tree[$root_category]['id_category']; + $tree[$root_category]['input_name'] = 'categoryBox'; $children = $this->fillTree($categories, $root_category); if (!empty($children)) { @@ -214,6 +218,21 @@ class HelperTreeCategoriesCore extends TreeCore return $this->_input_name; } + public function setInputId($value) + { + $this->_input_id = $value; + return $this; + } + + public function getInputId() + { + if (!isset($this->_input_id)) { + $this->setInputId('id_category'); + } + + return $this->_input_id; + } + public function setLang($value) { $this->_lang = $value; @@ -229,24 +248,6 @@ class HelperTreeCategoriesCore extends TreeCore return $this->_lang; } - public function getNodeFolderTemplate() - { - if (!isset($this->_node_folder_template)) { - $this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE); - } - - return $this->_node_folder_template; - } - - public function getNodeItemTemplate() - { - if (!isset($this->_node_item_template)) { - $this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE); - } - - return $this->_node_item_template; - } - public function setRootCategory($value) { if (!Validate::isInt($value)) { @@ -304,15 +305,6 @@ class HelperTreeCategoriesCore extends TreeCore return $this->_shop; } - public function getTemplate() - { - if (!isset($this->_template)) { - $this->setTemplate(self::DEFAULT_TEMPLATE); - } - - return $this->_template; - } - public function setUseCheckBox($value) { $this->_use_checkbox = (bool)$value; @@ -449,6 +441,7 @@ class HelperTreeCategoriesCore extends TreeCore $this->getContext()->smarty )->assign(array( 'input_name' => $this->getInputName(), + 'input_id' => $this->getInputId(), 'children' => $this->renderNodes($item['children']), 'node' => $item ))->fetch(); @@ -458,6 +451,7 @@ class HelperTreeCategoriesCore extends TreeCore $this->getContext()->smarty )->assign(array( 'input_name' => $this->getInputName(), + 'input_id' => $this->getInputId(), 'node' => $item ))->fetch(); } diff --git a/classes/helper/HelperTreeHotels.php b/classes/helper/HelperTreeHotels.php deleted file mode 100644 index dd142943a..000000000 --- a/classes/helper/HelperTreeHotels.php +++ /dev/null @@ -1,485 +0,0 @@ - -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -class HelperTreeHotelsCore extends TreeCore -{ - const DEFAULT_TEMPLATE = 'tree_categories.tpl'; - const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_radio.tpl'; - const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_radio.tpl'; - - private $_disabled_categories; - private $_input_name; - private $_lang; - private $_root_category; - private $_selected_hotels; - private $_selected_room_types; - private $_full_tree = false; - private $_shop; - private $_use_checkbox; - private $_use_bulk_actions = true; - private $_use_search; - private $_use_shop_restriction; - private $_rooms_only = false; - private $_disable_all_categories = false; - private $_accessed_hotels = false; - - public function __construct($id, $title = null, $root_category = null, - $lang = null, $use_shop_restriction = true) - { - parent::__construct($id); - - if (isset($title)) { - $this->setTitle($title); - } - - if (isset($root_category)) { - $this->setRootCategory($root_category); - } - - $this->setLang($lang); - $this->setUseShopRestriction($use_shop_restriction); - } - - private function fillTree($hotels, $onlyRoomType = false) - { - $tree = array(); - $idLang = Context::getContext()->language->id; - $objRoomType = new HotelRoomType(); - foreach($hotels as $hotel) { - - if (!$onlyRoomType) { - $tree[$hotel['id_hotel']] = array( - 'id_hotel' => $hotel['id_hotel'], - 'id_category' => $hotel['id_category'], - 'name' => $hotel['hotel_name'], - 'children' => array() - ); - } - - if (!empty($roomTypes = $objRoomType->getRoomTypeByHotelId($hotel['id_hotel'], $idLang))) { - if ($onlyRoomType) { - $tree = array_merge($tree, $roomTypes); - } else { - $tree[$hotel['id_hotel']]['children'] = array_merge($tree[$hotel['id_hotel']]['children'], $roomTypes); - } - } - } - - return $tree; - } - - public function getData() - { - if (!isset($this->_data)) { - $shop = $this->getShop(); - $lang = $this->getLang(); - $root_category = (int)$this->getRootCategory(); - if (($hotels = $this->getAccessedHotels()) === false) { - $objHotelBanch = new HotelBranchInformation(); - $hotels = $objHotelBanch->hotelBranchesInfo(); - } - $tree = $this->fillTree($hotels, $this->_rooms_only); - if (!empty($children)) { - $tree[$root_category]['children'] = $children; - } - - $this->setData($tree); - $this->setDataSearch(Category::getAllCategoriesName($root_category, $lang, false, null, $this->useShopRestriction())); - } - - return $this->_data; - } - - public function setRoomsOnly($value) - { - $this->_rooms_only = $value; - return $this; - } - - public function setFullTree($value) - { - $this->_full_tree = $value; - return $this; - } - - public function getFullTree() - { - return $this->_full_tree; - } - - - public function setDisabledCategories($value) - { - $this->_disabled_categories = $value; - return $this; - } - - public function setAccessedHotels($values) - { - $this->_accessed_hotels = $values; - return $this; - } - - public function getAccessedHotels() - { - return $this->_accessed_hotels; - } - - public function setDisablAllCategories($value) - { - $this->_disable_all_categories = $value; - return $this; - } - - public function getDisabledCategories() - { - return $this->_disabled_categories; - } - - public function getDisablAllCategories() - { - return $this->_disable_all_categories; - } - - public function setInputName($value) - { - $this->_input_name = $value; - return $this; - } - - public function getInputName() - { - if (!isset($this->_input_name)) { - $this->setInputName('categoryBox'); - } - - return $this->_input_name; - } - - public function setLang($value) - { - $this->_lang = $value; - return $this; - } - - public function getLang() - { - if (!isset($this->_lang)) { - $this->setLang($this->getContext()->employee->id_lang); - } - - return $this->_lang; - } - - public function getNodeFolderTemplate() - { - if (!isset($this->_node_folder_template)) { - $this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE); - } - - return $this->_node_folder_template; - } - - public function getNodeItemTemplate() - { - if (!isset($this->_node_item_template)) { - $this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE); - } - - return $this->_node_item_template; - } - - public function setRootCategory($value) - { - if (!Validate::isInt($value)) { - throw new PrestaShopException('Root category must be an integer value'); - } - - $this->_root_category = $value; - return $this; - } - - public function getRootCategory() - { - return $this->_root_category; - } - - public function setSelectedHotels($value) - { - if (!is_array($value)) { - throw new PrestaShopException('Selected categories value must be an array'); - } - - $this->_selected_hotels = $value; - return $this; - } - - public function getSelectedHotels() - { - if (!isset($this->_selected_hotels)) { - $this->_selected_hotels = array(); - } - - return $this->_selected_hotels; - } - - public function setSelectedRoomTypes($value) - { - if (!is_array($value)) { - throw new PrestaShopException('Selected categories value must be an array'); - } - - $this->_selected_room_types = $value; - return $this; - } - - public function getSelectedRoomTypes() - { - if (!isset($this->_selected_room_types)) { - $this->_selected_room_types = array(); - } - - return $this->_selected_room_types; - } - - public function setShop($value) - { - $this->_shop = $value; - return $this; - } - - public function getShop() - { - if (!isset($this->_shop)) { - if (Tools::isSubmit('id_shop')) { - $this->setShop(new Shop(Tools::getValue('id_shop'))); - } elseif ($this->getContext()->shop->id) { - $this->setShop(new Shop($this->getContext()->shop->id)); - } elseif (!Shop::isFeatureActive()) { - $this->setShop(new Shop(Configuration::get('PS_SHOP_DEFAULT'))); - } else { - $this->setShop(new Shop(0)); - } - } - - return $this->_shop; - } - - public function getTemplate() - { - if (!isset($this->_template)) { - $this->setTemplate(self::DEFAULT_TEMPLATE); - } - - return $this->_template; - } - - public function setUseCheckBox($value) - { - $this->_use_checkbox = (bool)$value; - return $this; - } - - public function setUseBulkActions($value) - { - $this->_use_bulk_actions = (bool)$value; - return $this; - } - - public function setUseSearch($value) - { - $this->_use_search = (bool)$value; - return $this; - } - - public function setUseShopRestriction($value) - { - $this->_use_shop_restriction = (bool)$value; - return $this; - } - - public function useCheckBox() - { - return (isset($this->_use_checkbox) && $this->_use_checkbox); - } - - public function useBulkActions() - { - return (isset($this->_use_bulk_actions) && $this->_use_bulk_actions); - } - - public function useSearch() - { - return (isset($this->_use_search) && $this->_use_search); - } - - public function useShopRestriction() - { - return (isset($this->_use_shop_restriction) && $this->_use_shop_restriction); - } - - public function render($data = null) - { - if (!isset($data)) { - $data = $this->getData(); - } - - if (isset($this->_disabled_categories) - && !empty($this->_disabled_categories)) { - $this->_disableCategories($data, $this->getDisabledCategories()); - } - - if($this->getDisablAllCategories()) { - $this->_disableCategories($data); - } - - //Default bootstrap style of search is push-right, so we add this button first - if ($this->useSearch()) { - $this->addAction(new TreeToolbarSearchCategories( - 'Find a category:', - $this->getId().'-categories-search') - ); - $this->setAttribute('use_search', $this->useSearch()); - } - - $collapse_all = new TreeToolbarLink( - 'Collapse All', - '#', - '$(\'#'.$this->getId().'\').tree(\'collapseAll\');$(\'#collapse-all-'.$this->getId().'\').hide();$(\'#expand-all-'.$this->getId().'\').show(); return false;', - 'icon-collapse-alt'); - $collapse_all->setAttribute('id', 'collapse-all-'.$this->getId()); - - $expand_all = new TreeToolbarLink( - 'Expand All', - '#', - '$(\'#'.$this->getId().'\').tree(\'expandAll\');$(\'#collapse-all-'.$this->getId().'\').show();$(\'#expand-all-'.$this->getId().'\').hide(); return false;', - 'icon-expand-alt'); - $expand_all->setAttribute('id', 'expand-all-'.$this->getId()); - $this->addAction($collapse_all); - $this->addAction($expand_all); - - if ($this->useCheckBox()) { - if ($this->useBulkActions()) { - $check_all = new TreeToolbarLink( - 'Check All', - '#', - 'checkAllAssociatedHotels($(\'#'.$this->getId().'\'));return false;', - 'icon-check-sign'); - $check_all->setAttribute('id', 'check-all-'.$this->getId()); - $uncheck_all = new TreeToolbarLink( - 'Uncheck All', - '#', - 'uncheckAllAssociatedHotels($(\'#'.$this->getId().'\'));return false;', - 'icon-check-empty'); - $uncheck_all->setAttribute('id', 'uncheck-all-'.$this->getId()); - $this->addAction($check_all); - $this->addAction($uncheck_all); - } - - $this->setNodeFolderTemplate('tree_node_hotel_folder_checkbox.tpl'); - $this->setNodeItemTemplate('tree_node_hotel_item_checkbox.tpl'); - $this->setAttribute('use_checkbox', $this->useCheckBox()); - } - - $this->setAttribute('selected_hotels', $this->getSelectedHotels()); - $this->setAttribute('selected_roomtypes', $this->getSelectedRoomTypes()); - $this->getContext()->smarty->assign('root_category', Configuration::get('PS_ROOT_CATEGORY')); - $this->getContext()->smarty->assign('token', Tools::getAdminTokenLite('AdminProducts')); - return parent::render($data); - } - - /* Override */ - public function renderNodes($data = null) - { - if (!isset($data)) { - $data = $this->getData(); - } - - if (!is_array($data) && !$data instanceof Traversable) { - throw new PrestaShopException('Data value must be an traversable array'); - } - - $html = ''; - foreach ($data as $item) { - if (array_key_exists('children', $item)) { - $html .= $this->getContext()->smarty->createTemplate( - $this->getTemplateFile($this->getNodeFolderTemplate()), - $this->getContext()->smarty - )->assign(array( - 'input_name' => 'hotelBox', - 'children' => $this->renderNodes($item['children']), - 'node' => $item - ))->fetch(); - } else { - $html .= $this->getContext()->smarty->createTemplate( - $this->getTemplateFile($this->getNodeItemTemplate()), - $this->getContext()->smarty - )->assign(array( - 'input_name' => 'roomTypeBox', - 'node' => $item - ))->fetch(); - } - } - - return $html; - } - - private function _disableCategories(&$categories, $disabled_categories = null) - { - foreach ($categories as &$category) { - if (!isset($disabled_categories) || in_array($category['id_category'], $disabled_categories)) { - $category['disabled'] = true; - if (array_key_exists('children', $category) && is_array($category['children'])) { - self::_disableCategories($category['children']); - } - } elseif (array_key_exists('children', $category) && is_array($category['children'])) { - self::_disableCategories($category['children'], $disabled_categories); - } - } - } - - private function _getSelectedChildNumbers(&$categories, $selected, &$parent = null) - { - $selected_childs = 0; - - foreach ($categories as $key => &$category) { - if (isset($parent) && in_array($category['id_category'], $selected)) { - $selected_childs++; - } - - if (isset($category['children']) && !empty($category['children'])) { - $selected_childs += $this->_getSelectedChildNumbers($category['children'], $selected, $category); - } - } - - if (!isset($parent['selected_childs'])) { - $parent['selected_childs'] = 0; - } - - $parent['selected_childs'] = $selected_childs; - return $selected_childs; - } -} diff --git a/classes/helper/HelperTreeShops.php b/classes/helper/HelperTreeShops.php index dfda87060..1f66edab0 100644 --- a/classes/helper/HelperTreeShops.php +++ b/classes/helper/HelperTreeShops.php @@ -68,24 +68,6 @@ class HelperTreeShopsCore extends TreeCore return $this->_lang; } - public function getNodeFolderTemplate() - { - if (!isset($this->_node_folder_template)) { - $this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE); - } - - return $this->_node_folder_template; - } - - public function getNodeItemTemplate() - { - if (!isset($this->_node_item_template)) { - $this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE); - } - - return $this->_node_item_template; - } - public function setSelectedShops($value) { if (!is_array($value)) { @@ -105,15 +87,6 @@ class HelperTreeShopsCore extends TreeCore return $this->_selected_shops; } - public function getTemplate() - { - if (!isset($this->_template)) { - $this->setTemplate(self::DEFAULT_TEMPLATE); - } - - return $this->_template; - } - public function render($data = null, $use_default_actions = true, $use_selected_shop = true) { if (!isset($data)) { diff --git a/classes/tree/Tree.php b/classes/tree/Tree.php index db720f1de..fe5f7817f 100644 --- a/classes/tree/Tree.php +++ b/classes/tree/Tree.php @@ -191,7 +191,7 @@ class TreeCore public function getHeaderTemplate() { if (!isset($this->_headerTemplate)) { - $this->setHeaderTemplate(self::DEFAULT_HEADER_TEMPLATE); + $this->setHeaderTemplate(static::DEFAULT_HEADER_TEMPLATE); } return $this->_headerTemplate; @@ -217,7 +217,7 @@ class TreeCore public function getNodeFolderTemplate() { if (!isset($this->_node_folder_template)) { - $this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE); + $this->setNodeFolderTemplate(static::DEFAULT_NODE_FOLDER_TEMPLATE); } return $this->_node_folder_template; @@ -232,7 +232,7 @@ class TreeCore public function getNodeItemTemplate() { if (!isset($this->_node_item_template)) { - $this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE); + $this->setNodeItemTemplate(static::DEFAULT_NODE_ITEM_TEMPLATE); } return $this->_node_item_template; @@ -247,7 +247,7 @@ class TreeCore public function getTemplate() { if (!isset($this->_template)) { - $this->setTemplate(self::DEFAULT_TEMPLATE); + $this->setTemplate(static::DEFAULT_TEMPLATE); } return $this->_template; @@ -271,7 +271,7 @@ class TreeCore { if (!isset($this->_template_directory)) { $this->_template_directory = $this->_normalizeDirectory( - self::DEFAULT_TEMPLATE_DIRECTORY); + static::DEFAULT_TEMPLATE_DIRECTORY); } return $this->_template_directory; diff --git a/config/defines.inc.php b/config/defines.inc.php index 4a86b1930..3e319225f 100644 --- a/config/defines.inc.php +++ b/config/defines.inc.php @@ -26,7 +26,7 @@ /* Debug only */ if (!defined('_PS_MODE_DEV_')) { - define('_PS_MODE_DEV_', false); + define('_PS_MODE_DEV_', true); } /* Compatibility warning */ define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false); diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index 29204f4e2..3d794c1a5 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -2875,7 +2875,7 @@ class AdminNormalProductsControllerCore extends AdminController { if (Validate::isLoadedObject($product)) { $objRoomTypeServiceProduct = new RoomTypeServiceProduct(); - $associatedRoomTypes = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id)['room_types']; + $associatedRoomTypes = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id)['room_type']; if (Product::SERVICE_PRODUCT_WITH_ROOMTYPE == $product->service_product_type) { $selectedRoomTypes = Tools::getValue('roomTypeBox'); @@ -3499,18 +3499,16 @@ class AdminNormalProductsControllerCore extends AdminController $objRoomTypeServiceProduct = new RoomTypeServiceProduct(); $selectedElements = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id); - $tree = new HelperTreeHotels('associated-hotels-tree', 'Associated hotels'); - $tree->setTemplate('tree_associated_hotels.tpl') - ->setHeaderTemplate('tree_associated_header.tpl') - ->setRootCategory((int)Configuration::get('PS_LOCATIONS_CATEGORY')) - ->setUseCheckBox(true) - ->setFullTree(true) - ->setRoomsOnly(false) - ->setSelectedHotels($selectedElements['hotels']) - ->setSelectedRoomTypes($selectedElements['room_types']) - ->setUseBulkActions(true) - ->setAccessedHotels(HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 0)); + $tree = new HelperTree('hotels-tree'); + $tree->setData(HotelHelper::generateTreeData([ + // 'rootNode' => HotelHelper::NODE_HOTEL, + // 'leafNode' => HotelHelper::NODE_ROOM_TYPE, + 'selectedElements' => $selectedElements + ])) + ->setUseCheckBox(true) + ->setUseBulkActions(true) + ->setUseSearch(true); $data->assign('hotel_tree', $tree->render()); // TinyMCE diff --git a/controllers/admin/AdminPatternsController.php b/controllers/admin/AdminPatternsController.php index 11456fcc1..d49df4cad 100644 --- a/controllers/admin/AdminPatternsController.php +++ b/controllers/admin/AdminPatternsController.php @@ -375,7 +375,7 @@ class AdminPatternsControllerCore extends AdminController 'root_category' => 1, 'id' => 'id_category', 'name' => 'name_category', - 'selected_categories' => array(3), + 'selected_categories' => array(3, 8), ) ), array( diff --git a/controllers/admin/AdminSearchController.php b/controllers/admin/AdminSearchController.php index 4d5cd5237..1b4812a05 100644 --- a/controllers/admin/AdminSearchController.php +++ b/controllers/admin/AdminSearchController.php @@ -246,7 +246,7 @@ class AdminSearchControllerCore extends AdminController } } else if ($associatedData = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product['id_product'])) { $count = 0; - foreach ($associatedData['room_types'] as $id_room_type) { + foreach ($associatedData['room_type'] as $id_room_type) { $objRoomType = new HotelRoomType($id_room_type); if (in_array($objRoomType->id_hotel, $accessibleHotels)) { $count += 1; diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index 1b3057831..b6e6f1030 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -2521,4 +2521,182 @@ class HotelHelper return $isValid; } + + /** + * This function is a utility function for creating an associative array for generating tree + * provide tree structure in the following format + * country --> root + * state + * city + * hotel + * room_type + * room --> leaf + * + * You can edit the start and end point to generate tree for different levels + * @param $start + * @param $end + * @param $start_element_id int|array + * @param $selected_elements int|array + */ + + const NODE_COUNTRY = 1; + const NODE_STATE = 2; + const NODE_CITY = 3; + const NODE_HOTEL = 4; + const NODE_ROOM_TYPE = 5; + const NODE_ROOM = 6; + + public static function generateTreeData($params) + { + // $rootNode = 'country' + // $leafNode = 'room' + // $startElementId = false + // $selectedElements = array() + + + extract($params); + + if (!isset($rootNode)) { + $rootNode = self::NODE_COUNTRY; + } + if (!isset($leafNode)) { + $leafNode = self::NODE_ROOM; + } + if (!isset($leafNode)) { + $selectedElements = array(); + } + $rootNodeId = false; + $treeData = array(); + if ($rootNode <= self::NODE_COUNTRY && $leafNode >= self::NODE_COUNTRY) { + self::generateCountryTree($treeData, $rootNode, $rootNodeId, $selectedElements); + } + if ($rootNode <= self::NODE_STATE && $leafNode >= self::NODE_STATE) { + self::generateStateTree($treeData, $rootNode, $rootNodeId, $selectedElements); + + } + if ($rootNode <= self::NODE_CITY && $leafNode >= self::NODE_CITY) { + self::generateCityTree($treeData, $rootNode, $rootNodeId, $selectedElements); + + } + if ($rootNode <= self::NODE_HOTEL && $leafNode >= self::NODE_HOTEL) { + self::generateHotelTree($treeData, $rootNode, $rootNodeId, $selectedElements); + } + if ($rootNode <= self::NODE_ROOM_TYPE && $leafNode >= self::NODE_ROOM_TYPE) { + self::generateRoomTypeTree($treeData, $rootNode, $rootNodeId, $selectedElements); + + } + if ($rootNode <= self::NODE_ROOM && $leafNode >= self::NODE_ROOM) { + self::generateRoomTree($treeData, $rootNode, $rootNodeId, $selectedElements); + } + // $objHotelInfo = new HotelBranchInformation(); + // if ($hotels = $objHotelInfo->hotelBranchesInfo()) { + // foreach ($hotels as $hotel) { + // $objRoomType = new HotelRoomType(); + // if ($roomTypes = $objRoomType->getRoomTypeByHotelId($hotel['id'], Context::getContext()->language->id)) { + // foreach ($roomTypes as &$roomType) { + // $objHotelRoomInformation = new HotelRoomInformation(); + // if ($rooms = $objHotelRoomInformation->getHotelRoomInfoByProductId($roomType['id_product'])) { + // foreach ($rooms as &$room) { + // $room = array( + // 'name' => $room['room_num'], + // 'input_name' => 'room', + // 'value' => $room['id'] + // ); + + // if (isset($selectedElements['room']) && in_array($room['id'], $selectedElements['room'])) { + // $room['selected'] = true; + // } + // } + // } + // $roomType = array( + // 'name' => $roomType['room_type'], + // 'input_name' => 'roomTypeBox', + // 'value' => $roomType['id_product'], + // 'children' => $rooms + // ); + // if (isset($selectedElements['room_type']) && in_array($roomType['id_product'], $selectedElements['room_type'])) { + // $roomType['selected'] = true; + // } + // } + // } + + // $hotel = array( + // 'name' => $hotel['hotel_name'], + // 'input_name' => 'hotelBox', + // 'value' => $hotel['id'], + // 'children' => $roomTypes + // ); + // if (isset($selectedElements['hotel']) && in_array($hotel['id'], $selectedElements['hotel'])) { + // $hotel['selected'] = true; + // } + // $treeData[] = array( + // 'name' => $hotel['hotel_name'], + // 'input_name' => 'hotelBox', + // 'value' => $hotel['id'], + // 'children' => $roomTypes + // ); + // } + // } + ddd($treeData); + return $treeData; + } + + public static function generateHotelTree(&$treeData, $rootNode, $rootNodeId) + { + // $objHotelInfo = new HotelBranchInformation(); + // if ($hotels = $objHotelInfo->hotelBranchesInfo()) { + // } + + } + public static function generateRoomTypeTree(&$treeData, $rootNode, $rootNodeId) + { + + } + public static function generateRoomTree(&$treeData, $rootNode, $rootNodeId) + { + + } + + public static function generateCountryTree(&$treeData, $rootNode, $rootNodeId) + { + $locationCategory = new Category(Configuration::get('PS_LOCATIONS_CATEGORY')); + + if ($countries = Db::getInstance()->executeS( + 'SELECT cl.`id_category` as `value` , cl.`name` as `name` + FROM `'._DB_PREFIX_.'category_lang` AS cl + INNER JOIN `'._DB_PREFIX_.'category` AS c ON (cl.`id_category` = c.`id_category`) + WHERE c.`id_parent` = '.(int)Configuration::get('PS_LOCATIONS_CATEGORY').' and cl.`id_lang`='.(int)Context::getContext()->language->id.' + GROUP BY cl.`name`' + )) { + foreach ($countries as $country) { + $country['input_name'] = 'countryBox'; + if (isset($selectedElements['country']) && in_array($country['id'], $selectedElements['country'])) { + $country['selected'] = true; + } + $treeData[$country['value']] = $country; + } + } + } + public static function generateStateTree(&$treeData, $rootNode, $rootNodeId) + { + if ($states = Db::getInstance()->executeS( + 'SELECT cl.`id_category` as `value` , cl.`name` as `name` + FROM `'._DB_PREFIX_.'category_lang` AS cl + INNER JOIN `'._DB_PREFIX_.'category` AS c ON (cl.`id_category` = c.`id_category`) + WHERE c.`id_parent` = '.(int)Configuration::get('PS_LOCATIONS_CATEGORY').' and cl.`id_lang`='.(int)Context::getContext()->language->id.' + GROUP BY cl.`name`' + )) { + foreach ($states as $country) { + $country['input_name'] = 'countryBox'; + if (isset($selectedElements['country']) && in_array($country['id'], $selectedElements['country'])) { + $country['selected'] = true; + } + $treeData[$country['value']] = $country; + } + } + } + public static function generateCityTree(&$treeData, $rootNode, $rootNodeId) + { + + } } diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php index 5acb6ef60..d2e2ff350 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php @@ -107,9 +107,9 @@ class RoomTypeServiceProduct extends ObjectModel ); if ($formated) { - $response = array('hotels' => array(), 'room_types' => array()); + $response = array('hotel' => array(), 'room_type' => array()); foreach($rows as $row) { - $key = $row['element_type'] == self::WK_ELEMENT_TYPE_HOTEL ? 'hotels' : 'room_types'; + $key = $row['element_type'] == self::WK_ELEMENT_TYPE_HOTEL ? 'hotel' : 'room_type'; $response[$key][] = $row['id_element']; } return $response; From 13cb862eabc987426eab0a9c0d7ffd5831d2d79e Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Sat, 3 Aug 2024 11:38:47 +0530 Subject: [PATCH 40/76] Updated the meta.xml for the index page meta descriptions and meta title, also updated some text related to prestashop to QloApps --- install/data/xml/configuration.xml | 2 +- install/dev/update_eu_taxrulegroups.php | 2 +- install/langs/bg/data/meta.xml | 4 ++-- install/langs/bn/data/meta.xml | 4 ++-- install/langs/br/data/meta.xml | 6 +++--- install/langs/cs/data/meta.xml | 4 ++-- install/langs/de/data/meta.xml | 6 +++--- install/langs/de/data/order_state.xml | 2 +- install/langs/en/data/meta.xml | 4 ++-- install/langs/es/data/meta.xml | 6 +++--- install/langs/es/mail_identifiers.txt | 2 +- install/langs/fa/data/meta.xml | 4 ++-- install/langs/fr/data/meta.xml | 4 ++-- install/langs/he/data/meta.xml | 4 ++-- install/langs/hr/data/meta.xml | 4 ++-- install/langs/hu/data/meta.xml | 4 ++-- install/langs/id/data/meta.xml | 6 +++--- install/langs/it/data/meta.xml | 6 +++--- install/langs/lt/data/meta.xml | 4 ++-- install/langs/mk/data/meta.xml | 4 ++-- install/langs/nl/data/meta.xml | 6 +++--- install/langs/no/data/meta.xml | 4 ++-- install/langs/pl/data/meta.xml | 6 +++--- install/langs/pt/data/meta.xml | 6 +++--- install/langs/qc/data/meta.xml | 4 ++-- install/langs/ro/data/meta.xml | 4 ++-- install/langs/ru/data/meta.xml | 6 +++--- install/langs/si/data/meta.xml | 4 ++-- install/langs/sr/data/meta.xml | 4 ++-- install/langs/sv/data/meta.xml | 4 ++-- install/langs/tw/data/meta.xml | 6 +++--- install/langs/vn/data/meta.xml | 4 ++-- install/langs/zh/data/meta.xml | 4 ++-- install/theme/rtl.css | 2 +- install/theme/view.css | 2 +- install/theme/views/header.phtml | 2 +- 36 files changed, 75 insertions(+), 75 deletions(-) diff --git a/install/data/xml/configuration.xml b/install/data/xml/configuration.xml index be03b27c3..ab955c1f2 100644 --- a/install/data/xml/configuration.xml +++ b/install/data/xml/configuration.xml @@ -777,7 +777,7 @@ localhost - PrestaShop + QloApps pub@qloapps.com diff --git a/install/dev/update_eu_taxrulegroups.php b/install/dev/update_eu_taxrulegroups.php index 1d3dfa53d..7f4410893 100644 --- a/install/dev/update_eu_taxrulegroups.php +++ b/install/dev/update_eu_taxrulegroups.php @@ -36,7 +36,7 @@ $localizationPacksRoot = realpath(dirname(__FILE__) . '/../../localization'); if (!$localizationPacksRoot) { - die("Could not find the folder containing the localization files (should be 'localization' at the root of the PrestaShop folder).\n"); + die("Could not find the folder containing the localization files (should be 'localization' at the root of the QloApps folder).\n"); } $euLocalizationFiles = array(); diff --git a/install/langs/bg/data/meta.xml b/install/langs/bg/data/meta.xml index 62896ab65..a0348d1be 100644 --- a/install/langs/bg/data/meta.xml +++ b/install/langs/bg/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/bn/data/meta.xml b/install/langs/bn/data/meta.xml index 5a6ac00ea..5b2aae2fd 100644 --- a/install/langs/bn/data/meta.xml +++ b/install/langs/bn/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>PrestaShop দ্বারা চালিত</description> + <title>হোটেল প্রাইম + এটি এমন একটি স্থান যেখানে আরাম এবং বিলাসিতা প্রকৃতির সাথে মিলিত হয়েছে! diff --git a/install/langs/br/data/meta.xml b/install/langs/br/data/meta.xml index 420965fe5..c3c5632ee 100644 --- a/install/langs/br/data/meta.xml +++ b/install/langs/br/data/meta.xml @@ -19,9 +19,9 @@ entrar-em-contato-conosco - - <description>Loja desenvolvida pela PrestaShop</description> - <keywords>shop, prestashop</keywords> + <title>Hotel Prime + Um lugar onde o conforto e o luxo se misturam com a natureza! + diff --git a/install/langs/cs/data/meta.xml b/install/langs/cs/data/meta.xml index fee7a64b4..2479d6894 100644 --- a/install/langs/cs/data/meta.xml +++ b/install/langs/cs/data/meta.xml @@ -19,8 +19,8 @@ napiste-nam - - <description>Website powered by Webkul™</description> + <title>Hotel Prime + Místo, kde se komfort a luxus mísí s přírodou! diff --git a/install/langs/de/data/meta.xml b/install/langs/de/data/meta.xml index 40cab6b97..fcd3fd07d 100644 --- a/install/langs/de/data/meta.xml +++ b/install/langs/de/data/meta.xml @@ -19,9 +19,9 @@ kontaktieren-sie-uns - - <description>Website powered by Webkul</description> - <keywords>Shop, prestashop</keywords> + <title>Hotel Prime + Ein Ort, an dem Komfort und Luxus mit der Natur verschmelzen! + diff --git a/install/langs/de/data/order_state.xml b/install/langs/de/data/order_state.xml index 65b042db0..ad480e2f2 100644 --- a/install/langs/de/data/order_state.xml +++ b/install/langs/de/data/order_state.xml @@ -25,7 +25,7 @@ - Zahlung ausserhalb von PrestaShop eingegangen + Fernzahlung akzeptiert diff --git a/install/langs/en/data/meta.xml b/install/langs/en/data/meta.xml index 2133a7871..0f749e6be 100644 --- a/install/langs/en/data/meta.xml +++ b/install/langs/en/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/es/data/meta.xml b/install/langs/es/data/meta.xml index c4c470c55..1f458199f 100644 --- a/install/langs/es/data/meta.xml +++ b/install/langs/es/data/meta.xml @@ -19,9 +19,9 @@ contactanos - - <description>Tienda creada con PrestaShop</description> - <keywords>tienda, prestashop</keywords> + <title>Hotel Prime + ¡Un lugar donde el confort y el lujo se mezclan con la naturaleza! + diff --git a/install/langs/es/mail_identifiers.txt b/install/langs/es/mail_identifiers.txt index 685c56930..f27326f60 100644 --- a/install/langs/es/mail_identifiers.txt +++ b/install/langs/es/mail_identifiers.txt @@ -8,4 +8,4 @@ Tu información personal en {shop_name} es: {shop_name} - {shop_url} -{shop_url} desarrollado por PrestaShop® \ No newline at end of file +{shop_url} impulsado por Webkul™ \ No newline at end of file diff --git a/install/langs/fa/data/meta.xml b/install/langs/fa/data/meta.xml index 9383db838..304e6893f 100644 --- a/install/langs/fa/data/meta.xml +++ b/install/langs/fa/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>فروشگاه قدرت گرفته از پرستاشاپ</description> + <title>هتل پرایم + مکانی که در آن راحتی و لوکس بودن با طبیعت ترکیب شده‌اند! diff --git a/install/langs/fr/data/meta.xml b/install/langs/fr/data/meta.xml index 6cc7ba3d8..88b3194db 100644 --- a/install/langs/fr/data/meta.xml +++ b/install/langs/fr/data/meta.xml @@ -19,8 +19,8 @@ nous-contacter - - <description>Boutique propulsée par PrestaShop</description> + <title>Hôtel Prime + Un endroit où le confort et le luxe se mélangent avec la nature ! diff --git a/install/langs/he/data/meta.xml b/install/langs/he/data/meta.xml index 3d5652917..99e781273 100644 --- a/install/langs/he/data/meta.xml +++ b/install/langs/he/data/meta.xml @@ -19,8 +19,8 @@ צור-קשר - - <description>החנות מופעלת באמצעות פרסטהשופ</description> + <title>מלון פריים + מקום שבו נוחות ולוקסוס משתלבים עם הטבע! diff --git a/install/langs/hr/data/meta.xml b/install/langs/hr/data/meta.xml index fbaefdcda..1d581d99d 100644 --- a/install/langs/hr/data/meta.xml +++ b/install/langs/hr/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/hu/data/meta.xml b/install/langs/hu/data/meta.xml index ee3c90826..ac5e8dd65 100644 --- a/install/langs/hu/data/meta.xml +++ b/install/langs/hu/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/id/data/meta.xml b/install/langs/id/data/meta.xml index ebf743ab5..8d3f437fb 100644 --- a/install/langs/id/data/meta.xml +++ b/install/langs/id/data/meta.xml @@ -19,9 +19,9 @@ hubungi-kami - - <description>didukung oleh PrestaShop</description> - <keywords>shop, prestashop</keywords> + <title>Hotel Prime + Tempat di mana kenyamanan dan kemewahan berpadu dengan alam! + diff --git a/install/langs/it/data/meta.xml b/install/langs/it/data/meta.xml index 6ef49e751..302524d29 100644 --- a/install/langs/it/data/meta.xml +++ b/install/langs/it/data/meta.xml @@ -19,9 +19,9 @@ contattarci - - <description>Negozio powered by Webkul</description> - <keywords>negozio, prestashop</keywords> + <title>Hotel Prime +Un luogo dove il comfort e il lusso si mescolano con la natura! + diff --git a/install/langs/lt/data/meta.xml b/install/langs/lt/data/meta.xml index 838e3c6de..3bcb5c8ee 100644 --- a/install/langs/lt/data/meta.xml +++ b/install/langs/lt/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + Vieta, kur komfortas ir prabanga dera su gamta! diff --git a/install/langs/mk/data/meta.xml b/install/langs/mk/data/meta.xml index 7288c073d..a54ff9ab2 100644 --- a/install/langs/mk/data/meta.xml +++ b/install/langs/mk/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/nl/data/meta.xml b/install/langs/nl/data/meta.xml index 8c256986b..3a6cfe94d 100644 --- a/install/langs/nl/data/meta.xml +++ b/install/langs/nl/data/meta.xml @@ -19,9 +19,9 @@ contact-met-ons-opnemen - - <description>Winkel gerund met behulp van PrestaShop</description> - <keywords>shop, prestashop</keywords> + <title>Hotel Prime + Een plek waar comfort en luxe samengaan met de natuur! + diff --git a/install/langs/no/data/meta.xml b/install/langs/no/data/meta.xml index cc40b43f6..40ec6e42d 100644 --- a/install/langs/no/data/meta.xml +++ b/install/langs/no/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/pl/data/meta.xml b/install/langs/pl/data/meta.xml index 0b62baf89..f0883de05 100644 --- a/install/langs/pl/data/meta.xml +++ b/install/langs/pl/data/meta.xml @@ -19,9 +19,9 @@ kontakt - - <description>Sklep na oprogramowaniu PrestaShop</description> - <keywords>sklep, prestashop</keywords> + <title>Hotel Prime + Miejsce, gdzie komfort i luksus łączą się z naturą! + diff --git a/install/langs/pt/data/meta.xml b/install/langs/pt/data/meta.xml index 0fbfef774..37659029f 100644 --- a/install/langs/pt/data/meta.xml +++ b/install/langs/pt/data/meta.xml @@ -19,9 +19,9 @@ contacte-nos - - <description>Loja powered by Webkul</description> - <keywords>loja</keywords> + <title>Hotel Prime + Um lugar onde o conforto e o luxo se misturam com a natureza! + diff --git a/install/langs/qc/data/meta.xml b/install/langs/qc/data/meta.xml index dd3c5eabd..551c9e9e9 100644 --- a/install/langs/qc/data/meta.xml +++ b/install/langs/qc/data/meta.xml @@ -19,8 +19,8 @@ nous-contacter - - <description>Boutique propulsée par PrestaShop</description> + <title>Hôtel Prime + Un endroit où le confort et le luxe se mêlent à la nature ! diff --git a/install/langs/ro/data/meta.xml b/install/langs/ro/data/meta.xml index 74eb40996..c69586419 100644 --- a/install/langs/ro/data/meta.xml +++ b/install/langs/ro/data/meta.xml @@ -19,8 +19,8 @@ contact - - <description>Magazin motorizat de PrestaShop</description> + <title>Hotel Prime + Un loc unde confortul și luxul se îmbină cu natura! diff --git a/install/langs/ru/data/meta.xml b/install/langs/ru/data/meta.xml index 60eb00227..51a0e7cc9 100644 --- a/install/langs/ru/data/meta.xml +++ b/install/langs/ru/data/meta.xml @@ -19,9 +19,9 @@ contact-us - - <description>Магазин создан на PrestaShop</description> - <keywords>магазин, prestashop</keywords> + <title>Отель Прайм + Место, где комфорт и роскошь сочетаются с природой! + diff --git a/install/langs/si/data/meta.xml b/install/langs/si/data/meta.xml index 8071183e7..97bc8ba23 100644 --- a/install/langs/si/data/meta.xml +++ b/install/langs/si/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/sr/data/meta.xml b/install/langs/sr/data/meta.xml index c59bfba2c..556ff7f13 100644 --- a/install/langs/sr/data/meta.xml +++ b/install/langs/sr/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/sv/data/meta.xml b/install/langs/sv/data/meta.xml index b51c88dce..804a3178f 100644 --- a/install/langs/sv/data/meta.xml +++ b/install/langs/sv/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/langs/tw/data/meta.xml b/install/langs/tw/data/meta.xml index f7daa4372..13529fe4f 100644 --- a/install/langs/tw/data/meta.xml +++ b/install/langs/tw/data/meta.xml @@ -19,9 +19,9 @@ contact-us - - <description>網站以 PrestaShop 建置</description> - <keywords>shop, prestashop</keywords> + <title>Prime 酒店 + 一個舒適與奢華與自然融合的地方! + diff --git a/install/langs/vn/data/meta.xml b/install/langs/vn/data/meta.xml index 432f3d828..197805e11 100644 --- a/install/langs/vn/data/meta.xml +++ b/install/langs/vn/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul™</description> + <title>Khách sạn Prime + Nơi mà sự thoải mái và sang trọng hòa quyện với thiên nhiên! diff --git a/install/langs/zh/data/meta.xml b/install/langs/zh/data/meta.xml index 702769a56..29f672f67 100644 --- a/install/langs/zh/data/meta.xml +++ b/install/langs/zh/data/meta.xml @@ -19,8 +19,8 @@ contact-us - - <description>Website powered by Webkul</description> + <title>Hotel Prime + A place where comfort and luxury are blended with nature! diff --git a/install/theme/rtl.css b/install/theme/rtl.css index 8be292208..0d90266ff 100644 --- a/install/theme/rtl.css +++ b/install/theme/rtl.css @@ -69,7 +69,7 @@ div.field .userInfos{ padding:7px 0 8px 15px; background:transparent url(img/bg-phone_block.png) no-repeat left top; } -#header #PrestaShopLogo{ +#header #QloAppsLogo{ float:right; margin:5px 10px 0 0; } diff --git a/install/theme/view.css b/install/theme/view.css index 95593aa66..5f6d4b65f 100644 --- a/install/theme/view.css +++ b/install/theme/view.css @@ -329,7 +329,7 @@ div.field { background:transparent url(img/bg-phone_block.png) no-repeat right top; } -#header #PrestaShopLogo { +#header #QloAppsLogo { float:left; margin:5px 0 0 10px; height: 51px; diff --git a/install/theme/views/header.phtml b/install/theme/views/header.phtml index db3b9bfc6..9572eb881 100644 --- a/install/theme/views/header.phtml +++ b/install/theme/views/header.phtml @@ -37,7 +37,7 @@
  • l('Blog') ?>
  • - + From 10b299d8ed0239e020758b424ccb4003db85d4f6 Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Mon, 5 Aug 2024 17:05:07 +0530 Subject: [PATCH 41/76] Updated helper tree| created new helper tree for generating tree --- admin/themes/default/sass/partials/_tree.sass | 5 + .../normal_products/helpers/tree/tree.tpl | 39 ++ .../normal_products/informations.tpl | 4 +- .../default/template/helpers/tree/tree.tpl | 121 +++--- .../helpers/tree/tree_node_folder.tpl | 6 + .../tree/tree_node_folder_checkbox.tpl | 13 +- .../helpers/tree/tree_node_folder_radio.tpl | 12 +- .../template/helpers/tree/tree_node_item.tpl | 6 + .../helpers/tree/tree_node_item_checkbox.tpl | 6 + .../helpers/tree/tree_node_item_radio.tpl | 6 + classes/helper/HelperTree.php | 21 +- classes/tree/Tree.php | 23 +- .../admin/AdminNormalProductsController.php | 6 +- .../classes/HotelHelper.php | 356 ++++++++++++------ 14 files changed, 430 insertions(+), 194 deletions(-) create mode 100644 admin/themes/default/template/controllers/normal_products/helpers/tree/tree.tpl diff --git a/admin/themes/default/sass/partials/_tree.sass b/admin/themes/default/sass/partials/_tree.sass index 897c29f85..9d382680e 100644 --- a/admin/themes/default/sass/partials/_tree.sass +++ b/admin/themes/default/sass/partials/_tree.sass @@ -7,6 +7,7 @@ font-size: $icon-size-base .tree list-style: none + overflow: auto @include padding(0, 0, 0, 20px) input vertical-align: baseline @@ -42,6 +43,10 @@ &:hover color: #ccc background-color: none + .node-hint + font-style: italic + color: #959595 + margin-left: 30px .tree-actions display: inline-block diff --git a/admin/themes/default/template/controllers/normal_products/helpers/tree/tree.tpl b/admin/themes/default/template/controllers/normal_products/helpers/tree/tree.tpl new file mode 100644 index 000000000..ce2479919 --- /dev/null +++ b/admin/themes/default/template/controllers/normal_products/helpers/tree/tree.tpl @@ -0,0 +1,39 @@ +{* +* Since 2010 Webkul. +* +* NOTICE OF LICENSE +* +* All right is reserved, +* Please go through this link for complete license : https://store.webkul.com/license.html +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to newer +* versions in the future. If you wish to customize this module for your +* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} +{extends file="helpers/tree/tree.tpl"} + \ No newline at end of file diff --git a/admin/themes/default/template/controllers/normal_products/informations.tpl b/admin/themes/default/template/controllers/normal_products/informations.tpl index 49537d7dd..81088a6b0 100644 --- a/admin/themes/default/template/controllers/normal_products/informations.tpl +++ b/admin/themes/default/template/controllers/normal_products/informations.tpl @@ -234,13 +234,13 @@
    service_product_type == Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}style="display:none;"{/if}>
    {include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}
    -