|
From: <os...@us...> - 2012-03-04 20:37:05
|
Revision: 4061
http://oscss.svn.sourceforge.net/oscss/?rev=4061&view=rev
Author: oscim
Date: 2012-03-04 20:36:55 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
Correction coquille nommage class driver sqlgeozone, ajustement des fichier correspondant
Ajout d'une page de gestiion de livraison (shipping) et uen page de gestion des services. Configuration et mise en oeuvre des listing et flag. Les page d'edition ne sont pas fonctionnel .
Ajout d une colonne dans la table shipping , et customers
ajustement et correction des icones des menus en css , ajustement des fichier de menu correpondant
restructuration du menu commercial et orders. changement des intitul?\195?\169s en fr
ajustement du dashbord pour la prise en charge des 2 nouveau tableau de bord
Modified Paths:
--------------
trunk/catalog/Documents/admin/data/dashboard.xml
trunk/catalog/admin/includes/boxes/05_customers.php
trunk/catalog/admin/includes/boxes/07_catalog.php
trunk/catalog/admin/includes/boxes/08_cms.php
trunk/catalog/admin/includes/boxes/09_commercial.php
trunk/catalog/admin/includes/boxes/10_orders.php
trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/05_customers.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php
trunk/catalog/admin/includes/modules/account/history.php
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
trunk/catalog/admin/includes/modules/pages/geo_zones.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/includes/modules/shipping/flat.php
trunk/catalog/install/includes/sql/mysql/tables/osc_customers.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_shipping.sql
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/services/
trunk/catalog/admin/includes/gabarit/services/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/shipping/
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/services.txt
trunk/catalog/admin/includes/modules/pages/services.php
trunk/catalog/admin/includes/modules/pages/shipping.php
Modified: trunk/catalog/Documents/admin/data/dashboard.xml
===================================================================
--- trunk/catalog/Documents/admin/data/dashboard.xml 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/Documents/admin/data/dashboard.xml 2012-03-04 20:36:55 UTC (rev 4061)
@@ -12,25 +12,9 @@
</right>
</admin>
- <home>
- <left>
- <widget>Notification</widget>
- <widget>homeStock</widget>
- <widget>dashbordInfo</widget>
- <widget>quickview</widget>
- <widget>orderStats</widget>
- <widget>customerStats</widget>
- <widget>info_connexion</widget>
- </left>
- <right>
- <widget class="graph" querystring="Sales">salesStats</widget>
- <widget>homeNews</widget>
- </right>
- </home>
-
<catalog>
<left>
<widget>homeStock</widget>
@@ -65,7 +49,61 @@
</right>
</commercial>
+ <configuration>
+ <left>
+ <widget>brief_config</widget>
+ </left>
+ <right>
+ <widget>info_connexion</widget>
+ </right>
+ </configuration>
+
+ <config_100>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_100>
+
+ <config_110>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_110>
+
+ <config_120>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_120>
+
+ <config_126>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_126>
+
+ <config_127>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_127>
+
<customers>
<left>
<!-- <widget>orderStats</widget> -->
@@ -80,20 +118,25 @@
</customers>
- <orders>
+ <home>
<left>
- <widget>orderLastnews</widget>
- <widget>orderLastshipp</widget>
- <widget>orderLastinvoice</widget>
- <widget>orderStats</widget>
+ <widget>Notification</widget>
+ <widget>homeStock</widget>
+
+
+ <widget>dashbordInfo</widget>
+ <widget>quickview</widget>
+ <widget>orderStats</widget>
+ <widget>customerStats</widget>
+ <widget>info_connexion</widget>
</left>
<right>
<widget class="graph" querystring="Sales">salesStats</widget>
- <widget>orderLastmodified</widget>
- <widget>orderLastservice</widget>
+ <widget>homeNews</widget>
</right>
- </orders>
+ </home>
+
<mail>
<left>
@@ -108,6 +151,31 @@
</right>
</mail>
+ <modules>
+ <left>
+<!-- <widget>packageGeneral</widget> -->
+ <widget>packageRepository</widget>
+ </left>
+ <right>
+<!-- <widget>salesStats</widget> -->
+ </right>
+ </modules>
+
+ <orders>
+ <left>
+ <widget>orderLastnews</widget>
+ <widget>orderLastshipp</widget>
+ <widget>orderLastinvoice</widget>
+ <widget>orderStats</widget>
+ </left>
+ <right>
+ <widget class="graph" querystring="Sales">salesStats</widget>
+ <widget>orderLastmodified</widget>
+ <widget>orderLastservice</widget>
+
+ </right>
+ </orders>
+
<tools>
<left>
<widget>currencies_update_server</widget>
@@ -117,24 +185,26 @@
</right>
</tools>
- <modules>
+ <shipping>
<left>
-<!-- <widget>packageGeneral</widget> -->
- <widget>packageRepository</widget>
+ <widget>orderLastnews</widget>
+ <widget>orderLastshipp</widget>
</left>
<right>
-<!-- <widget>salesStats</widget> -->
+ <widget class="graph" querystring="Sales">salesStats</widget>
</right>
- </modules>
+ </shipping>
- <configuration>
+
+ <services>
<left>
- <widget>brief_config</widget>
+ <widget>orderLastnews</widget>
+ <widget>orderLastservice</widget>
</left>
<right>
- <widget>info_connexion</widget>
+ <widget class="graph" querystring="Sales">salesStats</widget>
</right>
- </configuration>
+ </services>
<system>
<left>
@@ -147,44 +217,4 @@
</right>
</system>
- <config_100>
- <left>
- <widget>HelpConfig</widget>
- </left>
- <right>
- <widget>SsMenuConfig</widget>
- </right>
- </config_100>
- <config_110>
- <left>
- <widget>HelpConfig</widget>
- </left>
- <right>
- <widget>SsMenuConfig</widget>
- </right>
- </config_110>
- <config_120>
- <left>
- <widget>HelpConfig</widget>
- </left>
- <right>
- <widget>SsMenuConfig</widget>
- </right>
- </config_120>
- <config_126>
- <left>
- <widget>HelpConfig</widget>
- </left>
- <right>
- <widget>SsMenuConfig</widget>
- </right>
- </config_126>
- <config_127>
- <left>
- <widget>HelpConfig</widget>
- </left>
- <right>
- <widget>SsMenuConfig</widget>
- </right>
- </config_127>
</root>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/boxes/05_customers.php
===================================================================
--- trunk/catalog/admin/includes/boxes/05_customers.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/boxes/05_customers.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,13 +1,12 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 08/06/10, 14:17
+ @version 2.1.1
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
- $tabl_link[]= array(FILENAME_CUSTOMERS, 'BOX_CUSTOMERS_CUSTOMERS', 'customers',@$img['customers']);
- $tabl_link[]= array(FILENAME_CUSTOMERS.'?action=new', 'BOX_CUSTOMERS_CUSTOMERS_ADD_NEW', 'customers',@$img['customers']);
- $tabl_link[]= array(FILENAME_RECOVER_CART_SALES, 'BOX_RECOVER_CART_SALES', 'recover_cart_sales',@$img['recover_cart_sales']);
+ $tabl_link[]= array(FILENAME_CUSTOMERS, 'BOX_CUSTOMERS_CUSTOMERS', 'membres',@$img['suppliers']);
+ $tabl_link[]= array(FILENAME_CUSTOMERS.'?action=new', 'BOX_CUSTOMERS_CUSTOMERS_ADD_NEW', 'membres',@$img['suppliers']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/boxes/07_catalog.php
===================================================================
--- trunk/catalog/admin/includes/boxes/07_catalog.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/boxes/07_catalog.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,14 +1,14 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 19/07/10, 16:25
+ @version 2.1.1
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$tabl_link[]= array(FILENAME_PRODUCTS, 'BOX_CATALOG_PRODUCTS', 'products', @$img['products']);
$tabl_link[]= array(FILENAME_PRODUCTS.'?cPath=&action=new', 'BOX_CATALOG_PRODUCT_ADD', 'product_add', @$img['product_add']);
$tabl_link[]= array(FILENAME_PRODUCTS.'?expected=true', 'BOX_CATALOG_PRODUCTS_EXPECTED', 'products', @$img['products']);
- $tabl_link[]= array(FILENAME_ATTRIBUTES, 'BOX_CATALOG_ATTIBUTES', 'discount_coupon', @$img['discount_coupon']);
+ $tabl_link[]= array(FILENAME_ATTRIBUTES, 'BOX_CATALOG_ATTIBUTES', 'attributes', @$img['attributes']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/boxes/08_cms.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/boxes/08_cms.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,14 +1,14 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 20/07/10, 17:23
+ @version 2.1.1
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$tabl_link[]= array(FILENAME_CATEGORIES, 'BOX_CATALOG_CATEGORIES', 'categories', @$img['categories']);
$tabl_link[]= array(FILENAME_CMS_CONTENT, 'BOX_CMS_CONTENT', 'cms_content',@$img['cms_content']);
$tabl_link[]= array(FILENAME_NAVIGATION_LINKS, 'BOX_NAVIGATION_LINK', 'nav',@$img['navigation_link']);
- $tabl_link[]= array('editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php?type=image', 'BOX_NAVIGATION_IMAGE', 'nav',@$img['navigation_image']);
+ $tabl_link[]= array('editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php?type=image', 'BOX_NAVIGATION_IMAGE', 'images',@$img['navigation_image']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/boxes/09_commercial.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/boxes/09_commercial.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,13 +1,16 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 20/07/10, 19:22
+ @version 2.1.1
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$tabl_link[609]= array('ss_menu', 'BOX_TOOLS_MAIL', 'mail',@$img['mail']);
$tabl_link[609][4][]= array(FILENAME_NEWSLETTERS, 'BOX_TOOLS_NEWSLETTER_MANAGER', 'newsletters',@$img['newsletters']);
$tabl_link[609][4][]= array('newslettersModeles.php', 'BOX_TOOLS_NEWSLETTER_MANAGER_MODELES', 'newsletters',@$img['newsletters']);
+// $tabl_link[609]= array('ss_menu', 'BOX_TOOLS_MAIL', 'mail',@$img['mail']);
+ $tabl_link[]= array(FILENAME_HELD_ORDERS, 'BOX_CUSTOMERS_HELD_ORDERS', 'held_orders',@$img['held_orders']);
+ $tabl_link[]= array(FILENAME_RECOVER_CART_SALES, 'BOX_RECOVER_CART_SALES', 'recover_cart_sales',@$img['recover_cart_sales']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/boxes/10_orders.php
===================================================================
--- trunk/catalog/admin/includes/boxes/10_orders.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/boxes/10_orders.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,19 +1,34 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 13/11/11, 15:59
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
- $tabl_link[]= array(FILENAME_ORDERS.'?view=thisday', 'BOX_CUSTOMERS_ORDERS_THISDAY', 'orders',@$img['orders']);
- $tabl_link[]= array(FILENAME_ORDERS.'?view=opened', 'BOX_CUSTOMERS_ORDERS_OPENED', 'orders',@$img['orders']);
- $tabl_link[]= array(FILENAME_ORDERS.'?view=nopayed', 'BOX_CUSTOMERS_ORDERS_NOPAYED', 'orders',@$img['orders']);
- $tabl_link[]= array(FILENAME_ORDERS.'?view=allnoclosed', 'BOX_CUSTOMERS_ORDERS_ALLNOCLOSED', 'orders',@$img['orders']);
- $tabl_link[]= array(FILENAME_ORDERS, 'BOX_CUSTOMERS_ORDERS_ALL', 'orders',@$img['orders']);
- if(_cst_bool('RMA_RETURN_PRODUCTS_STATUS')) $tabl_link[]= array(FILENAME_RETURNS, 'BOX_RETURNS_HEADING', 'return',@$img['return']);
- $tabl_link[]= array(FILENAME_HELD_ORDERS, 'BOX_CUSTOMERS_HELD_ORDERS', 'held_orders',@$img['held_orders']);
+ $tabl_link[850]= array('ss_menu', 'BOX_CUSTOMERS_ORDERS', 'orders',@$img['orders']);
+ $tabl_link[850][4][]= array(FILENAME_ORDERS.'?view=thisday', 'BOX_CUSTOMERS_ORDERS_THISDAY', 'orders',@$img['orders']);
+ $tabl_link[850][4][]= array(FILENAME_ORDERS.'?view=opened', 'BOX_CUSTOMERS_ORDERS_OPENED', 'orders',@$img['orders']);
+ $tabl_link[850][4][]= array(FILENAME_ORDERS.'?view=nopayed', 'BOX_CUSTOMERS_ORDERS_NOPAYED', 'orders',@$img['orders']);
+ $tabl_link[850][4][]= array(FILENAME_ORDERS.'?view=allnoclosed', 'BOX_CUSTOMERS_ORDERS_ALLNOCLOSED', 'orders',@$img['orders']);
+ $tabl_link[850][4][]= array(FILENAME_ORDERS, 'BOX_CUSTOMERS_ORDERS_ALL', 'orders',@$img['orders']);
+ if(_cst_bool('RMA_RETURN_PRODUCTS_STATUS'))
+ $tabl_link[850][4][]= array(FILENAME_RETURNS, 'BOX_RETURNS_HEADING', 'return',@$img['return']);
+
+
+ $tabl_link[851]= array('ss_menu', 'BOX_CUSTOMERS_SHIPPING', 'shipping',@$img['shipping']);
+ $tabl_link[851][4][]= array('shipping.php?view=opened', 'BOX_CUSTOMERS_SHIPPING_OPENNED', 'orders',@$img['orders']);
+ $tabl_link[851][4][]= array('shipping.php?view=progress', 'BOX_CUSTOMERS_SHIPPING_PROGRESS', 'orders',@$img['orders']);
+ $tabl_link[851][4][]= array('shipping.php?view=clsed', 'BOX_CUSTOMERS_SHIPPING_CLOSE', 'orders',@$img['orders']);
+
+ if( strlen(TYPE_VIRTUAL_PRODUCTS) >= 1) {
+ $tabl_link[852]= array('ss_menu', 'BOX_CUSTOMERS_SERVICES', 'services',@$img['services']);
+ $tabl_link[852][4][]= array('services.php', 'BOX_CUSTOMERS_SERVICES_ALL', 'services',@$img['services']);
+ $tabl_link[852][4][]= array('services.php?view=opened', 'BOX_CUSTOMERS_SERVICES_ACTIVED', 'services',@$img['services']);
+ $tabl_link[852][4][]= array('services.php?view=closed', 'BOX_CUSTOMERS_SERVICES_INACTIVED', 'services',@$img['services']);
+ }
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,10 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/11/11, 09:50
+ @date 01/11/12, 09:50
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class geozones
@@ -12,7 +12,7 @@
-Class sqlgeozones
+Class sqlgeozone
implements ModSqlDataDriver{
public static $modules;
@@ -174,8 +174,8 @@
@brief
@return array product empty
*/
- public static function Specimen(){
- $par = array('geo_zone_id' => '',
+ public static function Specimen($shortkey=false){
+ $result = array('geo_zone_id' => '',
'geo_zone_type' => '',
'geo_zone_grp' => '',
'geo_zone_name' => '',
@@ -184,7 +184,7 @@
'last_modified'=>'',
);
- return self::CleanKey($par);
+ return ((!$shortkey)? $result : self::CleanKey($result));
}
@@ -198,7 +198,7 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'geo_zone_') ===9)
+ if( strpos($key,'geo_zone_') ===0)
$key=substr($key,9);
$object->$key = $value;
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-03-04 20:36:55 UTC (rev 4061)
@@ -12,7 +12,7 @@
?>
<h3><?php echo __('title heading configuration source repository edit') ?></h3>
-
+ not implemented in this version
<?php echo tep_draw_form('new_product', package::FILENAME, 'type_data=source&action=source_update', 'post'); ?>
<div class="box_uniq block_form">
Added: trunk/catalog/admin/includes/gabarit/services/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/services/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/services/display_view.edit.gab 2012-03-04 20:36:55 UTC (rev 4061)
@@ -0,0 +1,40 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 11:35
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $price, $current_theme;
+?>
+<div class="box_uniq block_form main-services">
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('tab services briefs'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('tab services details'); ?></a></li>
+ </ul>
+
+ <div id="tabs-1" class="tabPage">
+
+ not implemented in this version
+ </div>
+
+
+ <div id="tabs-2" class="tabPage">
+ not implemented in this version
+ </div>
+
+ </div>
+
+
+
+ <div class="button_nav">
+ <?php echo tep_js_back(tep_href_link(services::FILENAME), IMAGE_CANCEL);?>
+ </div>
+
+
+</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/05_customers.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/05_customers.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/05_customers.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,15 +1,16 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/12/10, 17:23
+ @version 2.1.1
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file languages for boxes menu
*/
-define('BOX_HEADING_CONF_CUSTOMERS',"Clients" );
+define('BOX_HEADING_CONF_CUSTOMERS',"Tiers" );
define('BOX_CUSTOMERS_CUSTOMERS',"Clients/Membres" );
define('BOX_CUSTOMERS_CUSTOMERS_ADD_NEW',"Ajouter un Client" );
-define('BOX_HEADING_CONF_BOX_RECOVER_CART_SALES',"Paniers abandonnés" );
+define('BOX_COMMERCIAL_VENDORS',"Fournisseurs" );
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,18 +1,20 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/12/10, 17:23
+ @version 2.1.1
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file languages for boxes menu
*/
define('BOX_HEADING_CONF_COMMERCIAL',"Commercial" );
-define('BOX_COMMERCIAL_VENDORS',"Fournisseurs" );
+
define('BOX_TOOLS_MAIL',"Email/Newsletter" );
define('BOX_TOOLS_MAIL_NEW',"Envoyez un email" );
define('BOX_TOOLS_NEWSLETTER_MANAGER',"Bulletin d'information" );
define('BOX_TOOLS_NEWSLETTER_MANAGER_MODELES',"Modèle de bulletin" );
+define('BOX_HEADING_CONF_BOX_RECOVER_CART_SALES',"Paniers abandonnés" );
+define('BOX_CUSTOMERS_HELD_ORDERS',"Commandes abandonnées" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,18 +1,30 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 13/11/11, 15:59
+ @date 03/03/2012, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file languages for boxes menu
*/
-define('BOX_HEADING_CONF_ORDERS',"Commandes" );
+define('BOX_HEADING_CONF_ORDERS',"Metiers" );
+
+define('BOX_CUSTOMERS_ORDERS',"Commandes" );
define('BOX_CUSTOMERS_ORDERS_THISDAY',"Commande du jour" );
define('BOX_CUSTOMERS_ORDERS_ALLNOCLOSED',"Commandes ouvertes" );
define('BOX_CUSTOMERS_ORDERS_ALL',"Toutes les commandes" );
define('BOX_CUSTOMERS_ORDERS_OPENED',"Commandes en traitement" );
define('BOX_CUSTOMERS_ORDERS_NOPAYED',"Commandes en attente" );
-define('BOX_CUSTOMERS_HELD_ORDERS',"Commandes abandonnées" );
+
+
+define('BOX_CUSTOMERS_SHIPPING',"Livraisons" );
+define('BOX_CUSTOMERS_SHIPPING_OPENNED',"Ouvertes" );
+define('BOX_CUSTOMERS_SHIPPING_PROGRESS',"En cours" );
+define('BOX_CUSTOMERS_SHIPPING_CLOSE',"Fermées" );
+
+define('BOX_CUSTOMERS_SERVICES',"Services" );
+define('BOX_CUSTOMERS_SERVICES_ALL',"Tous" );
+define('BOX_CUSTOMERS_SERVICES_ACTIVED',"Activés" );
+define('BOX_CUSTOMERS_SERVICES_INACTIVED',"Inactif" );
?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/services.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/services.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/services.txt 2012-03-04 20:36:55 UTC (rev 4061)
@@ -0,0 +1,28 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 16:07
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['heading title services']="Services" ;
+
+
+// $lang['tab services briefs']="Details" ;
+// $lang['tab services details']="Commande" ;
+
+
+/* Listing */
+ $lang['table heading service id']="n°" ;
+ $lang['table heading order id']="Cmd n°" ;
+ $lang['table heading customers']="Clients" ;
+ $lang['table heading date start']="Activé le" ;
+ $lang['table heading auto_retry']="Auto" ;
+ $lang['table heading status']="Etat" ;
+ $lang['table heading action']="Action" ;
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/account/history.php
===================================================================
--- trunk/catalog/admin/includes/modules/account/history.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/modules/account/history.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/11/11, 20:02
+ @date 03/03/2012, 20:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class history
@@ -75,7 +75,7 @@
$n = new stdClass();
$n->date = tep_datetime_short($row['date_purchased']);
$n->type = 'order';
- $n->text = sprintf(__('history new commande n %s'), $row['orders_id']);
+ $n->text = sprintf(__('history new commande n %s'), ' <a class="linkdoc" href="'.tep_href_link(FILENAME_ORDERS, 'action=edit&oID='.$row['orders_id']).'">'.$row['orders_id'].'</a> ');
$result[strtotime($row['date_purchased'])]=$n;
}
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/09/11, 19:49
+ @date 04/03/2012, 19:49
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modexpedition
@@ -67,182 +67,184 @@
switch($action){
/**
- @brief save Config base page
+ @brief save Config base page
*/
case 'save_mutli':
- if(tep_not_null($gID) ){
+ if(tep_not_null($gID) ){
- $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- if(is_object($list))
- $liste[]=$list;
- else
- $liste=$list;
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
- foreach($liste as $row) {
+ foreach($liste as $row) {
- if(isset($_POST['configuration'][$row->key])) {
- $configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
+ if(isset($_POST['configuration'][$row->key])) {
+ $configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
- if( ($res=sqlconfiguration::update(array('key'=>$row->key , 'value'=>tep_db_input($configuration_value) ))) == false)$erreur[]=false;
- else $erreur[]=true;
+ if( ($res=sqlconfiguration::update(array('key'=>$row->key , 'value'=>tep_db_input($configuration_value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
- }
+ }
- }
+ }
- if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
- else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
- }
+ }
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-config' ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-config' ));
break;
/**
- @brief Manage shipping zones
+ @brief Manage shipping zones
*/
case 'zones':
+ if(isset($_POST[__CLASS__]['zone']) && is_array($_POST[__CLASS__]['zone']) ){
- if(isset($_POST[__CLASS__]['zone']) && is_array($_POST[__CLASS__]['zone']) ){
+ foreach($_POST[__CLASS__]['zone'] as $key=>$row){
+ $sql_a['id'] = (int)tep_db_prepare_input($key);
+ $sql_a['name'] = tep_db_prepare_input($row);
- foreach($_POST[__CLASS__]['zone'] as $key=>$row){
- $sql_a['id'] = (int)tep_db_prepare_input($key);
- $sql_a['name'] = tep_db_prepare_input($row);
+ sqlgeozone::update($sql_a);
+ }
- sqlgeozone::update($sql_a);
- }
+ }
- }
-
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-zone' ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-zone' ));
break;
/**
- @brief Manage shipping zones
+ @brief Manage shipping zones
*/
case 'modules':
- if(isset($_GET['flag'])){
+ if(isset($_GET['flag'])){
- $mod=tep_db_prepare_input($_GET['mod']);
- $flag=(int)tep_db_prepare_input($_GET['flag']);
+ $mod=tep_db_prepare_input($_GET['mod']);
+ $flag=(int)tep_db_prepare_input($_GET['flag']);
- // call type module
- $typeOri=modulesUtility::GetModttype('shipping');
- // get current value
- $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+ // call type module
+ $typeOri=modulesUtility::GetModttype('shipping');
+ // get current value
+ $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
- // call
- $type=modulesUtility::LoadModule('shipping',$mod.'.php');
- // force install
- if( $flag ==1 && !$type->content->check()){
- $type->content->remove();
- $type->content->install();
- }
- // force remove
- elseif( $flag == 0 && $type->content->check())
- $type->content->remove();
+ // call
+ $type=modulesUtility::LoadModule('shipping',$mod.'.php');
+ // force install
+ if( $flag ==1 && !$type->content->check()){
+ $type->content->remove();
+ $type->content->install();
+ }
+ // force remove
+ elseif( $flag == 0 && $type->content->check())
+ $type->content->remove();
- // up module
- $r=explode(';',$typeOri->value);
- $result[]=( ($flag ==1 ) ? $mod.'.php;' : '' );
+ // up module
+ $r=explode(';',$typeOri->value);
+ $result[]=( ($flag ==1 ) ? $mod.'.php;' : '' );
- foreach($r as $v)
- if(trim($v) !='')
- if( (
- $flag ==1
- || ($flag == 0 && $v != trim($mod).'.php' )
- )
- && !in_array($v,$result)
- ){
- $result[]=$v;
- }
+ foreach($r as $v)
+ if(trim($v) !='')
+ if( (
+ $flag ==1
+ || ($flag == 0 && $v != trim($mod).'.php' )
+ )
+ && !in_array($v,$result)
+ ){
+ $result[]=$v;
+ }
- sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
+ sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-module' ));
- }
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-module' ));
+ }
break;
case 'modules-edit':
- $mod=tep_db_prepare_input($_GET['mod']);
- // call
- $Mod=modulesUtility::LoadModule('shipping',$mod.'.php');
- $ModCurr = $Mod->content;
- $i=0;
- foreach($ModCurr->keys() as $value){
- $i++;
- $current = sqlconfiguration::fetch(array('key'=>$value));
+ $mod=tep_db_prepare_input($_GET['mod']);
+ // call
+ $Mod=modulesUtility::LoadModule('shipping',$mod.'.php');
+ $ModCurr = $Mod->content;
+ $i=0;
+ foreach($ModCurr->keys() as $value){
+ $i++;
+ $current = sqlconfiguration::fetch(array('key'=>$value));
- $keys_extra[$value]['title'] = $current['configuration_title'];
- $keys_extra[$value]['value'] = $current['configuration_value'];
- $keys_extra[$value]['description'] = $current['configuration_description'];
- $keys_extra[$value]['use_function'] = $current['use_function'];
- $keys_extra[$value]['set_function'] = $current['set_function'];
- }
+ $keys_extra[$value]['title'] = $current['configuration_title'];
+ $keys_extra[$value]['value'] = $current['configuration_value'];
+ $keys_extra[$value]['description'] = $current['configuration_description'];
+ $keys_extra[$value]['use_function'] = $current['use_function'];
+ $keys_extra[$value]['set_function'] = $current['set_function'];
+ }
- self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
+ self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
break;
/**
- @brief save Config base page
+ @brief save Config base page
*/
case 'modules-save':
- foreach($_POST['configuration'] as $key=>$value) {
+ foreach($_POST['configuration'] as $key=>$value) {
- $configuration_value = tep_db_prepare_input($value);
+ $configuration_value = tep_db_prepare_input($value);
- if( ($res=sqlconfiguration::update(array('key'=>$key , 'value'=>tep_db_input($value) ))) == false)$erreur[]=false;
- else $erreur[]=true;
+ if( ($res=sqlconfiguration::update(array('key'=>$key , 'value'=>tep_db_input($value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
- }
+ }
- if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
- else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='. $_GET['mod'] ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='. $_GET['mod'] ));
break;
}
}
/**
+ @fn load_db_values($Id)
+ @param $Id int
@return array
*/
public function load_db_values($Id){
- $list_edit=array();
- $gID = 7;
+ $list_edit=array();
+ $gID = 7;
- $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- foreach($list as $row) {
+ foreach($list as $row) {
- $cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
+ $cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if (!empty($row->set)){
- if(strpos($row->set,'(') === false) $row->set.='(';
- eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
- }
- else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
+ else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
- $conf = $row;
- $row->cfgValue=$cfgValue;
- $row->value_field=$value_field;
+ $conf = $row;
+ $row->cfgValue=$cfgValue;
+ $row->value_field=$value_field;
- $list_edit[$row->key]=$conf;
+ $list_edit[$row->key]=$conf;
}
return $list_edit;
}
+
/**
- Appelé dans le header de page
+ @brief Appelé dans le header de page
*/
public static function draw_header(){
?>
@@ -263,11 +265,9 @@
<?php
}
+
/**
- Contenu central
- @param
- @e global $action
- @e global $gparentID
+ @brief Contenu central
*/
public function draw(){
global $action,$gparentID;
@@ -280,9 +280,9 @@
foreach(scan(DIR_FS_CATALOG_MODULES.'shipping/') as $row){
if( substr($row,-3) =='php'){
- $class = substr($row,0, -4);
+ $class = substr($row,0, -4);
- self::$module[]=modulesUtility::LoadModule('shipping', $row);
+ self::$module[]=modulesUtility::LoadModule('shipping', $row);
}
}
Modified: trunk/catalog/admin/includes/modules/pages/geo_zones.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/geo_zones.php 2012-03-04 14:00:00 UTC (rev 4060)
+++ trunk/catalog/admin/includes/modules/pages/geo_zones.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -1,18 +1,20 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/12/11, 15:25
+ @date 04/03/2012, 15:25
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class geo_zones
@brief base manage zone shipping and taxe
*/
-
class geo_zones
- implements ExtModPage, InterfacedTJsonS, InterfaceModule {
+ implements
+ ExtModPage,
+ InterfacedTJsonS,
+ InterfaceModule {
const FILENAME = FILENAME_GEO_ZONES;
@@ -132,7 +134,7 @@
$myarray['grp'] =tep_db_prepare_input($_POST['geo_zone_grp']) ;
- if( ! $new_zone_id =sqlgeozones::create($myarray) )
+ if( ! $new_zone_id =sqlgeozone::create($myarray) )
$messageStack->add_session(__(sprintf('geo_zones error for insert zone %s'), $myarray['name'] ), 'error');
else
$messageStack->add_session(__(sprintf('geo_zones success for insert %s'), ' '.$myarray['name'] ), 'success');
@@ -194,7 +196,7 @@
else
$myarray['grp'] =tep_db_prepare_input($_POST['geo_zone_grp']) ;
- if( ! sqlgeozones::update($myarray) )
+ if( ! sqlgeozone::update($myarray) )
$messageStack->add_session(__(sprintf('geo_zones error for update zone %s'), $zID ), 'error');
else
$messageStack->add_session(__(sprintf('geo_zones success for update %s'), $zID ), 'success');
@@ -214,7 +216,7 @@
case 'deleteconfirm':
$zID = tep_db_prepare_input($_POST['id']);
- if( ! sqlgeozones::delete(array('id'=>$zID)) )
+ if( ! sqlgeozone::delete(array('id'=>$zID)) )
$messageStack->add_session(__(sprintf('geo_zones error for delete zone %s'), $zID ), 'error');
else
$messageStack->add_session(__(sprintf('geo_zones success for delete %s'), $zID ), 'success');
@@ -256,7 +258,7 @@
'type'=>tep_db_prepare_input($_POST['current_type']),
);
- $id = sqlgeozones::create($myarray);
+ $id = sqlgeozone::create($myarray);
foreach($result as $row){
/// create geo to zone
@@ -606,6 +608,7 @@
if(!isset($res) || count($res)==0) $res[]=array('countries_name'=>' ','zone_name'=>' ','action'=>' ');
}
+
return $res;
}
Added: trunk/catalog/admin/includes/modules/pages/services.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/services.php (rev 0)
+++ trunk/catalog/admin/includes/modules/pages/services.php 2012-03-04 20:36:55 UTC (rev 4061)
@@ -0,0 +1,801 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 22:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class services
+ @brief manage services, listing and edit status
+*/
+
+
+
+class services
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ IntModTwo, /// new interface module for nextgen module
+ InterfacedInnerHtml {
+
+ /**
+ @var const
+ */
+ const FILENAME = 'services.php';
+
+ /**
+ @var array list, utilisé dans les gabarits, list des services
+ */
+ public static $list=array();
+ /**
+ @var object $order
+ */
+ public static $order;
+ /**
+ @var int Id order
+ */
+ public static $oID;
+ /**
+ @var bool $update autorise mise a jour status
+ */
+ public static $update;
+ /**
+ @var array $services_status_array
+ */
+ public static $services_status_array=array();
+ /**
+ @var array $services_statuses
+ */
+ public static $services_statuses=array();
+ /**
+ @var object $oInfo
+ */
+ public static $oInfo;
+ /**
+ @var object $cInfo detail du client
+ */
+ public static $cInfo;
+ /**
+ @var object $export
+ */
+ public static $export;
+ /**
+ @var string $view for select filter view
+ */
+ public static $view;
+ /**
+ @var object internal trans objet method check_action vs display_view
+ */
+ private static $internal;
+ /**
+ @var requis pour generation pdf
+ */
+ public static $file_type_array ;
+
+ /**
+ @brief class constructor
+ */
+ public function __construct() {
+ self::GetConf();
+ }
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
+ self::$code=__CLASS__;
+
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$view=(isset($_REQUEST['view'])? (string)$_REQUEST['view'] : '' );
+ self::$oID=(isset($_REQUEST['oID'])? $_REQUEST['oID'] : '' );
+
+ $status=(isset($_REQUEST['status'])? (string)$_REQUEST['status'] : '' );
+
+ self::$export= new export(__CLASS__);
+
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ if( !isset(self::$InitInfo['adjust']) )
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
+
+
+
+ /**
+ @remarks not load if not first init
+ */
+ if(defined('JSONSTATMENT')) return;
+
+ //! active datatable in ajax, precise les GET necessaire
+ define('JSONSTATMENT', 'mod=page&type='.self::$code.
+ (isset(parent::$action)?'&action='.parent::$action : '' ).
+ (isset(self::$oID)?'&oID='.self::$oID : '' ).
+ (isset(self::$view)?'&view='.self::$view : '' ).
+ (isset($status)?'&status='.$status : '' )
+ );
+
+ //! detail item in ajax
+ define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$InitInfo['theader']['listing']=array(
+ 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ 2 =>array('width'=>'8%', 'class'=>'tcenter', 'txt'=>__('table heading service id') ),
+ 3 =>array('width'=>'8%', 'class'=>'tcenter', 'txt'=>__('table heading order id') ),
+ 4 =>array('width'=>'30%','class'=>'tcenter', 'txt'=>__('table heading customers')),
+ 5 =>array('width'=>'10%', 'txt'=>__('table heading date start')),
+// 5 =>array('width'=>'150px','class'=>'tcenter', 'txt'=>__('table heading order total')),
+ 6 =>array('width'=>'8%', 'txt'=>__('table heading auto_retry')),
+ 7 =>array('width'=>'8%', 'txt'=>__('table heading status')),
+// 7 =>array('width'=>'10%', 'txt'=>__('table heading status')),
+ 8 =>array('width'=>'10%','class'=>'row_action', 'txt'=>__('table heading action')),
+ );
+
+// self::$InitInfo['tfooter']['listing']=array(
+// 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>tep_draw_hidden_field('xx','xxx','','class="search_init" ') ),
+// 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>tep_draw_hidden_field('xxx','xxx','','class="search_init" ') ),
+// 2 =>array('width'=>'8%', 'class'=>'tcenter', 'txt'=>tep_draw_input_field('o.services_id','services_id',__('table heading order id'),'style="width:98%" class="search_init"') ),
+// 3 =>array('width'=>'40%','class'=>'tcenter', 'txt'=>tep_draw_input_field('o.customers_name','customers_name',__('table heading customers'),'style="width:98%" class="search_init"') ),
+// 4 =>array('width'=>'150px','class'=>'tcenter', 'txt'=>tep_draw_input_field('ot.text','text',__('table heading order total'),'style="width:98%" class="search_init"') ),
+// 5 =>array('width'=>'10%', 'txt'=>tep_draw_input_field('o.date_purchased','date_purchased',__('table heading date purchased'),'style="width:98%" class="search_init"')),
+// 6 =>array('width'=>'8%', 'txt'=>tep_draw_input_field('o.payment_method','payment_method',__('table heading status'),'style="width:98%" class="search_init"')),
+// 7 =>array('width'=>'10%', 'txt'=>tep_draw_input_field('s.status_name','status_name',__('table heading status'),'style="width:98%" class="search_init"')),
+// 8 =>array('width'=>'10%','class'=>'row_action', 'txt'=>' '),
+// );
+
+ /**
+ @remarks this define col in table, and if is possible sort
+ Just for Edit listing
+ */
+ self::$InitInfo['modele']['listing']=array(
+ 0 =>false,
+ 1 =>false,
+ 'services_id'=>true,
+ 'orders_id'=>true,
+ 'customers_id'=>true,
+ 'date_start'=>true,
+ 'auto_retry'=>true,
+ 'status'=>true,
+ 'action' =>false
+ );
+
+
+ $DB=Database::getInstance();
+// self::$services_statuses=array();
+// $services_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='services' and language_id = '" . (int)$languages_id . "'");
+// while ($services_status = $services_status_query->fetchAssoc()) {
+// self::$services_statuses[] = array('id' => $services_status['status_id'], 'text' => $services_status['status_name']);
+// self::$services_status_array[$services_status['status_id']] = $services_status['status_name'];
+// }
+
+
+
+
+ global $oscss;
+ $oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
+ echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','comments','800','400');
+
+ return true;
+ }
+
+
+ public function check_action($actions){
+ global $messageStack,$page_module;
+
+ self::$action=$actions;
+
+ self::$internal = new stdClass;
+
+ switch (self::$action) {
+
+ /**
+ @remarks pdf generate for all docs
+ */
+// case 'pdf':
+//
+// if( _cst_bool('USE_LOCAT_GENERAT_PDF') )
+// $messageStack->add_session(__('warning pdf not generat by this core, please adjust configuration'), 'warning');
+// else {
+// $ID=(int)$_REQUEST['id'];
+// $type=$_REQUEST['file_type'] ;
+// global $pdf, $currencies;
+// osCSS_pdf::getInstance();
+//
+// /// force encode for fdpf is in iso8859
+// header("Content-Type: text/html; charset=utf-8");
+// self::$services_statuses = array_merge(tep_get_status_array('services'),array(array('id'=>'','text'=>TEXT_NONE)));
+// self::$file_type_array= osCSS_pdf::get_module();
+//
+// $pdf=osCSS_pdf::OutputInit($type);
+// $DF = new DatasFiles;
+//
+// switch($type){
+// case 'delivery':
+// global $obj_shipping;
+// $obj_shipping = sqlshipping::fetch(array('id'=>$ID), true);
+// $oID = $obj_shipping->services_id;
+// $order = new order($obj_shipping->services_id);
+// break;
+// case 'packingslip':
+// case 'invoice':
+// default:
+// $oID = $ID;
+// $order = new order($ID);
+// }
+//
+// osCSS_pdf::OutputAddPage();
+//
+// include(osCSS_pdf::getPathModele());
+//
+// $file=$DF->GetDoc(osCSS_pdf::GetPdfType(),$ID);
+//
+// if(file_exists($file))
+// unlink($file);
+//
+// $pdf=osCSS_pdf::SaveEnd($file);
+//
+// /// @remarks draw and exit;
+// // $pdf=osCSS_pdf::OutputEnd();
+// }
+// if(!isset($_GET['forceajax']))
+// tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+// break;
+
+ /**
+ @remarks pdf generate
+ */
+// case 'deletefile':
+// $oID=(int)$_REQUEST['oID'];
+// $ID=(int)$_REQUEST['id'];
+// $type=$_REQUEST['file_type'] ;
+//
+// $datadocs=new DatasFiles;
+//
+// if(( $filepath=$datadocs->GetDoc($type, $ID)) && file_exists($filepath))
+// unlink($filepath);
+//
+// if(!isset($_GET['forceajax']))
+// tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+// break;
+
+
+ /**
+ @remarks Action mutliple
+ */
+ case 'multiconfirm':
+ $res=array();
+
+ $status = tep_db_prepare_input(@$_POST['status_multi']);
+// $modeexport = tep_db_prepare_input(@$_POST['modeexport']);
+ $notify =(isset($_POST['notify'])) ? tep_db_prepare_input($_POST['notify']): '';
+ $comments= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
+ if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) ) {
+
+// if(isset($_POST['status_multi'])){
+// foreach($_POST['action_multi'] as $oID )
+// if (up_status_order($oID, array('status'=>$status,'comments'=>'', 'notify'=>$notify, 'comments'=> $comments) ) ) $res[]=true;
+// else $res[]=false;
+// }
+
+
+// if(isset($_POST['modeexport'])){
+//
+// $modeexport=tep_db_prepare_input($_POST['modeexport']);
+// $encodage=tep_db_prepare_input($_POST['encodage']);
+// $export_type=tep_db_prepare_input($_POST['export_type']);
+// $od=array();
+//
+// self::$export->pre_export(array( 'mode' => $modeexport, 'encodage'=>$encodage, 'export_type'=>$export_type, 'page_admin'=>$page_module));
+//
+// foreach($_POST['action_multi'] as $oID ){
+//
+// $order = new order((int)$oID);
+// $qer=tep_db_query("SELECT countries_iso_code_2 FROM " . TABLE_COUNTRIES . " WHERE countries_name='".$order->customer['country']."' ");
+// $c=tep_db_fetch_array($qer);
+//
+// $od[]=array('IDExpedition'=>$oID,
+// 'IDCustomer'=>$order->customer['id'],
+// 'Namecustomer'=>self::$export->decodage($order->customer['name']),
+// 'Compagnycustomer'=>self::$export->decodage($order->customer['company']),
+// 'Streetadress'=>self::$export->decodage($order->delivery['street_address']),
+// 'Streetadress2'=>self::$export->decodage($order->delivery['suburb']) ,
+// 'Cityshipping'=>self::$export->decodage($order->delivery['city']),
+// 'Stateshipping'=>self::$export->decodage($order->customer['state']) ,
+// 'telephone'=>self::$export->decodage($order->customer['telephone']),
+// 'postcode'=>self::$export->decodage($order->delivery['postcode']),
+// 'codecountryiso'=>$c['countries_iso_code_2'],
+// 'weight'=>round($order->info['total_weight'],3),
+// 'Contreremb'=>'');
+// }
+//
+// print self::$export->op_export($od);
+// }
+ }
+
+ if (in_array(false,$res)) $messageStack->add_session(__('success order updated'), 'success');
+ else $messageStack->add_session(__('warning order not updated'), 'warning');
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
+
+ /**
+ @remarks Adjust Virtual product Service
+ */
+ case 'setflag':
+ $redirect = false;
+ if (isset($_GET['sID'])){
+
+ /// Activate / Desactivate
+ if (isset($_GET['flag']) && ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) ) {
+ $res = sqlservices::fetch(array('id'=>(int)$_GET['sID']), true);
+
+ if($res !=false){
+
+ $myarray = array(
+ 'id'=>(int)$_GET['sID'],
+ 'status'=>(int)$_GET['flag'] ,
+ );
+
+// if(substr($res->date_start,0,4) <'2000')
+// $myarray['date_start']=date('Y-m-d H:i:s') ;
+
+ if( ! sqlservices::update($myarray) ) {
+ self::$internal->status = $res->status;
+ $redirect = true;
+ $messageStack->add_session(__('error order not update status'), 'warning');
+ }
+ else{
+ self::$internal->status = (int)$_GET['flag'] ;
+ if(!isset($_GET['forceajax']))
+ $messageStack->add_session(__('success order update status'), 'success');
+ }
+ }
+ else {
+ $messageStack->add_session(__('error order id not found'), 'warning');
+ $redirect = true;
+ }
+ }
+
+ /// Auto - retry force activate service
+ elseif ( isset($_GET['auto_retry']) && ( ($_GET['auto_retry'] == '0' ) || ($_GET['auto_retry'] == '1') ) ){
+
+ $res = sqlservices::fetch(array('id'=>(int)$_GET['sID']), true);
+
+ if($res !=false){
+
+ $myarray = array(
+ 'id'=>(int)$_GET['sID'],
+ 'auto_retry'=>(int)$_GET['auto_retry'] ,
+ );
+
+ if( ! sqlservices::update($myarray) ){
+ self::$internal->auto_retry = $res->auto_retry;
+ $redirect = true;
+ $messageStack->add_session(__('error order not update auto_retry'), 'warning');
+ }
+ else{
+ self::$internal->auto_retry = (int)$_GET['auto_retry'] ;
+ if(!isset($_GET['forceajax']))
+ $messageStack->add_session(__('success order update auto_retry'), 'success');
+ }
+ }
+ else {
+ $messageStack->add_session(__('error order id not found'), 'warning');
+ $redirect = true;
+ }
+ }
+
+ }
+
+ if(!isset($_GET['forceajax']) || $redirect )
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','sID','setflag','auto_retry','flag'), false) .'action=edit' ));
+ break;
+
+ }
+
+ return self::$action;
+ }
+
+ /**
+ @fn get_header()
+ @brief load js and call childs module
+ @return no return
+ */
+ public function get_header(){
+ tep_include_file(DIR_WS_JS . "modules/pages/".__CLASS__.".js.php",true);
+
+ /** aca */ //self::$modules->get_header_js();
+
+ }
+
+
+
+ /**
+ @fn ::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
+ global $languages_id;
+
+ $arg=((func_num_args()>0) ? func_get_args() : array() );
+
+ $DB=Database::getInstance();
+ $res=array();
+
+ switch (self::$action) {
+ case 'export';
+ break;
+
+ case 'edit':
+
+ $res= sqlservices::fetch(array('id'=>(int)self::$oID ), true);
+
+ return $res;
+ break;
+
+
+ case 'new':
+ $select_adress = array();
+
+ $cID = (int)tep_db_prepare_input($_REQUEST['cID']);
+ $res=sqlcustomer::fetch(array('id'=>$cID), true);
+
+ /**
+ @remarks choose address book if active module adress book
+ */
+ if(isset($res->mod['address_book'])) {
+ foreach($res->mod['address_book'] as $row)
+ $select_adress[] = array('id'=>$row->book_id , 'text'=> tep_address_format($row->format_id, $row, false, '', " - ") );
+ }
+ else{
+ $adrr = new stdClass();
+ $adrr->book_id = $res->default_address_id;
+ $adrr->gender = $res->gender;
+ $adrr->company = $res->company;
+ $adrr->company_tax_id = $res->company_tax_id;
+ $adrr->firstname = $res->firstname;
+ $adrr->lastname = $res->lastname;
+ $adrr->street_address = $res->street_address;
+ $adrr->suburb = $res->suburb;
+ $adrr->postcode = $res->postcode;
+ $adrr->city = $res->city;
+ $adrr->state = $res->state;
+ $adrr->country_id = $res->country_id;
+ $adrr->zone_id = $res->zone_id;
+ $adrr->zone_name = $res->zone_name;
+ $adrr->countries_id = $res->countries_id;
+ $adrr->countries_name = $res->countries_name;
+ $adrr->countries_iso_code_2 = $res->countries_iso_code_2;
+ $adrr->format_id = $res->address_format_id;
+
+ $select_adress[] = array('id'=>$adrr->book_id , 'text'=> tep_address_format($adrr->format_id, $adrr, false, '', "\n") );
+ }
+
+
+ $res->select_adress = $select_adress;
+
+ return $res;
+ break;
+
+
+ case 'listing';
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+
+
+ $wh=' WHERE ';
+ if(self::$view =='opened')
+ $wh .=" status = '1' ";
+ if(self::$view =='closed')
+ $wh .=" status = '0' ";
+
+
+ if(tep_not_null($adjust->sWhere)){
+// $adjust->sWhere=str_replace(
+// array('services_id', 'order_total', 'customers_id', 'services_status_name'),
+// array('o.services_id', ' ot.text', 'o.customers_name', 's.status_name'),
+// $adjust->sWhere
+// );
+
+ $wh .= ( (strlen($wh) >7)? " AND ": "" )." ".$adjust->sWhere." ";
+ }
+
+ if(strlen($wh) <=7)
+ $wh='';
+
+
+ $query_raw = "SELECT DISTINCT s.* FROM " . TABLE_SERVICES . " s JOIN " . TABLE_ORDERS . " o on (o.orders_id = s.orders_id) ".$wh." ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 's.row_id DESC');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+ break;
+
+ case 'delete';
+ default:
+
+// $services_query_raw = "select distinct o.services_id,o.services_prefix, o.customers_id,o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.status_name as services_status_name, s.status_color as services_status_color,ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.services_id = ot.services_id), " . TABLE_STATUS . " s where o.services_status = s.status_id and s.status_type='services' and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.services_id='".self::$oID."' ";
+
+// $currency_query = $DB->query($services_query_raw);
+
+// return new objectInfo($currency_query->fetchAssoc() );
+
+ }
+ }
+
+
+
+
+ public function display_view(){
+
+ switch (self::$action) {
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ if(isset($_GET['flag']))
+ return self::GetServiceStatus(array('status'=>(int)self::$internal->status, 'row_id'=>(int)$_GET['sID']), false);
+ elseif(isset($_GET['auto_retry']))
+ return self::GetServiceStatus(array('auto_retry'=>(int)self::$internal->auto_retry, 'row_id'=>(int)$_GET['sID']), false);
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
+ case 'delete':
+ self::$oInfo=self::GetDBValue();
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+ case 'multi':
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+
+ case 'new':
+ self::$cInfo=self::GetDBValue();
+
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+
+ case 'edit':
+ self::$order= self::GetDBValue();
+
+ ...
[truncated message content] |