Latest News: (loading..)

Gyakutsuki

♥Ambassador
  • Content count

    608
  • Joined

  • Last visited

  • Days Won

    13

Gyakutsuki last won the day on November 29 2016

Gyakutsuki had the most liked content!

About Gyakutsuki

Profile Information

  • Real Name
    Loic Richard
  • Gender
    Male
  • Location
    Montreal
  • Skype
    loic.richard

Recent Profile Visitors

39,083 profile views
  1. How to make a boostrap modal with external element in 2.4

     

  2. Hello, I will have a big problem with the actual code when you want to insert a modal boostrap with a call to external files. The modal displays the header and the footer inside. This tutorial help you to include a modal boostrap with an external element inside the modal without the header and the footer Thank you to @Harald Ponce de Leon for this help. I hope, it will be integrate inside the core. 1 step : include a new function in /OM/PagesAbstract.php just before public function useSiteTemplate() add public function setUseSiteTemplate($bool) { $this->use_site_template = ($bool === true); } 2nd step : Modal boostrap now we suppose you want to include a modal inside a file. For example in edit.php Add this element : the modal boostrap where you want. (Sites/Admin/Pages/Home/template/edit.php) <script> $( document ).ready(function() { $("#myModal").on("show.bs.modal", function(e) { var link = $(e.relatedTarget); $(this).find(".modal-body").load(link.attr("href")); }); }); </script> <?php //******************************** // call pop up inside Amin/Pages //********************************* ?> <a href="<?php echo $OSCOM_Manager->link('PopUp'); ?>" data-remote="false" data-toggle="modal" data-target="#myModal" class="btn btn-default">Launch Modal</a> <!-- Default bootstrap modal example --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> 3nd step : PoPup Actions In Sites/Admin/Pages/Home/Actions Create a class called PopUp.php namespace OSC\Apps\Communication\PageManager\Sites\Admin\Pages\Home\Actions; use OSC\OM\Registry; use OSC\OM\HTML; class PopUp extends \OSC\OM\PagesActionsAbstract { public function execute() { $this->page->setUseSiteTemplate(false); // ad this function inside the files $this->page->setFile('popup.php'); } } 4 step : Popup template In Sites/Admin/Pages/Home/templates Create a class called pop_up.php <?php use OSC\OM\HTML; ?> <div class="row"> <div class="col-sm-12"> <div class="panel panel-primary"> <div class="panel-heading">Heading</div> <div class="panel-body"> Put Your stuff in here <?php echo HTML::inputField('example', 'toto'); ?> </div> </div> </div> </div> That's all ! After you can continue your code with save, insert, update ...
  3. Erratum : <?php echo HTML::form('contact', OSCOM::link('index.php', 'Info&Contact&Process'), 'post', 'enctype="multipart/form-data"', ['tokenize' => true]); ?> by <?php echo HTML::form('contact', $OSCOM_Manager->link('index.php&Info&Contact&Process'), 'post', 'enctype="multipart/form-data"', ['tokenize' => true]); ?> If an administrator can change inside the first. it will be cool.
  4. @Frankl and the communty has created a great example about APP. But this example does'nt have elements to create a page in front office. This tuto resolve this point. You will the base to develop you own page We want to create a new enhanced contact us page for example This example don't give you all the code about the admin, classes .... Just the necessary to create a catalog page Below you will find all the code to start correctly ? After you must complete the elements by your own code Note : In App you can : Create page In admin Create page in Shop Add content in Shop (header / content / footer) Add Hook inside a page (like action, save, delete, insert, update) Add module like order total, payment, shipping ... You can not : Create a boxe (I tried with no success) : use the default osc approach Create a header_tag : use the default osc approach Go back to our code ! Step one oscommerce.json add Shop Element Info&Contact will be your link to access via the catalog Sites\\Shop\\Pages\\Manager is the location about the files and process "routes": { "Admin": "Sites\\Admin\\Pages\\Home", "Shop": { "Info&Contact": "Sites\\Shop\\Pages\\Manager" } } Step 2 Create your directories Apps -Communication --Manager ---languages ----- english ------- Sites ---------Shop ----------Manager ---Sites -----Shop ------Pages -------Manager --------Actions ----------Contact --------templates Step 3 Now in directories languages/english/...../Manager create contact.txt add heading_title = Contact US Step 4 Now in directories Sites/Shop/Pages/Manager create a file Manager.php Add namespace OSC\Apps\Communication\Manager\Sites\Shop\Pages\Manager; use OSC\OM\Registry; use OSC\Apps\Communication\Manager\Manager as ManagerAPP; class Manager extends \OSC\OM\PagesAbstract { public $app; protected function init() { $OSCOM_Manager = new ManagerAPP(); Registry::set('ManagerAPP', $OSCOM_Manager); $this->app = Registry::get('Manager'); $this->app->loadDefinitions('Sites/Shop/main'); // not necessary } } Step 5 Now in directories Sites/Shop/Pages/Manager/Actions create a file Contact.php Add namespace OSC\Apps\Communication\Manager\Sites\Shop\Pages\Manager\Actions; use OSC\OM\OSCOM; use OSC\OM\Registry; use OSC\OM\HTML; class Contact extends \OSC\OM\PagesActionsAbstract { public function execute() { global $breadcrumb, $OSCOM_Manager; $OSCOM_Manager = Registry::get('Manager'); // display or not the page (admin action) if (!defined('OSC_APP_MANAGER_STATUS') || !in_array(OSC_APP_MANAGER_STATUS, [ '1', '0' ])) { return false; } $this->page->setFile('contact.php'); $this->page->data['action'] = 'Contact'; //language $OSCOM_Manager->loadDefinitions('Sites/Shop/Manager/contact'); $breadcrumb->add(OSCOM_Manager->getDef('navbar_title'), OSCOM_Manager->link('index.php', 'Info&Contact')); } } Step 6 Now in directories Sites/Shop/Pages/Manager/Actions/Contact create a file Process.php Add namespace OSC\Apps\Communication\Manager\Sites\Shop\Pages\Manager\Actions\Contact; use OSC\OM\Registry; class Process extends \OSC\OM\PagesActionsAbstract { public function execute() { $OSCOM_Manager = Registry::get('Manager'); ------- your code to manage the process about the form ----- // Redirect on other page $OSCOM_Manager->redirect('index.php', 'Info&Contact&Success'); } } Step 7 Now in directories Sites/Shop/Pages/Manager/templates create a file contact.php Add <?php use OSC\OM\OSCOM; use OSC\OM\Registry; use OSC\OM\HTML; ?> <div class="page-header"> <h1><?php echo $OSCOM_PageManager->getDef('heading_title'); ?></h1> </div> <?php echo HTML::form('contact', OSCOM::link('index.php', 'Info&Contact&Process'), 'post', 'enctype="multipart/form-data"', ['tokenize' => true]); ?> ---- you can continue with your code ---- Step 8 Now to access at your page : http://www.mysite/catalog/index.php?Info&Contact
  5. Nice explanation, I will create a normal module :)
  6. @frankl I just insert the essential element, of course the namespace are inside the files else it doe'nt work. Yes @Harald Ponce de Leon can tell us if it's possible to insert in apps a Boxe. configuration_value : bm_categories.php;boxes/Communication\Manager\BOXEPAGEMANAGER
  7. Tk @Gergely Maybe it's just a little thing, but I don't see. In oscommerce2/catalog/admin/modules.php?set=boxes I don't must see the boxe Bd configuration, I have this : configuration_key : MODULE_BOXES_INSTALLED configuration_value : bm_categories.php;boxes/Communication\Manager\BOXEPAGEMANAGER My json "modules": { "AdminMenu": { "Manager": "Module\\Admin\\Menu\\Manager" }, "Content": { "index": { "MANAGER": "Module\\Content\\MANAGER" }, "boxes": { "BOXEMANAGER": "Module\\Content\\BOXEMANAGER" } } }, In OSC\Apps\Communication\Manager\Module\Admin\Config\BOXEMANAGER I have this classes class BOXEMANAGER extends \OSC\Apps\Communication\Manager\Module\Admin\Config\ConfigAbstract { // protected $bm_code = 'bm_manager'; protected $bm_code = 'BOXEMANAGER'; public $is_uninstallable = true; public $sort_order = 400; protected function init() { $this->title = $this->app->getDef('module_pm_boxe_title'); $this->short_title = $this->app->getDef('module_pm_boxe_short_title'); $this->introduction = $this->app->getDef('module_pm_boxe_introduction'); $this->is_installed = defined('OSC_APP_MANAGER_BOXEMANAGER_STATUS') && (trim(OSC_APP_MANAGER_BOXEMANAGER_STATUS) != ''); } public function install() { parent::install(); $installed = explode(';', MODULE_BOXES_INSTALLED); $installed[] = 'boxes/' . $this->app->vendor . '\\' . $this->app->code . '\\' . $this->code; $this->app->saveCfgParam('MODULE_BOXES_INSTALLED', implode(';', $installed)); } public function uninstall() { parent::uninstall(); $installed = explode(';', MODULE_BOXES_INSTALLED); $installed_pos = array_search('boxes/' . $this->app->vendor . '\\' . $this->app->code . '\\' . $this->code, $installed); if ($installed_pos !== false) { unset($installed[$installed_pos]); $this->app->saveCfgParam('MODULE_BOXES_INSTALLED', implode(';', $installed)); } } } and in Content directory: OSC\Apps\Communication\Manager\Module\Content; class BOXEMANAGER implements \OSC\OM\Modules\ContentInterface { public $code; public $group; public $title; public $description; public $sort_order; public $enabled; public $app; function __construct() { if (!Registry::exists('Manager')) { Registry::set('Manager', new ManagerApp()); } $this->app = Registry::get('Manager'); $this->app->loadDefinitions('Module/Content/boxe_manager'); // $this->code = 'bm_manager'; $this->code = 'BOXEMANAGER'; // $this->group = ((OSC_APP_MANAGER_BOXEMANAGER_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); $this->group = 'boxes_column_left'; $this->title = $this->app->getDef('module_manager_boxes_title'); $this->description = '<div align="center">' . HTML::button($this->app->getDef('module_manager_boxes_legacy_admin_app_button'), null, $this->app->link('Configure&module=Manager'), null, 'btn-primary') . '</div>'; $this->sort_order = defined('OSC_APP_MANAGER_BOXEMANAGER_SORT_ORDER') ? OSC_APP_MANAGER_BOXEMANAGER_SORT_ORDER : 0; if (OSC_APP_MANAGER_BOXEMANAGER_STATUS < '1') { $this->enabled = false; } else { $this->enabled = true; } } function execute() { global $oscTemplate; $data = '<!-- boxe manager start-->' . "\n"; $link = Manager::ManagerDisplayBox(); ob_start(); include(__DIR__ . '/templates/manager_boxes.php'); $data .= ob_get_clean(); $data .='<!-- Boxe manager end -->' . "\n"; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('OSC_APP_MANAGER_BOXEMANAGER_STATUS'); } function install() { $this->app->redirect('Configure&Install&module=BOXEMANAGER'); } function remove() { $this->app->redirect('Configure&Uninstall&module=BOXEMANAGER'); } function keys() { return array('OSCOM_APP_BOXEMANAGER_CONTENT_WIDTH', 'OSC_APP_MANAGER_BOXEMANAGER_PLACEMENT', 'OSC_APP_MANAGER_BOXEMANAGER_SORT_ORDER' ); } }
  8. @Harald Ponce de Leon @frankl@Gergely @Gergely Hello, I created an app and this app must display a boxe (like categories). I would know if it's possible ? Do you tried to create a boxe on 2.4 ? Tk Inside my DB in MODULE_BOXES_INSTALLED, I have this element, it's ok bm_categories.php;boxes/Communication\Manager\BOXEMANAGER But this element in front office is not display and the module content inside apps is not read. the admin module is not display in the boxe content section. in json, I have this. "Content": { "index": { "MANAGER": "Module\\Content\\MANAGER" }, "boxes": { "BOXEMANAGER": "Module\\Content\\BOXEMANAGER" } } },
  9. @Harald Ponce de Leon Ok I tried to update this add on : https://apps.oscommerce.com/Edit&oZXO0 to include the forum link an image The update does'nt seem work. update link + image : does'nt work update support link : does'nt work. process : yesterday : include the add on today : try to update to include image and support link. photo with size : 320 x 180 png
  10. ok, Tk to @Harald Ponce de Leon for the solution. In my code html I inserted <form> </form>at the wrong place ! Seems to work now !
  11. @Gergely The code : Look Google AI is the hooks All information are inside the form but the hooks elements inside the form is not sent : Id Nom Type Valeur Label Poids Longueur maximale pages_id hidden 37 page_manager button title pages_title_ 64 schdate page_date_start date expdate page_date_closed date sort_order 0 The code : Look Google AI is the hooks All informations are inside the form but the hooks elements inside the form is not sent like you can see above : <!DOCTYPE html> <html html_params> <head> <meta http-equiv="Content-Type" content="text/html; charset=charset"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noindex,nofollow"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>title</title> <base href="http://test/oscommerce2/catalog/admin/" /> <meta name="generator" content="osCommerce Online Merchant" /> <link rel="stylesheet" type="text/css" href="http://test/oscommerce2/catalog/ext/jquery/ui/redmond/jquery-ui-1.11.4.min.css"> <script type="text/javascript" src="http://test/oscommerce2/catalog/ext/jquery/jquery-3.1.1.min.js"></script> <script type="text/javascript" src="http://test/oscommerce2/catalog/ext/jquery/ui/jquery-ui-1.11.4.min.js"></script> <link href="http://test/oscommerce2/catalog/ext/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="http://test/oscommerce2/catalog/ext/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link href="http://test/oscommerce2/catalog/ext/smartmenus/jquery.smartmenus.bootstrap.css" rel="stylesheet"> <link href="http://test/oscommerce2/catalog/ext/chartist/chartist.min.css" rel="stylesheet"> <script type="text/javascript" src="http://test/oscommerce2/catalog/ext/jquery/ui/i18n/datepicker-jquery_datepicker_i18n_code.js"></script> <script type="text/javascript"> $.datepicker.setDefaults($.datepicker.regional['jquery_datepicker_i18n_code']); </script> <link rel="stylesheet" type="text/css" href="http://test/oscommerce2/catalog/public/Sites/Admin/Templates/Sail/css/stylesheet.css"> <script src="http://test/oscommerce2/catalog/public/Sites/Admin/js/general.js"></script> </head> <body> <div class="navbar navbar-default navbar-static-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="http://test/oscommerce2/catalog/admin/index.php"><i class="fa fa-home"></i></a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li><a>admin_menu_shop <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a>admin_menu_shop_catalog <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/categories.php">admin_menu_shop_catalog_categories</a></li> </ul> </li><li><a>admin_menu_shop_configuration <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/administrators.php">admin_menu_shop_configuration_administrators</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=1">My Store</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=2">Minimum Values</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=3">Maximum Values</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=4">Images</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=5">Customer Details</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=7">Shipping/Packaging</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=8">Product Listing</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=9">Stock</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=10">Logging</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=12">E-Mail Options</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=13">Download</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=14">GZip Compression</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=15">Sessions</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=16">Bootstrap Setup</a></li><li><a href="http://test/oscommerce2/catalog/admin/configuration.php?gID=17">HTTP/API Settings</a></li> </ul> </li><li><a>admin_menu_shop_orders <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/orders.php">admin_menu_shop_orders_orders</a></li> </ul> </li><li><a>admin_menu_shop_tools <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/action_recorder.php">admin_menu_shop_tools_action_recorder</a></li><li><a href="http://test/oscommerce2/catalog/admin/backup.php">admin_menu_shop_tools_backup</a></li><li><a href="http://test/oscommerce2/catalog/admin/banner_manager.php">admin_menu_shop_tools_banner_manager</a></li><li><a href="http://test/oscommerce2/catalog/admin/cache.php">admin_menu_shop_tools_cache</a></li><li><a href="http://test/oscommerce2/catalog/admin/online_update.php">admin_menu_shop_tools_online_update</a></li><li><a href="http://test/oscommerce2/catalog/admin/server_info.php">admin_menu_shop_tools_server_info</a></li> </ul> </li> </ul> </li> <li><a>admin_menu_apps <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="http://test/oscommerce2/catalog/admin/apps.php">Manage</a></li> <li class="divider"></li><li><a>Related Products <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/index.php?A&FrankL%5CRelated&Admin">Admin</a></li><li><a href="http://test/oscommerce2/catalog/admin/index.php?A&FrankL%5CRelated&Configure">Configure</a></li> </ul> </li><li><a>PayPal <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/index.php?A&PayPal%5CPayPal">Start</a></li> </ul> </li> </ul> </li> <li><a>admin_menu_legacy <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a>box_heading_catalog <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/products_attributes.php">box_catalog_categories_products_attributes</a></li><li><a href="http://test/oscommerce2/catalog/admin/manufacturers.php">box_catalog_manufacturers</a></li><li><a href="http://test/oscommerce2/catalog/admin/products_expected.php">box_catalog_products_expected</a></li><li><a href="http://test/oscommerce2/catalog/admin/reviews.php">box_catalog_reviews</a></li><li><a href="http://test/oscommerce2/catalog/admin/specials.php">box_catalog_specials</a></li> </ul> </li><li><a>box_heading_configuration <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/store_logo.php">box_configuration_store_logo</a></li> </ul> </li><li><a>box_heading_customers <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/customers.php">box_customers_customers</a></li> </ul> </li><li><a>box_heading_localization <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/currencies.php">box_localization_currencies</a></li><li><a href="http://test/oscommerce2/catalog/admin/languages.php">box_localization_languages</a></li><li><a href="http://test/oscommerce2/catalog/admin/orders_status.php">box_localization_orders_status</a></li> </ul> </li><li><a>box_heading_location_and_taxes <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/countries.php">box_taxes_countries</a></li><li><a href="http://test/oscommerce2/catalog/admin/geo_zones.php">box_taxes_geo_zones</a></li><li><a href="http://test/oscommerce2/catalog/admin/tax_classes.php">box_taxes_tax_classes</a></li><li><a href="http://test/oscommerce2/catalog/admin/tax_rates.php">box_taxes_tax_rates</a></li><li><a href="http://test/oscommerce2/catalog/admin/zones.php">box_taxes_zones</a></li> </ul> </li><li><a>box_heading_modules <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=action_recorder">module_cfg_module_action_recorder_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=boxes">module_cfg_module_boxes_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=navbar_modules">module_cfg_module_content_navbar_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=dashboard">module_cfg_module_dashboard_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=header_tags">module_cfg_module_header_tags_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=order_total">module_cfg_module_order_total_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=payment">module_cfg_module_payment_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=shipping">module_cfg_module_shipping_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules.php?set=social_bookmarks">module_cfg_module_social_bookmarks_title</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules_content.php">modules_admin_menu_modules_content</a></li><li><a href="http://test/oscommerce2/catalog/admin/modules_hooks.php">modules_admin_menu_modules_hooks</a></li> </ul> </li><li><a>box_heading_reports <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/stats_customers.php">box_reports_orders_total</a></li><li><a href="http://test/oscommerce2/catalog/admin/stats_products_purchased.php">box_reports_products_purchased</a></li><li><a href="http://test/oscommerce2/catalog/admin/stats_products_viewed.php">box_reports_products_viewed</a></li> </ul> </li><li><a>box_heading_tools <span class="caret"></span></a> <ul class="dropdown-menu"><li><a href="http://test/oscommerce2/catalog/admin/define_language.php">box_tools_define_language</a></li><li><a href="http://test/oscommerce2/catalog/admin/mail.php">box_tools_mail</a></li><li><a href="http://test/oscommerce2/catalog/admin/newsletters.php">box_tools_newsletter_manager</a></li><li><a href="http://test/oscommerce2/catalog/admin/sec_dir_permissions.php">box_tools_sec_dir_permissions</a></li><li><a href="http://test/oscommerce2/catalog/admin/whos_online.php">box_tools_whos_online</a></li><li><a href="http://test/oscommerce2/catalog/admin/database_tables.php">modules_admin_menu_tools_database_tables</a></li><li><a href="http://test/oscommerce2/catalog/admin/security_checks.php">modules_admin_menu_tools_security_checks</a></li><li><a href="http://test/oscommerce2/catalog/admin/transfer_language.php">Transfer Languages</a></li> </ul> </li> </ul> </li> <li><a href="http://test/oscommerce2/catalog/admin/error_log.php"><i class="fa fa-exclamation-circle text-danger"></i></a> <ul class="dropdown-menu"> <li><a href="http://test/oscommerce2/catalog/admin/error_log.php">View Error Log</a></li> </ul> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a>admin <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="http://test/oscommerce2/catalog/admin/login.php?action=logoff">Logoff</a></li> </ul> </li> <li><a><i class="fa fa-language"></i></a> <ul class="dropdown-menu"> <li><a href="http://test/oscommerce2/catalog/admin/index.php?A=&Communication%5CPageManager=&Edit=&bID=37&page=1&language=fr">french</a></li><li><a href="http://test/oscommerce2/catalog/admin/index.php?A=&Communication%5CPageManager=&Edit=&bID=37&page=1&language=en">English</a></li> </ul> </li> <li><a><i class="fa fa-question-circle"></i></a> <ul class="dropdown-menu"> <li><a href="http://test/oscommerce2/catalog/">View Shop</a></li> <li class="divider"></li> <li><a href="https://www.oscommerce.com">osCommerce Website</a></li> <li><a href="https://www.oscommerce.com/Support">Help and Support</a></li> <li><a href="https://library.oscommerce.com">Documentation</a></li> <li><a href="http://forums.oscommerce.com">Community Forum</a></li> </ul> </li> </ul> </div> </div> </div> <div id="contentText" class="container-fluid"> <script type="text/javascript"><!-- function popupImageWindow(url) { window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } //--></script> <script type="text/javascript"> function disableIt(a){ document.getElementById(a).disabled=true; } function enableIt(a){ document.getElementById(a).disabled=false; } </script> <form name="page_manager" action="http://test/oscommerce2/catalog/admin/index.php?A&Communication%5CPageManager&PageManager&Save&page=1" method="post" enctype="multipart/form-data"><input type="hidden" name="pages_id" value="37" /> <div class="contentBody"> <div class="row"> <div class="col-md-12"> <div class="card card-block headerCard"> <div class="row"> <span class="col-md-1 logoHeading"></span> <span class="col-md-5 pageHeading"> Edit page</span> <span class="col-md-6 text-right"> <a href="http://test/oscommerce2/catalog/admin/index.php?A&Communication%5CPageManager&PageManager&page=1&1" class="btn btn-warning">Cancel</a> <button type="submit" class="btn btn-success">Update</button> </span> </div> </div> </div> </div> <br /><br /> <div id="pageManagerTabs" style="overflow: auto;"> <ul class="nav nav-tabs flex-column flex-sm-row" role="tablist" id="myTab"> <li class="nav-item"><a href="#tab1" role="tab" data-toggle="tab" class="nav-link active">General</a></a></li> <li class="nav-item"><a href="#tab3" role="tab" data-toggle="tab" class="nav-link">Description</a></li> </ul> <div class="tabsOSC"> <div class="tab-content"> <!-- ############################################################ //--> <!-- ONGLET Information General //--> <!-- ############################################################ //--> <div class="tab-pane active" id="tab1"> <div class="mainTitle">Page title</div> <div class="adminformTitle"> <div class="row"> <div class="col-md-5"> <div class="form-group row"> <label for="Langue" class="col-5 col-form-label"> <img src="http://test/oscommerce2/catalog/public/third_party/flag-icon-css/flags/4x3/fr.svg" alt="french" title="french" width="16" height="12" /></label> <div class="col-md-5"> <input type="" name="pages_title_" required aria-required="true" id="title" maxlength="64" class="form-control" /> </div> </div> </div> </div> </div> <br /><br /> <div class="mainTitle">Page type</div> <div class="adminformTitle"> <div class="row"> <div class="col-md-5"> <div class="form-group row"> <label for="Page type" class="col-5 col-form-label">Page type</label> <div class="col-md-5"> </div> </div> </div> </div> </div> <br /><br /> <div class="mainTitle">Date</div> <div class="adminformTitle"> <div class="row"> <div class="col-md-5"> <div class="form-group row"> <label for="Start date :" class="col-5 col-form-label">Start date :</label> <div class="col-md-5"> <input type="date" name="page_date_start" id="schdate" class="form-control" /> </div> </div> </div> </div> <div class="row"> <div class="col-md-5"> <div class="form-group row"> <label for="Expires date :" class="col-5 col-form-label">Expires date :</label> <div class="col-md-5"> <input type="date" name="page_date_closed" id="expdate" class="form-control" /> </div> </div> </div> </div> </div> <br /><br /> <div class="mainTitle">Others</div> <div class="adminformTitle"> <div class="row"> <div class="col-md-5"> <div class="form-group row"> <label for="Sort Order :" class="col-5 col-form-label">Sort Order :</label> <div class="col-md-5"> <input type="" name="sort_order" value="0" class="form-control" /> </div> </div> </div> </div> </div> </div> <!-- ######################## --> <!-- Start Google AI --> <!-- ######################## --> <div class="tab-pane" id="section_GoogleChatBotApp_content"> <style> div.input-group-option:last-child span.input-group-addon-remove{ display: none; } div.input-group-option:last-child input.form-control { border-bottom-right-radius: 3px; border-top-right-radius: 3px; } div.input-group-option span.input-group-addon-remove { cursor: pointer; } div.input-group-option{ margin-bottom: 3px; } </style> <input type="hidden" name="id" value="0" /><div class="mainTitle">Write a customer question : Intent</div> <div class="adminformTitle"> <div class="form-group form-group-options col-md-12"> <!-- Button trigger modal --> <div class="col-md-12 text-right"> <button type="button" class="btn-info btn-sm" data-toggle="modal" data-target="#ModalDisplayQuestion"> Display questions </button> </div> <!-- Modal --> <div class="modal fade" id="ModalDisplayQuestion" tabindex="-1" role="dialog" aria-labelledby="ModalDisplayQuestionLongTitle" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="ModalDisplayQuestionLongTitle">Customer question</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <table id="myTableModalQuestion" class="oscom-table table table-sm table-hover"> <thead> <tr> <td width="80%">Customer question</td> <td width="20%">Language</td> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> <table id="myTable" class="table table-sm table-hover order-list oscom-table"> <thead> <tr> <td>Customer question</td> <td>Language</td> </tr> </thead> <tbody> <tr> <td width="80%"><input type="text" name="user_question[0]" id="user_question" placeholder="Write a short question" class="form-control" /></td> <td width="10%"><select name="language[0]" id="language" placeholder="Language" class="form-control"><option value="0">text_all_languages</option><option value="1">en</option><option value="2">fr</option></select></td> <td width="10%"><a id="delete_row" class="deleteRow"></a></td> </tr> </tbody> <tfoot> <tr> <td colspan="5"> <input type="button" class="btn btn-lg btn-block" id="addrow" value="Add question" /> </td> </tr> <tr></tr> </tfoot> </table> </div> </div> <br /><br /> <div class="mainTitle">Choose your options about the bot if you use API.ai (Optional)</div> <div class="adminformTitle"> <div class="col-md-12">Choose your response Option with Google</div> <div class="col-md-12"> Use response from the DEFAULT tab as the first response <input type="checkbox" name="google_select" value="1" /> </div> <div class="col-md-4"><select name="google_choice" class="form-control"><option value="0" selected="selected">-- Choose --</option><option value="1">Simple response</option><option value="2">Basic Card</option><option value="3">Link Out Suggestion</option></select></div> <br /><br /> <div class="col-md-12">Choose your response Option with Facebook messenger</div> <div class="col-md-12"> Use response from the DEFAULT tab as the first response. <input type="checkbox" name="facebook_select" value="1" /> </div> <div class="col-md-4"><select name="facebook_choice" class="form-control"><option value="0" selected="selected">-- Choose --</option><option value="1">Text response</option><option value="2">Image</option><option value="3">Card</option></select></div> <br /><br /> <div class="col-md-12"> Choose your response Option with Telegram. </div> <div class="col-md-12"> Use response from the DEFAULT tab as the first response <input type="checkbox" name="telegram_select" value="1" /> </div> <div class="col-md-4"><select name="telegram_choice" class="form-control"><option value="0" selected="selected">-- Choose --</option><option value="1">Text response</option><option value="2">Image</option><option value="3">Card</option></select></div> </div> <br /><br /> <div class="mainTitle">Bot response</div> <div class="adminformTitle"> <!-- Button trigger modal --> <div class="col-md-12 text-right"> <button type="button" class="btn-info btn-sm" data-toggle="modal" data-target="#ModalDisplayBot"> Bot Response </button> </div> <!-- Modal --> <div class="modal fade" id="ModalDisplayBot" tabindex="-1" role="dialog" aria-labelledby="ModalDisplayBotLongTitle" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="ModalDisplayBotLongTitle">Bot response</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <table id="myTableModalDisplayBot" class="table table-sm table-hover oscom-table"> <thead> <tr class="dataTableHeadingRow"> <td width="80%">Bot response</td> <td width="20%">Language</td> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> <table id="myTableBot" class="table table-sm table-hover order-list-bot oscom-table"> <thead> <tr> <td>Bot response</td> <td>Language</td> </tr> </thead> <tbody> <tr> <td width="80%"><input type="text" name="bot_response[0]" id="bot_response" placeholder="Write a short response" class="form-control" /></td> <td width="10%"><select name="bot_language[0]" id="bot_language" placeholder="Language" class="form-control"><option value="0">text_all_languages</option><option value="1">en</option><option value="2">fr</option></select></td> <td width="10%"><a id="deleteRowBot" class="deleteRowBot"></a></td> </tr> </tbody> <tfoot> <tr> <td colspan="5"> <input type="button" class="btn btn-lg btn-block " id="addRowBot" value="Add response" /> </td> </tr> <tr></tr> </tfoot> </table> </div> </div> <script> $('#section_GoogleChatBotApp_content').appendTo('#pageManagerTabs .tab-content'); $('#pageManagerTabs .nav-tabs').append(' <li class="nav-item"><a data-target="#section_GoogleChatBotApp_content" role="tab" data-toggle="tab" class="nav-link">Chatbot Google API.ai</a></li>'); </script> <script> $(document).ready(function () { var counter = 1; $("#addrow").on("click", function () { var newRow = $("<tr>"); var cols = ""; cols += '<td><input type="text" class="form-control" name="user_question[' + counter + ']"/></td>'; cols += '<td><select name="language[' + counter + ']" id="language[' + counter + ']" placeholder="Language" class="form-control"><option value="2">french</option><option value="1">English</option></select></td>'; cols += '<td><input type="button" class="ibtnDel btn btn-md btn-danger" id="delete_row[' + counter + ']" value="Delete"></td>'; newRow.append(cols); $("table.order-list").append(newRow); counter++; }); $("table.order-list").on("click", ".ibtnDel", function (event) { $(this).closest("tr").remove(); counter -= 1; }); }); </script> <script> $(document).ready(function () { var counter = 1; $("#addRowBot").on("click", function () { var newRow = $("<tr>"); var cols = ""; cols += '<td><input type="text" class="form-control" name="bot_response[' + counter + ']"/></td>'; cols += '<td><select name="bot_language[' + counter + ']" id="bot_language[' + counter + ']" placeholder="Language" class="form-control"><option value="2">french</option><option value="1">English</option></select></td>'; cols += '<td><input type="button" class="ibtnDelBot btn btn-md btn-danger" id="deleteRowBot[' + counter + ']" value="Delete"></td>'; newRow.append(cols); $("table.order-list-bot").append(newRow); counter++; }); $("table.order-list-bot").on("click", ".ibtnDelBot", function (event) { $(this).closest("tr").remove(); counter -= 1 }); }); </script> <!-- ######################## --> <!-- End Google AI --> <!-- ######################## --> </div> </div> </form> </div> </div> <div class="clearfix"></div> <div id="contentText" class="container-fluid"> <div class="pull-right text-right"> <p style="color: #7a8996; border-top: 1px dotted #b2bac0; padding-top: 7px;"><i class="fa fa-heart"></i>, <a href="https://www.oscommerce.com" target="_blank" style="color: #7a8996">osCommerce</a></p> </div> </div> <script> $(function() { var url = document.location.toString(); if (url.match('#')) { if ($('.nav-tabs a[data-target="#' + url.split('#')[1] + '"]').length === 1) { $('.nav-tabs a[data-target="#' + url.split('#')[1] + '"]').tab('show'); } } }); </script> <script src="http://test/oscommerce2/catalog/ext/bootstrap/js/bootstrap.min.js"></script> <script src="http://test/oscommerce2/catalog/ext/smartmenus/jquery.smartmenus.min.js"></script> <script src="http://test/oscommerce2/catalog/ext/smartmenus/jquery.smartmenus.bootstrap.min.js"></script> <script src="http://test/oscommerce2/catalog/ext/mustache/mustache.min.js"></script> <script src="http://test/oscommerce2/catalog/ext/sortable/sortable.min.js"></script> <script src="http://test/oscommerce2/catalog/ext/chartist/chartist.min.js"></script> </body> </html>
  12. yes, you have right, I am rewriting some elements. let you know
  13. Tk Harald, I have found a "solution" but don't ask me why. Now when I click on Process button, all informations are sent by $_POST I don't know why I have been this problem, I created very lot of Hooks and I have never had this problem. look myNewTabs element one is called myNewTabs and other myNewTabs1 <div class="tab-pane" id="section_Test_content"> {$content} {$content1} {$content2} </div> <script> $('#section_Test_content').appendTo('#myNewTabs1 .tab-content'); $('#myNewTabs .nav-tabs').append(' <li class="nav-item"><a data-target="#section_Test_content" role="tab" data-toggle="tab" class="nav-link">{$tab_title}</a></li>'); </script>
  14. Ok, tk Harald, I will test. ok find my pb, must to solve now in my original page, I have this : <div id="tesTabs" style="overflow: auto;"> ..... <?php echo $OSCOM_Hooks->output('testPage', 'Page', null, 'display'); ?> </div> in my hooks I have this <script> $('#section_testApp_content').appendTo('#tesTabs .tab-content'); $('#tesTabs .nav-tabs').append(' <li class="nav-item"><a data-target="#section_testApp_content" role="tab" data-toggle="tab" class="nav-link">{$tab_title}</a></li>'); </script> In normal circonstance, it must work, because my all others pages are like that and works perfectly But in this case, it does'nt work on process form $_POST. if I write this, I break the tab but it works on process form $_POST <script> $('#section_testApp_content').appendTo('#toto .tab-content'); $('#toto .nav-tabs').append(' <li class="nav-item"><a data-target="#section_testApp_content" role="tab" data-toggle="tab" class="nav-link">{$tab_title}</a></li>'); </script> !!!!!