|
From: <os...@us...> - 2012-07-12 06:49:20
|
Revision: 4513
http://oscss.svn.sourceforge.net/oscss/?rev=4513&view=rev
Author: oscim
Date: 2012-07-12 06:49:13 +0000 (Thu, 12 Jul 2012)
Log Message:
-----------
correction coquille
FS#1094
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/fileUtility.php
branches/2.1.1/catalog/admin/includes/modules/pages/navigation_links.php
branches/2.1.1/catalog/includes/triggers/search_suggest.inc
branches/2.1.1/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/configuration.php
branches/2.1.1/catalog/install/includes/language/fr_FR/install.base.txt
Modified: branches/2.1.1/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/fileUtility.php 2012-07-11 14:08:08 UTC (rev 4512)
+++ branches/2.1.1/catalog/admin/includes/classes/fileUtility.php 2012-07-12 06:49:13 UTC (rev 4513)
@@ -28,7 +28,7 @@
}
/**
- @brief block process in other class if result in loop process content error
+ @brief block process in other class if result in loop process content error
@param bool true, block messageSatck
*/
public static function CfgComport($value){
@@ -119,7 +119,7 @@
@fn _unlink($source)
@brief recusrive delete folder and files
@param $source absolute path
- @return boolean false for error
+ @return boolean false for error
*/
public static function _unlink($source){
if (file_exists($source) && is_writeable($source))
@@ -133,11 +133,13 @@
@fn _mkdir($path)
@brief recusrive create folder
@param $path absolute path
- @return boolean false for error
+ @return boolean false for error
*/
public static function _mkdir($path) {
- $path = dirname($path);
+ if(strpos($path, '.'))
+ $path = dirname($path);
+
if(strpos($path,DIR_FS_DOCUMENT_ROOT) ===0){
$testpath = DIR_FS_DOCUMENT_ROOT;
$listdir = str_replace( DIR_FS_DOCUMENT_ROOT, '', $path );
@@ -163,9 +165,10 @@
}
// if (!is_writeable($testpath))
- if( self::_chmod($path, '0755') ){
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error folder not writable for current user'). $path, 'error');
+ if( ! self::_chmod($path, 0766) ){
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error folder not writable for current user').' '. $path, 'error');
}
+
}
return true;
@@ -174,8 +177,8 @@
/**
@fn _chmod($path, $mod=0777)
@brief chmod
- @param $path absolute path
- @param $mod
+ @param $path absolute path
+ @param $mod
@return boolean true for ok or false
*/
public static function _chmod($path, $mod=0777) {
@@ -183,11 +186,11 @@
if (is_dir($path) && $path!='/') {
self::_chmod(dirname($path));
- if(!@chmod($path, (int)$mod))
+ if(!@chmod($path, (int)$mod))
return false;
}
elseif(file_exists($path) && $path!='/') {
- if(!@chmod($path, (int)$mod))
+ if(!@chmod($path, (int)$mod))
return false;
}
return true;
@@ -203,7 +206,7 @@
while(($file =self::_scandir($d)) !== false) {
if ($file != "." && $file != "..") {
$typepath = $mypath . "/" . $file ;
- if (filetype ($typepath) == 'dir')
+ if (filetype ($typepath) == 'dir')
self::_chown($typepath, $uid, $gid);
self::_chmod($typepath, $uid);
@@ -217,7 +220,7 @@
@brief Copy repertoire recursif
@param $src absolute path
@param $dst absolute path
- @return boolean true if ok
+ @return boolean true if ok
*/
public static function _copy($src,$dst){
@@ -266,9 +269,9 @@
$arrScanCache=array();
static $arrScanCache;
- if( ! is_dir($strFolder))
+ if( ! is_dir($strFolder))
$strFolder = dirname($strFolder);
- if (substr($strFolder, -1, 1) != '/')
+ if (substr($strFolder, -1, 1) != '/')
$strFolder .= '/';
// Load from cache
@@ -291,7 +294,7 @@
@return bool
*/
public static function equal_files($file1, $file2) {
- if (is_file($file1) && is_file($file2))
+ if (is_file($file1) && is_file($file2))
return (md5_file($file1) == md5_file($file2));
return false;
}
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/navigation_links.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/navigation_links.php 2012-07-11 14:08:08 UTC (rev 4512)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/navigation_links.php 2012-07-12 06:49:13 UTC (rev 4513)
@@ -126,14 +126,14 @@
);
- self::$allfields['c.customers_status'] = array(
- 'sort'=>true,
- 'alias'=>'customers_status',
- 'text'=>__('@tasks table heading customers_status'),
- 'default'=>true,
+// self::$allfields['c.customers_status'] = array(
+// 'sort'=>true,
+// 'alias'=>'customers_status',
+// 'text'=>__('@tasks table heading customers_status'),
+// 'default'=>true,
+//
+// );
- );
-
/* Db parent */
self::$allfields['c.parent_id'] = array(
'sort'=>true,
@@ -522,6 +522,17 @@
foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
elseif($k == 'status') $ord[$k]=self::RowStatus($item);
+ elseif($k =='customers_status'){
+ $result = sqlstatus::fetch(array(
+ 'type'=>'customers_restrict_access',
+ 'language_id'=>(int)$languages_id,
+ 'status'=>1,
+ 'id'=> $item['customers_status'],
+ ),
+ true
+ );
+ $ord[$k]= (( $result !=false) ? $result->name : '' );
+ }
else $ord[$k]=$item[$k];
$res[]=$ord;
Modified: branches/2.1.1/catalog/includes/triggers/search_suggest.inc
===================================================================
--- branches/2.1.1/catalog/includes/triggers/search_suggest.inc 2012-07-11 14:08:08 UTC (rev 4512)
+++ branches/2.1.1/catalog/includes/triggers/search_suggest.inc 2012-07-12 06:49:13 UTC (rev 4513)
@@ -59,7 +59,7 @@
if(!$pd )
continue;
- echo '<a href="'.tep_href_link($pd->href).'">'.$pd->title.'</a>'."\n";
+ echo '<a href="'.$pd->href.'">'.$pd->title.'</a>'."\n";
}
Modified: branches/2.1.1/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/configuration.php
===================================================================
--- branches/2.1.1/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/configuration.php 2012-07-11 14:08:08 UTC (rev 4512)
+++ branches/2.1.1/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/configuration.php 2012-07-12 06:49:13 UTC (rev 4513)
@@ -39,7 +39,7 @@
ResetConfigKey('PLUGIN_PRODUCT_INSTALLED');
AddConfigInKey('PLUGIN_GENERIC_INSTALLED','lazyload.php');
-AddConfigInKey('PLUGIN_GENERIC_INSTALLED','slider .php');
+AddConfigInKey('PLUGIN_GENERIC_INSTALLED','slider.php');
AddConfigInKey('PLUGIN_PRODUCT_INSTALLED','slimbox.php');
AddConfigInKey('PLUGIN_PRODUCT_INSTALLED','uicoretabs.php');
Modified: branches/2.1.1/catalog/install/includes/language/fr_FR/install.base.txt
===================================================================
--- branches/2.1.1/catalog/install/includes/language/fr_FR/install.base.txt 2012-07-11 14:08:08 UTC (rev 4512)
+++ branches/2.1.1/catalog/install/includes/language/fr_FR/install.base.txt 2012-07-12 06:49:13 UTC (rev 4513)
@@ -8,6 +8,9 @@
@encode UTF-8
*/
+@setlocale(LC_TIME, 'fr_FR.UTF-8');
+if(function_exists('date_default_timezone_set'))
+ date_default_timezone_set('Europe/Paris');
// core
$lang['etape core.base']="Bienvenue" ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-02 06:59:06
|
Revision: 4545
http://oscss.svn.sourceforge.net/oscss/?rev=4545&view=rev
Author: oscim
Date: 2012-08-02 06:58:56 +0000 (Thu, 02 Aug 2012)
Log Message:
-----------
Report correction et amelioration du backoffice
correction diverse coquille et reliquat
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/aca.php
branches/2.1.1/catalog/admin/includes/classes/drivers/productsACA.php
branches/2.1.1/catalog/admin/includes/classes/drivers/sqlcontent.php
branches/2.1.1/catalog/admin/includes/classes/fileUtility.php
branches/2.1.1/catalog/admin/includes/classes/menu.php
branches/2.1.1/catalog/admin/includes/content/configuration.central.inc
branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab
branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab
branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab
branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/adminUsers/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/attributes/display_view.options.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/categories/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.new.gab
branches/2.1.1/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/geo_zones/display_view.listing.gab
branches/2.1.1/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/newsletters/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/newslettersModeles/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/orders/filter.clause.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/aca_header_tags.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeaccount.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
branches/2.1.1/catalog/admin/includes/modules/content/header_tags.php
branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php
branches/2.1.1/catalog/admin/includes/modules/pages/geo_zones.php
branches/2.1.1/catalog/admin/includes/modules/pages/navigation_links.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/modules/products/desc_base.php
branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php
branches/2.1.1/catalog/admin/includes/modules/products/products_extra.php
branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml
branches/2.1.1/catalog/admin/includes/template/oscss/gabarit-1.php
branches/2.1.1/catalog/admin/includes/template/oscss/jquery-ui-1.css
branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
branches/2.1.1/catalog/admin/includes/widget/CustomerLast.php
branches/2.1.1/catalog/admin/includes/widget/orderLast.php
branches/2.1.1/catalog/includes/classes/split_page_results.php
branches/2.1.1/catalog/includes/triggers/search_suggest.inc
branches/2.1.1/catalog/install/includes/language/en_EN/install.base.txt
branches/2.1.1/catalog/install/includes/language/fr_FR/install.base.txt
branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_full_tag.sql
branches/2.1.1/catalog/redirect.php
branches/2.1.1/catalog/templates/defaut/includes/content/contact_us.php
Modified: branches/2.1.1/catalog/admin/includes/classes/aca.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/aca.php 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/classes/aca.php 2012-08-02 06:58:56 UTC (rev 4545)
@@ -159,7 +159,7 @@
$r=array();
foreach ($this->modules as $key=>$module) {
if (method_exists($module, $method )) /// control presence method
- $r[$key]=$this->modules[$key]->$method($attrs[0]);
+ $r[$key]=$this->modules[$key]->$method($attrs);
}
return $r;
Modified: branches/2.1.1/catalog/admin/includes/classes/drivers/productsACA.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/drivers/productsACA.php 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/classes/drivers/productsACA.php 2012-08-02 06:58:56 UTC (rev 4545)
@@ -81,7 +81,7 @@
public function __call($method, $attrs) {
$r=array();
foreach ($this->modules as $key=>$module) {
- if (( isset($attrs['flag']) && isset($module->$attrs['flag']) && (bool)$module->$attrs['flag']) /// control flag
+ if ( (( isset($attrs['flag']) && isset($module->$attrs['flag']) && (bool)$module->$attrs['flag']) || !isset($attrs['flag'])) /// control flag
and (method_exists($module, $method )) /// control presence method
)
$r[]=$this->modules[$key]->$method($attrs);
@@ -98,7 +98,7 @@
*/
private function control_type_mod($flag){
$this->load_type_product();
- if(in_array( $this->type_flag ,explode(',',$flag) ) || $flag==0) return true;
+ if(in_array($flag,explode(',',$this->type_flag) ) || $flag==0) return true;
else return false;
}
Modified: branches/2.1.1/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-08-02 06:58:56 UTC (rev 4545)
@@ -118,15 +118,17 @@
$sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content());
+
if(count($sql_data_array) > 0 )
tep_db_perform(TABLE_CONTENT, $sql_data_array, 'update', "content_id = '" . (int)$content_id . "'");
+
// no touch if just update one rows
if(count($sql_data_array) >= 3 ) {
- /**
- TODO Couplage avec MLinkto + datatype actif
- */
+ /**
+ TODO Couplage avec MLinkto + datatype actif
+ */
if(DataTypes::is_active('categorie')) {
/// Clean link posts to categorie and save new link
if(isset($option['cPath']) && count($post['categories']) == 0)
@@ -154,11 +156,12 @@
}
}
+
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
$sql_data_array = array();
$language_id = $list_languages[$i]['id'];
- if(isset($post['content_text'][$language_id])) $sql_data_array['content_text'] = tep_db_prepare_input($post['content_text'][$language_id]);
+ if(isset($post['content_text'][$language_id])) $sql_data_array['content_text'] = tep_db_prepare_input($post['content_text'][$language_id]) ;
if(isset($post['content_title'][$language_id])) $sql_data_array['content_title'] =tep_db_prepare_input($post['content_title'][$language_id]);
Modified: branches/2.1.1/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/fileUtility.php 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/classes/fileUtility.php 2012-08-02 06:58:56 UTC (rev 4545)
@@ -28,7 +28,7 @@
}
/**
- @brief block process in other class if result in loop process content error
+ @brief block process in other class if result in loop process content error
@param bool true, block messageSatck
*/
public static function CfgComport($value){
@@ -119,7 +119,7 @@
@fn _unlink($source)
@brief recusrive delete folder and files
@param $source absolute path
- @return boolean false for error
+ @return boolean false for error
*/
public static function _unlink($source){
if (file_exists($source) && is_writeable($source))
@@ -133,7 +133,7 @@
@fn _mkdir($path)
@brief recusrive create folder
@param $path absolute path
- @return boolean false for error
+ @return boolean false for error
*/
public static function _mkdir($path) {
@@ -177,8 +177,8 @@
/**
@fn _chmod($path, $mod=0777)
@brief chmod
- @param $path absolute path
- @param $mod
+ @param $path absolute path
+ @param $mod
@return boolean true for ok or false
*/
public static function _chmod($path, $mod=0777) {
@@ -186,11 +186,11 @@
if (is_dir($path) && $path!='/') {
self::_chmod(dirname($path));
- if(!@chmod($path, (int)$mod))
+ if(!@chmod($path, (int)$mod))
return false;
}
elseif(file_exists($path) && $path!='/') {
- if(!@chmod($path, (int)$mod))
+ if(!@chmod($path, (int)$mod))
return false;
}
return true;
@@ -206,7 +206,7 @@
while(($file =self::_scandir($d)) !== false) {
if ($file != "." && $file != "..") {
$typepath = $mypath . "/" . $file ;
- if (filetype ($typepath) == 'dir')
+ if (filetype ($typepath) == 'dir')
self::_chown($typepath, $uid, $gid);
self::_chmod($typepath, $uid);
@@ -220,7 +220,7 @@
@brief Copy repertoire recursif
@param $src absolute path
@param $dst absolute path
- @return boolean true if ok
+ @return boolean true if ok
*/
public static function _copy($src,$dst){
@@ -269,9 +269,9 @@
$arrScanCache=array();
static $arrScanCache;
- if( ! is_dir($strFolder))
+ if( ! is_dir($strFolder))
$strFolder = dirname($strFolder);
- if (substr($strFolder, -1, 1) != '/')
+ if (substr($strFolder, -1, 1) != '/')
$strFolder .= '/';
// Load from cache
@@ -294,7 +294,7 @@
@return bool
*/
public static function equal_files($file1, $file2) {
- if (is_file($file1) && is_file($file2))
+ if (is_file($file1) && is_file($file2))
return (md5_file($file1) == md5_file($file2));
return false;
}
Modified: branches/2.1.1/catalog/admin/includes/classes/menu.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/menu.php 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/classes/menu.php 2012-08-02 06:58:56 UTC (rev 4545)
@@ -198,12 +198,12 @@
$format=(!$rec)?$this->format_line_box_open_entete: $this->format_line_box_open ;
/* Boucle pour sous menu avec entete de menu non clickable*/
$link1 .=sprintf($format,
- sprintf($this->format,$this->id_css('act'.$i),'index.php?type='.$r['value'][2],tep_cst_menu_conf($r['value'][1]),' class="menuBoxContentLink '.$r['value'][2].'" '.
+ sprintf($this->format,$this->id_css('act'.$i),'index.php?type='.$r['value'][2],tep_cst_menu_conf($r['value'][1]),' class="sub menuBoxContentLink '.$r['value'][2].'" '.
sprintf($this->format_js,$i)
),
$this->cstr_tbl_rec($r['value'][4],$r['key']),
$this->id_css('menu'.$i.'Container'),
- $r['key'].'_'.$r['value'][2].((isset($this->menu_acl[$acl_for_ctr]) || !isset($r['value'][5])) ?'' : ' disabled ')
+ @$tp.' '.$r['key'].'_'.$r['value'][2].((isset($this->menu_acl[$acl_for_ctr]) || !isset($r['value'][5])) ?'' : ' disabled ')
);
$ssmenu++;
@@ -217,7 +217,7 @@
/* Boucle pour sous menu avec entete de menu en liens vers page*/
$link=(preg_match("/[0-9]{2}_[a_z].*/",$r['value'][0]))? 'index.php?type='.$r['value'][2]: $r['value'][0];
$link1 .=sprintf($format,
- sprintf($this->format,$this->id_css('act'.$i),tep_href_link($link),tep_cst_menu_conf($r['value'][1]),' class="menuBoxContentLink '.$r['value'][2].'" '.
+ sprintf($this->format,$this->id_css('act'.$i),tep_href_link($link),tep_cst_menu_conf($r['value'][1]),' class=" menuBoxContentLink '.$r['value'][2].'" '.
sprintf($this->format_js,$i)
),
$this->cstr_tbl_rec($r['value'][4],$r['key']),
@@ -284,7 +284,7 @@
if(!isset($this->menu_acl[$acl_for_ctr]) || empty($this->menu_maintenance[$acl_for_ctr]['admin_groups_id'])) {
$this->update_acl_mini($this->menu_maintenance[$acl_for_ctr]['admin_files_id']);
}
-// echo $r['key'].' '.$acl_for_ctr.'<br >';
+
$array_s[$r['key']]=array('type'=>'ss_menu',
'etat'=>((!isset($this->menu_acl[$acl_for_ctr])) ? 'false' : 'true'),
'admin_files_id'=>$this->menu_maintenance[$acl_for_ctr]['admin_files_id'],
@@ -297,7 +297,7 @@
'class'=>'menuBoxContentLink '.$r['value'][2],
'CONTENEUR_class'=>'menuBoxContentLink '.$r['value'][2],
'CONTENEUR_id'=>$this->id_css('act'.$i),
- 'CONTENU_class'=>$r['key'].'_'.$r['value'][2].((!isset($this->menu_acl[$acl_for_ctr])) ?' disabled ' : ''),
+ 'CONTENU_class'=>$r['key'].'_'.$r['value'][2].((!isset($this->menu_acl[$acl_for_ctr])) ?' disabled ' : ''),
'CONTENU_id'=>$this->id_css('menu'.$i.'Container'),
'id'=>$this->id_css('act'.$i),
'js'=> sprintf($this->format_js,$i),
Modified: branches/2.1.1/catalog/admin/includes/content/configuration.central.inc
===================================================================
--- branches/2.1.1/catalog/admin/includes/content/configuration.central.inc 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/content/configuration.central.inc 2012-08-02 06:58:56 UTC (rev 4545)
@@ -24,10 +24,12 @@
</div>
<h3 class="main-title"><?php echo tep_cst_menu_conf($cfg_group['configuration_group_title']); ?></h3>
+<div class="block_uniq">
<h4><?php echo tep_cst_menu_conf('TITLE_'.$cfg_group['configuration_group_title']); ?></h4>
<?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $gID . '&action=save_mutli') ?>
- <div class="box_left">
+ <div class="edit">
+<fieldset class="block_field">
<ul class="block_form tirroirs">
<?php foreach($list_edit as $row) { ?>
<li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>" class="Ctrtirroir"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
@@ -41,16 +43,15 @@
</li>
<?php } ?>
</ul>
- </div>
- <div class="box_right">
- <ul>
+
<div class="button_nav">
<?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $gID )) ; ?>
</div>
- </li>
- </ul>
+</fieldset>
+<br class="clear" />
</div>
</form>
+ </div>
<?php endif; ?>
<!-- body_text_eof //-->
<!-- body_eof //-->
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -22,7 +22,7 @@
<legend><?php echo __('@filters filter legend choose categorie'); ?></legend>
<ul >
<?php foreach(categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$languages_id , 'exclude'=>array('0'))) as $k=>$item): ?>
- <li>
+ <li class="<?php echo ((bool)(count($_SESSION['filters']['categorie']) <=0 || (string)$_SESSION['filters']['categorie'][$item['id']] == 'on')? 'select' : '' ) ?>">
<?php echo tep_draw_checkbox_field('filters[categorie]['.$item['id'].']', 'filters[categorie]['.$item['id'].']', 'on', (bool)(count($_SESSION['filters']['categorie']) <=0 || (string)$_SESSION['filters']['categorie'][$item['id']] == 'on')); ?>
<?php echo (is_array($item)? $item['text'] : $item ) ?>
</li>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -23,7 +23,7 @@
<fieldset>
<legend><?php echo __('@filters filter legend choose featured'); ?></legend>
- <ul >
+ <ul class="<?php echo ((bool)((string)$_SESSION['filters']['featured'][$item->id] == 'on')? 'select' : '' ) ?>">
<?php foreach($list as $k=>$item): ?>
<li>
<?php echo tep_draw_checkbox_field('filters[featured]['.$item->id.']', 'filters[featured]['.$item->id.']', 'on', (bool) ((string)$_SESSION['filters']['featured'][$item->id] == 'on')); ?>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -15,7 +15,7 @@
<ul class="inline">
<?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item):
$clean = substr($k, (strpos($k, '.')+1)); ?>
- <li>
+ <li class="<?php echo ((bool)(count($_SESSION['filters']['allfields']) <=1 || (string)@$_SESSION['filters']['allfields'][$clean] == 'on')? 'select' : '' ) ?>">
<?php echo tep_draw_checkbox_field('filters[listfield]['.$clean.']', 'filters[listfield]['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)@$_SESSION['filters']['allfields'][$clean] == 'on')); ?>
<?php echo (is_array($item)? $item['text'] : $item ) ?>
</li>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -14,7 +14,7 @@
<legend><?php echo __('@filters filter legend choose subtype'); ?></legend>
<ul class="inline">
<?php foreach(tep_get_status_array(MGabCont::CallSt('GetClassDatatype')) as $item): ?>
- <li>
+ <li class="<?php echo ((bool)(count(@$_SESSION['filters']['subtype']) <1 || (string)@$_SESSION['filters']['subtype'][$item['id']] == 'on')? 'select' : '' ) ?>" >
<?php echo tep_draw_checkbox_field('filters[subtype]['.$item['id'] .']', 'filters[subtype]['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['subtype']) <1 || (string)@$_SESSION['filters']['subtype'][$item['id']] == 'on')); ?>
<?php echo $item['text'] ?>
</li>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -17,6 +17,8 @@
echo '<a class="button" href="' . tep_href_link(adminGroup::FILENAME) . '">' . IMAGE_CANCEL . '</a>';?>
</div>
<div class="box_uniq">
+
+ <div class="edit">
<table style="width:100%">
<thead>
<tr>
@@ -112,5 +114,6 @@
<?php } ?>
</tbody>
</table>
-
+ <br class="clear" />
+ </div>
</form>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -14,6 +14,8 @@
<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'gID='.@$_GET['gID'].'&action='. ((adminGroup::$action == 'edit')? 'group_edit' : 'new_confirm') , 'post' ); ?>
<div class="box_uniq">
+
+ <div class="edit">
<p><?php if (adminGroup::$action == 'edit') echo tep_draw_hidden_field('newsletter_id', '', (int)$_GET['gID'] ); ?></p>
<fieldset class="block_field">
@@ -31,6 +33,7 @@
echo '<a class="button" href="' . tep_href_link(adminGroup::FILENAME) . '">' . IMAGE_CANCEL . '</a>'; ?>
</div>
+ <br class="clear" />
</div>
-
+ </div>
</form>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/gabarit/adminUsers/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/adminUsers/display_view.edit.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/adminUsers/display_view.edit.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -19,8 +19,8 @@
<ul>
<li><a href="#tabs-1"><?php echo __('adminUsers tab specification'); ?></a></li>
</ul>
+ <div class="edit">
-
<div id="tabs-1" class="tabPage">
<?php echo tep_draw_form('adminUsers', adminUsers::FILENAME, 'action='.((adminUsers::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
@@ -65,5 +65,5 @@
<br class="clear" />
</div>
-
+ </div>
</div>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/attributes/display_view.options.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/attributes/display_view.options.edit.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/attributes/display_view.options.edit.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -11,7 +11,7 @@
?>
<h3><?php echo __('heading title') ?></h3>
<?php echo tep_draw_form('sort_detail', attributes::FILENAME, 'poID='.attributes::$poID.'&action='.((attributes::$action=='new')? 'insert':'update'), 'post') ?>
-
+<div class="edit">
<fieldset class="tabs_lang block_field">
<ul>
<?php for ($i=0, $n=sizeof(attributes::$languages); $i<$n; $i++) { ?>
@@ -62,4 +62,7 @@
<fieldset class="block_field button_nav">
<?php echo tep_image_submit('', IMAGE_UPDATE).tep_js_back(tep_href_link(attributes::FILENAME, tep_get_all_get_params(array('action','poID'))), IMAGE_CANCEL) ; ?>
</fieldset>
+
+ <br class="clear" />
+ </div>
</form>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/gabarit/categories/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/categories/display_view.edit.gab 2012-08-01 19:21:28 UTC (rev 4544)
+++ branches/2.1.1/catalog/admin/includes/gabarit/categories/display_view.edit.gab 2012-08-02 06:58:56 UTC (rev 4545)
@@ -19,70 +19,72 @@
<div class="box_uniq block_form">
<?php echo tep_draw_form('categories', categories::FILENAME, 'action='.((categories::$action == 'new')?'insert' : 'update').'&cPath=' . categories::$cPath, 'post', 'enctype="multipart/form-data"') ?>
- <div class="edit box_left w_70">
+
<div id="tabs">
- <ul>
- <li><a href="#tabs-1"><?php echo __('tab products data'); ?></a></li>
- <?php
- $g=3;
- categories::$modules->display_edit($contents,@$_GET['cID']);
- if(is_array($contents))
- foreach ($contents as $value) {
- if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
- $g++;
- } ?>
- </ul>
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('tab products data'); ?></a></li>
+ <?php
+ $g=3;
+ categories::$modules->display_edit($contents,@$_GET['cID']);
+ if(is_array($contents))
+ foreach ($contents as $value) {
+ if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
+ $g++;
+ } ?>
+ </ul>
- <div id="tabs-1" class="tabPage">
+ <div class="edit box_left w_70">
-<!-- <p class="block_input"> -->
+ <div id="tabs-1" class="tabPage">
- <div class="tabs_lang">
- <ul>
- <?php for ($i=0, $n=sizeof(categories::$languages); $i<$n; $i++) { ?>
- <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image( categories::$languages[$i]['directory'] . '/images/' . categories::$languages[$i]['image'], categories::$languages[$i]['name']); ?></a></li>
+ <!-- <p class="block_input"> -->
- <?php } ?>
- </ul>
- <?php for ($i=0, $n=sizeof(categories::$languages); $i<$n; $i++) { ?>
- <fieldset id="fieldset_<?php echo $i ?>">
- <legend><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . categories::$languages[$i]['directory'] . '/images/' . categories::$languages[$i]['image'], categories::$languages[$i]['name'], TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT); ?></legend>
- <p class="block_input" style="width:90%;">
- <label for="<?php echo 'content_title' . categories::$languages[$i]['id']; ?>"><?php echo __('text edit categories name'); ?></label>
- <?php echo tep_draw_input_field('categories_name[' . categories::$languages[$i]['id'] . ']', '', categories::$cInfo->categories_name[categories::$languages[$i]['id']]) ; ?>
- </p>
- <br style="clear:both" />
- <label for="<?php echo 'categories_description_' . categories::$languages[$i]['id'] . ''; ?>"><?php echo __('text edit categories description'); ?></label>
- <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','categories_description[' . categories::$languages[$i]['id'] . ']','1000','800',categories::$cInfo->categories_description[categories::$languages[$i]['id']]); ?>
- </fieldset>
- <?php } ?>
- </div>
+ <div class="tabs_lang">
+ <ul>
+ <?php for ($i=0, $n=sizeof(categories::$languages); $i<$n; $i++) { ?>
+ <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image( categories::$languages[$i]['directory'] . '/images/' . categories::$languages[$i]['image'], categories::$languages[$i]['name']); ?></a></li>
+ <?php } ?>
+ </ul>
+ <?php for ($i=0, $n=sizeof(categories::$languages); $i<$n; $i++) { ?>
+ <fieldset id="fieldset_<?php echo $i ?>">
+ <legend><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . categories::$languages[$i]['directory'] . '/images/' . categories::$languages[$i]['image'], categories::$languages[$i]['name'], TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT); ?></legend>
+ <p class="block_input" style="width:90%;">
+ <label for="<?php echo 'content_title' . categories::$languages[$i]['id']; ?>"><?php echo __('text edit categories name'); ?></label>
+ <?php echo tep_draw_input_field('categories_name[' . categories::$languages[$i]['id'] . ']', '', categories::$cInfo->categories_name[categories::$languages[$i]['id']]) ; ?>
+ </p>
+ <br style="clear:both" />
+ <label for="<?php echo 'categories_description_' . categories::$languages[$i]['id'] . ''; ?>"><?php echo __('text edit categories description'); ?></label>
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','categories_description[' . categories::$languages[$i]['id'] . ']','1000','800',categories::$cInfo->categories_description[categories::$languages[$i]['id']]); ?>
+ </fieldset>
+ <?php } ?>
+ </div>
- <p class="block_input">
- <Label><?php echo __('text edit sort order') ?></label>
- <?php echo tep_draw_input_field('sort_order', '', categories::$cInfo->sort_order, 'size="2"') ?>
- <?php /** Hidden Inputs */ if(categories::$action == 'edit') echo tep_draw_hidden_field('categories_id', '', categories::$cInfo->categories_id); ?>
+ <p class="block_input">
+ <Label><?php echo __('text edit sort order') ?></label>
+ <?php echo tep_draw_input_field('sort_order', '', categories::$cInfo->sort_order, 'size="2"') ?>
- </p>
+ <?php /** Hidden Inputs */ if(categories::$action == 'edit') echo tep_draw_hidden_field('categories_id', '', categories::$cInfo->categories_id); ?>
+ </p>
- <div class="block_input">
- <Label><?php echo __('text edit datatype categorie') ?></label>
- <ul>
- <?php foreach($DT->GetTypeForRootListing() as $k=>$row): ?>
- <li><?php echo tep_draw_radio_field('categories_datatype', 'categories_datatype' , $row , (in_array($row, explode(',', categories::$cInfo->categories_datatype))? true : false) ) . ' '. $row ?></li>
- <?php en...
[truncated message content] |
|
From: <os...@us...> - 2012-08-03 15:56:03
|
Revision: 4549
http://oscss.svn.sourceforge.net/oscss/?rev=4549&view=rev
Author: oscim
Date: 2012-08-03 15:55:56 +0000 (Fri, 03 Aug 2012)
Log Message:
-----------
correction diverse , centralisation des element less sur default
correction
Ajout recherche dans le theme par defaut si non trouv?\195?\169 dans le theme courant lors des appels css , less et js
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/oscss_cstr.php
branches/2.1.1/catalog/admin/includes/functions/html_output.php
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/template/defaut/login-panel.css
branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml
branches/2.1.1/catalog/admin/includes/template/oscss/gabarit-1.php
branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
branches/2.1.1/catalog/includes/classes/core_page/overlay/oscss_plugins.php
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/template/defaut/element.less
branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
Modified: branches/2.1.1/catalog/admin/includes/classes/oscss_cstr.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/oscss_cstr.php 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/classes/oscss_cstr.php 2012-08-03 15:55:56 UTC (rev 4549)
@@ -281,10 +281,12 @@
@return (bool)false OR string path file
*/
public static function test_gab_theme($element,$ext='php'){
+// var_dump(DIR_WS_TEMPLATES.DEFAULT_TEMPLATE_NAME.'/'.$element.'.'.$ext);
if (self::TestFile(DIR_WS_TEMPLATE.$element.'-'.$_SESSION['login_groups_id'].'.'.$ext) ) return DIR_WS_TEMPLATE.$element.'-'.$_SESSION['login_groups_id'].'.'.$ext;
elseif (self::TestFile(DIR_WS_TEMPLATE.$element.'-'.$_SESSION['login_id'].'.'.$ext) ) return DIR_WS_TEMPLATE.$element.'-'.$_SESSION['login_id'].'.'.$ext;
elseif (self::TestFile(DIR_WS_TEMPLATE.$element.'-1.'.$ext) ) return DIR_WS_TEMPLATE.$element.'-1.'.$ext;
elseif (self::TestFile(DIR_WS_TEMPLATE.$element.'.'.$ext) ) return DIR_WS_TEMPLATE.$element.'.'.$ext;
+ elseif (self::TestFile(DIR_WS_INCLUDES.'template/'.DEFAULT_TEMPLATE_NAME.'/'.$element.'.'.$ext) ) return DIR_WS_INCLUDES.'template/'.DEFAULT_TEMPLATE_NAME.'/'.$element.'.'.$ext;
else return false;
}
Modified: branches/2.1.1/catalog/admin/includes/functions/html_output.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/functions/html_output.php 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/functions/html_output.php 2012-08-03 15:55:56 UTC (rev 4549)
@@ -109,6 +109,7 @@
$key=md5($value);
if (!isset($deja_charge[$key]) || $force) {
if (substr($value,($long-3),$long)=='css') print "<link rel=\"stylesheet\" href=\"".$refe['url'].$value."\" type=\"text/css\" media=\"all\" />\n";
+ elseif (substr($value,($long-4),$long)=='less') print "<link rel=\"stylesheet/less\" href=\"".$refe['url'].$value."\" type=\"text/css\" />\n";
elseif (substr($value,($long-2),$long)=='js') print '<script type="text/javascript" src="'.$refe['url'].$value.'"></script>'."\n";
elseif(substr($value,($long-3),$long)=='php'||substr($value,($long-3),$long)=='inc') include ($refe['path'].$value);
}
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-03 15:55:56 UTC (rev 4549)
@@ -62,6 +62,7 @@
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
+
};
// }
Added: branches/2.1.1/catalog/admin/includes/template/defaut/element.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/element.less (rev 0)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/element.less 2012-08-03 15:55:56 UTC (rev 4549)
@@ -0,0 +1,136 @@
+/*---------------------------------------------------
+ * LESS Elements 0.6
+ * ---------------------------------------------------
+ * A set of useful LESS mixins by Dmitry Fadeyev
+ * Special thanks for mixin suggestions to:
+ * Kris Van Herzeele,
+ * Benoit Adam,
+ * Portenart Emile-Victor,
+ * Ryan Faerman
+ *
+ * More info at: http://lesselements.com
+ * -----------------------------------------------------*/
+
+.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
+ background: @color;
+ background: -webkit-gradient(linear,
+ left bottom,
+ left top,
+ color-stop(0, @start),
+ color-stop(1, @stop));
+ background: -ms-linear-gradient(bottom,
+ @start,
+ @stop);
+ background: -moz-linear-gradient(center bottom,
+ @start 0%,
+ @stop 100%);
+}
+.bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
+ background: @color;
+ background: -webkit-gradient(linear,
+ left bottom,
+ left top,
+ color-stop(0, rgb(@start,@start,@start)),
+ color-stop(1, rgb(@stop,@stop,@stop)));
+ background: -ms-linear-gradient(bottom,
+ rgb(@start,@start,@start) 0%,
+ rgb(@start,@start,@start) 100%);
+ background: -moz-linear-gradient(center bottom,
+ rgb(@start,@start,@start) 0%,
+ rgb(@stop,@stop,@stop) 100%);
+}
+.bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
+ border-top: solid 1px @top-color;
+ border-left: solid 1px @left-color;
+ border-right: solid 1px @right-color;
+ border-bottom: solid 1px @bottom-color;
+}
+.drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
+ -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
+ -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
+ box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
+}
+.rounded(@radius: 2px) {
+ -webkit-border-radius: @radius;
+ -moz-border-radius: @radius;
+ border-radius: @radius;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+}
+.border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
+ -webkit-border-top-right-radius: @topright;
+ -webkit-border-bottom-right-radius: @bottomright;
+ -webkit-border-bottom-left-radius: @bottomleft;
+ -webkit-border-top-left-radius: @topleft;
+ -moz-border-radius-topright: @topright;
+ -moz-border-radius-bottomright: @bottomright;
+ -moz-border-radius-bottomleft: @bottomleft;
+ -moz-border-radius-topleft: @topleft;
+ border-top-right-radius: @topright;
+ border-bottom-right-radius: @bottomright;
+ border-bottom-left-radius: @bottomleft;
+ border-top-left-radius: @topleft;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+}
+.opacity(@opacity: 0.5) {
+ -moz-opacity: @opacity;
+ -khtml-opacity: @opacity;
+ -webkit-opacity: @opacity;
+ opacity: @opacity;
+}
+.transition-duration(@duration: 0.2s) {
+ -moz-transition-duration: @duration;
+ -webkit-transition-duration: @duration;
+ transition-duration: @duration;
+}
+.rotation(@deg:5deg){
+ -webkit-transform: rotate(@deg);
+ -moz-transform: rotate(@deg);
+ transform: rotate(@deg);
+}
+.scale(@ratio:1.5){
+ -webkit-transform:scale(@ratio);
+ -moz-transform:scale(@ratio);
+ transform:scale(@ratio);
+}
+.transition(@duration:0.2s, @ease:ease-out) {
+ -webkit-transition: all @duration @ease;
+ -moz-transition: all @duration @ease;
+ transition: all @duration @ease;
+}
+.inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
+ -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
+ -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
+ box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
+}
+.box-shadow(@arguments) {
+ -webkit-box-shadow: @arguments;
+ -moz-box-shadow: @arguments;
+ box-shadow: @arguments;
+}
+.columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) {
+ -moz-column-width: @colwidth;
+ -moz-column-count: @colcount;
+ -moz-column-gap: @colgap;
+ -moz-column-rule-color: @columnRuleColor;
+ -moz-column-rule-style: @columnRuleStyle;
+ -moz-column-rule-width: @columnRuleWidth;
+ -webkit-column-width: @colwidth;
+ -webkit-column-count: @colcount;
+ -webkit-column-gap: @colgap;
+ -webkit-column-rule-color: @columnRuleColor;
+ -webkit-column-rule-style: @columnRuleStyle;
+ -webkit-column-rule-width: @columnRuleWidth;
+ column-width: @colwidth;
+ column-count: @colcount;
+ column-gap: @colgap;
+ column-rule-color: @columnRuleColor;
+ column-rule-style: @columnRuleStyle;
+ column-rule-width: @columnRuleWidth;
+}
+.translate(@x:0, @y:0) {
+ -moz-transform: translate(@x, @y);
+ -webkit-transform: translate(@x, @y);
+ -o-transform: translate(@x, @y);
+ -ms-transform: translate(@x, @y);
+ transform: translate(@x, @y);
+}
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/login-panel.css
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/login-panel.css 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/login-panel.css 2012-08-03 15:55:56 UTC (rev 4549)
@@ -3,7 +3,16 @@
h2 { font-size: 1em }
h3 { font-size: 0.8em }
-#page{position: relative; width : 500px; margin: 0 auto 0 auto; text-align: left;}
+#page{position: relative; width : 500px; margin: 0 auto 0 auto; text-align: left;
+-moz-box-shadow: 10px 5px 5px 0px #000000;
+-webkit-box-shadow: 10px 5px 5px 0px #000000;
+-o-box-shadow: 10px 5px 5px 0px #000000;
+box-shadow: 10px 5px 5px 0px #000000;
+filter:progid:DXImageTransform.Microsoft.Shadow(color=#000000, Direction=116, Strength=5);
+-webkit-border-radius: 10px;
+-moz-border-radius: 10px;
+border-radius: 10px;
+}
#content,
@@ -30,26 +39,41 @@
-moz-border-radius-bottomright: 10px;
-moz-border-radius-bottomleft: 10px;
border-bottom-right-radius: 10px;
-border-bottom-left-radius: 10px;}
+border-bottom-left-radius: 10px;
+}
+
section#forms section { background:transparent url(../../../images/oscss.jpg) 250px top no-repeat; }
.button{font-family:Arial; font-size:13px;white-space:nowrap;}
-input.button{background:#2D79CD; border:1px solid #003c74; padding:1px 5px; margin:1px 2px;color:white;font-weight:bold;}
+input.button{background:#2D79CD; border:1px solid #003c74; padding:1px 5px; margin:1px 2px;color:white;font-weight:bold;-webkit-border-radius: 5px;
+-moz-border-radius: 5px;
+border-radius: 5px;}
input.button:hover{background:#797979; border:1px solid #003c74; padding:1px 5px; margin:1px 2px ; color:white;}
a.button{background:#e3e5f0; border:1px solid #003c74; padding:2px 5px; margin:1px 2px ;color:black;text-decoration:none;}
a.button:hover{background:#797979; border:1px solid #003c74; padding:2px 5px ; margin:1px 2px ; color:white;text-decoration:none;}
-input{ background : #d4dce1; color : #000; font-family : Verdana,Arial,Helvetica,sans-serif; font-size : 1em; border-width : 1px; width:97%; }
+fieldset{
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+input{ background : #d4dce1; color : #000; font-family : Verdana,Arial,Helvetica,sans-serif; font-size : 1em; border-width : 1px; width:97%;-webkit-border-radius: 5px;
+-moz-border-radius: 5px;
+border-radius: 5px; }
+input:hover{
+ border:1px solid #2D79CD;
+ background:white;
+}
.alert{background: none repeat scroll 0 0 white; border: 1px solid red; color: red; left: 15%; margin: 0 auto; padding: 5px 20px; position: absolute; top: -15%; width: 300px; }
#loginc,
#openid {width:214px; float:left}
#openid{ border: 1px solid gray; display: inline; }
#openid,
-#openid INPUT{ font-family: "Trebuchet MS"; font-size: 12px; }
+#openid input{ font-family: "Trebuchet MS"; font-size: 12px; }
#openid label{ font-weight: bold; color: #FF6200; padding-left: 5px; padding-right: 5px; }
-#openid INPUT.openid_login{ background: url(imgs/3rdparty/openid-login-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; color: #000; padding-left: 18px; width: 220px; margin-right: 10px; }
+#openid input.openid_login{ background: url(imgs/3rdparty/openid-login-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; color: #000; padding-left: 18px; width: 220px; margin-right: 10px; }
#openid A{ color: silver; }
#openid A:hover{ color: #5e5e5e; }
#bouton{clear:both;}
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml 2012-08-03 15:55:56 UTC (rev 4549)
@@ -167,7 +167,7 @@
</row_flag>
<type_color>
<![CDATA[
- <span class="color_type" style="background-color:%1$s;">
+ <span class="color_type" style=" border-left: 15px solid%1$s;">
<span class="Val txt">%2$s</span>
</span>
]]>
Added: branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/definition.less (rev 0)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-08-03 15:55:56 UTC (rev 4549)
@@ -0,0 +1,169 @@
+/**
+ * @ 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/01/2012, 18:17
+ * @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ * @encode UTF-8
+ */
+
+/* define color generic , used in next define */
+// color
+@color_010 : #78222F;
+@color_011 : #FFFFFF;
+@color_012 : #ACAAAC;
+@color_013 : #303030;
+@color_014 : #D7D7D7;
+
+// gardient red
+@color_020 : #AE0405 ;
+@color_021 : #AE0405 ;
+@color_022 : #FD3841 ;
+
+
+
+
+
+/* Normal Definition */
+@margin: 2%;
+@padding_base : 1%;
+@lineheight: 16px;
+@font_size : 11px;
+
+
+@the-border: 1px;
+@base-color: #111;
+@red: #842210; // Fields required
+
+
+/**
+ * menu user
+ */
+@menu_user_bg : #303030;
+@menu_user_border : #3F3F3F ;
+
+// general title page
+@title_h3_color : @color_010;
+@title_h3_color_shadow : #444444 ;
+
+// Fields required
+@field_required : @red ;
+
+// message
+@color_warning : #FBE3E1 ;
+@color_success : #A1F7C2 ;
+@color_notice : #ECFF9C ;
+
+// General header
+
+// nav
+@nav_border : @color_011;
+@nav_master_link : @color_011;
+@nav_master_link_hover : #000000;
+@nav_master_link_hover_shadow : @color_011;
+
+@submenu_bg : @color_013;
+@submenu_bg_hover : #999;
+@submenu_link : #9C9A9B;
+@submenu_link_hover : @color_011;
+@submenu_link_hover_shadow : #000000;
+
+
+// color menu nav (gradient)
+@color_menu_nav_cl_1 : @color_020 ;
+@color_menu_nav_cl_2 : @color_021 ;
+@color_menu_nav_cl_3 : @color_022 ;
+
+// background menu exts, sub nav
+@color_bg_menuexts : @color_010;
+
+
+// Central content
+ /**
+ * tabs
+ */
+ // color bouton classique (gradient)
+ @color_tabs_cl_1 : @color_020 ;
+ @color_tabs_cl_2 : @color_021 ;
+ @color_tabs_cl_3 : @color_022 ;
+ // tabs color text
+ @color_tab_text_default : #ffffff;
+ @color_tab_text_default_shadow : @color_011;
+ @color_tab_text_selected : @color_020;
+ @color_tab_text_selected_shadow : @color_011;
+ @color_tab_text_hover : #ffffff;
+ @color_tab_text_hover_shadow : #555555;
+
+
+
+
+ /**
+ * Button
+ */
+ // color bouton classique (gradient)
+ @color_bouton_cl_1 : @color_020 ;
+ @color_bouton_cl_2 : @color_021 ;
+ @color_bouton_cl_3 : @color_022 ;
+
+ // color bouton and link submit , confirm , valid (gradient)
+ @color_bouton_submit_cl_1 : #248DBC ;
+ @color_bouton_submit_cl_2 : #248DBC ;
+ @color_bouton_submit_cl_3 : #B0F1F7 ;
+
+ // color bouton and link back, annulate, retrun (gradient)
+ @color_bouton_back_cl_1 : #000000 ;
+ @color_bouton_back_cl_2 : #000000 ;
+ @color_bouton_back_cl_3 : #5C5A5D ;
+
+
+ /**
+ * widget
+ */
+ @color_widget_title : @color_010; // title
+ @color_widget_bg_th : @color_010; // th
+
+// block div edit / input gradient background
+@color_bg_gradient_base : #E4E4E4; // base color
+@color_bg_gradient_eob : 200; // deb gradient
+@color_bg_gradient_eon : 255; // end gradient
+
+
+// Table Datatable
+@color_datatable_tr_th : @color_010 ;
+@color_datatable_tr_th_txt : @color_011 ;
+@datatable_color_txt :#000000 ; // couleur text dans les tableau
+
+@bg_hover : #E6FF99; // hover row or filter
+@bg_hover_txt : #000000; // hover row or filter
+
+@bg_table_tr_odd : #F0F0F0;
+@bg_table_tr_even : @color_014;
+@color_sorting : #84509A; // cols sorting
+@color_sorting_text : #A7A7A7;
+
+
+// FORM
+@bg_input : @color_011;
+@bg_input_border : @color_012;
+@bg_input_hover : #F0F0F0;
+@bg_input_border_hover : @color_010;
+
+
+
+/**
+ * Split page / Pagination
+ */
+ @color_split : @color_010;
+ @color_split_active : @color_010;
+ @color_split_active_text : #FFFFFF;
+
+
+
+// POPUP
+@color_title_txt : @color_011;
+
+// Load generic element and style
+@import "../defaut/element.less";
+
+@import "../defaut/styles.less";
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/gabarit-1.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/gabarit-1.php 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/gabarit-1.php 2012-08-03 15:55:56 UTC (rev 4549)
@@ -20,18 +20,20 @@
<title><?php echo $page_admin.' | '.TITLE; ?></title>
<base href="<?php echo tep_get_http().DIR_WS_ADMIN ?>" />
-<link rel="stylesheet/less" type="text/css" href="<?php echo DIR_WS_TEMPLATE ?>styles.less">
<?php
+ /** les structure */
+ if (($stylesheet=tep_test_gab_ele('definition','less')) !=false) tep_include_file ($stylesheet,true);
+
+ tep_include_file (DIR_WS_INCLUDES."javascript/less-1.3.0.min.js",true);
+
/** Appel des css */
if (($stylesheet=tep_test_gab_ele('stylesheet','css')) !=false) tep_include_file ($stylesheet,true);
- if (($stylesheet=tep_test_gab_ele('uniform.default','css')) !=false) tep_include_file ($stylesheet,true);
/** Fichier header systheme */
require(DIR_FS_ADMIN.DIR_WS_INCLUDES . 'header.php');
/** Appel des js */
tep_include_file (DIR_WS_TEMPLATE."inc/lib_general-1.js",true);
@include( DIR_WS_INCLUDES . "content/".$page_admin.".header.inc");
- tep_include_file (DIR_WS_INCLUDES."javascript/less-1.3.0.min.js",true);
?>
</head>
<body class="<?php echo $page_admin; ?>">
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-08-03 15:55:56 UTC (rev 4549)
@@ -9,24 +9,14 @@
*/
-
/* Structure */
div.menuSeparator { padding:2px 10px; display:block; background:#888; border-bottom:1px solid #ccc; font-size:12px; color:#FFF; line-height:14px; clear:both; }
-#ssmenu a { float:left; padding:5px 10px; margin:0;font-size:10px;background:#797979;color:white;text-shadow: 0 1px 0 #000;border-right:1px solid #444;}
-#ssmenu a:hover { float:left; padding:5px 10px ; margin:0;font-size:10px;background:#eee;color:#000;text-shadow: 0 1px 0 #fff;-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
#menu_theme * {display:block;}
-
-
-
+#ssmenu a { float:left; padding:5px 10px; margin:0;font-size:10px;background:#797979;color:white;text-shadow: 0 1px 0 #000;border-right:1px solid #444;}
+#ssmenu a:hover { float:left; padding:5px 10px ; margin:0;font-size:10px;background:#eee;color:#000;text-shadow: 0 1px 0 #fff;-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
#menubar li.account {padding-right:8px;}
-/* Bookmark */
-#menubookmark p.themeSwitcher select option,
-#menurecently p.themeSwitcher select#recently_viewed option {display:block;}
-
-
-
/* Block formulaire central block right */
#central .box_right form .block_input { -moz-border-radius:6px; -webkit-border-radius:6px; width:97%; margin:2px 1px; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;}
#central .box_right form label {width:20%;text-align:left;font-weight:bold}
@@ -44,20 +34,22 @@
.attributes-even { background-color: #ffffff; }
-/* PAge sPECIFIQUE*/
-/* widjet homePage */
-#homestats { background:transparent url(../../../images/stats.gif) bottom right no-repeat; }
-#homestats dd {margin-left: 14em; padding: 3px; margin-bottom: 5px; line-height: 1.5em}
-#homestats dt {float:left; width: 13em; padding: 3px; line-height: 1.5em; text-align:right; font-weight:bold;}
-#homestats dl {padding: 5px 0 10px 5px;}
-#homeNews { background:transparent url(img/1/header_feed.png) bottom right no-repeat; }
-#homeNews dl {padding: 5px 0 10px 5px;}
-#homeNews dt {padding: 3px; font-size:12px; font-weight:bold;}
-#homeNews dt span.date {font-size:9px; color:gray;}
-#homeNews dd {padding: 3px; margin-bottom: 5px;}
-#homeNews dt a {text-decoration:none; color:#545683;}
-#homeNews dt a:hover {color:#9D9FBF;}
+/* page specifique*/
+ /* widjet homePage */
+ #homestats { background:transparent url(../../../images/stats.gif) bottom right no-repeat; }
+ #homestats dd {margin-left: 14em; padding: 3px; margin-bottom: 5px; line-height: 1.5em}
+ #homestats dt {float:left; width: 13em; padding: 3px; line-height: 1.5em; text-align:right; font-weight:bold;}
+ #homestats dl {padding: 5px 0 10px 5px;}
+
+ #homeNews { background:transparent url(img/1/header_feed.png) bottom right no-repeat; }
+ #homeNews dl {padding: 5px 0 10px 5px;}
+ #homeNews dt {padding: 3px; font-size:12px; font-weight:bold;}
+ #homeNews dt span.date {font-size:9px; color:gray;}
+ #homeNews dd {padding: 3px; margin-bottom: 5px;}
+ #homeNews dt a {text-decoration:none; color:#545683;}
+ #homeNews dt a:hover {color:#9D9FBF;}
+
/* statistqiue et rapport*/
table.dataTable.stat.stock tr {margin:2px; position:relative }
#central.stats tr.OutofStock{background:#d95017;}
@@ -74,15 +66,10 @@
#salesStats .BarGraph li.p0{margin:0 0 -3px 16px;color:#FFF;}
-/* Adress */
-.ViewAddress {padding:5px; }
-
/* Widget BOX */
-.graph{width:95%;}
-
.box ul,
.box p,
.box dl { list-style-type:none; margin:0 0 0 2px; padding:0 10px 10px 10px ;}
Modified: branches/2.1.1/catalog/includes/classes/core_page/overlay/oscss_plugins.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/core_page/overlay/oscss_plugins.php 2012-08-02 23:21:02 UTC (rev 4548)
+++ branches/2.1.1/catalog/includes/classes/core_page/overlay/oscss_plugins.php 2012-08-03 15:55:56 UTC (rev 4549)
@@ -105,7 +105,6 @@
$active = true;
$fpath = $path;
}
-
if($active){
$array_file[]=$fpath;
if(!self::testCache($fpath) && !function_exists($r['value'].'_scripts')){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-05 08:37:31
|
Revision: 4566
http://oscss.svn.sourceforge.net/oscss/?rev=4566&view=rev
Author: oscim
Date: 2012-08-05 08:37:25 +0000 (Sun, 05 Aug 2012)
Log Message:
-----------
suite travail theme BO
Ajout d'une medthode init() dans formutility afin de vider les caches , FIX bug datepicker dans les fomulaires
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less
branches/2.1.1/catalog/admin/includes/template/defaut/definition.less
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
branches/2.1.1/catalog/common/classes/formUtility.php
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-04 20:31:20 UTC (rev 4565)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-05 08:37:25 UTC (rev 4566)
@@ -1027,6 +1027,7 @@
@brief Methode call for display Page / result
*/
public function display_view() {
+ formUtility::Init();
$action=self::$action;
switch(self::$action){
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less 2012-08-04 20:31:20 UTC (rev 4565)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less 2012-08-05 08:37:25 UTC (rev 4566)
@@ -149,7 +149,7 @@
body {
- background:#faf9f7 url("img/1/body.jpg") left -80px repeat-x;
+ background:#faf9f7 ;
background-attachment:fixed;
font: normal @font_size Verdana, Arial, sans-serif;
}
@@ -825,9 +825,9 @@
// UI tabs
- .ui-tabs {
+ div#glob .ui-tabs {
position: relative;
- padding: .2em;
+ padding: (@padding_base * 2);
zoom: 1;
.ui-tabs-nav {
@@ -839,13 +839,14 @@
float: left;
position: relative;
top: 1px;
- margin: 0 .1em 0 0;
+ margin: 0 @padding_base 0 0;
padding: 0;
white-space: nowrap;
+ line-height : (@lineheight * 1.2);
a {
float: left;
- padding: .3em 0.5em;
+ padding: (@padding_base * 2) (@padding_base * 4);
text-decoration: none;
cursor: pointer;
font-size: (@font_size*1.3);
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/definition.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/definition.less 2012-08-04 20:31:20 UTC (rev 4565)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/definition.less 2012-08-05 08:37:25 UTC (rev 4566)
@@ -32,8 +32,8 @@
/* Normal Definition */
-@margin: 2%;
-@padding_base : 1%;
+@margin: 0.2em;
+@padding_base : 0.1em;
@lineheight: 16px;
@font_size : 11px;
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-04 20:31:20 UTC (rev 4565)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-05 08:37:25 UTC (rev 4566)
@@ -714,7 +714,23 @@
}
}
}
+
+
// UI
+
+
+ .ui-datepicker {
+ .ui-widget-header{
+ .gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
+ .border-radius(5px,0,0,5px);
+ }
+ .ui-datepicker-calendar{
+ .bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon) ;
+ .border-radius(0,5px,5px,0);
+ }
+ }
+
+
/* Layout helpers */
.ui-dialog {
.ui-widget-header{
@@ -734,7 +750,7 @@
zoom: 1;
&:before,
- &:after { content: ""; display: table; }
+ &:after { display: table; }
&:after { clear: both; }
}
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
@@ -817,16 +833,17 @@
.ui-widget-header {
border-radius: 0;
- border-bottom: 1px solid #aaaaaa;
+// border-bottom: 1px solid #aaaaaa;
font-weight: bold;
}
// UI tabs
- .ui-tabs {
+ div#glob .ui-tabs {
position: relative;
- padding: .2em;
+ padding: (@padding_base * 2);
+ margin-top : (@margin * 1.5);
zoom: 1;
.ui-tabs-nav {
@@ -838,13 +855,13 @@
float: left;
position: relative;
top: 1px;
- margin: 0 .1em 0 0;
+ margin: 0 (@margin * 1.5) 0 0;
padding: 0;
white-space: nowrap;
a {
float: left;
- padding: .3em 0.5em;
+ padding: (@padding_base * 3) (@padding_base * 6);
text-decoration: none;
cursor: pointer;
font-size: (@font_size*1.3);
@@ -856,6 +873,10 @@
margin-bottom: 0;
padding-bottom: 1px;
cursor: not-drop;
+
+ a{
+ padding: (@padding_base * 3) (@padding_base * 6);
+ }
}
.ui-tabs-selected,
.ui-tabs-selected a,
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-08-04 20:31:20 UTC (rev 4565)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-08-05 08:37:25 UTC (rev 4566)
@@ -31,8 +31,8 @@
@display_width : 90% ;
/* Normal Definition */
-@margin: 2%;
-@padding_base : 1%;
+@margin: 0.2em;
+@padding_base : 0.1em;
@lineheight: 16px;
@font_size : 11px;
Modified: branches/2.1.1/catalog/common/classes/formUtility.php
===================================================================
--- branches/2.1.1/catalog/common/classes/formUtility.php 2012-08-04 20:31:20 UTC (rev 4565)
+++ branches/2.1.1/catalog/common/classes/formUtility.php 2012-08-05 08:37:25 UTC (rev 4566)
@@ -15,17 +15,22 @@
*/
protected static $format=array(
-'image_submit'=>'<input type="submit" value="%s" title="%s" class="%s" %s />'
+ 'image_submit'=>'<input type="submit" value="%s" title="%s" class="%s" %s />'
);
static protected $id_check=array();
+ /**
+ @brief control and|or generate unique id for html balise
+ */
private static function gener_id($id_propose){
- if(!isset(self::$id_check[$id_propose])) return self::$id_check[$id_propose]=$id_propose;
+ if(!isset(self::$id_check[md5($id_propose)])){
+ self::$id_check[md5($id_propose)]=$id_propose;
+ return $id_propose;
+ }
else {
$id=$id_propose.rand(1,3);
-
- return self::gener_id($id);
+ return self::gener_id($id);
}
}
@@ -37,12 +42,18 @@
@return string id for css balise
*/
private static function HtmlAddId($id,$name){
- return (!empty($id))
- ? ' ' . 'id="' . str_replace(array('[',']'),array(''),tep_output_string(self::gener_id($id))) . '"'
- : ' ' . 'id="' . str_replace(array('[',']'),array(''),tep_output_string(self::gener_id($name))) . '"';
+ $txt = self::gener_id( ( (!empty($id)) ? $id :$name ) );
+ return ' ' . 'id="' . str_replace(array('[',']'),array(''),tep_output_string($txt) ) . '"' ;
}
/**
+ @fn Init()
+ */
+ public static function Init(){
+ self::$id_check=array();
+ }
+
+ /**
@fn UpFormat($key, $format)
@brief for update format sprintf for key , this var self::$format
@param $key string this name function call
@@ -92,6 +103,7 @@
@param $params param html
*/
public static function draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {
+
$form = '<form id="' . tep_output_string($name) . '" action="';
if( (substr($action, 0, 4 ) !='http') ){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-09 18:22:16
|
Revision: 4569
http://oscss.svn.sourceforge.net/oscss/?rev=4569&view=rev
Author: oscim
Date: 2012-08-09 18:22:08 +0000 (Thu, 09 Aug 2012)
Log Message:
-----------
suite gros travail de nettoyage et refonte des template du BO
Implementation d'une couche javascript pour traiter l'affichage des notifications de messageStack a travers des popup js avec timeout afin de ne pas polluer l'affichage
report de certaine notification manquante
FIX coquille dans formUtility
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/application_bottom.php
branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
branches/2.1.1/catalog/admin/includes/classes/tableBlock.php
branches/2.1.1/catalog/admin/includes/header.php
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
branches/2.1.1/catalog/admin/includes/modules/pages/categories.php
branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/header.less
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less
branches/2.1.1/catalog/admin/includes/template/defaut/gabarit-1.php
branches/2.1.1/catalog/admin/includes/template/defaut/header-1.php
branches/2.1.1/catalog/admin/includes/template/defaut/inc/lib_general-1.js
branches/2.1.1/catalog/admin/includes/template/defaut/stylesheet-1.css
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/header.less
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
branches/2.1.1/catalog/admin/includes/template/oscss/inc/lib_general-1.js
branches/2.1.1/catalog/common/classes/formUtility.php
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/javascript/oscss.js
Modified: branches/2.1.1/catalog/admin/includes/application_bottom.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -53,9 +53,56 @@
//! close Handler
osC_ErrorHandler::stop();
}
+
+
?>
+<?php
+/**
+ Replace messageStack display generated php by javascript notification
+*/
+?>
+<script type="text/javascript">
+ $(function() {
+ <?php
+ if ($messageStack->size > 0) :
+
+ // Get errors
+ $arr = $messageStack->get_errors() ;
+
+ // adjust duration
+ $duration=array(
+ 'messageStackSuccess'=>1,
+ 'messageStackError'=>5,
+ 'messageStackWarning'=>3.5,
+ 'messageStackInfo'=>2
+ );
+
+ foreach($arr as $k=>$row): ?>
+
+ // Add message line
+ OSCSS_JSNOTIF.utils.notif.AddNotif({
+ indice:"<?php echo time() ?>",
+ style:"<?php echo $row['class'] ?>",
+ message:"<?php echo addslashes($row['text']) ?>",
+ // position:"top",
+ duration:1500 * <?php echo $duration[$row['class']]; ?>
+ });
+ <?php
+ endforeach; ?>
+
+ /// Active Display message
+ OSCSS_JSNOTIF.utils.notif.ViewNotif();
+
+ <?php
+ $messageStack->reset() ;
+ endif; ?>
+
+ });
+</script>
+
+
<?php
/**
@brief javascript for all page, post_load_value, is a function call after load page
@@ -67,6 +114,8 @@
/** Init page event js */
function post_load_page(){
+
+
$('form.fancy,form.fancyView').ajaxForm({
success: function(responseText){
$.fancybox({'content':responseText});
@@ -168,6 +217,8 @@
// Call Back Exec
<?php echo oscss_cstr::CallBackExec(); ?>
+
+
}
// --></script>
@@ -175,7 +226,7 @@
<script type="text/javascript"><!--
/** Init page event js */
- post_load_page()
+ post_load_page();
// --></script>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -1,9 +1,9 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2010 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.0
+ @version 2.1.1
@date 09/11/10, 09:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -16,7 +16,7 @@
*/
class messageStack extends tableBlock {
- var $size = 0;
+ public $size = 0;
protected static $_instance;
@@ -28,7 +28,7 @@
if (tep_session_is_registered('messageToStack')) {
for ($i = 0, $n = sizeof($messageToStack); $i < $n; $i++) {
- $this->add($messageToStack[$i]['text'], $messageToStack[$i]['type']);
+ $this->add($messageToStack[$i]['text'], $messageToStack[$i]['type']);
}
tep_session_unregister('messageToStack');
}
@@ -45,17 +45,23 @@
}
public function add($message, $type = 'error') {
- if ($type == 'error') {
- $this->errors[] = array('class' => 'messageStackError', 'text' => $message);
- } elseif ($type == 'warning') {
- $this->errors[] = array('class' => 'messageStackWarning', 'text' => $message);
- } elseif ($type == 'success') {
- $this->errors[] = array('class' => 'messageStackSuccess', 'text' => $message);
- } else {
- $this->errors[] = array('class' => 'messageStackError', 'text' => $message);
- }
+ static $nobl;
+ if(!is_array($nobl)) $nobl = array();
- $this->size++;
+ if(!isset($nobl[md5($message)])){
+ if ($type == 'error') {
+ $this->errors[] = array('class' => 'messageStackError', 'text' => $message);
+ } elseif ($type == 'warning') {
+ $this->errors[] = array('class' => 'messageStackWarning', 'text' => $message);
+ } elseif ($type == 'success') {
+ $this->errors[] = array('class' => 'messageStackSuccess', 'text' => $message);
+ } else {
+ $this->errors[] = array('class' => 'messageStackInfo', 'text' => $message);
+ }
+
+ $nobl[md5($message)] = '';
+ $this->size++;
+ }
}
public function add_session($message, $type = 'error') {
@@ -88,11 +94,11 @@
Alias
*/
public function get_errors(){
- return $this->output();
+ return $this->errors;
}
public function output() {
- $this->table_data_parameters = 'class="messageBox"';
+// $this->table_data_parameters = 'class="messageBox"';
return $this->tableBlock($this->errors);
}
}
Modified: branches/2.1.1/catalog/admin/includes/classes/tableBlock.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/tableBlock.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/classes/tableBlock.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -3,7 +3,7 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
+ @version 2.1.1
@date 10/06/10, 09:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
ayatus - oscim - oscssTeam
Modified: branches/2.1.1/catalog/admin/includes/header.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/header.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/header.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -20,9 +20,13 @@
tep_include_file (DIR_WS_JS."jquery.fancybox/jquery.fancybox.css",true);
if( ($css=tep_test_gab_ele("jquery-ui",'css')) !=false ) tep_include_file ($css,true);
-
+ // lasted
tep_include_file (DIR_WS_JS."jquery.min.js",true);
+ // specifique lib for core osCSS
+ tep_include_file (DIR_WS_JS."oscss.js",true);
+
+ // ui plugin jquery
tep_include_file ("includes/javascript/jquery-ui.min.js",true);
tep_include_file ("includes/javascript/jquery.cookie.js",true);
if ( ($lng=language::LangueSelected()) && $lng != 'en') tep_include_file ("includes/javascript/jquery-ui-i18n.min.js",true);
@@ -38,33 +42,17 @@
tep_include_file (DIR_WS_JS."dataTables.TableTools/js/TableTools.min.js",true);
}
?>
-<script type="text/javascript"><!--
-
-
-
- // init jquery
+<?php
+/**
+ Section for use , and all manipluate listing by plugi jquery dataTable
+*/
+?>
+<script type="text/javascript"><!--
+// init jquery
$(function() {
-// var anchor = jQuery.url.attr('anchor');
-//
-// alert(anchor);
-
- //! slider block tirroir
- $('.Ctrtirroir').each(function(){
- $(this).click(function () {
- $(this).next().slideToggle('slow');
- $(this).toggleClass("closed");
- });
- //load force close
- $(this).next().slideToggle('slow');
- $(this).toggleClass("closed");
- });
-
-
-
-
// Tri de tableau
<?php if(defined('JSONSTATMENT')) : ?>
var asInitVals = new Array();
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -55,7 +55,7 @@
if (customers_telephone == "" || customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) {
- error_message = error_message + "<?php echo addslashes(JS_TELEPHONE); ?>";
+ error_message = error_message + "<?php echo sprintf(addslashes(__('js tel lenght')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>";
error = 1;
}
Added: branches/2.1.1/catalog/admin/includes/javascript/oscss.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/oscss.js (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-09 18:22:08 UTC (rev 4569)
@@ -0,0 +1,135 @@
+
+/**
+ * osCSS Notification replace display code php by javascript and no intrusive code
+ *
+ * Use
+ * Add line in instance
+ * OSCSS_JSNOTIF.utils.notif.AddNotif({indice : 1 ,style: 'toto' , message:"test 1"})
+ *
+ * Draw all message
+ *
+ * OSCSS_JSNOTIF.utils.notif.ViewNotif();
+ */
+
+OSCSS_JSNOTIF = {};
+
+(function(){ // début de scope local
+OSCSS_JSNOTIF.utils = OSCSS_JSNOTIF.utils || {};
+
+// déclaration de la classe de validation proprement dite
+OSCSS_JSNOTIF.utils.notif = {
+ // déclaration de nos variables statiques
+ settings : {
+ style:"",
+ message:"",
+ position:"bottom",
+ speed:500,
+ duration:1500
+ },
+
+ notification : {},
+
+ size :0,
+
+ Clean:function(){
+ self.size = 0;
+ self.notification = {};
+ },
+
+
+ // déclaration de nos méthodes
+ AddNotif:function( opts ) {
+
+ var opt = $.extend(self.settings,opts);
+
+ var name = 'messid_' + self.size;
+
+ self.notification[self.size++] = $.extend(opts, self.settings);
+ },
+
+ // Display all message and hide display by php
+ ViewNotif:function( opts ){
+
+ // on vérifie si il y'a déjà une div de notification
+ if($("#messageStack").length == 0){
+ //il n'y en a pas, on jQuery créé la barre de notification
+ $("body").append('<div id="messageStack"></div>');
+ }
+
+
+ /* Petite bonne pratique, stocker vos appel jQuery dans une variable
+ *pour faciliter le code et améliorer les performances de vos scripts */
+ var $pile = $("#messageStack");
+
+
+ /**
+ * Loop for add message in DOM
+ */
+ for (var nom_indice in self.notification){
+
+ // put in html modele
+ var e = $('<p id="messid' + self.notification[nom_indice].indice + '" class="' + self.notification[nom_indice].style + ' item">' + self.notification[nom_indice].message +'<span class="ButtonClose">Close</span></p>');
+
+ // add in master html block
+ $pile
+ .append(e);
+
+ // tout est prêt, on anime la notification
+ $("#messid" + self.notification[nom_indice].indice )
+ .fadeIn(self.notification[nom_indice].speed)
+ // on fait patienter jQuery
+ .delay(self.notification[nom_indice].duration)
+ // et on masque la notification
+ .fadeOut(self.notification[nom_indice].speed);
+ }
+
+
+ // on gere le bouton close des popup d'alert
+ $('.ButtonClose').each(function(){
+ $(this).click(function () {
+ $(this).parent().hide();
+ });
+ });
+
+ // Hide html dipslay block write by php
+ if($(".messageStack").length > 0){
+ //on cache le retour php
+ $(".messageStack").hide();
+ }
+
+ // suppression de la pile
+ self.Clean();
+
+ }
+
+};
+// fin de classe
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSNOTIF.utils.notif;
+})(); // fin de scope local
+
+
+
+
+
+
+
+
+
+
+// init jquery
+$(function() {
+
+ //! slider block tirroir
+ $('.Ctrtirroir').each(function(){
+ $(this).click(function () {
+ $(this).next().slideToggle('slow');
+ $(this).toggleClass("closed");
+ });
+ //load force close
+ $(this).next().slideToggle('slow');
+ $(this).toggleClass("closed");
+ });
+
+});
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -130,7 +130,6 @@
// javascript messages
define('JS_STATE',"* L'entrée 'Etat' doit avoir été choisie.\n" );
define('JS_STATE_SELECT',"-- Choisissez ci-dessus --" );
-define('JS_TELEPHONE',"* L'entrée 'Numéro de téléphone' doit avoir au moins " . ENTRY_TELEPHONE_MIN_LENGTH . " caractères.\n" );
define('ENTRY_EMAIL_ADDRESS',"Adresse électronique :" );
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2012-08-09 18:22:08 UTC (rev 4569)
@@ -136,6 +136,9 @@
$lang['action delete for %s ok']="Erreur lors de la suppresion du client %s" ;
$lang['error delete for %s']="Suppression du client %s effectué" ;
+ /* MessageStack */
+ $lang['@customers update confirm status customers']="Mise à jour de l'état de 'confirmé' " ;
+ $lang['@customers update status customers']="Mise à jour de l'état " ;
@@ -147,9 +150,11 @@
$lang['js email_address']="* L'entrée 'Adresse électronique' doit avoir au moins %s caractères." ;
$lang['js address']="* L'entrée 'Adresse' doit avoir au moins %s caractères." ;
$lang['js city']="* L'entrée 'Ville' doit avoir au moins %s caractères." ;
+ $lang['js tel lenght %s']="* L'entrée 'Numéro de téléphone' doit avoir au moins %s caractères." ;
+
/* Email subject */
$lang['subject copy creat new compte for customers']="Copie - creation de compte client par un admin" ;
$lang['creat new compte for customers']="Confirmation de votre inscription" ;
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-08-09 18:22:08 UTC (rev 4569)
@@ -156,6 +156,13 @@
$lang['text legend image']="Image" ;
+ /* MessageStack */
+ $lang['@product error in update process']="Erreur lors de l'enregsitrement du produit" ;
+ $lang['@product success in update process']="Mise à jour reussie" ;
+ $lang['@product update status product']="Changement de l'etat du produit" ;
+ $lang['@product delete product']="Suppression du produit" ;
+ $lang['@product success in update process']="Mise à jour reussie" ;
+
/* js alert */
$lang['js alert products name']="Le nom du produit est obligatoire" ;
@@ -168,8 +175,9 @@
$lang['text info copy to intro']="Veuillez choisir une nouvelle catégorie dans laquelle vous souhaitez copier ce produit" ;
$lang['text info heading copy to']="Copier vers" ;
- $lang['create products in new link categorie for %s']="Copie réussie du produit" ;
- $lang['error for create products in new link categorie for %s']="Erreur lors de la copie du produit" ;
+ /* MessageStack */
+ $lang['@product create products in new link categorie for %s']="Copie réussie du produit" ;
+ $lang['@product error for create products in new link categorie for %s']="Erreur lors de la copie du produit" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/categories.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/categories.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -211,17 +211,22 @@
$res = sqlcategorie::create($params);
+ $function = (isset($_POST['origin'])? 'add_session' : 'add' );
+
if( ! $res )
- $messageStack->add_session(sprintf(__('error save categorie : %s'), sqlcategorie::$error ), 'error');
+ $messageStack->$function(sprintf(__('error save categorie : %s'), sqlcategorie::$error ), 'error');
else
- $messageStack->add_session(sprintf(__('save categorie %s success'), $res ), 'success');
+ $messageStack->$function(sprintf(__('save categorie %s success'), $res ), 'success');
osCSS_Cache::clear('categorie');
if(isset($_POST['up_and_close']) )
- if(isset($_POST['origin']) ) tep_redirect(tep_href_link($_POST['origin']));
- else tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . ''));
+ // by popup ajax
+ if(isset($_POST['origin']) )
+ tep_redirect(tep_href_link($_POST['origin']));
+ else
+ tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . ''));
else
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . $res.'&action=edit'));
break;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -439,8 +439,12 @@
$DB->query("update " . TABLE_CUSTOMERS . " set customers_status = '" .(int) $_GET['flag'] . "' where customers_id = '" . (int)$newsletter_id . "'");
}
- if(!isset($_GET['forceajax']))
+ if(!isset($_GET['forceajax'])){
+ $messageStack->add_session(__('@customers update status customers'), 'success');
tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
+ }
+ else
+ $messageStack->add(__('@customers update status customers'), 'success');
break;
case 'setflagda':
@@ -451,8 +455,12 @@
$DB->query("update " . TABLE_CUSTOMERS . " set customers_group_ra = '" .(int) $_GET['flag'] . "' where customers_id = '" . (int)$newsletter_id . "'");
}
- if(!isset($_GET['forceajax']))
+ if(!isset($_GET['forceajax'])){
+ $messageStack->add_session(__('@customers update confirm status customers'), 'success');
tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
+ }
+ else
+ $messageStack->add(__('@customers update confirm status customers'), 'success');
break;
@@ -504,7 +512,7 @@
throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_LAST_NAME_MIN_LENGTH);
if (_cst_bool('ACCOUNT_DOB'))
if (!checkdate(substr(tep_date_raw($testobj->customers_dob), 5, 2), substr(tep_date_raw($testobj->customers_dob), 8, 2), substr(tep_date_raw($testobj->customers_dob), 0, 4)))
- throw new Exception(__("Le format de la date de naissance n'est pas correct"));
+ throw new Exception(__("Le format de la date de naissance n'est pas correct"));
if (strlen($testobj->customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) throw new Exception(__("L'adresse email est trop courte, min:").ENTRY_EMAIL_ADDRESS_MIN_LENGTH);
if (!self::tep_validate_email($testobj->customers_email_address))throw new Exception(ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -712,8 +712,13 @@
osCSS_Cache::clear('product');
}
- if(!isset($_GET['forceajax']))
+ if(!isset($_GET['forceajax'])){
+ $messageStack->add_session(__('@product update status product'), 'success');
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','cPath','pID','setflag','flag'), false) ));
+ }
+ else
+ $messageStack->add(__('@product update status product'), 'success');
+
break;
@@ -732,9 +737,11 @@
$product_categories = (array)@$_POST['product_categories'];
sqlproduct::delete(array('id'=>$product_id, 'catarray'=>$product_categories ) );
+
+ $messageStack->add_session(__('@product delete product'), 'success');
}
- osCSS_Cache::clear('product');
+ osCSS_Cache::clear('product');
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -793,10 +800,19 @@
$params['language_id']= $languages_id;
- sqlproduct::update( $params );
+ if( ! sqlproduct::update( $params ) )
+ $messageStack->add_session(__('@product error in update process'), 'error');
+ else
+ $messageStack->add_session(__('@product success in update process'), 'success');
+
+/**
+ TODO a voir
+*/
osCSS_Cache::clear('also_purchased');
+ osCSS_Cache::clear('product');
+
if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id));
else tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id.'&action=edit' ));
@@ -812,10 +828,10 @@
if( ($pid = sqlproduct::copyto(array('id'=>$products_id ,'catid'=>$categories_id ,'type'=>$type))) && $pid > 0 ){
$products_id = $pid;
- $messageStack->add_session(sprintf(__('create products in new link categorie for %s'), $type ), 'success');
+ $messageStack->add_session(sprintf(__('@product create products in new link categorie for %s'), $type ), 'success');
}
else
- $messageStack->add_session(sprintf(__('error for create products in new link categorie for %s'), $type ), 'error');
+ $messageStack->add_session(sprintf(__('@product error for create products in new link categorie for %s'), $type ), 'error');
osCSS_Cache::clear('product');
@@ -837,7 +853,6 @@
case 'edit':
- // case 'new_product':
self::$Info = new objectInfo(sqlproduct::Specimen());
@@ -864,15 +879,13 @@
break;
default:
-
- //! Entretient liens avec categorie
- sqlproduct::Maintenance();
-
-
+ //! Entretient liens avec categorie
+ sqlproduct::Maintenance();
}
- } else {
+ }
+ else {
/**
@remarks A module has asked to privately take care of this action, check if class and method exist and run it.
*/
@@ -904,11 +917,6 @@
/**
- @fn load_db_values($ID)
- */
-// public static function load_db_values($ID){
-
- /**
@fn featured::GetDBValue();
@brief return DB value adapted for current action
Use self::action for determine switch
@@ -919,7 +927,7 @@
$action=self::$action;
-// var_dump($action);
+
switch ($action) {
case 'detail':
case 'new':
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/header.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/header.less 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/header.less 2012-08-09 18:22:08 UTC (rev 4569)
@@ -99,6 +99,7 @@
.sub{
&:after{ content: " >>"; }
}
+
.ssmenu{
position:absolute;
top:-1px;
@@ -130,12 +131,17 @@
li{
float:none;
width:200px;
+
+ &:hover ul { display:block; }
}
}
}
.ssmenu li:hover ul.ssmenu,
.ssmenu li ul.ssmenu li:hover ul.ssmenu{ display:block }
+
+ .ssmenu li ul.ssmenu,
+ .ssmenu li ul.ssmenu li ul.ssmenu{ display:none; }
}
ul{
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less 2012-08-09 18:22:08 UTC (rev 4569)
@@ -8,7 +8,9 @@
* @encode UTF-8
*/
-/* Mixin */
+/**
+ * Mixin
+ */
.wrap () {
text-wrap: wrap;
@@ -18,7 +20,7 @@
}
/**
- * Reto-compatibilte oscommerce oscss < 2.xx
+ * Retro-compatibilte oscommerce oscss < 2.xx
*/
/* info box block droit */
.infoBoxHeading {
@@ -47,7 +49,9 @@
-/* Generalite */
+/**
+ * Generalites
+ */
*{
@@ -85,7 +89,9 @@
-/* general class */
+/**
+ * general class
+ */
.error{ color:@field_required; }
.alert{ color:#ae0405; }
.fright{ float:right; }
@@ -124,7 +130,7 @@
.messageStackError,
.messageStackWarning { background:@color_warning;}
.messageStackSuccess { background:@color_success; }
-.messageStackNotice { background:@color_notice;}
+.messageStackInfo { background:@color_notice;}
/* toogle item complet js action */
h4.Ctrtirroir,
@@ -140,14 +146,67 @@
+/* Section Notification */
+div#messageStack{
+ height: auto!important;
+ height: 25px;
+ min-height: 25px;
+ min-width:(@display_max_width * 0.75 ) ;
+ width:(@display_width * 0.75 ) ;
+ display:block;
+ position: absolute;
+ margin: 10px 1%;
+ right: 0;
+ top:0;
+ z-index:99;
+
+ p{
+ padding:0;
+ margin:0;
+ }
+ .item{
+ height: auto!important;
+ height: 25px;
+ min-height: 25px;
+ display:none;
+ padding: 0 0 0 30px;
+ margin: 2px 0 0 0;
+ font-size: 14px;
+ font-weight: bold;
+ line-height: 24px;
+
+ .rounded(5px);
+ .border-radius(5px,5px,5px,5px);
+
+
+ span.ButtonClose{
+ float:right;
+ display:inline-block;
+ min-width:25px;
+ height:25px;
+ margin:0 2px;
+ cursor : pointer;
+ background:transparent url("../../../../../images/check-off.png") center center no-repeat;
+ font-size:0;
+
+ &:hover{
+ opacity : 0.6;
+ }
+ }
+ }
+
+
+}
+
+
body {
background:#faf9f7 ;
background-attachment:fixed;
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/gabarit-1.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/gabarit-1.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/gabarit-1.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -67,21 +67,6 @@
<?php echo $generic_modules->_show_menu(); /** Appel des menu specifique au module ACA . Tous module chargé epeut inétegrer des bock au menu */ ?>
</ul>
<?php endif; ?>
-<!-- <ul class="fright">
- <li class="w_30 nobr ">
- <form action="" method="post">
- <div>
- <select name="SearchSpeed">
- <option value="products" <?php if($page_module=='products') echo ' selected="selected" ' ?>><?php echo __('quicksearch products') ?></option>
- <option value="customers" <?php if($page_module=='customers') echo ' selected="selected" ' ?>><?php echo __('quicksearch customers') ?></option>
- <option value="categories" <?php if($page_module=='categories') echo ' selected="selected" ' ?>><?php echo __('quicksearch categories') ?></option>
- <option value="orders" <?php if($page_module=='orders') echo ' selected="selected" ' ?>><?php echo __('quicksearch orders') ?></option>
- </select>
- <input type='text' name="sSearch" value="<?php if(isset($_REQUEST['sSearch'])) echo $_REQUEST['sSearch']?>" onchange="this.form.submit();" />
- </div>
- </form>
- </li>
- </ul>-->
</div>
</header>
<!-- header_eof //-->
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/header-1.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/header-1.php 2012-08-08 07:19:43 UTC (rev 4568)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/header-1.php 2012-08-09 18:22:08 UTC (rev 4569)
@@ -25,4 +25,5 @@
<a href="<?php echo tep_href_link('', 'mode_menu=1', 'NONSSL') ?>" class="messages"><?php echo __('Buyer menu') ?></a><span> | </span>
<?php endif; ?>
</div>
-<?php load_widget_context(); ?>
\ No newline at end of file
+<?php load_widget_context(); ?>
+
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/inc/lib_general-1.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/inc/lib_general-1.js 2012-08-08 07:19:...
[truncated message content] |
|
From: <os...@us...> - 2012-08-11 22:04:00
|
Revision: 4582
http://oscss.svn.sourceforge.net/oscss/?rev=4582&view=rev
Author: oscim
Date: 2012-08-11 22:03:52 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
report correction install table specials
correctuion coquille diverse
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql
Added Paths:
-----------
branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql
Modified: branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-08-11 22:03:52 UTC (rev 4582)
@@ -131,21 +131,24 @@
else echo tep_draw_radio_field('customers_group_ra','customers_group_ra', '0', (((bool)customers::$Info->customers_group_ra)? false:true), customers::$Info->customers_group_ra) . ' ' . __('entry customers group ra no') . ' ' . tep_draw_radio_field('customers_group_ra','customers_group_ra1', '1',(((bool)customers::$Info->customers_group_ra)? true:false), customers::$Info->customers_group_ra) . ' ' . __('entry customers group ra yes'); ?>
</p>
<p class="block_input input-one">
- <label for="customers_shopping_points"><?php echo __('entry customers points'); ?></label>
- <?php echo tep_result_up_field(customers::$Info,'customers_shopping_points'); ?>
+ <label for="customers_shopping_points"><?php echo __('entry customers points'); ?></label>
+ <?php echo tep_result_up_field(customers::$Info,'customers_shopping_points'); ?>
</p>
- <!-- BOF Separate Pricing per Customer -->
- <p class="block_input input-one">
- <label for="customers_group_id"><?php echo __('entry customers group name'); ?></label>
- <?php echo tep_result_up_field(customers::$Info,'customers_group_id','tep_get_grp_name','', false, true); ?>
- </p>
+ <?php foreach (customers::$modules->__call('display_inline',array('flag'=>'rightblock','cid'=> customers::$Info->customers_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($text as $item): ?>
+ <li><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php $title=$text=array(); endif; ?>
+
+
<?php if (in_array(customers::$action,array('new','insert'))) : ?>
<!-- Mode de creation / Notification Client -->
<p class="block_input input-one">
- <label for="new_customers_notif"><?php echo __('entry customers notif created new account'); ?></label>
- <?php echo tep_draw_checkbox_field('new_customers_notif', 'new_customers_notif', 'on', false); ?>
+ <label for="new_customers_notif"><?php echo __('entry customers notif created new account'); ?></label>
+ <?php echo tep_draw_checkbox_field('new_customers_notif', 'new_customers_notif', 'on', false); ?>
</p>
<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-11 22:03:52 UTC (rev 4582)
@@ -111,12 +111,13 @@
?>
<?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
- <li>
- <h4 class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></h4>
- <ul class="tirroir tabs_lang">
- <li>
- <ul>
+ <li class="block_input">
+ <fieldset class="block_field">
+ <legend class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></legend>
+ <div class="tirroir tabs">
+ <ul class="w_100">
+
<?php if(isset($title) && is_array($title)): ?>
<?php $i=0; foreach ($title as $item): ?>
<li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
@@ -128,10 +129,10 @@
<?php endif; ?>
</ul>
- </li>
- <li>
- <ul>
+
+ <ul class="w_100">
+
<?php if(isset($title) && is_array($title)): ?>
<?php $i=0; foreach ($text as $item): ?>
<li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
@@ -139,23 +140,29 @@
<?php endif; ?>
<?php if (isset(products::$Info->products_sppc)): ?>
- <li id="products_price-<?php echo $i++; ?>" class="block_input">
- <ul>
+ <li id="products_price-<?php echo $i++; ?>" class="w_100">
+ <ul class="clear w_100">
<?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
- <li class="block_input">
+ <li class="block_input price">
<label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
- <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) . ' ' . $sppcInfos['sppcname']; ?>
+ <?php echo $sppcInfos['sppcname']; ?>
</label>
- <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', $sppcInfos['sppcprice'], ' class="price" style=" " size="16" '); ?>
+ <span class="number">
+ <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?>
+ </span>
+ <span class="status">
+ <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?>
+ </span>
</li>
<?php endforeach;?>
</ul>
</li>
<?php endif; ?>
</ul>
- </li>
- </ul>
+
+ </div>
+ </fieldset>
</li>
<li class="block_input">
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-08-11 22:03:52 UTC (rev 4582)
@@ -105,7 +105,7 @@
/* inline */
$lang['product type :']="Type :" ;
-
+ $lang['@product active price group'] = "Prix actif";
/* Fiche One products */
$lang['heading title edit']="Fiche produit - Edition d'un produit" ;
$lang['tab products data']="Caractéristiques" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-11 22:03:52 UTC (rev 4582)
@@ -70,9 +70,12 @@
@var array info all tabs for filter listings
*/
public static $allfields = array();
+ /**
+ @var array info all tabs for filter listings , specifical owner sub module
+ */
+ protected static $allfieldsexternal = array();
-
public function __construct(){
self::GetConf();
}
@@ -95,9 +98,8 @@
// Use factory class aca
//self::$modules=new accountACA();
- self::$modules=new AcaFactory('account'/*,'MODULE_ACCOUNT_INSTALLED_BO'*/);
- self::$modules->set_image_handler();
+
self::$languages = tep_get_languages();
self::$newsletter_array=array(array('id' => '1', 'text' => __('entry newsletter yes')),
@@ -106,7 +108,10 @@
}
+ self::$modules=new AcaFactory('account'/*,'MODULE_ACCOUNT_INSTALLED_BO'*/);
+// self::$modules->set_image_handler();
+
global $languages_id;
/**
@remarks define var execution sql in GetDBValue()
@@ -196,12 +201,12 @@
'alias'=>'group_id',
'text'=>__('@customers table heading group id'),
);
- self::$allfields['cg.customers_group_name'] = array(
- 'sort'=>true,
- 'alias'=>'cat_title',
- 'text'=>__('@customers table heading group name'),
- 'default'=>true,
- );
+// self::$allfields['cg.customers_group_name'] = array(
+// 'sort'=>true,
+// 'alias'=>'cat_title',
+// 'text'=>__('@customers table heading group name'),
+// 'default'=>true,
+// );
self::$allfields['c.customers_discount'] = array(
'sort'=>true,
@@ -241,6 +246,21 @@
'text'=>__('@customers table heading number of logons'),
'default'=>true,
);
+
+
+ /* DEB Sub module add col */
+ $r = self::$modules->__call('GetConf', array('type'=>'allfields')) ;
+
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$array){
+ self::$allfields[$key] = $array;
+
+ self::$allfieldsexternal[$key] = $array;
+ self::$allfieldsexternal[$key]['module'] = $mod;
+ }
+ }
+ /* END Sub module add col */
+
self::$allfields['c.customers_group_ra'] = array(
'sort'=>true,
'alias'=>'group_ra',
@@ -274,6 +294,16 @@
// min fields and not view directly colonne fields
$listfield = " ";
+
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('type'=>'forcelistfields')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $listfield .= $string;
+ }
+ }
+ /* END Sub module add col */
+
$_SESSION['filters']['allfields'] = array();
// put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
@@ -709,12 +739,32 @@
$query_raw = "select ".$adjust->listfields.", c.customers_id as id from " . TABLE_CUSTOMERS . " c ".
- " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ".
- " LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ".
- ((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
- " GROUP BY c.customers_id ".
- " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
+ " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ";
+// " LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ";
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('languages_id'=>(int)$adjust->languages_id, 'type'=>'tables')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $query_raw .= $string;
+ }
+ }
+ /* END Sub module add col */
+
+ $query_raw .= ((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " GROUP BY c.customers_id ";
+
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('languages_id'=>(int)$adjust->languages_id, 'type'=>'group_by')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $query_raw .= $string;
+ }
+ }
+ /* END Sub module add col */
+
+ $query_raw .= " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
+
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -906,26 +956,8 @@
}
- /**
- * \fn tep_get_grp_name($id)
- * \brief get group name for customer id
- * @param unknown_type $id
- */
- public static function tep_get_grp_name($id){
- $res=tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " ");
- if(tep_db_num_rows($res)>1 && self::$action !='noedit'){
- while($item = tep_db_fetch_array($res))
- $array[]=array('id'=> $item['customers_group_id'] , 'text'=>$item['customers_group_name']);
- return tep_draw_pull_down_menu('customers_group_id', $array, $id);
- }
- else {
- $query = tep_db_fetch_array(tep_db_query("select customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id='".$id."' "));
- return $query['customers_group_name'];
- }
- }
-
/**
* \fn userTestNotExists($customers_email_address)
* \brief test user exists
@@ -974,6 +1006,17 @@
case 'listing':
global $query_numrows,$languages_id;
+ /* DEB Sub module add col */
+ $external = array();
+ foreach(self::$allfieldsexternal as $key => $value ){
+ $clean = substr($key, (strpos($key, '.')+1));
+ $alias = (isset($value['alias'])? $value['alias'] : $clean);
+ $external[] = $alias;
+ $process[$alias] = $value['module'];
+ }
+ /* END Sub module add col */
+
+
while ($item = $_query->fetchAssoc()) {
$ord =array();
@@ -985,6 +1028,12 @@
elseif($k == 'group_ra') $ord[$k]=self::RowStatusDa($item);
elseif(in_array($k, array('added','modified','last_logon')) ) $ord[$k]=tep_date_short($item[$k]);
elseif($k == 'discount') $ord[$k]=$item[$k].' %';
+ /* DEB Sub module add col */
+ elseif( in_array($k, $external) ){
+ $class = self::$modules->modules[$process[$k]];
+ $ord[$k]= $class->formatdbvalue($k, $item);
+ }
+ /* END Sub module add col */
else $ord[$k]=$item[$k];
}
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql 2012-08-11 22:03:52 UTC (rev 4582)
@@ -20,8 +20,9 @@
specials_last_modified datetime default '1000-01-01 00:00:00' null ,
expires_date datetime default '1000-01-01 00:00:00' null ,
date_status_change datetime default '1000-01-01 00:00:00' null ,
- status int(1) default '1' not null ,
+ status smallint(1) default '1' not null ,
specials_begin_date datetime ,
customers_group_id int(11) default '0' not null,
+ special_apply_mode smallint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (specials_id)
) DEFAULT CHARSET=utf8;
Added: branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql (rev 0)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql 2012-08-11 22:03:52 UTC (rev 4582)
@@ -0,0 +1,15 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+ALTER TABLE osc_specials ADD COLUMN special_apply_mode smallint(1) NOT NULL DEFAULT '0';
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-26 07:32:04
|
Revision: 4592
http://oscss.svn.sourceforge.net/oscss/?rev=4592&view=rev
Author: oscim
Date: 2012-08-26 07:31:55 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
Upgrade jquery Datatable and DatatableTools
Add new file
Activate all DatatableTools button
Ajust css for new html format DatatableTools
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/header.php
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/TableTools.min.js
branches/2.1.1/catalog/admin/includes/javascript/jquery.dataTables.min.js
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
branches/2.1.1/catalog/includes/application_bottom.php
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/AlivePDF.swc
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/swf/copy_csv_xls.swf
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/swf/copy_csv_xls_pdf.swf
Modified: branches/2.1.1/catalog/admin/includes/header.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/header.php 2012-08-25 17:56:25 UTC (rev 4591)
+++ branches/2.1.1/catalog/admin/includes/header.php 2012-08-26 07:31:55 UTC (rev 4592)
@@ -101,11 +101,11 @@
<?php endif; ?>
- TableToolsInit.sSwfPath="<?php echo DIR_WS_JS ?>media/swf/ZeroClipboard.swf";
+ TableTools.DEFAULTS.sSwfPath = "<?php echo DIR_WS_JS ?>dataTables.TableTools/swf/copy_csv_xls_pdf.swf";
/* Build the DataTable with third column using our custom sort functions */
oTable = $('.dataTable').dataTable( {
- "sDom": '<"top"flp<"toolbar"><"clear">>rt<"bottom"Tilp<"clear">>',
+ "sDom": '<"top"flp<"toolbar"><"clear">>rt<"bottom"Tilp<"clear"> >',
"bStateSave": true,
"bPaginate": true,
"bLengthChange": true,
@@ -142,10 +142,10 @@
<?php if(defined('AJAXSTATMENTDETAIL')) : ?>
"fnDrawCallback": fnOpenClose,
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
- /* Append img in row */
- $('td:eq(0)', nRow).html( '<img class="imgDetail" src="<?php echo tep_get_http().DIR_WS_ADMIN.DIR_WS_ICONS ?>details_open.png">' );
- return nRow;
- },
+ /* Append img in row */
+ $('td:eq(0)', nRow).html( '<img class="imgDetail" src="<?php echo tep_get_http().DIR_WS_ADMIN.DIR_WS_ICONS ?>details_open.png">' );
+ return nRow;
+ },
<?php else: ?>
// "fnInitComplete":post_load_page(),
"fnDrawCallback": post_load_page,
Modified: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js 2012-08-25 17:56:25 UTC (rev 4591)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js 2012-08-26 07:31:55 UTC (rev 4592)
@@ -1,11 +1,11 @@
// Simple Set Clipboard System
// Author: Joseph Huckaby
-var ZeroClipboard = {
+var ZeroClipboard_TableTools = {
- version: "1.0.4-mod",
+ version: "1.0.4-TableTools2",
clients: {}, // registered upload clients on page, indexed by id
- moviePath: 'ZeroClipboard.swf', // URL to movie
+ moviePath: '', // URL to movie
nextId: 1, // ID of next movie
$: function(thingy) {
@@ -58,13 +58,13 @@
if ( obj.style.height != "" )
info.height = obj.style.height.replace("px","");
-
+
while (obj) {
info.left += obj.offsetLeft;
info.top += obj.offsetTop;
obj = obj.offsetParent;
}
-
+
return info;
},
@@ -73,18 +73,18 @@
this.handlers = {};
// unique ID
- this.id = ZeroClipboard.nextId++;
- this.movieId = 'ZeroClipboardMovie_' + this.id;
+ this.id = ZeroClipboard_TableTools.nextId++;
+ this.movieId = 'ZeroClipboard_TableToolsMovie_' + this.id;
// register client with singleton to receive flash events
- ZeroClipboard.register(this.id, this);
+ ZeroClipboard_TableTools.register(this.id, this);
// create movie
if (elem) this.glue(elem);
}
};
-ZeroClipboard.Client.prototype = {
+ZeroClipboard_TableTools.Client.prototype = {
id: 0, // unique ID for us
ready: false, // whether movie is ready to receive events or not
@@ -95,11 +95,12 @@
handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
cssEffects: true, // enable CSS mouse effects on dom container
handlers: null, // user event handlers
+ sized: false,
glue: function(elem, title) {
// glue to DOM element
// elem can be ID or actual DOM element object
- this.domElement = ZeroClipboard.$(elem);
+ this.domElement = ZeroClipboard_TableTools.$(elem);
// float just above object, or zIndex 99 if dom element isn't set
var zIndex = 99;
@@ -108,7 +109,7 @@
}
// find X/Y position of domElement
- var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
// create floating DIV above element
this.div = document.createElement('div');
@@ -116,34 +117,60 @@
style.position = 'absolute';
style.left = '0px';
style.top = '0px';
- style.width = '' + box.width + 'px';
- style.height = '' + box.height + 'px';
+ style.width = (box.width) + 'px';
+ style.height = box.height + 'px';
style.zIndex = zIndex;
- if ( typeof title != "undefined" ) {
+
+ if ( typeof title != "undefined" && title != "" ) {
this.div.title = title;
}
+ if ( box.width != 0 && box.height != 0 ) {
+ this.sized = true;
+ }
// style.backgroundColor = '#f00'; // debug
- this.domElement.appendChild(this.div);
+ if ( this.domElement ) {
+ this.domElement.appendChild(this.div);
+ this.div.innerHTML = this.getHTML( box.width, box.height );
+ }
+ },
+
+ positionElement: function() {
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
+ var style = this.div.style;
- this.div.innerHTML = this.getHTML( box.width, box.height );
+ style.position = 'absolute';
+ //style.left = (this.domElement.offsetLeft)+'px';
+ //style.top = this.domElement.offsetTop+'px';
+ style.width = box.width + 'px';
+ style.height = box.height + 'px';
+
+ if ( box.width != 0 && box.height != 0 ) {
+ this.sized = true;
+ } else {
+ return;
+ }
+
+ var flash = this.div.childNodes[0];
+ flash.width = box.width;
+ flash.height = box.height;
},
getHTML: function(width, height) {
// return HTML for movie
var html = '';
var flashvars = 'id=' + this.id +
- '&width=' + width +
- '&height=' + height;
-
+ '&width=' + width +
+ '&height=' + height;
+
if (navigator.userAgent.match(/MSIE/)) {
// IE gets an OBJECT tag
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
- html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
+ html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard_TableTools.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
}
else {
// all other browsers get an EMBED tag
- html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
+ html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard_TableTools.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
}
return html;
},
@@ -178,12 +205,12 @@
// reposition our floating div, optionally to new container
// warning: container CANNOT change size, only position
if (elem) {
- this.domElement = ZeroClipboard.$(elem);
+ this.domElement = ZeroClipboard_TableTools.$(elem);
if (!this.domElement) this.hide();
}
if (this.domElement && this.div) {
- var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
var style = this.div.style;
style.left = '' + box.left + 'px';
style.top = '' + box.top + 'px';
@@ -254,7 +281,7 @@
receiveEvent: function(eventName, args) {
// receive event from flash
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
-
+
// special behavior for certain events
switch (eventName) {
case 'load':
@@ -284,14 +311,14 @@
this.movie.setBomInc( this.incBom );
this.movie.setHandCursor( this.handCursorEnabled );
break;
-
+
case 'mouseover':
if (this.domElement && this.cssEffects) {
- this.domElement.addClass('hover');
+ //this.domElement.addClass('hover');
if (this.recoverActive) this.domElement.addClass('active');
}
break;
-
+
case 'mouseout':
if (this.domElement && this.cssEffects) {
this.recoverActive = false;
@@ -299,16 +326,16 @@
this.domElement.removeClass('active');
this.recoverActive = true;
}
- this.domElement.removeClass('hover');
+ //this.domElement.removeClass('hover');
}
break;
-
+
case 'mousedown':
if (this.domElement && this.cssEffects) {
this.domElement.addClass('active');
}
break;
-
+
case 'mouseup':
if (this.domElement && this.cssEffects) {
this.domElement.removeClass('active');
@@ -320,7 +347,7 @@
if (this.handlers[eventName]) {
for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
var func = this.handlers[eventName][idx];
-
+
if (typeof(func) == 'function') {
// actual function reference
func(this, args);
Added: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as 2012-08-26 07:31:55 UTC (rev 4592)
@@ -0,0 +1,221 @@
+/* Compile using: mxmlc --target-player=10.0.0 ZeroClipboard.as */
+package {
+ import flash.display.Stage;
+ import flash.display.Sprite;
+ import flash.display.LoaderInfo;
+ import flash.display.StageScaleMode;
+ import flash.events.*;
+ import flash.display.StageAlign;
+ import flash.display.StageScaleMode;
+ import flash.external.ExternalInterface;
+ import flash.system.Security;
+ import flash.utils.*;
+ import flash.system.System;
+ import flash.net.FileReference;
+ import flash.net.FileFilter;
+
+ public class ZeroClipboard extends Sprite {
+
+ private var domId:String = '';
+ private var button:Sprite;
+ private var clipText:String = 'blank';
+ private var fileName:String = '';
+ private var action:String = 'copy';
+ private var incBom:Boolean = true;
+ private var charSet:String = 'utf8';
+
+
+ public function ZeroClipboard() {
+ // constructor, setup event listeners and external interfaces
+ stage.scaleMode = StageScaleMode.EXACT_FIT;
+ flash.system.Security.allowDomain("*");
+
+ // import flashvars
+ var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
+ domId = flashvars.id;
+
+ // invisible button covers entire stage
+ button = new Sprite();
+ button.buttonMode = true;
+ button.useHandCursor = true;
+ button.graphics.beginFill(0x00FF00);
+ button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
+ button.alpha = 0.0;
+ addChild(button);
+
+ button.addEventListener(MouseEvent.CLICK, clickHandler);
+ button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null );
+ } );
+
+ // External functions - readd whenever the stage is made active for IE
+ addCallbacks();
+ stage.addEventListener(Event.ACTIVATE, addCallbacks);
+
+ // signal to the browser that we are ready
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null );
+ }
+
+ public function addCallbacks (evt:Event = null):void {
+ ExternalInterface.addCallback("setHandCursor", setHandCursor);
+ ExternalInterface.addCallback("clearText", clearText);
+ ExternalInterface.addCallback("setText", setText);
+ ExternalInterface.addCallback("appendText", appendText);
+ ExternalInterface.addCallback("setFileName", setFileName);
+ ExternalInterface.addCallback("setAction", setAction);
+ ExternalInterface.addCallback("setCharSet", setCharSet);
+ ExternalInterface.addCallback("setBomInc", setBomInc);
+ }
+
+
+ public function setCharSet(newCharSet:String):void {
+ if ( newCharSet == 'UTF16LE' ) {
+ charSet = newCharSet;
+ } else {
+ charSet = 'UTF8';
+ }
+ }
+
+ public function setBomInc(newBomInc:Boolean):void {
+ incBom = newBomInc;
+ }
+
+ public function clearText():void {
+ clipText = '';
+ }
+
+ public function appendText(newText:String):void {
+ clipText += newText;
+ }
+
+ public function setText(newText:String):void {
+ clipText = newText;
+ }
+
+ public function setFileName(newFileName:String):void {
+ fileName = newFileName;
+ }
+
+ public function setAction(newAction:String):void {
+ action = newAction;
+ }
+
+ public function setHandCursor(enabled:Boolean):void {
+ // control whether the hand cursor is shown on rollover (true)
+ // or the default arrow cursor (false)
+ button.useHandCursor = enabled;
+ }
+
+
+ private function clickHandler(event:Event):void {
+ var fileRef:FileReference = new FileReference();
+ fileRef.addEventListener(Event.COMPLETE, saveComplete);
+
+ if ( action == "save" ) {
+ /* Save as a file */
+ if ( charSet == 'UTF16LE' ) {
+ fileRef.save( strToUTF16LE(clipText), fileName );
+ } else {
+ fileRef.save( strToUTF8(clipText), fileName );
+ }
+ } else if ( action == "pdf" ) {
+ fileRef.save( "This instance of ZeroClipboard is not configured for PDF export. "+
+ "Please use the PDF export version.", fileName+".txt" );
+ } else {
+ /* Copy the text to the clipboard. Note charset and BOM have no effect here */
+ System.setClipboard( clipText );
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+ }
+
+
+ private function saveComplete(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+
+
+ private function getProp( prop:String, opts:Array ):String
+ {
+ var i:int, iLen:int;
+ for ( i=0, iLen=opts.length ; i<iLen ; i++ )
+ {
+ if ( opts[i].indexOf( prop+":" ) != -1 )
+ {
+ return opts[i].replace( prop+":", "" );
+ }
+ }
+ return "";
+ }
+
+
+ /*
+ * Function: strToUTF8
+ * Purpose: Convert a string to the output utf-8
+ * Returns: ByteArray
+ * Inputs: String
+ */
+ private function strToUTF8( str:String ):ByteArray {
+ var utf8:ByteArray = new ByteArray();
+
+ /* BOM first */
+ if ( incBom ) {
+ utf8.writeByte( 0xEF );
+ utf8.writeByte( 0xBB );
+ utf8.writeByte( 0xBF );
+ }
+ utf8.writeUTFBytes( str );
+
+ return utf8;
+ }
+
+
+ /*
+ * Function: strToUTF16LE
+ * Purpose: Convert a string to the output utf-16
+ * Returns: ByteArray
+ * Inputs: String
+ * Notes: The fact that this function is needed is a little annoying. Basically, strings in
+ * AS3 are UTF-16 (with surrogate pairs and everything), but characters which take up less
+ * than 8 bytes appear to be stored as only 8 bytes. This function effective adds the
+ * padding required, and the BOM
+ */
+ private function strToUTF16LE( str:String ):ByteArray {
+ var utf16:ByteArray = new ByteArray();
+ var iChar:uint;
+ var i:uint=0, iLen:uint = str.length;
+
+ /* BOM first */
+ if ( incBom ) {
+ utf16.writeByte( 0xFF );
+ utf16.writeByte( 0xFE );
+ }
+
+ while ( i < iLen ) {
+ iChar = str.charCodeAt(i);
+
+ if ( iChar < 0xFF ) {
+ /* one byte char */
+ utf16.writeByte( iChar );
+ utf16.writeByte( 0 );
+ } else {
+ /* two byte char */
+ utf16.writeByte( iChar & 0x00FF );
+ utf16.writeByte( iChar >> 8 );
+ }
+
+ i++;
+ }
+
+ return utf16;
+ }
+ }
+}
Property changes on: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as 2012-08-26 07:31:55 UTC (rev 4592)
@@ -0,0 +1,310 @@
+/* Compile using: mxmlc --target-player=10.0.0 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboardPdf.as */
+package {
+ import flash.display.Stage;
+ import flash.display.Sprite;
+ import flash.display.LoaderInfo;
+ import flash.display.StageScaleMode;
+ import flash.events.*;
+ import flash.display.StageAlign;
+ import flash.display.StageScaleMode;
+ import flash.external.ExternalInterface;
+ import flash.system.Security;
+ import flash.utils.*;
+ import flash.system.System;
+ import flash.net.FileReference;
+ import flash.net.FileFilter;
+
+ /* PDF imports */
+ import org.alivepdf.pdf.PDF;
+ import org.alivepdf.data.Grid;
+ import org.alivepdf.data.GridColumn;
+ import org.alivepdf.layout.Orientation;
+ import org.alivepdf.layout.Size;
+ import org.alivepdf.layout.Unit;
+ import org.alivepdf.display.Display;
+ import org.alivepdf.saving.Method;
+ import org.alivepdf.fonts.FontFamily;
+ import org.alivepdf.fonts.Style;
+ import org.alivepdf.fonts.CoreFont;
+ import org.alivepdf.colors.RGBColor;
+
+ public class ZeroClipboard extends Sprite {
+
+ private var domId:String = '';
+ private var button:Sprite;
+ private var clipText:String = 'blank';
+ private var fileName:String = '';
+ private var action:String = 'copy';
+ private var incBom:Boolean = true;
+ private var charSet:String = 'utf8';
+
+
+ public function ZeroClipboard() {
+ // constructor, setup event listeners and external interfaces
+ stage.scaleMode = StageScaleMode.EXACT_FIT;
+ flash.system.Security.allowDomain("*");
+
+ // import flashvars
+ var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
+ domId = flashvars.id;
+
+ // invisible button covers entire stage
+ button = new Sprite();
+ button.buttonMode = true;
+ button.useHandCursor = true;
+ button.graphics.beginFill(0x00FF00);
+ button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
+ button.alpha = 0.0;
+ addChild(button);
+
+ button.addEventListener(MouseEvent.CLICK, function(event:Event):void {
+ clickHandler(event);
+ } );
+ button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null );
+ } );
+
+ // External functions - readd whenever the stage is made active for IE
+ addCallbacks();
+ stage.addEventListener(Event.ACTIVATE, addCallbacks);
+
+ // signal to the browser that we are ready
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null );
+ }
+
+ public function addCallbacks (evt:Event = null):void {
+ ExternalInterface.addCallback("setHandCursor", setHandCursor);
+ ExternalInterface.addCallback("clearText", clearText);
+ ExternalInterface.addCallback("setText", setText);
+ ExternalInterface.addCallback("appendText", appendText);
+ ExternalInterface.addCallback("setFileName", setFileName);
+ ExternalInterface.addCallback("setAction", setAction);
+ ExternalInterface.addCallback("setCharSet", setCharSet);
+ ExternalInterface.addCallback("setBomInc", setBomInc);
+ }
+
+
+ public function setCharSet(newCharSet:String):void {
+ if ( newCharSet == 'UTF16LE' ) {
+ charSet = newCharSet;
+ } else {
+ charSet = 'UTF8';
+ }
+ }
+
+ public function setBomInc(newBomInc:Boolean):void {
+ incBom = newBomInc;
+ }
+
+ public function clearText():void {
+ clipText = '';
+ }
+
+ public function appendText(newText:String):void {
+ clipText += newText;
+ }
+
+ public function setText(newText:String):void {
+ clipText = newText;
+ }
+
+ public function setFileName(newFileName:String):void {
+ fileName = newFileName;
+ }
+
+ public function setAction(newAction:String):void {
+ action = newAction;
+ }
+
+ public function setHandCursor(enabled:Boolean):void {
+ // control whether the hand cursor is shown on rollover (true)
+ // or the default arrow cursor (false)
+ button.useHandCursor = enabled;
+ }
+
+
+ private function clickHandler(event:Event):void {
+ var fileRef:FileReference = new FileReference();
+ fileRef.addEventListener(Event.COMPLETE, saveComplete);
+
+ if ( action == "save" ) {
+ /* Save as a file */
+ if ( charSet == 'UTF16LE' ) {
+ fileRef.save( strToUTF16LE(clipText), fileName );
+ } else {
+ fileRef.save( strToUTF8(clipText), fileName );
+ }
+ } else if ( action == "pdf" ) {
+ /* Save as a PDF */
+ var pdf:PDF = configPdf();
+ fileRef.save( pdf.save( Method.LOCAL ), fileName );
+ } else {
+ /* Copy the text to the clipboard. Note charset and BOM have no effect here */
+ System.setClipboard( clipText );
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+ }
+
+
+ private function saveComplete(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+
+
+ private function getProp( prop:String, opts:Array ):String
+ {
+ var i:int, iLen:int;
+ for ( i=0, iLen=opts.length ; i<iLen ; i++ )
+ {
+ if ( opts[i].indexOf( prop+":" ) != -1 )
+ {
+ return opts[i].replace( prop+":", "" );
+ }
+ }
+ return "";
+ }
+
+
+ private function configPdf():PDF
+ {
+ var
+ pdf:PDF,
+ i:int, iLen:int,
+ splitText:Array = clipText.split("--/TableToolsOpts--\n"),
+ opts:Array = splitText[0].split("\n"),
+ dataIn:Array = splitText[1].split("\n"),
+ aColRatio:Array = getProp( 'colWidth', opts ).split('\t'),
+ title:String = getProp( 'title', opts ),
+ message:String = getProp( 'message', opts ),
+ orientation:String = getProp( 'orientation', opts ),
+ size:String = getProp( 'size', opts ),
+ iPageWidth:int = 0,
+ dataOut:Array = [],
+ columns:Array = [],
+ headers:Array,
+ y:int = 0;
+
+ /* Create the PDF */
+ pdf = new PDF( Orientation[orientation.toUpperCase()], Unit.MM, Size[size.toUpperCase()] );
+ pdf.setDisplayMode( Display.FULL_WIDTH );
+ pdf.addPage();
+ iPageWidth = pdf.getCurrentPage().w-20;
+ pdf.textStyle( new RGBColor(0), 1 );
+
+ /* Add the title / message if there is one */
+ pdf.setFont( new CoreFont(FontFamily.HELVETICA), 14 );
+ if ( title != "" )
+ {
+ pdf.writeText(11, title+"\n");
+ }
+
+ pdf.setFont( new CoreFont(FontFamily.HELVETICA), 11 );
+ if ( message != "" )
+ {
+ pdf.writeText(11, message+"\n");
+ }
+
+ /* Data setup. Split up the headers, and then construct the columns */
+ for ( i=0, iLen=dataIn.length ; i<iLen ; i++ )
+ {
+ if ( dataIn[i] != "" )
+ {
+ dataOut.push( dataIn[i].split("\t") );
+ }
+ }
+ headers = dataOut.shift();
+
+ for ( i=0, iLen=headers.length ; i<iLen ; i++ )
+ {
+ columns.push( new GridColumn( " \n"+headers[i]+"\n ", i.toString(), aColRatio[i]*iPageWidth, 'C' ) );
+ }
+
+ var grid:Grid = new Grid(
+ dataOut, /* 1. data */
+ iPageWidth, /* 2. width */
+ 100, /* 3. height */
+ new RGBColor (0xE0E0E0), /* 4. headerColor */
+ new RGBColor (0xFFFFFF), /* 5. backgroundColor */
+ true, /* 6. alternateRowColor */
+ new RGBColor ( 0x0 ), /* 7. borderColor */
+ .1, /* 8. border alpha */
+ null, /* 9. joins */
+ columns /* 10. columns */
+ );
+
+ pdf.addGrid( grid, 0, y );
+ return pdf;
+ }
+
+
+ /*
+ * Function: strToUTF8
+ * Purpose: Convert a string to the output utf-8
+ * Returns: ByteArray
+ * Inputs: String
+ */
+ private function strToUTF8( str:String ):ByteArray {
+ var utf8:ByteArray = new ByteArray();
+
+ /* BOM first */
+ if ( incBom ) {
+ utf8.writeByte( 0xEF );
+ utf8.writeByte( 0xBB );
+ utf8.writeByte( 0xBF );
+ }
+ utf8.writeUTFBytes( str );
+
+ return utf8;
+ }
+
+
+ /*
+ * Function: strToUTF16LE
+ * Purpose: Convert a string to the output utf-16
+ * Returns: ByteArray
+ * Inputs: String
+ * Notes: The fact that this function is needed is a little annoying. Basically, strings in
+ * AS3 are UTF-16 (with surrogate pairs and everything), but characters which take up less
+ * than 8 bytes appear to be stored as only 8 bytes. This function effective adds the
+ * padding required, and the BOM
+ */
+ private function strToUTF16LE( str:String ):ByteArray {
+ var utf16:ByteArray = new ByteArray();
+ var iChar:uint;
+ var i:uint=0, iLen:uint = str.length;
+
+ /* BOM first */
+ if ( incBom ) {
+ utf16.writeByte( 0xFF );
+ utf16.writeByte( 0xFE );
+ }
+
+ while ( i < iLen ) {
+ iChar = str.charCodeAt(i);
+
+ if ( iChar < 0xFF ) {
+ /* one byte char */
+ utf16.writeByte( iChar );
+ utf16.writeByte( 0 );
+ } else {
+ /* two byte char */
+ utf16.writeByte( iChar & 0x00FF );
+ utf16.writeByte( iChar >> 8 );
+ }
+
+ i++;
+ }
+
+ return utf16;
+ }
+ }
+}
Property changes on: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/AlivePDF.swc
===================================================================
(Binary files differ)
Property changes on: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/AlivePDF.swc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/TableTools.min.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/Tab...
[truncated message content] |
|
From: <os...@us...> - 2012-08-27 18:31:46
|
Revision: 4596
http://oscss.svn.sourceforge.net/oscss/?rev=4596&view=rev
Author: oscim
Date: 2012-08-27 18:31:38 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
correction coquille
Fix bug dans le report des messages et alerts
refonte js customers.php
correction js product et amelioration
Fix bug cols required des extra dans account_extra
Fix message dans cats
Ajout de title sur les label dans products , et ajsutement fr
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/application_bottom.php
branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/javascript/oscss.js
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
branches/2.1.1/catalog/admin/includes/modules/account/account_extra.php
branches/2.1.1/catalog/admin/includes/modules/pages/categories.php
branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
branches/2.1.1/catalog/common/classes/ExtraUtility.php
Modified: branches/2.1.1/catalog/admin/includes/application_bottom.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-26 08:24:16 UTC (rev 4595)
+++ branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-27 18:31:38 UTC (rev 4596)
@@ -13,9 +13,45 @@
$navigation->add_current_page();
+?>
+
+
+<?php
+/**
+ Replace messageStack display generated php by javascript notification
+*/
+?>
+<script type="text/javascript">
+ <?php
+ if ($messageStack->size > 0) :
+
+ // Get errors
+ $arr = $messageStack->get_errors() ;
+
+ foreach($arr as $k=>$row): ?>
+
+ // Add message line
+ OSCSS_JSCORE.utils.notif.AddNotif({
+ indice:"<?php echo time() ?>",
+ style:"<?php echo $row['class'] ?>",
+ message:"<?php echo addslashes($row['text']) ?>",
+ });
+ <?php
+ endforeach; ?>
+ <?php
+
+ endif; ?>
+</script>
+
+
+<?php
+ if(!isset($_GET['forceajax']) )
+ $messageStack->reset() ;
+
//! close session (store variables)
tep_session_close();
+
//! cache unique des fichiers de langue
$oscss->cache_lang(false);
@@ -56,34 +92,7 @@
?>
-<?php
-/**
- Replace messageStack display generated php by javascript notification
-*/
-?>
-<script type="text/javascript">
- <?php
- if ($messageStack->size > 0) :
- // Get errors
- $arr = $messageStack->get_errors() ;
-
- foreach($arr as $k=>$row): ?>
-
- // Add message line
- OSCSS_JSCORE.utils.notif.AddNotif({
- indice:"<?php echo time() ?>",
- style:"<?php echo $row['class'] ?>",
- message:"<?php echo addslashes($row['text']) ?>",
- });
- <?php
- endforeach; ?>
- <?php
- $messageStack->reset() ;
- endif; ?>
-</script>
-
-
<?php
/**
@brief javascript for all page, post_load_value, is a function call after load page
@@ -93,36 +102,40 @@
<?php if(!isset($_REQUEST['forceajax'])): ?>
-/** Init page event js */
-function post_load_page(){
+ /** Init page event js */
+ function post_load_page(){
- /// Active Display message
- OSCSS_JSCORE.utils.notif.ViewNotif();
+ /// Active Display message
+ OSCSS_JSCORE.utils.notif.ViewNotif();
- // active preview box and toolip
- OSCSS_JSCORE.utils.preview.Init();
+ // active preview box and toolip
+ OSCSS_JSCORE.utils.preview.Init();
- // force reload link and adjust for open in dialog box
- OSCSS_JSCORE.utils.AdjustLink.OpenInDialog();
+ // force reload link and adjust for open in dialog box
+ OSCSS_JSCORE.utils.AdjustLink.OpenInDialog();
- // add flag in href link for fix process and display for ajax
- OSCSS_JSCORE.utils.AdjustLink.HrefFlag();
+ // add flag in href link for fix process and display for ajax
+ OSCSS_JSCORE.utils.AdjustLink.HrefFlag();
- // force link process and refresh this current html balise
- OSCSS_JSCORE.utils.AdjustLink.ajaxinline();
+ // force link process and refresh this current html balise
+ OSCSS_JSCORE.utils.AdjustLink.ajaxinline();
- // active tabs in edit forms and display page.
- OSCSS_JSCORE.utils.AdjustLink.BaseIntabs();
+ // active tabs in edit forms and display page.
+ OSCSS_JSCORE.utils.AdjustLink.BaseIntabs();
- // add checkbox for select all childs checkboxs in current rows
- OSCSS_JSCORE.utils.AdjustLink.select_all();
+ // add checkbox for select all childs checkboxs in current rows
+ OSCSS_JSCORE.utils.AdjustLink.select_all();
-// simple_tooltip("input","tooltip");
- // Call Back Exec
- <?php echo oscss_cstr::CallBackExec(); ?>
+ // Adsjut forms
+ OSCSS_JSCORE.utils.AdjustForms.AdjustLabel();
-}
+ // simple_tooltip("input","tooltip");
+
+ // Call Back Exec
+ <?php echo oscss_cstr::CallBackExec(); ?>
+
+ }
<?php endif; ?>
// --></script>
Modified: branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php 2012-08-26 08:24:16 UTC (rev 4595)
+++ branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php 2012-08-27 18:31:38 UTC (rev 4596)
@@ -28,9 +28,9 @@
if (tep_session_is_registered('messageToStack')) {
for ($i = 0, $n = sizeof($messageToStack); $i < $n; $i++) {
- $this->add($messageToStack[$i]['text'], $messageToStack[$i]['type']);
+ $this->_add($messageToStack[$i]['text'], $messageToStack[$i]['type']);
}
- tep_session_unregister('messageToStack');
+// tep_session_unregister('messageToStack');
}
}
@@ -74,7 +74,7 @@
}
}
- private function _add_session($message, $type = 'error') {
+ public function _add_session($message, $type = 'error') {
global $messageToStack;
if (!tep_session_is_registered('messageToStack')) {
@@ -82,12 +82,14 @@
$messageToStack = array();
}
- $messageToStack[] = array('text' => $message, 'type' => $type);
+ $_SESSION['messageToStack'][] = array('text' => $message, 'type' => $type);
}
public function reset() {
$this->errors = array();
$this->size = 0;
+ if (tep_session_is_registered('messageToStack'))
+ tep_session_unregister('messageToStack');
}
/**
Modified: branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-08-26 08:24:16 UTC (rev 4595)
+++ branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-08-27 18:31:38 UTC (rev 4596)
@@ -12,14 +12,14 @@
?>
<h3><?php echo __('heading title'); ?></h3>
- <?php echo tep_draw_form('customers', customers::FILENAME, 'action='.((in_array(customers::$action,array('edit','update')))?'update':'insert'), 'post', 'onsubmit="return check_form();"'); ?>
+ <?php echo tep_draw_form('customers', customers::FILENAME, 'action='.((in_array(customers::$action,array('edit','update')))?'update':'insert'), 'post', ''); ?>
<!-- box_uniq -->
<div class="box_uniq block_form">
<div id="tabs">
- <ul>
+ <ul id="tabsmaster">
<li><a href="#tabs-1"><?php echo __('tab customers data'); ?></a></li>
<?php
$g=6; $contents=array();
Modified: branches/2.1.1/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/featureds/rightto.edit.gab 2012-08-26 08:24:16 UTC (rev 4595)
+++ branches/2.1.1/catalog/admin/includes/gabarit/featureds/rightto.edit.gab 2012-08-27 18:31:38 UTC (rev 4596)
@@ -15,8 +15,10 @@
$res = sqlfeatured::fetch(array('status'=>'1'), true);
if(is_object($res))
$list[] = $res;
+elseif($res !=false)
+ $list = $res;
else
- $list = $res;
+ $list = array();
?>
<div class="LinkToView CategoryView">
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-26 08:24:16 UTC (rev 4595)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-27 18:31:38 UTC (rev 4596)
@@ -49,137 +49,132 @@
</fieldset>
<fieldset class="block_field">
- <ul>
- <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
- <li class="block_input">
- <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
- <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
- </li>
- <?php endif; ?>
- <?php if(products::CheckClassProduct('CLASS_MODELE')): ?>
- <li class="block_input">
- <label class="inline" for="products_model"><?php echo __('text products model'); ?></label>
- <?php echo tep_draw_input_field('products_model','', products::$Info->products_model); ?>
- </li>
- <?php endif; ?>
- <?php if(products::CheckClassProduct('CLASS_SORTORDER')): ?>
- <li class="block_input">
- <label class="inline" for="products_ordered"><?php echo __('text products ordered'); ?></label>
- <?php echo tep_draw_input_field('products_ordered','', products::$Info->products_ordered); ?>
- </li>
- <?php endif; ?>
+ <ul>
+ <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
+ <li class="block_input">
+ <label class="inline" for="products_date_available" title="<?php echo __('@products text date available help') ?>"><?php echo __('@products text date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('@products display date format'); ?>
+ </li>
+ <?php endif; ?>
+ <?php if(products::CheckClassProduct('CLASS_MODELE')): ?>
+ <li class="block_input">
+ <label class="inline" for="products_model" title="<?php echo __('@products text model help'); ?>"><?php echo __('@products text model'); ?></label>
+ <?php echo tep_draw_input_field('products_model','', products::$Info->products_model); ?>
+ </li>
+ <?php endif; ?>
+ <?php if(products::CheckClassProduct('CLASS_SORTORDER')): ?>
+ <li class="block_input">
+ <label class="inline" for="products_ordered"><?php echo __('text products ordered'); ?></label>
+ <?php echo tep_draw_input_field('products_ordered','', products::$Info->products_ordered); ?>
+ </li>
+ <?php endif; ?>
- <?php foreach (products::$modules->__call('display_inline',array('flag'=>'general','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
- <?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($text as $item): ?>
- <li><?php echo $item; ?></li>
- <?php endforeach ; ?>
- <?php $title=$text=array(); endif; ?>
+ <?php foreach (products::$modules->__call('display_inline',array('flag'=>'general','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($text as $item): ?>
+ <li><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php $title=$text=array(); endif; ?>
- <?php if(products::CheckClassProduct('CLASS_WEIGHT')): ?>
- <li class="block_input">
- <label class="inline" for="products_weight"><?php echo __('text products weight'); ?></label>
- <?php echo tep_draw_input_field('products_weight','', products::$Info->products_weight).' '.UNIT_WEIGHT_NAME; ?>
- </li>
- <?php endif; ?>
- </ul>
+
+ </ul>
</fieldset>
<?php if(products::CheckClassProduct('CLASS_PRICE')): /** Si Class de prix defini, les prix sont pris en charge par un onglet */ ?>
- <fieldset class="block_field">
- <legend><?php echo __('text legend price'); ?></legend>
- <ul>
- <li style="clear:both"></li>
- <li class="block_input">
- <label class="inline" for="products_tax_class_id"><?php echo __('text products tax class'); ?></label>
- <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, '').'<span class="required">*</span>'; ?><br />
- </li>
- <li class="block_input">
+ <fieldset class="block_field">
+ <legend><?php echo __('text legend price'); ?></legend>
+ <ul>
+ <li style="clear:both"></li>
+ <li class="block_input">
+ <label class="inline" for="products_tax_class_id"><?php echo __('text products tax class'); ?></label>
+ <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, '').'<span class="required">*</span>'; ?><br />
+ </li>
+ <li class="block_input">
- <div class="fleft w_50">
- <label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>
- <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ').'<span class="required">*</span>'; ?>
- </div>
- <div class="fleft w_50">
- <label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
- <?php echo tep_draw_input_field('products_price_gross','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , ' class="price" style=" " size="16" '); ?>
- </div>
- </li>
+ <div class="fleft w_50">
+ <label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>
+ <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ').'<span class="required">*</span>'; ?>
+ </div>
+ <div class="fleft w_50">
+ <label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
+ <?php echo tep_draw_input_field('products_price_gross','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , ' class="price" style=" " size="16" '); ?>
+ </div>
+ </li>
- <?php
- /**
- @brief Call variation price for products
- */
- ?>
- <?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
+ <?php
+ /**
+ @brief Call variation price for products
+ */
+ ?>
+ <?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
- <?php if( (isset($title) && is_array($title)) || isset(products::$Info->products_sppc) ): ?>
+ <?php if( (isset($title) && is_array($title)) || isset(products::$Info->products_sppc) ): ?>
- <li class="block_input">
- <fieldset class="block_field">
- <legend class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></legend>
- <div class="tirroir tabs">
+ <li class="block_input">
+ <fieldset class="block_field">
+ <legend class="Ctrtirroir"><?php echo __('@products legend option de prix supplementaire') ?></legend>
+ <div class="tirroir tabs">
- <ul class="w_100">
+ <ul class="w_100">
- <?php if(isset($title) && is_array($title)): ?>
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li><a href="#products_price-<?php echo 0; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
- <?php endif; ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li><a href="#products_price-<?php echo 0; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
+ <?php endif; ?>
- <?php $i=1; foreach ($title as $item): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
- <?php endforeach ; ?>
- <?php endif; ?>
+ <?php $i=1; foreach ($title as $item): ?>
+ <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
- </ul>
+ </ul>
- <ul class="w_100">
+ <ul class="w_100">
- <?php if(isset($title) && is_array($title)): ?>
- <?php $i=1; foreach ($text as $item): ?>
- <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
- <?php endforeach ; ?>
- <?php endif; ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=1; foreach ($text as $item): ?>
+ <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li id="products_price-0" class="w_100">
- <ul class="clear w_100">
- <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
- <li class="block_input price">
- <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
- <?php echo $sppcInfos['sppcname']; ?>
- </label>
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li id="products_price-0" class="w_100">
+ <ul class="clear w_100">
+ <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
+ <li class="block_input price">
+ <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
+ <?php echo $sppcInfos['sppcname']; ?>
+ </label>
- <span class="number">
- <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?>
- </span>
- <span class="status">
- <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?>
- </span>
- </li>
- <?php endforeach;?>
- </ul>
- </li>
- <?php endif; ?>
- </ul>
+ <span class="number">
+ <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?>
+ </span>
+ <span class="status">
+ <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?>
+ </span>
+ </li>
+ <?php endforeach;?>
+ </ul>
+ </li>
+ <?php endif; ?>
+ </ul>
- </div>
- </fieldset>
- </li>
- <?php endif; ?>
+ </div>
+ </fieldset>
+ </li>
+ <?php endif; ?>
- <li class="block_input">
- <label class="inline" for="products_price_gross"><?php echo __('text products final price'); ?></label>
- <?php echo tep_draw_input_field('products_price_final','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , 'disabled="disabled" class="price" style=" " size="16" '); ?>
- </li>
+<!-- <li class="block_input">
+ <label class="inline" for="products_price_gross"><?php //echo __('text products final price'); ?></label>
+ <?php //echo tep_draw_input_field('products_price_final','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , 'disabled="disabled" class="price" style=" " size="16" '); ?>
+ </li>-->
- </ul>
- </fieldset>
+ </ul>
+ </fieldset>
<?php endif; ?>
@@ -193,17 +188,32 @@
<label class="inline"><?php echo __('@products text label stock'); ?></label>
<?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?>
<br style="clear:both;" />
+ <div id="products_quantity_block">
<?php if(products::$product_investigation['has_tracked_options'] or products::$product_investigation['stock_entries_count'] > 0) :?>
<a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$Info->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a>
- <?php elseif(products::$Info->track_stock==1): ?>
+ <?php else: ?>
<label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label>
- <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity) ; ?><br />
+ <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity, ((products::$Info->track_stock==0)? 'disabled="disabled"' :'') ) ; ?><br />
<?php endif; ?>
+ </div>
</div>
</fieldset>
<?php endif; ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('@products text legend shipping'); ?></legend>
+ <ul>
+ <?php if(products::CheckClassProduct('CLASS_WEIGHT')): ?>
+ <li class="block_input">
+ <label class="inline" for="products_weight" title="<?php echo __('@products text weight help'); ?><"><?php echo __('@products text weight'); ?></label>
+ <?php echo tep_draw_input_field('products_weight','', products::$Info->products_weight).' '.UNIT_WEIGHT_NAME; ?>
+ </li>
+ <?php endif; ?>
+ </ul>
+ </fieldset>
+
+
</div>
<?php
@@ -242,8 +252,8 @@
<fieldset class="block_field">
<dl>
<dd class="block_input">
- <label><?php echo __('text products status'); ?></label>
- <?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __('text product available') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('text product not available'); ?>
+ <label><?php echo __('@products text status'); ?></label>
+ <?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __('@products text status on') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('@products text status off'); ?>
</dd>
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php 2012-08-26 08:24:16 UTC (rev 4595)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php 2012-08-27 18:31:38 UTC (rev 4596)
@@ -8,65 +8,113 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
?>
-<script type="text/javascript">
-<?php if (in_array(customers::$action,array('edit','update','new','insert'))) { ?>
+<script type="text/javascript"><!--
+(function(){ // début de scope local
+OSCSS_JSCORE.customers = OSCSS_JSCORE.customers || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.customers.utlis = {
+ // déclaration de nos variables statiques
- function check_form() {
- var error = 0;
- var error_message = "<?php echo addslashes(JS_ERROR); ?>";
- var customers_firstname = document.customers.customers_firstname.value;
- var customers_lastname = document.customers.customers_lastname.value;
- <?php if (_cst_bool('ACCOUNT_DOB')) echo 'var customers_dob = document.customers.customers_dob.value;' . "\n"; ?>
- var customers_email_address = document.customers.customers_email_address.value;
- var customers_telephone = document.customers.customers_telephone.value;
+ // déclaration de nos méthodes
+ // Check
+ CheckForm:function( ) {
- <?php if (_cst_bool('ACCOUNT_GENDER')) { ?>
- if (document.customers.customers_gender[0].checked || document.customers.customers_gender[1].checked) {
- } else {
- error_message = error_message + "<?php echo addslashes(__('js gender')); ?>";
- error = 1;
- }
- <?php } ?>
+ // onload
+ $(function() {
- if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) {
- error_message = error_message + "<?php echo sprintf(addslashes(__('js first name')), ENTRY_FIRST_NAME_MIN_LENGTH) ; ?>";
- error = 1;
- }
+ $('form#customers').submit(function() {
+
+ var loop = new Array;
+ var error_message = "<?php echo addslashes(JS_ERROR); ?>";
+ var error = 0;
- if (customers_lastname == "" || customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) {
- error_message = error_message + "<?php echo sprintf(addslashes(__('js last name')), ENTRY_LAST_NAME_MIN_LENGTH); ?>";
- error = 1;
- }
- <?php if (_cst_bool('ACCOUNT_DOB')) { ?>
- if (customers_dob == "" || customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) {
- error_message = error_message + "<?php echo sprintf(addslashes(__('js dob')), ENTRY_DOB_MIN_LENGTH); ?>";
- error = 1;
- }
- <?php } ?>
+ var customers_firstname = $('input#customers_firstname').val();
+ if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) {
+ error_message = error_message + "<?php echo sprintf(addslashes(__('js first name')), ENTRY_FIRST_NAME_MIN_LENGTH); ?>";
+ self.DisplayAlert( $('input#customers_firstname') );
+ error++;
+ }
- if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) {
- error_message = error_message + "<?php echo sprintf(addslashes(__('js email address')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>";
- error = 1;
- }
+ var customers_lastname = $('input#customers_lastname').val();
+ if (customers_lastname == "" || customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) {
+ error_message = error_message + "<?php echo sprintf(addslashes(__('js last name')), ENTRY_LAST_NAME_MIN_LENGTH); ?>";
+ self.DisplayAlert( $('input#customers_lastname') );
+ error++;
+ }
+ // Check Tel Customers
+ var customers_telephone = $('input#customers_telephone').val();
+ if (customers_telephone == "" || customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) {
+ error_message = error_message + "<?php echo sprintf(addslashes(__('js tel lenght')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>";
+ self.DisplayAlert( $('input#customers_telephone') );
+ error++;
+ }
- if (customers_telephone == "" || customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) {
- error_message = error_message + "<?php echo sprintf(addslashes(__('js tel lenght')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>";
- error = 1;
- }
+ var customers_email_address = $('input#customers_email_address').val();
+ if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) {
+ error_message = error_message + "<?php echo sprintf(addslashes(__('js email address')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>";
+ self.DisplayAlert( $('input#customers_email_address') );
+ error++;
+ }
- if (error == 1) {
- alert(error_message);
- return false;
- } else {
- return true;
- }
- }
+ <?php if (_cst_bool('ACCOUNT_DOB')): ?>
+ var customers_dob = $('input#customers_dob').val();
+ if (customers_dob == "" || customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) {
+ error_message = error_message + "<?php echo sprintf(addslashes(__('js dob')), ENTRY_DOB_MIN_LENGTH); ?>";
+ self.DisplayAlert( $('input#customers_dob') );
+ error++;
+ }
+ <?php endif; ?>
- <?php } ?>
- </script>
\ No newline at end of file
+
+// // Add message line
+// OSCSS_JSCORE.utils.notif.AddNotif({
+// indice:event.timeStamp,
+// style:'warring',
+// message: error_message,
+// });
+// var $parent = $(this).parent('div');//.hide() ;
+
+// if(error > 0 )
+// self.DisplayAlert( $(this).parent('#tabsmaster li') );
+// });
+
+ if(error > 0 )
+ return false;
+ else
+ return true;
+ });
+ ...
[truncated message content] |
|
From: <os...@us...> - 2012-08-28 20:09:15
|
Revision: 4597
http://oscss.svn.sourceforge.net/oscss/?rev=4597&view=rev
Author: oscim
Date: 2012-08-28 20:09:08 +0000 (Tue, 28 Aug 2012)
Log Message:
-----------
prepa section export vcard customers
correction coquille
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt
branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
branches/2.1.1/catalog/admin/includes/template/defaut/data/icon_set.xml
branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml
branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
Modified: branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab 2012-08-27 18:31:38 UTC (rev 4596)
+++ branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab 2012-08-28 20:09:08 UTC (rev 4597)
@@ -62,6 +62,7 @@
<th><?php echo __('datatypeproduct tableheading name') ?></th>
<th><?php echo __('datatypeproduct tableheading physical') ?></th>
<th><?php echo __('datatypeproduct tableheading virtual') ?></th>
+ <th><?php echo __('datatypeproduct tableheading section edit active') ?></th>
</tr>
</thead>
<!-- <tfoot>
@@ -81,6 +82,7 @@
<td><?php echo $row->name /*tep_draw_input_field('types[name]['.$row->id.']', 'name_'.$row->id, $row->name)*/; ?></td>
<td class="tcenter"><?php echo tep_draw_radio_field('types[virtual]['.$row->id.']', 'virtual_'.$row->id , 1, (bool)!in_array($row->id, explode(',', TYPE_VIRTUAL_PRODUCTS) )); ?></td>
<td class="tcenter"><?php echo tep_draw_radio_field('types[virtual]['.$row->id.']', 'virtual_'.$row->id , 2, (bool)in_array($row->id, explode(',', TYPE_VIRTUAL_PRODUCTS) )); ?></td>
+ <td class="tcenter"><?php echo tep_draw_input_field('types[conf]['.$row->id.']', 'conf_'.$row->id , @constant('CFG_CLASS_VIRTUAL_TYPE_'.$row->id), ' style="width:500px" ' ); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt 2012-08-27 18:31:38 UTC (rev 4596)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt 2012-08-28 20:09:08 UTC (rev 4597)
@@ -25,6 +25,7 @@
$lang['datatypeproduct tableheading name']="Nom" ;
$lang['datatypeproduct tableheading physical']="physique" ;
$lang['datatypeproduct tableheading virtual']="Virtuel" ;
+ $lang['datatypeproduct tableheading section edit active']="Section active" ;
/* tab physqiue */
$lang['datatypeproduct tab physique']="Physique" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-27 18:31:38 UTC (rev 4596)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-28 20:09:08 UTC (rev 4597)
@@ -492,7 +492,33 @@
break;
+ case 'vcard':
+ $result=sqlcustomer::fetch(array('id'=> tep_db_prepare_input(self::$Id) ), true );
+
+ $vt="HOME";
+
+ if($result->gender)
+ $gender='Mr' ;
+ else
+ $gender='Ms' ;
+
+ $vcard_content = "BEGIN:VCARD\r";
+
+ $vcard_content .= "N:".$result->lastname.";".$result->firstname.";;;\r";
+ $vcard_content .= "FN:".$result->firstname." ".$result->lastname."\r";
+ $vcard_content .= "EMAIL:".$result->email_address."\r";
+ $vcard_content .= "TEL;type=".$vt.";type=pref:".$result->telephone."\r";
+ $vcard_content .= "TEL;type=".$vt.";type=FAX:".$result->fax."\r";
+ $vcard_content .= "VERSION:3.0\r";
+ $vcard_content .= "END:VCARD";
+
+ header('Content-Disposition: inline; filename="'.$result->lastname.$result->firstname.'.vcf"');
+ header('Content-Type: application/x-vcard; charset=utf-8');
+ echo $vcard_content;
+ exit;
+ break;
+
/**
@remarks specific multi action
*/
@@ -932,6 +958,7 @@
self::$modules->display_ColumnRowAction($customers['id']) ,
sprintf(CsrtAction::getLink('row_action_right', __('incarner'), 'incarner'), '', tep_catalog_href_link('login.php','osCAdminDirect='.md5($SecuKey.date('d')).'&id='.$customers['id'],'SSL', false ) ,'').
sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'noedit'), '', tep_href_link(self::FILENAME,'cID=' . $customers['id'].'&action=noedit' ),'' ).
+// sprintf(CsrtAction::getLink('row_action_right', __('@customers button vcard'), 'vcard'), '', tep_href_link(self::FILENAME,'cID=' . $customers['id'].'&action=vcard' ) ,'').
sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,'cID=' . $customers['id'].'&action=edit' ),'' ).
sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $customers['id'].'&action=delete' ) ,'' )
);
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/data/icon_set.xml
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/data/icon_set.xml 2012-08-27 18:31:38 UTC (rev 4596)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/data/icon_set.xml 2012-08-28 20:09:08 UTC (rev 4597)
@@ -45,6 +45,7 @@
<send>icon_send.png</send>
<sendtest>icon_sendtest.png</sendtest>
<incarner>icon_incarn.png</incarner>
+ <vcard>vcard_icon.jpg</vcard>
<inventaire_update>cog_add.png</inventaire_update>
<inventaire_export>arrow_switch.png</inventaire_export>
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml 2012-08-27 18:31:38 UTC (rev 4596)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/data/icon_set.xml 2012-08-28 20:09:08 UTC (rev 4597)
@@ -45,6 +45,7 @@
<send>icon_send.png</send>
<sendtest>icon_sendtest.png</sendtest>
<incarner>icon_incarn.png</incarner>
+ <vcard>vcard_icon.jpg</vcard>
<inventaire_update>cog_add.png</inventaire_update>
<inventaire_export>arrow_switch.png</inventaire_export>
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2012-08-27 18:31:38 UTC (rev 4596)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2012-08-28 20:09:08 UTC (rev 4597)
@@ -33,7 +33,7 @@
insert into osc_configuration_group values (120,'CONFIG_AVANCE', NULL, 4, 1, 0, '1', 'CG_CONFIG_AVANCE');
insert into osc_configuration_group values (24 , 'CG_CIP_MANAGER', NULL, 0 , 1, 120, '0', 'CG_CIP_MANAGER');
- insert into osc_configuration_group values (10, 'LOGGING', NULL, 0, 1, 120, '1', 'CG_LOGGING');
+ insert into osc_configuration_group values (10, 'LOGGING', NULL, 0, 1, 120, '0', 'CG_LOGGING');
insert into osc_configuration_group values (12, 'OPTION_MAIL', NULL, 0, 1, 120, '0', 'MODMAIL');
insert into osc_configuration_group values (14, 'COMPRESSION', NULL, 0, 1, 120, '0', 'CG_COMPRESSION');
insert into osc_configuration_group values (15, 'SESSION', NULL, 0, 1, 120, '0', 'CG_SESSION');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-09-07 16:09:35
|
Revision: 4602
http://oscss.svn.sourceforge.net/oscss/?rev=4602&view=rev
Author: oscim
Date: 2012-09-07 16:09:29 +0000 (Fri, 07 Sep 2012)
Log Message:
-----------
correction chargement des elements de langue
Modified Paths:
--------------
branches/2.1.1/catalog/includes/languages/fr_FR/boxes/myaccount.txt
branches/2.1.1/catalog/templates/defaut/includes/gabarit/box.myaccount.gab
Modified: branches/2.1.1/catalog/includes/languages/fr_FR/boxes/myaccount.txt
===================================================================
--- branches/2.1.1/catalog/includes/languages/fr_FR/boxes/myaccount.txt 2012-09-04 11:57:42 UTC (rev 4601)
+++ branches/2.1.1/catalog/includes/languages/fr_FR/boxes/myaccount.txt 2012-09-07 16:09:29 UTC (rev 4602)
@@ -8,5 +8,15 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+
$lang['box heading my account']="Espace perso" ;
+$lang['my account title']="Mon compte" ;
+
+$lang['my account information']="Coordonnées" ;
+$lang['my account password']="Mot de passe" ;
+$lang['email notifications newsletters']="Newsletters" ;
+$lang['text logoff']="Déconnexion" ;
+$lang['email notifications title']="Notifications" ;
+
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/templates/defaut/includes/gabarit/box.myaccount.gab
===================================================================
--- branches/2.1.1/catalog/templates/defaut/includes/gabarit/box.myaccount.gab 2012-09-04 11:57:42 UTC (rev 4601)
+++ branches/2.1.1/catalog/templates/defaut/includes/gabarit/box.myaccount.gab 2012-09-07 16:09:29 UTC (rev 4602)
@@ -14,14 +14,14 @@
$ModuleAccount = account::getInstance();
$module=$page->_call('account','ret_modules');
-// print_r($ModuleAccount->CstrMenu());
+// var_dump($account);
?>
- <h3><?php echo MY_ACCOUNT_TITLE; ?></h3>
+ <h3><?php echo __('my account title'); ?></h3>
<ul>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=edit', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></li>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=password', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></li>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=newsletters', 'SSL') . '">' . EMAIL_NOTIFICATIONS_NEWSLETTERS . '</a>'; ?></li>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=edit', 'SSL') . '">' . __('my account information') . '</a>'; ?></li>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=password', 'SSL') . '">' . __('my account password') . '</a>'; ?></li>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=newsletters', 'SSL') . '">' . __('email notifications newsletters') . '</a>'; ?></li>
<?php foreach($ModuleAccount->CstrMenu() as $k=>$aca_mod) : ?>
<!-- dynamic myaccount menu -->
<?php if($aca_mod->pile =='myaccount') : ?>
@@ -32,13 +32,14 @@
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' .TEXT_LOGOFF . '</a>'; ?></li>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' .__('text logoff') . '</a>'; ?></li>
</ul>
- <?php if($account['customers_newsletter'] > 0 || @$account['global_product_notifications'] > 0 ) : ?>
+ <?php //if($account['customers_newsletter'] > 0 || @$account['global_product_notifications'] > 0 ) : ?>
+ <?php if($account->customers_newsletter > 0 || $account->global_product_notifications > 0 ) : ?>
<!-- dynamic notification menu -->
<div class="contentBox myEmail">
- <h3><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></h3>
+ <h3><?php echo __('email notifications title'); ?></h3>
<ul>
<?php foreach($ModuleAccount->CstrMenu() as $k=>$aca_mod) : ?>
<?php if($aca_mod->pile =='notification') : ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-09-11 20:14:03
|
Revision: 4606
http://oscss.svn.sourceforge.net/oscss/?rev=4606&view=rev
Author: oscim
Date: 2012-09-11 20:13:52 +0000 (Tue, 11 Sep 2012)
Log Message:
-----------
correction coquille
Modified Paths:
--------------
branches/2.1.1/catalog/advanced_search.php
branches/2.1.1/catalog/checkout_shipping_address.php
Modified: branches/2.1.1/catalog/advanced_search.php
===================================================================
--- branches/2.1.1/catalog/advanced_search.php 2012-09-11 20:12:55 UTC (rev 4605)
+++ branches/2.1.1/catalog/advanced_search.php 2012-09-11 20:13:52 UTC (rev 4606)
@@ -79,13 +79,14 @@
$listing_sql = 'SELECT DISTINCT '.$dyntype->listing_sql['col_count'] .
' '. $dyntype->listing_sql['tables'] .
' '. $dyntype->listing_sql['where'] .
+ ' GROUP BY '. $dyntype->listing_sql['col_count'].
' ORDER BY '. $dyntype->listing_sql['sort'];
$listing_split = new splitPageResults($listing_sql, $page->_conf_value('MAX_DISPLAY_SEARCH_RESULTS'), $dyntype->listing_sql['col_count'] );
$listing_query = $DB->query($listing_split->sql_query);
-
+
}
Modified: branches/2.1.1/catalog/checkout_shipping_address.php
===================================================================
--- branches/2.1.1/catalog/checkout_shipping_address.php 2012-09-11 20:12:55 UTC (rev 4605)
+++ branches/2.1.1/catalog/checkout_shipping_address.php 2012-09-11 20:13:52 UTC (rev 4606)
@@ -54,6 +54,9 @@
else
$res=$cust->userAddAddressBook($_POST);
+ if($res == false)
+ tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
+
if (!tep_session_is_registered('sendto')) tep_session_register('sendto');
$sendto = tep_db_insert_id($res);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-09-21 06:30:20
|
Revision: 4609
http://oscss.svn.sourceforge.net/oscss/?rev=4609&view=rev
Author: oscim
Date: 2012-09-21 06:30:14 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
correction coquille usage des devise, cf forum http://forums.oscss.org/2-extensions-fr/prix-en-fonction-de-la-devise-t2054.html par moody_styley
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/modules/pages/currencies.php
branches/2.1.1/catalog/common/classes/price.php
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/currencies.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/currencies.php 2012-09-17 12:57:51 UTC (rev 4608)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/currencies.php 2012-09-21 06:30:14 UTC (rev 4609)
@@ -224,7 +224,7 @@
$contents[] = array('text' => __('text info currency decimal places') . $cInfo->decimal_places);
$contents[] = array('text' => __('text info currency value') . tep_date_short($cInfo->last_updated));
$contents[] = array('text' => __('text info currency value') . number_format($cInfo->value, 8));
- $contents[] = array('text' => __('text info currency example') . $currencies->format('30', false, DEFAULT_CURRENCY) . ' = ' . $currencies->format('30', true, $cInfo->code));
+ $contents[] = array('text' => __('text info currency example') . $currencies->format('30', false, DEFAULT_CURRENCY) . ' = ' . $currencies->format('30', true, $cInfo->code, $cInfo->value, $cInfo->decimal_places));
}
break;
}
Modified: branches/2.1.1/catalog/common/classes/price.php
===================================================================
--- branches/2.1.1/catalog/common/classes/price.php 2012-09-17 12:57:51 UTC (rev 4608)
+++ branches/2.1.1/catalog/common/classes/price.php 2012-09-21 06:30:14 UTC (rev 4609)
@@ -240,7 +240,7 @@
$currency_type = (!empty($currency) ? $currency : (_cst_bool('USE_DEFAULT_LANGUAGE_CURRENCY') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY) ) ;
if ($calculate_currency_value == true) {
- $number *= tep_not_null($currency_value) ? $currency_value : $this->get_currency_value();
+ $number *= tep_not_null($currency_value) ? $currency_value : $this->get_currency_value($currency_type);
// if the selected currency is in the european euro-conversion and the default currency is euro, the currency will displayed in the national currency and euro currency
if ( (DEFAULT_CURRENCY == 'EUR') && in_array($currency_type, array('DEM','BEF','LUF','ESP','FRF','IEP','ITL','NLG','ATS','PTE','FIM','GRD')) )
$euro_string = ' <small>[' . $this->currency_format($number, true, 'EUR') . ']</small>';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-09-25 19:25:21
|
Revision: 4612
http://oscss.svn.sourceforge.net/oscss/?rev=4612&view=rev
Author: oscim
Date: 2012-09-25 19:25:14 +0000 (Tue, 25 Sep 2012)
Log Message:
-----------
correction coquille suivi stock
remon?\195?\169 correction suivi/gestion du stock, ajout mode edition limited
suite travail style BO
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
branches/2.1.1/catalog/common/classes/shoppingCart.php
branches/2.1.1/catalog/includes/classes/Stock.php
branches/2.1.1/catalog/includes/classes/checkout_process.php
branches/2.1.1/catalog/includes/js/shopping_cart.js.php
branches/2.1.1/catalog/includes/triggers/cart_line.inc
branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt
branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql
branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_admin_m_files.sql
Modified: branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php 2012-09-25 19:25:14 UTC (rev 4612)
@@ -285,7 +285,7 @@
$product['featureds'][$row->featured_id]=$row;
}
- $product['products_date_available']=(isset($product['products_date_available'])? tep_date_short($product['products_date_available']) : '');
+ $product['products_date_available']=(isset($product['products_date_available'])? $product['products_date_available'] : '');
// <!-- BOF Separate Pricing Per Customer -->
$customers_group_query = $DB->query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id != '0' order by customers_group_id");
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-09-25 19:25:14 UTC (rev 4612)
@@ -50,7 +50,7 @@
<fieldset class="block_field">
<ul>
- <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
+ <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
<li class="block_input">
<label class="inline" for="products_date_available" title="<?php echo __('@products text date available help') ?>"><?php echo __('@products text date available'); ?></label>
<?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('@products display date format'); ?>
@@ -185,18 +185,24 @@
<fieldset class="block_field">
<legend><?php echo __('@products text legend stock'); ?></legend>
<div class="block_input">
- <label class="inline"><?php echo __('@products text label stock'); ?></label>
- <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?>
- <br style="clear:both;" />
+ <p>
+ <label class="inline"><?php echo __('@products text label stock'); ?></label>
+ <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?>
+ </p>
<div id="products_quantity_block">
<?php if(products::$product_investigation['has_tracked_options'] or products::$product_investigation['stock_entries_count'] > 0) :?>
<a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$Info->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a>
<?php else: ?>
- <label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label>
- <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity, ((products::$Info->track_stock==0)? 'disabled="disabled"' :'') ) ; ?><br />
+ <p>
+ <label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label>
+ <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity, ((products::$Info->track_stock==0)? 'disabled="disabled"' :'') ) ; ?>
+ </p>
<?php endif; ?>
</div>
</div>
+
+ <p class='textInfo'>
+ </p>
</fieldset>
<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-09-25 19:25:14 UTC (rev 4612)
@@ -754,7 +754,7 @@
if (isset(self::$Id)) $products_id = tep_db_prepare_input(self::$Id);
$products_date_available = (isset($_POST['products_date_available'])) ? tep_db_prepare_input($_POST['products_date_available']) : '';
- $products_date_available = (date('Y-m-d') < tep_date_raw($products_date_available)) ? tep_date_raw($products_date_available) : '1000-01-01 00:00:00';
+ $products_date_available = (date('Y-m-d') < tep_date_raw($products_date_available)) ? tep_date_raw($products_date_available).' 00:00:00' : '1000-01-01 00:00:00';
$params['sqlarray'] = array('products_quantity' => (isset($_POST['products_quantity']) ? tep_db_prepare_input($_POST['products_quantity']) : 0),
'products_model' => (isset($_POST['products_model'])? tep_db_prepare_input($_POST['products_model']) : ''),
@@ -1093,7 +1093,7 @@
return sprintf(
CsrtAction::getFormat('row_action'),
self::$modules->display_ColumnRowAction($products['id']) ,
- sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'id=' . $products['id'],'SSL', true, 'forceview') ,' target="blank" ' ).
+ sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'products_id=' . $products['id'],'SSL', true, 'forceview') ,' target="blank" ' ).
((_cst_bool('STOCK_CHECK'))
? sprintf(CsrtAction::getLink('row_action_right', __('txt stock') , 'stock'), 'fancyView', tep_href_link(FILENAME_STOCK, 'product_id=' . $products['id'].'&origin='.self::FILENAME) ,'' )
: ''
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-09-25 19:25:14 UTC (rev 4612)
@@ -357,6 +357,10 @@
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
+ select.button option{
+ color:@color_015;
+ }
+
input[type=image].button {
float:left;
height:( @lineheight * 1.3);
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-09-25 19:25:14 UTC (rev 4612)
@@ -26,6 +26,8 @@
+
+
/* base dimension */
@display_max_width : 900px;
@display_width : 90% ;
Modified: branches/2.1.1/catalog/common/classes/shoppingCart.php
===================================================================
--- branches/2.1.1/catalog/common/classes/shoppingCart.php 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/common/classes/shoppingCart.php 2012-09-25 19:25:14 UTC (rev 4612)
@@ -196,14 +196,14 @@
$attr_value = NULL;
$blank_value = FALSE;
if (strstr($option, TEXT_PREFIX)) {
- if (trim($value) == NULL) {
- $blank_value = TRUE;
- } else {
- $option = substr($option, strlen(TEXT_PREFIX));
- $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
- $value = $_POST['Valueid'][$option];
- $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
- }
+ if (trim($value) == NULL) {
+ $blank_value = TRUE;
+ } else {
+ $option = substr($option, strlen(TEXT_PREFIX));
+ $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
+ $value = $_POST['Valueid'][$option];
+ $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
+ }
}
if (!$blank_value) {
@@ -559,6 +559,17 @@
return $this->DC;
}
+ /**
+ @brief adjust display for active / inactive button continue
+ @return boolean true for display
+ */
+ public function ContinueButton(){
+ if( _cst_bool('STOCK_CHECK') )
+ return Stock::check_cart();
+
+ return true;
+ }
+
/**
@brief Init base module actif pour la page shopping_cart
Intervention boucle definiton des produits
Modified: branches/2.1.1/catalog/includes/classes/Stock.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/Stock.php 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/includes/classes/Stock.php 2012-09-25 19:25:14 UTC (rev 4612)
@@ -41,14 +41,20 @@
return false;
$attributes= (is_array($product['attributes']) ? $product['attributes'] : array() );
+ self::$marck=0;
switch($product['track_stock']) {
case 0: /// no check stock
- self::$marck=0;
break;
case 2: /// no check stock , product dispo sur commande
self::$marck=1;
break;
+ case 3: /// Limited
+ if( (tep_get_products_stock($product['id'],$attributes) - $product['quantity'] ) < 0){
+ self::$marck=3;
+ return true;
+ }
+ break;
case 1: /// check stock
default:
self::$marck=( ((tep_get_products_stock($product['id'],$attributes) - $product['quantity'] ) < 0)? 2 : 0);
@@ -62,12 +68,20 @@
A utiliser apres l'appel de la methode check_inline
*/
public static function mark_inline(){
- if(self::$marck==0) return ;
- elseif(self::$marck==2) return ' <span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
- elseif(self::$marck==1) return ' <span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_NO_STOCK . '</span>';
+ if(self::$marck==2) return ' <span class="cart-line line outstock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
+ elseif(self::$marck==1) return ' <span class="cart-line line avaible">' . STOCK_MARK_PRODUCT_NO_STOCK . '</span>';
+ elseif(self::$marck==3) return ' <span class="cart-line line limited">arg!!</span>';
+ else return ;
}
+ /**
+ @fn DisplayMessage()
+ */
+ public static function DisplayMessage(){
+ return self::$marck;
+ }
+
/**
@fn check_cart()
@brief Control complet
@@ -84,8 +98,8 @@
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$any_out_of_stock = self::check_inline($products[$i]);
}
- // Out of Stock Et achat hors stock non autorisé
- if (!_cst_bool('STOCK_ALLOW_CHECKOUT') && ($any_out_of_stock == true) ) {
+ // Alert
+ if ($any_out_of_stock == true ) {
return false;
}
}
Modified: branches/2.1.1/catalog/includes/classes/checkout_process.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/checkout_process.php 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/includes/classes/checkout_process.php 2012-09-25 19:25:14 UTC (rev 4612)
@@ -319,30 +319,32 @@
$products_ordered='';
$order = (!is_object($order)? new order('', ((!self::$mode)? 'holding' : '') ) : $order );
-
+// var_dump($order);
+// var_dump(self::$mode);
+// exit;
/**
- Process class
+ Process class
*/
self::$Id=$the_order_id=$insert_id=$this->insert_order($customer_id, $order);
/// unqieuemnt held_horder
if(!self::$mode) {
- self::purgeHolding();
-// self::preventDuplicateholding($the_order_id);
+ self::purgeHolding();
+ // self::preventDuplicateholding($the_order_id);
}
/**
- Process class
+ Process class
*/
$this->insert_order_total($order_totals);
/**
- Process class
+ Process class
*/
$customer_notification =$this->insert_status_history($order);
/**
- Before process module ACA
+ Before process module ACA
*/
$this->in_process_order();
@@ -352,66 +354,74 @@
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
- /**
- Process class
- Gestion du stock
- */
- $products_stock_attributes=(self::$mode) ? $this->order_destock_product($i,$order) : '';
+ /**
+ Process class
+ Gestion du stock
+ */
+ if(self::$mode){
+ $products_stock_attributes= $this->order_destock_product($i,$order) ;
- /**
- Process class
- meilleur vente
- */
- if(self::$mode)$this->update_product_bestseller( $order->products[$i]['id'], $order->products[$i]['qty']);
+ }
+ else
+ $products_stock_attributes= '';
- /**
- Process class
- Enregsitrement des produits
- */
- $order_products_id =$this->insert_order_product($i,$products_stock_attributes,$order);
+// var_dump($products_stock_attributes);
+// exit;
+ /**
+ Process class
+ meilleur vente
+ */
+ if(self::$mode)
+ $this->update_product_bestseller( $order->products[$i]['id'], $order->products[$i]['qty']);
+ /**
+ Process class
+ Enregsitrement des produits
+ */
+ $order_products_id =$this->insert_order_product($i,$products_stock_attributes,$order);
- //------insert customer choosen option to order--------
- $attributes_exist = '0';
- $products_ordered_attributes = '';
- if (isset($order->products[$i]['attributes'])) {
- $attributes_exist = '1';
- for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
- /**
- Process class
- recup des attribut de produits
- */
- $attributes_values=$this->load_db_attribut_product($i, $j, $order);
- /**
- Process class
- enregistrement des attribut de produits
- */
- $this->insert_order_product_attribut($order_products_id,$attributes_values);
+ //------insert customer choosen option to order--------
+ $attributes_exist = '0';
+ $products_ordered_attributes = '';
+ if (isset($order->products[$i]['attributes'])) {
+ $attributes_exist = '1';
+ for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
+ /**
+ Process class
+ recup des attribut de produits
+ */
+ $attributes_values=$this->load_db_attribut_product($i, $j, $order);
+ /**
+ Process class
+ enregistrement des attribut de produits
+ */
+ $this->insert_order_product_attribut($order_products_id,$attributes_values);
- $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
- }
- }
+ $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
+ }
+ }
- /**
- Before process module ACA
- */
- $this->in_process_products();
- //------insert customer choosen option eof ----
- $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
- $total_products_price=$currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) ;
- $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
- $total_cost += $total_products_price;
+ /**
+ Before process module ACA
+ */
+ $this->in_process_products();
-// $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
+ //------insert customer choosen option eof ----
+ $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
+ $total_products_price=$currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) ;
+ $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
+ $total_cost += $total_products_price;
+
+ // $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
/**
- Before process module ACA
+ Before process module ACA
*/
$this->in_process_finish();
@@ -852,8 +862,9 @@
private function order_destock_product($i,$order){
$products_stock_attributes=null;
+//
- if (_cst_bool('STOCK_LIMITED')) {
+ if (_cst_bool('STOCK_CHECK') ) {
$products_attributes =(isset($order->products[$i]['attributes'])) ? $order->products[$i]['attributes'] : array();
if (_cst_bool('DOWNLOAD_ENABLED') ) {
@@ -875,10 +886,13 @@
}
if (tep_db_num_rows($stock_query) > 0) {
+
+// var_dump(__LINE__,$download_selected);
+
$stock_values = tep_db_fetch_array($stock_query);
$actual_stock_bought = $order->products[$i]['qty'];
$download_selected = false;
-
+var_dump($stock_values);
if ((!_cst_bool('DOWNLOAD_ENABLED')) && isset($stock_values['products_attributes_filename']) && tep_not_null($stock_values['products_attributes_filename'])) {
$download_selected = true;
$products_stock_attributes='$$DOWNLOAD$$';
@@ -923,18 +937,24 @@
//! stock produit sans attribut et non downloadable
elseif (!$download_selected && $stock_values['track_stock']>0) {
+
+
+
$stock_left = $stock_values['products_quantity'] - $actual_stock_bought;
tep_db_query($sql="update " . TABLE_PRODUCTS . " set products_quantity = '" .tep_db_input( $stock_left ). "' where products_id = '" . tep_db_input( tep_get_prid($order->products[$i]['id']) ). "'");
//! descative les produit qu ne sont plus en stock, si l'achat hors stock nest pas autorise
- if ( ($stock_left < 1) && (!_cst_bool('STOCK_ALLOW_CHECKOUT')) && @$stock_values['track_stock'] ==1 )
+ /// TODO Notification admin
+ if ( ($stock_left <= 0) && (!_cst_bool('STOCK_ALLOW_CHECKOUT')) && @$stock_values['track_stock'] ==3 )
tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" .tep_db_input( tep_get_prid($order->products[$i]['id']) ). "'");
}
}
}
+var_dump($products_stock_attributes);
+exit;
return $products_stock_attributes;
}
Modified: branches/2.1.1/catalog/includes/js/shopping_cart.js.php
===================================================================
--- branches/2.1.1/catalog/includes/js/shopping_cart.js.php 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/includes/js/shopping_cart.js.php 2012-09-25 19:25:14 UTC (rev 4612)
@@ -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 20/10/11, 11:16
+ @date 24/09/2012, 11:16
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -37,6 +37,8 @@
update = texte.split('|');
writebox();
writeqty(update, data.substring(8) );
+
+ field.val(update[4]);
}
});
@@ -54,6 +56,9 @@
writebox();
writeqty(update, data.substring(8) );
+
+
+ field.val(update[4]);
}
});
@@ -96,7 +101,6 @@
if (val < 0) val = 0;
- field.val(val);
return val;
}
@@ -113,6 +117,8 @@
function writeqty(update, cart_id) {
+
+
cartPriceId = 'ajaxcarttext'+cart_id;
document.getElementById(cartPriceId).innerHTML = update[0];
@@ -122,6 +128,9 @@
cartPriceId = 'ajaxcartPrice'+cart_id;
document.getElementById(cartPriceId).innerHTML = update[3];
+ cartPriceId = 'cartQty_'+cart_id;
+ document.getElementById(cartPriceId).innerHTML = update[4];
+
}
Modified: branches/2.1.1/catalog/includes/triggers/cart_line.inc
===================================================================
--- branches/2.1.1/catalog/includes/triggers/cart_line.inc 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/includes/triggers/cart_line.inc 2012-09-25 19:25:14 UTC (rev 4612)
@@ -35,20 +35,46 @@
$cart->add_cart($current['id'], $product_qty_get, $attributes, false);
- $products_sum = tep_round(tep_add_tax($current['final_price'], tep_get_tax_rate($current['tax_class_id'])),$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) *$product_qty_get ;
- $proud_ht = ($current['final_price'] * $product_qty_get) ;
+ $back = $current['quantity'];
$current['quantity'] = $product_qty_get;
- if( Stock::check_inline($current) ){
- $p =product::get_item($current['id']);
+
+
+ /**
+ @remarks check stock and prepare alert message
+ */
+ if( ! Stock::check_inline($current) ){
+
+ /**
+ @remarks Stock is ok, continue
+ */
$line['stock'] = Stock::mark_inline();
+
+ $products_sum = tep_round(tep_add_tax($current['final_price'], tep_get_tax_rate($current['tax_class_id'])),$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) *$product_qty_get ;
+ $proud_ht = ($current['final_price'] * $product_qty_get) ;
+
+ $line['tot_taxe'] = $currencies->format( $products_sum - $proud_ht );
+ $line['tot_ht'] = $currencies->format($proud_ht);
+ $line['tot_ttc'] = $currencies->format($products_sum);
+ $line['quantity'] = $product_qty_get;
}
+ else{
+ /**
+ @remarks Stock is not possible, correct value and appli
+ */
+ $current['quantity'] = $back;
+ $line['stock'] = Stock::mark_inline();
- $line['tot_taxe'] = $currencies->format( $products_sum - $proud_ht );
- $line['tot_ht'] = $currencies->format($proud_ht);
- $line['tot_ttc'] = $currencies->format($products_sum);
+ $products_sum = tep_round(tep_add_tax($current['final_price'], tep_get_tax_rate($current['tax_class_id'])),$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) * $back ;
+ $proud_ht = ($current['final_price'] * $back) ;
+ $line['tot_taxe'] = $currencies->format( $products_sum - $proud_ht );
+ $line['tot_ht'] = $currencies->format($proud_ht);
+ $line['tot_ttc'] = $currencies->format($products_sum);
+ $line['quantity'] = $back;
+ }
+
}
else {
@@ -62,6 +88,7 @@
$line['tot_ttc'] = $currencies->format($products_sum);
$line['tot_taxe'] = $currencies->format( $products_sum - $proud_ht );
+ $line['quantity'] = $product_qty_get;
}
echo implode('|',$line);
Modified: branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt
===================================================================
--- branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt 2012-09-25 19:25:14 UTC (rev 4612)
@@ -77,5 +77,5 @@
$lg['OSC_TRACK_STOCK_NONE']="Pas de suivi" ;
$lg['OSC_TRACK_STOCK_ON']="En stock - suivi " ;
$lg['OSC_TRACK_STOCK_NOSTOCK']="Hors stock - suivi" ;
-
+$lg['OSC_TRACK_STOCK_LIMITED']="Edition Limité - suivi" ;
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-09-25 19:25:14 UTC (rev 4612)
@@ -67,4 +67,5 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'track_stock', 1, 'OSC_TRACK_STOCK_NONE','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'track_stock', 1, 'OSC_TRACK_STOCK_ON','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
\ No newline at end of file
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'track_stock', 1, 'OSC_TRACK_STOCK_LIMITED','');
\ No newline at end of file
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_admin_m_files.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_admin_m_files.sql 2012-09-25 08:10:14 UTC (rev 4611)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_admin_m_files.sql 2012-09-25 19:25:14 UTC (rev 4612)
@@ -105,7 +105,7 @@
INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (91, 'configuration.php?gID=36', 0, 5, '1');
INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (92, 'currencies.php', 0, 5, '1');
INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (93, 'newsletters.php', 0, 4, '1');
-INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (94, 'orders.php', 0, 7, '1');
+INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (94, 'orders.php', 1, 7, '1');
INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (95, 'held_orders.php', 0, 7, '1');
INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (96, 'recover_cart_sales.php', 0, 7, '1');
INSERT INTO osc_admin_m_files (admin_files_id, admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES (97, 'products.php', 0, 5, '1');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-09-28 16:52:28
|
Revision: 4613
http://oscss.svn.sourceforge.net/oscss/?rev=4613&view=rev
Author: oscim
Date: 2012-09-28 16:52:21 +0000 (Fri, 28 Sep 2012)
Log Message:
-----------
Am?\195?\169lioration comportement associ?\195?\169 au stock
Ajustement des page et parametre li?\195?\169s au stock et aux retour l'affichage
Ajustement de l'install
amelioration et extension du comportement du panier pour supporter la prise en charge de produits avec attribut autorisant la selection de plusieurs valeur pour une m?\195?\170me option
Correction de la function tep_get_uprid() du FO qui comporter des doulbons
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/tracked_stock.php
branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_20.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/stock.txt
branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php
branches/2.1.1/catalog/admin/includes/modules/pages/stock.php
branches/2.1.1/catalog/common/classes/shoppingCart.php
branches/2.1.1/catalog/includes/classes/drivers/data/product.php
branches/2.1.1/catalog/includes/classes/pad_base.php
branches/2.1.1/catalog/includes/functions/general.php
branches/2.1.1/catalog/includes/modules/upcoming_products.php
branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
Modified: branches/2.1.1/catalog/admin/includes/classes/tracked_stock.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/tracked_stock.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/classes/tracked_stock.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -28,7 +28,9 @@
/**
- Construit requte pour les alerte de stock
+ @brief Construit requete pour les alerte de stock
+ @note
+ Use track_stock status 1,2 (0 no track and 3 is limited stock )
*/
function db_low_stock(){
global $languages_id;
@@ -37,6 +39,7 @@
WHERE
p.products_id = pd.products_id and l.languages_id = pd.language_id
and pd.language_id = '" . (int)$languages_id . "' AND pd.products_name <>''
+ AND track_stock IN (1,2)
and( p.products_quantity <= '".$this->config['STOCK_REORDER_LEVEL']."' OR s.products_stock_quantity <= '".$this->config['STOCK_REORDER_LEVEL']."' )
order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : ' p.products_quantity, s.products_stock_quantity ASC');
Modified: branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/gabarit/configuration/datatypeproduct.listing.gab 2012-09-28 16:52:21 UTC (rev 4613)
@@ -47,13 +47,15 @@
<div id="subtabs-1" class="tabPage">
<h4 class="main-title"><?php echo __('heading datatypeproduct manage type products') ?></h4>
-<?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=save_mutli') ?>
- <p class="main-intro"><?php echo __('datatypeproduct type txt intro') ?></p>
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=save_mutli') ?>
+
+
<fieldset class="block_field">
<legend><?php echo __('datatypeproduct legend manage type') ?></legend>
<div class="block_input">
+ <p class="main-intro"><?php echo __('datatypeproduct type txt intro') ?></p>
<table>
<thead>
<tr>
@@ -92,6 +94,24 @@
</div>
</fieldset>
+ <fieldset class="block_field">
+<!-- <legend><?php //echo __('datatypeproduct legend warn') ?></legend> -->
+
+ <?php /** option de la gestion de stock, disponible que ci value precendente a true */ ?>
+ <ul class="block_input">
+ <?php foreach(datatypeproduct::$list->config as $row):?>
+ <li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
+
+ <div class="block_input tirroir">
+ <label><?php echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ </fieldset>
<div class="button_nav">
<?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
</div>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab 2012-09-28 16:52:21 UTC (rev 4613)
@@ -27,8 +27,8 @@
<th style="width:10%" class="tcenter"><?php echo __('table heading name'); ?></th>
<th style="width:10%" class="tcenter"><?php echo __('table heading model'); ?></th>
<th style="width:25%" class="tleft"><?php echo __('table heading stock'); ?></th>
- <th style="width:12%" class="tleft"><?php echo __('table heading price'); ?></th>
- <th style="width:12%" class="tleft"><?php echo __(''); ?></th>
+ <th style="width:12%" class="tleft"><?php echo __('table heading mode stock'); ?></th>
+ <th style="width:12%" class="tleft"><?php echo __('table heading action'); ?></th>
</tr>
</thead>
<tbody>
@@ -42,7 +42,7 @@
<td style="width:50%" class="tcenter"><?php echo $row['products_name']; ?></td>
<td style="width:10%" class="tcenter"><?php echo $row['products_model']; ?></td>
<td style="width:5%" class="tcenter"><?php echo $row['products_quantity']; ?></td>
- <td style="width:5%" class="tcenter"><?php echo $row['products_price']; ?></td>
+ <td style="width:5%" class="tcenter"><?php echo $row['track_stock']; ?></td>
<td style="width:5%" class="tcenter"><?php
printf(
CsrtAction::getFormat('row_action'),
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_20.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_20.txt 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_20.txt 2012-09-28 16:52:21 UTC (rev 4613)
@@ -12,7 +12,6 @@
$lang['EXPECTED_PRODUCTS_SORT_S']="[module] Ordre de tri des articles" ;
$lang['EXPECTED_PRODUCTS_SORT_L']="Ordre de tri utilisé dans la boîte 'articles en attente'.<br />(Ascendant ou Descendant)" ;
-$lang['EXPECTED_PRODUCTS_FIELD_S']="[module] Tri des articles en attente" ;
-$lang['EXPECTED_PRODUCTS_FIELD_L']="Critère de tri utilisé dans la boîte 'articles en attente'.<br />(par Nom ou par Date)" ;
+
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt 2012-09-28 16:52:21 UTC (rev 4613)
@@ -46,4 +46,10 @@
/* Edit */
$lang['datatypeproduct heading Configuration du modules']="Options de ce module" ;
+
+
+
+//
+$lang['EXPECTED_PRODUCTS_FIELD_S']="Produits en attente (date de disponibilité)" ;
+$lang['EXPECTED_PRODUCTS_FIELD_L']="Comportement à appliquer aux produits qui contiennent une date de disponibilité et dont le l'état est inactif. Dans le cas de la méthode 'pre-commande', le comportement proposera d'acheter le produit. Dans le cas de publication, le produits ne sera visible sur la boutique qu'après la date révolu " ;
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/stock.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/stock.txt 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/stock.txt 2012-09-28 16:52:21 UTC (rev 4613)
@@ -15,5 +15,10 @@
$lang['table heading name']="Produits" ;
$lang['table heading model']="Modèle" ;
$lang['table heading stock']="Stock" ;
-$lang['table heading price']="Prix" ;
+$lang['table heading mode stock']="Mode" ;
+$lang['table heading action']="Actions" ;
+
+$lang['@stock track stock in stock']="En stock" ;
+$lang['@stock track stock no stock']="Hors stock" ;
+$lang['@stock track stock limited']="Fin de serie" ;
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -265,8 +265,10 @@
// $gID = 1;
$li=sqlconfiguration::fetch(array('group_id'=> (int)self::$gID), true);
+// var_dump($li);
+ if(is_object($li))
+ $li = array($li);
- if(is_array($li))
foreach($li as $row) {
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/stock.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/stock.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/stock.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -272,7 +272,7 @@
'products_name'=>true,
'products_model'=>true,
'products_quantity'=>true,
- 'products_price'=>true,
+ 'track_stock'=>true,
);
}
@@ -298,7 +298,7 @@
if(strlen(TYPE_VIRTUAL_PRODUCTS) > 2 )
$sWhere .=" AND products_type NOT IN (". (( substr(TYPE_VIRTUAL_PRODUCTS,-1) ==',') ? substr(TYPE_VIRTUAL_PRODUCTS, 0,-1) : TYPE_VIRTUAL_PRODUCTS ) .") ";
- $query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_model, p.products_quantity,p.products_price, l.name from " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id AND pd.language_id = '" . (int)$languages_id . "' ) , " . TABLE_LANGUAGES . " l WHERE p.products_id = pd.products_id AND l.languages_id = pd.language_id ".$sWhere." order by ".((!empty($sOrder)) ? $sOrder : 'pd.products_name ASC');
+ $query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_model, p.products_quantity,p.products_price, l.name,track_stock from " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id AND pd.language_id = '" . (int)$languages_id . "' ) , " . TABLE_LANGUAGES . " l WHERE p.track_stock > 0 AND p.products_id = pd.products_id AND l.languages_id = pd.language_id ".$sWhere." order by ".((!empty($sOrder)) ? $sOrder : 'pd.products_name ASC');
// $orders_split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
@@ -310,7 +310,24 @@
$li=$res=array();
foreach(self::$list as $item){
- foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(tep_not_null($item[$k]) ? $item[$k] : ' ');
+ foreach(self::tep_get_modele() as $k=>$v)
+ if($k == 'track_stock' ){
+ switch ($item[$k]) {
+ case 1:
+ $value = __('@stock track stock in stock');
+ break;
+ case 2:
+ $value = __('@stock track stock no stock');
+ break;
+ case 3:
+ $value = __('@stock track stock limited');
+ break;
+ }
+
+ $li[$k]=$value;
+ }
+ else
+ $li[$k]=(tep_not_null($item[$k]) ? $item[$k] : ' ');
$res[]=$li;
}
Modified: branches/2.1.1/catalog/common/classes/shoppingCart.php
===================================================================
--- branches/2.1.1/catalog/common/classes/shoppingCart.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/common/classes/shoppingCart.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -146,9 +146,17 @@
$this->contents[$products['products_id']] = array('qty' => $products['customers_basket_quantity']);
// attributes
$attributes_query = $DB->query("select products_options_id, products_options_value_id, products_options_value_text from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "'");
+
while ($attributes = $attributes_query->fetchAssoc()) {
- if ($attributes['products_options_value_id'] == PRODUCTS_OPTIONS_VALUE_TEXT_ID) $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_text'];
- else $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
+ // specific mode txt add by customer in product attributes
+ if ($attributes['products_options_value_id'] == PRODUCTS_OPTIONS_VALUE_TEXT_ID)
+ $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_text'];
+ // specific mode multi value for one option
+ elseif( $attributes['products_options_value_id'] === 0)
+ $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = explode(',',$attributes['products_options_value_text']);
+ // normal
+ else
+ $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
}
}
@@ -170,53 +178,63 @@
global $new_products_id_in_cart, $customer_id;
$products_id_string = tep_get_uprid($products_id, $attributes);
+
$products_id = tep_get_prid($products_id_string);
if (is_numeric($products_id) && is_numeric($qty)) {
$product_obj=product::get_item($products_id);
if($product_obj !=false){
- if ($notify == true) {
- $new_products_id_in_cart = $products_id;
- tep_session_register('new_products_id_in_cart');
- }
+ if ($notify == true) {
+ $new_products_id_in_cart = $products_id;
+ tep_session_register('new_products_id_in_cart');
+ }
- if ($this->in_cart($products_id_string)==true) {
- $this->update_quantity($products_id_string, $qty, $attributes);
- }
- else {
- $this->contents[$products_id_string] = array('qty' => $qty);
- if(!empty($special_class)) $this->contents[$products_id_string]['special_class'] = $special_class;
- // insert into database
- if (tep_session_is_registered('customer_id'))
- tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $qty . "', '" . date('Ymd') . "')");
- if (is_array($attributes)) {
- reset($attributes);
- while (list($option, $value) = each($attributes)) {
- $attr_value = NULL;
- $blank_value = FALSE;
- if (strstr($option, TEXT_PREFIX)) {
- if (trim($value) == NULL) {
- $blank_value = TRUE;
- } else {
- $option = substr($option, strlen(TEXT_PREFIX));
- $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
- $value = $_POST['Valueid'][$option];
- $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
+ if ($this->in_cart($products_id_string)==true) {
+ $this->update_quantity($products_id_string, $qty, $attributes);
+ }
+ else {
+ $this->contents[$products_id_string] = array('qty' => $qty);
+ if(!empty($special_class)) $this->contents[$products_id_string]['special_class'] = $special_class;
+ // insert into database
+ if (tep_session_is_registered('customer_id')){
+ tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $qty . "', '" . date('Ymd') . "')");
+
+ if (is_array($attributes)) {
+ reset($attributes);
+ while (list($option, $value) = each($attributes)) {
+ $attr_value = NULL;
+ $blank_value = FALSE;
+ if (strstr($option, TEXT_PREFIX)) {
+ if (trim($value) == NULL) {
+ $blank_value = TRUE;
+ } else {
+ $option = substr($option, strlen(TEXT_PREFIX));
+ $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
+ $value = $_POST['Valueid'][$option];
+ $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
+ }
+ }
+ // adjust for multi value for one option
+ elseif (is_array($value)) {
+ foreach($value as $k=>$v)
+ $tmp_value[$k] = htmlspecialchars(stripslashes($v), ENT_QUOTES);
+
+ $attr_value = implode(',',$tmp_value);
+ }
+
+ if (!$blank_value) {
+ $this->contents[$products_id_string]['attributes'][$option] = $value; //(is_array($value)? implode(',',$value) : $value);
+ // insert into database
+ if (tep_session_is_registered('customer_id'))
+ tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id,products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (is_array($value)? 0 : $value) . "', '" . tep_db_input($attr_value) . "')");
+ }
+ }
+ }
}
- }
-
- if (!$blank_value) {
- $this->contents[$products_id_string]['attributes'][$option] = $value;
- // insert into database
- if (tep_session_is_registered('customer_id'))
- tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id,products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')");
- }
- }
- }
- }
- // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
- $this->cartID = $this->generate_cart_id();
+ }
+ // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
+ $this->cartID = $this->generate_cart_id();
}
}
@@ -351,29 +369,29 @@
$product_obj=product::get_item($pid);
if($product_obj !=false){
- $prid = $product_obj->products_id;
+ $prid = $product_obj->products_id;
+ // var_dump($products_id);
+ $res_price=$price->get_products_price($products_id,(int)$product['qty']);
+ $special=( ($res_price['price_ht'] !=$res_price['sprice_ht'] && $res_price['sprice_ht']>0)? true : false);
- $res_price=$price->get_products_price($products_id,(int)$product['qty']);
- $special=( ($res_price['price_ht'] !=$res_price['sprice_ht'] && $res_price['sprice_ht']>0)? true : false);
-
- $products_array[] = array('id' => $products_id,
- 'name' => $product_obj->products_name,
- 'type' => $product_obj->type,
- 'model' => $product_obj->products_model,
- 'image' => $product_obj->products_image,
- 'track_stock' => $product_obj->track_stock,
- 'price' => (($special)? $res_price['sprice_ht'] :$res_price['price_ht']),
- 'quantity' => $product['qty'],
- 'weight' => $product_obj->products_weight +( isset($this->contents[$products_id]['attributes']) ?(float)product::get_attributes_weight($products_id, $this->contents[$products_id]['attributes']) : 0) ,
- 'final_price' => (($special)? $res_price['sprice_ht'] :$res_price['price_ht']),
- 'final_price_ttc' => (($special)? $res_price['sprice_ttc'] :$res_price['price_ttc']),
- 'total_line' => $res_price['total_line'],
- 'total_line_ttc' => $res_price['total_line_ttc'],
- 'tax_class_id' => $product_obj->products_tax_class_id,
- 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''),
- 'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : ''),
- 'special_class'=> (isset($this->contents[$products_id]['special_class'])? $this->contents[$products_id]['special_class'] : ''),
- );
+ $products_array[] = array('id' => $products_id,
+ 'name' => $product_obj->products_name,
+ 'type' => $product_obj->type,
+ 'model' => $product_obj->products_model,
+ 'image' => $product_obj->products_image,
+ 'track_stock' => $product_obj->track_stock,
+ 'price' => (($special)? $res_price['sprice_ht'] :$res_price['price_ht']),
+ 'quantity' => $product['qty'],
+ 'weight' => $product_obj->products_weight +( isset($this->contents[$products_id]['attributes']) ?(float)product::get_attributes_weight($products_id, $this->contents[$products_id]['attributes']) : 0) ,
+ 'final_price' => (($special)? $res_price['sprice_ht'] :$res_price['price_ht']),
+ 'final_price_ttc' => (($special)? $res_price['sprice_ttc'] :$res_price['price_ttc']),
+ 'total_line' => $res_price['total_line'],
+ 'total_line_ttc' => $res_price['total_line_ttc'],
+ 'tax_class_id' => $product_obj->products_tax_class_id,
+ 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''),
+ 'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : ''),
+ 'special_class'=> (isset($this->contents[$products_id]['special_class'])? $this->contents[$products_id]['special_class'] : ''),
+ );
}
}
return $products_array;
Modified: branches/2.1.1/catalog/includes/classes/drivers/data/product.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/drivers/data/product.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/includes/classes/drivers/data/product.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -512,36 +512,40 @@
if (is_array($attributes) && count($attributes)>0) {
reset($attributes);
- while (list($option, $value) = each($attributes)) {
- $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
- $attribute_price = tep_db_fetch_array($attribute_price_query);
+ while (list($option, $Mvalue) = each($attributes)) {
+ $loop = (strpos($Mvalue,',')? explode(',',$Mvalue) : array($Mvalue) );
+ foreach($loop as $value) {
+ $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
+ $attribute_price = tep_db_fetch_array($attribute_price_query);
- switch($attribute_price['price_prefix']){
- case 'x':
- $show_price = 0.0 + ( $price_prod * (float)$attribute_price['options_values_price']) - $price_prod ;
- break;
- case '/':
- if($attribute_price['options_values_price']<=0) $attribute_price['options_values_price'] = 1;
- $show_price = 0.0 + $price_prod - ($price_prod / $attribute_price['options_values_price']);
- break;
- case '+':
- $show_price = 0.0 + $attribute_price['options_values_price'];
- break;
- case '-':
- $show_price = 0.0 - $attribute_price['options_values_price'];
- break;
- // case '=':
- // $show_price = 0.0 + $attribute_price['options_values_price'];
- // break;
- default:
- $show_price = 0.0 ;
+
+ switch($attribute_price['price_prefix']){
+ case 'x':
+ $show_price = 0.0 + ( $price_prod * (float)$attribute_price['options_values_price']) - $price_prod ;
+ break;
+ case '/':
+ if($attribute_price['options_values_price']<=0) $attribute_price['options_values_price'] = 1;
+ $show_price = 0.0 + $price_prod - ($price_prod / $attribute_price['options_values_price']);
+ break;
+ case '+':
+ $show_price = 0.0 + $attribute_price['options_values_price'];
+ break;
+ case '-':
+ $show_price = 0.0 - $attribute_price['options_values_price'];
+ break;
+ // case '=':
+ // $show_price = 0.0 + $attribute_price['options_values_price'];
+ // break;
+ default:
+ $show_price = 0.0 ;
+ }
+
+ if ($show_price > 0)
+ $attrib_price += $show_price;
+ else
+ $attrib_price -= $show_price;
}
-
- if ($show_price > 0)
- $attrib_price += $show_price;
- else
- $attrib_price -= $show_price;
}
}
return self::$array_data[$products_id]->product_attribut_price[$uprid] =$attrib_price;
Modified: branches/2.1.1/catalog/includes/classes/pad_base.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/pad_base.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/includes/classes/pad_base.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -428,7 +428,8 @@
$field .= tep_draw_pull_down_radio('id['.$array['oid'].']','id_'.$array['oid'],$array['ovals'],$selected,$js);
break;
case '4': //Checkbox
- $field .= tep_draw_pull_down_checkbox('id['.$array['oid'].']','id_'.$array['oid'],$array['ovals'],$selected,$js);
+var_dump(__FILE__ . __LINE__ );
+ $field .= tep_draw_pull_down_checkbox('id['.$array['oid'].'][]','id_'.$array['oid'],$array['ovals'],$selected,$js);
break;
case '1': // Select
default:
Modified: branches/2.1.1/catalog/includes/functions/general.php
===================================================================
--- branches/2.1.1/catalog/includes/functions/general.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/includes/functions/general.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -578,18 +578,13 @@
if ( (is_array($params)) && (!strstr($prid, '{')) ) {
while (list($option, $value) = each($params)) {
//CLR 030714 Add processing around $value. This is needed for text attributes.
- $uprid = $uprid . '{' . $option . '}' . htmlspecialchars(stripslashes(trim($value)), ENT_QUOTES);
+ $uprid = $uprid . '{' . $option . '}' . (is_array($value)? implode(',',$value) : htmlspecialchars(stripslashes(trim($value)) , ENT_QUOTES) );
}
- } else {
- $uprid = htmlspecialchars(stripslashes($uprid), ENT_QUOTES);
- }
+ }
+// else {
+// $uprid = htmlspecialchars(stripslashes(trim($value)) , ENT_QUOTES);
+// }
- if ( (is_array($params)) && (!strstr($prid, '{')) ) {
- while (list($option, $value) = each($params)) {
- $uprid = $uprid . '{' . $option . '}' . $value;
- }
- }
-
return $uprid;
}
Modified: branches/2.1.1/catalog/includes/modules/upcoming_products.php
===================================================================
--- branches/2.1.1/catalog/includes/modules/upcoming_products.php 2012-09-25 19:25:14 UTC (rev 4612)
+++ branches/2.1.1/catalog/includes/modules/upcoming_products.php 2012-09-28 16:52:21 UTC (rev 4613)
@@ -24,7 +24,7 @@
$DB=Database::getInstance();
$languages_id=$page->the_var('languages_id');
- $expected_query = $DB->query($sql="select distinct p.products_id, products_date_available as date_expected from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where to_days(products_date_available) >= to_days(now()) and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_id = pd.products_id and p.products_status='1' and c.categories_status = '1' and pd.language_id = '" . (int)$languages_id . "' order by " . $page->_conf_value('EXPECTED_PRODUCTS_FIELD') . " ASC limit " . $page->_conf_value('MAX_DISPLAY_UPCOMING_PRODUCTS'));
+ $expected_query = $DB->query($sql="select distinct p.products_id, products_date_available as date_expected from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where to_days(products_date_available) >= to_days(now()) and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_id = pd.products_id and p.products_status='1' and c.categories_status = '1' and pd.language_id = '" . (int)$languages_id . "' order by date_expected ASC limit " . $page->_conf_value('MAX_DISPLAY_UPCOMING_PRODUCTS'));
if ($expected_query->__get('NumRows') > 0) return $expected_query;
else return false;
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_confi...
[truncated message content] |
|
From: <os...@us...> - 2012-10-04 18:58:00
|
Revision: 4616
http://oscss.svn.sourceforge.net/oscss/?rev=4616&view=rev
Author: oscim
Date: 2012-10-04 18:57:52 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
Suite travail sur la gestion du stock et ajustement du FrontEnd
Correction module order total pour les calcul sur le panier
amelioration configuration des produits
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/header.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/common/classes/shoppingCart.php
branches/2.1.1/catalog/includes/classes/Stock.php
branches/2.1.1/catalog/includes/classes/checkout_process.php
branches/2.1.1/catalog/includes/classes/drivers/data/product.php
branches/2.1.1/catalog/includes/classes/order_total.php
branches/2.1.1/catalog/includes/modules/order_total/ot_subtotal.php
branches/2.1.1/catalog/includes/modules/order_total/ot_tax.php
branches/2.1.1/catalog/includes/modules/order_total/ot_total.php
branches/2.1.1/catalog/includes/triggers/cart_line.inc
branches/2.1.1/catalog/templates/defaut/cfg/init.php
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-10-04 18:57:52 UTC (rev 4616)
@@ -50,12 +50,6 @@
<fieldset class="block_field">
<ul>
- <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
- <li class="block_input">
- <label class="inline" for="products_date_available" title="<?php echo __('@products text date available help') ?>"><?php echo __('@products text date available'); ?></label>
- <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('@products display date format'); ?>
- </li>
- <?php endif; ?>
<?php if(products::CheckClassProduct('CLASS_MODELE')): ?>
<li class="block_input">
<label class="inline" for="products_model" title="<?php echo __('@products text model help'); ?>"><?php echo __('@products text model'); ?></label>
@@ -258,8 +252,18 @@
<fieldset class="block_field">
<dl>
<dd class="block_input">
- <label><?php echo __('@products text status'); ?></label>
- <?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __('@products text status on') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('@products text status off'); ?>
+
+ <p>
+ <label><?php echo __('@products text status'); ?></label>
+ <?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __('@products text status on') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('@products text status off'); ?>
+ </p>
+
+ <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
+ <p>
+ <label class="inline" for="products_date_available" title="<?php echo __('@products text date available help') ?>"><?php echo __('@products text date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10" style="min-width:30px;" ') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('@products display date format'); ?>
+ </p>
+ <?php endif; ?>
</dd>
Modified: branches/2.1.1/catalog/admin/includes/header.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/header.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/admin/includes/header.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -134,9 +134,9 @@
<?php if( ($col=call_user_func(array(tep_extrac_querystring(JSONSTATMENT,'type'), 'tep_get_modele'))) && is_array($col)): ?>
"aoColumns": [
<?php $i=0; foreach($col as $k=>$sort):
- if($sort !=false) echo ' { "bSortable": true },'."\n";
- else echo ' { "bSortable": false },'."\n";
- $i++; endforeach; ?>
+ echo ' { "bSortable": '.(($sort !=false) ? 'true' : 'false' ).' },'."\n";
+ $i++; endforeach;
+ ?>
],
<?php endif; ?>
<?php if(defined('AJAXSTATMENTDETAIL')) : ?>
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypeproduct.txt 2012-10-04 18:57:52 UTC (rev 4616)
@@ -51,5 +51,5 @@
//
$lang['EXPECTED_PRODUCTS_FIELD_S']="Produits en attente (date de disponibilité)" ;
-$lang['EXPECTED_PRODUCTS_FIELD_L']="Comportement à appliquer aux produits qui contiennent une date de disponibilité et dont le l'état est inactif. Dans le cas de la méthode 'pre-commande', le comportement proposera d'acheter le produit. Dans le cas de publication, le produits ne sera visible sur la boutique qu'après la date révolu " ;
+$lang['EXPECTED_PRODUCTS_FIELD_L']="Comportement à appliquer aux produits qui contiennent une date de disponibilité et dont le l'état est inactif. Dans le cas de la méthode 'pre-commande', le comportement proposera d'acheter le produit. Dans le cas de 'publication', le produits ne sera visible sur la boutique qu'après la date révolue " ;
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-10-04 18:57:52 UTC (rev 4616)
@@ -166,7 +166,36 @@
$lang['text legend price']="Prix" ;
$lang['text legend image']="Image" ;
+ $lang['@products text reel status view and cart']="Comportement et visibilité" ;
+ $lang['@products text hors stock buy is possible']="Produit visible - Achat hors stock possible" ;
+ $lang['@products text hors stock buy is not possible']="Achat hors stock impossible" ;
+ $lang['@products text stock ok hors stock buy is possible']="Visible - Achat possible - Stock ok - Hors stock possible" ;
+ $lang['@products text stock ok hors stock buy is not possible']="Visible - Achat possible - Stock ok - dans la limite du stock " ;
+ $lang['@products text buy is possible and no track stock']="Visible - Achat possible - Pas de suivi de stock" ;
+ $lang['@products text stock epuise']="Visible - Stock épuisé. Achat impossible" ;
+ $lang['@products text achat dans la limite du stock']="Visible - Achat possible dans la limite du stock" ;
+ $lang['@products text no view by date available']="Produit en attente de la date de disponibilité" ;
+ $lang['@products text view but no buy by date available']="Produit visible, achat impossible bloqué par la date de disponibilité " ;
+ $lang['@products text view but no buy by date available for reassort']="Produit visible, achat impossible en attente de reassort, annoncé avec la date de disponibilité" ;
+ $lang['@products text no view buy inactive']="Produit inactif" ;
+ $lang['@products text inactive but activate after date avaible']="Produit inactif, la date de disponibilité est aussi inactive" ;
+ $lang['@products text config hors stock buy is possible']=" - Achat hors stock possible" ;
+ $lang['@products text config hors stock buy is not possible']=" - Dans la limite du stock" ;
+
+ $lang['@products text alert stock']=" - Alerte seuil du stock" ;
+ $lang['@products text stock epuise']=" - Stock epuisé" ;
+ $lang['@products text stock ok']=" - Stock ok" ;
+
+ $lang['@products text mode commande and suivi']="Sur commande" ;
+ $lang['text legend price']="Prix" ;
+ $lang['text legend image']="Image" ;
+ $lang['text legend image']="Image" ;
+ $lang['text legend price']="Prix" ;
+ $lang['text legend image']="Image" ;
+
+
+
/* MessageStack */
$lang['@product error in update process']="Erreur lors de l'enregsitrement du produit" ;
$lang['@product success in update process']="Mise à jour reussie" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/admin/includes/modules/configuration/datatypeproduct.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -76,6 +76,8 @@
if(tep_not_null($gID) ){
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+ if(is_object($list))
+ $list = array($list);
foreach($list as $row) {
@@ -265,7 +267,7 @@
// $gID = 1;
$li=sqlconfiguration::fetch(array('group_id'=> (int)self::$gID), true);
-// var_dump($li);
+
if(is_object($li))
$li = array($li);
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -273,6 +273,8 @@
'sort'=>true,
'alias'=>'track_stock',
'text'=>__('products table heading track_stock'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
);
}
@@ -1225,6 +1227,8 @@
}
+
+
/**
@brief format db value for display page
@param $_query ressource db sql
@@ -1284,17 +1288,19 @@
$item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
foreach(self::$InitInfo['modele']['listing'] as $k=>$row){
+
if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
elseif($k == 'title') $ord[$k]= '<a rel="'.tep_href_link('document.php', 'mod=img&typ=product&w=200&h=200&id='.$item['id']) .'" class="screenshot" href="#" title="" onclick="return false;">'.$item['title'].'</a>';
elseif($k == 'status') $ord[$k]=self::RowStatus($item);
+ elseif($k == 'track_stock') $ord[$k]=status_name('track_stock' , $item['track_stock']);
// elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);
- elseif(in_array($k , array('added', 'modified' ,'available')) ) $ord[$k]=tep_date_short($item[$k]);
- /* DEB Sub module add col */
- elseif( in_array($k, $external) ){
- $class = self::$modules->modules[$process[$k]];
- $ord[$k]= $class->formatdbvalue($k, $item);
- }
- /* END Sub module add col */
+ elseif(in_array($k , array('added', 'modified' ,'available')) ) $ord[$k]=( (strlen($item[$k])==19 && !in_array($item[$k] ,array('1000-01-01 00:00:00', '0000-00-00 00:00:00' )) )? tep_date_short($item[$k]) : '' );
+ /* DEB Sub module add col */
+ elseif( in_array($k, $external) ){
+ $class = self::$modules->modules[$process[$k]];
+ $ord[$k]= $class->formatdbvalue($k, $item);
+ }
+ /* END Sub module add col */
else $ord[$k]=$item[$k];
}
Modified: branches/2.1.1/catalog/common/classes/shoppingCart.php
===================================================================
--- branches/2.1.1/catalog/common/classes/shoppingCart.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/common/classes/shoppingCart.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -174,70 +174,83 @@
@param $notify boolean
@param $special_class string , permet d'ajouter element supplementaire , class de promo,
*/
- public function add_cart($products_id, $qty = '1', $attributes = '', $notify = true,$special_class='') {
+ public function add_cart($products_id, $qty = '1', $attributes = array(), $notify = true,$special_class='') {
global $new_products_id_in_cart, $customer_id;
+ if(!is_array($attributes))
+ $attributes = array();
$products_id_string = tep_get_uprid($products_id, $attributes);
$products_id = tep_get_prid($products_id_string);
- if (is_numeric($products_id) && is_numeric($qty)) {
- $product_obj=product::get_item($products_id);
+ if (!is_numeric($products_id) || !is_numeric($qty))
+ continue;
- if($product_obj !=false){
- if ($notify == true) {
- $new_products_id_in_cart = $products_id;
- tep_session_register('new_products_id_in_cart');
- }
+ $product_obj=product::get_item($products_id);
- if ($this->in_cart($products_id_string)==true) {
- $this->update_quantity($products_id_string, $qty, $attributes);
- }
- else {
- $this->contents[$products_id_string] = array('qty' => $qty);
- if(!empty($special_class)) $this->contents[$products_id_string]['special_class'] = $special_class;
- // insert into database
- if (tep_session_is_registered('customer_id')){
- tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $qty . "', '" . date('Ymd') . "')");
+ if(!$product_obj)
+ continue;
- if (is_array($attributes)) {
- reset($attributes);
- while (list($option, $value) = each($attributes)) {
- $attr_value = NULL;
- $blank_value = FALSE;
- if (strstr($option, TEXT_PREFIX)) {
- if (trim($value) == NULL) {
- $blank_value = TRUE;
- } else {
- $option = substr($option, strlen(TEXT_PREFIX));
- $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
- $value = $_POST['Valueid'][$option];
- $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
- }
- }
- // adjust for multi value for one option
- elseif (is_array($value)) {
- foreach($value as $k=>$v)
- $tmp_value[$k] = htmlspecialchars(stripslashes($v), ENT_QUOTES);
- $attr_value = implode(',',$tmp_value);
- }
-
- if (!$blank_value) {
- $this->contents[$products_id_string]['attributes'][$option] = $value; //(is_array($value)? implode(',',$value) : $value);
- // insert into database
- if (tep_session_is_registered('customer_id'))
- tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id,products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (is_array($value)? 0 : $value) . "', '" . tep_db_input($attr_value) . "')");
- }
+ if(Stock::check_inline(array('quantity'=>$qty, 'id'=>$products_id, 'track_stock'=>$product_obj->track_stock, 'attributes'=>$attributes)) == true ){
+ $current = tep_get_products_stock( (int)$products_id,(array)$attributes );
+ //force qty if not enough stock
+ $qty = $current;
+ }
+
+
+
+ if ($notify == true) {
+ $new_products_id_in_cart = $products_id;
+ tep_session_register('new_products_id_in_cart');
+ }
+
+ if ($this->in_cart($products_id_string)==true) {
+ $this->update_quantity($products_id_string, $qty, $attributes);
+ }
+ else {
+ $this->contents[$products_id_string] = array('qty' => $qty);
+ if(!empty($special_class)) $this->contents[$products_id_string]['special_class'] = $special_class;
+ // insert into database
+ if (tep_session_is_registered('customer_id')){
+ tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $qty . "', '" . date('Ymd') . "')");
+
+ if (is_array($attributes)) {
+ reset($attributes);
+ while (list($option, $value) = each($attributes)) {
+ $attr_value = NULL;
+ $blank_value = FALSE;
+ if (strstr($option, TEXT_PREFIX)) {
+ if (trim($value) == NULL) {
+ $blank_value = TRUE;
+ } else {
+ $option = substr($option, strlen(TEXT_PREFIX));
+ $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
+ $value = $_POST['Valueid'][$option];
+ $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
}
}
+ // adjust for multi value for one option
+ elseif (is_array($value)) {
+ foreach($value as $k=>$v)
+ $tmp_value[$k] = htmlspecialchars(stripslashes($v), ENT_QUOTES);
+
+ $attr_value = implode(',',$tmp_value);
+ }
+
+ if (!$blank_value) {
+ $this->contents[$products_id_string]['attributes'][$option] = $value; //(is_array($value)? implode(',',$value) : $value);
+ // insert into database
+ if (tep_session_is_registered('customer_id'))
+ tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id,products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (is_array($value)? 0 : $value) . "', '" . tep_db_input($attr_value) . "')");
+ }
}
}
- // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
- $this->cartID = $this->generate_cart_id();
- }
+ }
+ }
+ // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
+ $this->cartID = $this->generate_cart_id();
- }
}
/**
@@ -246,40 +259,47 @@
@param $quantity int
@param $attributes string
*/
- public function update_quantity($products_id, $quantity = '', $attributes = '') {
+ private function update_quantity($products_id, $quantity = '', $attributes = '') {
global $customer_id;
$products_id_string = tep_get_uprid($products_id, $attributes);
$products_id = tep_get_prid($products_id_string);
- if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity)) {
- $this->contents[$products_id_string] = array('qty' => $quantity);
- // update database
- if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "'");
- if (is_array($attributes)) {
- reset($attributes);
- while (list($option, $value) = each($attributes)) {
- $attr_value = NULL;
- $blank_value = FALSE;
- if (strstr($option, TEXT_PREFIX)) {
- if (trim($value) == NULL) {
- $blank_value = TRUE;
- } else {
- $option = substr($option, strlen(TEXT_PREFIX));
- $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
- $value = (isset($_POST['Valueid'][$products_id_string][$option])? $_POST['Valueid'][$products_id_string][$option]: $option); // PRODUCTS_OPTIONS_VALUE_TEXT_ID;
- $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
- }
- }
+ if (!is_numeric($products_id) || !isset($this->contents[$products_id_string]) || !is_numeric($quantity))
+ return false;
- if (!$blank_value) {
- $this->contents[$products_id_string]['attributes'][$option] = $value;
- // update database
- if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "', products_options_value_text = '" . tep_db_input($attr_value) . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "'");
- }
- }
- }
- }
+ $this->contents[$products_id_string] = array('qty' => $quantity);
+ // update database for known customers
+ if (tep_session_is_registered('customer_id'))
+ tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "'");
+
+
+ if (is_array($attributes)) {
+ reset($attributes);
+ while (list($option, $value) = each($attributes)) {
+ $attr_value = NULL;
+ $blank_value = FALSE;
+ if (strstr($option, TEXT_PREFIX)) {
+ if (trim($value) == NULL) {
+ $blank_value = TRUE;
+ } else {
+ $option = substr($option, strlen(TEXT_PREFIX));
+ $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
+ $value = (isset($_POST['Valueid'][$products_id_string][$option])? $_POST['Valueid'][$products_id_string][$option]: $option); // PRODUCTS_OPTIONS_VALUE_TEXT_ID;
+ $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
+ }
+ }
+
+ if (!$blank_value) {
+ $this->contents[$products_id_string]['attributes'][$option] = $value;
+
+ // update database for known customers
+ if (tep_session_is_registered('customer_id'))
+ tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "', products_options_value_text = '" . tep_db_input($attr_value) . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "'");
+ }
+ }
+ }
+
}
@@ -425,21 +445,19 @@
reset($this->contents);
if(strpos(TYPE_VIRTUAL_PRODUCTS,',')>0)
- $virt=explode(',',TYPE_VIRTUAL_PRODUCTS);
+ $virt=explode(',',TYPE_VIRTUAL_PRODUCTS);
elseif(strpos(TYPE_VIRTUAL_PRODUCTS,';')>0)
- $virt=explode(';',TYPE_VIRTUAL_PRODUCTS);
+ $virt=explode(';',TYPE_VIRTUAL_PRODUCTS);
else
- $virt = array();
+ $virt = array();
foreach($this->get_products() as $row){
- if(in_array($row['type'],$virt ) )
- $array_content_type[] = 'virtual';
- else
- $array_content_type[] = 'physical';
-
-
- }
+ if(in_array($row['type'],$virt ) )
+ $array_content_type[] = 'virtual';
+ else
+ $array_content_type[] = 'physical';
+ }
}
if(in_array('virtual',$array_content_type) && in_array('physical',$array_content_type)) $this->content_type = 'mixed';
@@ -448,25 +466,25 @@
if ( (_cst_bool('DOWNLOAD_ENABLED')) && ($this->count_contents() > 0) ) {
reset($this->contents);
while (list($products_id, ) = each($this->contents)) {
- if (isset($this->contents[$products_id]['attributes'])) {
- reset($this->contents[$products_id]['attributes']);
- while (list(, $value) = each($this->contents[$products_id]['attributes'])) {
- $virtual_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad where pa.products_id = '" . (int)$products_id . "' and pa.options_values_id = '" . (int)$value . "' and pa.products_attributes_id = pad.products_attributes_id");
- $virtual_check = tep_db_fetch_array($virtual_check_query);
+ if (isset($this->contents[$products_id]['attributes'])) {
+ reset($this->contents[$products_id]['attributes']);
+ while (list(, $value) = each($this->contents[$products_id]['attributes'])) {
+ $virtual_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad where pa.products_id = '" . (int)$products_id . "' and pa.options_values_id = '" . (int)$value . "' and pa.products_attributes_id = pad.products_attributes_id");
+ $virtual_check = tep_db_fetch_array($virtual_check_query);
- if ($virtual_check['total'] > 0) {
- switch ($this->content_type) {
- case 'mixed':
- case 'physical':
- $this->content_type = 'mixed';
- break;
- default:
- $this->content_type = 'virtual';
- break;
- }
- }
- }
- }
+ if ($virtual_check['total'] > 0) {
+ switch ($this->content_type) {
+ case 'mixed':
+ case 'physical':
+ $this->content_type = 'mixed';
+ break;
+ default:
+ $this->content_type = 'virtual';
+ break;
+ }
+ }
+ }
+ }
}
}
@@ -491,7 +509,7 @@
global $page,$cart,$languages_id;
if( ($order_total_modules=$page->return_object('order_total_modules')) ===false){
- $order_total_modules = new order_total;
+ $order_total_modules = new order_total();
$page->add_object('order_total_modules',$order_total_modules);
}
$this->otm=$order_total_modules;
@@ -613,10 +631,7 @@
$this->init_ot();
$this->ListTotal = strip_tags($this->show_total());
- foreach($this->otm->_extents('show_list_total') as $k=>$mod){
-
- $list[]=$mod;
- }
+ $list = $this->otm->_extents('show_list_total');
return $list;
}
Modified: branches/2.1.1/catalog/includes/classes/Stock.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/Stock.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/includes/classes/Stock.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -31,7 +31,7 @@
@fn check_inline($product)
@brief Control d'une ligne de stock, utilisable dans les boucle produits
la aleur de stock fournis correspond à la demande de destock
- @param $product array (quantity, id, track_stock, attributes)
+ @param $product array (quantity, id, track_stock, attributes, current_quantity='')
@return bool
false = ok
true = alert
@@ -39,27 +39,33 @@
public static function check_inline($product){
if( !_cst_bool('STOCK_CHECK') )
return false;
-
+// print_r($product);
+// exit;
$attributes= (is_array($product['attributes']) ? $product['attributes'] : array() );
self::$marck=0;
+ if(isset($product['current_quantity']) )
+ $current = $product['current_quantity'];
+ else
+ $current = tep_get_products_stock( (int)$product['id'],$attributes);
- switch($product['track_stock']) {
+ switch( (int)$product['track_stock']) {
case 0: /// no check stock
break;
case 2: /// no check stock , product dispo sur commande
self::$marck=1;
break;
case 3: /// Limited
- if( (tep_get_products_stock($product['id'],$attributes) - $product['quantity'] ) < 0){
+ if( ($current - $product['quantity'] ) < 0){
self::$marck=3;
return true;
}
break;
case 1: /// check stock
default:
- self::$marck=( ((tep_get_products_stock($product['id'],$attributes) - $product['quantity'] ) < 0)? 2 : 0);
+ self::$marck=( (($current - $product['quantity'] ) < 0)? 2 : 0);
}
- return (in_array(self::$marck, array(2,1) ) )? true : false;
+
+ return (in_array(self::$marck, array(2,1) ) ? true : false );
}
/**
@@ -70,7 +76,7 @@
public static function mark_inline(){
if(self::$marck==2) return ' <span class="cart-line line outstock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
elseif(self::$marck==1) return ' <span class="cart-line line avaible">' . STOCK_MARK_PRODUCT_NO_STOCK . '</span>';
- elseif(self::$marck==3) return ' <span class="cart-line line limited">arg!!</span>';
+ elseif(self::$marck==3) return ' <span class="cart-line line limited">Max</span>';
else return ;
}
Modified: branches/2.1.1/catalog/includes/classes/checkout_process.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/checkout_process.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/includes/classes/checkout_process.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -365,8 +365,7 @@
else
$products_stock_attributes= '';
-// var_dump($products_stock_attributes);
-// exit;
+
/**
Process class
meilleur vente
Modified: branches/2.1.1/catalog/includes/classes/drivers/data/product.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/drivers/data/product.php 2012-10-02 07:00:51 UTC (rev 4615)
+++ branches/2.1.1/catalog/includes/classes/drivers/data/product.php 2012-10-04 18:57:52 UTC (rev 4616)
@@ -218,13 +218,8 @@
$product['extra']=self::get_extra_product($content['products_id']);
- // boolean value If buy possible
- if(_cst_bool('STOCK_CHECK') && !_cst_bool('STOCK_ALLOW_CHECKOUT'))
- $product['action']['buy']=( ((int)$content['products_quantity']>0 && (int)$content['track_stock']===1) || (int)$content['track_stock']!=1)? 'true' : 'false';
- else
- $product['action']['buy']= 'true';
+ $product['action']['buy']= (!Stock::check_inline(array('quantity'=>1, 'id'=>$content['products_id'], 'track_stock'=>(int)$content['track_stock'], 'attributes'=>array(), 'current_quantity'=>(int)$content['products_quantity']))?'true':'false');
-
/*...
[truncated message content] |
|
From: <os...@us...> - 2012-10-20 14:17:28
|
Revision: 4624
http://oscss.svn.sourceforge.net/oscss/?rev=4624&view=rev
Author: oscim
Date: 2012-10-20 14:17:21 +0000 (Sat, 20 Oct 2012)
Log Message:
-----------
correction bug lors creation de compte public dans les enregistrement des champs extra de type public
correction coquille lors suppression d'un compte client sur les champs extra generic associ?\195?\169
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/modules/account/account_extra.php
branches/2.1.1/catalog/includes/classes/core_page/customer.php
Modified: branches/2.1.1/catalog/admin/includes/modules/account/account_extra.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/account/account_extra.php 2012-10-15 09:13:38 UTC (rev 4623)
+++ branches/2.1.1/catalog/admin/includes/modules/account/account_extra.php 2012-10-20 14:17:21 UTC (rev 4624)
@@ -70,6 +70,18 @@
return $actions;
}
+
+ public function deleteconfirm_account ($customers_id){
+ global $languages_id;
+
+ $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 and fields_special_mod='' order by ce.fields_group_class");
+
+ while($extra_fields = tep_db_fetch_array($extra_fields_query)){
+ tep_db_query($sql="DELETE from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id='" .(int) $customers_id."' AND fields_id='".$extra_fields['fields_id']."'");
+ }
+ }
+
+
/**
@brief methode call by sqlcustomer, and process after update master table customers
*/
@@ -133,12 +145,7 @@
return $contents;
}
- public function delete_account ($id){
- tep_db_query("delete from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . (int)$id);
- }
-
-
public static function get_extra_fields($customer_id,$languages_id){
// ne liste que les champs qui n'appartiennent pas a un modules precis
$extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_input_value, ce.fields_required_status, cei.fields_name,cei.fields_format as format, ce.fields_status, ce.fields_input_type from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_LABELS . " cei where ce.fields_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id." and fields_special_mod='' order by ce.fields_group_class");
Modified: branches/2.1.1/catalog/includes/classes/core_page/customer.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/core_page/customer.php 2012-10-15 09:13:38 UTC (rev 4623)
+++ branches/2.1.1/catalog/includes/classes/core_page/customer.php 2012-10-20 14:17:21 UTC (rev 4624)
@@ -222,40 +222,42 @@
tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created,customers_info_date_account_last_modified) values ('" . (int)$customer_id . "', '0', now(), now())");
- /**
- @brief extra fields sauf specifique admin
- */
- $extra_fields_query = tep_db_query("select ce.fields_id, fields_key, fields_required_email from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 and fields_admin !=1 ");
- while($extra_fields = tep_db_fetch_array($extra_fields_query)) {
- if(isset($resul['fields_' . $extra_fields['fields_id']])){
- $sql_data_array = array('customers_id' => (int)$customer_id,
- 'fields_id' => $extra_fields['fields_id'],
- 'value' => $resul['fields_' . $extra_fields['fields_id']]);
- }
- else {
- $sql_data_array = array('customers_id' => (int)$customer_id,
- 'fields_id' => $extra_fields['fields_id'],
- 'value' => '');
- /// value in list mutli
- if(isset($resul['fields_' . $extra_fields['fields_id'] . '_total'])){
- $is_add = false;
- for($i = 1; $i <= $resul['fields_' . $extra_fields['fields_id'] . '_total']; $i++) {
- if(isset($_POST['fields_' . $extra_fields['fields_id'] . '_' . $i])) {
- if($is_add) { $sql_data_array['value'] .= "\n"; }
- else { $is_add = true; }
- $sql_data_array['value'] .= $resul['fields_' . $extra_fields['fields_id'] . '_' . $i];
- }
- }
- }
- }
+ /**
+ @brief extra fields sauf specifique admin
+ */
+ $extra_fields_query = tep_db_query($s="select ce.fields_id, fields_key, fields_required_email from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 and fields_admin =3 AND fields_special_mod ='' ");
- tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array);
- $newcustomer[(isset($extra_fields['fields_key'])?$extra_fields['fields_key'] : 'fields_'.$extra_fields['fields_id'])]=$sql_data_array['value'];
- $newcustomer['extra'][]=array_merge($sql_data_array, array('email'=>$extra_fields['fields_required_email']) );
- }
+ while($extra_fields = tep_db_fetch_array($extra_fields_query)) {
+ if(isset($_POST['fields_' . $extra_fields['fields_id']])){
+ $sql_data_array = array('customers_id' => (int)$customer_id,
+ 'fields_id' => $extra_fields['fields_id'],
+ 'value' => tep_db_prepare_input($_POST['fields_' . $extra_fields['fields_id']]) );
+ }
+ else {
+ $sql_data_array = array('customers_id' => (int)$customer_id,
+ 'fields_id' => $extra_fields['fields_id'],
+ 'value' => '');
+ /// value in list mutli
+ if(isset($_POST['fields_' . $extra_fields['fields_id'] . '_total'])){
+ $is_add = false;
+ for($i = 1; $i <= $_POST['fields_' . $extra_fields['fields_id'] . '_total']; $i++) {
+ if(isset($_POST['fields_' . $extra_fields['fields_id'] . '_' . $i])) {
+ if($is_add) { $sql_data_array['value'] .= "\n"; }
+ else { $is_add = true; }
+ $sql_data_array['value'] .= tep_db_prepare_input($_POST['fields_' . $extra_fields['fields_id'] . '_' . $i]);
+ }
+ }
+ }
+ }
+ tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array);
+ $newcustomer[(isset($extra_fields['fields_key'])?$extra_fields['fields_key'] : 'fields_'.$extra_fields['fields_id'])]=$sql_data_array['value'];
+ $newcustomer['extra'][]=array_merge($sql_data_array, array('email'=>$extra_fields['fields_required_email']) );
+ }
+
+
}
else return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-25 15:20:56
|
Revision: 4637
http://oscss.svn.sourceforge.net/oscss/?rev=4637&view=rev
Author: oscim
Date: 2012-10-25 15:20:47 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
correction coquille
BO orders suite ajustement et ergonomie des livraisons
correction coquille sur la prise en charge des module et liaison entre module meme FO/BO
correction coquille sur l'enregsitrement class shipping lors d'une nouvelle commande
suppression enregistrement et traitement des colonne cc_ dans la table orders (deport dans module et table externe )
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/aca.php
branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php
branches/2.1.1/catalog/admin/includes/modules/configuration/modpayment.php
branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
branches/2.1.1/catalog/common/classes/order.php
branches/2.1.1/catalog/includes/classes/checkout_process.php
branches/2.1.1/catalog/includes/classes/payment.php
Modified: branches/2.1.1/catalog/admin/includes/classes/aca.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/aca.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/admin/includes/classes/aca.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -190,13 +190,20 @@
$file=trim($file);
$class=substr($file,0, strlen($file)-4 );
if (!empty($class)) {
+
+ if(is_dir(DIR_WS_MODULES . $folder.'/'.$class.'/'))
+ $folder_final =$folder . '/' . $class;
+ else
+ $folder_final =$folder;
+
+
//! NOTE: Retro compatibilite
- $filename=DIR_WS_INCLUDES .'languages/'. $language . '/modules/'.$folder.'/' . $file;
+ $filename=DIR_WS_INCLUDES .'languages/'. $language . '/modules/'.$folder_final.'/' . $file;
if(oscss_cstr::TestFile($filename)) include($filename);
// Includes language file if exists
- $oscss->pile_file_lang(DIR_WS_INCLUDES .'languages/'. $language . '/modules/'.$folder.'/' . $class.'.txt');
- if(!class_exists($class) && oscss_cstr::TestFile(DIR_WS_MODULES . $folder.'/' . $file)){
- include(DIR_WS_MODULES . $folder.'/' . $file);
+ $oscss->pile_file_lang(DIR_WS_INCLUDES .'languages/'. $language . '/modules/'.$folder_final.'/' . $class.'.txt');
+ if(!class_exists($class) && oscss_cstr::TestFile(DIR_WS_MODULES . $folder_final.'/' . $file)){
+ include(DIR_WS_MODULES . $folder_final.'/' . $file);
$list_mod[]=$class;
}
elseif(!class_exists($class) ) {
Modified: branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -120,8 +120,8 @@
/**
- @brief Active / inactive module shipping
- @note config BO / FO is identique
+ @brief Active / inactive module shipping
+ @note config BO / FO is identique
*/
case 'modules':
@@ -180,7 +180,7 @@
/**
- @brief Configuration Module shipping. Edit options current module
+ @brief Configuration Module shipping. Edit options current module
@note module BO is priority vs FO module
*/
case 'modules-edit':
@@ -210,7 +210,7 @@
/**
- @brief Configuration Module shipping. Save option current module
+ @brief Configuration Module shipping. Save option current module
*/
case 'modules-save':
foreach($_POST['configuration'] as $key=>$value) {
@@ -232,7 +232,7 @@
/**
@fn load_db_values($Id)
- @param $Id int
+ @param $Id int
@return array
*/
public function load_db_values($Id){
@@ -298,34 +298,35 @@
case 'modules';
return self::GetStatusMod( new objectInfo( array('status'=>(int)$_GET['flag'], 'content'=> new objectInfo(array('mod'=>(int)$_GET['mod'])) )) );
break;
-
+
default:
self::$list = $this->load_db_values('');
$zone =sqlgeozone::fetch(array('type'=>2), true);
-
+
if(is_object($zone))
self::$zone[] = $zone;
- else
+ else
self::$zone= $zone;
-
- foreach(scan(DIR_FS_CATALOG_MODULES.'shipping/') as $row){
+
+ foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/') as $row){
if( substr($row,-3) =='php'){
$class = substr($row,0, -4);
- self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
+ if(!isset(self::$module[$class]))
+ self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
}
}
- foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/') as $row){
+
+ foreach(scan(DIR_FS_CATALOG_MODULES.'shipping/') as $row){
if( substr($row,-3) =='php'){
$class = substr($row,0, -4);
- if(!isset(self::$module[$class]))
- self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
+ if(!isset(self::$module[$class]) )
+ self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
}
}
-
return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
}
}
Modified: branches/2.1.1/catalog/admin/includes/modules/configuration/modpayment.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/configuration/modpayment.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/admin/includes/modules/configuration/modpayment.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -173,7 +173,7 @@
break;
/**
- @brief Configuration Module shipping. Edit options current module
+ @brief Configuration Module shipping. Edit options current module
@note module BO is priority vs FO module
*/
case 'modules-edit':
@@ -184,7 +184,7 @@
$ModCurr = $Mod->content;
- if(/* !is_object($ModCurr) ||*/ !$ModCurr->check() )
+ if(/* !is_object($ModCurr) ||*/ !$ModCurr->check() )
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#error-noloadmod'));
$i=0;
@@ -226,7 +226,7 @@
/**
@fn load_db_values($Id)
- @param $Id int
+ @param $Id int
@return array
*/
public function load_db_values($Id){
@@ -293,17 +293,17 @@
case 'modules';
return self::GetStatusMod( new objectInfo( array('status'=>(int)$_GET['flag'], 'content'=> new objectInfo(array('mod'=>(int)$_GET['mod'])) )) );
break;
-
+
default:
self::$list = $this->load_db_values('');
$zone =sqlgeozone::fetch(array('type'=>1), true);
-
+
if(is_object($zone))
self::$zone[] = $zone;
- else
+ else
self::$zone= $zone;
-
+
foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'payment/') as $row){
if( substr($row, 0,1) !='.' && substr($row, -1) !='~' && substr($row,-4) !='html'){
$class = substr($row,0, -4);
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -146,7 +146,7 @@
-
+
switch(self::$action){
case 'listing':
@@ -155,87 +155,87 @@
Just for Edit listing
*/
self::$allfields = array(
- 'o.orders_id' => array(
- 'sort'=>true,
- 'alias'=>'id',
+ 'o.orders_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
'text'=>__('orders table heading order id'),
- 'width'=>'2%',
+ 'width'=>'2%',
'class'=>'tcenter',
- ),
-// 'CONCAT(o.orders_prefix, o.orders_id) ' => array(
-// 'sort'=>true,
-// 'alias'=>'ref',
+ ),
+// 'CONCAT(o.orders_prefix, o.orders_id) ' => array(
+// 'sort'=>true,
+// 'alias'=>'ref',
// 'text'=>__('orders table heading order ref'),
-// 'width'=>'5%',
+// 'width'=>'5%',
// 'class'=>'tcenter',
// 'default'=>true,
-// ),
- // 'o.orders_prefix' => __('orders table heading order prefix'),
- 'o.customers_id' => array(
- 'sort'=>true,
- 'text'=> __('orders table heading customers'),
- 'width'=>'20%',
+// ),
+ // 'o.orders_prefix' => __('orders table heading order prefix'),
+ 'o.customers_id' => array(
+ 'sort'=>true,
+ 'text'=> __('orders table heading customers'),
+ 'width'=>'20%',
'class'=>'tleft',
'default'=>true,
),
- // 'o.customers_name' => __('orders table heading customers name'),
- 'ot.text' => array(
- 'sort'=>true,
- 'alias'=>'order_total',
- 'text'=>__('orders table heading order total'),
+ // 'o.customers_name' => __('orders table heading customers name'),
+ 'ot.text' => array(
+ 'sort'=>true,
+ 'alias'=>'order_total',
+ 'text'=>__('orders table heading order total'),
'default'=>true,
),
- 'o.currency' => array(
- 'sort'=>true,
- 'text'=>__('orders table heading currency'),
+ 'o.currency' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading currency'),
'default'=>true,
),
- // 'o.currency_value' => array(
- // 'sort'=>true,
- // // 'alias'=>'order_total',
- // 'text'=>__('orders table heading order_total'),
- // 'width'=>'10%',
+ // 'o.currency_value' => array(
+ // 'sort'=>true,
+ // // 'alias'=>'order_total',
+ // 'text'=>__('orders table heading order_total'),
+ // 'width'=>'10%',
// 'class'=>'tcenter',
// ),
- 'o.date_purchased' => array(
- 'sort'=>true,
- 'text'=>__('orders table heading date purchased'),
- 'width'=>'10%',
+ 'o.date_purchased' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading date purchased'),
+ 'width'=>'10%',
'class'=>'tcenter',
'default'=>true,
),
- 'o.last_modified' => array(
- 'sort'=>true,
- 'text'=>__('orders table heading last modified'),
- 'width'=>'10%',
+ 'o.last_modified' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading last modified'),
+ 'width'=>'10%',
'class'=>'tcenter',
),
- 'o.payment_method' => array(
- 'sort'=>true,
- 'text'=>__('orders table heading payment'),
- 'width'=>'12%',
+ 'o.payment_method' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading payment'),
+ 'width'=>'12%',
'class'=>'tcenter',
),
- 's.status_name' =>array(
- 'sort'=>true,
- 'alias'=>'orders_status_name',
- 'text'=> __('orders table heading status'),
- 'width'=>'10%',
+ 's.status_name' =>array(
+ 'sort'=>true,
+ 'alias'=>'orders_status_name',
+ 'text'=> __('orders table heading status'),
+ 'width'=>'10%',
'class'=>'tcenter',
'default'=>true,
),
- 'o.ip_address' => __('orders table heading ip_address'),
- 'o.total_weight' => __('orders table heading total_weight'),
- 'o.facture_id' => __('orders table heading facture_id'),
- 'o.class_payment' => __('orders table heading class_payment'),
- 'o.class_shipping' => __('orders table heading class_shipping'),
- // 'p.products_ordered' => __('orders table heading purchased'),
+ 'o.ip_address' => __('orders table heading ip_address'),
+ 'o.total_weight' => __('orders table heading total_weight'),
+ 'o.facture_id' => __('orders table heading facture_id'),
+ 'o.class_payment' => __('orders table heading class_payment'),
+ 'o.class_shipping' => __('orders table heading class_shipping'),
+ // 'p.products_ordered' => __('orders table heading purchased'),
);
-
+
/**
- @remarks Construct all list , fields , th/td
+ @remarks Construct all list , fields , th/td
*/
self::$InitInfo['theader']['listing']=array(
0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
@@ -250,7 +250,7 @@
// min fields and not view directly colonne fields
$listfield = 'o.orders_id , o.orders_prefix, s.status_color as orders_status_color,';
- // put in
+ // put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
else
@@ -305,12 +305,12 @@
self::$InitInfo['allfields']['listing'] = self::$allfields ;
/**
- @remarks filter based on status orders
+ @remarks filter based on status orders
*/
$allclosed = array(DEFAULT_ORDERS_STATUS_COMPLETED =>'on' , DEFAULT_ORDERS_STATUS_ANNULATE =>'on');
if(self::$view =='allclosed'){
- $_SESSION['filters'][__CLASS__]['viewstatus'] = $allclosed;
+ $_SESSION['filters'][__CLASS__]['viewstatus'] = $allclosed;
}
if(self::$view =='allnoclosed'){
$arr = array();
@@ -340,7 +340,7 @@
/**
- @remarks filter based on date_purchased orders
+ @remarks filter based on date_purchased orders
*/
if(self::$view =='thisday'){
$_SESSION['filters'][__CLASS__]['dates']['start'] = date('Y-m-d');
@@ -360,7 +360,7 @@
$_SESSION['filters']['dates']['end'] = $_SESSION['filters'][__CLASS__]['dates']['end'].' 23:59:59';
else
$_SESSION['filters']['dates']['end'] = date('Y-m-d').' 23:59:59';
-
+
if(tep_not_null($_SESSION['filters']['dates']['start']))
self::$InitInfo['adjust']['sWhere'] .=" AND date_purchased >= '".tep_db_input($_SESSION['filters']['dates']['start'])."'";
if(tep_not_null($_SESSION['filters']['dates']['end']))
@@ -381,7 +381,7 @@
);
/**
- @remarks Put detail for listing methode
+ @remarks Put detail for listing methode
*/
self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
@@ -401,7 +401,7 @@
/**
@fn check_action($actions)
- @brief process action
+ @brief process action
*/
public function check_action($actions){
global $messageStack,$page_module;
@@ -414,7 +414,7 @@
/**
- @remarks specific save in session value filters
+ @remarks specific save in session value filters
*/
case 'filters':
$_SESSION['filters']=array();
@@ -435,7 +435,7 @@
unset($_SESSION['filters'][__CLASS__]['viewstatus'][$key]);
}
- // date order
+ // date order
if(isset($_POST['filters']['dates']) ){
if( tep_not_null($_POST['filters']['dates']['start']))
$_SESSION['filters'][__CLASS__]['dates']['start'] = tep_date_raw(tep_db_prepare_input($_POST['filters']['dates']['start']));
@@ -447,7 +447,7 @@
break;
/**
- @remarks pdf generate for all docs
+ @remarks pdf generate for all docs
*/
case 'pdf':
@@ -585,7 +585,7 @@
$status = tep_db_prepare_input($_POST['status']);
if (up_status_order($oID, $status , $_POST) ){
// $messageStack->add_session(__('success order updated'), 'success');
-
+
switch($status){
case DEFAULT_ORDERS_STATUS_PAYED:
if( ! _cst_bool('USE_LOCAL_GENERAT_PDF')) {
@@ -611,7 +611,7 @@
}
}
}
- else
+ else
$messageStack->add_session(__('warning order not updated'), 'warning');
tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
@@ -714,12 +714,13 @@
$track=(string)tep_db_prepare_input($_POST['shipping_tracing_number']);
$trackurl=(string)tep_db_prepare_input($_POST['shipping_tracing_url']);
+ $shipping_method=(string)tep_db_prepare_input($_POST['shipping_method']);
$array=array(
'orders_id'=>$oID,
- 'method'=>'',
+ 'method'=>$shipping_method,
'tracking'=>$track,
- 'tracking_url'=>$trackurl,
+ 'tracking_url'=>sprintf($trackurl, $track) ,
'date_expedition'=>date('Y-m-d H:i:s'),
'products'=>array()
);
@@ -1139,6 +1140,19 @@
@param $mod string
@return string html
*/
+ public static function GetModVar($type, $mod, $namevar){
+ if(isset(sqlorder::$modules_type->$type)
+ && isset(sqlorder::$modules_type->$type->modules[$mod])
+ )
+ return sqlorder::$modules_type->$type->modules[$mod]->$namevar;
+ }
+
+ /**
+ @brief View childs module (shipping/ payment)
+ @param $type string
+ @param $mod string
+ @return string html
+ */
public static function ViewMod($type, $mod){
if(isset(sqlorder::$modules_type->$type)
&& isset(sqlorder::$modules_type->$type->modules[$mod])
Modified: branches/2.1.1/catalog/common/classes/order.php
===================================================================
--- branches/2.1.1/catalog/common/classes/order.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/common/classes/order.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -99,10 +99,10 @@
);
$this->query($order_id);
} else {
- link_post_variable('cc_type');
- link_post_variable('cc_owner');
- link_post_variable('cc_number');
- link_post_variable('cc_expires');
+// link_post_variable('cc_type');
+// link_post_variable('cc_owner');
+// link_post_variable('cc_number');
+// link_post_variable('cc_expires');
link_post_variable('comments');
$this->cart();
}
@@ -145,10 +145,10 @@
'currency' => $order['currency'],
'currency_value' => $order['currency_value'],
'payment_method' => $order['payment_method'],
- 'cc_type' => $order['cc_type'],
- 'cc_owner' => $order['cc_owner'],
- 'cc_number' => $order['cc_number'],
- 'cc_expires' => $order['cc_expires'],
+// 'cc_type' => $order['cc_type'],
+// 'cc_owner' => $order['cc_owner'],
+// 'cc_number' => $order['cc_number'],
+// 'cc_expires' => $order['cc_expires'],
'date_purchased' => $order['date_purchased'],
'orders_status' => $order_status['orders_status_name'],
'orders_status_id' => $order_status['status_id'],
@@ -165,7 +165,7 @@
}
- $this->mod = array(
+ $this->mod = array(
'class_payment'=> $order['class_payment'],
'class_shipping'=> $order['class_shipping']
);
@@ -259,7 +259,7 @@
@brief Call Public specific Environement for Generate checkout page
*/
public function cart() {
- global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment,$tax_address,$coupon_sav, $shipping_mod;
+ global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment,$tax_address,$coupon_sav, $shipping_mod, $shipping_modules;
$this->content_type = $cart->get_content_type();
@@ -304,10 +304,10 @@
}
-
- $this->mod = array(
+ list($module, $method) = explode('_', @$shipping['id']);
+ $this->mod = array(
'class_payment'=> $payment,
- 'class_shipping'=> $shipping_mod
+ 'class_shipping'=> $module
);
$this->customer = array('id' => (int)$customer_id,
Modified: branches/2.1.1/catalog/includes/classes/checkout_process.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/checkout_process.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/includes/classes/checkout_process.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -213,19 +213,19 @@
* @param $array array
*/
public function preventDuplicate($array){
-// var_dump(__FUNCTION__, tep_session_is_registered('pre_order_id') && ( !isset($array['pre_order_id']) || !empty($array['pre_order_id']) ) );
+
if (tep_session_is_registered('pre_order_id') && ( !isset($array['pre_order_id']) || !empty($array['pre_order_id']) ) ) {
-// var_dump(1);
+
//confirm orders
return $this->process_confirm($_SESSION['pre_order_id']);
}
elseif(self::test_pre_order_id($array['pre_order_id'])){
-// var_dump(2);
- // confirm orders
+
+ // confirm orders
return $this->process_confirm($array['pre_order_id']);
}
else {
-// var_dump(3);
+
// create orders
return $this->process_exe($array['order_totals'],$array['order']);
}
@@ -319,9 +319,7 @@
$products_ordered='';
$order = (!is_object($order)? new order('', ((!self::$mode)? 'holding' : '') ) : $order );
-// var_dump($order);
-// var_dump(self::$mode);
-// exit;
+
/**
Process class
*/
@@ -646,6 +644,7 @@
@return order_id
*/
private function insert_order($customer_id, $order, $update=''){
+
$date_purchased=date("Y-m-d H:i:s");
$format_prefix='';
$sql_data_array = array('customers_id' => $customer_id,
@@ -861,7 +860,7 @@
private function order_destock_product($i,$order){
$products_stock_attributes=null;
-//
+//
if (_cst_bool('STOCK_CHECK') ) {
@@ -886,12 +885,12 @@
if (tep_db_num_rows($stock_query) > 0) {
-// var_dump(__LINE__,$download_selected);
+
$stock_values = tep_db_fetch_array($stock_query);
$actual_stock_bought = $order->products[$i]['qty'];
$download_selected = false;
-var_dump($stock_values);
+
if ((!_cst_bool('DOWNLOAD_ENABLED')) && isset($stock_values['products_attributes_filename']) && tep_not_null($stock_values['products_attributes_filename'])) {
$download_selected = true;
$products_stock_attributes='$$DOWNLOAD$$';
@@ -952,8 +951,7 @@
}
}
-var_dump($products_stock_attributes);
-exit;
+
return $products_stock_attributes;
}
Modified: branches/2.1.1/catalog/includes/classes/payment.php
===================================================================
--- branches/2.1.1/catalog/includes/classes/payment.php 2012-10-25 08:46:19 UTC (rev 4636)
+++ branches/2.1.1/catalog/includes/classes/payment.php 2012-10-25 15:20:47 UTC (rev 4637)
@@ -67,7 +67,8 @@
if (tep_not_null($module) && strlen($module)>1) {
self::$selected_module = $module;
foreach(parent::initialise_type('MODULE_PAYMENT_INSTALLED','payment') as $class){
- if($class == $module) $include_modules[] = array('class' => $class, 'file' => $class . '.php');
+ if($class == $module)
+ $include_modules[] = array('class' => $class, 'file' => $class . '.php');
}
}
else {
@@ -117,7 +118,7 @@
*/
public function update_status() {
if (is_array($this->mod) && strlen(self::$selected_module) > 3) {
-// var_dump(self::$selected_module);
+
if (is_object($GLOBALS[self::$selected_module])) {
if (method_exists($GLOBALS[self::$selected_module], 'update_status')) {
$GLOBALS[self::$selected_module]->update_status();
@@ -149,7 +150,7 @@
reset($this->mod);
foreach($this->mod as $class){
- if (isset($GLOBALS[$class]) &&$GLOBALS[$class]->enabled) $js .= $GLOBALS[$class]->javascript_validation();
+ if (isset($GLOBALS[$class]) &&$GLOBALS[$class]->enabled) $js .= $GLOBALS[$class]->javascript_validation();
}
$js .= "\n" .'if (document.getElementById("conditions").checked != true) {' . "\n" .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-26 20:36:04
|
Revision: 4638
http://oscss.svn.sourceforge.net/oscss/?rev=4638&view=rev
Author: oscim
Date: 2012-10-26 20:35:56 +0000 (Fri, 26 Oct 2012)
Log Message:
-----------
Suite travail integration gestion des expedition/livraison
ajout des status de base des shipping
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php
branches/2.1.1/catalog/install/includes/language/en_EN/oscss_config.txt
branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt
branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql
branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi-action.gab
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/shipping.js.php
branches/2.1.1/catalog/install/includes/language/en_EN/osc_status.txt
Modified: branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab 2012-10-26 20:35:56 UTC (rev 4638)
@@ -34,10 +34,10 @@
</ul>
<ul class="fleft w_30">
- <li style="font-size:13px;">
-<span class="label" style="font-weight:bold;"><?php echo __('shipping status'); ?></span>
-<span class="value"><?php echo shipping::$shipping->status; ?></span>
-</li>
+ <li style="font-size:13px;">
+ <span class="label" style="font-weight:bold;"><?php echo __('shipping status'); ?></span>
+ <span class="value"><?php echo shipping::$shipping_status_array[shipping::$shipping->status]; ?></span>
+ </li>
<li style="font-size:13px;">
<span class="label" style="font-weight:bold;"><?php echo __('shipping tracking url'); ?></span>
@@ -52,10 +52,10 @@
<table class="dataTableBase orders shipping allshipping">
<thead>
<tr>
- <th><?php echo __('table heading id'); ?></th>
- <th><?php echo __('table heading products'); ?></th>
- <th><?php echo __('table heading qt expedie'); ?></th>
- <th><?php echo __('table heading methode'); ?></th>
+ <th><?php echo __('@shipping table heading id'); ?></th>
+ <th><?php echo __('@shipping table heading products'); ?></th>
+ <th><?php echo __('@shipping table heading qt expedie'); ?></th>
+ <th><?php echo __('@shipping table heading methode'); ?></th>
</tr>
</thead>
<tbody>
Added: branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi-action.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi-action.gab (rev 0)
+++ branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi-action.gab 2012-10-26 20:35:56 UTC (rev 4638)
@@ -0,0 +1,58 @@
+<?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 $mutliactionmenu, $mutliactionchoose;
+print_r($_POST);
+?>
+<div class="box_uniq block_form main-shipping">
+
+<?php echo tep_draw_form('shipping', shipping::FILENAME, tep_get_all_get_params(array('oID', 'action','forceajax','forceview')) .'action=multi-action'); ?>
+ <div>
+
+ Not implemented in this current version
+
+ <p class="block_input">
+ <label for="notify"><?php echo __('@shipping multi action choose'); ?></label>
+ <?php echo shipping::$shipping_status_array[$_POST['multiaction']]; ?>
+ </p>
+
+ <p class="block_input">
+ <label for="status"><?php echo __('@shipping multi entry status'); ?></label>
+ <?php echo tep_draw_pull_down_menu('status', $mutliactionchoose, ''); ?>
+ </p>
+
+
+ <ul class="block_input">
+ <?php if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) )
+ foreach($_POST['action_multi'] as $oid=>$txt ): ?>
+ <li><?php echo tep_draw_hidden_field('action_multi['.$oid.']', 'action_multi_'.$oid.'', $oid, true).' '.sprintf(__('shipping update n %s') , $oid ) ?></li>
+ <?php endforeach; ?>
+ </ul>
+
+
+ <?php if(isset($_POST['notify']) && $_POST['notify']=='on'): ?>
+ <div class="block_input">
+ <label for="notify"><?php echo __('text info multi notify'); ?></label>
+ <?php echo tep_draw_textarea_field('comments', '', '30', '5', '','style="width:100%"'); ?>
+ </div>
+ <?php endif; ?>
+
+
+ </div>
+
+
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_delete.gif', __('image modify multi'), ' onclick="$.fancybox.close();" ') ;?>
+ <?php echo tep_js_back(tep_href_link(shipping::FILENAME), IMAGE_CANCEL);?>
+ </div>
+
+</form>
+</div>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi.gab 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.multi.gab 2012-10-26 20:35:56 UTC (rev 4638)
@@ -8,7 +8,7 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-global $price, $current_theme;
+ global $mutliactionmenu, $mutliactionchoose;
?>
<div class="box_uniq block_form main-shipping">
@@ -17,14 +17,19 @@
Not implemented in this current version
+ <p class="block_input">
+ <label for="notify"><?php echo __('@shipping multi action choose'); ?></label>
+ <?php echo tep_draw_pull_down_menu('multiaction',$mutliactionmenu,'','', true); ?>
+ </p>
- <ul class="block_input">
- <?php if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) )
- foreach($_POST['action_multi'] as $oid=>$txt ): ?>
- <li><?php echo tep_draw_checkbox_field('action_multi['.$oid.']', 'action_multi_'.$oid.'', $oid, true).sprintf(__('shipping update n %s') , $txt ) ?></li>
- <?php endforeach; ?>
- </ul>
+ <ul class="block_input">
+ <?php if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) )
+ foreach($_POST['action_multi'] as $oid=>$txt ): ?>
+ <li><?php echo tep_draw_checkbox_field('action_multi['.$oid.']', 'action_multi_'.$oid.'', $oid, true).' '.sprintf(__('shipping update n %s') , $oid ) ?></li>
+ <?php endforeach; ?>
+ </ul>
+
<p class="block_input">
<label for="notify"><?php echo __('text info multi notify'); ?></label>
<?php echo tep_draw_checkbox_field('notify','','',false); ?>
Added: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/shipping.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/shipping.js.php (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/shipping.js.php 2012-10-26 20:35:56 UTC (rev 4638)
@@ -0,0 +1,109 @@
+<?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 10/08/12, 17:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<?php if (shipping::$action == 'edit'): ?>
+
+ <script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.shipping = OSCSS_JSCORE.shipping || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.shipping.utils = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ Init:function( ) {
+
+
+
+ /// Edit and info payment
+ $("#multiaction").change( function () {
+ $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "shipping", 'action_method' : "display_view" , 'modtype' : "payment", 'oID': "<?php echo (int)shipping::$oID ?>", 'mod': this.value },
+ function success(data) {
+ $("#modPay").html(data);
+ });
+ });
+
+
+ // starting the script on page load
+ $(document).ready(function(){
+ // loop for
+ $(".tirroir").each( function () {
+ $(this).hide();
+ });
+
+ });
+ },
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.shipping.utils;
+})(); // fin de scope locale
+
+ //--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.shipping.utils.Init();'); // Active check key ?>
+
+
+<?php elseif (in_array( shipping::$action , array('multi','multi-action') ) ): ?>
+
+ <script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.shipping = OSCSS_JSCORE.shipping || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.shipping.utils = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ Init:function( ) {
+
+
+
+ /// Edit and info payment
+ $("#multiaction").change( function () {
+ $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "shipping", 'action_method' : "display_view" , 'modtype' : "payment", 'oID': "<?php echo (int)shipping::$oID ?>", 'mod': this.value },
+ function success(data) {
+ $("#modPay").html(data);
+ });
+ });
+
+ // starting the script on page load
+ $(document).ready(function(){
+ // loop for
+ $(".tirroir").each( function () {
+ $(this).hide();
+ });
+
+ });
+ },
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.shipping.utils;
+})(); // fin de scope locale
+
+ //--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.shipping.utils.Init();'); // Active check key ?>
+
+
+
+<?php endif; ?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2012-10-26 20:35:56 UTC (rev 4638)
@@ -26,24 +26,27 @@
/* mutli */
- $lang['shipping update n %s']="Appliquer a cette livraison" ;
+ $lang['shipping update n %s']="Appliquer à cette livraison %s" ;
$lang['text info multi notify']="informer le client de ce changement " ;
$lang['image modify multi']="Valider" ;
+ $lang['@shipping multi action choose'] = "Choix de l'action à appliquer ";
+ $lang['@shipping multi entry status'] = "Choix de l'etat des expeditions apres l'action à appliquer ";
+
/* edit */
$lang['tab shipping briefs']="Description" ;
- $lang['tab shipping details']="Détails livraison" ;
+ $lang['tab shipping details']="Suivi" ;
$lang['shipping date expedition']="Expedition le : " ;
$lang['shipping method']="Méthode" ;
$lang['shipping status']="État" ;
$lang['shipping tracking url']="liens de tracking : " ;
- $lang['table heading id']="id" ;
- $lang['table heading products']="Produits" ;
- $lang['table heading qt expedie']="Qté." ;
+ $lang['@shipping table heading id']="id" ;
+ $lang['@shipping table heading products']="Produits" ;
+ $lang['@shipping table heading qt expedie']="Qté." ;
+ $lang['@shipping table heading methode']="Méthode" ;
-
$lang['heading documents']="Documents" ;
$lang['shipping table pdf heading weight']="Poids" ;
$lang['shipping table pdf heading date']="Date" ;
@@ -53,6 +56,10 @@
/* Value list */
+ $lang['@shipping action txt print bl']="Generation des bons de livraisons/preparation" ;
+
+
+
/* status */
$lang['shipping opened']="Ouverte" ;
$lang['shipping progress']="En cours" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php 2012-10-26 20:35:56 UTC (rev 4638)
@@ -17,13 +17,13 @@
extends ModTwo /// new abstract class for nextgen module
implements
InterfaceModule,
- IntModTwo, /// new interface module for nextgen module
+// IntModTwo, /// new interface module for nextgen module
InterfacedInnerHtml {
/**
@var const
*/
- const FILENAME = 'shipping.php';
+ const FILENAME = "shipping.php";
/**
@var array list, utilisé dans les gabarits, list des shipping
@@ -177,15 +177,22 @@
$DB=Database::getInstance();
-// self::$shipping_statuses=array();
-// $shipping_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='shipping' and language_id = '" . (int)$languages_id . "'");
-// while ($shipping_status = $shipping_status_query->fetchAssoc()) {
-// self::$shipping_statuses[] = array('id' => $shipping_status['status_id'], 'text' => $shipping_status['status_name']);
-// self::$shipping_status_array[$shipping_status['status_id']] = $shipping_status['status_name'];
-// }
+ self::$shipping_statuses=array();
+ $shipping_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='shipping' and language_id = '" . (int)$languages_id . "'");
+ while ($shipping_status = $shipping_status_query->fetchAssoc()) {
+ self::$shipping_statuses[] = array('id' => $shipping_status['status_id'], 'text' => $shipping_status['status_name']);
+ self::$shipping_status_array[$shipping_status['status_id']] = $shipping_status['status_name'];
+ }
+ $mutliactionmenu = array(
+ array('id'=>'','text'=>'--'),
+// liste detail de chaque colis
+ array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
+// recap liste des colis
+ array('id'=>'be', 'text'=>__('@shipping action txt print be internal list recap') ),
+ );
global $oscss;
$oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
@@ -212,7 +219,7 @@
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['oID'];
+ $ID=(int)$_REQUEST['id'];
$type=$_REQUEST['file_type'] ;
global $pdf, $currencies;
osCSS_pdf::getInstance();
@@ -229,8 +236,7 @@
case 'delivery':
global $obj_shipping;
$obj_shipping = sqlshipping::fetch(array('id'=>$ID), true);
- $oID = $obj_shipping->row_id;
- $order = new order($obj_shipping->orders_id);
+ $order = new order((int)$obj_shipping->orders_id);
break;
}
@@ -249,7 +255,7 @@
// $pdf=osCSS_pdf::OutputEnd();
}
if(!isset($_GET['forceajax']))
- tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+ tep_redirect(tep_href_link(self::FILENAME, 'oID='.$ID.'&action=edit'));
break;
/**
@@ -546,6 +552,34 @@
return $res;
break;
+ /**
+ @remarks Formulaire apres choix action
+ */
+ case 'multi-action';
+ global $mutliactionchoose;
+
+ $mutliactionchoose = array(array('id'=>'','text'=>'--'));
+ foreach(self::$shipping_statuses as $k=>$row)
+ $mutliactionchoose[] = $row;
+
+ break;
+
+ /**
+ @remarks Formulaire choix action et confirmation de la liste de expedition a traiter
+ */
+ case 'multi';
+ global $mutliactionmenu;
+ // liste des actions possibles
+ $mutliactionmenu = array(
+ // // array('id'=>'edit', 'text'=>IMAGE_EDIT ),
+ array('id'=>'','text'=>'--'),
+ array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
+ array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
+ );
+ break;
+
+
+
case 'delete';
default:
@@ -583,11 +617,21 @@
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
+ /**
+ @remarks Formulaire apres choix action
+ */
case 'multi-action':
+ global $mutliactionmenu, $mutliactionchoose;
+ self::GetDBValue();
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
+ /**
+ @remarks Formulaire choix action et confirmation de la liste de expedition a traiter
+ */
case 'multi':
+ global $mutliactionmenu, $mutliactionchoose;
+ self::GetDBValue();
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
Added: branches/2.1.1/catalog/install/includes/language/en_EN/osc_status.txt
===================================================================
--- branches/2.1.1/catalog/install/includes/language/en_EN/osc_status.txt (rev 0)
+++ branches/2.1.1/catalog/install/includes/language/en_EN/osc_status.txt 2012-10-26 20:35:56 UTC (rev 4638)
@@ -0,0 +1,91 @@
+<?php
+/**
+ @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 16/03/2012, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_orders_status */
+$lg['OSC_ORDERS_STATUS_CANCELED']= 'Canceled';
+$lg['OSC_ORDERS_STATUS_PENDING']= 'Pending';
+$lg['OSC_ORDERS_STATUS_PENDING_MONEY_ORDER']="chêque" ;
+$lg['OSC_ORDERS_STATUS_PAYED']="Payé" ;
+$lg['OSC_ORDERS_STATUS_PAYED_MONEY_ORDER']="chêque" ;
+$lg['OSC_ORDERS_STATUS_PROCESSING']= 'Processing';
+$lg['OSC_ORDERS_STATUS_EXPEDIED']="Expedié" ;
+$lg['OSC_ORDERS_STATUS_DELIVERED']= 'Delivered';
+$lg['OSC_ORDERS_STATUS_CLOSED']="Cloturé" ;
+
+/* osc_products_virtual_types */
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL']= 'Physical';
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION']= 'Subscription';
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SERVICE']= 'Service';
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SOFTWARE']= 'Software';
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_MEMBERS']= 'Members Only';
+
+/* osc_refund_method */
+$lg['OSC_REFUND_METHOD_PAYPAL']= 'Paypal';
+$lg['OSC_REFUND_METHOD_NOCHEX']= 'NoChex';
+$lg['OSC_REFUND_METHOD_EXCHANGE']= 'Exchange';
+$lg['OSC_REFUND_METHOD_GIFT_VOUCHERS']= 'Gift Vouchers';
+$lg['OSC_REFUND_METHOD_CUSTOMERS_POINTS']= 'Value in points';
+
+/* osc_return_reasons */
+$lg['OSC_RETURN_REASONS_FAULTY']= 'Faulty';
+$lg['OSC_RETURN_REASONS_DAMAGED']= 'Damaged';
+$lg['OSC_RETURN_REASONS_INCORRECT_ITEM']= 'Incorrect Item';
+$lg['OSC_RETURN_REASONS_WARRANTY']= 'Warranty';
+
+
+/* osc_returns_status */
+$lg['OSC_RETURNS_STATUS_PENDING']= 'Pending';
+$lg['OSC_RETURNS_STATUS_AWAITING_RETURN']= 'Awaiting Return';
+$lg['OSC_RETURNS_STATUS_CANCELLED']= 'Cancelled';
+$lg['OSC_RETURNS_STATUS_COMPLETE']= 'Complete';
+
+/* geo zone type */
+$lg['OSC_GEO_ZONE_VAT']="Taxes" ;
+$lg['OSC_GEO_ZONE_SHIPPING']="Livraisons" ;
+
+/* cms content type */
+$lg['OSC_CMS_CONTENT_SIMPLE']="Simple" ;
+
+/* attybute option type */
+$lg['OSC_ATTRIBUTE_OPTIONTYPE_SELECT']="Select" ;
+$lg['OSC_ATTRIBUTE_OPTIONTYPE_TEXT']="Text" ;
+$lg['OSC_ATTRIBUTE_OPTIONTYPE_RADIO']="Radio" ;
+$lg['OSC_ATTRIBUTE_OPTIONTYPE_CHECKBOX']="Checkbox" ;
+
+/* featrued*/
+$lg['OSC_FEATURED_SELECTION']="Complexe" ;
+$lg['OSC_FEATURED_UNE']="Simple" ;
+
+/* navigation link */
+$lg['OSC_NAVIGATION_LINKS_INTERNAL']="Lien interne" ;
+$lg['OSC_NAVIGATION_LINKS_EXTERNAL']="Lien externe" ;
+$lg['OSC_NAVIGATION_LINKS_FUNCTION']="Fonction php" ;
+
+/* customers_restrict_access */
+$lg['OSC_RESTRICT_ACCESS_NONE']="none" ;
+$lg['OSC_RESTRICT_ACCESS_LOGGED']="logged" ;
+
+
+/* track_stock */
+$lg['OSC_TRACK_STOCK_NONE']="No monitoring" ;
+$lg['OSC_TRACK_STOCK_ON']="In stock - followed " ;
+$lg['OSC_TRACK_STOCK_NOSTOCK']="Out of stock - Monitoring" ;
+$lg['OSC_TRACK_STOCK_LIMITED']="Limited Edition - monitoring" ;
+
+/* shipping */
+$lg['OSC_SHIPPING_LOST_BY_CARRIER']="Lost by the carrier" ;
+$lg['OSC_SHIPPING_NPAI']="do not live at the address indicated" ;
+$lg['OSC_SHIPPING_IN_PREPARE']="in preparation" ;
+$lg['OSC_SHIPPING_TRANSMITTED_CARRIER']="Transmitted carrier" ;
+$lg['OSC_SHIPPING_LIVERY']="livery" ;
+
+
+?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/install/includes/language/en_EN/oscss_config.txt
===================================================================
--- branches/2.1.1/catalog/install/includes/language/en_EN/oscss_config.txt 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/install/includes/language/en_EN/oscss_config.txt 2012-10-26 20:35:56 UTC (rev 4638)
@@ -620,8 +620,13 @@
$lg['OSC_RETURNS_STATUS_CANCELLED']= 'Cancelled';
$lg['OSC_RETURNS_STATUS_COMPLETE']= 'Complete';
+/* shipping */
+$lg['OSC_SHIPPING_LOST_BY_CARRIER']="Lost by the carrier" ;
+$lg['OSC_SHIPPING_NPAI']="do not live at the address indicated" ;
+$lg['OSC_SHIPPING_IN_PREPARE']="in preparation" ;
+$lg['OSC_SHIPPING_TRANSMITTED_CARRIER']="Transmitted carrier" ;
+$lg['OSC_SHIPPING_LIVERY']="livery" ;
-
/* osc_languages */
$lg['LANGUAGE_NAME_S']= 'English';
$lg['LANGUAGE_NAME_CODE_S']= 'en';
Modified: branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt
===================================================================
--- branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/install/includes/language/fr_FR/osc_status.txt 2012-10-26 20:35:56 UTC (rev 4638)
@@ -78,4 +78,14 @@
$lg['OSC_TRACK_STOCK_ON']="En stock - suivi " ;
$lg['OSC_TRACK_STOCK_NOSTOCK']="Hors stock - suivi" ;
$lg['OSC_TRACK_STOCK_LIMITED']="Edition Limité - suivi" ;
+
+
+/* shipping */
+$lg['OSC_SHIPPING_LOST_BY_CARRIER']="Perdu par le transporteur" ;
+$lg['OSC_SHIPPING_NPAI']="retourné npai" ;
+$lg['OSC_SHIPPING_IN_PREPARE']="en preparation" ;
+$lg['OSC_SHIPPING_TRANSMITTED_CARRIER']="Perdu par le transporteur" ;
+$lg['OSC_SHIPPING_LIVERY']="Livrée" ;
+
+
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-10-26 20:35:56 UTC (rev 4638)
@@ -68,4 +68,11 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'track_stock', 1, 'OSC_TRACK_STOCK_NONE','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'track_stock', 1, 'OSC_TRACK_STOCK_ON','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'track_stock', 1, 'OSC_TRACK_STOCK_LIMITED','');
\ No newline at end of file
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'track_stock', 1, 'OSC_TRACK_STOCK_LIMITED','');
+
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-2, 'shipping', 1, 'OSC_SHIPPING_LOST_BY_CARRIER', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'shipping', 1, 'OSC_SHIPPING_NPAI', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'shipping', 1, 'OSC_SHIPPING_IN_PREPARE', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'shipping', 1, 'OSC_SHIPPING_TRANSMITTED_CARRIER', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '', 1);
\ No newline at end of file
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-10-25 15:20:47 UTC (rev 4637)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-10-26 20:35:56 UTC (rev 4638)
@@ -33,3 +33,9 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'track_stock', 1, 'OSC_TRACK_STOCK_NONE','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'track_stock', 1, 'OSC_TRACK_STOCK_ON','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-2, 'shipping', 1, 'OSC_SHIPPING_LOST_BY_CARRIER', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'shipping', 1, 'OSC_SHIPPING_NPAI', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'shipping', 1, 'OSC_SHIPPING_IN_PREPARE', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'shipping', 1, 'OSC_SHIPPING_TRANSMITTED_CARRIER', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '', 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-27 07:07:53
|
Revision: 4640
http://oscss.svn.sourceforge.net/oscss/?rev=4640&view=rev
Author: oscim
Date: 2012-10-27 07:07:47 +0000 (Sat, 27 Oct 2012)
Log Message:
-----------
correction coquille
Modified Paths:
--------------
branches/2.1.1/catalog/account.php
branches/2.1.1/catalog/includes/languages/fr_FR/account.php
Modified: branches/2.1.1/catalog/account.php
===================================================================
--- branches/2.1.1/catalog/account.php 2012-10-27 07:07:17 UTC (rev 4639)
+++ branches/2.1.1/catalog/account.php 2012-10-27 07:07:47 UTC (rev 4640)
@@ -134,7 +134,15 @@
$order = new order((int)$_GET['order_id']);
+ /// complete object by shipping information
+ $_qu = $DB->query("SELECT * FROM " . TABLE_SHIPPING . " WHERE orders_id = '" . (int)$_GET['order_id'] . "'");
+ if($_qu->__get('numRows')) {
+ $result = $_qu->fetchAllAssoc();
+
+ $order->shipping = $result ;
+ }
+
break;
case 'pdf';
/**
Modified: branches/2.1.1/catalog/includes/languages/fr_FR/account.php
===================================================================
--- branches/2.1.1/catalog/includes/languages/fr_FR/account.php 2012-10-27 07:07:17 UTC (rev 4639)
+++ branches/2.1.1/catalog/includes/languages/fr_FR/account.php 2012-10-27 07:07:47 UTC (rev 4640)
@@ -71,7 +71,6 @@
define('HEADING_ORDER_NUMBER',"Commande #%s" );
define('HEADING_ORDER_DATE',"Date de la commande : " );
define('HEADING_DELIVERY_ADDRESS',"Adresse de livraison" );
-define('HEADING_SHIPPING_METHOD',"Méthode d'expédition " );
define('HEADING_PRODUCTS',"Produits" );
define('HEADING_PRODUCTS_QTY',"Qt" );
define('HEADING_PRODUCTS_PRICE',"Prix" );
@@ -87,4 +86,8 @@
define('HEADING_HISTORY_DATE',"Date" );
define('HEADING_HISTORY_STATUS',"Statut" );
define('HEADING_HISTORY_COMMENT',"Commentaires" );
+define('HEADING_SHIPPING_METHOD',"Méthode d'expédition " );
+define('HEADING_SHIPPING_HISTORY',"Expédition " );
+define('HEADING_SHIPPING_DATE',"date " );
+define('HEADING_SHIPPING_TRACKING',"tracking " );
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-27 09:48:17
|
Revision: 4641
http://oscss.svn.sourceforge.net/oscss/?rev=4641&view=rev
Author: oscim
Date: 2012-10-27 09:48:10 +0000 (Sat, 27 Oct 2012)
Log Message:
-----------
correction de coquille
report information manquante dans les affichage de l'edition d'une commande
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.view.gab
branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/moneyorder.view.gab
branches/2.1.1/catalog/admin/includes/modules/payment/cod.php
branches/2.1.1/catalog/admin/includes/modules/payment/moneyorder.php
branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql
branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-27 09:48:10 UTC (rev 4641)
@@ -638,7 +638,7 @@
<div class="block_field fleft w_50" >
<h4><?php echo __('legend contact customers'); ?></h4>
- <p class="block_input">
+ <p class="clear block_input">
<strong><?php echo __('entry telephone number'); ?></strong><?php echo orders::$order->customer['telephone']; ?>
<br />
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab 2012-10-27 09:48:10 UTC (rev 4641)
@@ -11,4 +11,5 @@
?>
<p class="block_input">
+ <?php echo cod::$current['title'] ?>
</p>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.view.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.view.gab 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/cod.view.gab 2012-10-27 09:48:10 UTC (rev 4641)
@@ -11,5 +11,5 @@
?>
<p class="block_input">
-
+ <?php echo cod::$current['title'] ?>
</p>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/moneyorder.view.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/moneyorder.view.gab 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/payment/moneyorder.view.gab 2012-10-27 09:48:10 UTC (rev 4641)
@@ -11,4 +11,5 @@
?>
<p class="block_input">
+ <?php echo moneyorder::$current['title'] ?>
</p>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/modules/payment/cod.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/payment/cod.php 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/admin/includes/modules/payment/cod.php 2012-10-27 09:48:10 UTC (rev 4641)
@@ -14,49 +14,29 @@
public $title;
public $description;
public $sort_order;
- public $enabled;
+ public $enabled = true;
+ /**
+ @var use in gabarit file
+ */
+ public static $current;
-
// class constructor
public function __construct() {
- $this->code = 'cod';
+ $this->code = __CLASS__;
$this->title = __('module payment cod text title');
$this->description = __('module payment cod text description');
$this->sort_order = (defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : 0 );
- $this->enabled = true ;
+ $this->icon = (defined('MODULE_PAYMENT_COD_ICON')? substr(MODULE_PAYMENT_COD_ICON,strlen(DIR_WS_CATALOG)) : '');
+ self::$current= array(
+ 'id' => $this->code,
+ 'title' => $this->title,
+ 'icon'=>tep_image($this->icon, $this->title)
+ );
+
}
-// class methods
-// public function update_status() {
-// global $order;
-//
-// if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
-// $check_flag = false;
-// $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and (zone_country_id = '" . $order->delivery['country']['id'] . "' OR zone_country_id ='0') order by zone_id");
-// while ($check = tep_db_fetch_array($check_query)) {
-// if ($check['zone_id'] < 1) {
-// $check_flag = true;
-// break;
-// } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
-// $check_flag = true;
-// break;
-// }
-// }
-//
-// if ($check_flag == false) {
-// $this->enabled = false;
-// }
-// }
-//
-// // disable the module if the order only contains virtual products
-// if ($this->enabled == true) {
-// if ($order->content_type == 'virtual') {
-// $this->enabled = false;
-// }
-// }
-// }
/**
@@ -87,7 +67,7 @@
@brief retrun html view data modules
*/
public function display_view(){
- $this->load_db_value((int)$_GET['oID']);
+// $this->load_db_value((int)$_GET['oID']);
return MGabCont::CallGab('view','payment/'.__CLASS__,'orders');
}
Modified: branches/2.1.1/catalog/admin/includes/modules/payment/moneyorder.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/payment/moneyorder.php 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/admin/includes/modules/payment/moneyorder.php 2012-10-27 09:48:10 UTC (rev 4641)
@@ -21,7 +21,7 @@
public $description;
public $icon;
public $sort_order;
- public $enabled;
+ public $enabled = true;
/**
@var use in gabarit file
*/
@@ -35,8 +35,8 @@
$this->description = __('module payment moneyorder text description');
$this->sort_order = (defined('MODULE_PAYMENT_MONEYORDER_SORT_ORDER')? MODULE_PAYMENT_MONEYORDER_SORT_ORDER : 0);
$this->icon = (defined('MODULE_PAYMENT_MONEYORDER_ICON')? substr(MODULE_PAYMENT_MONEYORDER_ICON,strlen(DIR_WS_CATALOG)) : '');
- $this->enabled = true;
+
if (defined('MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0)
$this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
@@ -44,28 +44,15 @@
//! texte supp dans email commande
// $this->email_footer = __('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER');
+
+ self::$current= array(
+ 'id' => $this->code,
+ 'title' => $this->title,
+ 'icon'=>tep_image($this->icon, $this->title)
+ );
}
-// public function update_status() {
-// global $order;
-//
-// if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
-// $check_flag = false;
-// $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and (zone_country_id = '" . $order->delivery['country']['id'] . "' OR zone_country_id ='0') order by zone_id");
-// while ($check = tep_db_fetch_array($check_query)) {
-// if ($check['zone_id'] < 1) {
-// $check_flag = true;
-// break;
-// } elseif ($check['zone_id'] == $order->billing['zone_id']) {
-// $check_flag = true;
-// break;
-// }
-// }
-//
-// if ($check_flag == false) $this->enabled = false;
-// }
-// }
/**
@brief after save table order, adjust modules data save
@@ -95,12 +82,6 @@
@brief retrun html view data modules
*/
public function display_view(){
- self::$current= array(
- 'id' => $this->code,
- 'title' => $this->title,
- 'icon'=>tep_image($this->icon, $this->title)
- );
-
return MGabCont::CallGab('view','payment/'.__CLASS__,'orders');
}
@@ -108,11 +89,6 @@
@brief retrun html view form data modules
*/
public function display_edit(){
- self::$current= array(
- 'id' => $this->code,
- 'title' => $this->title,
- 'icon'=>tep_image($this->icon, $this->title)
- );
return MGabCont::CallGab('edit','payment/'.__CLASS__,'orders');
}
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-10-27 09:48:10 UTC (rev 4641)
@@ -71,8 +71,8 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'track_stock', 1, 'OSC_TRACK_STOCK_LIMITED','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-2, 'shipping', 1, 'OSC_SHIPPING_LOST_BY_CARRIER', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'shipping', 1, 'OSC_SHIPPING_NPAI', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'shipping', 1, 'OSC_SHIPPING_IN_PREPARE', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'shipping', 1, 'OSC_SHIPPING_TRANSMITTED_CARRIER', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '', 1);
\ No newline at end of file
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-2, 'shipping', 1, 'OSC_SHIPPING_LOST_BY_CARRIER', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'shipping', 1, 'OSC_SHIPPING_NPAI', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'shipping', 1, 'OSC_SHIPPING_IN_PREPARE', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'shipping', 1, 'OSC_SHIPPING_TRANSMITTED_CARRIER', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '');
\ No newline at end of file
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-10-27 09:48:10 UTC (rev 4641)
@@ -82,18 +82,18 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_CONTENT_INSTALLED_BO_S', 'MODULE_CONTENT_INSTALLED_BO', '', 'MODULE_CONTENT_INSTALLED_BO_L', '6', '11', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ACACAT_INSTALLED_S', 'MODULE_ACACAT_INSTALLED', '', 'MODULE_ACACAT_INSTALLED_L', '6', '12', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ( 'MODULE_ACACAT_INSTALLED_BO_S', 'MODULE_ACACAT_INSTALLED_BO', '', 'MODULE_ACACAT_INSTALLED_BO_L', '6', '13', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',',1);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ACCOUNT_INSTALLED_S', 'MODULE_ACCOUNT_INSTALLED', '', 'MODULE_ACCOUNT_INSTALLED_L', '6', '14', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_ACCOUNT_INSTALLED_BO_S', 'MODULE_ACCOUNT_INSTALLED_BO', '', 'MODULE_ACCOUNT_INSTALLED_BO_L', '6', '15', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ACCOUNT_INSTALLED_S', 'MODULE_ACCOUNT_INSTALLED', 'address_book.php;history.php', 'MODULE_ACCOUNT_INSTALLED_L', '6', '14', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_ACCOUNT_INSTALLED_BO_S', 'MODULE_ACCOUNT_INSTALLED_BO', 'address_book.php;history.php', 'MODULE_ACCOUNT_INSTALLED_BO_L', '6', '15', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ( 'MODULE_LISTING_INSTALLED_S', 'MODULE_LISTING_INSTALLED', '', 'MODULE_LISTING_INSTALLED_L', '6', '16', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_LISTING_INSTALLED_BO_S', 'MODULE_LISTING_INSTALLED_BO', '', 'MODULE_LISTING_INSTALLED_BO_L', '6', '17', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_HOME_INSTALLED_S', 'MODULE_HOME_INSTALLED', '', 'MODULE_HOME_INSTALLED_L', '6', '18', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_HOME_INSTALLED_BO_S', 'MODULE_HOME_INSTALLED_BO', '', 'MODULE_HOME_INSTALLED_BO_L', '6', '19', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_CHECKOUT_PROCESS_INSTALLED_S', 'MODULE_CHECKOUT_PROCESS_INSTALLED', '', 'MODULE_CHECKOUT_PROCESS_INSTALLED_L', '6', '20', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_CHECKOUT_PROCESS_INSTALLED_BO_S', 'MODULE_CHECKOUT_PROCESS_INSTALLED_BO', '', 'MODULE_CHECKOUT_PROCESS_INSTALLED_BO_L', '6', '21', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED', '', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED_BO', '', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED', '', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED_BO', '', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED', 'item.php;flat.php;spu.php', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED_BO', 'item.php;flat.php;spu.php', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED', 'moneyorder.php;cod.php', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED_BO', 'moneyorder.php;cod.php', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ORDER_TOTAL_INSTALLED_S', 'MODULE_ORDER_TOTAL_INSTALLED', 'ot_total.php;ot_subtotal.php;ot_tax.php;', 'MODULE_ORDER_TOTAL_INSTALLED_L', '6', '24', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ORDER_TOTAL_INSTALLED_S', 'MODULE_ORDER_TOTAL_INSTALLED_BO', 'ot_total.php;ot_subtotal.php;ot_tax.php;', 'MODULE_ORDER_TOTAL_INSTALLED_L', '6', '24', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('PLUGIN_GENERIC_INSTALLED_S', 'PLUGIN_GENERIC_INSTALLED', '', 'PLUGIN_GENERIC_INSTALLED_L', '6', '25', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-10-27 07:07:47 UTC (rev 4640)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-10-27 09:48:10 UTC (rev 4641)
@@ -34,8 +34,8 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'track_stock', 1, 'OSC_TRACK_STOCK_ON','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-2, 'shipping', 1, 'OSC_SHIPPING_LOST_BY_CARRIER', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'shipping', 1, 'OSC_SHIPPING_NPAI', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'shipping', 1, 'OSC_SHIPPING_IN_PREPARE', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'shipping', 1, 'OSC_SHIPPING_TRANSMITTED_CARRIER', '', 1);
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '', 1);
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-2, 'shipping', 1, 'OSC_SHIPPING_LOST_BY_CARRIER', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'shipping', 1, 'OSC_SHIPPING_NPAI', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'shipping', 1, 'OSC_SHIPPING_IN_PREPARE', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'shipping', 1, 'OSC_SHIPPING_TRANSMITTED_CARRIER', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-27 14:12:23
|
Revision: 4642
http://oscss.svn.sourceforge.net/oscss/?rev=4642&view=rev
Author: oscim
Date: 2012-10-27 14:12:16 +0000 (Sat, 27 Oct 2012)
Log Message:
-----------
suite implementation gestion livraison
sepration en une class datettimeUtility des functionde traitement de date
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
Added Paths:
-----------
branches/2.1.1/catalog/common/classes/datetimeUtility.php
branches/2.1.1/catalog/common/classes/shippingUtility.php
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-10-27 09:48:10 UTC (rev 4641)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-10-27 14:12:16 UTC (rev 4642)
@@ -29,6 +29,8 @@
define('PHP_DATE_TIME_FORMAT', 'd/m/Y H:i:s'); // this is used for date()
define('DATE_TIME_FORMAT'," ".DATE_FORMAT_SHORT . " %H:%M:%S" );
+
+
////
// Return date in raw format
// $date should be in format dd/mm/yyyy
Added: branches/2.1.1/catalog/common/classes/datetimeUtility.php
===================================================================
--- branches/2.1.1/catalog/common/classes/datetimeUtility.php (rev 0)
+++ branches/2.1.1/catalog/common/classes/datetimeUtility.php 2012-10-27 14:12:16 UTC (rev 4642)
@@ -0,0 +1,136 @@
+<?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
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 06/02/11, 20:14
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class datetimeUtility
+*/
+class datetimeUtility {
+
+
+ /**
+ */
+ public static function date_long($raw_date) {
+ if ( ($raw_date == '1000-01-01 00:00:00') || ($raw_date == '') ) return false;
+
+ $year = (int)substr($raw_date, 0, 4);
+ $month = (int)substr($raw_date, 5, 2);
+ $day = (int)substr($raw_date, 8, 2);
+ $hour = (int)substr($raw_date, 11, 2);
+ $minute = (int)substr($raw_date, 14, 2);
+ $second = (int)substr($raw_date, 17, 2);
+
+ return self::_strftime(DATE_FORMAT_LONG, mktime($hour, $minute, $second, $month, $day, $year));
+ }
+
+ /**
+ @brief Output a raw date string in the selected locale date format
+ @param $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS
+ NOTE: Includes a workaround for dates before 01/01/1970 that fail on windows servers
+ */
+ public static function date_short($raw_date) {
+ if ( ($raw_date == '1000-01-01 00:00:00') || ($raw_date == '') ) return false;
+
+ $year = substr($raw_date, 0, 4);
+ $month = (int)substr($raw_date, 5, 2);
+ $day = (int)substr($raw_date, 8, 2);
+ $hour = (int)substr($raw_date, 11, 2);
+ $minute = (int)substr($raw_date, 14, 2);
+ $second = (int)substr($raw_date, 17, 2);
+
+ if (@date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
+ else return str_replace('2037', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037)));
+ }
+
+ /**
+ */
+ public static function datetime_short($raw_datetime) {
+ if ( ($raw_datetime == '1000-01-01 00:00:00') || ($raw_datetime == '') ) return false;
+
+ $year = (int)substr($raw_datetime, 0, 4);
+ $month = (int)substr($raw_datetime, 5, 2);
+ $day = (int)substr($raw_datetime, 8, 2);
+ $hour = (int)substr($raw_datetime, 11, 2);
+ $minute = (int)substr($raw_datetime, 14, 2);
+ $second = (int)substr($raw_datetime, 17, 2);
+
+ return self::_strftime(DATE_TIME_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
+ }
+
+
+ /**
+ Réecriture des dates dans des formats correctes pour la langue
+ */
+ protected static function _strftime($format, $timestamp=false) {
+ if (!$timestamp) $timestamp = time();
+ $pattern = array(
+ '%a'=>array('const'=>'NameOf_DAY_MINI','ftime'=>'%w'),
+ '%A'=>array('const'=>'NameOf_DAY','ftime'=>'%w'),
+ '%b'=>array('const'=>'NameOf_MONTH_MINI','ftime'=>'%m'),
+ '%B'=>array('const'=>'NameOf_MONTH','ftime'=>'%m')
+ );
+ foreach ($pattern as $code=>$infos)
+ if (preg_match("/$code/",$format) && defined($infos['const'].'_'.strftime($infos['ftime'], $timestamp)))
+ $format = preg_replace("/$code/", constant($infos['const'].'_'.strftime($infos['ftime'], $timestamp)), $format);
+
+ return strFtime($format, $timestamp);
+ }
+
+
+
+ public static function get_jours_ouvrables($debut, $fin, $with_saterday = false, $with_sunday = true, $verif_livraison = false) {
+ $totOuvrables = 0;
+ // Comptabilise le nombre de jours ouvrables pendant la période de livraison
+ for ($day = $debut; $day < $fin; ($day += 86400)) {
+ $day_en = strtolower(date('D', $day)); // mon-tue-wen-thu-fri-sat-sun
+ //
+ if ($day_en == 'sat' || $day_en == 'sun') {
+ switch (true) {
+ case ($with_sunday == true && $with_saterday == true) :
+ $totOuvrables++; // Comptabilise le samedi ET le dimanche
+ break;
+ case ($with_sunday == true && $with_saterday == false && $day_en == 'sun') :
+ $totOuvrables++; // Comptabilise uniquement le dimanche
+ break;
+ case ($with_saterday == true && $with_sunday === false && $day_en === 'sat') :
+ $totOuvrables++; // Comptabilise uniquement le samedi
+ break;
+ }
+ }
+ else {
+ // Définition des dates fériées fixes
+ $jour = date('j', $day);
+ $mois = date('m', $day);
+ $an = date('Y', $day);
+ //
+ if ($jour == 01 && $mois == 01) $totOuvrables++; // 1er janvier
+ else if ($jour == 01 && $mois == 05) $totOuvrables++; // 1er mai
+ else if ($jour == 08 && $mois == 05) $totOuvrables++; // 5 mai
+ else if ($jour == 14 && $mois == 07) $totOuvrables++; // 14 juillet
+ else if ($jour == 15 && $mois == 08) $totOuvrables++; // 15 aout
+ else if ($jour == 01 && $mois == 11) $totOuvrables++; // 1 novembre
+ else if ($jour == 11 && $mois == 11) $totOuvrables++; // 11 novembre
+ //else if ($jour == 20 && $mois == 12) $totOuvrables++; // 20 décembre (Ile de La Réunion)
+ else if ($jour == 25 && $mois == 12) $totOuvrables++; // 25 décembre
+ // Pâques
+ $paques = easter_date($an); // retourne un timestamp UNIX pour Pâques
+ if (date('d', $paques) == $jour && date('m', $paques) == $mois) $totOuvrables++;
+ // Ascension
+ $ascension = $paques + 39;
+ if (date('d', $ascension) == $jour && date('m', $ascension) == $mois) $totOuvrables++;
+ // Pentecote
+ $pentecote = $paques + 50;
+ if (date('d', $pentecote) == $jour && date('m', $pentecote) == $mois) $totOuvrables++;
+ }
+ }
+ // Si jour de livraison est un jour ouvrable
+ if ($verif_livraison === true) $totOuvrables += self::get_jours_ouvrables($fin, ($fin + 86400), $with_saterday, $with_sunday, false);
+ //
+ return $totOuvrables;
+ }
+}
+?>
\ No newline at end of file
Added: branches/2.1.1/catalog/common/classes/shippingUtility.php
===================================================================
--- branches/2.1.1/catalog/common/classes/shippingUtility.php (rev 0)
+++ branches/2.1.1/catalog/common/classes/shippingUtility.php 2012-10-27 14:12:16 UTC (rev 4642)
@@ -0,0 +1,250 @@
+<?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
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 06/02/11, 20:14
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class formUtility
+*/
+class formUtility {
+
+ /**
+
+ */
+ protected static $format=array(
+ 'image_submit'=>'<input type="submit" value="%s" title="%s" class="%s" %s />'
+ );
+
+ static protected $id_check=array();
+
+ /**
+ @brief control and|or generate unique id for html balise
+ */
+ private static function gener_id($id_propose){
+ if(!isset(self::$id_check[md5($id_propose)])){
+ self::$id_check[md5($id_propose)]=$id_propose;
+ return $id_propose;
+ }
+ else {
+ $id=$id_propose.rand(1,3);
+ return self::gener_id($id);
+ }
+ }
+
+ /**
+ @fn HtmlAddId($id,$name)
+ @brief this function creat new id , if is exist, for W3C and id css check
+ @param $id string
+ @param $name string
+ @return string id for css balise
+ */
+ private static function HtmlAddId($id,$name){
+ $txt = self::gener_id( ( (!empty($id)) ? $id :$name ) );
+ return ' ' . 'id="' . str_replace(array('[',']'),array(''),tep_output_string($txt) ) . '"' ;
+ }
+
+ /**
+ @fn Init()
+ */
+ public static function Init(){
+ self::$id_check=array();
+ }
+
+ /**
+ @fn UpFormat($key, $format)
+ @brief for update format sprintf for key , this var self::$format
+ @param $key string this name function call
+ @param $format new string for printf
+ */
+ public static function UpFormat($key, $format){
+ if(isset(self::$format[$key])) self::$format[$key]=$format;
+ }
+
+ /**
+ @fn image_submit($image, $alt = '', $parameters = '',$classCss='')
+ @brief The HTML form submit button wrapper function
+ @param $image path url image Ou texte
+ @param $alt
+ @param $parameters string for inline html
+ @param $classCss string for css class additional
+ @return string <input type="submit" title=" Mettre à jour " value="Mettre à jour" class="button" />
+ */
+ public static function image_submit($image='', $text = '', $parameters = '',$classCss='') {
+ return sprintf(self::$format[__function__],
+ tep_output_string($text),
+ tep_output_string($text) ,
+ 'button '.$classCss,
+ ' '.(tep_not_null($image)? 'src="'.$image.'" ' : '').
+ ' '.$parameters
+ );
+ }
+
+
+ /**
+ @fn ($image, $alt = '', $params = '')
+ @brief Output a function button in the selected language
+ NOTE: this obsolete function
+ */
+ public static function image_button($image, $alt = '', $params = '') {
+ global $language;
+ return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params);
+ }
+
+
+ /**
+ @brief Output a form
+ @param $name name html form
+ @param $action url or file
+ @param $parameters param GET for file or null
+ @param $method post/get
+ @param $params param html
+ */
+ public static function draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {
+
+ $form = '<form id="' . tep_output_string($name) . '" action="';
+
+ if( (substr($action, 0, 4 ) !='http') ){
+ if (tep_not_null($parameters))$form .= tep_href_link($action, $parameters);
+ else $form .= tep_href_link($action);
+ }
+ else $form .=$action;
+
+ $form .= '" method="' . tep_output_string($method) . '"';
+ if (tep_not_null($params)) {
+ $form .= ' ' . $params;
+ }
+ $form .= '>';
+
+ return $form;
+ }
+
+ ////
+ // Output a form input field
+ public static function draw_input_field($name, $id='', $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
+ $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'
+ .self::HtmlAddId($id,$name);
+
+ if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
+ elseif (tep_not_null($value)) $field .= ' value="' . tep_output_string($value) . '"';
+
+ if (tep_not_null($parameters)) $field .= ' ' . $parameters;
+
+ $field .= ' />';
+
+ if ($required == true) $field .= '<span class="nobr">'.TEXT_FIELD_REQUIRED.'</span>';
+
+ return $field;
+ }
+
+
+ /**
+ Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
+ */
+ public static function draw_selection_field($name, $id='', $type, $value = '', $checked = false, $compare = '', $parameters = '') {
+ $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'
+ .self::HtmlAddId($id,$name);
+
+ if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
+ if ( ($checked == true) || (@$GLOBALS[$name] == 'on') || ($value && (@$GLOBALS[$name] == $value)) || ($value && ($value == $compare)) ) $selection .= ' checked="checked"';
+ if (tep_not_null($parameters)) $selection .= ' ' . $parameters;
+ $selection .= ' />';
+
+ return $selection;
+ }
+
+ /**
+ Output a form textarea field
+ */
+ public static function draw_textarea_field($name, $id = '', $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
+ $field = '<textarea name="' . tep_output_string($name) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'
+ .self::HtmlAddId($id,$name);
+
+ if (tep_not_null($parameters)) $field .= ' ' . $parameters;
+ $field .= '>';
+ if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) $field .= tep_output_string_protected(stripslashes($GLOBALS[$name]));
+ elseif (tep_not_null($text))$field .= tep_output_string_protected($text);
+ $field .= '</textarea>';
+ return $field;
+ }
+
+
+ /**
+ Output a form hidden field
+ */
+ public static function draw_hidden_field($name, $id = '', $value = '', $parameters = '') {
+ $field = '<input type="hidden" name="' . tep_output_string($name) . '"'
+ .self::HtmlAddId($id,$name);
+
+ if (tep_not_null($value)) $field .= ' value="' . tep_output_string($value) . '"';
+ elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
+
+ if (tep_not_null($parameters)) $field .= ' ' . $parameters;
+ $field .= ' />';
+ return $field;
+ }
+
+ /**
+ Output a form pull down menu
+ */
+ public static function draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
+ if (!preg_match('/id=/i',$parameters)) $field = '<select id="' . str_replace(array('[',']'),array(''),tep_output_string($name)) . '" name="' . tep_output_string($name) . '" ';
+ else $field = '<select name="' . tep_output_string($name) . '" ';
+
+ if (tep_not_null($parameters)) $field .= ' ' . $parameters;
+ $field .= '>';
+ if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes((string)$GLOBALS[$name]);
+
+ for ($i=0, $n=sizeof($values); $i<$n; $i++) {
+ if(isset($values[$i])){
+ $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
+ if ($default == $values[$i]['id']) $field .= ' selected="selected"';
+ $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
+ }
+ }
+ $field .= '</select>';
+
+ if ($required == true) $field .= TEXT_FIELD_REQUIRED;
+
+ return $field;
+ }
+
+ /**
+ Output a form pull down menu on radio set
+ */
+ public static function draw_pull_down_radio($name, $id= '',$values, $default = '', $parameters = '', $required = false) {
+ $field = '<ul>'."\n";
+ if (!tep_not_null($id)) $id=tep_output_string($name);
+ if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
+ for ($i=0, $n=sizeof($values); $i<$n; $i++) {
+ $field .='<li>'.tep_draw_radio_field($name, $id.$i, tep_output_string($values[$i]['id']),( ($default == $values[$i]['id'])? true:false), $parameters);
+ $field .= $values[$i]['text'] . ' '.'</li>';
+ }
+ $field .= '</ul>';
+ if ($required == true) $field .= TEXT_FIELD_REQUIRED;
+
+ return $field;
+ }
+
+ /**
+ Output a form pull down menu on radio set
+ */
+ public static function draw_pull_down_checkbox($name, $id= '',$values, $default = '', $parameters = '', $required = false) {
+ $field = '<ul>'."\n";
+ if (!tep_not_null($id)) $id=tep_output_string($name);
+ if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
+ for ($i=0, $n=sizeof($values); $i<$n; $i++) {
+ $field .='<li>'.tep_draw_checkbox_field($name, $id.$i, tep_output_string($values[$i]['id']),( ($default == $values[$i]['id'])? true:false), $parameters);
+ $field .= $values[$i]['text'] . ' '.'</li>';
+ }
+ $field .= '</ul>';
+ if ($required == true) $field .= TEXT_FIELD_REQUIRED;
+
+ return $field;
+ }
+
+
+}
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-27 19:34:42
|
Revision: 4643
http://oscss.svn.sourceforge.net/oscss/?rev=4643&view=rev
Author: oscim
Date: 2012-10-27 19:34:33 +0000 (Sat, 27 Oct 2012)
Log Message:
-----------
Suite du travail sur les livraison
Suite developpement des modules de livraison
Ajout de class common pour traiter les operations sur les date et heure, et mise a niveau des libraire generale
Ajout class common de traitement specifique des expedition / livraisons
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/drivers/sqlshipping.php
branches/2.1.1/catalog/admin/includes/functions/general.php
branches/2.1.1/catalog/admin/includes/functions/lib.configuration.php
branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab
branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
branches/2.1.1/catalog/admin/includes/modules/pages/adminGroup.php
branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
branches/2.1.1/catalog/admin/includes/modules/payment/cod.php
branches/2.1.1/catalog/admin/includes/modules/shipping/item.php
branches/2.1.1/catalog/common/classes/datetimeUtility.php
branches/2.1.1/catalog/common/classes/shippingUtility.php
branches/2.1.1/catalog/includes/functions/general.php
branches/2.1.1/catalog/includes/languages/fr_FR/checkout_shipping.php
branches/2.1.1/catalog/includes/languages/fr_FR/fr_FR.php
branches/2.1.1/catalog/includes/modules/shipping/flat.php
branches/2.1.1/catalog/templates/defaut/includes/content/checkout_shipping.php
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/
branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/flat.view.gab
branches/2.1.1/catalog/admin/includes/modules/shipping/flat.php
Modified: branches/2.1.1/catalog/admin/includes/classes/drivers/sqlshipping.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/drivers/sqlshipping.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/classes/drivers/sqlshipping.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -22,20 +22,15 @@
*/
public static function create($option){
-// if(!isset($option['customers_id'])) return 'customers_id';
if(!isset($option['orders_id'])) return 'orders_id';
-// if(!isset($option['orders_products_id'])) return 'orders_products_id';
-
-// if(isset($option['customers_id'])) $sql_data_array['customers_id'] = $option['customers_id'];
if(isset($option['orders_id'])) $sql_data_array['orders_id'] = $option['orders_id'];
-// if(isset($option['orders_products_id'])) $sql_data_array['orders_products_id'] = $option['orders_products_id'];
if(isset($option['method'])) $sql_data_array['method'] = $option['method'];
if(isset($option['tracking'])) $sql_data_array['tracking'] = $option['tracking'];
if(isset($option['tracking_url'])) $sql_data_array['tracking_url'] = $option['tracking_url'];
if(isset($option['date_expedition'])) $sql_data_array['date_expedition'] = $option['date_expedition'];
+ if(isset($option['status'])) $sql_data_array['status'] = (int)$option['status'];
-
$res=tep_db_perform(TABLE_SHIPPING, $sql_data_array);
if(!$res)
@@ -67,25 +62,19 @@
public static function update($option){
if(!isset($option['id'])) return 'id';
-// if(!isset($option['customers_id'])) return 'customers_id';
-// if(!isset($option['orders_id'])) return 'orders_id';
-// if(!isset($option['orders_products_id'])) return 'orders_products_id';
-
$where ='';
if(isset($option['id'])) $where .="AND row_id = '".(int)$option['id']."' ";
-// if(isset($option['customers_id'])) $where .="AND customers_id = '".$option['customers_id']."' ";
if(isset($option['orders_id'])) $where .="AND orders_id = '".$option['orders_id']."' ";
-// if(isset($option['orders_products_id'])) $where .="AND orders_products_id = '".$option['orders_products_id']."' ";
if(isset($option['method'])) $sql_data_array['method'] = $option['method'];
if(isset($option['tracking'])) $sql_data_array['tracking'] = $option['tracking'];
if(isset($option['tracking_url'])) $sql_data_array['tracking_url'] = $option['tracking_url'];
if(isset($option['date_expedition'])) $sql_data_array['date_expedition'] = $option['date_expedition'];
+ if(isset($option['status'])) $sql_data_array['status'] = (int)$option['status'];
-
$res=tep_db_perform(TABLE_SHIPPING, $sql_data_array, 'update' , substr($where,3) );
-// var_dump($res);
+
return $res;
}
@@ -116,11 +105,8 @@
$sql ="";
if(isset($option['id'])) $sql .="AND row_id = '".(int)$option['id']."' ";
-// if(isset($option['customers_id'])) $sql .="AND customers_id = '".(int)$option['customers_id']."' ";
if(isset($option['orders_id'])) $sql .="AND orders_id = '".(int)$option['orders_id']."' ";
-// if(isset($option['orders_products_id'])) $sql .="AND orders_products_id = '".(int)$option['orders_products_id']."' ";
-
$sql ="SELECT * FROM ".TABLE_SHIPPING." WHERE ".substr($sql,3);
$res=$DB->query($sql);
@@ -148,7 +134,7 @@
$result['products'][] = $r2;
}
-// print_r($result);
+
return ((!$shortkey)? $result : self::CleanKey($result));
@@ -188,9 +174,7 @@
$sql ="";
if(isset($option['id'])) $sql .="AND row_id = '".(int)$option['id']."' ";
-// if(isset($option['customers_id'])) $sql .="AND customers_id = '".(int)$option['customers_id']."' ";
if(isset($option['orders_id'])) $sql .="AND orders_id = '".(int)$option['orders_id']."' ";
-// if(isset($option['orders_products_id'])) $sql .="AND orders_products_id = '".(int)$option['orders_products_id']."' ";
if(strlen($sql)==0)
return false;
@@ -228,9 +212,7 @@
$par = array(
'row_id',
-// 'customers_id',
'orders_id',
-// 'orders_products_id',
'method',
'tracking',
'tracking_url',
Modified: branches/2.1.1/catalog/admin/includes/functions/general.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/functions/general.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/functions/general.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -239,57 +239,10 @@
return $add_post;
}
-/**
- @package oscss
- @author OscssTeam
-*/
-function tep_date_long($raw_date) {
- if ( ($raw_date == '1000-01-01 00:00:00') || ($raw_date == '') ) return false;
- $year = (int)substr($raw_date, 0, 4);
- $month = (int)substr($raw_date, 5, 2);
- $day = (int)substr($raw_date, 8, 2);
- $hour = (int)substr($raw_date, 11, 2);
- $minute = (int)substr($raw_date, 14, 2);
- $second = (int)substr($raw_date, 17, 2);
- return tep_strftime(DATE_FORMAT_LONG, mktime($hour, $minute, $second, $month, $day, $year));
-}
-/**
- @author OscssTeam
-Output a raw date string in the selected locale date format
- $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS
- NOTE: Includes a workaround for dates before 01/01/1970 that fail on windows servers
-*/
-function tep_date_short($raw_date) {
- if ( ($raw_date == '1000-01-01 00:00:00') || ($raw_date == '') ) return false;
- $year = substr($raw_date, 0, 4);
- $month = (int)substr($raw_date, 5, 2);
- $day = (int)substr($raw_date, 8, 2);
- $hour = (int)substr($raw_date, 11, 2);
- $minute = (int)substr($raw_date, 14, 2);
- $second = (int)substr($raw_date, 17, 2);
-
- if (@date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
- else return str_replace('2037', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037)));
-}
-
-function tep_datetime_short($raw_datetime) {
- if ( ($raw_datetime == '1000-01-01 00:00:00') || ($raw_datetime == '') ) return false;
-
- $year = (int)substr($raw_datetime, 0, 4);
- $month = (int)substr($raw_datetime, 5, 2);
- $day = (int)substr($raw_datetime, 8, 2);
- $hour = (int)substr($raw_datetime, 11, 2);
- $minute = (int)substr($raw_datetime, 14, 2);
- $second = (int)substr($raw_datetime, 17, 2);
-
- return tep_strftime(DATE_TIME_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
-}
-
-
/**
@package oscss
@author OscssTeam
@@ -870,6 +823,11 @@
function quote_xe_currency($to, $from = DEFAULT_CURRENCY){return localizationUtility::xe_currency($to, $from);}
+function tep_date_long($raw_date) { return datetimeUtility::date_long($raw_date); }
+function tep_date_short($raw_date){ return datetimeUtility::date_short($raw_date); }
+function tep_datetime_short($raw_datetime) { return datetimeUtility::datetime_short($raw_datetime); }
+
+
/**
@fn alias oscss_cstr::test_gab_theme($element,$ext='php')
@brief load Template Environement
Modified: branches/2.1.1/catalog/admin/includes/functions/lib.configuration.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/functions/lib.configuration.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/functions/lib.configuration.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -326,7 +326,47 @@
return tep_draw_pull_down_menu($name, $statuses_array, $order_status_id);
}
+// delai_livraison BOC
+// table configuration : -> use_function
+function tep_get_delai_title($delai) {
+ global $t_delai;
+
+ if ($delai == '0') {
+ return TEXT_NONE;
+ }
+ else {
+ $title = TEXT_NONE;
+
+ for ($i=0, $n = count($t_delai); $i < $n; $i++) {
+ if ($t_delai[$i]['id'] == $delai) {
+ $title = $t_delai[$i]['text'];
+ break;
+ }
+ }
+ //
+ return $title;
+ }
+}
+// table configuration : -> set_function
+function tep_cfg_pull_down_delai($delai, $key = '') {
+ $t_delai = array();
+ $t_delai[] = array('id' => 0, 'text' => '--');
+ $t_delai[] = array('id' => 86400, 'text' => '1');
+ $t_delai[] = array('id' => 172800, 'text' => '2');
+ $t_delai[] = array('id' => 259200, 'text' => '3');
+ $t_delai[] = array('id' => 345600, 'text' => '4');
+ $t_delai[] = array('id' => 432000, 'text' => '5');
+ $t_delai[] = array('id' => 604800, 'text' => '7');
+ $t_delai[] = array('id' => 864000, 'text' => '10');
+ $t_delai[] = array('id' => 1296000, 'text' => '15');
+ $t_delai[] = array('id' => 1814400, 'text' => '21');
+ $t_delai[] = array('id' => 2419200, 'text' => '30');
+
+ $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');
+ return tep_draw_pull_down_menu($name, $t_delai, $delai);
+}
+// delai_livraison EOC
/**
Modified: branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab 2012-10-27 19:34:33 UTC (rev 4643)
@@ -63,52 +63,7 @@
<tr class="dataTableRow">
<td> </td>
<td>
- <?php
- if (!function_exists('list_hierac')){
- function list_hierac($menu,$class_fils=''){
- global $group_boxes;
-
- while ($fils = each($menu)) {
- $group_boxes_files=$fils['value'];
- $group_boxes_files['admin_boxes_id']=$group_boxes_files['admin_files_id'];
- $group_boxes_files['admin_boxes_name']=$group_boxes_files['admin_files_name'];
- $groupsArray =array();
-// print_r($fils);
- if ($group_boxes_files['etat'] ==true) {
- $del_boxes = array($_GET['gID']);
- $groupsArray[]=$_GET['gID'];
- $result = array_diff ($groupsArray, $del_boxes);
- sort($result);
- $checkedBox = $group_boxes_files['admin_boxes_id'];;
- $uncheckedBox = implode (",", $result);
- $checked = true;
- } else {
- $add_boxes = array($_GET['gID']);
- $result = array_merge ($add_boxes, $groupsArray);
- sort($result);
- $checkedBox = implode (",", $result);
- $uncheckedBox = '';
- $checked = false;
- }
- preg_match("#(.*)[?](.*)#i",$group_boxes_files['admin_files_name'],$regi);
- $page_box=(empty($regi[1])) ? $group_boxes_files['admin_files_name'] : $regi[1] ;
- ?>
- <p style="clear:both; padding:0 1em;" class="view parent dataTableRow" >
- <span style="padding-left:<?php if($group_boxes_files['type'] =='ss_menu') echo '10' ?>px; width:40px" class="fleft"><?php if($group_boxes_files['type'] !='ss_menu') echo adminGroup::status_flag($checked,'action=setflag&gID='.$_GET['gID'].'&admin_files_id='.$group_boxes_files['admin_files_id'],'#afi_'.$group_boxes['admin_boxes_id']); ?></span>
- <span class="fleft"><?php echo $group_boxes_files['admin_files_name'] ?></span>
- <?php echo tep_draw_hidden_field('menu_id_' . $group_boxes_files['admin_files_id'], '', $group_boxes_files['admin_files_id']) . tep_draw_hidden_field('unchecked_' . $group_boxes_files['admin_files_id'], '', $uncheckedBox);?>
- <span class="view fils fright">
- </span>
- </p>
- <?php
-
- if (isset($group_boxes_files['fils']) && is_array($group_boxes_files['fils'])) list_hierac($group_boxes_files['fils'],'hierac_enfant');
- } /* Fin de while*/
- }
- }/* Fin de function */
-
- list_hierac($group_boxes['fils']);
- ?>
+ <?php adminGroup::list_hierac($group_boxes['fils']); ?>
</td>
</tr>
<?php } ?>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-27 19:34:33 UTC (rev 4643)
@@ -199,7 +199,7 @@
<?php echo tep_draw_pull_down_menu('mod[payment]', orders::PrepaPullDownType('payment'), orders::$order->mod['class_payment'] , '') ; ?>
<div id="modPay">
- <?php echo orders::EditMod('payment', orders::$order->mod['class_payment']) ?>
+ <?php echo orders::EditMod('payment', orders::$order->mod['class_payment']) ?>
</div>
<div class="button_nav">
@@ -224,14 +224,19 @@
</legend>
<div class="block_input">
<?php if(!isset($_REQUEST['mod']) || ( isset($_REQUEST['mod']) && $_REQUEST['mod'] !='shipping' ) ): ?>
- <?php echo orders::GetTitle('shipping',orders::$order->mod['class_shipping']) ; ?>
+ <?php //echo orders::GetTitle('shipping',orders::$order->mod['class_shipping']) ; ?>
+
+ <div id="modPay">
+ <?php echo orders::ViewMod('shipping', orders::$order->mod['class_shipping']) ?>
+ </div>
+
<?php else: ?>
<?php echo tep_draw_form('mod_pay', orders::FILENAME,'oID='.orders::$oID.'&action=mod&mod=shipping', 'post', ' class="block_form"'); ?>
<?php echo tep_draw_pull_down_menu('mod[shipping]', orders::PrepaPullDownType('shipping'), orders::$order->mod['class_shipping'] , '') ; ?>
<div id="modShip">
- <?php echo orders::EditMod('shipping', orders::$order->mod['class_shipping']) ?>
+ <?php echo orders::EditMod('shipping', orders::$order->mod['class_shipping']) ?>
</div>
<div class="button_nav">
Added: branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/flat.view.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/flat.view.gab (rev 0)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/flat.view.gab 2012-10-27 19:34:33 UTC (rev 4643)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2011 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 19/11/11, 19:36
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+ <p class="block_input">
+
+ <?php echo flat::$current['title'] ?>
+ <br />
+ <?php echo sprintf(__('@flat text info min delai %s'), datetimeUtility::SecondInDay(flat::$current['min_delai'])) ?>
+ <br />
+ <?php echo sprintf(__('@flat text info remise provider shipping at %s'),flat::$current['date_remise_provider']) ?>
+ <br />
+ <?php echo sprintf(__('@flat text info estimation %s day and delivery for date %s'), flat::$current['delai'] , flat::$current['date_delivery'] ) ?>
+ </p>
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -30,7 +30,10 @@
define('DATE_TIME_FORMAT'," ".DATE_FORMAT_SHORT . " %H:%M:%S" );
+// all date (dd/mm) public holiday in country
+define('CALENDAR_PUBLIC_HOLIDAY',"01/01;01/05;08/05;14/07;15/08;01/11;11/11;25/12");
+
////
// Return date in raw format
// $date should be in format dd/mm/yyyy
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2012-10-27 19:34:33 UTC (rev 4643)
@@ -110,6 +110,8 @@
$lang['label shipping tracking number']="Numéro d'expedition : " ;
$lang['label shipping tracking url']="Url de suivi : " ;
+ $lang['@orders txt expedition process update']="Commande transmise au transporteur " ;
+
/* Section tabs service */
$lang['table heading active initial']="Depuis" ;
$lang['table heading revival']="Alerte" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/adminGroup.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/adminGroup.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/adminGroup.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -426,6 +426,89 @@
return $res;
}
+
+
+ public static function list_hierac($menu,$class_fils=''){
+ global $group_boxes;
+
+ while ($fils = each($menu)) {
+ $group_boxes_files=$fils['value'];
+ $group_boxes_files['admin_boxes_id']=$group_boxes_files['admin_files_id'];
+ $group_boxes_files['admin_boxes_name']=$group_boxes_files['admin_files_name'];
+ $groupsArray =array();
+// print_r($fils);
+ if ($group_boxes_files['etat'] ==true) {
+ $del_boxes = array($_GET['gID']);
+ $groupsArray[]=$_GET['gID'];
+ $result = array_diff ($groupsArray, $del_boxes);
+ sort($result);
+ $checkedBox = $group_boxes_files['admin_boxes_id'];;
+ $uncheckedBox = implode (",", $result);
+ $checked = true;
+ } else {
+ $add_boxes = array($_GET['gID']);
+ $result = array_merge ($add_boxes, $groupsArray);
+ sort($result);
+ $checkedBox = implode (",", $result);
+ $uncheckedBox = '';
+ $checked = false;
+ }
+ preg_match("#(.*)[?](.*)#i",$group_boxes_files['admin_files_name'],$regi);
+ $page_box=(empty($regi[1])) ? $group_boxes_files['admin_files_name'] : $regi[1] ;
+ ?>
+ <p style="clear:both; padding:0 1em;" class="view parent dataTableRow" >
+ <span style="padding-left:<?php if($group_boxes_files['type'] =='ss_menu') echo '10' ?>px; width:40px" class="fleft"><?php if($group_boxes_files['type'] !='ss_menu') echo adminGroup::status_flag($checked,'action=setflag&gID='.$_GET['gID'].'&admin_files_id='.$group_boxes_files['admin_files_id'],'#afi_'.$group_boxes['admin_boxes_id']); ?></span>
+ <span class="fleft"><?php echo $group_boxes_files['admin_files_name'] ?></span>
+ <?php echo tep_draw_hidden_field('menu_id_' . $group_boxes_files['admin_files_id'], '', $group_boxes_files['admin_files_id']) . tep_draw_hidden_field('unchecked_' . $group_boxes_files['admin_files_id'], '', $uncheckedBox);?>
+
+
+ <?php self::list_action($group_boxes_files['admin_files_id']) ?>
+ </p>
+ <?php
+
+ if (isset($group_boxes_files['fils']) && is_array($group_boxes_files['fils']))
+ self::list_hierac($group_boxes_files['fils'],'hierac_enfant');
+ } /* Fin de while*/
+ }
+
+
+ public static function list_action($admin_files_id){
+
+ static $cacheSess;
+
+ if(!is_array($cacheSess)){
+
+ $sql ="SELECT u.files_id, u.action FROM " . TABLE_ADMIN_FILES2RIGHT." u ".
+ " WHERE ( u.type = '0' AND u.ref_id = '" .(int) $_SESSION['login_groups_id'] . "' ) OR ( u.type = '1' AND u.ref_id = '" .(int) $_SESSION['login_id'] . "' ) ";
+
+ $_query = tep_db_query($sql);
+
+ if (tep_db_num_rows($_query))
+ foreach($_query->fetchAllAssoc() as $row)
+ $cacheSess[$row['files_id']]['action'][] = $row['action'];
+
+
+ }
+
+
+ if(isset($cacheSess[$admin_files_id])) {
+
+
+ $tmp = $cacheSess[$admin_files_id]; //['action']
+ $list = array();
+
+ if(isset($tmp['action']) )
+ $list = $tmp['action'];
+
+
+ echo '<ul style="display:block;float:none;">';
+ foreach($list as $row)
+ echo '<li style="clear:both;">'.$row.'</li>';
+ echo '</ul>';
+ }
+
+ }
+
/** Interface module */
function check() { return false; }
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -228,8 +228,22 @@
'o.ip_address' => __('orders table heading ip_address'),
'o.total_weight' => __('orders table heading total_weight'),
'o.facture_id' => __('orders table heading facture_id'),
- 'o.class_payment' => __('orders table heading class_payment'),
- 'o.class_shipping' => __('orders table heading class_shipping'),
+ 'o.class_payment' => array(
+ 'sort'=>true,
+// 'alias'=>'orders_status_name',
+ 'text'=> __('orders table heading class_payment'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+// 'default'=>true,
+ ),
+ 'o.class_shipping' => array(
+ 'sort'=>true,
+// 'alias'=>'orders_status_name',
+ 'text'=> __('orders table heading class_shipping'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
// 'p.products_ordered' => __('orders table heading purchased'),
);
@@ -722,6 +736,7 @@
'tracking'=>$track,
'tracking_url'=>sprintf($trackurl, $track) ,
'date_expedition'=>date('Y-m-d H:i:s'),
+ 'status'=>1,
'products'=>array()
);
@@ -743,8 +758,11 @@
break;
}
- // adjust date update
-// sqlorder::update(array('id'=>$oID, 'status'=>DEFAULT_ORDERS_STATUS_EXPED 'comments'=>__('expeditions')));
+ if(!isset($_POST['shipping_qt']) || !is_array($_POST['shipping_qt']) ) {
+ /// TODO Add var configuration DEFAULT_ORDERS_STATUS_EXPED
+ // adjust date update
+ $r = sqlorder::update(array('id'=>$oID, 'status'=>4/*DEFAULT_ORDERS_STATUS_EXPED*/, 'comments'=>__('@orders txt expedition process update')));
+ }
tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
break;
@@ -1022,6 +1040,7 @@
" WHERE ot.class = 'ot_total' ".$adjust->sWhere.
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 'o.orders_id DESC');
+
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
Modified: branches/2.1.1/catalog/admin/includes/modules/payment/cod.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/payment/cod.php 2012-10-27 14:12:16 UTC (rev 4642)
+++ branches/2.1.1/catalog/admin/includes/modules/payment/cod.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -29,11 +29,11 @@
$this->icon = (defined('MODULE_PAYMENT_COD_ICON')? substr(MODULE_PAYMENT_COD_ICON,strlen(DIR_WS_CATALOG)) : '');
- self::$current= array(
- 'id' => $this->code,
- 'title' => $this->title,
- 'icon'=>tep_image($this->icon, $this->title)
- );
+ self::$current= array(
+ 'id' => $this->code,
+ 'title' => $this->title,
+ 'icon'=>tep_image($this->icon, $this->title)
+ );
}
Added: branches/2.1.1/catalog/admin/includes/modules/shipping/flat.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/shipping/flat.php (rev 0)
+++ branches/2.1.1/catalog/admin/includes/modules/shipping/flat.php 2012-10-27 19:34:33 UTC (rev 4643)
@@ -0,0 +1,222 @@
+<?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 111/05/2012, 12:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+
+class flat {
+ /**
+ @var code, name classe
+ */
+ public $code;
+ /**
+ @var title
+ */
+ public $title;
+ /**
+ @var string , description
+ */
+ public $description;
+ /**
+ @var
+ */
+ public $icon;
+ /**
+ @var position for user module
+ */
+ public $sort_order;
+ /**
+ @var
+ */
+ public $tax_class;
+ /**
+ @var activate module
+ */
+ public $enabled = true;
+ /**
+ @var use in gabarit file
+ */
+ public static $current;
+ /**
+ @var use shipping/delivery saterday
+ */
+ public $with_saterday = false;
+ /**
+ @var use shipping/delivery sunday
+ */
+ public $with_sunday = false;
+
+
+ /**
+ @brief class constructor
+ */
+ public function __construct() {
+ $this->code =__CLASS__;
+ $this->title = __('module shipping flat text title');
+ $this->description = __('module shipping flat text description');
+ $this->sort_order = (defined('MODULE_SHIPPING_FLAT_SORT_ORDER')? MODULE_SHIPPING_FLAT_SORT_ORDER : 0) ;
+ $this->icon = ( (defined('MODULE_SHIPPING_FLAT_ICON') && tep_not_null('MODULE_SHIPPING_FLAT_ICON') ) ? MODULE_SHIPPING_FLAT_ICON : '');
+ $this->tax_class = (defined('MODULE_SHIPPING_FLAT_TAX_CLASS')?MODULE_SHIPPING_FLAT_TAX_CLASS: 0);
+ $delai = (defined('MODULE_SHIPPING_FLAT_MIN_DELAI')? MODULE_SHIPPING_FLAT_MIN_DELAI: 0);
+
+
+ self::$current= array(
+ 'id' => $this->code,
+ 'title' => $this->title,
+ 'icon'=>tep_image($this->icon, $this->title),
+ 'with_saterday' => $this->with_saterday,
+ 'min_delai' => $delai,
+ );
+
+ $array = shippingUtility::getDelai( $delai );
+
+ self::$current['delai'] = $array['delai'];
+ self::$current['date_remise_provider'] = $array['date_dep'];
+ self::$current['date_delivery'] = $array['date_liv'];
+ }
+
+
+ /**
+ @brief after save table order, adjust modules data save
+ @param $id int order id
+ */
+ public function after_update($id){
+
+ if(empty($id) || (int)$id >0 ){
+ return true;
+ }
+
+// exit;
+ return false;
+ }
+
+ /**
+ @brief load specific data modules
+ */
+ public function load_post_values(){
+ }
+
+ /**
+ @brief load specific data modules
+ */
+ public function load_db_value(){
+ }
+
+ /**
+ @brief retrun html view data modules
+ */
+ public function display_view(){
+// if (tep_not_null(orders::$order->info['cc_type']) || tep_not_null(orders::$order->info['cc_owner']) )
+
+
+
+ return MGabCont::CallGab('view','shipping/'.__CLASS__,'orders');
+ }
+
+ /**
+ @brief retrun html view form data modules
+ */
+ public function display_edit(){
+ return MGabCont::CallGab('edit','shipping/'.__CLASS__,'orders');
+ }
+
+
+ public function get_error() {
+ return false;
+ }
+
+
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
+ public function check() {
+ if (!isset($this->_check)) {
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_FLAT%' ");
+ if( tep_db_num_rows($check_query) == count($this->keys()) ) $this->_check=true;
+ else {
+ $this->remove();
+ $this->_check=false;
+ }
+ }
+ return $this->_check;
+ }
+
+
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ public function keys() {
+ return array(
+ 'MODULE_SHIPPING_FLAT_COST',
+ 'MODULE_SHIPPING_FLAT_HANDLING',
+ 'MODULE_SHIPPING_FLAT_TAX_CLASS',
+ 'MODULE_SHIPPING_FLAT_ZONE',
+ 'MODULE_SHIPPING_FLAT_MIN_DELAI',
+ 'MODULE_SHIPPING_FLAT_SORT_ORDER',
+ 'MODULE_SHIPPING_FLAT_ICON'
+ );
+ }
+
+ /**
+ @fn install()
+ @brief add all configuration
+ @note
+ - Modules can emarquer sql installation instructions, however, in the case of transverse information, or dependent of an extension, preferring the implementation of an extension, file with sql independent
+ - please, pefix all var configuration by 'MODULE_OT__MODT...
[truncated message content] |
|
From: <os...@us...> - 2012-10-29 08:56:42
|
Revision: 4646
http://oscss.svn.sourceforge.net/oscss/?rev=4646&view=rev
Author: oscim
Date: 2012-10-29 08:56:35 +0000 (Mon, 29 Oct 2012)
Log Message:
-----------
suite correction et evolution shipping
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/modulesUtility.php
branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php
branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
branches/2.1.1/catalog/common/classes/datetimeUtility.php
branches/2.1.1/catalog/common/classes/shippingUtility.php
Modified: branches/2.1.1/catalog/admin/includes/classes/modulesUtility.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/modulesUtility.php 2012-10-28 19:26:00 UTC (rev 4645)
+++ branches/2.1.1/catalog/admin/includes/classes/modulesUtility.php 2012-10-29 08:56:35 UTC (rev 4646)
@@ -68,7 +68,7 @@
$r = new stdClass;
- $r->classe = (( substr($row,-3) =='php') ? substr($row,0, -4) : $filename );
+ $r->classe = (( substr($filename,-3) =='php') ? substr($filename,0, -4) : $filename );
@@ -105,7 +105,6 @@
$r->detail = self::info_module($filename,DIR_FS_CATALOG.DIR_WS_MODULES.$dt->module_directory, DIR_FS_ADMIN.DIR_WS_MODULES.$dt->module_directory, '.php');
-
$oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/'.$type . '/' .$r->detail->filelg.'.txt');
$oscss->pile_file_lang(DIR_FS_CATALOG.DIR_WS_LANGUAGES.$language.'/modules/'.$type . '/' .$r->detail->filelg.'.txt');
@@ -142,21 +141,26 @@
$fil = substr($file,0,-strlen($ref_ext));
-
$fil = (strlen($ref_ext)< strlen($file) && substr($file, strrpos($file, '.')) == $ref_ext ) ? $fil : $file;
+ if (substr($file, strrpos($file, '.')) != $ref_ext)
+ $file.=$ref_ext;
//! module dans leur propre sous rep
if(is_dir($ref_shop.$fil)) {
$ref_shop .= $fil.'/';
+ $file =$fil.$ref_ext;
+ $filelg = $fil.'/';
+ }
+
+ if(is_dir($ref_admin.$fil)) {
$ref_admin .= $fil.'/';
$file =$fil.$ref_ext;
$filelg = $fil.'/';
}
- //! verif file in ext php
- if (substr($file, strrpos($file, '.')) == $ref_ext) {
- $class=substr($file, 0, (strlen($file)-strlen($ref_ext)));
+
+ $class=$fil;
$code=strtoupper($class);
if (file_exists($ref_admin.$file))
@@ -167,8 +171,8 @@
$_obj->filemod=$file;
$_obj->classe=$class;
$_obj->filelg=$filelg.$class;
- }
+
return $_obj;
}
}
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-28 19:26:00 UTC (rev 4645)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-29 08:56:35 UTC (rev 4646)
@@ -530,7 +530,7 @@
<td class="tcenter">
<?php if( ($pshipping->qty - $pshipping->qt_expedie) > 0 ): ?>
- <?php echo tep_draw_input_field('shipping_qt['.$pshipping->rowid.']','', ($pshipping->qty - $pshipping->qt_expedie) ); ?>
+ <?php echo tep_draw_input_field('shipping_qt['.$pshipping->rowid.']','', ($pshipping->qty - $pshipping->qt_expedie) ) .tep_draw_hidden_field('shipping_qt_max['.$pshipping->rowid.']','', ($pshipping->qty - $pshipping->qt_expedie) ) ; ?>
<?php else: ?>
<?php echo ($pshipping->qty - $pshipping->qt_expedie); ?>
<?php endif; ?>
@@ -547,13 +547,26 @@
<fieldset class="block_field fleft w_50" >
<legend><?php echo __('entry shipping new expedition details'); ?></legend>
+
<p class="block_input">
+ <label><?php echo __('label shipping module'); ?></label>
+ <?php echo orders::$order->mod['class_shipping'] ; ?>
+ </p>
+
+
+ <p class="block_input">
<label><?php echo __('label shipping tracking number'); ?></label>
<?php echo tep_draw_input_field('shipping_tracing_number','', '' ); ?>
</p>
<p class="block_input">
<label><?php echo __('label shipping tracking url'); ?></label>
- <?php echo tep_draw_input_field('shipping_tracing_url','', '' ); ?>
+ <?php //echo tep_draw_input_field('shipping_tracing_url','', '' ); ?>
+
+ <?php if(tep_not_null(orders::GetModVar( 'shipping',orders::$order->mod['class_shipping'], 'tracking_url'))) : ?>
+ <?php echo orders::GetModVar( 'shipping',orders::$order->mod['class_shipping'], 'tracking_url') . tep_draw_hidden_field('shipping_tracing_url','', orders::GetModVar( 'shipping',orders::$order->mod['class_shipping'], 'tracking_url') ) . tep_draw_hidden_field('shipping_method','',orders::$order->mod['class_shipping'] ); ?>
+ <?php else: ?>
+ <?php echo tep_draw_input_field('shipping_method','',orders::$order->mod['class_shipping'] ); ?>
+ <?php endif; ?>
</p>
</fieldset>
Modified: branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php 2012-10-28 19:26:00 UTC (rev 4645)
+++ branches/2.1.1/catalog/admin/includes/modules/configuration/modexpedition.php 2012-10-29 08:56:35 UTC (rev 4646)
@@ -292,7 +292,6 @@
*/
public function draw(){
global $action,$gparentID;
-// if($action=='cfg') return;
switch($action){
case 'modules';
@@ -312,11 +311,16 @@
foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/') as $row){
- if( substr($row,-3) =='php'){
+ if( substr($row,-3) =='php' ){
$class = substr($row,0, -4);
if(!isset(self::$module[$class]))
self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
}
+ elseif( ( is_dir( DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/' . $row) && file_exists( DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/' . $row .'/'.$row. '.php' ) )){
+ $class = $row;
+ if(!isset(self::$module[$class]))
+ self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
+ }
}
foreach(scan(DIR_FS_CATALOG_MODULES.'shipping/') as $row){
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-28 19:26:00 UTC (rev 4645)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-29 08:56:35 UTC (rev 4646)
@@ -739,9 +739,13 @@
'status'=>1,
'products'=>array()
);
+ $total = array();
foreach($_POST['shipping_qt'] as $k=>$row)
- if($row > 0) $array['products'][] = array('products_id'=>$k , 'qt'=>$row) ;
+ if($row > 0){
+ $array['products'][] = array('products_id'=>$k , 'qt'=>$row) ;
+ $total[] = (($row == (int)@$_POST['shipping_qt_max'][$k])? true : false );
+ }
if(count($array['products'])>0)
switch((string)$_GET['method']){
@@ -758,7 +762,7 @@
break;
}
- if(!isset($_POST['shipping_qt']) || !is_array($_POST['shipping_qt']) ) {
+ if( (!isset($_POST['shipping_qt']) || !is_array($_POST['shipping_qt'])) || (!in_array(false, $total)) ) {
/// TODO Add var configuration DEFAULT_ORDERS_STATUS_EXPED
// adjust date update
$r = sqlorder::update(array('id'=>$oID, 'status'=>4/*DEFAULT_ORDERS_STATUS_EXPED*/, 'comments'=>__('@orders txt expedition process update')));
Modified: branches/2.1.1/catalog/common/classes/datetimeUtility.php
===================================================================
--- branches/2.1.1/catalog/common/classes/datetimeUtility.php 2012-10-28 19:26:00 UTC (rev 4645)
+++ branches/2.1.1/catalog/common/classes/datetimeUtility.php 2012-10-29 08:56:35 UTC (rev 4646)
@@ -121,7 +121,7 @@
if(empty($date))
$date = time();
- for ($i = 1; $i < 7; $i++) {
+ for ($i = 0; $i < 7; $i++) {
$tmp_d = ($date + ( 86400 * $i )) ;
if( self::DayIsOpened( $tmp_d , $with_saterday , $with_sunday , $activ_paques ) )
return $tmp_d;
Modified: branches/2.1.1/catalog/common/classes/shippingUtility.php
===================================================================
--- branches/2.1.1/catalog/common/classes/shippingUtility.php 2012-10-28 19:26:00 UTC (rev 4645)
+++ branches/2.1.1/catalog/common/classes/shippingUtility.php 2012-10-29 08:56:35 UTC (rev 4646)
@@ -37,8 +37,8 @@
// Comptabilise le nombre de jours
$totOuvrables = datetimeUtility::IntervalDayOpened($date_depart, $date_livraison, $with_saterday, false, true);
- // On ajoute les jour ouvrables
- $date_livraison = $date_depart + $totOuvrables * 86400;
+ // On ajoute les jour ouvrables + control jour ouvrable
+ $date_livraison = datetimeUtility::NextDayOpened( ( $date_depart + ($totOuvrables * 86400) ), $with_saterday, false, true);
return array(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-10-29 22:23:26
|
Revision: 4647
http://oscss.svn.sourceforge.net/oscss/?rev=4647&view=rev
Author: oscim
Date: 2012-10-29 22:23:19 +0000 (Mon, 29 Oct 2012)
Log Message:
-----------
suite dev
add var conf pour le status expedie et livree - mise a niveau de l'install
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php
branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-10-29 22:23:19 UTC (rev 4647)
@@ -124,7 +124,7 @@
<?php if(isset(orders::$order->delivery['street_address'])): ?>
<div class="block_input">
<?php if(!isset($_REQUEST['address']) || ( isset($_REQUEST['address']) && $_REQUEST['address'] !='delivery' ) ): ?>
- <?php echo tep_address_format(orders::$order->delivery['format_id'], orders::$order->delivery, 1, '', '<br />'); ?></p>
+ <?php echo tep_address_format(orders::$order->delivery['format_id'], orders::$order->delivery, 1, '', '<br />'); ?>
<?php else: ?>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/admin/includes/gabarit/shipping/display_view.edit.gab 2012-10-29 22:23:19 UTC (rev 4647)
@@ -95,6 +95,11 @@
<div class="main-orders block fleft w_50 padd_w">
+ <h4><?php echo __('@shipping heading delvery address') ?></h4>
+ <p>
+ <?php echo tep_address_format(shipping::$order->delivery['format_id'], shipping::$order->delivery, 1, '', '<br />'); ?>
+ <br class="clear" />
+ </p>
</div>
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2012-10-29 22:23:19 UTC (rev 4647)
@@ -53,6 +53,11 @@
$lang['DEFAULT_ORDERS_STATUS_ID_S']="Commande annulée" ;
$lang['DEFAULT_ORDERS_STATUS_ID_L']="definir le statut d'une commande annule." ;
+$lang['DEFAULT_ORDERS_STATUS_SHIPPING_S']="Commande Expedié" ;
+$lang['DEFAULT_ORDERS_STATUS_SHIPPING_L']="definir le statut d'une commande Expedié." ;
+$lang['DEFAULT_ORDERS_STATUS_DELIVERY_S']="Commande Livré" ;
+$lang['DEFAULT_ORDERS_STATUS_DELIVERY_L']="definir le statut d'une commande Livré." ;
+
$lang['ORDERS_NUMBER_PREFIX_S']="Préfixe numéro commande" ;
$lang['ORDERS_NUMBER_PREFIX_L']="Indiquer le préfixe des numéros de commande le chiffre precise le nombre de chiffre du numéro; ex: 'ym-5'(1005-00001); Laissez vide si vous ne voulez pas de préfixe." ;
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2012-10-29 22:23:19 UTC (rev 4647)
@@ -11,17 +11,17 @@
$lang['heading title shipping']="Expeditions vers les clients" ;
-// $lang['tab services briefs']="Details" ;
+$lang['@shipping filter tab clause']="Généric" ;
// $lang['tab services details']="Commande" ;
/* Action */
/* Listing */
$lang['table heading shipping id']="n°" ;
- $lang['table heading order id']="Cmd n°" ;
- $lang['table heading customers']="Clients" ;
- $lang['table heading date expedition']="Expd. le" ;
- $lang['table heading method']="Méthode" ;
- $lang['table heading status']="Etat" ;
+ $lang['@shipping table heading order id']="Cmd n°" ;
+ $lang['@shipping table heading customers']="Clients" ;
+ $lang['@shipping table heading date expedition']="Expd. le" ;
+ $lang['@shipping table heading method']="Méthode" ;
+ $lang['@shipping table heading status']="Etat" ;
$lang['table heading action']="Action" ;
@@ -47,6 +47,10 @@
$lang['@shipping table heading qt expedie']="Qté." ;
$lang['@shipping table heading methode']="Méthode" ;
+
+
+ $lang['@shipping heading delvery address']="Adrresse de livraison" ;
+
$lang['heading documents']="Documents" ;
$lang['shipping table pdf heading weight']="Poids" ;
$lang['shipping table pdf heading date']="Date" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-29 22:23:19 UTC (rev 4647)
@@ -763,9 +763,8 @@
}
if( (!isset($_POST['shipping_qt']) || !is_array($_POST['shipping_qt'])) || (!in_array(false, $total)) ) {
- /// TODO Add var configuration DEFAULT_ORDERS_STATUS_EXPED
// adjust date update
- $r = sqlorder::update(array('id'=>$oID, 'status'=>4/*DEFAULT_ORDERS_STATUS_EXPED*/, 'comments'=>__('@orders txt expedition process update')));
+ $r = sqlorder::update(array('id'=>$oID, 'status'=>DEFAULT_ORDERS_STATUS_SHIPPING, 'comments'=>__('@orders txt expedition process update')));
}
tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/shipping.php 2012-10-29 22:23:19 UTC (rev 4647)
@@ -30,12 +30,16 @@
*/
public static $list=array();
/**
- @var object $order
+ @var object $shipping
*/
public static $shipping;
/**
- @var int Id order
+ @var object $order
*/
+ public static $order;
+ /**
+ @var int Id shipping
+ */
public static $oID;
/**
@var bool $update autorise mise a jour status
@@ -73,7 +77,12 @@
@var requis pour generation pdf
*/
public static $file_type_array ;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
+
/**
@brief class constructor
*/
@@ -129,53 +138,209 @@
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'=>'4%', 'class'=>'tcenter', 'txt'=>__('table heading shipping 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 expedition')),
-// 5 =>array('width'=>'150px','class'=>'tcenter', 'txt'=>__('table heading order total')),
- 6 =>array('width'=>'12%', 'txt'=>__('table heading method')),
- 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')),
- );
+ switch(self::$action){
- self::$InitInfo['tfooter']['listing']=array(
- 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- 2 =>array('width'=>'4%', 'class'=>'tcenter', 'txt'=>' ' ),
- 3 =>array('width'=>'8%','class'=>'tcenter', 'txt'=>' ' ),
- 4 =>array('width'=>'30%','class'=>'tcenter', 'txt'=>' ' ),
- 5 =>array('width'=>'10%', 'txt'=>' '),
- 6 =>array('width'=>'12%', 'txt'=>' '),
- 7 =>array('width'=>'8%', 'txt'=>' '),
- 8 =>array('width'=>'10%','class'=>'row_action', 'txt'=>' '),
- );
+ case 'listing':
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 's.row_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('@shipping table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'o.orders_id' => array(
+ 'sort'=>true,
+ 'alias'=>'order_id',
+ 'text'=>__('@shipping table heading order id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
- /**
- @remarks this define col in table, and if is possible sort
- Just for Edit listing
- */
- self::$InitInfo['modele']['listing']=array(
- 0 =>false,
- 1 =>false,
- 'shipping_id'=>true,
- 'orders_id'=>true,
- 'customers_id'=>true,
- 'date_expedition'=>true,
- 'method'=>true,
- 'status'=>true,
- 'action' =>false
+ 'o.customers_id' => array(
+ 'sort'=>true,
+ 'text'=> __('@shipping table heading customers'),
+ 'width'=>'20%',
+ 'class'=>'tleft',
+ ),
+
+ 's.date_expedition' => array(
+ 'sort'=>true,
+ 'text'=>__('@shipping table heading date expedition'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+// 'o.last_modified' => array(
+// 'sort'=>true,
+// 'text'=>__('orders table heading last modified'),
+// 'width'=>'10%',
+// 'class'=>'tcenter',
+// ),
+ 'method' => array(
+ 'sort'=>true,
+ 'text'=>__('@shipping table heading method'),
+ 'width'=>'12%',
+ 'class'=>'tcenter',
+ ),
+ 's.status' =>array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=> __('@shipping table heading status'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+
+ );
+
+
+ /**
+ @remarks Construct all list , fields , th/td
+ */
+ self::$InitInfo['theader']['listing']=array(
+ 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+ 0 =>false,
+ 1 =>false,
);
+
+
+
+ // min fields and not view directly colonne fields
+ $listfield = 's.row_id, o.orders_id , st.status_color as shipping_status_color, st.status_id as status, ';
+ // put in
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+ // check and appli
+ foreach(self::$allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(is_array($row)){
+ $txt = $row['text'];
+ $alias = (isset($row['alias'])? $row['alias'] : $clean);
+ $css = (isset($row['class'])? $row['class'] : 'tcenter');
+ $width = (isset($row['width'])? $row['width'] : '5%');
+ }
+ else{
+ $txt = $row;
+ $alias = $clean;
+ $css = 'tcenter';
+ $width = '5%';
+ }
+
+
+
+ if(
+ ( isset($in_session[$alias]) && (string)$in_session[$alias] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+ $_SESSION['filters']['allfields'][$alias] = 'on';
+ /**
+ @remarks this define col theader title, and ajust html code
+ */
+ self::$InitInfo['theader']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt);
+ self::$InitInfo['tfooter']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt );
+ /**
+ @remarks this define col in table, and if is possible sort
+ */
+ self::$InitInfo['modele']['listing'][$alias]=true;
+
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+ }
+ }
+
+ self::$InitInfo['modele']['listing']['action']=false;
+ self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+ self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;
+
+ /**
+ @remarks filter based on status orders
+ */
+
+ if(self::$view =='opened')
+ self::$InitInfo['adjust']['sWhere'] .= " AND status < '3' ";
+ elseif(self::$view =='progress')
+ self::$InitInfo['adjust']['sWhere'] .= " AND status < '3' AND status >= 0 ";
+// elseif(self::$view =='livre')
+// $wh .=" status = '5' ";
+ elseif(self::$view =='closed')
+ self::$InitInfo['adjust']['sWhere'] .= " AND status = '9' ";
+ elseif(self::$view =='annulate')
+ self::$InitInfo['adjust']['sWhere'] .= " AND status < 0 ";
+
+
+ /**
+ @remarks filter based on date_purchased orders
+ */
+// if(self::$view =='thisday'){
+// $_SESSION['filters'][__CLASS__]['dates']['start'] = date('Y-m-d');
+// $_SESSION['filters'][__CLASS__]['dates']['end'] = date('Y-m-d');
+// }
+// elseif(self::$view =='thisweek'){
+// $_SESSION['filters'][__CLASS__]['dates']['start'] = date('Y-m-d', time() - (7 * 24 * 3600));
+// $_SESSION['filters'][__CLASS__]['dates']['end'] = date('Y-m-d');
+// }
+//
+// if(isset($_SESSION['filters'][__CLASS__]['dates']['start']))
+// $_SESSION['filters']['dates']['start'] = $_SESSION['filters'][__CLASS__]['dates']['start'].' 00:00:00';
+// else
+// $_SESSION['filters']['dates']['start'] = date('Y-m-d', time() - 7 * 24 * 60).' 00:00:00';
+//
+// if(isset($_SESSION['filters'][__CLASS__]['dates']['end']))
+// $_SESSION['filters']['dates']['end'] = $_SESSION['filters'][__CLASS__]['dates']['end'].' 23:59:59';
+// else
+// $_SESSION['filters']['dates']['end'] = date('Y-m-d').' 23:59:59';
+//
+// if(tep_not_null($_SESSION['filters']['dates']['start']))
+// self::$InitInfo['adjust']['sWhere'] .=" AND date_purchased >= '".tep_db_input($_SESSION['filters']['dates']['start'])."'";
+// if(tep_not_null($_SESSION['filters']['dates']['end']))
+// self::$InitInfo['adjust']['sWhere'] .=" AND date_purchased <= '".tep_db_input($_SESSION['filters']['dates']['end'])."'";
+
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'title'=>__('@shipping filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ ),
+ array(
+ 'title'=>__('@shipping filter tab fields'),
+ 'type'=>'listfield'
+ ),
+ );
+
+ /**
+ @remarks Put detail for listing methode
+ */
+ self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+
+ break;
+ }
+
+
$DB=Database::getInstance();
self::$shipping_statuses=array();
$shipping_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='shipping' and language_id = '" . (int)$languages_id . "'");
@@ -185,6 +350,9 @@
}
+
+
+
$mutliactionmenu = array(
array('id'=>'','text'=>'--'),
// liste detail de chaque colis
@@ -212,6 +380,23 @@
switch (self::$action) {
/**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters']=array();
+
+ // appli result fields hidden/visible
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+ /**
@remarks pdf generate for all docs
*/
case 'pdf':
@@ -489,7 +674,7 @@
$res= sqlshipping::fetch(array('id'=>(int)self::$oID ), true);
-// $res->lines=sqlshipping::fetch(array('id'=>(int)self::$oID ), true);
+ self::$order = new order($res->orders_id);
return $res;
break;
@@ -547,33 +732,50 @@
$adjust=new objectInfo(self::$InitInfo['adjust']);
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
- $wh=' WHERE ';
- if(self::$view =='opened')
- $wh .=" status < '3' ";
- elseif(self::$view =='progress')
- $wh .=" status < '3' AND status >= 0 ";
-// elseif(self::$view =='livre')
-// $wh .=" status = '5' ";
- elseif(self::$view =='closed')
- $wh .=" status = '9' ";
- elseif(self::$view =='annulate')
- $wh .=" status < 0 ";
+ /**
+ @remarks replace id by name col
+ */
+ if(!empty($adjust->sWhere)) {
- if(tep_not_null($adjust->sWhere)){
-// $adjust->sWhere=str_replace(
-// array('shipping_id', 'order_total', 'customers_id', 'shipping_status_name'),
-// array('o.shipping_id', ' ot.text', 'o.customers_name', 's.status_name'),
-// $adjust->sWhere
-// );
+ foreach(self::$allfields as $key=>$row){
+ if(is_array($row) && isset($row['alias']) ){
+ $k[] = '#[(]'.$row['alias'].'[)]#i';
+ $k[] = '# '.$row['alias'].' #i';
+ $k[] = '# \.'.$row['alias'].'#i';
- $wh .= ( (strlen($wh) >7)? " AND ": "" )." ".$adjust->sWhere." ";
+ $v[] = '('.$key.')';
+ $v[] = ' '.$key.' ';
+ $v[] = '.'.$key.' ';
+ }
+ }
+
+ if(isset($k))
+ $adjust->sWhere = preg_replace($k,$v, $adjust->sWhere);
}
- if(strlen($wh) <=7)
- $wh='';
+ $query_raw = "SELECT DISTINCT ".$adjust->listfields.
+ " FROM " . TABLE_SHIPPING . " s ".
+ " LEFT JOIN " . TABLE_ORDERS . " o on (o.orders_id = s.orders_id) ".
+ " LEFT JOIN " . TABLE_STATUS . " st ON( st.status_id = s.row_id and st.status_type='shipping' and st.language_id = '" . (int)$adjust->languages_id . "') ".
+ " WHERE 1 ".$adjust->sWhere.
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 's.row_id DESC');
+// var_dump($query_raw);
+// exit;
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+/*
$query_raw = "SELECT DISTINCT s.*, o.customers_id FROM " . TABLE_SHIPPING . " 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);
@@ -582,7 +784,7 @@
$res=self::FormatDBValue($_query);
- return $res;
+ return $res;*/
break;
/**
@@ -606,22 +808,14 @@
$mutliactionmenu = array(
// // array('id'=>'edit', 'text'=>IMAGE_EDIT ),
array('id'=>'','text'=>'--'),
+// array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
- array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
);
break;
-
-
case 'delete';
default:
-// $shipping_query_raw = "select distinct o.shipping_id,o.shipping_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 shipping_status_name, s.status_color as shipping_status_color,ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.shipping_id = ot.shipping_id), " . TABLE_STATUS . " s where o.shipping_status = s.status_id and s.status_type='shipping' and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_id='".self::$oID."' ";
-
-// $currency_query = $DB->query($shipping_query_raw);
-
-// return new objectInfo($currency_query->fetchAssoc() );
-
}
}
@@ -792,17 +986,18 @@
switch (parent::$action) {
case 'listing':
while ($shipping = $_query->fetchAssoc()) {
- $ord['oID']=$shipping['row_id'];
- $ord['shipping_id']=$shipping['row_id'];
- $ord['orders_id']=$shipping['orders_id'];
- $ord['customers_id']=tep_customers_row_action($shipping['customers_id'], array('origin'=>self::FILENAME));
+ $ord['oID']=$shipping['id'];
+ $ord['id']=$shipping['id'];
+ $ord['order_id']=$shipping['orders_id'];
+ $ord['customers_id']=tep_customers_row_action((int)$shipping['customers_id'], array('origin'=>self::FILENAME));
$ord['date_expedition']=tep_datetime_short($shipping['date_expedition']);
- $ord['method']=$shipping['method'];
+ $ord['method']=(!empty($shipping['method']) ? $shipping['method'] : '' );
$ord['status']=self::GetshippingStatus($shipping, false);
- $ord[0]=$shipping['row_id'];
- $ord[1]=tep_draw_checkbox_field('action_multi['.$shipping['row_id'].']','action_mutli_'.$shipping['row_id'],$shipping['row_id']);
+ $ord[0]=$shipping['id'];
+ $ord[1]=tep_draw_checkbox_field('action_multi['.$shipping['id'].']','action_mutli_'.$shipping['id'],$shipping['id']);
$ord['action']=self::get_item_action($ord);
$res[]=$ord;
+
}
break;
}
@@ -833,7 +1028,7 @@
$query_s='action=setflag&sID=' . $row['row_id'].'&flag=';
switch((int)$row['status']){
- case '0';
+ case 0;
$text = __('shipping opened');
break;
// case '2';
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-10-29 22:23:19 UTC (rev 4647)
@@ -354,7 +354,9 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '6', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '-1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(),'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_PAYED_S', 'DEFAULT_ORDERS_STATUS_PAYED', '2', 'DEFAULT_ORDERS_STATUS_PAYED_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '2');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_SHIPPING_S', 'DEFAULT_ORDERS_STATUS_SHIPPING', '4', 'DEFAULT_ORDERS_STATUS_SHIPPING_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_DELIVERY_S', 'DEFAULT_ORDERS_STATUS_DELIVERY', '5', 'DEFAULT_ORDERS_STATUS_DELIVERY_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '5');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', 'true', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-10-29 08:56:35 UTC (rev 4646)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-10-29 22:23:19 UTC (rev 4647)
@@ -307,6 +307,10 @@
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_PAYED_S', 'DEFAULT_ORDERS_STATUS_PAYED', '2', 'DEFAULT_ORDERS_STATUS_PAYED_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added,
+use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_SHIPPING_S', 'DEFAULT_ORDERS_STATUS_SHIPPING', '4', 'DEFAULT_ORDERS_STATUS_SHIPPING_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_DELIVERY_S', 'DEFAULT_ORDERS_STATUS_DELIVERY', '2', 'DEFAULT_ORDERS_STATUS_DELIVERY_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', 'true', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_FEATURED_S', 'DATATYPES_ROOTLISTING_FEATURED', 'product', 'DATATYPES_ROOTLISTING_FEATURED_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-11-01 09:21:26
|
Revision: 4649
http://oscss.svn.sourceforge.net/oscss/?rev=4649&view=rev
Author: oscim
Date: 2012-11-01 09:21:19 +0000 (Thu, 01 Nov 2012)
Log Message:
-----------
Suite travail et correction gestion shipping
suite travail estimation delai de livraison
suite implementation gestion des livraison en BO
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt
branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
branches/2.1.1/catalog/admin/includes/modules/shipping/item.php
branches/2.1.1/catalog/common/classes/datetimeUtility.php
branches/2.1.1/catalog/common/classes/order.php
branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/flat.txt
branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/item.txt
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/item.view.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/flat.txt
Added: branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/item.view.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/item.view.gab (rev 0)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/shipping/item.view.gab 2012-11-01 09:21:19 UTC (rev 4649)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2011 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 19/11/11, 19:36
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+ <p class="block_input">
+
+ <?php echo item::$current['title'] ?>
+ <br />
+ <?php echo sprintf(__('@item text info min delai %s'), datetimeUtility::SecondInDay(item::$current['min_delai'])) ?>
+ <br />
+ <?php echo sprintf(__('@item text info remise provider shipping at %s'),item::$current['date_remise_provider']) ?>
+ <br />
+ <?php echo sprintf(__('@item text info estimation %s day and delivery for date %s'), item::$current['delai'] , item::$current['date_delivery'] ) ?>
+ </p>
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/fr_FR.php 2012-11-01 09:21:19 UTC (rev 4649)
@@ -30,7 +30,7 @@
define('DATE_TIME_FORMAT'," ".DATE_FORMAT_SHORT . " %H:%M:%S" );
-// all date (dd/mm) public holiday in country
+// all date (dd/mm;...) public holiday in country
define('CALENDAR_PUBLIC_HOLIDAY',"01/01;01/05;08/05;14/07;15/08;01/11;11/11;25/12");
Added: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/flat.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/flat.txt (rev 0)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/flat.txt 2012-11-01 09:21:19 UTC (rev 4649)
@@ -0,0 +1,39 @@
+<?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 01/11/2012, 12:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+/* generic */
+$lang['module shipping flat text title']="Forfait" ;
+$lang['module shipping flat text description']="livraison au forfait" ;
+$lang['module shipping flat text way']="soit :" ;
+$lang['module shipping flat text title in shipping']="Forfait :" ;
+
+/* View in order */
+$lang['@flat text info min delai %s']="delai courant : %s jours";
+$lang['@flat text info remise provider shipping at %s']="date de remise au transporteur %s";
+$lang['@flat text info estimation %s day and delivery for date %s']="Estmiation à %s pour une livraison le %s";
+
+
+/* Section config */
+$lang['MODULE_SHIPPING_FLAT_COST_S'] = "Coût de livraison";
+$lang['MODULE_SHIPPING_FLAT_COST_L'] = "Le coût de livraison sera multiplié par le nombre d'articles dans la commande employant cette méthode.";
+$lang['MODULE_SHIPPING_FLAT_HANDLING_S'] = "Coûts de manutention";
+$lang['MODULE_SHIPPING_FLAT_HANDLING_L'] = "Majorer le prix, avec la valeur du coût de la manutention";
+$lang['MODULE_SHIPPING_FLAT_TAX_CLASS_S'] = "Type de taxe";
+$lang['MODULE_SHIPPING_FLAT_TAX_CLASS_L'] = "Employez la classe suivante de taxe sur les coûts de livraison.";
+$lang['MODULE_SHIPPING_FLAT_ZONE_S'] = "Zone de livraison";
+$lang['MODULE_SHIPPING_FLAT_ZONE_L'] = "Permettre seulement cette méthode de livraison pour la zone choisie.";
+$lang['MODULE_SHIPPING_FLAT_SORT_ORDER_S'] = "Ordre de tri";
+$lang['MODULE_SHIPPING_FLAT_SORT_ORDER_L'] = "Preciser la position de ce module par rapport aux autres";
+$lang['MODULE_SHIPPING_FLAT_ICON_S'] = "Icone";
+$lang['MODULE_SHIPPING_FLAT_ICON_L'] = "configurer un icone pour ce mode de livraison";
+$lang['MODULE_SHIPPING_FLAT_MIN_DELAI_S'] = "Delais de livraison";
+$lang['MODULE_SHIPPING_FLAT_MIN_DELAI_L'] = "Durée en jours min avant livraison";
+?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt 2012-11-01 09:21:19 UTC (rev 4649)
@@ -8,29 +8,31 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+/* generic */
+$lang['module shipping text item title']="par item" ;
+$lang['module shipping text item description']="livraison par item " ;
+$lang['module shipping item text way']="soit " ;
+$lang['module shipping item text title in shipping']="par item :" ;
-$lang['module shipping text item title']="transporteur" ;
-$lang['module shipping text item description']="livraison classique :" ;
-$lang['module shipping item text way']="soit :" ;
-$lang['module shipping item text title in shipping']="transporteur :" ;
+/* View in order */
+$lang['@item text info min delai %s']="delai courant : %s jours";
+$lang['@item text info remise provider shipping at %s']="date de remise au transporteur %s";
+$lang['@item text info estimation %s day and delivery for date %s']="Estmiation à %s pour une livraison le %s";
-
+/* Section config */
$lang['MODULE_SHIPPING_ITEM_COST_S'] = "Coût de livraison";
$lang['MODULE_SHIPPING_ITEM_COST_L'] = "Le coût de livraison sera multiplié par le nombre d'articles dans la commande employant cette méthode.";
-
$lang['MODULE_SHIPPING_ITEM_HANDLING_S'] = "Coûts de manutention";
$lang['MODULE_SHIPPING_ITEM_HANDLING_L'] = "Majorer le prix, avec la valeur du coût de la manutention";
-
$lang['MODULE_SHIPPING_ITEM_TAX_CLASS_S'] = "Type de taxe";
$lang['MODULE_SHIPPING_ITEM_TAX_CLASS_L'] = "Employez la classe suivante de taxe sur les coûts de livraison.";
-
$lang['MODULE_SHIPPING_ITEM_ZONE_S'] = "Zone de livraison";
$lang['MODULE_SHIPPING_ITEM_ZONE_L'] = "Permettre seulement cette méthode de livraison pour la zone choisie.";
-
$lang['MODULE_SHIPPING_ITEM_SORT_ORDER_S'] = "Ordre de tri";
$lang['MODULE_SHIPPING_ITEM_SORT_ORDER_L'] = "Preciser la position de ce module par rapport aux autres";
-
$lang['MODULE_SHIPPING_ITEM_ICON_S'] = "Icone";
$lang['MODULE_SHIPPING_ITEM_ICON_L'] = "configurer un icone pour ce mode de livraison";
+$lang['MODULE_SHIPPING_ITEM_MIN_DELAI_S'] = "Delais de livraison";
+$lang['MODULE_SHIPPING_ITEM_MIN_DELAI_L'] = "Durée en jours min avant livraison";
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-11-01 09:21:19 UTC (rev 4649)
@@ -747,6 +747,7 @@
$total[] = (($row == (int)@$_POST['shipping_qt_max'][$k])? true : false );
}
+
if(count($array['products'])>0)
switch((string)$_GET['method']){
case 'add':
@@ -1164,7 +1165,8 @@
*/
public static function GetModVar($type, $mod, $namevar){
if(isset(sqlorder::$modules_type->$type)
- && isset(sqlorder::$modules_type->$type->modules[$mod])
+ && isset(sqlorder::$modules_type->$type->modules[$mod])
+ && isset(sqlorder::$modules_type->$type->modules[$mod]->$namevar)
)
return sqlorder::$modules_type->$type->modules[$mod]->$namevar;
}
Modified: branches/2.1.1/catalog/admin/includes/modules/shipping/item.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/shipping/item.php 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/admin/includes/modules/shipping/item.php 2012-11-01 09:21:19 UTC (rev 4649)
@@ -17,10 +17,15 @@
public $description;
public $icon;
public $sort_order;
-
+ /**
+ @var activate module
+ */
public $enabled = true;
-
/**
+ @var use in gabarit file
+ */
+ public static $current;
+ /**
@var use shipping/delivery saterday
*/
public $with_saterday = false;
@@ -39,6 +44,21 @@
$this->description = __('module shipping item text description');
$this->sort_order = (defined('MODULE_SHIPPING_ITEM_SORT_ORDER;')? MODULE_SHIPPING_ITEM_SORT_ORDER: 0);
$this->icon = (defined('MODULE_SHIPPING_ITEM_ICON')? MODULE_SHIPPING_ITEM_ICON : '');
+
+ $delai = (defined('MODULE_SHIPPING_ITEM_MIN_DELAI')? MODULE_SHIPPING_ITEM_MIN_DELAI: 86400);
+ self::$current= array(
+ 'id' => $this->code,
+ 'title' => $this->title,
+ 'icon'=>tep_image($this->icon, $this->title),
+ 'with_saterday' => $this->with_saterday,
+ 'min_delai' => $delai,
+ );
+
+ $array = shippingUtility::getDelai( $delai );
+
+ self::$current['delai'] = $array['delai'];
+ self::$current['date_remise_provider'] = $array['date_dep'];
+ self::$current['date_delivery'] = $array['date_liv'];
}
@@ -127,6 +147,7 @@
'MODULE_SHIPPING_ITEM_TAX_CLASS',
'MODULE_SHIPPING_ITEM_ZONE',
'MODULE_SHIPPING_ITEM_SORT_ORDER',
+ 'MODULE_SHIPPING_ITEM_MIN_DELAI',
'MODULE_SHIPPING_ITEM_ICON'
);
}
@@ -157,6 +178,8 @@
$DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_ITEM_SORT_ORDER_S', 'MODULE_SHIPPING_ITEM_SORT_ORDER', '', 'MODULE_SHIPPING_ITEM_SORT_ORDER_L', '6', '0', now())");
$DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,set_function) values ('MODULE_SHIPPING_ITEM_ICON_S', 'MODULE_SHIPPING_ITEM_ICON', '', 'MODULE_SHIPPING_ITEM_ICON_L', '6', '0', now(),'tep_cfg_choose_img(')");
+
+ $DB->query("INSERT IGNORE INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function,set_function) values ('MODULE_SHIPPING_ITEM_MIN_DELAI_S', 'MODULE_SHIPPING_ITEM_MIN_DELAI', '172800', 'MODULE_SHIPPING_ITEM_MIN_DELAI_L', '6', '0', now(),'tep_get_delai_title', 'tep_cfg_pull_down_delai(' ) ");
}
/**
Modified: branches/2.1.1/catalog/common/classes/datetimeUtility.php
===================================================================
--- branches/2.1.1/catalog/common/classes/datetimeUtility.php 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/common/classes/datetimeUtility.php 2012-11-01 09:21:19 UTC (rev 4649)
@@ -104,13 +104,29 @@
return (int)( $value / 86400);
}
+ /**
+ @fn IntervalDayOpened($debut, $fin, $with_saterday = false, $with_sunday = false, $activ_paques = true)
+ @brief Calcul du nombre de jour necessaire à la livraison en ne prenant en compte que les jour ouvrable/ouvré
+ @param $debut int timestamp start date
+ @param $fin int timestamp end date
+ @param $with_saterday boolean true for use day in delivery
+ @param $with_sunday boolean true for use day in delivery
+ @param $activ_paques boolean treu for not use day in delivery
+ */
public static function IntervalDayOpened($debut, $fin, $with_saterday = false, $with_sunday = false, $activ_paques = true) {
$totOuvrables = 0;
- // Comptabilise le nombre de jours ouvrables pendant la période de livraison
+
+ // Comptabilise le nombre de jours ouvrable necessaire à la livraison
+ $i=0;
for ($day = $debut; $day < $fin; ($day += 86400)) {
- $totOuvrables += self::DayIsOpened($day, $with_saterday , $with_sunday , $activ_paques );
+ if(!self::DayIsOpened($day, $with_saterday , $with_sunday , $activ_paques ) )
+ $fin += 86400;
+
+ $i++;
+ if($i>100)
+ return false;
}
- return $totOuvrables;
+ return ($fin - $debut) / 86400;
}
/**
@@ -141,20 +157,20 @@
if ($day_en == 'sat' || $day_en == 'sun') {
switch (true) {
- case ($with_sunday == true && $with_saterday == true) :
+ case ($with_sunday == false && $with_saterday == false) :
$totOuvrables++; // Comptabilise le samedi ET le dimanche
break;
- case ($with_sunday == true && $with_saterday == false && $day_en == 'sun') :
+ case ($with_sunday == false && $with_saterday == true && $day_en == 'sun') :
$totOuvrables++; // Comptabilise uniquement le dimanche
break;
- case ($with_saterday == true && $with_sunday === false && $day_en === 'sat') :
+ case ($with_saterday == false && $with_sunday === true && $day_en === 'sat') :
$totOuvrables++; // Comptabilise uniquement le samedi
break;
}
}
else {
// Définition des dates fériées fixes
- $jour = date('j', $day);
+ $jour = date('d', $day);
$mois = date('m', $day);
$an = date('Y', $day);
@@ -163,7 +179,6 @@
if($row == $jour.'/'.$mois)
$totOuvrables++;
-
if($activ_paques) {
// Pâques
$paques = easter_date($an); // retourne un timestamp UNIX pour Pâques
Modified: branches/2.1.1/catalog/common/classes/order.php
===================================================================
--- branches/2.1.1/catalog/common/classes/order.php 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/common/classes/order.php 2012-11-01 09:21:19 UTC (rev 4649)
@@ -137,7 +137,7 @@
$shipping_method_query = tep_db_query("select title from " . self::$tables['TOTAL'] . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'");
$shipping_method = tep_db_fetch_array($shipping_method_query);
- $order_status_query = tep_db_query("select status_id, status_name as orders_status_name from " . TABLE_STATUS . " where status_type='orders' and status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");
+ $order_status_query = tep_db_query($sql="select status_id, status_name as orders_status_name from " . TABLE_STATUS . " where status_type='orders' and status_id = '" . (int)$order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");
$order_status = tep_db_fetch_array($order_status_query);
$this->info = array('orders_id' => $order['orders_id'],
Modified: branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/flat.txt
===================================================================
--- branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/flat.txt 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/flat.txt 2012-11-01 09:21:19 UTC (rev 4649)
@@ -1,16 +1,17 @@
<?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
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/01/11, 11:38
+ @version 2.1.1
+ @date 01/11/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['module shipping flat text title']="par item" ;
-$lang['module shipping flat text description']="livraison par item :" ;
-$lang['module shipping flat text way']="Forfait" ;
-$lang['module shipping flat text title in shipping']="livraison " ;
+
+$lang['module shipping text flat title']="Forfait" ;
+$lang['module shipping text flat description']="livraison au forfait :" ;
+$lang['module shipping flat text way']="soit :" ;
+$lang['module shipping flat text title in shipping']="Forfait :" ;
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/item.txt
===================================================================
--- branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/item.txt 2012-10-29 22:35:29 UTC (rev 4648)
+++ branches/2.1.1/catalog/includes/languages/fr_FR/modules/shipping/item.txt 2012-11-01 09:21:19 UTC (rev 4649)
@@ -4,13 +4,13 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 111/05/2012, 12:45
+ @date 01/11/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
$lang['module shipping item text title']="transporteur" ;
$lang['module shipping item text description']="livraison classique :" ;
$lang['module shipping item text way']="soit :" ;
$lang['module shipping item text title in shipping']="transporteur :" ;
-
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|