You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(57) |
May
(31) |
Jun
(21) |
Jul
(11) |
Aug
(23) |
Sep
(22) |
Oct
(36) |
Nov
(62) |
Dec
(85) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(24) |
Feb
(24) |
Mar
(65) |
Apr
(232) |
May
(118) |
Jun
(22) |
Jul
(54) |
Aug
(57) |
Sep
(14) |
Oct
(27) |
Nov
(16) |
Dec
(19) |
| 2013 |
Jan
(16) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(2) |
Jun
(30) |
Jul
(33) |
Aug
(19) |
Sep
(35) |
Oct
(58) |
Nov
(27) |
Dec
(64) |
| 2014 |
Jan
(102) |
Feb
(80) |
Mar
(15) |
Apr
(4) |
May
(3) |
Jun
(3) |
Jul
(5) |
Aug
(11) |
Sep
(15) |
Oct
|
Nov
(3) |
Dec
(5) |
| 2015 |
Jan
(5) |
Feb
(4) |
Mar
(2) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(10) |
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
(18) |
Apr
(13) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|
From: <os...@us...> - 2013-07-07 18:52:27
|
Revision: 4779
http://sourceforge.net/p/oscss/svn/4779
Author: oscim
Date: 2013-07-07 18:52:24 +0000 (Sun, 07 Jul 2013)
Log Message:
-----------
Fix and optimise centralised method for display and filter process
Report in all page
Fix define col in customers tables
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/functions/general.php
trunk/catalog/admin/includes/header.php
trunk/catalog/admin/includes/javascript/oscss.js
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/modules/pages/shipping.php
trunk/catalog/admin/includes/modules/pages/usersNotif.php
trunk/catalog/common/classes/order.php
trunk/catalog/install/includes/sql/mysql/tables/osc_customers.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_info.sql
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -85,7 +85,12 @@
@var array info all tabs for filter listings , specifical owner sub module
*/
protected static $allfieldsexternal = array();
+ /**
+ @var array for stock generic filter activate
+ */
+ protected static $generictfilter = array();
+
/**
@brief standart class exe action in module
If use "action" in var (POST or GET), this function is loaded
@@ -325,30 +330,57 @@
*/
public static function actionFilter(){
- $_SESSION['filters'] =array();
+ $_SESSION['filters'] =array();
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][self::$code]['allfields'][$key] = 'on';
- else
- unset($_SESSION['filters'][self::$code]['allfields'][$key]);
- }
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][self::$code]['allfields'][$key]);
+ }
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][self::$code]['allfields'][$key] = 'on';
- else
- unset($_SESSION['filters'][self::$code]['allfields'][$key]);
- }
+
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][self::$code]['allfields'][$key]);
+ }
+
+ if( DataTypes::is_active('categorie') /*&& in_array('categorie' , self::$generictfilter)*/ )
+ foreach($_POST['filters']['categorie'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['categorie'][$key] = 'on';
+ }
+
+ if( DataTypes::is_active('featured') /*&& in_array('featured' , self::$generictfilter)*/ )
+ foreach($_POST['filters']['featured'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['featured'][$key] = 'on';
+ }
+
+ if(in_array('language' , self::$generictfilter))
+ foreach($_POST['filters']['language'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['language'][$key] = 'on';
+ }
+
+ if(in_array('subtype' , self::$generictfilter))
+ foreach($_POST['filters']['subtype'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['subtype'][$key] = 'on';
+ }
+
}
/**
@brief Construct base transversal data object
This key is unified in core
@param $listfield string
@param $action_mutli array
+ @param $boutons array
*/
- public static function ConvertInitVar( $listfield , $action_mutli=array() ){
+ public static function ConvertInitVar( $listfield , $action_mutli=array() , $tabs = array() , $boutons=array()){
if(is_object(self::$modules)) {
/* DEB Sub module add col */
@@ -377,29 +409,53 @@
/* END Sub module add col */
}
+
/**
- @remarks Construct all list , fields , th/td
+ @remarks Active forms filter
*/
+ self::$InitInfo['tfilter']['listing'] = array();
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'listfield' );
+ self::$generictfilter[] = 'listfield';
+
+ foreach($tabs as $key=>$row)
+ foreach($row as $subkey=>$r){
+ if( $key =='generic' ){
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>$r);
+ self::$generictfilter[] = $r;
+ }
+ elseif(is_array($r) )
+ self::$InitInfo['tfilter']['listing'][] = $r ;
+ }
+
+ /// @remarks Construct all list , fields , th/td
self::$InitInfo['theader']['listing']=array();
- if(count($action_mutli) > 0 )
- self::$InitInfo['theader']['listing'][] = array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' );
- if(defined('AJAXSTATMENTDETAIL'))
- self::$InitInfo['theader']['listing'][] = array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' );
+ $i=0;
+ if(defined('AJAXSTATMENTDETAIL')){
+ self::$InitInfo['theader']['listing'][$i] = array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' );
+ $i++;
+ }
+ if(count($action_mutli) > 0 ){
+ self::$InitInfo['theader']['listing'][$i] = array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' );
+ $i++;
+ }
-
self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
self::$InitInfo['modele']['listing'] = array();
+ $i=0;
+ if(defined('AJAXSTATMENTDETAIL')){
+ self::$InitInfo['modele']['listing'][$i]=array( 'sort'=>true );
+ $i++;
+ }
+ if(count($action_mutli) > 0 ){
+ self::$InitInfo['modele']['listing'][$i]=array( 'sort'=>true );
+ $i++;
+ }
- if(count($action_mutli) > 0 )
- self::$InitInfo['modele']['listing'][0]=false;
- if(defined('AJAXSTATMENTDETAIL'))
- self::$InitInfo['modele']['listing'][1]=false;
-
- // put in
+ /// @remarks Process Filter Act
if(isset($_SESSION['filters'][self::$code]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [self::$code]['allfields'];
else
@@ -407,6 +463,95 @@
$in_session = $_SESSION['filters']['allfields'];
+
+ // filter based on language
+ global $languages_id;
+ if(in_array('language' , self::$generictfilter)){
+ if(isset($_SESSION['filters'][self::$code]['language_id']))
+ $new_languages_id = $_SESSION['filters'][self::$code]['language_id'];
+ else
+ $new_languages_id =$languages_id;
+
+ $_SESSION['filters']['language_id'] = $_SESSION['filters'][self::$code]['language_id'] = $new_languages_id;
+
+ self::$InitInfo['adjust']['languages_id'] = $new_languages_id;
+ }
+ else
+ $new_languages_id =$languages_id;
+
+ //filter based on categorie
+ if( DataTypes::is_active('categorie') && in_array('categorie' , self::$generictfilter)) {
+ $listfield .= ' cat.categories_id,';
+ if(isset($_SESSION['filters'][self::$code]['categorie']))
+ $_SESSION['filters']['categorie'] = $_SESSION['filters'] [self::$code]['categorie'];
+ else
+ $_SESSION['filters']['categorie'] =array();
+
+ $list = '';
+ if(count($_SESSION['filters']['categorie']) > 0)
+ foreach($_SESSION['filters']['categorie'] as $key=>$row)
+ $list .=$key.',';
+ else{
+ /// create cache for speed load page
+ $osCSS_Cache = new osCSS_Cache();
+ if ($osCSS_Cache->read('categorie-'.MGabCont::CallSt('GetClassDatatype').'-' . $new_languages_id.'-type', 720))
+ $allcats = $osCSS_Cache->getCache();
+ else {
+ $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0'))) ;
+ $res= $osCSS_Cache->writeBuffer($allcats);
+ }
+
+ foreach($allcats as $row)
+ $list .=$row['id'].',';
+ }
+ self::$InitInfo['adjust']['sWhere'] .=" AND cat.categories_id IN (".substr($list, 0,-1).") ";
+ }
+
+ // filter based on featured
+ if( DataTypes::is_active('featured') && in_array('featured' , self::$generictfilter)) {
+ if(isset($_SESSION['filters'][self::$code]['featured']))
+ $_SESSION['filters']['featured'] = $_SESSION['filters'] [self::$code]['featured'];
+ else
+ $_SESSION['filters']['featured'] =array();
+
+ $list = '';
+ if(count($_SESSION['filters']['featured']) > 0){
+ foreach($_SESSION['filters']['featured'] as $key=>$row)
+ $list .=$key.',';
+
+ self::$InitInfo['adjust']['sWhere'] .=" AND fada.featured_id IN (".substr($list, 0,-1).") ";
+ }
+ }
+
+ // filter based on subtype products
+ if(in_array('subtype' , self::$generictfilter)){
+ if(isset($_SESSION['filters'][self::$code]['subtype']))
+ $_SESSION['filters']['subtype'] = $_SESSION['filters'] [self::$code]['subtype'];
+ else
+ $_SESSION['filters']['subtype'] =array();
+
+ $list_type = '';
+ if(count($_SESSION['filters']['subtype']) > 0)
+ foreach($_SESSION['filters']['subtype'] as $key=>$row)
+ $list_type .=$key.',';
+ else{
+ $allcats = tep_get_status_array(self::$datatype);
+ foreach($allcats as $row)
+ $list_type .=$row['id'].',';
+ }
+
+ /// retro-compatibilite
+ if(FILENAME_CMS_CONTENT == self::$code.'.php')
+ $child_type = 'content';
+ else
+ $child_type = self::$code;
+
+ if(strlen($list_type)>2)
+ self::$InitInfo['adjust']['sWhere'] .=" AND ".$child_type."_type IN (".substr($list_type, 0,-1).") ";
+ }
+
+
+
$i=0;
// check and appli
foreach(self::$allfields as $key=>$row){
@@ -459,12 +604,21 @@
// add subligne in tfooter for multi action
if(count($action_mutli) > 0 ){
self::$InitInfo['tfooter']['listing_multi'] = array();
- self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => (defined('AJAXSTATMENTDETAIL') ? 2 : 1 ), 'class'=>'row_action', 'txt'=>tep_draw_checkbox_field('select_all', 'select_all' ) );
+ self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => (defined('AJAXSTATMENTDETAIL') ? 2 : 1 ), 'class'=>'row_action', 'txt'=>tep_draw_checkbox_field('select_all', 'select_all' ,'', false, '', ' class="select_all" ') );
- $am = '';
- foreach($action_mutli as $r)
- $am .= $r;
- self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => ($i+1), 'class'=>'row_action', 'txt'=> $am);
+ $am = false;
+ foreach($action_mutli as $r){
+
+ if(is_array( $r ) ){
+ self::$InitInfo['tfooter']['listing_multi'][] = $r;
+ }
+ else{
+ $am .= $r;
+ }
+ }
+
+ if($am !=false)
+ self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => ($i+1), 'class'=>'row_action', 'txt'=> $am);
}
self::$InitInfo['allfields']['listing'] = self::$allfields ;
@@ -474,12 +628,32 @@
*/
self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+
+
+
+
/**
- @remarks Active forms filter
+ @note use $boutons[action][] = array(params)
+
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
*/
- self::$InitInfo['tfilter']['listing'] = array();
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'listfield' );
+ $i = 0;
+ foreach($boutons as $key=>$row)
+ foreach($row as $subkey=>$r){
+ if( self::$action ==$key && is_array($r) ){
+ self::$InitInfo['MenuModule'][$i]=$r;
+ $i++;
+ }
+ }
+
+
return $listfield;
}
Modified: trunk/catalog/admin/includes/functions/general.php
===================================================================
--- trunk/catalog/admin/includes/functions/general.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/functions/general.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -564,6 +564,7 @@
function tep_get_status_array($type='orders', $id=0, $orderby='status_id', $sort='ASC'){
global $languages_id;
$loop = array();
+ $list = array();
$all = sqlstatus::fetch(array(
'type'=>$type,
'language_id'=>(int)$languages_id,
@@ -571,6 +572,8 @@
),
true
);
+ if(!$all)
+ return false;
if(is_object($all))
$loop[] = $all;
Modified: trunk/catalog/admin/includes/header.php
===================================================================
--- trunk/catalog/admin/includes/header.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/header.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -119,6 +119,7 @@
"bProcessing": true,
"bServerSide": true,
"oSearch": { "sSearch": "", "bEscapeRegex": true },
+ "iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"oLanguage": {
"sLengthMenu": "<?php echo sprintf(TEXT_MAXI_ROW_BY_PAGE,"_MENU_")?>",
@@ -141,9 +142,9 @@
$col2=call_user_func(array(tep_extrac_querystring(JSONSTATMENT,'type'), 'tep_get_modele'), array('modele2') ); ?>
<?php $i=0; foreach($col as $k=>$row):
echo ' { ';
- echo ' "bSortable": '.((isset($col2[$k]['sort']) && $col2[$k]['sort'] !=false) ? 'true' : 'false' ).' ,';
- if(isset($col2[$k]['class']))
- echo ' "sClass": "'.$col2[$k]['class'].'" ,';
+ echo ' "bSortable": '.((isset($col2[$k]['sort']) && $col2[$k]['sort'] !=false) ? 'true' : 'false' ).' '."\n";
+// if(isset($col2[$k]['class']))
+// echo ', "sClass": "'.$col2[$k]['class'].'" ';
echo ' },'."\n";
$i++; endforeach;
Modified: trunk/catalog/admin/includes/javascript/oscss.js
===================================================================
--- trunk/catalog/admin/includes/javascript/oscss.js 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/javascript/oscss.js 2013-07-07 18:52:24 UTC (rev 4779)
@@ -242,8 +242,8 @@
// add checkbox for select all childs checkboxs in current rows
select_all:function(){
// Multi in datatable, for select all rows
- $("#select_all").click(function(){
- var checked_status = $("#select_all").is(':checked');
+ $(".select_all").click(function(){
+ var checked_status = $(this).is(':checked');
$("input[type='checkbox'].multi").each(function(){
if(checked_status == true)
this.checked = true;
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -80,7 +80,7 @@
if(!defined('JSONSTATMENT')){
//! active datatable in ajax, precise les GET necessaire
- if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'mod=page&type='.self::$code .(isset($_GET['cPath'])?'&cPath='.(int)$_GET['cPath']:'') );
+ if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code .(isset($_GET['cPath'])?'&cPath='.(int)$_GET['cPath']:'') );
//! detail item in ajax
if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
@@ -205,134 +205,83 @@
);
- /**
- @remarks filter based on language
- */
- if(isset($_SESSION['filters'][__CLASS__]['language_id']))
- $new_languages_id = $_SESSION['filters'] [__CLASS__]['language_id'];
- else
- $new_languages_id =$languages_id;
- // min fields and not view directly colonne fields
+ /// @remarks min fields and not view directly colonne fields
$listfield = ' c.content_id as id, ';
+
+ /// @remarks Active forms filter
$mutli=array();
// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
- /**
- @remarks filter based on categorie
- */
- if( DataTypes::is_active('categorie')) {
- $listfield .= ' cat.categories_id,';
- if(isset($_SESSION['filters'][__CLASS__]['categorie']))
- $_SESSION['filters']['categorie'] = $_SESSION['filters'] [__CLASS__]['categorie'];
- else
- $_SESSION['filters']['categorie'] =array();
- $list = '';
- if(count($_SESSION['filters']['categorie']) > 0)
- foreach($_SESSION['filters']['categorie'] as $key=>$row)
- $list .=$key.',';
- else{
- /// create cache for speed load page
- $osCSS_Cache = new osCSS_Cache();
- if ($osCSS_Cache->read('categorie-'.MGabCont::CallSt('GetClassDatatype').'-' . $new_languages_id.'-type', 720))
- $allcats = $osCSS_Cache->getCache();
- else {
- $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0'))) ;
- $res= $osCSS_Cache->writeBuffer($allcats);
- }
-
- foreach($allcats as $row)
- $list .=$row['id'].',';
- }
- if(strlen($list)> 1)
- self::$InitInfo['adjust']['sWhere'] .=" AND cat.categories_id IN (".substr($list, 0,-1).") ";
- }
-
-
/**
- @remarks filter based on featured
- */
- if( DataTypes::is_active('featured')) {
- if(isset($_SESSION['filters'][__CLASS__]['featured']))
- $_SESSION['filters']['featured'] = $_SESSION['filters'] [__CLASS__]['featured'];
- else
- $_SESSION['filters']['featured'] =array();
-
- $list = '';
- if(count($_SESSION['filters']['featured']) > 0){
- foreach($_SESSION['filters']['featured'] as $key=>$row)
- $list .=$key.',';
-
- self::$InitInfo['adjust']['sWhere'] .=" AND fada.featured_id IN (".substr($list, 0,-1).") ";
- }
- }
-
-
- /**
- @remarks filter based on subtype products
- */
- if(isset($_SESSION['filters'][__CLASS__]['subtype']))
- $_SESSION['filters']['subtype'] = $_SESSION['filters'] [__CLASS__]['subtype'];
- else
- $_SESSION['filters']['subtype'] =array();
-
- $list_type = '';
- if(count($_SESSION['filters']['subtype']) > 0)
- foreach($_SESSION['filters']['subtype'] as $key=>$row)
- $list_type .=$key.',';
- else{
- $allcats = tep_get_status_array(self::$datatype);
- foreach($allcats as $row)
- $list_type .=$row['id'].',';
- }
- if(strlen($list_type)>2)
- self::$InitInfo['adjust']['sWhere'] .=" AND content_type IN (".substr($list_type, 0,-1).") ";
-
-
-
- $listfield= self::ConvertInitVar( $listfield, $mutli);
- /**
@remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
*/
-// self::$InitInfo['tfilter']['listing'] = array();
+ $tab = array();
if( DataTypes::is_active('categorie'))
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'categorie' );
-
+ $tab['generic'][] ='categorie' ;
if( DataTypes::is_active('featured'))
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'featured' );
+ $tab['generic'][] ='featured' ;
+ if(count(self::$languages)>1 )
+ $tab['generic'][] ='language' ;
+ if( count( tep_get_status_array(self::$datatype) ) > 1)
+ $tab['generic'][] ='subtype' ;
-// self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'language' );
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'subtype' );
-
-
/**
@remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
+
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
*/
- if(self::$action =='listing'){
- $i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'button',
- 'title'=>__('image create new content'),
- 'url'=>tep_href_link(self::FILENAME, 'action=new'),
- );
+ $boutons = array();
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button fancy',
+ 'title'=> __('add category datatype content'),
+ 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype=content&action=new_light&origin='. self::FILENAME),
+ );
- $i++;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'button fancy',
- 'title'=> __('add category datatype content'),
- 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype=content&action=new_light&origin='. self::FILENAME),
- );
- }
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
}
@@ -372,30 +321,6 @@
self::actionFilter();
- if( DataTypes::is_active('categorie'))
- foreach($_POST['filters']['categorie'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['categorie'][$key] = 'on';
- }
-
- if( DataTypes::is_active('featured'))
- foreach($_POST['filters']['featured'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['featured'][$key] = 'on';
- }
-
-
- foreach($_POST['filters']['language'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['language'][$key] = 'on';
- }
-
- foreach($_POST['filters']['subtype'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['subtype'][$key] = 'on';
- }
-
-
tep_redirect(tep_href_link(self::FILENAME));
break;
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -69,6 +69,7 @@
public static function GetConf(){
self::$code=__CLASS__;
+ self::$datatype=__CLASS__;
self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
@@ -79,7 +80,7 @@
if(!defined('JSONSTATMENT')){
//! active datatable in ajax, precise les GET necessaire
- if(!defined('JSONSTATMENT')) define('JSONSTATMENT', 'mod=page&type='.self::$code );
+ if(!defined('JSONSTATMENT')) define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code );
//! detail item in ajax
if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
@@ -248,18 +249,48 @@
);
- // min fields and not view directly colonne fields
+ /// @remarks min fields and not view directly colonne fields
$listfield = " ";
+
+ /// @remarks Active forms filter
$mutli=array();
- $listfield= self::ConvertInitVar( $listfield, $mutli);
/**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
+ if( count( tep_get_status_array(self::$datatype) ) > 1)
+ $tab['generic'][] ='subtype' ;
+
+ /**
@remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
+
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
*/
- if(self::$action =='listing'){
- $i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
+ $boutons = array();
+ $boutons['listing'][]=array(
'type'=>'getLink',
'format'=>'button_nav',
'image'=>'',
@@ -267,8 +298,7 @@
'title'=>__('@customers image create new customer'),
'url'=>tep_href_link(self::FILENAME, 'action=new'),
);
- $i++;
- self::$InitInfo['MenuModule'][$i]=array(
+ $boutons['listing'][]=array(
'type'=>'getLink',
'format'=>'button_nav',
'image'=>'',
@@ -276,11 +306,19 @@
'title'=>tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .__('@customers link rss new customer'),
'url'=>tep_href_link(FILENAME_FEEDS,'box=new_customers'),
);
- }
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
+
}
/** public ExtModPage */
@@ -668,8 +706,9 @@
/* END Sub module add col */
$query_raw .= " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
-// echo $query_raw;
+ $_query = $DB->query($query_raw);
+ $query_numrows = $_query->__get('numRows');
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -900,7 +939,7 @@
break;
case 'listing':
- global $query_numrows,$languages_id;
+ global $query_numrows,$languages_id, $price;
/* DEB Sub module add col */
$external = array();
@@ -924,6 +963,7 @@
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].' %';
+ elseif($k == 'balance_account') $ord[$k]=(($item[$k]>=0) ? '+' : '-' ).' '. $price->format($item[$k], true) ;
/* DEB Sub module add col */
elseif( in_array($k, $external) ){
$class = self::$modules->modules[$process[$k]];
Modified: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -178,20 +178,45 @@
// , k_status_type as type , featured_status
+ /// @remarks min fields and not view directly colonne fields
+ $listfield = 'k_status_type as type , featured_status,';
- // min fields and not view directly colonne fields
- $listfield = 'k_status_type as type , featured_status,';
+ /// @remarks Active forms filter
$mutli=array();
+ /**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
+ /**
+ @remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
- $listfield= self::ConvertInitVar( $listfield, $mutli);
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ */
+ $boutons = array();
- /**
- @remarks this define menu master module in page
- */
- if(self::$action =='listing'){
- $i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
+ $boutons[] =array(
'type'=>'getLink',
'format'=>'button_nav',
'image'=>'',
@@ -199,8 +224,15 @@
'title'=>__('@featureds image add featureds'),
'url'=>tep_href_link(self::FILENAME, 'action=new'),
);
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
- }
return true;
}
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -15,9 +15,10 @@
class orders
extends ModTwo /// new abstract class for nextgen module
implements
- InterfaceModule,
-// IntModTwo, /// new interface module for nextgen module
- InterfacedInnerHtml {
+ InterfaceModule,
+ ExtModConfig,
+ InterfacedTJsonS,
+ InterfacedInnerHtml {
/**
@def FILENAME const
@@ -92,6 +93,7 @@
global $languages_id;
self::$code=__CLASS__;
+ self::$datatype=__CLASS__;
self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
self::$view=(isset($_REQUEST['view'])? (string)$_REQUEST['view'] : 'opened' );
@@ -120,7 +122,7 @@
*/
if(!defined('JSONSTATMENT')){
//! active datatable in ajax, precise les GET necessaire
- define('JSONSTATMENT', 'mod=page&type='.self::$code.
+ define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code.
(isset(parent::$action)?'&action='.parent::$action : '' ).
(isset(self::$oID)?'&oID='.self::$oID : '' ).
(isset(self::$view)?'&view='.self::$view : '' ).
@@ -286,90 +288,55 @@
);
- /**
- @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']=array(
-// 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
-// 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>'<input type="checkbox" id="select_all" name="select_all">' ),
-// );
-//
-//
-//
-// self::$InitInfo['modele']['listing']=array(
-// 0 =>false,
-// 1 =>false,
-// );
+ /// @remarks min fields and not view directly colonne fields
+ $listfield = 'o.orders_id , o.orders_prefix, s.status_color as orders_status_color,';
- // min fields and not view directly colonne fields
- $listfield = 'o.orders_id , o.orders_prefix, s.status_color as orders_status_color,';
-
-
- // min fields and not view directly colonne fields
-// $listfield = ' notif_id as id, ';
+ /// @remarks Active forms filter
$mutli=array();
-// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
+ $mutli[] = '<span class="fleft">'.__('action multiple') . ' ' . tep_draw_pull_down_menu('status_multi', array_merge(array(array('id' => '', 'text' => __('text action multiple orders'))), orders::$orders_statuses) ) . __('export: ') . tep_draw_pull_down_menu('modeexport', orders::$export->mode ).'</span> <span class="fleft" style="margin-left:50px;"> '. tep_image_submit('button_confirm.gif', IMAGE_CONFIRM, '' ).'</span>' ;
- $listfield= self::ConvertInitVar( $listfield, $mutli);
+ /**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
+ $tab['mod'][]=array(
+ 'title'=>__('orders filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ );
+ $tab['mod'][]=array(
+ 'title'=>__('orders filter products tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.products'),
+ );
+ /**
+ @remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
- // 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%';
-// }
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ */
+ $boutons = array();
-/*
+
- 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
*/
@@ -438,18 +405,18 @@
self::$InitInfo['adjust']['sWhere'] .=" AND op.products_id= '".tep_db_input($_SESSION['filters'][__CLASS__]['products'])."'";
- /**
- @remarks Active forms filter
- */
- self::$InitInfo['tfilter']['listing'][]=array(
- 'title'=>__('orders filter tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
- );
- /// lnk to products
- self::$InitInfo['tfilter']['listing'][]=array(
- 'title'=>__('orders filter products tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.products'),
- );
+
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
+
+
+
break;
}
@@ -1392,37 +1359,31 @@
return self::$list=self::CheckResult($res);
}
-// public static function tep_get_modele(){
-// self::GetConf();
-// $action=(empty(self::$action)? 'listing' :self::$action);
-//
-// return (isset(self::$InitInfo['modele'][$action]) ? self::$InitInfo['modele'][$action] : array() );
-// }
/**
@brief Redefine Parent method
*/
- public static function DTFootTable($mutli=false){
- /**
- @remarks mutli action specific line
- */
- if($mutli) {
- $col=count(self::DTheaderTable());
- return array(
- 0 => self::$InitInfo['tfooter']['listing'] ,
- 1 =>array(
- array(
- 'colspan'=>$col,
- 'class'=>'tleft',
- 'txt'=>'<span class="fleft">'.__('action multiple') . ' ' . tep_draw_pull_down_menu('status_multi', array_merge(array(array('id' => '', 'text' => __('text action multiple orders'))), orders::$orders_statuses) ) . __('export: ') . tep_draw_pull_down_menu('modeexport', orders::$export->mode ).'</span> <span class="fleft" style="margin-left:50px;"> '. tep_image_submit('button_confirm.gif', IMAGE_CONFIRM, '' ).'</span>' ) )
- ) ;
- }
- else
- /**
- @remarks No tfoot specific,use equal theader
- */
- return array( 0 =>self::DTheaderTable());
- }
+// public static function DTFootTable($mutli=false){
+// /**
+// @remarks mutli action specific line
+// */
+// if($mutli) {
+// $col=count(self::DTheaderTable());
+// return array(
+// 0 => self::$InitInfo['tfooter']['listing'] ,
+// 1 =>array(
+// array(
+// 'colspan'=>$col,
+// 'class'=>'tleft',
+// 'txt'=>'<span class="fleft">'.__('action multiple') . ' ' . tep_draw_pull_down_menu('status_multi', array_merge(array(array('id' => '', 'text' => __('text action multiple orders'))), orders::$orders_statuses) ) . __('export: ') . tep_draw_pull_down_menu('modeexport', orders::$export->mode ).'</span> <span class="fleft" style="margin-left:50px;"> '. tep_image_submit('button_confirm.gif', IMAGE_CONFIRM, '' ).'</span>' ) )
+// ) ;
+// }
+// else
+// /**
+// @remarks No tfoot specific,use equal theader
+// */
+// return array( 0 =>self::DTheaderTable());
+// }
/**
@brief format db value for display page
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -127,7 +127,7 @@
*/
if(!defined('JSONSTATMENT')){
//! active datatable in ajax, precise les GET necessaire
- if(self::$action =='listing') define('JSONSTATMENT', 'mod=page&type='.self::$code.(isset($_GET['expected'])?'&expected=true':'').(isset($_GET['cPath'])?'&cPath='.$_GET['cPath']:'').(isset($_GET['Vtype'])?'&Vtype='.$_GET['Vtype']:''));
+ if(self::$action =='listing') define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code.(isset($_GET['expected'])?'&expected=true':'').(isset($_GET['cPath'])?'&cPath='.$_GET['cPath']:'').(isset($_GET['Vtype'])?'&Vtype='.$_GET['Vtype']:''));
//! detail item in ajax
if(!defined('AJAXSTATMENTDETAIL')) define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
@@ -323,6 +323,7 @@
'alias'=>'price',
'text'=>__('products table heading price'),
'class'=>'tright',
+ 'default'=>true,
);
}
// self::$allfields['p.products_price']= array(
@@ -425,86 +426,116 @@
- /**
- @remarks Construct all list , fields , th/td
- */
+ /// @remarks min fields and not view directly colonne fields
$listfield = ' cat.categories_id, ';
+ /// @remarks Active forms filter
$mutli=array();
$mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
+ /**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
+ $i=0;
+ if( DataTypes::is_active('categorie'))
+ $tab['generic'][$i++] = 'categorie';
- if(isset($_SESSION['filters'][__CLASS__]['bystock']))
- $_SESSION['filters']['bystock'] = $_SESSION['filters'] [__CLASS__]['bystock'];
- else
- $_SESSION['filters']['bystock'] = 0;
+ if( DataTypes::is_active('featured'))
+ $tab['generic'][$i++] = 'featured';
+// if( count(price::$currency) > 1 )
+// $tab['generic'][] ='devise' ;
+ if(count(self::$languages)>1 )
+ $tab['generic'][] ='language' ;
+ if( count( tep_get_status_array(__CLASS__) ) > 1)
+ $tab['generic'][] ='subtype' ;
- if(isset($_SESSION['filters'][__CLASS__]['byattribute']))
- $_SESSION['filters']['byattribute'] = $_SESSION['filters'] [__CLASS__]['byattribute'];
- else
- $_SESSION['filters']['byattribute'] = array();
+ if( DataTypes::is_active('manufacturer'))
+ $tab['mod'][]=array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ );
+ $tab['mod'][]=array(
+ 'title'=>__('@products filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ );
/**
- @remarks filter based on language
+ @remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
+
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
*/
- if(isset($_SESSION['filters'][__CLASS__]['language_id']))
- $new_languages_id = $_SESSION['filters'][__CLASS__]['language_id'];
- else
- $new_languages_id =$languages_id;
+ $boutons = array();
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'',
+ 'title'=>__('@products image create new product'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
- $_SESSION['filters']['language_id'] = $_SESSION['filters'][__CLASS__]['language_id'] = $new_languages_id;
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'fancy',
+ 'title'=> __('@products add category datatype product'),
+ 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype='.self::$datatype.'&action=new_light&origin='. self::FILENAME),
+ );
- /**
- @remarks filter based on categorie
- */
- if( DataTypes::is_active('categorie')) {
- if(isset($_SESSION['filters'][__CLASS__]['categorie']))
- $_SESSION['filters']['categorie'] = $_SESSION['filters'] [__CLASS__]['categorie'];
- else
- $_SESSION['filters']['categorie'] =array();
- $list = '';
- if(count($_SESSION['filters']['categorie']) > 0)
- foreach($_SESSION['filters']['categorie'] as $key=>$row)
- $list .=$key.',';
- else{
- /// create cache for speed load page
- $osCSS_Cache = new osCSS_Cache();
- if ($osCSS_Cache->read('categorie-'.MGabCont::CallSt('GetClassDatatype').'-' . $new_languages_id.'-type', 720))
- $allcats = $osCSS_Cache->getCache();
- else {
- $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0'))) ;
- $res= $osCSS_Cache->writeBuffer($allcats);
- }
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'linkrss',
+ 'title'=>tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .__('@products link rss low stock'),
+ 'url'=>tep_href_link(FILENAME_FEEDS,'box=low_stock'),
+ );
- foreach($allcats as $row)
- $list .=$row['id'].',';
- }
- self::$InitInfo['adjust']['sWhere'] .=" AND cat.categories_id IN (".substr($list, 0,-1).") ";
- }
- /**
- @remarks filter based on featured
- */
- if( DataTypes::is_active('featured')) {
- if(isset($_SESSION['filters'][__CLASS__]['featured']))
- $_SESSION['filters']['featured'] = $_SESSION['filters'] [__CLASS__]['featured'];
- else
- $_SESSION['filters']['featured'] =array();
- $list = '';
- if(count($_SESSION['filters']['featured']) > 0){
- foreach($_SESSION['filters']['featured'] as $key=>$row)
- $list .=$key.',';
- self::$InitInfo['adjust']['sWhere'] .=" AND fada.featured_id IN (".substr($list, 0,-1).") ";
- }
- }
+
+
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']))
+ $_SESSION['filters']['bystock'] = $_SESSION['filters'] [__CLASS__]['bystock'];
+ else
+ $_SESSION['filters']['bystock'] = 0;
+
+ if(isset($_SESSION['filters'][__CLASS__]['byattribute']))
+ $_SESSION['filters']['byattribute'] = $_SESSION['filters'] [__CLASS__]['byattribute'];
+ else
+ $_SESSION['filters']['byattribute'] = array();
+
+
/**
@remarks filter based on manufacturers
*/
@@ -523,29 +554,7 @@
}
}
-
/**
- @remarks filter based on subtype products
- */
- if(isset($_SESSION['filters'][__CLASS__]['subtype']))
- $_SESSION['filters']['subtype'] = $_SESSION['filters'] [__CLASS__]['subtype'];
- else
- $_SESSION['filters']['subtype'] =array();
-
- $list_type = '';
- if(count($_SESSION['filters']['subtype']) > 0)
- foreach($_SESSION['filters']['subtype'] as $key=>$row)
- $list_type .=$key.',';
- else{
- $allcats = tep_get_status_array(self::$datatype);
- foreach($allcats as $row)
- $list_type .=$row['id'].',';
- }
- if(strlen($list_type)>2)
- self::$InitInfo['adjust']['sWhere'] .=" AND products_type IN (".substr($list_type, 0,-1).") ";
-
-
- /**
@remarks filter based on expected
*/
if(isset($_SESSION['filters'][__CLASS__]['expected']))
@@ -591,81 +600,20 @@
self::$InitInfo['adjust']['sWhere'] .=" AND p.products_status <= 0 ";
- /**
- @remarks Put detail for listing methode
- */
- self::$InitInfo['adjust']['languages_id'] = $new_languages_id;
-// self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
- $listfield= self::ConvertInitVar( $listfield, $mutli);
/**
- @remarks Active forms filter
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
*/
-// self::$InitInfo['tfilter']['listing'] = array();
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
- if( DataTypes::is_active('categorie'))
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'categorie' );
- if( DataTypes::is_active('manufacturer'))
- self::$InitInfo['tfilter']['listing'][]=array(
- 'title'=>__('@products filter tab manufacturer'),
- 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
- );
- if( DataTypes::is_active('featured'))
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'featured' );
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'language' );
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'subtype' );
-
- self::$InitInfo['tfilter']['listing'][]=array(
- 'title'=>__('@products filter tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
- );
-
-
-
- /**
- @remarks this define menu master module in page
- */
- if(self::$action =='listing'){
- $i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'',
- 'title'=>__('@products image create new product'),
- 'url'=>tep_href_link(self::FILENAME, 'action=new'),
- );
-
- $i++;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'fancy',
- 'title'=> __('@products add category datatype product'),
- 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype='.self::$datatype.'&action=new_light&origin='. self::FILENAME),
- );
-
- if(_cst_bool('STOCK_CHECK')) {
- $i++;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'linkrss',
- 'title'=>tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .__('@products link rss low stock'),
- 'url'=>tep_href_link(FILENAME_FEEDS,'box=low_stock'),
- );
- }
- }
-
-
-
-
}
@@ -723,36 +671,13 @@
unset($_SESSION['filters'][__CLASS__]['byattribute'][$key]);
}
-
-
- if( DataTypes::is_active('categorie'))
- foreach($_POST['filters']['categorie'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['categorie'][$key] = 'on';
- }
-
- if( DataTypes::is_active('featured'))
- foreach($_POST['filters']['featured'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['featured'][$key] = 'on';
- }
-
if( DataTypes::is_active('manufacturer'))
foreach($_POST['filters']['manufacturer'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['manufacturer'][$key] = 'on';
}
- foreach($_POST['filters']['language'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['language'][$key] = 'on';
- }
- foreach($_POST['filters']['subtype'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['subtype'][$key] = 'on';
- }
-
foreach($_POST['filters']['expected'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['expected'][$key] = 'on';
@@ -1432,7 +1357,7 @@
break;
case 'listing':
- global $query_numrows,$languages_id;
+ global $query_numrows,$languages_id, $price;
/* DEB Sub module add col */
@@ -1472,14 +1397,16 @@
}
+
- $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 == 'price') $ord[$k]= $price->format($item[$k], true) ;
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]=( (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]) : '' );
@@ -1492,7 +1419,9 @@
else $ord[$k]=$item[$k];
}
+
$ord[0]=$item['id'];
+ $item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id'],false, '','class="multi"');
$res[]=$ord;
Modified: trunk/catalog/admin/includes/modules/pages/shipping.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/shipping.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/shipping.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -95,6 +95,7 @@
global $languages_id;
self::$code=__CLASS__;
+ self::$datatype=__CLASS__;
self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
self::$view=(isset($_REQUEST['view'])? (string)$_REQUEST['view'] : '' );
@@ -124,7 +125,7 @@
if(defined('JSONSTATMENT')) return;
//! active datatable in ajax, precise les GET necessaire
- define('JSONSTATMENT', 'mod=page&type='.self::$code.
+ define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code.
(isset(parent::$action)?'&action='.parent::$action : '' ).
(isset(self::$oID)?'&oID='.self::$oID : '' ).
(isset(self::$view)?'&view='.self::$view : '' ).
@@ -135,14 +136,11 @@
define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
- switch(self::$action){
-
- case 'listing':
/**
@remarks this define col theader title, and ajust html code
Just for Edit listing
*/
- self::$allfields = array(
+ self::$allfields = array(
's.row_id' => array(
'sort'=>true,
'alias'=>'id',
@@ -207,18 +205,51 @@
+ /// @remarks 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, ';
+ /// @remarks Active forms filter
+ $mutli = array();
+ $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
+// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_EDIT, 'edit'), '', ' name="multi_action" ' ) ;
+ /**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
+// $tab['mod'][]=array(
+// 'title'=>__('@shipping filter tab clause'),
+// 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+// );
+ /**
+ @remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ */
+ $boutons = array();
- // 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
- $mutli=array();
-// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
- $mutli[] = sprintf(CsrtAction::getButton('button_confirm', IMAGE_CONFIRM, 'confirm'), '', ' name="multi_action" ' ) ;
-
/**
@remarks filter based on status orders
*/
@@ -263,19 +294,19 @@
// self::$InitInfo['adjust']['sWhere'] .=" AND date_purchased <= '".tep_db_input($_SESSION['filters']['dates']['end'])."'";
- $listfield= self::ConvertInitVar( $listfield, $mutli);
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
- /**
- @remarks Active forms filter
- */
- self::$InitInfo['tfilter']['listing'][]=array(
- 'title'=>__('@shipping filter tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
- );
- 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 . "'");
@@ -288,15 +319,15 @@
- $mutliactionmenu = array(
- array('id'=>'','text'=>'--'),
-// liste detail de chaque colis
- array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
+// $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') ),
+// );
-// 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/');
echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','comments','800','400');
@@ -815,8 +846,10 @@
$ord['date_expedition']=tep_datetime_short($shipping['date_expedition']);
$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[1]=tep_draw_checkbox_field('action_multi['.$shipping['row_id'].']','action_mutli_'.$shipping['row_id'],$shipping['row_id'],false, '','class="multi"');
+
$ord['action']=self::get_item_action($ord);
$res[]=$ord;
Modified: trunk/catalog/admin/includes/modules/pages/usersNotif.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/usersNotif.php 2013-07-07 09:07:58 UTC (rev 4778)
+++ trunk/catalog/admin/includes/modules/pages/usersNotif.php 2013-07-07 18:52:24 UTC (rev 4779)
@@ -9,7 +9,7 @@
@encode UTF-8
@class usersNotif
*/
-error_reporting(E_ALL);
+
class usersNotif
extends ModTwo /// new abstract class for nextgen module
implements
@@ -22,9 +22,6 @@
*/
const FILENAME =FILENAME_USERSNOTIF;
-// public static $code;
-
-// public static $action;
/**
@var int current id
*/
@@ -45,11 +42,8 @@
@var $XmlBase object xml simple parser result
*/
protected static $XmlBase;
+
/**
- @var array info all tabs for filter listings
- */
- public static $allfields = array();
- /**
class constructor
*/
public function __construct() {
@@ -107,6 +101,7 @@
'sort'=>true,
'alias'=>'type',
'text'=>__('@usersNotif table heading type'),
+ 'class'=>'tcenter',
);
self::$allfields['notif_key']= array(
'sort'=>true,
@@ -135,108 +130,69 @@
'text'=>__('@usersNotif table heading date'),
'default'=>true,
'width'=>'8%',
+ 'class'=>'tcenter',
);
- /**
- @remarks Construct all list , fields , th/td
- */
- self::$InitInfo['theader']['listing']=array(
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- 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
+ /// @remarks min fields and not view directly colonne fields
$listfield = ' notif_id as id, ';
- // put in
- if(isset($_SESSION['filters'][__CLASS__]['allfields']))
- $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
- else
- $_SESSION['filters']['allfields'] = array();
+ /// @remarks Active forms filter
+ $mutli=array();
+ $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
- $in_session = $_SESSION['filters']['allfields'];
- $i = 0;
- // check and appli
- foreach(self::$allfields as $key=>$row){
- $clean = substr($key, (strpos($key, '.')+1));
+ /**
+ @remarks Active forms filter
+ ...
[truncated message content] |
|
From: <os...@us...> - 2013-07-07 09:08:03
|
Revision: 4778
http://sourceforge.net/p/oscss/svn/4778
Author: oscim
Date: 2013-07-07 09:07:58 +0000 (Sun, 07 Jul 2013)
Log Message:
-----------
Fix link to childs in featured page
Fix ModTwo generate ConvertInitVar() for adujst additional col (multi by checkbox, detail row in page )
Add method in ModTwo for manipulate link contructor
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/admin/includes/modules/pages/products.php
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2013-07-06 20:45:37 UTC (rev 4777)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2013-07-07 09:07:58 UTC (rev 4778)
@@ -102,7 +102,7 @@
// break;
case 'link':
default:
- return 'getLink';
+ return 'getLink';
}
}
@@ -131,8 +131,8 @@
/**
@brief return array for display menu
*/
-// public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){}
+
/**
@brief Standard
*/
@@ -161,7 +161,7 @@
$action=(empty(self::$action)? 'listing' :self::$action);
- if(!isset(self::$InitInfo['tfooter'][$action]))
+ if(!isset(self::$InitInfo['tfooter'][$action]))
/**
@remarks No tfoot specific,use equal theader
*/
@@ -169,9 +169,9 @@
else{
$arr = array( 1 => self::$InitInfo['tfooter'][$action] );
- if($mutli && isset(self::$InitInfo['tfooter'][$action.'_multi'] ))
+ if($mutli && isset(self::$InitInfo['tfooter'][$action.'_multi'] ))
$arr[2] = self::$InitInfo['tfooter'][$action.'_multi'] ;
-
+
return $arr;
}
}
@@ -205,7 +205,7 @@
$list = ((isset(self::$InitInfo['tfilter'][$action])) ? self::$InitInfo['tfilter'][$action] : array());
$return= array();
- //! @remarks Force load language centralised
+ //! @remarks Force load language centralised
global $oscss,$language;
$oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/filters.txt');
@@ -221,7 +221,7 @@
$tp->content = $row['content'];
}
- $return[] = $tp;
+ $return[] = $tp;
}
@@ -267,7 +267,7 @@
/**
@fn tep_get_modele($param='modele')
- @return array
+ @return array
*/
public static function tep_get_modele(){
$params = func_get_args();
@@ -288,12 +288,40 @@
// // var_dump(call_user_func_array(array(self::$code, 'ListingArray'),array( $page,$rowbyp,$sOrder,$sWhere,$options) ));
// }
+
+ /**
+ @fn HrefLink($id, $action='edit')
+ @brief retrun link specififc this data
+ @param $id integer
+ @param $action string (defaut: edit)
+ @param $key string data for determine links
+ @param $params string other args passed in GET format and prev &
+ @return links
+ */
+ public static function HrefLink($id, $action='edit', $key='', $params=''){
+ /// @remarks reto-compatibilite
+ if($key =='product')
+ $key = 'products';
+ elseif($key =='content')
+ $key = 'cms_content';
+
+ if( ! tep_class_exists($key) ) {
+ require_once(DIR_WS_MODULES .'/pages/'.$key.'.php');
+ $link = call_user_func(array($key, 'HrefLink'), array('id'=>$id, 'action'=>$action, 'params'=>$params)) ;
+ }
+
+ if(! $link )
+ $link = tep_href_link( constant(strtoupper('FILENAME_'.self::$code)) ,'cID='.$id.'&action='.$action.$params );
+
+ return $link;
+ }
+
/**
@fn actionFilter()
@brief initiate the execution of the action "filters"
- reset and initialization of columns and their filter
- @note Use Session
- @return none
+ reset and initialization of columns and their filter
+ @note Use Session
+ @return none
*/
public static function actionFilter(){
@@ -316,8 +344,8 @@
}
/**
@brief Construct base transversal data object
- This key is unified in core
- @param $listfield string
+ This key is unified in core
+ @param $listfield string
@param $action_mutli array
*/
public static function ConvertInitVar( $listfield , $action_mutli=array() ){
@@ -352,18 +380,25 @@
/**
@remarks Construct all list , fields , th/td
*/
- self::$InitInfo['theader']['listing']=array(
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- );
+ self::$InitInfo['theader']['listing']=array();
+
+ if(count($action_mutli) > 0 )
+ self::$InitInfo['theader']['listing'][] = array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' );
+ if(defined('AJAXSTATMENTDETAIL'))
+ self::$InitInfo['theader']['listing'][] = array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' );
+
+
self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
- self::$InitInfo['modele']['listing']=array(
- 0=>false,
- 1=>false,
- );
+ self::$InitInfo['modele']['listing'] = array();
-// var_dump(__line__.' '.self::$code);
+
+ if(count($action_mutli) > 0 )
+ self::$InitInfo['modele']['listing'][0]=false;
+ if(defined('AJAXSTATMENTDETAIL'))
+ self::$InitInfo['modele']['listing'][1]=false;
+
+
// put in
if(isset($_SESSION['filters'][self::$code]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [self::$code]['allfields'];
@@ -404,7 +439,7 @@
@remarks this define col in table, and if is possible sort
*/
self::$InitInfo['modele']['listing'][$alias]=((isset($row['sort']) && $row['sort'] == true) ? true : false );
-//
+//
self::$InitInfo['modele2']['listing'][$alias]=$row; //((isset($row['sort']) && $row['sort'] == true) ? true : false );
if($clean !=$alias)
@@ -419,10 +454,12 @@
self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('@'.self::$code.' table heading action') );
self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('@'.self::$code.' table heading action') );
+
+
// add subligne in tfooter for multi action
- if(!isset(self::$InitInfo['tfooter']['listing_multi'])) {
+ if(count($action_mutli) > 0 ){
self::$InitInfo['tfooter']['listing_multi'] = array();
- self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => 2, 'class'=>'row_action', 'txt'=>tep_draw_checkbox_field('select_all', 'select_all' ) );
+ self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => (defined('AJAXSTATMENTDETAIL') ? 2 : 1 ), 'class'=>'row_action', 'txt'=>tep_draw_checkbox_field('select_all', 'select_all' ) );
$am = '';
foreach($action_mutli as $r)
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2013-07-06 20:45:37 UTC (rev 4777)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2013-07-07 09:07:58 UTC (rev 4778)
@@ -82,8 +82,36 @@
<div id="tabs-2" class="tabPage">
+<?php
+// print_r(featureds::$Info->listchilds);
+?>
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('@featureds table heading datatype') ?></th>
+ <th><?php echo __('@featureds table heading datatype id') ?></th>
+ <th><?php echo __('@featureds table heading date added') ?></th>
+ <th><?php echo __('@featureds table heading user added') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(featureds::$Info->listchilds as $row): ?>
+ <tr>
+ <td class="tcenter"><?php echo $row->datatype ?></td>
+ <td class="tcenter">
+ <strong>
+ <a href="<?php echo featureds::HrefLink($row->datatype_id, 'edit', $row->datatype) ?>" ><?php echo $row->datatype_id ?></a>
+ </strong>
+ </td>
+ <td class="tcenter"><?php echo tep_date_short($row->date_added) ?></td>
+ <td class="tcenter"><?php echo $row->user_added ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
<br class="clear" />
</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2013-07-06 20:45:37 UTC (rev 4777)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2013-07-07 09:07:58 UTC (rev 4778)
@@ -40,6 +40,7 @@
$lang['heading title edit'] = "Edition" ;
$lang['@featureds tab specification'] = "Caractéristique" ;
+ $lang['@featureds tab childs'] = "Éléments" ;
$lang['@featureds entry title'] = "Titre" ;
$lang['@featureds text info featureds keys'] = "Clef unique" ;
@@ -48,6 +49,13 @@
$lang['@featureds text info featureds max'] = "Nombre maximum d'entrée" ;
// $lang['table heading datatype'] = "Données" ;
+ /* Childs listing */
+ $lang['@featureds table heading datatype'] = "DataType" ;
+ $lang['@featureds table heading date added'] = "Ajouté" ;
+ $lang['@featureds table heading user added'] = "Créer par" ;
+// $lang['@featureds table heading action'] = "Action" ;
+
+
/* delete */
$lang['@featureds heading title delete featured'] = "Supprimer cette mise en avant ?" ;
@@ -55,4 +63,4 @@
/* rightto */
$lang['@featureds txt link to'] = "Mise en avant" ;
$lang['@featured link %s to %s'] = "Mise en avant" ;
-?>
+?>
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-07-06 20:45:37 UTC (rev 4777)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-07-07 09:07:58 UTC (rev 4778)
@@ -870,9 +870,27 @@
}
+ /**
+ @fn HrefLink($id, $action='edit')
+ @brief retrun link specififc this data
+ @param $id integer OR Array !!
+ @param $action string (defaut: edit)
+ @param $key not used
+ @param $params string other args passed in GET format and prev &
+ @return links
+ */
+ public static function HrefLink($id, $action='edit', $key='', $params=''){
+ if(is_array($id)){
+ $action = ((!isset($id['action']) || empty($id['action']))? 'edit' : $id['action'] );
+ $params = ((!isset($id['params']) || empty($id['params']))? '' : $id['params'] );
+ $id = $id['id'];
+ }
+ return tep_href_link( self::FILENAME,'pID='.$id.'&action='.$action . $params );
+ }
+
/**
@brief format db value for display page
@param $_query ressource db sql
Modified: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php 2013-07-06 20:45:37 UTC (rev 4777)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2013-07-07 09:07:58 UTC (rev 4778)
@@ -12,7 +12,7 @@
class featureds
extends ModTwo /// new abstract class for nextgen module
- implements
+ implements
InterfaceModule,
/*IntModTwo, */ /// new interface module for nextgen module
ExtModConfig {
@@ -88,89 +88,89 @@
Just for Edit listing
*/
self::$allfields = array(
- 'c.row_id' => array(
- 'sort'=>true,
- 'alias'=>'id',
+ 'c.row_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
'text'=>__('@featureds table heading id'),
- 'width'=>'2%',
+ 'width'=>'2%',
'class'=>'tcenter',
'default'=>true,
- ),
- 'c.featured_uniqkey' => array(
- 'sort'=>true,
-// 'alias'=>'key',
+ ),
+ 'c.featured_uniqkey' => array(
+ 'sort'=>true,
+// 'alias'=>'key',
'text'=>__('@featureds table heading key'),
'class'=>'tcenter',
'default'=>true,
- ),
- 'fd.featured_title' => array(
- 'sort'=>true,
- 'alias'=>'title',
+ ),
+ 'fd.featured_title' => array(
+ 'sort'=>true,
+ 'alias'=>'title',
'text'=>__('@featureds table heading title'),
'class'=>'tleft',
- 'width'=>'40%',
+ 'width'=>'40%',
'default'=>true,
- ),
+ ),
- 'c.k_status_type' => array(
- 'sort'=>true,
- 'alias'=>'type',
+ 'c.k_status_type' => array(
+ 'sort'=>true,
+ 'alias'=>'type',
'text'=>__('@featureds table heading status type id'),
- 'width'=>'8%',
+ 'width'=>'8%',
'class'=>'tcenter',
- ),
- 's.status_name' => array(
- 'sort'=>true,
- 'alias'=>'type_name',
+ ),
+ 's.status_name' => array(
+ 'sort'=>true,
+ 'alias'=>'type_name',
'text'=>__('@featureds table heading status type name'),
- 'width'=>'10%',
+ 'width'=>'10%',
'class'=>'tcenter',
'default'=>true,
- ),
+ ),
- 'c.featured_min' => array(
- 'sort'=>true,
- 'alias'=>'min',
+ 'c.featured_min' => array(
+ 'sort'=>true,
+ 'alias'=>'min',
'text'=>__('@featureds table heading min'),
- 'width'=>'2%',
+ 'width'=>'2%',
'class'=>'tcenter',
),
- 'c.featured_max' => array(
- 'sort'=>true,
- 'alias'=>'max',
+ 'c.featured_max' => array(
+ 'sort'=>true,
+ 'alias'=>'max',
'text'=>__('@featureds table heading max'),
- 'width'=>'2%',
+ 'width'=>'2%',
'class'=>'tcenter',
),
- 'c.date_added' => array(
- 'sort'=>true,
- 'alias'=>'date_added',
+ 'c.date_added' => array(
+ 'sort'=>true,
+ 'alias'=>'date_added',
'text'=>__('@featureds table heading date_added'),
- 'width'=>'10%',
+ 'width'=>'10%',
),
- 'c.date_update' => array(
- 'sort'=>true,
- 'alias'=>'date_update',
+ 'c.date_update' => array(
+ 'sort'=>true,
+ 'alias'=>'date_update',
'text'=>__('@featureds table heading date_update'),
- 'width'=>'10%',
+ 'width'=>'10%',
),
- 'c.user_added' => array(
- 'sort'=>true,
- 'alias'=>'user_added',
+ 'c.user_added' => array(
+ 'sort'=>true,
+ 'alias'=>'user_added',
'text'=>__('@featureds table heading user_added'),
- 'width'=>'10%',
+ 'width'=>'10%',
),
- 'c.user_update' => array(
- 'sort'=>true,
- 'alias'=>'user_update',
+ 'c.user_update' => array(
+ 'sort'=>true,
+ 'alias'=>'user_update',
'text'=>__('@featureds table heading user_update'),
- 'width'=>'10%',
+ 'width'=>'10%',
),
- 'c.featured_status' => array(
- 'sort'=>true,
- 'alias'=>'status',
+ 'c.featured_status' => array(
+ 'sort'=>true,
+ 'alias'=>'status',
'text'=>__('@featureds table heading status'),
- 'width'=>'2%',
+ 'width'=>'2%',
'class'=>'tcenter',
'default'=>true,
),
@@ -220,7 +220,7 @@
switch (self::$action) {
/**
- @remarks specific save in session value filters
+ @remarks specific save in session value filters
*/
case 'filters':
/*
@@ -324,7 +324,12 @@
case 'new':
if( (int)self::$Id > 0) {
self::$Info = sqlfeatured::fetch(array('id'=>self::$Id ), true);
+
+
+ self::$Info->listchilds = sqlfeatureddata::fetch(array('featured_id'=>self::$Id), true);
}
+
+
else{
self::$Info = sqlfeatured::Specimen(true);
}
@@ -340,7 +345,7 @@
$adjust=new objectInfo(self::$InitInfo['adjust']);
- $query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
+ $query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
" LEFT JOIN ".TABLE_FEATURED_DESCRIPTION. " fd ON(fd.featured_id = c.row_id AND fd.languages_id = '".$adjust->languages_id."' ) ".
" LEFT JOIN ".TABLE_STATUS." s ON(status_id = k_status_type AND s.language_id = '".$adjust->languages_id."' AND status_type='".self::$datatype."') " .
((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
@@ -516,9 +521,9 @@
}
- /**
- @remarks implements InterfaceModule depend
- if module twin in backoffice, report all content install in the other module
+ /**
+ @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;}
@@ -527,7 +532,7 @@
/**
@fn check()
- @brief test if count all var , and keys is equal
+ @brief test if count all var , and keys is equal
@return boolean true/false
*/
function check() { return false; }
@@ -535,19 +540,19 @@
/**
@fn keys()
- @return array all key configuration define by this module
+ @return array all key configuration define by this module
*/
function keys() { return false; }
/**
@fn install()
- @brief add all configuration
- @note
+ @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__MODTYPENAME_MAJ_'
- if module twin in backoffice, report all content install in the other module
- - Not use language in DB , but function :__()
- for MODULE_TOTO_ST
+ - Not use language in DB , but function :__()
+ for MODULE_TOTO_ST
var title MODULE_TOTO_ST_S (small description)
var description MODULE_TOTO_ST_L (long description)
*/
@@ -556,9 +561,9 @@
/**
@fn remove()
@brief delete all configuration
- @note
+ @note
- please, pefix all var configuration by 'MODULE_PAYMENT__MODTYPENAME_MAJ_'
- - if module twin in backoffice, report all content remove in the other module
+ - if module twin in backoffice, report all content remove in the other module
*/
function remove() { return false; }
}
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-07-06 20:45:37 UTC (rev 4777)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-07-07 09:07:58 UTC (rev 4778)
@@ -1174,7 +1174,7 @@
$query_raw .=" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' p.products_date_added DESC ');
$_query = $DB->query($query_raw);
- $query_numrows = $_query->__get('numRows');
+ $query_numrows = $_query->__get('numRows');
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -1343,7 +1343,26 @@
}
+ /**
+ @fn HrefLink($id, $action='edit')
+ @brief retrun link specififc this data
+ @param $id integer OR Array !!
+ @param $action string (defaut: edit)
+ @param $key not used
+ @param $params string other args passed in GET format and prev &
+ @return links
+ */
+ public static function HrefLink($id, $action='edit', $key='', $params=''){
+ if(is_array($id)){
+ $action = ((!isset($id['action']) || empty($id['action']))? 'edit' : $id['action'] );
+ $params = ((!isset($id['params']) || empty($id['params']))? '' : $id['params'] );
+ $id = $id['id'];
+ }
+ return tep_href_link( self::FILENAME,'pID='.$id.'&action='.$action . $params );
+ }
+
+
/**
@brief return Filename
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-06 20:45:43
|
Revision: 4777
http://sourceforge.net/p/oscss/svn/4777
Author: oscim
Date: 2013-07-06 20:45:37 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
improvement and code factoring processing filters and init data
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/header.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/modules/pages/shipping.php
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -77,10 +77,15 @@
@var array $modules
*/
public static $modules;
+ /**
+ @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();
-
-
-
/**
@brief standart class exe action in module
If use "action" in var (POST or GET), this function is loaded
@@ -261,13 +266,16 @@
}
/**
+ @fn tep_get_modele($param='modele')
+ @return array
*/
public static function tep_get_modele(){
-// call_user_func(array(self::$code, 'GetConf'));
+ $params = func_get_args();
$action=(empty(self::$action)? 'listing' :self::$action);
+ $param=(!isset($params[0][0])? 'modele' :$params[0][0]);
- return (isset(self::$InitInfo['modele'][$action]) ? self::$InitInfo['modele'][$action] : array() );
+ return (isset(self::$InitInfo[$param][$action]) ? self::$InitInfo[$param][$action] : array() );
}
/**
@@ -280,7 +288,165 @@
// // var_dump(call_user_func_array(array(self::$code, 'ListingArray'),array( $page,$rowbyp,$sOrder,$sWhere,$options) ));
// }
+ /**
+ @fn actionFilter()
+ @brief initiate the execution of the action "filters"
+ reset and initialization of columns and their filter
+ @note Use Session
+ @return none
+ */
+ public static function actionFilter(){
+
+ $_SESSION['filters'] =array();
+
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][self::$code]['allfields'][$key]);
+ }
+
+
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][self::$code]['allfields'][$key]);
+ }
+ }
/**
+ @brief Construct base transversal data object
+ This key is unified in core
+ @param $listfield string
+ @param $action_mutli array
+ */
+ public static function ConvertInitVar( $listfield , $action_mutli=array() ){
+
+ if(is_object(self::$modules)) {
+ /* 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 */
+
+
+
+ /* 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 */
+ }
+
+ /**
+ @remarks Construct all list , fields , th/td
+ */
+ self::$InitInfo['theader']['listing']=array(
+ array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+ 0=>false,
+ 1=>false,
+ );
+
+// var_dump(__line__.' '.self::$code);
+ // put in
+ if(isset($_SESSION['filters'][self::$code]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'] [self::$code]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+
+ $i=0;
+ // 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]=((isset($row['sort']) && $row['sort'] == true) ? true : false );
+//
+ self::$InitInfo['modele2']['listing'][$alias]=$row; //((isset($row['sort']) && $row['sort'] == true) ? true : false );
+
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+ $i++;
+ }
+ }
+
+ self::$InitInfo['modele']['listing']['action']=false;
+ self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('@'.self::$code.' table heading action') );
+ self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('@'.self::$code.' table heading action') );
+
+ // add subligne in tfooter for multi action
+ if(!isset(self::$InitInfo['tfooter']['listing_multi'])) {
+ self::$InitInfo['tfooter']['listing_multi'] = array();
+ self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => 2, 'class'=>'row_action', 'txt'=>tep_draw_checkbox_field('select_all', 'select_all' ) );
+
+ $am = '';
+ foreach($action_mutli as $r)
+ $am .= $r;
+ self::$InitInfo['tfooter']['listing_multi'][] = array( 'colspan' => ($i+1), 'class'=>'row_action', 'txt'=> $am);
+ }
+
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;
+
+ /**
+ @remarks Put detail for listing methode
+ */
+ self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing'] = array();
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'listfield' );
+
+ return $listfield;
+ }
+
+ /**
@brief return classs name
*/
public static function GetClassName(){
Modified: trunk/catalog/admin/includes/header.php
===================================================================
--- trunk/catalog/admin/includes/header.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/header.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -41,6 +41,8 @@
tep_include_file (DIR_WS_JS."dataTables.TableTools/ZeroClipboard/ZeroClipboard.js",true);
tep_include_file (DIR_WS_JS."dataTables.TableTools/js/TableTools.min.js",true);
}
+// print_r(call_user_func(array(tep_extrac_querystring(JSONSTATMENT,'type'), 'tep_get_modele'), array('listing') ) );
+// exit;
?>
@@ -132,14 +134,24 @@
"sLast": "<?php echo PREVIOUS ?>"
}
},
- <?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):
- echo ' { "bSortable": '.(($sort !=false) ? 'true' : 'false' ).' },'."\n";
+ <?php ?>
+ <?php if( ($col=call_user_func(array(tep_extrac_querystring(JSONSTATMENT,'type'), 'tep_get_modele') )) && is_array($col)):
+ $col2=call_user_func(array(tep_extrac_querystring(JSONSTATMENT,'type'), 'tep_get_modele'), array('modele2') ); ?>
+ <?php $i=0; foreach($col as $k=>$row):
+ echo ' { ';
+ echo ' "bSortable": '.((isset($col2[$k]['sort']) && $col2[$k]['sort'] !=false) ? 'true' : 'false' ).' ,';
+ if(isset($col2[$k]['class']))
+ echo ' "sClass": "'.$col2[$k]['class'].'" ,';
+
+ echo ' },'."\n";
$i++; endforeach;
?>
+ <?php endif; ?>
+ <?php ?>
],
- <?php endif; ?>
+
<?php if(defined('AJAXSTATMENTDETAIL')) : ?>
"fnDrawCallback": fnOpenClose,
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2013-07-06 20:45:37 UTC (rev 4777)
@@ -44,7 +44,7 @@
$lang['@customers table heading balance account']="Balance" ;
$lang['@customers table heading number of logons']="Connecté(s)" ;
- $lang['table heading action']="Action" ;
+ $lang['@customers table heading action']="Action" ;
$lang['@customers table heading name']="Nom" ;
$lang['@customers table heading groupe']="Groupe" ;
@@ -126,16 +126,12 @@
$lang['error in process notification for %s']="Erreur lors de la notification à " ;
$lang['error in process send mail for %s'] = "Erreur lors de l'envoi email à %s";
$lang['send mail for %s ok'] = "Envoi email reussie à %s";
-
+ $lang['customers save success']="Enregistrement du client reussie" ;
$lang['error save in process']="Erreur lors de l'enregistrement du client" ;
$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 save success']="Enregistrement du client reussi" ;
- $lang['@customers not save error']="Erreur lors de l'enregistrement du client" ;
- $lang['@customers create success']="Creation du client reussi" ;
- $lang['@customers not create error']="Erreur lors de la creation du client" ;
$lang['@customers update confirm status customers']="Mise à jour de l'état de 'confirmé' " ;
$lang['@customers update status customers']="Mise à jour de l'état " ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2013-07-06 20:45:37 UTC (rev 4777)
@@ -27,7 +27,7 @@
$lang['@featureds table heading user_update'] = "Modifié par" ;
$lang['@featureds table heading date_update'] = "Modifié" ;
$lang['@featureds table heading key'] = "Clef" ;
- $lang['table heading action'] = "Action" ;
+ $lang['@featureds table heading action'] = "Action" ;
/* alert */
$lang['@featureds update status']="Changement de l'état de cette mise en avant" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2013-07-06 20:45:37 UTC (rev 4777)
@@ -91,7 +91,7 @@
/* Section tabs 2 */
$lang['table heading status']="Statut" ;
$lang['table heading id']="Id" ;
- $lang['table heading action']="Action" ;
+ $lang['@orders table heading action']="Action" ;
$lang['table heading quantity']="Qté." ;
$lang['table heading products model']="Modèle" ;
$lang['table heading products']="Produits" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2013-07-06 20:45:37 UTC (rev 4777)
@@ -103,7 +103,7 @@
$lang['products table heading featured id']="Mea.id" ;
$lang['products table heading featured']="Mise en avant" ;
- $lang['table heading action']="Action" ;
+ $lang['@products table heading action']="Action" ;
/* Bouton */
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2013-07-06 20:45:37 UTC (rev 4777)
@@ -23,7 +23,7 @@
$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" ;
+ $lang['@shipping table heading action']="Action" ;
/* mutli */
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -33,13 +33,10 @@
@var object
*/
public static $list=array();
+
/**
@var object
*/
- public static $modules;
- /**
- @var object
- */
public static $Info;
/**
@var array
@@ -53,13 +50,10 @@
@var bool
*/
public static $disabled_status;
- /**
- @var array info all tabs for filter listings
- */
- public static $allfields = array();
+
/**
class constructor
*/
@@ -147,9 +141,10 @@
if( DataTypes::is_active('categorie')) {
self::$allfields['cat.categories_id'] = array(
'sort'=>true,
- 'alias'=>'categories_id',
+ 'alias'=>'categorie_id',
'text'=>__('cms_content table heading categories id'),
'width'=>'6%',
+ 'class'=>'tcenter',
);
self::$allfields['catd.categories_name'] =array(
'sort'=>true,
@@ -193,14 +188,6 @@
'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;
- }
- }
- /* END Sub module add col */
self::$allfields['c.content_status'] = array(
'sort'=>true,
@@ -217,21 +204,7 @@
'default'=>true,
);
- /**
- @remarks Construct all list , fields , th/td
- */
- self::$InitInfo['theader']['listing']=array(
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- );
- self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
- self::$InitInfo['modele']['listing']=array(
- 0=>false,
- 1=>false,
- );
-
-
/**
@remarks filter based on language
*/
@@ -242,61 +215,9 @@
// min fields and not view directly colonne fields
$listfield = ' c.content_id as id, ';
+ $mutli=array();
+// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
- // 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]=((isset($row['sort']) && $row['sort'] == true) ? true : false );
-
- 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 categorie
*/
@@ -370,10 +291,11 @@
+ $listfield= self::ConvertInitVar( $listfield, $mutli);
/**
@remarks Active forms filter
*/
- self::$InitInfo['tfilter']['listing'] = array();
+// self::$InitInfo['tfilter']['listing'] = array();
if( DataTypes::is_active('categorie'))
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'categorie' );
@@ -382,16 +304,10 @@
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'featured' );
// self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'language' );
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'listfield' );
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'subtype' );
- /**
- @remarks Put detail for listing methode
- */
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
-
/**
@remarks this define menu master module in page
*/
@@ -450,17 +366,12 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'] =array();
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
- else
- unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
- }
-
-
if( DataTypes::is_active('categorie'))
foreach($_POST['filters']['categorie'] as $key=>$row){
if( $row =='on' )
@@ -959,13 +870,6 @@
}
- /**
- @brief redefine model
- */
- public static function tep_get_modele(){
- self::GetConf();
- return self::$InitInfo['modele']['listing'];
- }
@@ -988,15 +892,18 @@
while ($item = $_query->fetchAssoc()) {
$ord =array();
- /// complete cats list
- $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_CONTENT_TO_CATEGORIES . " p2c WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and content_id='".$item['id']."' AND c.categories_id <> '".$item['categories_id']."' ");
- $rescat=$objres->fetchAllAssoc();
- foreach($rescat as $cat)
- $item['cat_title'] .=','.$cat['categories_name'];
+ if( DataTypes::is_active('categorie')) {
+ /// complete cats list
+ $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_CONTENT_TO_CATEGORIES . " p2c WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and content_id='".$item['id']."' AND c.categories_id <> '".$item['categories_id']."' ");
+ $rescat=$objres->fetchAllAssoc();
- if(strlen($item['cat_title'])>25)$item['cat_title']= substr($item['cat_title'],0 ,20).'...';
+ foreach($rescat as $cat)
+ $item['cat_title'] .=','.$cat['categories_name'];
+ if(strlen($item['cat_title'])>25)$item['cat_title']= substr($item['cat_title'],0 ,20).'...';
+ }
+
$item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
foreach(self::$InitInfo['modele']['listing'] as $k=>$row){
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -31,10 +31,6 @@
*/
public static $list=array();
/**
- @var array $modules
- */
- public static $modules;
- /**
@var array $languages
*/
public static $languages;
@@ -66,16 +62,7 @@
@var int Id customers
*/
public static $Id;
- /**
- @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();
}
@@ -141,6 +128,8 @@
'sort'=>true,
'alias'=>'type',
'text'=>__('@customers table heading type'),
+ 'class'=>'tcenter',
+ 'width'=>'4%',
),
"CONCAT(customers_firstname, ' ', customers_lastname)" => array(
@@ -157,6 +146,7 @@
'sort'=>true,
'alias'=>'dob',
'text'=>__('@customers table heading dob'),
+ 'class'=>'tcenter',
);
self::$allfields['c.customers_email_address'] = array(
'sort'=>true,
@@ -177,12 +167,14 @@
'sort'=>true,
'alias'=>'language',
'text'=>__('@customers table heading language'),
+ 'class'=>'tcenter',
);
self::$allfields['c.customers_group_id'] = array(
'sort'=>true,
'alias'=>'group_id',
'text'=>__('@customers table heading group id'),
+ 'class'=>'tcenter',
);
// self::$allfields['cg.customers_group_name'] = array(
// 'sort'=>true,
@@ -195,61 +187,56 @@
'sort'=>true,
'alias'=>'discount',
'text'=>__('@customers table heading discount'),
+ 'class'=>'tright',
);
self::$allfields['c.customers_balance_account'] = array(
'sort'=>true,
'alias'=>'balance_account',
'text'=>__('@customers table heading balance account'),
+ 'class'=>'tright',
);
self::$allfields['c.customers_shopping_points'] = array(
'sort'=>true,
'alias'=>'shopping_points',
'text'=>__('@customers table heading shopping points'),
+ 'class'=>'tright',
);
self::$allfields['ci.customers_info_date_account_created'] = array(
'sort'=>true,
'alias'=>'added',
'text'=>__('@customers table heading date added'),
'width'=>'8%',
+ 'class'=>'tcenter',
);
self::$allfields['ci.customers_info_date_account_last_modified'] = array(
'sort'=>true,
'alias'=>'modified',
'text'=>__('@customers table heading last modified'),
'width'=>'8%',
+ 'class'=>'tcenter',
);
self::$allfields['ci.customers_info_date_of_last_logon'] = array(
'sort'=>true,
'alias'=>'last_logon',
'text'=>__('@customers table heading last logon'),
+ 'class'=>'tright',
);
self::$allfields['ci.customers_info_number_of_logons'] = array(
'sort'=>true,
'alias'=>'number_of_logons',
'text'=>__('@customers table heading number of logons'),
'default'=>true,
+ 'class'=>'tcenter',
);
- /* 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',
'text'=>__('@customers table heading group ra'),
'width'=>'5%',
'default'=>true,
+ 'class'=>'tcenter',
);
self::$allfields['c.customers_status'] = array(
'sort'=>true,
@@ -257,107 +244,17 @@
'text'=>__('@customers table heading status'),
'width'=>'5%',
'default'=>true,
+ 'class'=>'tcenter',
);
-
- /**
- @remarks Construct all list , fields , th/td
- */
- self::$InitInfo['theader']['listing']=array(
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- 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 = " ";
+ $mutli=array();
- /* 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']))
- $_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]=((isset($row['sort']) && $row['sort'] == true) ? true : false );
-
-
- 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 ;
-
+ $listfield= self::ConvertInitVar( $listfield, $mutli);
/**
- @remarks Active forms filter
- */
- self::$InitInfo['tfilter']['listing']=array(
- array(
- 'type'=>'listfield'
- ),
- );
-
- /**
- @remarks Put detail for listing methode
- */
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
-
-
- /**
@remarks this define menu master module in page
*/
if(self::$action =='listing'){
@@ -430,13 +327,11 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'] =array();
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
- }
-
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -565,23 +460,12 @@
$array['password']=$mdp=self::randomize();
$array['email']=$array['sqlarray']['customers_email_address'];
$_id=sqlcustomer::create($array);
-
- if($_id>0)
- $messageStack->add(__('@customers create success'), 'success');
- else
- $messageStack->add(__('@customers not create error'), 'error');
-
$result=sqlcustomer::fetch(array('id'=>$_id), false );
}
else{
$array['id']=$_id=tep_db_prepare_input(self::$Id);
- $r=sqlcustomer::update($array, false);
+ $result=sqlcustomer::update($array, false);
- if($r>0)
- $messageStack->add(__('@customers save success'), 'success');
- else
- $messageStack->add(__('@customers not save error'), 'error');
-
$result=sqlcustomer::fetch(array('id'=>$_id), false );
}
@@ -622,8 +506,9 @@
$messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
}
-
-
+ $messageStack->add(__('customers save success'), 'success');
+// print_r($_SESSION);
+// exit;
if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME));
else tep_redirect(tep_href_link(self::FILENAME, 'cID=' .$_id.'&action=edit'));
}
@@ -785,7 +670,6 @@
$query_raw .= " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
// echo $query_raw;
-
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -1001,16 +885,6 @@
}
- /**
- @brief redefine model
- */
- public static function tep_get_modele(){
- self::GetConf();
- return self::$InitInfo['modele']['listing'];
- }
-
-
-
/**
@brief format db value for display page
@param $_query ressource db sql
Modified: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -31,12 +31,9 @@
@var current object
*/
public static $Info;
- /**
- @var array info all tabs for filter listings
- */
- public static $allfields = array();
+
/**
@brief class constructor
*/
@@ -110,7 +107,7 @@
'sort'=>true,
'alias'=>'title',
'text'=>__('@featureds table heading title'),
- 'class'=>'tcenter',
+ 'class'=>'tleft',
'width'=>'40%',
'default'=>true,
),
@@ -181,90 +178,14 @@
// , k_status_type as type , featured_status
- /**
- @remarks Construct all list , fields , th/td
- */
- self::$InitInfo['theader']['listing']=array(
-// array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- );
- self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
- self::$InitInfo['modele']['listing']=array(
-// false,
- );
-
// min fields and not view directly colonne fields
$listfield = 'k_status_type as type , featured_status,';
- // put in
- if(isset($_SESSION['filters'][__CLASS__]['allfields']))
- $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
- else
- $_SESSION['filters']['allfields'] = array();
+ $mutli=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%';
- }
+ $listfield= self::ConvertInitVar( $listfield, $mutli);
-
-
- 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]=((isset($row['sort']) && $row['sort'] == true) ? true : false );
-
- 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 Active forms filter
- */
- self::$InitInfo['tfilter']['listing']=array(
- array(
- 'title'=>__('featureds filter tab fields'),
- 'type'=>'listfield'
- ),
- );
-
- /**
- @remarks Put detail for listing methode
- */
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
-
/**
@remarks this define menu master module in page
*/
@@ -302,15 +223,11 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'] =array();
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
- else
- unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
- }
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
-
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -535,7 +452,11 @@
global $query_numrows,$languages_id;
while ($item = $_query->fetchAssoc()) {
+ $ord = array();
+ $item[0]=$item['id'];
+ $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 == 'status') $ord[$k]=self::RowStatus($item);
@@ -543,6 +464,9 @@
elseif($k == 'date_update') $ord[$k]=tep_datetime_short($item[$k]);
else $ord[$k]=$item[$k];
+
+
+
$res[]=$ord;
}
break;
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -75,7 +75,7 @@
/**
@var array info all tabs for filter listings
*/
- public static $allfields = array();
+// public static $allfields = array();
/**
@brief class constructor
@@ -175,7 +175,7 @@
'alias'=>'ref',
'text'=>__('orders table heading order ref'),
'width'=>'5%',
- 'class'=>'tcenter',
+ 'class'=>'tleft',
'default'=>true,
),
'o.customers_id' => array(
@@ -191,11 +191,13 @@
'alias'=>'order_total',
'text'=>__('orders table heading order total'),
'default'=>true,
+ 'class'=>'tright',
),
'o.currency' => array(
'sort'=>true,
'text'=>__('orders table heading currency'),
'default'=>true,
+ 'class'=>'tcenter',
),
// 'o.currency_value' => array(
// 'sort'=>true,
@@ -229,7 +231,7 @@
'alias'=>'orders_status_name',
'text'=> __('orders table heading status'),
'width'=>'10%',
- 'class'=>'tcenter',
+ 'class'=>'tleft',
'default'=>true,
),
'o.ip_address' => array(
@@ -245,7 +247,7 @@
// 'alias'=>'orders_status_name',
'text'=> __('orders table heading total_weight'),
'width'=>'10%',
- 'class'=>'tcenter',
+ 'class'=>'tright',
// 'default'=>true,
),
'o.facture_id' => array(
@@ -261,7 +263,7 @@
'alias'=>'facture_ref',
'text'=> __('orders table heading facture ref'),
'width'=>'10%',
- 'class'=>'tcenter',
+ 'class'=>'tleft',
// 'default'=>true,
),
'o.class_payment' => array(
@@ -287,77 +289,86 @@
/**
@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']=array(
- 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>'<input type="checkbox" id="select_all" name="select_all">' ),
- );
+// self::$InitInfo['theader']['listing']=array(
+// 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+// 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+// );
+// self::$InitInfo['tfooter']['listing']=array(
+// 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+// 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>'<input type="checkbox" id="select_all" name="select_all">' ),
+// );
+//
+//
+//
+// self::$InitInfo['modele']['listing']=array(
+// 0 =>false,
+// 1 =>false,
+// );
-
-
- self::$InitInfo['modele']['listing']=array(
- 0 =>false,
- 1 =>false,
- );
-
// min fields and not view directly colonne fields
$listfield = 'o.orders_id , o.orders_prefix, s.status_color as orders_status_color,';
- // 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%';
- }
+ // min fields and not view directly colonne fields
+// $listfield = ' notif_id as id, ';
+ $mutli=array();
+// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
+ $listfield= self::ConvertInitVar( $listfield, $mutli);
+ // 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';
+ $_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 );
+// 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'][$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 ;
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;*/
/**
@remarks filter based on status orders
@@ -430,27 +441,15 @@
/**
@remarks Active forms filter
*/
- self::$InitInfo['tfilter']['listing']=array(
- array(
- 'title'=>__('orders filter tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
- ),
- /// lnk to products
- array(
- 'title'=>__('orders filter products tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.products'),
- ),
- array(
- 'title'=>__('orders filter tab fields'),
- 'type'=>'listfield'
- ),
- );
-
- /**
- @remarks Put detail for listing methode
- */
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
-
+ self::$InitInfo['tfilter']['listing'][]=array(
+ 'title'=>__('orders filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ );
+ /// lnk to products
+ self::$InitInfo['tfilter']['listing'][]=array(
+ 'title'=>__('orders filter products tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.products'),
+ );
break;
}
@@ -483,15 +482,11 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters']=array();
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
- // 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]);
- }
// status orders restric list
foreach($_POST['filters']['viewstatus'] as $key=>$row){
@@ -998,11 +993,13 @@
$key_attrib='';
$light_attrib = array();
- foreach($rows['attributes'] as $attrib){
- $key_attrib .= $attrib['option_id'].'-'.$attrib['value_id'].',';
- $light_attrib[$attrib['option_id']] = $attrib['value_id'];
- }
+ if(isset($rows['attributes']) && is_array($rows['attributes']))
+ foreach($rows['attributes'] as $attrib){
+ $key_attrib .= $attrib['option_id'].'-'.$attrib['value_id'].',';
+ $light_attrib[$attrib['option_id']] = $attrib['value_id'];
+ }
+
if(strlen($key_attrib)> 0)
$key_attrib = substr($key_attrib,0,-1);
@@ -1011,7 +1008,7 @@
$sql="SELECT cc.* ".
" FROM ".TABLE_SERVICES." cc ".
- " WHERE cc.customers_id = '" . (int)$res->customer['id'] . "' AND cc.orders_id = '".(int)self::$oID ."' AND cc.orders_products_id = '".$rows['rowid']."' ".
+ " WHERE cc.customers_id = '" . (int)$res->customer['id'] . "' AND cc.orders_id = '".(int)self::$oID ."' AND cc.orders_products_id = '".$rows['id']."' ".
" ORDER BY row_id DESC";
$_query2 = $DB->query($sql);
@@ -1026,10 +1023,10 @@
/// physical
else {
- $sql="SELECT cp.orders_products_id as products_id , cp.orders_products_attributes as key_attrib ,SUM(cp.qt_expedie) as qt ".
+ $sql="SELECT cp.orders_products_id as products_id , cp.orders_products_attributes as key_attrib ,SUM(cp.qt_expedie) as qt , cc.status ".
" FROM ".TABLE_SHIPPING." cc ".
" LEFT JOIN ".TABLE_SHIPPING_PRODUCTS." cp ON (cc.row_id = cp.shipping_id) ".
- " WHERE cc.orders_id = '".(int)self::$oID ."' AND cp.orders_products_id = '".$rows['rowid']."' AND cp.orders_products_attributes ='".$key_attrib."' ".
+ " WHERE cc.orders_id = '".(int)self::$oID ."' AND cp.orders_products_id = '".$rows['id']."' AND cp.orders_products_attributes ='".$key_attrib."' ".
" GROUP BY orders_products_id ";
" ORDER BY row_id DESC";
@@ -1043,7 +1040,7 @@
$result['qt_orders'] = $rows['qty'];
$result['attrib'] = $light_attrib;
$robj = new objectInfo(array_merge($rows,$result));
- $activ_add[] = ( ( (int)$rows['qty'] == $qt) ? false : true );
+ $activ_add[] = ( ( (int)$rows['qty'] <= $qt) ? false : true );
$res->pshipping[]=$robj;
}
}
@@ -1058,7 +1055,6 @@
}
}
-
$result4 = sqlshipping::fetch(array('orders_id'=>(int)self::$oID ), true);
if(!$result4)
@@ -1068,7 +1064,9 @@
else
$res->allshipping[] = $result4;
-
+ /*
+ Display block in html content
+ */
$res->display_service = (count($res->service) <= 0 )? false : true;
$res->display_shipping = (count($res->pshipping) <= 0 )? false : true;
$res->display_shipping_add = (in_array(true, $activ_add))? true : false;
@@ -1394,13 +1392,13 @@
return self::$list=self::CheckResult($res);
}
- public static function tep_get_modele(){
- self::GetConf();
- $action=(empty(self::$action)? 'listing' :self::$action);
+// public static function tep_get_modele(){
+// self::GetConf();
+// $action=(empty(self::$action)? 'listing' :self::$action);
+//
+// return (isset(self::$InitInfo['modele'][$action]) ? self::$InitInfo['modele'][$action] : array() );
+// }
- return (isset(self::$InitInfo['modele'][$action]) ? self::$InitInfo['modele'][$action] : array() );
- }
-
/**
@brief Redefine Parent method
*/
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -39,7 +39,7 @@
/**
@var array $modules
*/
- public static $modules;
+// public static $modules;
/**
@var array $languages
*/
@@ -95,11 +95,11 @@
/**
@var array info all tabs for filter listings
*/
- public static $allfields = array();
+// public static $allfields = array();
/**
@var array info all tabs for filter listings , specifical owner sub module
*/
- protected static $allfieldsexternal = array();
+// protected static $allfieldsexternal = array();
/**
@brief constructor
*/
@@ -315,12 +315,14 @@
'alias'=>'weight',
'text'=>__('products table heading weight'),
'default'=>true,
+ 'class'=>'tright',
);
self::$allfields['p.products_price']= array(
'sort'=>true,
'alias'=>'price',
'text'=>__('products table heading price'),
+ 'class'=>'tright',
);
}
// self::$allfields['p.products_price']= array(
@@ -367,17 +369,19 @@
if(_cst_bool('STOCK_CHECK')) {
// if(isset($_SESSION['filters'][__CLASS__]['byattribute']) && in_array('on',$_SESSION['filters'][__CLASS__]['byattribute']) )
- if(isset($_SESSION['filters'][__CLASS__]['bystock']) && $_SESSION['filters'][__CLASS__]['bystock'] > 0 )
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && $_SESSION['filters'][__CLASS__]['bystock'] > 0 )
self::$allfields['if(ps.products_stock_quantity, ps.products_stock_quantity, p.products_quantity)']= array(
'sort'=>true,
'alias'=>'quantity',
'text'=>__('products table heading quantity'),
+ 'class'=>'tright',
);
else {
self::$allfields['p.products_quantity']= array(
'sort'=>true,
'alias'=>'quantity',
'text'=>__('products table heading quantity'),
+ 'class'=>'tright',
);
self::$allfields['p.track_stock']= array(
@@ -385,7 +389,7 @@
'alias'=>'track_stock',
'text'=>__('products table heading track_stock'),
'width'=>'10%',
- 'class'=>'tcenter',
+// 'class'=>'tright',
);
}
}
@@ -394,31 +398,23 @@
'sort'=>true,
'alias'=>'added',
'text'=>__('products table heading date_added'),
+ 'class'=>'tcenter',
);
self::$allfields['p.products_last_modified']= array(
'sort'=>true,
'alias'=>'modified',
'text'=>__('products table heading last modified'),
+ 'class'=>'tcenter',
);
self::$allfields['p.products_date_available']= array(
'sort'=>true,
'alias'=>'available',
'text'=>__('products table heading available'),
+ 'class'=>'tcenter',
);
- /* 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['p.products_status']= array(
'sort'=>true,
'alias'=>'status',
@@ -432,38 +428,13 @@
/**
@remarks Construct all list , fields , th/td
*/
- self::$InitInfo['theader']['listing']=array(
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- 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 = ' cat.categories_id, ';
- /* 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 */
+ $mutli=array();
+ $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
- // put in
- if(isset($_SESSION['filters'][__CLASS__]['allfields']))
- $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
- else
- $_SESSION['filters']['allfields'] = array();
-
-
if(isset($_SESSION['filters'][__CLASS__]['bystock']))
$_SESSION['filters']['bystock'] = $_SESSION['filters'] [__CLASS__]['bystock'];
else
@@ -474,53 +445,8 @@
else
$_SESSION['filters']['byattribute'] = 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]= ((isset($row['sort']) && $row['sort'] == true) ? true : false );
-
- 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 language
*/
@@ -669,15 +595,16 @@
@remarks Put detail for listing methode
*/
self::$InitInfo['adjust']['languages_id'] = $new_languages_id;
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+// self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+ $listfield= self::ConvertInitVar( $listfield, $mutli);
/**
@remarks Active forms filter
*/
- self::$InitInfo['tfilter']['listing'] = array();
+// self::$InitInfo['tfilter']['listing'] = array();
if( DataTypes::is_active('categorie'))
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'categorie' );
@@ -690,7 +617,6 @@
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'featured' );
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'language' );
- self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'listfield' );
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'subtype' );
self::$InitInfo['tfilter']['listing'][]=array(
@@ -778,7 +704,10 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'] =array();
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
// foreach($_POST['filters']['bystock'] as $key=>$row){
if( (int)$_POST['filters']['bystock'] >= 0 )
@@ -794,13 +723,8 @@
unset($_SESSION['filters'][__CLASS__]['byattribute'][$key]);
}
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
- else
- unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
- }
+
if( DataTypes::is_active('categorie'))
foreach($_POST['filters']['categorie'] as $key=>$row){
if( $row =='on' )
@@ -1250,9 +1174,8 @@
$query_raw .=" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' p.products_date_added DESC ');
$_query = $DB->query($query_raw);
- $query_numrows = $_query->__get('numRows'); //($query_raw) ) ;
-// var_dump($query_raw);
-// var_dump($query_numrows);
+ $query_numrows = $_query->__get('numRows');
+
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -1429,16 +1352,7 @@
}
- /**
- @brief redefine model
- */
- public static function tep_get_modele(){
- self::GetConf();
- return self::$InitInfo['modele']['listing'];
- }
-
-
/** methode specific module */
public static function NameVirtualID($id){
Modified: trunk/catalog/admin/includes/modules/pages/shipping.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/shipping.php 2013-07-06 09:59:16 UTC (rev 4776)
+++ trunk/catalog/admin/includes/modules/pages/shipping.php 2013-07-06 20:45:37 UTC (rev 4777)
@@ -77,12 +77,9 @@
@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
*/
@@ -209,19 +206,7 @@
);
- /**
- @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,
- );
@@ -230,59 +215,10 @@
// min fields and not...
[truncated message content] |
|
From: <os...@us...> - 2013-07-06 09:59:23
|
Revision: 4776
http://sourceforge.net/p/oscss/svn/4776
Author: oscim
Date: 2013-07-06 09:59:16 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
Fix process shipping for product and attribute
Adjust sql and all file
Fix view link pdf in order page for use ref
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlservices.php
trunk/catalog/admin/includes/classes/drivers/sqlshipping.php
trunk/catalog/admin/includes/classes/productUtility.php
trunk/catalog/admin/includes/functions/general.php
trunk/catalog/admin/includes/functions/lib.orders.php
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.sql
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.key.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_shipping_products.sql
Modified: trunk/catalog/admin/includes/classes/drivers/sqlservices.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlservices.php 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/classes/drivers/sqlservices.php 2013-07-06 09:59:16 UTC (rev 4776)
@@ -3,209 +3,840 @@
@licence GPL 2005-2013 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.2
- @date 04/07/2013, 20:11
+ @version 2.1.1
+ @date 04/03/2012, 22:42
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class manage link table configuration
+ @class services
+ @brief manage services, listing and edit status
*/
+class services
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ IntModTwo, /// new interface module for nextgen module
+ InterfacedInnerHtml {
-class sqlservices
- implements ModSqlDataDriver{
+ /**
+ @var const
+ */
+ const FILENAME = 'services.php';
+ /**
+ @var array list, utilisé dans les gabarits, list des services
+ */
+ public static $list=array();
+ /**
+ @var object $order
+ */
+ public static $order;
+ /**
+ @var int Id order
+ */
+ public static $oID;
+ /**
+ @var bool $update autorise mise a jour status
+ */
+ public static $update;
+ /**
+ @var array $services_status_array
+ */
+ public static $services_status_array=array();
+ /**
+ @var array $services_statuses
+ */
+ public static $services_statuses=array();
+ /**
+ @var object $oInfo
+ */
+ public static $oInfo;
+ /**
+ @var object $cInfo detail du client
+ */
+ public static $cInfo;
+ /**
+ @var object $export
+ */
+ public static $export;
+ /**
+ @var string $view for select filter view
+ */
+ public static $view;
+ /**
+ @var object internal trans objet method check_action vs display_view
+ */
+ private static $internal;
+ /**
+ @var requis pour generation pdf
+ */
+ public static $file_type_array ;
/**
- @brief create new ligne in table configuration
+ @brief class constructor
*/
- public static function create($option){
+ public function __construct() {
+ self::GetConf();
+ }
- 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';
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
- 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'];
+ self::$code=__CLASS__;
- if(isset($option['services_ref'])) $sql_data_array['services_ref'] = $option['services_ref'];
- else {
- // New Ref
- $numref= new NumRef('services');
- $sql_data_array['services_ref'] = $numref->GetNewNumRef();
- }
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$view=(isset($_REQUEST['view'])? (string)$_REQUEST['view'] : '' );
+ self::$oID=(isset($_REQUEST['oID'])? $_REQUEST['oID'] : '' );
- if(isset($option['status'])) $sql_data_array['status'] = $option['status'];
- if(isset($option['date_added'])) $sql_data_array['date_added'] = $option['date_added'];
- if(isset($option['date_start'])) $sql_data_array['date_start'] = $option['date_start'];
- if(isset($option['duration'])) $sql_data_array['duration'] = $option['duration'];
- if(isset($option['duration_unit'])) $sql_data_array['duration_unit'] = $option['duration_unit'];
- if(isset($option['date_revival'])) $sql_data_array['date_revival'] = $option['date_revival'];
- if(isset($option['auto_retry'])) $sql_data_array['auto_retry'] = $option['auto_retry'];
+ $status=(isset($_REQUEST['status'])? (string)$_REQUEST['status'] : '' );
- $res=tep_db_perform(TABLE_SERVICES, $sql_data_array);
+ self::$export= new export(__CLASS__);
- if(!$res)
- return $res;
- else
- return $res->__get('insertId');
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ if( !isset(self::$InitInfo['adjust']) )
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
+
+
+
+ /**
+ @remarks not load if not first init
+ */
+ if(defined('JSONSTATMENT')) return;
+
+ //! active datatable in ajax, precise les GET necessaire
+ define('JSONSTATMENT', 'mod=page&type='.self::$code.
+ (isset(parent::$action)?'&action='.parent::$action : '' ).
+ (isset(self::$oID)?'&oID='.self::$oID : '' ).
+ (isset(self::$view)?'&view='.self::$view : '' ).
+ (isset($status)?'&status='.$status : '' )
+ );
+
+ //! detail item in ajax
+ define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$InitInfo['theader']['listing']=array(
+ 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ 2 =>array('width'=>'8%', 'class'=>'tcenter', 'txt'=>__('table heading service id') ),
+ 3 =>array('width'=>'8%', 'class'=>'tcenter', 'txt'=>__('table heading order id') ),
+ 4 =>array('width'=>'30%','class'=>'tcenter', 'txt'=>__('table heading customers')),
+ 5 =>array('width'=>'10%', 'txt'=>__('table heading date start')),
+// 5 =>array('width'=>'150px','class'=>'tcenter', 'txt'=>__('table heading order total')),
+ 6 =>array('width'=>'8%', 'txt'=>__('table heading auto_retry')),
+ 7 =>array('width'=>'8%', 'txt'=>__('table heading status')),
+// 7 =>array('width'=>'10%', 'txt'=>__('table heading status')),
+ 8 =>array('width'=>'10%','class'=>'row_action', 'txt'=>__('table heading action')),
+ );
+
+// self::$InitInfo['tfooter']['listing']=array(
+// 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>tep_draw_hidden_field('xx','xxx','','class="search_init" ') ),
+// 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>tep_draw_hidden_field('xxx','xxx','','class="search_init" ') ),
+// 2 =>array('width'=>'8%', 'class'=>'tcenter', 'txt'=>tep_draw_input_field('o.services_id','services_id',__('table heading order id'),'style="width:98%" class="search_init"') ),
+// 3 =>array('width'=>'40%','class'=>'tcenter', 'txt'=>tep_draw_input_field('o.customers_name','customers_name',__('table heading customers'),'style="width:98%" class="search_init"') ),
+// 4 =>array('width'=>'150px','class'=>'tcenter', 'txt'=>tep_draw_input_field('ot.text','text',__('table heading order total'),'style="width:98%" class="search_init"') ),
+// 5 =>array('width'=>'10%', 'txt'=>tep_draw_input_field('o.date_purchased','date_purchased',__('table heading date purchased'),'style="width:98%" class="search_init"')),
+// 6 =>array('width'=>'8%', 'txt'=>tep_draw_input_field('o.payment_method','payment_method',__('table heading status'),'style="width:98%" class="search_init"')),
+// 7 =>array('width'=>'10%', 'txt'=>tep_draw_input_field('s.status_name','status_name',__('table heading status'),'style="width:98%" class="search_init"')),
+// 8 =>array('width'=>'10%','class'=>'row_action', 'txt'=>' '),
+// );
+
+ /**
+ @remarks this define col in table, and if is possible sort
+ Just for Edit listing
+ */
+ self::$InitInfo['modele']['listing']=array(
+ 0 =>false,
+ 1 =>false,
+ 'services_id'=>true,
+ 'orders_id'=>true,
+ 'customers_id'=>true,
+ 'date_start'=>true,
+ 'auto_retry'=>true,
+ 'status'=>true,
+ 'action' =>false
+ );
+
+
+ $DB=Database::getInstance();
+// self::$services_statuses=array();
+// $services_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='services' and language_id = '" . (int)$languages_id . "'");
+// while ($services_status = $services_status_query->fetchAssoc()) {
+// self::$services_statuses[] = array('id' => $services_status['status_id'], 'text' => $services_status['status_name']);
+// self::$services_status_array[$services_status['status_id']] = $services_status['status_name'];
+// }
+
+
+
+
+ global $oscss;
+ $oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
+ echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','comments','800','400');
+
+ return true;
}
+ public function check_action($actions){
+ global $messageStack,$page_module;
- /**
- @brief update ligne in table configuration
- */
- public static function update($option){
+ self::$action=$actions;
- 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';
+ self::$internal = new stdClass;
+ switch (self::$action) {
- $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']."' ";
+ /**
+ @remarks pdf generate for all docs
+ */
+// case 'pdf':
+//
+// if( _cst_bool('USE_LOCAT_GENERAT_PDF') )
+// $messageStack->add_session(__('warning pdf not generat by this core, please adjust configuration'), 'warning');
+// else {
+// $ID=(int)$_REQUEST['id'];
+// $type=$_REQUEST['file_type'] ;
+// global $pdf, $currencies;
+// osCSS_pdf::getInstance();
+//
+// /// force encode for fdpf is in iso8859
+// header("Content-Type: text/html; charset=utf-8");
+// self::$services_statuses = array_merge(tep_get_status_array('services'),array(array('id'=>'','text'=>TEXT_NONE)));
+// self::$file_type_array= osCSS_pdf::get_module();
+//
+// $pdf=osCSS_pdf::OutputInit($type);
+// $DF = new DatasFiles;
+//
+// switch($type){
+// case 'delivery':
+// global $obj_shipping;
+// $obj_shipping = sqlshipping::fetch(array('id'=>$ID), true);
+// $oID = $obj_shipping->services_id;
+// $order = new order($obj_shipping->services_id);
+// break;
+// case 'packingslip':
+// case 'invoice':
+// default:
+// $oID = $ID;
+// $order = new order($ID);
+// }
+//
+// osCSS_pdf::OutputAddPage();
+//
+// include(osCSS_pdf::getPathModele());
+//
+// $file=$DF->GetDoc(osCSS_pdf::GetPdfType(),$ID);
+//
+// if(file_exists($file))
+// unlink($file);
+//
+// $pdf=osCSS_pdf::SaveEnd($file);
+//
+// /// @remarks draw and exit;
+// // $pdf=osCSS_pdf::OutputEnd();
+// }
+// if(!isset($_GET['forceajax']))
+// tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+// break;
- if(isset($option['status'])) $sql_data_array['status'] = $option['status'];
- if(isset($option['date_added'])) $sql_data_array['date_added'] = $option['date_added'];
- if(isset($option['date_start'])) $sql_data_array['date_start'] = $option['date_start'];
- if(isset($option['duration'])) $sql_data_array['duration'] = $option['duration'];
- if(isset($option['duration_unit'])) $sql_data_array['duration_unit'] = $option['duration_unit'];
- if(isset($option['date_revival'])) $sql_data_array['date_revival'] = $option['date_revival'];
- if(isset($option['auto_retry'])) $sql_data_array['auto_retry'] = $option['auto_retry'];
+ /**
+ @remarks pdf generate
+ */
+// case 'deletefile':
+// $oID=(int)$_REQUEST['oID'];
+// $ID=(int)$_REQUEST['id'];
+// $type=$_REQUEST['file_type'] ;
+//
+// $datadocs=new DatasFiles;
+//
+// if(( $filepath=$datadocs->GetDoc($type, $ID)) && file_exists($filepath))
+// unlink($filepath);
+//
+// if(!isset($_GET['forceajax']))
+// tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+// break;
- $res=tep_db_perform(TABLE_SERVICES, $sql_data_array, 'update' , substr($where,3) );
-// var_dump($res);
- return $res;
+ /**
+ @remarks Action mutliple
+ */
+ case 'multiconfirm':
+ $res=array();
+
+ $status = tep_db_prepare_input(@$_POST['status_multi']);
+// $modeexport = tep_db_prepare_input(@$_POST['modeexport']);
+ $notify =(isset($_POST['notify'])) ? tep_db_prepare_input($_POST['notify']): '';
+ $comments= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
+ if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) ) {
+
+// if(isset($_POST['status_multi'])){
+// foreach($_POST['action_multi'] as $oID )
+// if (up_status_order($oID, array('status'=>$status,'comments'=>'', 'notify'=>$notify, 'comments'=> $comments) ) ) $res[]=true;
+// else $res[]=false;
+// }
+
+
+// if(isset($_POST['modeexport'])){
+//
+// $modeexport=tep_db_prepare_input($_POST['modeexport']);
+// $encodage=tep_db_prepare_input($_POST['encodage']);
+// $export_type=tep_db_prepare_input($_POST['export_type']);
+// $od=array();
+//
+// self::$export->pre_export(array( 'mode' => $modeexport, 'encodage'=>$encodage, 'export_type'=>$export_type, 'page_admin'=>$page_module));
+//
+// foreach($_POST['action_multi'] as $oID ){
+//
+// $order = new order((int)$oID);
+// $qer=tep_db_query("SELECT countries_iso_code_2 FROM " . TABLE_COUNTRIES . " WHERE countries_name='".$order->customer['country']."' ");
+// $c=tep_db_fetch_array($qer);
+//
+// $od[]=array('IDExpedition'=>$oID,
+// 'IDCustomer'=>$order->customer['id'],
+// 'Namecustomer'=>self::$export->decodage($order->customer['name']),
+// 'Compagnycustomer'=>self::$export->decodage($order->customer['company']),
+// 'Streetadress'=>self::$export->decodage($order->delivery['street_address']),
+// 'Streetadress2'=>self::$export->decodage($order->delivery['suburb']) ,
+// 'Cityshipping'=>self::$export->decodage($order->delivery['city']),
+// 'Stateshipping'=>self::$export->decodage($order->customer['state']) ,
+// 'telephone'=>self::$export->decodage($order->customer['telephone']),
+// 'postcode'=>self::$export->decodage($order->delivery['postcode']),
+// 'codecountryiso'=>$c['countries_iso_code_2'],
+// 'weight'=>round($order->info['total_weight'],3),
+// 'Contreremb'=>'');
+// }
+//
+// print self::$export->op_export($od);
+// }
+ }
+
+ if (in_array(false,$res)) $messageStack->add_session(__('success order updated'), 'success');
+ else $messageStack->add_session(__('warning order not updated'), 'warning');
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
+
+ /**
+ @remarks Adjust Virtual product Service
+ */
+ case 'setflag':
+ $redirect = false;
+ if (isset($_GET['sID'])){
+
+ /// Activate / Desactivate
+ if (isset($_GET['flag']) && ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) ) {
+ $res = sqlservices::fetch(array('id'=>(int)$_GET['sID']), true);
+
+ if($res !=false){
+
+ $myarray = array(
+ 'id'=>(int)$_GET['sID'],
+ 'status'=>(int)$_GET['flag'] ,
+ );
+
+// if(substr($res->date_start,0,4) <'2000')
+// $myarray['date_start']=date('Y-m-d H:i:s') ;
+
+ if( ! sqlservices::update($myarray) ) {
+ self::$internal->status = $res->status;
+ $redirect = true;
+ $messageStack->add_session(__('error order not update status'), 'warning');
+ }
+ else{
+ self::$internal->status = (int)$_GET['flag'] ;
+ if(!isset($_GET['forceajax']))
+ $messageStack->add_session(__('success order update status'), 'success');
+ }
+ }
+ else {
+ $messageStack->add_session(__('error order id not found'), 'warning');
+ $redirect = true;
+ }
+ }
+
+ /// Auto - retry force activate service
+ elseif ( isset($_GET['auto_retry']) && ( ($_GET['auto_retry'] == '0' ) || ($_GET['auto_retry'] == '1') ) ){
+
+ $res = sqlservices::fetch(array('id'=>(int)$_GET['sID']), true);
+
+ if($res !=false){
+
+ $myarray = array(
+ 'id'=>(int)$_GET['sID'],
+ 'auto_retry'=>(int)$_GET['auto_retry'] ,
+ );
+
+ if( ! sqlservices::update($myarray) ){
+ self::$internal->auto_retry = $res->auto_retry;
+ $redirect = true;
+ $messageStack->add_session(__('error order not update auto_retry'), 'warning');
+ }
+ else{
+ self::$internal->auto_retry = (int)$_GET['auto_retry'] ;
+ if(!isset($_GET['forceajax']))
+ $messageStack->add_session(__('success order update auto_retry'), 'success');
+ }
+ }
+ else {
+ $messageStack->add_session(__('error order id not found'), 'warning');
+ $redirect = true;
+ }
+ }
+
+ }
+
+ if(!isset($_GET['forceajax']) || $redirect )
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','sID','setflag','auto_retry','flag'), false) .'action=edit' ));
+ break;
+
+ }
+
+ return self::$action;
}
- /**
- @brief load ligne in table configuration
- @param option array
- id => row id int (configuration_id)
- key => string key (configuration_key)
- group_id => group_id int (configuration_group_id)
+ /**
+ @fn get_header()
+ @brief load js and call childs module
+ @return no return
+ */
+ public function get_header(){
+ tep_include_file(DIR_WS_JS . "modules/pages/".__CLASS__.".js.php",true);
- @return
+ /** aca */ //self::$modules->get_header_js();
- object(stdClass)[13]
- public 'id' => string '1' (length=1)
+ }
- OR
- array(
- object(stdClass)[13]
- ...
- object(stdClass)[13]
- ..
- )
+
+ /**
+ @fn ::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
*/
- public static function fetch($option,$shortkey=false){
+ public static function GetDBValue(){
+ global $languages_id;
+
+ $arg=((func_num_args()>0) ? func_get_args() : array() );
+
$DB=Database::getInstance();
+ $res=array();
- $sql ="";
+ switch (self::$action) {
+ case 'export';
+ break;
- 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']."' ";
+ case 'edit':
+ $res= sqlservices::fetch(array('id'=>(int)self::$oID ), true);
- $sql ="SELECT * FROM ".TABLE_SERVICES." WHERE ".substr($sql,3);
+ return $res;
+ break;
- $res=$DB->query($sql);
- $num = $res->__get('numRows');
+ case 'new':
+ $select_adress = array();
- if($num == 1){
- $result=$res->fetchAssoc();
- return ((!$shortkey)? $result : self::CleanKey($result));
+ $cID = (int)tep_db_prepare_input($_REQUEST['cID']);
+ $res=sqlcustomer::fetch(array('id'=>$cID), true);
+
+ /**
+ @remarks choose address book if active module adress book
+ */
+ if(isset($res->mod['address_book'])) {
+ foreach($res->mod['address_book'] as $row)
+ $select_adress[] = array('id'=>$row->book_id , 'text'=> tep_address_format($row->format_id, $row, false, '', " - ") );
+ }
+ else{
+ $adrr = new stdClass();
+ $adrr->book_id = $res->default_address_id;
+ $adrr->gender = $res->gender;
+ $adrr->company = $res->company;
+ $adrr->company_tax_id = $res->company_tax_id;
+ $adrr->firstname = $res->firstname;
+ $adrr->lastname = $res->lastname;
+ $adrr->street_address = $res->street_address;
+ $adrr->suburb = $res->suburb;
+ $adrr->postcode = $res->postcode;
+ $adrr->city = $res->city;
+ $adrr->state = $res->state;
+ $adrr->country_id = $res->country_id;
+ $adrr->zone_id = $res->zone_id;
+ $adrr->zone_name = $res->zone_name;
+ $adrr->countries_id = $res->countries_id;
+ $adrr->countries_name = $res->countries_name;
+ $adrr->countries_iso_code_2 = $res->countries_iso_code_2;
+ $adrr->format_id = $res->address_format_id;
+
+ $select_adress[] = array('id'=>$adrr->book_id , 'text'=> tep_address_format($adrr->format_id, $adrr, false, '', "\n") );
+ }
+
+
+ $res->select_adress = $select_adress;
+
+ return $res;
+ break;
+
+
+ case 'listing';
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+
+
+ $wh=' WHERE ';
+ if(self::$view =='opened')
+ $wh .=" status = '1' ";
+ if(self::$view =='closed')
+ $wh .=" status = '0' ";
+
+
+ if(tep_not_null($adjust->sWhere)){
+// $adjust->sWhere=str_replace(
+// array('services_id', 'order_total', 'customers_id', 'services_status_name'),
+// array('o.services_id', ' ot.text', 'o.customers_name', 's.status_name'),
+// $adjust->sWhere
+// );
+
+ $wh .= ( (strlen($wh) >7)? " AND ": "" )." ".$adjust->sWhere." ";
+ }
+
+ if(strlen($wh) <=7)
+ $wh='';
+
+
+ $query_raw = "SELECT DISTINCT s.* FROM " . TABLE_SERVICES . " s JOIN " . TABLE_ORDERS . " o on (o.orders_id = s.orders_id) ".$wh." ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 's.row_id DESC');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+ break;
+
+ case 'delete';
+ default:
+
+// $services_query_raw = "select distinct o.services_id,o.services_prefix, o.customers_id,o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.status_name as services_status_name, s.status_color as services_status_color,ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.services_id = ot.services_id), " . TABLE_STATUS . " s where o.services_status = s.status_id and s.status_type='services' and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.services_id='".self::$oID."' ";
+
+// $currency_query = $DB->query($services_query_raw);
+
+// return new objectInfo($currency_query->fetchAssoc() );
+
}
- elseif($num > 1){
- $array=array();
+ }
- foreach($res->fetchAllAssoc() as $result)
- $array[]= ((!$shortkey)? $result : self::CleanKey($result));
- return $array;
+
+
+ public function display_view(){
+
+ switch (self::$action) {
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ if(isset($_GET['flag']))
+ return self::GetServiceStatus(array('status'=>(int)self::$internal->status, 'row_id'=>(int)$_GET['sID']), false);
+ elseif(isset($_GET['auto_retry']))
+ return self::GetServiceStatus(array('auto_retry'=>(int)self::$internal->auto_retry, 'row_id'=>(int)$_GET['sID']), false);
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
+ case 'delete':
+ self::$oInfo=self::GetDBValue();
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+ case 'multi':
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+
+ case 'new':
+ self::$cInfo=self::GetDBValue();
+
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+
+ case 'edit':
+ self::$order= self::GetDBValue();
+
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+ default:
+ self::load_db_values();
+ /// use master gabarit
+ MGabCont::SetCurrentName(__CLASS__);
+ return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
}
+ }
- return false;
+
+
+/** Interne public module */
+
+ /**
+ @brief Construct array list type module for pull down menu
+ @param $type string type
+ @return array (array(id=>'', value=>''))
+ */
+// public static function PrepaPullDownType($type){
+// if(isset(sqlorder::$modules_type->$type)) {
+// $r = array();
+//
+// foreach(sqlorder::$modules_type->$type->modules as $key => $row){
+// $r[] = array('id'=>$key,'text'=>$row->title);
+// }
+// }
+//
+// return $r;
+// }
+
+
+
+
+
+
+ /**
+ @fn get_item_action($services)
+ @brief fonction qui construit l'affichage de la colonne action
+ La mise en forme est contenu dans les ressource xml du template en cours
+ @param $services array
+ @return string
+ */
+ private static function get_item_action($services){
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'oID=' . $services['oID'] . '&action=edit') ,'' )
+// .sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'oID=' . $services['oID'] . '&action=delete') ,'' )
+ );
}
/**
- @brief delete row
+ @brief load listing array, for use format retrun by JSON
*/
- public static function delete($option){
- $DB=Database::getInstance();
+ public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
+ /// @remarks force load conf
+ self::GetConf();
- $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']."' ";
+ $res=array();
- if(strlen($sql)==0)
- return false;
+ /**
+ @remarks adjust param for sql requete
+ */
+ self::$InitInfo['adjust']['page']=$page;
+ self::$InitInfo['adjust']['rowbyp']=$rowbyp;
+ self::$InitInfo['adjust']['sOrder']=$sOrder;
+ self::$InitInfo['adjust']['sWhere']=$sWhere;
+ self::$InitInfo['adjust']['options']=$options;
- $sql ="DELETE FROM ".TABLE_SERVICES." WHERE ".substr($sql,3);
+ $res = self::load_db_values();
- $res=$DB->query($sql);
+ return self::$list=self::CheckResult($res);
+ }
- return $res;
+ public static function tep_get_modele(){
+ self::GetConf();
+ $action=(empty(self::$action)? 'listing' :self::$action);
+
+ return (isset(self::$InitInfo['modele'][$action]) ? self::$InitInfo['modele'][$action] : array() );
}
/**
- @fn CleanKey()
- @brief Clean string name key
+ @brief Redefine Parent method
*/
- private static function CleanKey($array){
+// public static function DTFootTable($mutli=false){
+// /**
+// @remarks mutli action specific line
+// */
+// if($mutli) {
+// $col=count(self::DTheaderTable());
+// return array(
+// 0 => self::$InitInfo['tfooter']['listing'] ,
+// 1 =>array( array('colspan'=>$col, 'class'=>'tleft', 'txt'=>'<span class="fleft">'.__('action multiple') . ' ' . tep_draw_pull_down_menu('status_multi', array_merge(array(array('id' => '', 'text' => __('text action multiple services'))), services::$services_statuses) ) . __('export: ') . tep_draw_pull_down_menu('modeexport', services::$export->mode ).'</span> <span class="fleft" style="margin-left:50px;"> '. tep_image_submit('button_confirm.gif', IMAGE_CONFIRM, '' ).'</span>' ) )
+// ) ;
+// }
+// else
+// /**
+// @remarks No tfoot specific,use equal theader
+// */
+// return array( 0 =>self::DTheaderTable());
+// }
- $object= new stdclass();
+ /**
+ @brief format db value for display page
+ @param $_query ressource db sql
+ @return array
+ */
+ private static function FormatDBValue($_query){
+ $DB=Database::getInstance();
+ $res=array();
- foreach($array as $key=>$value){
- if( $key == "rowid")
- $key='id';
+ switch (parent::$action) {
+ case 'listing':
+ while ($services = $_query->fetchAssoc()) {
+ $ord['oID']=$services['row_id'];
+ $ord['services_id']=$services['row_id'];
+ $ord['orders_id']=$services['orders_id'];
+ $ord['customers_id']=tep_customers_row_action($services['customers_id'], array('origin'=>self::FILENAME));
+ $ord['date_start']=( (tep_not_null($services['date_start']) && !in_array($services['date_start'], array('0000-00-00 00:00:00')) ) ? tep_datetime_short($services['date_start']) : '');
+ $ord['auto_retry']=self::GetServiceAutoRetry($services, false);
+ $ord['status']=self::GetServiceStatus($services, false);
+ $ord[0]=$services['row_id'];
+ $ord[1]=tep_draw_checkbox_field('action_multi['.$services['row_id'].']','action_mutli_'.$services['row_id'],$services['row_id']);
+ $ord['action']=self::get_item_action($ord);
+ $res[]=$ord;
+ }
+ break;
+ }
+ return $res;
+ }
- $object->$key = $value;
- }
- return $object;
+ /** static InterfacedInnerHtml */
+
+ public static function detail_row_page($id){
+ self::$list=self::load_status_history($id);
+ return MGabCont::CallGab('inline','display_view',__CLASS__);
}
+
+/** Interne module */
+
+ /**
+ @brief falg for activate / desactivate and indicate current status for service(virtual product)
+ @param $row array current rows
+ @param $justlink boolean for mode return
+ @return string
+ link for action ($justlink=true)
+ or full html entite "a" normlised by current template
+ */
+ private static function GetServiceStatus($row, $justlink=true){
+ $exclude=array('action','oID','sID','forceajax','type','class', 'flag', 'function','funct', 'mod');
+ $query_s='action=setflag&sID=' . $row['row_id'].'&flag=';
+
+ if($justlink){
+ if ($row['status'] == '1')
+ return tep_href_link('services.php', tep_get_all_get_params($exclude).$query_s.'0' );
+ else
+ return tep_href_link('services.php', tep_get_all_get_params($exclude).$query_s.'1' );
+ }
+ else
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($row['status'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_etat'),
+ (int)$row['status'],
+ ( ($row['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+ private static function GetServiceAutoRetry($row, $justlink=true){
+ $exclude=array('action','oID','sID','forceajax','type','class', 'auto_retry', 'function','funct', 'mod');
+ $query_s='action=setflag&sID=' . $row['row_id'].'&auto_retry=';
+
+ if($justlink){
+ if ($row['auto_retry'] == '1')
+ return tep_href_link('services.php', tep_get_all_get_params($exclude).$query_s.'0' );
+ else
+ return tep_href_link('services.php', tep_get_all_get_params($exclude).$query_s.'1' );
+ }
+ else
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($row['auto_retry'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_etat'),
+ (int)$row['auto_retry'],
+ ( ($row['auto_retry'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+
+
+
/**
- @brief
- @return array empty
+ @brief return Filename
*/
- public static function Specimen(){
+ public static function GetFILENAME(){
+ return self::FILENAME;
+ }
- $par = array(
- 'row_id',
- 'services_ref',
- 'customers_id',
- 'orders_id',
- 'orders_products_id',
- 'status',
- 'date_added',
- 'date_start',
- 'duration',
- 'duration_unit',
- 'date_revival',
- 'auto_retry',
- );
+ /**
+ @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(); }
+ */
- return self::CleanKey($par);
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
+ function check() { return false; }
+
+
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ function keys() {
+ return array();
}
+ /**
+ @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__MODTYPENAME_MAJ_'
+ - if module twin in backoffice, report all content install in the other module
+ - Not use language in DB , but function :__()
+ for MODULE_TOTO_ST
+ var title MODULE_TOTO_ST_S (small description)
+ var description MODULE_TOTO_ST_L (long description)
+ */
+ function install() { return false; }
+
+ /**
+ @fn remove()
+ @brief delete all configuration
+ @note
+ - please, pefix all var configuration by 'MODULE_PAYMENT__MODTYPENAME_MAJ_'
+ - if module twin in backoffice, report all content remove in the other module
+ */
+ function remove() { return false; }
}
-
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlshipping.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlshipping.php 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/classes/drivers/sqlshipping.php 2013-07-06 09:59:16 UTC (rev 4776)
@@ -50,11 +50,15 @@
if(is_array($option['products']))
foreach($option['products'] as $rows){
- $sql_data_array = array();
- $sql_data_array['shipping_id'] = $id;
- $sql_data_array['orders_products_id'] = $rows['products_id'];
- $sql_data_array['qt_expedie'] = $rows['qt'];
- $res=tep_db_perform(TABLE_SHIPPING_PRODUCTS, $sql_data_array);
+
+ if( isset($rows['products_id']) ) {
+ $sql_data_array = array();
+ $sql_data_array['shipping_id'] = $id;
+ $sql_data_array['orders_products_id'] = $rows['products_id'];
+ $sql_data_array['orders_products_attributes'] = $rows['products_attributes'];
+ $sql_data_array['qt_expedie'] = $rows['qt'];
+ $res=tep_db_perform(TABLE_SHIPPING_PRODUCTS, $sql_data_array);
+ }
}
@@ -202,9 +206,13 @@
$res2 = $DB->query($sql);
foreach($res2->fetchAllAssoc() as $result2){
+
+ $res2 = $DB->query($sql);
+
$r2 = new stdClass();
$r2->shipping_id = $result2['shipping_id'];
$r2->orders_products_id = $result2['orders_products_id'];
+ $r2->orders_products_attributes = $result2['orders_products_attributes'];
$r2->products_id = $result2['products_id'];
$r2->products_name = $result2['products_name'];
$r2->qt_expedie = $result2['qt_expedie'];
Modified: trunk/catalog/admin/includes/classes/productUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/productUtility.php 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/classes/productUtility.php 2013-07-06 09:59:16 UTC (rev 4776)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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/02/2012, 10:49
+ @version 2.1.2
+ @date 06/07/2013, 10:49
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class productUtility
@@ -14,8 +14,8 @@
/**
@fn get_uprid($prid, $params)
@brief Calcul des id de product, avec option
- @param $prid
- @param $params
+ @param $prid (77{1}3)
+ @param $params array
*/
public static function get_uprid($prid, $params) {
$uprid = $prid;
@@ -31,15 +31,35 @@
/**
@fn get_prid($uprid)
@brief Calcul des id de product, avec option
- @param $uprid
+ @param $uprid (77{1}3)
*/
public static function get_prid($uprid) {
- $pieces = explode('{', $uprid);
+ if(preg_match("#{#i",$uprid) ){
+ $pieces = explode('{', $uprid);
+ return $pieces[0];
+ }
- return $pieces[0];
+ return $uprid;
}
/**
+ @fn tep_get_prid_array($uprid)
+ @brief Converti un $uprid en array des attributs
+ @param $uprid (77{1}3)
+ */
+ function get_prid_array($uprid){
+ $pieces = explode('{', $uprid);
+ $attrib=array();
+ for($i=1, $m=count($pieces); $i< $m ; $i++ ){
+ $r=explode('}', $pieces[$i]);
+ $attrib[$r[0]]=$r[1];
+ }
+
+ return $attrib;
+ }
+
+
+ /**
@fn get_product_list($exclude = '')
@brief Function de construction du tableau des produits online
Fournis tous les produits , sauf inactif ou categorie inactif
Modified: trunk/catalog/admin/includes/functions/general.php
===================================================================
--- trunk/catalog/admin/includes/functions/general.php 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/functions/general.php 2013-07-06 09:59:16 UTC (rev 4776)
@@ -68,7 +68,7 @@
if (!tep_session_is_registered('login_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
+ }
else {
$acl = oscss_acl::getInstance();
if( ! $acl->PageRight($current_page) )
@@ -286,9 +286,9 @@
/**
@fn tep_not_null($value)
- @brief test if not null, normalise control
+ @brief test if not null, normalise control
@param $value string
- @return boolean true ok | false not ok
+ @return boolean true ok | false not ok
*/
function tep_not_null($value) {
if (is_array($value)) {
@@ -301,7 +301,7 @@
}
/**
- @fn tep_browser_detect($component)
+ @fn tep_browser_detect($component)
@return HTTP_USER_AGENT
*/
function tep_browser_detect($component) {
@@ -314,7 +314,7 @@
@fn tep_round($value, $precision)
@brief Wrapper function for round()
@param $value valur for arround
- @param $precision int number round
+ @param $precision int number round
*/
function tep_round($value, $precision) {
return round($value, $precision);
@@ -333,7 +333,7 @@
/**
@fn tep_call_function($function, $parameter, $object = '')
- @brief call user function / class and ajust call fro PHP 5.2 vs 5.3 and up
+ @brief call user function / class and ajust call fro PHP 5.2 vs 5.3 and up
@note Appel de function. ou de class
*/
function tep_call_function($function, $parameter, $object = '') {
@@ -343,21 +343,21 @@
/**
- @fn tep_set_time_limit($limit)
+ @fn tep_set_time_limit($limit)
@brief Sets timeout for the current script.Cant be used in safe mode.
- @param $limit int
+ @param $limit int
@return none
*/
function tep_set_time_limit($limit) {
- if (!get_cfg_var('safe_mode'))
+ if (!get_cfg_var('safe_mode'))
@set_time_limit($limit);
}
/**
@fn tep_rand($min = null, $max = null)
- @param $min int value min
+ @param $min int value min
@param $max int value max
- @return value random
+ @return value random
*/
function tep_rand($min = null, $max = null) {
static $seeded;
@@ -378,7 +378,7 @@
/**
@fn tep_convert_linefeeds($from, $to, $string)
- @return string
+ @return string
*/
function tep_convert_linefeeds($from, $to, $string) {
return str_replace($from, $to, $string);
@@ -397,12 +397,12 @@
/**
@fn tep_array_to_string($array, $exclude = '', $equals = '=', $separator = '&')
- @brief convert array in string , by concat all key / value
+ @brief convert array in string , by concat all key / value
@note use for convert array in Get param
@param $array array
@param $exclude array for exclude key
@param $equals separator between key /value
- @param $separator separator for between row array
+ @param $separator separator for between row array
@return string
*/
function tep_array_to_string($array, $exclude = '', $equals = '=', $separator = '&') {
@@ -467,9 +467,9 @@
/**
@fn tep_cst_define($text)
- @brief test if constant is defined
+ @brief test if constant is defined
@note Test si une constante est defini , si celle-ci existe, renvoi sa valeur, sinon return (string)'false'
- @param $text string value for test
+ @param $text string value for test
@return value after test or string (false)
*/
function tep_cst_define($text){
@@ -574,11 +574,11 @@
if(is_object($all))
$loop[] = $all;
- else
+ else
$loop = $all;
foreach($loop as $status)
- if($id > 0 && (int)$id == $status->id)
+ if($id > 0 && (int)$id == $status->id)
return array('id' => $status->id, 'text' => $status->name);
else $list[] = array('id' => $status->id , 'text' => $status->name);
@@ -770,13 +770,14 @@
function tep_parse_category_path($cPath) { return categorieUtility::parse_category_path($cPath); }
function tep_get_category_name($category_id, $language_id='') { return categorieUtility::get_category_name($category_id, $language_id); }
function tep_generate_category_path($id, $from = 'category', $categories_array = '', $index = 0) { return categorieUtility::generate_category_path($id, $from, $categories_array, $index); }
-function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) {
- return categorieUtility::get_category_tree( array( 'parent_id'=> $parent_id, 'spacing'=> $spacing, 'exclude'=> $exclude, 'category_tree_array'=> $category_tree_array, 'include_itself'=> $include_itself ));
+function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) {
+ return categorieUtility::get_category_tree( array( 'parent_id'=> $parent_id, 'spacing'=> $spacing, 'exclude'=> $exclude, 'category_tree_array'=> $category_tree_array, 'include_itself'=> $include_itself ));
}
function tep_get_products_special_price($product_id) { return productUtility::get_products_special_price($product_id); }
function tep_get_uprid($prid, $params) { return productUtility::get_uprid($prid, $params); }
function tep_get_prid($uprid) { return productUtility::get_prid($uprid); }
+function tep_get_prid_array($uprid) { return productUtility::get_prid_array($uprid); }
function tep_get_products_name($product_id, $language_id = 0) { return productUtility::get_products_name($product_id, $language_id); }
function tep_remove_product($product_id) { return productUtility::remove_product($product_id); }
function tep_products_restock($order_id, $customers_id=''){ return productUtility::products_restock($order_id, $customers_id); }
Modified: trunk/catalog/admin/includes/functions/lib.orders.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.orders.php 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/functions/lib.orders.php 2013-07-06 09:59:16 UTC (rev 4776)
@@ -14,12 +14,14 @@
@version 1.2
@note Se charge de produire l'affichage de retour , pour le prise en compte des attributs d'un produits
*/
-function tep_draw_attribute_products($order,$i){
- global $currencies;
- if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
- for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
- echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
- if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
+function tep_draw_attribute_products($attributes, $qty, $currency, $currency_value){
+ global $currencies, $order;
+ if (isset($attributes) && (sizeof($attributes) > 0)) {
+ for ($j = 0, $k = sizeof($attributes); $j < $k; $j++) {
+ echo '<br /><nobr><small> <i> - ' . $attributes[$j]['option'] . ': ' . $attributes[$j]['value'];
+ if ($attributes[$j]['price'] != '0')
+ echo ' (' . $attributes[$j]['prefix'] .
+ $currencies->format($attributes[$j]['price'] * $qty, true, $currency, $currency_value ) . ')';
echo '</i></small></nobr>';
}
}
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-06 09:59:16 UTC (rev 4776)
@@ -9,6 +9,8 @@
@encode UTF-8
*/
global $price, $current_theme;
+
+
?>
<h3><?php echo sprintf(__('@orders heading edit num %s ref %s'),orders::$order->info['orders_id'] , orders::$order->info['orders_ref'] ) ; ?></h3>
@@ -367,7 +369,7 @@
<?php echo orders::$order->products[$i]['name'] ?>
</a>
</span>
- <span><?php echo tep_draw_attribute_products(orders::$order,$i).' ' ?></span>
+ <span><?php echo tep_draw_attribute_products(orders::$order->products[$i]['attributes'],orders::$order->products[$i]['qty'], orders::$order->info['currency'], orders::$order->info['currency_value']); ?></span>
</td>
<td class="tcenter"><?php echo orders::$order->products[$i]['model'] ?></td>
<td class="tcenter"><?php echo $price->format(orders::$order->products[$i]['final_price'], true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
@@ -523,7 +525,7 @@
<?php echo $pshipping->name ?>
</a>
</span>
- <span><?php echo tep_draw_attribute_products(orders::$order,$i).' ' ?></span>
+ <span><?php echo tep_draw_attribute_products($pshipping->attributes,$pshipping->qty ,orders::$order->info['currency'], orders::$order->info['currency_value']); ?></span>
</td>
<td class="tcenter">
<?php echo $pshipping->qty ?>
@@ -534,7 +536,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) ) .tep_draw_hidden_field('shipping_qt_max['.$pshipping->rowid.']','', ($pshipping->qty - $pshipping->qt_expedie) ) ; ?>
+ <?php echo tep_draw_input_field('shipping_qt['.tep_get_uprid($pshipping->id, $pshipping->attrib) .']','', ($pshipping->qty - $pshipping->qt_expedie) ) .tep_draw_hidden_field('shipping_qt_max['.tep_get_uprid($pshipping->id, $pshipping->attrib).']','', ($pshipping->qty - $pshipping->qt_expedie) ) ; ?>
<?php else: ?>
<?php echo ($pshipping->qty - $pshipping->qt_expedie); ?>
<?php endif; ?>
@@ -626,7 +628,7 @@
<?php echo $service->name ?>
</a>
</span>
- <span><?php echo tep_draw_attribute_products(orders::$order,$i).' ' ?></span>
+ <span><?php echo tep_draw_attribute_products($service->attributes,$service->qty, orders::$order->info['currency'], orders::$order->info['currency_value']); ?></span>
</td>
@@ -700,7 +702,7 @@
<?php if(( $filepath=$datadocs->GetDoc('packingslip', $_GET['oID'])) && file_exists($filepath)): ?>
<tr>
- <td><a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td>
+ <td><a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='.$_GET['oID']) ?>"><?php echo orders::$order->info['orders_ref'] ?></a></td>
<td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td>
<td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
<td><?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'trash'), '', tep_href_link(orders::FILENAME, 'file_type=packingslip&action=deletefile&id='.$_GET['oID'].'&oID='.$_GET['oID']) ,'' ) ; ?></td>
@@ -744,7 +746,7 @@
<?php if(( $filepath=$datadocs->GetDoc('invoices', $_GET['oID'])) && file_exists($filepath)): ?>
<tr>
- <td><a href="<?php echo tep_href_link('document.php', 'mod=invoice&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td>
+ <td><a href="<?php echo tep_href_link('document.php', 'mod=invoice&id='.$_GET['oID']) ?>"><?php echo orders::$order->info['facture_ref'] ?></a></td>
<td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td>
<td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
<td><?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'trash'), '', tep_href_link(orders::FILENAME, 'file_type=invoice&action=deletefile&id='.$_GET['oID'].'&oID='.$_GET['oID']) ,'' ) ; ?></td>
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-06 09:59:16 UTC (rev 4776)
@@ -818,7 +818,21 @@
foreach($_POST['shipping_qt'] as $k=>$row)
if($row > 0){
- $array['products'][] = array('products_id'=>$k , 'qt'=>$row) ;
+
+ $pid = tep_get_prid($k);
+ $list = tep_get_prid_array($k);
+ $key_attrib='';
+ foreach($list as $k=>$v){
+ $key_attrib .= $k.'-'.$v.',';
+ }
+ if(strlen($key_attrib)> 0)
+ $key_attrib = substr($key_attrib,0,-1);
+
+ $array['products'][] = array(
+ 'products_id'=> $pid,
+ 'products_attributes'=> $key_attrib ,
+ 'qt'=>$row
+ ) ;
$total[] = (($row == (int)@$_POST['shipping_qt_max'][$k])? true : false );
}
@@ -982,6 +996,16 @@
foreach($res->products as $rows){
$pdt_db_arr[$rows['rowid']] = $rows;
+ $key_attrib='';
+ $light_attrib = array();
+ foreach($rows['attributes'] as $attrib){
+ $key_attrib .= $attrib['option_id'].'-'.$attrib['value_id'].',';
+ $light_attrib[$attrib['option_id']] = $attrib['value_id'];
+ }
+
+ if(strlen($key_attrib)> 0)
+ $key_attrib = substr($key_attrib,0,-1);
+
/// No physical
if(in_array($rows['type'], explode(',', TYPE_VIRTUAL_PRODUCTS)) ){
@@ -1002,10 +1026,10 @@
/// physical
else {
- $sql="SELECT cp.orders_products_id as products_id , SUM(cp.qt_expedie) as qt ".
+ $sql="SELECT cp.orders_products_id as products_id , cp.orders_products_attributes as key_attrib ,SUM(cp.qt_expedie) as qt ".
" FROM ".TABLE_SHIPPING." cc ".
" LEFT JOIN ".TABLE_SHIPPING_PRODUCTS." cp ON (cc.row_id = cp.shipping_id) ".
- " WHERE cc.orders_id = '".(int)self::$oID ."' AND cp.orders_products_id = '".$rows['rowid']."' ".
+ " WHERE cc.orders_id = '".(int)self::$oID ."' AND cp.orders_products_id = '".$rows['rowid']."' AND cp.orders_products_attributes ='".$key_attrib."' ".
" GROUP BY orders_products_id ";
" ORDER BY row_id DESC";
@@ -1017,6 +1041,7 @@
$qt = (int)$result['qt'];
$result['qt_expedie'] = $qt;
$result['qt_orders'] = $rows['qty'];
+ $result['attrib'] = $light_attrib;
$robj = new objectInfo(array_merge($rows,$result));
$activ_add[] = ( ( (int)$rows['qty'] == $qt) ? false : true );
$res->pshipping[]=$robj;
@@ -1025,7 +1050,9 @@
else{
$rows['qt_expedie'] = 0;
$result['qt_orders'] = $rows['qty'];
- $res->pshipping[]=new objectInfo($rows);
+ $result['key_attrib'] = $key_attrib;
+ $result['attrib'] = $light_attrib;
+ $res->pshipping[]=new objectInfo(array_merge($rows,$result));
$activ_add[] = true;
}
}
@@ -1041,6 +1068,7 @@
else
$res->allshipping[] = $result4;
+
$res->display_service = (count($res->service) <= 0 )? false : true;
$res->display_shipping = (count($res->pshipping) <= 0 )? false : true;
$res->display_shipping_add = (in_array(true, $activ_add))? true : false;
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.key.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.key.sql 2013-07-06 09:59:16 UTC (rev 4776)
@@ -0,0 +1,15 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 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_shipping_products ADD CONSTRAINT shipping_products_orders_products_id FOREIGN KEY (orders_products_id) REFERENCES osc_orders_products (orders_products_id);
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.sql 2013-07-05 17:05:56 UTC (rev 4775)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_shipping_products.sql 2013-07-06 09:59:16 UTC (rev 4776)
@@ -20,6 +20,8 @@
row_id int(11) NOT NULL AUTO_INCREMENT,
shipping_id int(11) NOT NULL,
orders_products_id int(11) NOT NULL,
+ orders_products_attributes varchar(255) NULL,
qt_expedie int(11) NOT NULL,
KEY row_id (row_id)
) DEFAULT CHARSET=utf8;
+
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_shipping_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_shipping_products.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_shipping_products.sql 2013-07-06 09:59:16 UTC (rev 4776)
@@ -0,0 +1,14 @@
+--+######################################################################--+
+--| 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_shipping_products ADD orders_products_attributes VARCHAR( 255 ) NULL AFTER orders_products_id ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-05 17:05:59
|
Revision: 4775
http://sourceforge.net/p/oscss/svn/4775
Author: oscim
Date: 2013-07-05 17:05:56 +0000 (Fri, 05 Jul 2013)
Log Message:
-----------
Fix and adjust sqlxxx
add title in notification system
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php
trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/usersNotif.txt
trunk/catalog/admin/includes/modules/pages/usersNotif.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2013-07-05 14:06:31 UTC (rev 4774)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2013-07-05 17:05:56 UTC (rev 4775)
@@ -129,10 +129,17 @@
else
$status = (int)$option['status'];
- if( ! isset($option['post']) )
+ if( isset($option['post']) )
$post = $option['post'];
+ if( isset($option['orders_ref']) )
+ $sql_data_array['orders_ref'] = trim($option['orders_ref']);
+ if( isset($option['facture_ref']) )
+ $sql_data_array['facture_ref'] = trim($option['facture_ref']);
+
+
+
if(isset($option['comments']))
self::$comment[] = $option['comments'];
@@ -258,9 +265,11 @@
$sql_data_array['facture_id'] = ((int)$res_id['_id'] +1) ;
// New Ref
- $numref= new NumRef('bills');
- $ref = $numref->GetNewNumRef();
- $sql_data_array['facture_ref'] =$ref ;
+ if( _cst_bool('USE_LOCAT_GENERAT_PDF') ) {
+ $numref= new NumRef('bills');
+ $ref = $numref->GetNewNumRef();
+ $sql_data_array['facture_ref'] =$ref ;
+ }
self::$comment[] = __('orders update and factured');
break;
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php 2013-07-05 14:06:31 UTC (rev 4774)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php 2013-07-05 17:05:56 UTC (rev 4775)
@@ -62,10 +62,6 @@
if($where =='')
return false;
-// if(isset($option['products_attributes_id'])) $sql_data_array['products_attributes_id'] = $option['products_attributes_id'];
- if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
- if(isset($option['options_id'])) $sql_data_array['options_id'] = $option['options_id'];
- if(isset($option['options_values_id'])) $sql_data_array['options_values_id'] = $option['options_values_id'];
if(isset($option['options_values_price'])) $sql_data_array['options_values_price'] = $option['options_values_price'];
if(isset($option['price_prefix'])) $sql_data_array['price_prefix'] = $option['price_prefix'];
if(isset($option['products_options_sort_order'])) $sql_data_array['products_options_sort_order'] = $option['products_options_sort_order'];
@@ -142,7 +138,7 @@
if(strlen($sql)==0)
return false;
- // base attribute and options
+ // base attribute and options
$pa_query = $DB->query("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " where ".substr($sql,3) );
foreach($pa_query->fetchAllAssoc() as $row){
@@ -163,12 +159,12 @@
@brief copy in duplicate or link
@return int pid new product
-TODO Traiter les arguement par un array pour respecter nomenclature
+TODO Traiter les arguement par un array pour respecter nomenclature
*/
public static function copyto($pid_src, $pid_new){
$DB=Database::getInstance();
- // base attribute and options
+ // base attribute and options
$product_query = $DB->query("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $pid_src . "'");
foreach($product_query->fetchAllAssoc() as $row){
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php 2013-07-05 14:06:31 UTC (rev 4774)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php 2013-07-05 17:05:56 UTC (rev 4775)
@@ -29,14 +29,13 @@
return 'attributes';
if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
- if(isset($option['products_stock_attributes'])) $sql_data_array['products_stock_attributes'] = $option['attributes'];
- if(isset($option['products_stock_quantity'])) $sql_data_array['products_stock_quantity'] = $option['quantity'];
- if(isset($option['products_stock_quantity_alert'])) $sql_data_array['products_stock_quantity_alert'] = $option['quantity_alert'];
- if(isset($option['products_stock_barcode'])) $sql_data_array['products_stock_barcode'] = $option['barcode'];
- if(isset($option['products_stock_ref'])) $sql_data_array['products_stock_ref'] = $option['ref'];
+ if(isset($option['attributes'])) $sql_data_array['products_stock_attributes'] = $option['attributes'];
+ if(isset($option['quantity'])) $sql_data_array['products_stock_quantity'] = $option['quantity'];
+ if(isset($option['quantity_alert'])) $sql_data_array['products_stock_quantity_alert'] = $option['quantity_alert'];
+ if(isset($option['barcode'])) $sql_data_array['products_stock_barcode'] = $option['barcode'];
+ if(isset($option['ref'])) $sql_data_array['products_stock_ref'] = $option['ref'];
-
$res=tep_db_perform(TABLE_PRODUCTS_STOCK, $sql_data_array);
if(!$res)
@@ -52,8 +51,6 @@
*/
public static function update($option){
- if(!isset($option['id'])) return 'id';
-
$where='';
if(isset($option['id'])) $where .="AND products_stock_id = '".(int)tep_db_input($option['id'])."' ";
if(isset($option['products_id'])) $where .="AND products_id = '".(string)tep_db_input($option['products_id'])."' ";
@@ -63,12 +60,10 @@
if($where =='')
return false;
- if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
- if(isset($option['products_stock_attributes'])) $sql_data_array['products_stock_attributes'] = $option['attributes'];
- if(isset($option['products_stock_quantity'])) $sql_data_array['products_stock_quantity'] = $option['quantity'];
- if(isset($option['products_stock_quantity_alert'])) $sql_data_array['products_stock_quantity_alert'] = $option['quantity_alert'];
- if(isset($option['products_stock_barcode'])) $sql_data_array['products_stock_barcode'] = $option['barcode'];
- if(isset($option['products_stock_ref'])) $sql_data_array['products_stock_ref'] = $option['ref'];
+ if(isset($option['quantity'])) $sql_data_array['products_stock_quantity'] = $option['quantity'];
+ if(isset($option['quantity_alert'])) $sql_data_array['products_stock_quantity_alert'] = $option['quantity_alert'];
+ if(isset($option['barcode'])) $sql_data_array['products_stock_barcode'] = $option['barcode'];
+// if(isset($option['ref'])) $sql_data_array['products_stock_ref'] = $option['ref'];
$res=tep_db_perform(TABLE_PRODUCTS_STOCK, $sql_data_array, 'update' , substr($where,3) );
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/usersNotif.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/usersNotif.txt 2013-07-05 14:06:31 UTC (rev 4774)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/usersNotif.txt 2013-07-05 17:05:56 UTC (rev 4775)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 07/05/2012, 14:46
+ @version 2.1.2
+ @date 06/07/2013, 14:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -22,6 +22,7 @@
$lang['@usersNotif table heading action']="Action" ;
$lang['@usersNotif table heading chknotif id']="Id" ;
$lang['@usersNotif table heading type']="type" ;
+ $lang['@usersNotif table heading title']="sujet" ;
// $lang['@usersNotif table heading chknotif_key']="Évènement" ;
// $lang['@usersNotif table heading chknotif_method']="Méthode" ;
// $lang['@usersNotif table heading chknotif_status']="Status" ;
Modified: trunk/catalog/admin/includes/modules/pages/usersNotif.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/usersNotif.php 2013-07-05 14:06:31 UTC (rev 4774)
+++ trunk/catalog/admin/includes/modules/pages/usersNotif.php 2013-07-05 17:05:56 UTC (rev 4775)
@@ -12,7 +12,7 @@
error_reporting(E_ALL);
class usersNotif
extends ModTwo /// new abstract class for nextgen module
- implements
+ implements
InterfaceModule,
ExtModConfig,
InterfacedTJsonS,
@@ -115,6 +115,13 @@
'default'=>true,
'width'=>'18%',
);
+ self::$allfields['notif_title']= array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('@usersNotif table heading title'),
+ 'default'=>true,
+ 'width'=>'28%',
+ );
// self::$allfields['notif_text']= array(
// 'sort'=>true,
// 'alias'=>'text',
@@ -264,7 +271,7 @@
/**
- @remarks action multi
+ @remarks action multi
*/
case 'multi':
@@ -330,14 +337,14 @@
*/
case 'view':
// global $language_id;
-//
+//
// if( (int)self::$Id > 0) {
// self::$Info = sqlcontent::fetch(array('id'=>self::$Id,'language_id'=>$language_id), true);
// }
// else{
// self::$Info = sqlcontent::Specimen(true);
// }
-//
+//
// if (!isset(self::$Info->status)) self::$Info->status = '1';
// switch (self::$Info->status) {
// case '0': self::$enabled_status = false; self::$disabled_status = true; break;
@@ -669,12 +676,12 @@
*/
// private static function loadXml(){
// global $messageStack;
-//
+//
// $FeedUrl = DIR_FS_ROOT_DOCS.'admin/data/notification_src.xml';
-//
+//
// if(!$SimpleParser = @simplexml_load_file($FeedUrl))
// $messageStack->add_session( __('Flux introuvable'), 'error');
-//
+//
// self::$XmlBase = $SimpleParser;
// }
@@ -686,10 +693,10 @@
// private static function XmlMethod(){
// if(!is_object(self::$XmlBase)) return array();
// $array=array();
-//
+//
// foreach(self::$XmlBase->method->mode as $item)
// $array[]=array('id'=>(string)$item,'text'=>(string)$item);
-//
+//
// return $array;
// }
@@ -701,10 +708,10 @@
// private static function XmlAction(){
// if(!is_object(self::$XmlBase)) return array();
// $array=array();
-//
+//
// foreach(self::$XmlBase->metier->action as $item)
// $array[]=array('id'=>(string)$item,'text'=>(string)$item);
-//
+//
// return $array;
// }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-05 14:06:38
|
Revision: 4774
http://sourceforge.net/p/oscss/svn/4774
Author: oscim
Date: 2013-07-05 14:06:31 +0000 (Fri, 05 Jul 2013)
Log Message:
-----------
Fix contraint in db
Add file sqlxx for manage table product_stock
fix variation price by attribute
Modified Paths:
--------------
trunk/catalog/common/classes/notification.php
trunk/catalog/includes/classes/pad_base.php
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_notification.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.sql
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/includes/attributeManagerGeneralFunctions.inc.php
trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php
trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.key.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_notification.sql
Added: trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductattributestock.php 2013-07-05 14:06:31 UTC (rev 4774)
@@ -0,0 +1,205 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 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.2
+ @date 05/07/2013, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class manage link table configuration
+*/
+
+
+
+
+class sqlproductattributestock
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table options
+ @note id (products_options_id) is not auto incremente
+ */
+ public static function create($option){
+
+ if(!isset($option['products_id']))
+ return 'products_id';
+ if(!isset($option['attributes']))
+ return 'attributes';
+
+ if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
+ if(isset($option['products_stock_attributes'])) $sql_data_array['products_stock_attributes'] = $option['attributes'];
+ if(isset($option['products_stock_quantity'])) $sql_data_array['products_stock_quantity'] = $option['quantity'];
+ if(isset($option['products_stock_quantity_alert'])) $sql_data_array['products_stock_quantity_alert'] = $option['quantity_alert'];
+ if(isset($option['products_stock_barcode'])) $sql_data_array['products_stock_barcode'] = $option['barcode'];
+ if(isset($option['products_stock_ref'])) $sql_data_array['products_stock_ref'] = $option['ref'];
+
+
+
+ $res=tep_db_perform(TABLE_PRODUCTS_STOCK, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ $where='';
+ if(isset($option['id'])) $where .="AND products_stock_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['products_id'])) $where .="AND products_id = '".(string)tep_db_input($option['products_id'])."' ";
+ if(isset($option['attributes'])) $where .="AND products_stock_attributes = '".(string)tep_db_input($option['attributes'])."' ";
+ if(isset($option['ref'])) $where .="AND products_stock_ref = '".(string)tep_db_input($option['ref'])."' ";
+
+ if($where =='')
+ return false;
+
+ if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
+ if(isset($option['products_stock_attributes'])) $sql_data_array['products_stock_attributes'] = $option['attributes'];
+ if(isset($option['products_stock_quantity'])) $sql_data_array['products_stock_quantity'] = $option['quantity'];
+ if(isset($option['products_stock_quantity_alert'])) $sql_data_array['products_stock_quantity_alert'] = $option['quantity_alert'];
+ if(isset($option['products_stock_barcode'])) $sql_data_array['products_stock_barcode'] = $option['barcode'];
+ if(isset($option['products_stock_ref'])) $sql_data_array['products_stock_ref'] = $option['ref'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_STOCK, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $where ="";
+ if(isset($option['id'])) $where .="AND products_stock_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['products_id'])) $where .="AND products_id = '".(string)tep_db_input($option['products_id'])."' ";
+ if(isset($option['attributes'])) $where .="AND products_stock_attributes = '".(string)tep_db_input($option['attributes'])."' ";
+ if(isset($option['ref'])) $where .="AND products_stock_ref = '".(string)tep_db_input($option['ref'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_STOCK." WHERE ".substr($where,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $where .="AND products_stock_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['products_id'])) $where .="AND products_id = '".(string)tep_db_input($option['products_id'])."' ";
+ if(isset($option['attributes'])) $where .="AND products_stock_attributes = '".(string)tep_db_input($option['attributes'])."' ";
+ if(isset($option['ref'])) $where .="AND products_stock_ref = '".(string)tep_db_input($option['ref'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_STOCK." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @brief copy in duplicate or link
+ @return int pid new product
+
+TODO Traiter les arguement par un array pour respecter nomenclature
+ */
+ public static function copyto($pid_src, $pid_new){
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ $nbr=strlen('products_stock_');
+ foreach($array as $key=>$value){
+ if( strpos($key,'products_stock_') ===0)
+ $key=substr($key,$nbr);
+
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'products_stock_id'=>'',
+ 'products_id'=>'',
+ 'products_stock_attributes'=>'',
+ 'products_stock_quantity'=>'',
+ 'products_stock_quantity_alert'=>'',
+ 'products_stock_barcode'=>'',
+ 'products_stock_ref'=>'',
+
+ );
+
+ return self::CleanKey($par);
+ }
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/common/classes/notification.php
===================================================================
--- trunk/catalog/common/classes/notification.php 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/catalog/common/classes/notification.php 2013-07-05 14:06:31 UTC (rev 4774)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 15/01/2013, 17:28
+ @version 2.1.2
+ @date 05/07/2013, 17:28
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class notification
@@ -44,7 +44,7 @@
self::$conf[] = array(
'chknotif_method' => 'sql',
'chknotif_user'=> 1, // force notif pour l'admin 1
- 'chknotif_uniq'=> 0, // force notif uniquement pour user
+ 'chknotif_uniq'=> 0, // force notif uniquement pour user
);
}
else
@@ -72,14 +72,14 @@
case 'sql' :
if((int)$item['chknotif_uniq'] == 0)
- $DB->query($sql="INSERT INTO ".self::ADMIN_TABLE_NOTIF." (notif_id,notif_type,user_id,notif_key,notif_data,notif_text, notif_date) VALUES ('',0,'".(int)$item['chknotif_user']."', '".self::$key."','".tep_db_input($data)."','".tep_db_input($message_final['html'])."' ,now() ) " );
+ $DB->query($sql="INSERT INTO ".self::ADMIN_TABLE_NOTIF." (notif_id,notif_type,user_id,notif_key,notif_data, notif_title, notif_text, notif_date) VALUES ('',0,'".(int)$item['chknotif_user']."', '".self::$key."','".tep_db_input($data)."','".tep_db_input($subjet)."','".tep_db_input($message_final['html'])."' ,now() ) " );
if((int)$item['chknotif_uniq'] == 1){
$r = $DB->query("SELECT admin_id as id FROM ".TABLE_ADMIN_USERS." where admin_status > 0 AND admin_groups_id='".(int)$item['chknotif_user']."' " );
foreach($r->fetchAllAssoc() as $admin)
if((int)$item['chknotif_user'] !=(int)$admin['id'])
- $DB->query($sql="INSERT INTO ".self::ADMIN_TABLE_NOTIF." (notif_id,notif_type,user_id,notif_key,notif_data,notif_text, notif_date) VALUES ('',1,'".(int)$admin['id']."', '".self::$key."','".tep_db_input($data)."','".tep_db_input($message_final['html'])."' ,now() ) " );
+ $DB->query($sql="INSERT INTO ".self::ADMIN_TABLE_NOTIF." (notif_id,notif_type,user_id,notif_key,notif_data, notif_title, notif_text, notif_date) VALUES ('',1,'".(int)$admin['id']."', '".self::$key."','".tep_db_input($data)."','".tep_db_input($subjet)."','".tep_db_input($message_final['html'])."' ,now() ) " );
}
break;
Modified: trunk/catalog/includes/classes/pad_base.php
===================================================================
--- trunk/catalog/includes/classes/pad_base.php 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/catalog/includes/classes/pad_base.php 2013-07-05 14:06:31 UTC (rev 4774)
@@ -313,10 +313,10 @@
$show_price = 0.0 + $this->products_org_price - $products_options['options_values_price'];
$txt =' ( ' . __('attribute text minor') . $currencies->display_price( $show_price , tep_get_tax_rate($this->products_tax_class_id)) .')';
break;
-// case '=':
-// $show_price = 0.0 + $products_options['options_values_price'];
-// $txt =' ( ' . __('attribute text equal') . $currencies->display_price( $show_price , tep_get_tax_rate($this->products_tax_class_id)) .')';
-// break;
+ case '=':
+ $show_price = 0.0 + $products_options['options_values_price'];
+ $txt =' ( ' . __('attribute text equal') . $currencies->display_price( $show_price , tep_get_tax_rate($this->products_tax_class_id)) .')';
+ break;
default:
$show_price = 0.0 + $this->products_org_price ;
$txt = ' ( ' . __('attribute text equal') . $currencies->display_price( $show_price , tep_get_tax_rate($this->products_tax_class_id)) .')';
@@ -324,6 +324,7 @@
+
/** Price / option value */
if (/*$products_options['options_values_price'] != '0' &&*/ $this->display_TextDetailForAdjustPrice) {
$products_options_array[sizeof($products_options_array)-1]['text'] .=$txt;
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_admin_notification.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_admin_notification.sql 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_admin_notification.sql 2013-07-05 14:06:31 UTC (rev 4774)
@@ -18,6 +18,7 @@
user_id int(11) NOT NULL,
notif_key varchar(100) NOT NULL,
notif_data varchar(250) NOT NULL,
+ notif_title VARCHAR( 128 ) NULL,
notif_text text NOT NULL,
notif_date datetime default '1000-01-01 00:00:00' NOT NULL,
PRIMARY KEY (notif_id)
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.key.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.key.sql 2013-07-05 14:06:31 UTC (rev 4774)
@@ -0,0 +1,17 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 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_products_attributes ADD CONSTRAINT fk_osc_products_attributes_options_id FOREIGN KEY (options_id) REFERENCES osc_products_options (products_options_id);
+
+ALTER TABLE osc_products_attributes ADD CONSTRAINT fk_osc_products_attributes_options_values_id FOREIGN KEY (options_values_id) REFERENCES osc_products_options_values (products_options_values_id);
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.sql 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.sql 2013-07-05 14:06:31 UTC (rev 4774)
@@ -22,6 +22,9 @@
products_options_sort_order int(5) default '0' not null ,
products_options_values_url varchar(128) null ,
options_values_weight decimal(15,6) default '0.0000' not null ,
- PRIMARY KEY (products_attributes_id)
+ PRIMARY KEY (products_attributes_id),
+ UNIQUE KEY products_id (products_id,options_id,options_values_id),
+ KEY fk_osc_products_attributes_options_values_id (options_values_id),
+ KEY fk_osc_products_attributes_options_id (options_id)
) DEFAULT CHARSET=utf8;
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.key.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.key.sql 2013-07-05 14:06:31 UTC (rev 4774)
@@ -0,0 +1,14 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 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_products_stock ADD CONSTRAINT fk_osc_products_stock_product_id FOREIGN KEY (products_id) REFERENCES osc_products (products_id);
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_notification.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_notification.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_notification.sql 2013-07-05 14:06:31 UTC (rev 4774)
@@ -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_admin_notification ADD notif_title VARCHAR( 128 ) NULL AFTER notif_data ;
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php 2013-07-05 14:06:31 UTC (rev 4774)
@@ -452,7 +452,7 @@
$price='0.0000';
}else{
if((empty($prefix))||($prefix==' ')){
- $prefix='+';
+ $prefix='+';
}
}
@@ -464,7 +464,7 @@
$data[AM_FIELD_OPTION_VALUE_SORT_ORDER] = $sortOrder;
}
*/
-
+print_r($get);
amDB::perform(TABLE_PRODUCTS_ATTRIBUTES,$data, 'update',"products_id='$this->intPID' and options_id='$optionId' and options_values_id='$optionValueId'");
}
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/includes/attributeManagerGeneralFunctions.inc.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/includes/attributeManagerGeneralFunctions.inc.php 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/includes/attributeManagerGeneralFunctions.inc.php 2013-07-05 14:06:31 UTC (rev 4774)
@@ -17,10 +17,11 @@
"prefix",
array(
array('id'=>'','text'=>''),
- array('id'=>urlencode('+'),'text'=>' + '),
- array('id'=>'-','text'=>' - ')
+ array('id'=>urlencode('+'),'text'=>' + '),
+ array('id'=>'-','text'=>' - '),
+ array('id'=>urlencode('='),'text'=>' = '),
),
- ($selected == '+') ? urlencode('+') : $selected,
+ ($selected != ' ') ? urlencode($selected) : $selected,
$params
);
}
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php 2013-07-04 14:46:51 UTC (rev 4773)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php 2013-07-05 14:06:31 UTC (rev 4774)
@@ -2,88 +2,219 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9h
- @date 04/06/10, 22:08
+ @version 2.1.0
+ @date 01/11/10, 16:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class attributeManager
-
- Prise en charge des attributes de produits
+ @Class attributeManager
*/
+class attributeManager
+ extends AbstractProduct
+ implements InterfaceModule {
-define('PATH_ATTRIBUT_MANAGER','attributeManager/');
+ /**
-class attributeManager implements InterfaceModule{
- /**
*/
- var $code;
- /**
- */
- var $enabled;
+ var $tag;
- /**
- class constructor
- */
- function attributeManager() {
+ function __construct() {
$this->code = 'attributeManager';
- $this->title = __('Attribute manager');
- $this->description = __("Gerer les options des produits, lors de l'edition des produits, avec attributeManager") ;
+ $this->title = __('attributemanager text title');
+ $this->description = __('attributemanager text_description');
$this->sort_order = (defined('MODULE_ACAPRO_ATTRIBUTEMANAGER_SORT_ORDER')) ? MODULE_ACAPRO_ATTRIBUTEMANAGER_SORT_ORDER : 0 ;
- $this->enabled = true;
+ $this->enabled = true; ;
+
+ global $page;
+ if(!is_object($page)) return '';
+ $this->language = $page->the_var('language');
+ $this->languages_id = $page->the_var('languages_id');
}
+
+
+ public function get_header($action=''){}
+ public function display_view($pID,$class=''){ return array(); }
+
+ function get_header_js($action=''){
+ $this->pID=(int)$_GET['products_id'];
+ require(DIR_WS_CLASSES . 'pad_base.php');
+ $this->pad = new pad_base($this->pID, $this);
+
+ echo $this->pad->draw_js();
+ }
+
/**
*/
- function get_header_js ($action) {
- if ($action="new_product") {
- require_once(PATH_ATTRIBUT_MANAGER.'includes/attributeManagerHeader.inc.php' );
- echo '<script type="text/javascript"><!--'."\n".
- 'function get_ajax_attM(id,pID,paction){'."\n".
- 'var ter = document.getElementById(id);'."\n".
- 'ter.innerHTML = "'.__('En cours').'";'."\n".
- '$.ajax({'."\n".
- 'type: "GET",'."\n".
- 'url: "'.PATH_ATTRIBUT_MANAGER.'/attributeManager.php",'."\n".
- 'data: "'.tep_session_name().'='.tep_session_id().'&products_id=" +pID+"&pageAction="+paction,'."\n".
- 'success: function(msg){'."\n".
- 'ter.innerHTML = msg;'."\n".
- '}'."\n".
- '});'."\n".
- '}'."\n".
- '//--></script>'."\n".
- '';
- }
+ function load_db_values($pID){
+ $this->product_id=$pID;
+ $this->products_attributes= product_attribut_info($pID);
}
+
+/*
+ Function ACA option
+*/
/**
- Vue lors edition produits
+ Affiche bock list client notifié coté public
+ @param
+ @a int pID l'Id du produits
*/
- function display_edit(&$contents) {
- $languages = tep_get_languages();
+ public function display_view_master($pID){
+ global $page;
+ if (!isset($this->products_attributes) ||( isset($this->product_id)&& $this->product_id!=$pID) ){
+ if(!class_exists('pad_base')) require(DIR_WS_CLASSES . 'pad_base.php');
+ $this->pad = new pad_base($pID, $this);
- $title= __('options(s)');
+ echo $this->pad->draw_js();
- $m='<div class="attributeManager">'."\n";
- if (!isset($_GET['pID'])) $m .= NOT_DISPO_PREV_SAVE;
- else {
- $m.='<div id="attributeManager"></div>'."\n".
- '<script type="text/javascript"><!--'."\n".
- 'get_ajax_attM(\'attributeManager\','.$_GET['pID'].', \''.$_GET['action'].'\');'."\n".
- '// --></script>';
}
- $m.='</div>'."\n";
+ $language = $page->the_var('language');
+ $languages_id = $page->the_var('languages_id');
- $contents []=array('title'=> $title,'text'=> $m);
+ $out ='<div id="productOptions">';
+ $out .= $this->pad->draw();
+
+ //Display a table with which attributecombinations is on stock to the customer?
+ if(_cst_bool('PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST')) $out .=$this->qtpro_stock_table($pID);
+
+ $out .= '</div>';
+ return $out;
}
-/** Force implements InterfaceModule class to define this method */
- function check() {return false; }
- function install() {return false; }
- function remove() {return false; }
- function keys() {
- return array( 'MODULE_ACAPRO_ATTRIBUTEMANAGER_SORT_ORDER');
+ /**
+ Construction du selecteur d'attribut en fonction du type d'attribut
+ Remplace le selecteur par defaut de pad_base
+ @param
+ @a array
+ @a string
+ */
+ public function _draw_type_att($array,$js){
+ $field ='';
+
+ $selected=(tep_not_null($array['default']))? $array['default'] : '';
+ switch ($array['otype']) {
+ case '2': // Text
+ $field .= '<label> '.$array['ovals'][0]['text'].'</label>'.tep_draw_hidden_field('Valueid[' .$array['oid'].']',$array['ovals'][0]['id'])
+ .tep_draw_input_field('id[' .TEXT_PREFIX.$array['oid'].']', 'id_' .TEXT_PREFIX .$array['oid'].'','', ' maxlength="'.$array['olength'].'" onkeydown="textCounter(this,\'progressbar' . $array['oid'] . '\',' . $array['olength'] . ')" onkeyup="textCounter(this,\'progressbar' . $array['oid'] . '\',' . $array['olength'] . ')" onfocus="textCounter(this,\'progressbar' .$array['oid'] . '\',' . $array['olength'] . ')"')
+ .'<div id="progressbar' . $array['oid'] . '" class="progress"></div>';
+ break;
+ case '5': //File
+ break;
+ case '3'://Radio
+ $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);
+ break;
+ case '1': // Select
+ default:
+ $field .= tep_draw_pull_down_menu('id['.$array['oid'].']','id_'.$array['oid'],$array['ovals'],$selected, $js);
+ }
+ return $field;
}
+
+
+
+
+ private function qtpro_stock_table($pID){
+
+ global $page;
+ $languages_id = $page->the_var('languages_id');
+ $currencies = $page->return_object('currencies');
+
+ $products_facts_query = "select IF(s.status, s.specials_new_products_price, p.products_price) as products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = " . (int)$pID ;
+ $products_facts = tep_db_fetch_array(tep_db_query($products_facts_query));
+
+ // Get the stocklevels
+ $products_stock_query=tep_db_query("SELECT products_stock_attributes, products_stock_quantity
+ FROM " . TABLE_PRODUCTS_STOCK . "
+ WHERE products_id=" . (int)$pID."
+ ORDER BY products_stock_attributes");
+
+ // get the option names
+ $products_options_name_query = tep_db_query("SELECT distinct popt.products_options_id, popt.products_options_name
+ FROM " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
+ WHERE patrib.products_id='" . (int)$pID . "'
+ AND patrib.options_id = popt.products_options_id
+ AND popt.products_options_track_stock = '1'
+ AND popt.language_id = '" . (int)$languages_id . "'
+ ORDER BY popt.products_options_id");
+
+ // build array of attributes price delta
+ $attributes_price = array();
+ $products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix
+ FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa
+ WHERE pa.products_id = '" . (int)$pID . "'");
+
+ $total_price=$products_facts['products_price'];
+ while ($products_attributes_values = tep_db_fetch_array($products_attributes_query)) {
+ $tmp_price = $total_price;
+ $option_price = $products_attributes_values['options_values_price'];
+ switch ($products_attributes_values['price_prefix']) {
+ case '-':
+ $tmp_price += -1*$option_price;
+ break;
+ case '=':
+ $tmp_price +=0;
+ break;
+ default:
+ $tmp_price +=$option_price;
+ }
+
+ $attributes_price[$products_attributes_values['options_id']][$products_attributes_values['options_values_id']] = $tmp_price;
+ }
+
+ $rowscounter = 0;
+ $html_ev_out = '<h4>' . __('stock list in pi text heading') . '</h4>
+ <table border="0" cellspacing="0" cellpadding="0"><tr><thead>';
+
+ // build heading line with option names
+ while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
+ $html_ev_out .= '<th class="infoBoxHeading" align="center">' . $products_options_name['products_options_name'] . '</th>';
+ }
+ $html_ev_out .= '<th class="infoBoxHeading" align="center">'. __('stock list in pi text price') .'</th>';
+ $html_ev_out .= '<th class="infoBoxHeading" align="center">'. __('stock list in pi text stock') .'</th>';
+ $html_ev_out .= '</tr></thead><tbody>';
+
+
+ // now create the rows! Each row will display the quantity for one combination of attributes.
+ while($products_stock_values=tep_db_fetch_array($products_stock_query)) {
+ if($products_stock_values['products_stock_quantity'] > 0){
+ //We only want to display rows for combinations we have on stock...
+ //For example the quantity can be 0 or even negative if oversold.
+ $rowscounter += 1;
+ $attributes=explode(",",$products_stock_values['products_stock_attributes']);
+ $html_ev_out .= '<tr >';
+
+ $total_price=$products_facts['products_price'];
+ foreach($attributes as $attribute) {
+ // print_r($attributes_price);
+ $attr=explode("-",$attribute);
+ $html_ev_out .= '<td class="infoBoxContents" align="center">'.tep_values_name($attr[1]).'</td>';
+ $total_price=$attributes_price[$attr[0]][$attr[1]];
+ }
+ $total_price=$currencies->display_price($total_price, tep_get_tax_rate($products_facts['products_tax_class_id']));
+
+ $html_ev_out .= '<td class="infoBoxContents" align="center">'.$total_price.'</td>';
+ $html_ev_out .= '<td class="infoBoxContents" align="center">'.$products_stock_values['products_stock_quantity'].'</td>';
+ }
+ }
+
+
+ $html_ev_out .= '</tbody></tr></table>';
+
+ if($rowscounter > 0){
+ return $html_ev_out;
+ }
+ }
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
}
+
?>
\ 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...> - 2013-07-04 14:46:55
|
Revision: 4773
http://sourceforge.net/p/oscss/svn/4773
Author: oscim
Date: 2013-07-04 14:46:51 +0000 (Thu, 04 Jul 2013)
Log Message:
-----------
Add colum ref in order, shipping, service, bills
Report usage and display ref
Add row in configuration for manage mod numref and install file sql
Add class master for generate numref
add process history email
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/classes/drivers/sqlservices.php
trunk/catalog/admin/includes/classes/drivers/sqlshipping.php
trunk/catalog/admin/includes/functions/lib.configuration.php
trunk/catalog/admin/includes/functions/lib.orders.php
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
trunk/catalog/admin/includes/modules/account/history.php
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/modules/pages/shipping.php
trunk/catalog/admin/includes/widget/orderLastinvoice.php
trunk/catalog/admin/includes/widget/orderLastservice.php
trunk/catalog/admin/includes/widget/orderLastshipp.php
trunk/catalog/common/classes/HistoryMail.php
trunk/catalog/common/classes/osCSS_pdf.php
trunk/catalog/common/modules/core/email/history_internal.php
trunk/catalog/includes/classes/checkout_process.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_services.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_shipping.sql
Added Paths:
-----------
trunk/catalog/common/classes/NumRef.php
trunk/catalog/common/modules/core/numref/
trunk/catalog/common/modules/core/numref/bills/
trunk/catalog/common/modules/core/numref/bills/sakura.php
trunk/catalog/common/modules/core/numref/orders/
trunk/catalog/common/modules/core/numref/orders/poisson.php
trunk/catalog/common/modules/core/numref/services/
trunk/catalog/common/modules/core/numref/services/moegi.php
trunk/catalog/common/modules/core/numref/shipping/
trunk/catalog/common/modules/core/numref/shipping/shikamaru.php
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_services.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_shipping.sql
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 12/03/2012, 20:11
+ @version 2.1.2
+ @date 04/07/2013, 10:36
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class sqlorder
@@ -248,7 +248,7 @@
/// Adjust process for status
if($status>0)
$new_st = substr((int)$status,0,1);
- else
+ else
$new_st = $status;
switch($new_st){
@@ -257,6 +257,11 @@
$res_id=tep_db_fetch_array($_query);
$sql_data_array['facture_id'] = ((int)$res_id['_id'] +1) ;
+ // New Ref
+ $numref= new NumRef('bills');
+ $ref = $numref->GetNewNumRef();
+ $sql_data_array['facture_ref'] =$ref ;
+
self::$comment[] = __('orders update and factured');
break;
case DEFAULT_ORDERS_STATUS_ANNULATE:
Modified: trunk/catalog/admin/includes/classes/drivers/sqlservices.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlservices.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/classes/drivers/sqlservices.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/09/11, 20:11
+ @version 2.1.2
+ @date 04/07/2013, 20:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class manage link table configuration
@@ -30,6 +30,13 @@
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['services_ref'])) $sql_data_array['services_ref'] = $option['services_ref'];
+ else {
+ // New Ref
+ $numref= new NumRef('services');
+ $sql_data_array['services_ref'] = $numref->GetNewNumRef();
+ }
+
if(isset($option['status'])) $sql_data_array['status'] = $option['status'];
if(isset($option['date_added'])) $sql_data_array['date_added'] = $option['date_added'];
if(isset($option['date_start'])) $sql_data_array['date_start'] = $option['date_start'];
@@ -181,6 +188,7 @@
$par = array(
'row_id',
+ 'services_ref',
'customers_id',
'orders_id',
'orders_products_id',
Modified: trunk/catalog/admin/includes/classes/drivers/sqlshipping.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlshipping.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/classes/drivers/sqlshipping.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -22,9 +22,15 @@
*/
public static function create($option){
- if(!isset($option['orders_id']))
+ if(!isset($option['orders_id']))
return 'orders_id';
+ if(isset($option['shipping_ref'])) $sql_data_array['shipping_ref'] = $option['shipping_ref'];
+ else {
+ // New Ref
+ $numref= new NumRef('shipping');
+ $sql_data_array['shipping_ref'] = $numref->GetNewNumRef();
+ }
if(isset($option['orders_id'])) $sql_data_array['orders_id'] = $option['orders_id'];
if(isset($option['method'])) $sql_data_array['method'] = $option['method'];
if(isset($option['tracking'])) $sql_data_array['tracking'] = $option['tracking'];
@@ -37,7 +43,7 @@
if(!$res)
return $res;
/*else
- return*/
+ return*/
else
$id = $res->__get('insertId');
@@ -62,7 +68,7 @@
/**
@brief update ligne in table shipping, and add history if
-
+
*/
public static function update($option){
@@ -94,7 +100,7 @@
/**
- @brief
+ @brief
*/
function AddHistory($id, $status , $notif, $comment ){
$sql_data_array = array('shipping_id' => (int)$id ,
@@ -148,8 +154,8 @@
// call all row product
$sql = "SELECT sp.* , op.*
- FROM ".TABLE_SHIPPING_PRODUCTS." sp
- LEFT JOIN " . TABLE_ORDERS_PRODUCTS . " op ON(op.orders_products_id = sp.orders_products_id )
+ FROM ".TABLE_SHIPPING_PRODUCTS." sp
+ LEFT JOIN " . TABLE_ORDERS_PRODUCTS . " op ON(op.orders_products_id = sp.orders_products_id )
WHERE shipping_id = '".(int)$result['row_id']."' ";
$res2 = $DB->query($sql);
@@ -166,7 +172,7 @@
}
- // call history
+ // call history
$sql = "SELECT sh.*
FROM ".TABLE_SHIPPING_HISTORY." sh
WHERE shipping_id = '".(int)$result['row_id']."' ORDER BY date_added DESC ";
@@ -189,8 +195,8 @@
// call all row product
$sql = "SELECT sp.* , op.*
- FROM ".TABLE_SHIPPING_PRODUCTS." sp
- LEFT JOIN " . TABLE_ORDERS_PRODUCTS . " op ON(op.orders_products_id = sp.orders_products_id )
+ FROM ".TABLE_SHIPPING_PRODUCTS." sp
+ LEFT JOIN " . TABLE_ORDERS_PRODUCTS . " op ON(op.orders_products_id = sp.orders_products_id )
WHERE shipping_id = '".(int)$result['row_id']."' ";
$res2 = $DB->query($sql);
@@ -206,7 +212,7 @@
$result['products'][] = $r2;
}
- // call history
+ // call history
$sql = "SELECT sh.*
FROM ".TABLE_SHIPPING_HISTORY." sh
WHERE shipping_id = '".(int)$result['row_id']."' ORDER BY date_added DESC ";
@@ -284,6 +290,7 @@
$par = array(
'row_id',
+ 'shipping_ref',
'orders_id',
'method',
'tracking',
Modified: trunk/catalog/admin/includes/functions/lib.configuration.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.configuration.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/functions/lib.configuration.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 13/03/2012, 23:12
+ @version 2.1.2
+ @date 074/07/2013, 23:12
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -208,18 +208,29 @@
function tep_get_order_status_name($order_status_id, $language_id = '') {
- global $languages_id;
+ global $languages_id;
+ if ($order_status_id < 1) return TEXT_DEFAULT;
+ if (!is_numeric($language_id)) $language_id = $languages_id;
+ $status_query = tep_db_query("select status_name from " . TABLE_STATUS . " where status_type='orders' and status_id = '" . (int)$order_status_id . "' and language_id = '" . (int)$language_id . "'");
+ $status = tep_db_fetch_array($status_query);
+ return $status['status_name'];
+}
- if ($order_status_id < 1) return TEXT_DEFAULT;
+/**
+ @brief used for define module numRef for attribute ref in orders, shipping, etc..
+*/
+function tep_cfg_pull_down_numref_mod($type='orders', $value_id, $key = '') {
+ $name = ((tep_not_null($key)) ? 'configuration[' . $key . ']' : 'configuration_value');
- if (!is_numeric($language_id)) $language_id = $languages_id;
+ $list = array('id'=>'0','text'=>TEXT_NONE);
+ foreach(scan(DIR_FS_CATALOG . DIR_WS_COMMON . 'modules/core/numref/'.$type.'/') as $row)
+ $list[]=array('id'=>substr($row,0,-4), 'text'=> substr($row,0,-4));
- $status_query = tep_db_query("select status_name from " . TABLE_STATUS . " where status_type='orders' and status_id = '" . (int)$order_status_id . "' and language_id = '" . (int)$language_id . "'");
- $status = tep_db_fetch_array($status_query);
-
- return $status['status_name'];
+ return tep_draw_pull_down_menu($name,$list, $value_id);
}
+
+
/**
Alias function for module configuration keys Retour d'un tableau des code des devsie installé
*/
@@ -330,13 +341,13 @@
// 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'];
@@ -362,7 +373,7 @@
$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);
}
Modified: trunk/catalog/admin/includes/functions/lib.orders.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.orders.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/functions/lib.orders.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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/03/2012, 22:36
+ @version 2.1.2
+ @date 04/07/2013, 10:36
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -47,7 +47,7 @@
$orders_status_array[$orders_status['status_id']] = $orders_status['status_name'];
}
- $check_status_query = tep_db_query("select customers_id, customers_name, customers_email_address, orders_status, date_purchased, ip_address from " . TABLE_ORDERS . " where orders_id = '" . (int)$_oID . "'");
+ $check_status_query = tep_db_query("select orders_ref, customers_id, customers_name, customers_email_address, orders_status, date_purchased, ip_address from " . TABLE_ORDERS . " where orders_id = '" . (int)$_oID . "'");
$check_status = tep_db_fetch_array($check_status_query);
if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
@@ -66,7 +66,7 @@
'mail_sent_to'=>$check_status['customers_email_address'],
'from'=>STORE_OWNER,
'subject'=>'',
- '_oID'=>$_oID,
+ '_oID'=>$check_status['orders_ref'],
'date_purchased'=>tep_date_long($check_status['date_purchased']),
'notify_comments'=>$comments,
'_ostatus'=>$orders_status_array[$status],
@@ -77,8 +77,13 @@
$message_final=tep_post_prepare_email('orders.tpl',$language,$myarray);
- if( tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $message_final) !=false) /*$customer_notified = '1';*/
+ if( tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $message_final) !=false) {
+
+ $HM=HistoryMail::getInstance();
+ $HM->AddMail($check_status['customers_id'], EMAIL_TEXT_SUBJECT, $check_status['customers_name'], $check_status['customers_email_address'], STORE_OWNER, EMAIL_FROM , $message_final['html']);
+
$messageStack->add_session(sprintf(__('success email notify customers %'), $check_status['customers_email_address']) , 'success');
+ }
else
sqlorder::AddOrderHistory($oID, tep_db_input($status) , 0, __('error process notify customers'));
}
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-04 14:46:51 UTC (rev 4773)
@@ -477,7 +477,7 @@
<?php if(isset($ashipping->row_id)): ?>
<tr>
<td class="tcenter">
- <a href="<?php echo tep_href_link(FILENAME_SHIPPING,'action=edit&oID='.$ashipping->row_id); ?>"><?php echo $ashipping->row_id; ?></a>
+ <a href="<?php echo tep_href_link(FILENAME_SHIPPING,'action=edit&oID='.$ashipping->row_id); ?>"><?php echo (!empty($ashipping->shipping_ref)?$ashipping->shipping_ref:$ashipping->row_id); ?></a>
</td>
<td class="tcenter">
<?php echo tep_datetime_short($ashipping->date_expedition); ?>
@@ -614,9 +614,9 @@
</tr>
</thead>
<tbody>
- <?php $i = 0; foreach (orders::$order->service as $service): $i++; /*print_r($service);*/?>
+ <?php $i = 0; foreach (orders::$order->service as $service): $i++; ?>
<tr>
- <td class="tcenter"><?php echo $service->id ?></td>
+ <td class="tcenter"><?php echo (!empty($service->service_ref)?$service->service_ref: $service->id) ?></td>
<td class="tcenter">
<?php echo $service->qty ?>
</td>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt 2013-07-04 14:46:51 UTC (rev 4773)
@@ -30,4 +30,7 @@
$lang['history last logon']="Dernière connexion" ;
$lang['history last update']="Dernière modification du compte" ;
$lang['history date created']="Compte créer" ;
+
+$lang['@history send']="Envoyé" ;
+$lang['@history receveid']="Reçu" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2013-07-04 14:46:51 UTC (rev 4773)
@@ -63,4 +63,16 @@
$lang['USE_LOCAL_GENERAT_ORDER_REF_S']="Référence des commandes" ;
$lang['USE_LOCAL_GENERAT_ORDER_REF_L']="Utiliser la numerotaion interne, ou laisser un outils externe prendre en charge cette référence. Celle ci ne sera donc disponible qu'apres la prise en compte par l'outil tiers de la commande. Coté public, le numero generic interne est utilisé en attente de reference" ;
+
+$lang['USE_MODELE_NUMREF_ORDERS_S']="Numerotation des commandes" ;
+$lang['USE_MODELE_NUMREF_ORDERS_L']="Choix du module de numerotation" ;
+
+$lang['USE_MODELE_NUMREF_BILLS_S']="Numerotation des factures" ;
+$lang['USE_MODELE_NUMREF_BILLS_L']="Choix du module de numerotation" ;
+
+$lang['USE_MODELE_NUMREF_SHIPPING_S']="Numerotation des livaraisons" ;
+$lang['USE_MODELE_NUMREF_SHIPPING_L']="Choix du module de numerotation" ;
+
+$lang['USE_MODELE_NUMREF_SERVICE_S']="Numerotation des services" ;
+$lang['USE_MODELE_NUMREF_SERVICE_L']="Choix du module de numerotation" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/shipping.txt 2013-07-04 14:46:51 UTC (rev 4773)
@@ -17,6 +17,7 @@
/* Action */
/* Listing */
$lang['table heading shipping id']="n°" ;
+ $lang['@shipping table heading ref']="Réf." ;
$lang['@shipping table heading order id']="Cmd n°" ;
$lang['@shipping table heading customers']="Clients" ;
$lang['@shipping table heading date expedition']="Expd. le" ;
@@ -62,7 +63,7 @@
$lang['shipping table pdf heading date']="Date" ;
$lang['shipping table pdf heading file']="Fichier" ;
$lang['image shipping delivery']="Bon de livraison" ;
- $lang['pdf generate']="Generer" ;
+ $lang['pdf generate']="Generer" ;
/* Value list */
Modified: trunk/catalog/admin/includes/modules/account/history.php
===================================================================
--- trunk/catalog/admin/includes/modules/account/history.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/modules/account/history.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -131,8 +131,8 @@
}
+
$_query = $DB->query($sql="SELECT customers_info_date_of_last_logon ,customers_info_date_account_created ,customers_info_date_account_last_modified from " . TABLE_CUSTOMERS_INFO . " c WHERE customers_info_id = '" . (int)$cID . "' ");
-
$row=$_query->fetchAssoc();
$n = new stdClass();
@@ -163,12 +163,8 @@
$HM = HistoryMail::getInstance();
$list = $HM->ListUserDir($cID) ;
foreach($list as $row){
-
- $row->text = $row->sens.$row->linkdoc;
-
-
+ $row->text = ( ($row->sens=='I')? __('@history send') : __('@history receveid') ).' '.$row->linkdoc;
$result[strtotime($row->originaldate)]=$row;
-
}
break;
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 12/03/2012, 22:42
+ @version 2.1.2
+ @date 04/07/2013, 10:36
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class orders
@@ -12,7 +12,6 @@
*/
-
class orders
extends ModTwo /// new abstract class for nextgen module
implements
@@ -676,7 +675,7 @@
switch($new_st){
case DEFAULT_ORDERS_STATUS_PAYED:
- if( ! _cst_bool('USE_LOCAL_GENERAT_PDF')) {
+ if( _cst_bool('USE_LOCAL_GENERAT_PDF')) {
$_GET['forceajax'] = true;
$_REQUEST['id'] = $oID;
$_REQUEST['file_type'] = 'invoice';
@@ -692,7 +691,7 @@
break;
case DEFAULT_ORDERS_STATUS_ID:
default:
- if( ! _cst_bool('USE_LOCAL_GENERAT_PDF')) {
+ if( _cst_bool('USE_LOCAL_GENERAT_PDF')) {
$_GET['forceajax'] = true;
$_REQUEST['id'] = $oID;
$_REQUEST['file_type'] = 'packingslip';
Modified: trunk/catalog/admin/includes/modules/pages/shipping.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/shipping.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/modules/pages/shipping.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -152,6 +152,13 @@
'text'=>__('@shipping table heading id'),
'width'=>'2%',
'class'=>'tcenter',
+ ),
+ 's.shipping_ref' => array(
+ 'sort'=>true,
+ 'alias'=>'ref',
+ 'text'=>__('@shipping table heading ref'),
+ 'width'=>'5%',
+ 'class'=>'tcenter',
'default'=>true,
),
'o.orders_id' => array(
@@ -303,17 +310,17 @@
// $_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']))
@@ -356,10 +363,10 @@
$mutliactionmenu = array(
array('id'=>'','text'=>'--'),
-// liste detail de chaque colis
+// liste detail de chaque colis
array('id'=>'bl', 'text'=>__('@shipping action txt print bl') ),
-// recap liste des colis
+// recap liste des colis
array('id'=>'be', 'text'=>__('@shipping action txt print be internal list recap') ),
);
@@ -398,7 +405,7 @@
break;
/**
- @remarks pdf generate for all docs
+ @remarks pdf generate for all docs
*/
case 'pdf':
@@ -481,9 +488,9 @@
$status = tep_db_prepare_input($_POST['status']);
// $modeexport = tep_db_prepare_input(@$_POST['modeexport']);
$notify =(isset($_POST['notify'])) ? tep_db_prepare_input($_POST['notify']): false ;
-
+
if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) ) {
@@ -494,16 +501,16 @@
$array['notify']=1;
$array['comments']= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
}
-
+
// update status
if( ! sqlshipping::update( $array) )
- $res[] = false;
+ $res[] = false;
// mail ,notify
if($notify != false) {
$comments= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
-/// TODO implements notif customes and recap for admin
+/// TODO implements notif customes and recap for admin
}
@@ -533,7 +540,7 @@
// update status
if( ! sqlshipping::update( $array) )
- $res[] = false;
+ $res[] = false;
if(!isset($_GET['forceajax']) )
tep_redirect(tep_href_link(self::FILENAME,'oID='.self::$oID.'&action=edit' ));
@@ -586,7 +593,7 @@
case 'edit':
- $res= sqlshipping::fetch(array('id'=>(int)self::$oID ), true);
+ $res= sqlshipping::fetch(array('id'=>(int)self::$oID ), true);
self::$order = new order($res->orders_id);
@@ -702,7 +709,7 @@
break;
/**
- @remarks Formulaire apres choix action
+ @remarks Formulaire apres choix action
*/
case 'multi-action';
global $mutliactionchoose;
@@ -759,7 +766,7 @@
break;
/**
- @remarks Formulaire apres choix action
+ @remarks Formulaire apres choix action
*/
case 'multi-action':
global $mutliactionmenu, $mutliactionchoose;
@@ -807,12 +814,12 @@
// public static function PrepaPullDownType($type){
// if(isset(sqlorder::$modules_type->$type)) {
// $r = array();
-//
+//
// foreach(sqlorder::$modules_type->$type->modules as $key => $row){
// $r[] = array('id'=>$key,'text'=>$row->title);
// }
// }
-//
+//
// return $r;
// }
@@ -901,22 +908,26 @@
case 'listing':
while ($shipping = $_query->fetchAssoc()) {
- $ord['oID']=$shipping['id'];
- $ord['id']=$shipping['id'];
- $ord['order_id']=$shipping['orders_id'];
- if(isset($shipping['customers_id']))
+ $ord['oID']=$shipping['row_id'];
+ $ord['id']=$shipping['row_id'];
+ $ord['order_id']=$shipping['orders_id'];
+ $ord['ref']=$shipping['ref'];
+
+ if(isset($shipping['customers_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']=(!empty($shipping['method']) ? $shipping['method'] : '' );
- $ord['status']=self::GetshippingStatus($shipping, false);
- $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;
+ $ord['date_expedition']=tep_datetime_short($shipping['date_expedition']);
+ $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['action']=self::get_item_action($ord);
+
+ $res[]=$ord;
}
break;
}
+
return $res;
}
@@ -971,9 +982,9 @@
}
- /**
- @remarks implements InterfaceModule depend
- if module twin in backoffice, report all content install in the other module
+ /**
+ @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;}
@@ -982,7 +993,7 @@
/**
@fn check()
- @brief test if count all var , and keys is equal
+ @brief test if count all var , and keys is equal
@return boolean true/false
*/
function check() { return false; }
@@ -990,7 +1001,7 @@
/**
@fn keys()
- @return array all key configuration define by this module
+ @return array all key configuration define by this module
*/
function keys() {
return array();
@@ -998,13 +1009,13 @@
/**
@fn install()
- @brief add all configuration
- @note
+ @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__MODTYPENAME_MAJ_'
- if module twin in backoffice, report all content install in the other module
- - Not use language in DB , but function :__()
- for MODULE_TOTO_ST
+ - Not use language in DB , but function :__()
+ for MODULE_TOTO_ST
var title MODULE_TOTO_ST_S (small description)
var description MODULE_TOTO_ST_L (long description)
*/
@@ -1013,9 +1024,9 @@
/**
@fn remove()
@brief delete all configuration
- @note
+ @note
- please, pefix all var configuration by 'MODULE_PAYMENT__MODTYPENAME_MAJ_'
- - if module twin in backoffice, report all content remove in the other module
+ - if module twin in backoffice, report all content remove in the other module
*/
function remove() { return false; }
}
Modified: trunk/catalog/admin/includes/widget/orderLastinvoice.php
===================================================================
--- trunk/catalog/admin/includes/widget/orderLastinvoice.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/widget/orderLastinvoice.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 02/03/2012, 20:02
+ @version 2.1.2
+ @date 04/07/2013, 10:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -29,7 +29,7 @@
</tr>
<?php foreach($_query->fetchAllAssoc() as $row) : ?>
<tr>
- <td><strong><a href="<?php echo tep_href_link(FILENAME_ORDERS, 'oID='.$row['orders_id'].'&action=edit') ?>"><?php echo $row['orders_prefix'].$row['orders_id'] ?></strong></td>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_ORDERS, 'oID='.$row['orders_id'].'&action=edit') ?>"><?php echo (!empty($row['facture_ref'])? $row['facture_ref'] : $row['facture_id'] ) ?></strong></td>
<td>
<?php if(( $filepath=$datadocs->GetDoc('invoice', $row['orders_id'] )) && file_exists($filepath)): ?>
<a href="<?php echo tep_href_link('document.php', 'mod=invoice&id='. $row['orders_id']) ?>"><?php echo basename($filepath) ?></a>
Modified: trunk/catalog/admin/includes/widget/orderLastservice.php
===================================================================
--- trunk/catalog/admin/includes/widget/orderLastservice.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/widget/orderLastservice.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 02/03/2012, 20:02
+ @version 2.1.2
+ @date 04/07/2013, 10:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -30,7 +30,7 @@
</tr>
<?php foreach($_query->fetchAllAssoc() as $row) : ?>
<tr>
- <td class="tcenter"><strong><a href="<?php echo tep_href_link('services.php', 'oID='.$row['service_id'].'&action=edit') ?>"><?php echo $row['service_id'] ?></strong></td>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link('services.php', 'oID='.$row['service_id'].'&action=edit') ?>"><?php echo (!empty($row['service_ref']) ?$row['service_ref'] :$row['service_id'] ) ?></strong></td>
<td style="width:200px;"><?php echo tep_customers_row_action($row['customers_id'], array()) ?></td>
<td><?php echo tep_date_short($row['date_added']) ?></td>
<td class="tcenter"><?php echo tep_date_short($row['date_start']) ?></td>
Modified: trunk/catalog/admin/includes/widget/orderLastshipp.php
===================================================================
--- trunk/catalog/admin/includes/widget/orderLastshipp.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/admin/includes/widget/orderLastshipp.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 02/03/2012, 20:02
+ @version 2.1.2
+ @date 04/07/2013, 10:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -30,7 +30,7 @@
</tr>
<?php foreach($_query->fetchAllAssoc() as $row) : ?>
<tr>
- <td class="tcenter"><strong><a href="<?php echo tep_href_link('shipping.php', 'oID='.$row['shipping_id'].'&action=edit') ?>"><?php echo $row['shipping_id'] ?></strong></td>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link('shipping.php', 'oID='.$row['shipping_id'].'&action=edit') ?>"><?php echo (!empty($row['shipping_ref']) ?$row['shipping_ref'] :$row['shipping_id'] ) ?></strong></td>
<td>
<?php if(( $filepath=$datadocs->GetDoc('delivery', $row['shipping_id'] )) && file_exists($filepath)): ?>
<a href="<?php echo tep_href_link('document.php', 'mod=delivery&id='. $row['shipping_id']) ?>"><?php echo basename($filepath) ?></a>
Modified: trunk/catalog/common/classes/HistoryMail.php
===================================================================
--- trunk/catalog/common/classes/HistoryMail.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/common/classes/HistoryMail.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -69,7 +69,7 @@
/**
- @brief
+ @brief
*/
public function ListUserDir($cid){
self::getInstance();
@@ -88,7 +88,7 @@
/**
- @brief
+ @brief
*/
public function AddMail($cid, $to, $toadd, $from, $fromadd , $subject,$content){
self::getInstance();
Added: trunk/catalog/common/classes/NumRef.php
===================================================================
--- trunk/catalog/common/classes/NumRef.php (rev 0)
+++ trunk/catalog/common/classes/NumRef.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -0,0 +1,75 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 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.2
+ @date 04/07/2013, 17:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class NumRef
+ @brief USe in FO & BO
+
+ generate and manipulate reference (order/bill/shipping)
+*/
+
+
+class NumRef {
+
+ /**
+ @var type : orders/facture/shipping
+ */
+ protected $type;
+ /**
+ @var object child module numerotation
+ */
+ protected static $child;
+
+
+ function __construct($type){
+ $this->type = $type;
+
+
+ $class= constant('USE_MODELE_NUMREF_'.strtoupper($this->type));
+
+ if(empty($class))
+ return false;
+ // if module modele exists load
+ require_once(DIR_FS_CATALOG . DIR_WS_COMMON . 'modules/core/numref/'. $this->type.'/'.$class.'.php');
+ $model = ucwords($class) ;
+
+ self::$child = new $model();
+ }
+
+
+
+ /** \brief Renvoi un exemple de numerotation
+ * \return string Example
+ */
+ function getExample()
+ {
+ return self::$child->getExample();
+ }
+
+
+ /** \brief Test si les numeros deja en vigueur dans la base ne provoquent pas de
+ * de conflits qui empechera cette numerotation de fonctionner.
+ * \return boolean false si conflit, true si ok
+ */
+ function canBeActivated()
+ {
+ return ( _cst_bool('USE_LOCAL_GENERAT_ORDER_REF') ? self::$child->canBeActivated() : false );
+ }
+
+ /**
+ \brief Return next value
+ */
+ public static function GetNewNumRef($objsoc,$commande){
+ return ( _cst_bool('USE_LOCAL_GENERAT_ORDER_REF') ? self::$child->getNextValue($objsoc,$commande) : '' );
+ }
+
+}
+
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/common/classes/osCSS_pdf.php
===================================================================
--- trunk/catalog/common/classes/osCSS_pdf.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/common/classes/osCSS_pdf.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -41,7 +41,7 @@
require_once(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES.'fpdf.php');
require_once(DIR_FS_CATALOG.DIR_WS_COMMON_FUNCTIONS.'pdf_output.php');
- // if module modele exists load
+ // if module modele exists load
include_once(DIR_FS_ROOT_DOCS . 'modeles/pdf/'. USE_MODELE_PDF.'/'.USE_MODELE_PDF.'.php');
define('LOGO_SHOP_FOR_PRINT',DIR_FS_ROOT_DOCS. str_replace('//','/',STORE_LOGO_PRINT) );
@@ -67,7 +67,7 @@
global $oscss,$language;
/// BO
- if(is_object($oscss))
+ if(is_object($oscss))
$oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modeles/pdf/'.USE_MODELE_PDF.'/'.USE_MODELE_PDF.'.txt');
/// FO
@@ -134,7 +134,7 @@
*/
public static function get_module($pull_down=true){
global $messageStack;
- if (!is_dir(BATCH_PRINT_INC))
+ if (!is_dir(BATCH_PRINT_INC))
$messageStack->add_session(sprintf(__("error problem opening directory %s "),BATCH_PRINT_INC), 'error');
$file_type_array = array();
Modified: trunk/catalog/common/modules/core/email/history_internal.php
===================================================================
--- trunk/catalog/common/modules/core/email/history_internal.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/common/modules/core/email/history_internal.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -35,28 +35,28 @@
*/
public static function AddMail($cid, $subject, $to, $toadd, $from, $fromadd , $content){
- /// init DatasFiles for creat all base dir
+ /// init DatasFiles for creat all base dir
$DF = new DatasFiles;
// obtain path for current user (based on id user)
$file=$DF->GetDoc(self::$typedir ,$cid);
- // name file
+ // name file
// MAIL-yyyymmdd.hhiiss.(I|U).base64 subject
$mailfilename = $file.'.'.'I'.'.'.self::base64_url_encode($subject);
-// var_dump($cid, $subject, $to, $toadd, $from, $fromadd , $content);
- // create fiel mail
+
+ // create fiel mail
$res = file_put_contents($mailfilename, "From: ".$to." <".$toadd.">
To: ".$from ." <".$fromadd.">
- Subject: =?UTF-8?Q?".utf8_decode($subject)."?=
- Date: ".date(DATE_RFC822)."\r\n".
+ Subject: =?UTF-8?Q?".utf8_decode($subject)."?=
+ Date: ".date(DATE_RFC822)."\r\n".
"Message-ID: <".md5($content)."@".str_replace(' ','-',STORE_NAME).">
User-Agent: osCSS-2
MIME-Version: 1.0
Content-Type: text/plain; charset=\"UTF-8\" \r\n
".$content."\r\n"."\r\n");
-// var_dump($mailfilename);
+
return $res;
}
@@ -67,7 +67,7 @@
public function ListUserMail($cid){
$result = array();
- // appels des emails
+ // appels des emails
$DF = new DatasFiles;
$file=$DF->GetDoc(self::$typedir,$cid);
@@ -89,7 +89,6 @@
$n->title = $subject;
$n->linkdoc = ' <a class="linkdoc" href="'.tep_href_link(FILENAME_MAIL, 'action=view&cID='.$cid.'&ID='.urlencode($row)).'">'.$subject.'</a> ';
-
$result[strtotime($date)]=$n;
}
}
@@ -125,7 +124,7 @@
$mInfo->content = $tmp2[1];
- return $mInfo;
+ return $mInfo;
}
Added: trunk/catalog/common/modules/core/numref/bills/sakura.php
===================================================================
--- trunk/catalog/common/modules/core/numref/bills/sakura.php (rev 0)
+++ trunk/catalog/common/modules/core/numref/bills/sakura.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -0,0 +1,102 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 Dolibarr
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 03/07/2013, 17:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class Sakura
+ @brief Module numerotation orders
+*/
+
+
+class Sakura {
+
+ /**
+ */
+ protected $prefix = 'FA';
+
+
+ /** \brief Renvoi un exemple de numerotation
+ * \return string Example
+ */
+ function getExample()
+ {
+ return $this->prefix."-0501-0001";
+ }
+
+
+ /** \brief Test si les numeros deje en vigueur dans la base ne provoquent pas de
+ * de conflits qui empechera cette numerotation de fonctionner.
+ * \return boolean false si conflit, true si ok
+ */
+ function canBeActivated()
+ {
+ $DB=Database::getInstance();
+
+ $coyymm=''; $max='';
+
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref LIKE '".$this->prefix."____-%'";
+
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $row = $resql->fetchAssoc();
+ if ($row) {
+ $coyymm = substr($arr['max'],0,6);
+ $max=$arr['max'];
+ }
+ }
+ if ($coyymm && ! preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i',$coyymm))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /** \brief Return next value
+ * \param objsoc Objet third party
+ * \param commande Object order
+ * \return string Value if OK, 0 if KO
+ */
+ function getNextValue($objsoc,$commande)
+ {
+ $DB=Database::getInstance();
+
+ // D'abord on recupere la valeur max
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref like '".$this->prefix."____-%'";
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $arr = $resql->fetchAssoc();
+ if (is_array($arr)) $max = intval($arr['max']);
+ else $max=0;
+ }
+ else
+ {
+ return -1;
+ }
+
+ $yymm = date('ym');
+ $num = sprintf("%04s",$max+1);
+
+ return $this->prefix."-".$yymm."-".$num;
+ }
+
+
+}
+
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/common/modules/core/numref/orders/poisson.php
===================================================================
--- trunk/catalog/common/modules/core/numref/orders/poisson.php (rev 0)
+++ trunk/catalog/common/modules/core/numref/orders/poisson.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -0,0 +1,102 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 Dolibarr
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 03/07/2013, 17:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class Poisson
+ @brief Module numerotation orders
+*/
+
+
+class Poisson {
+
+ /**
+ */
+ protected $prefix = 'CO';
+
+
+ /** \brief Renvoi un exemple de numerotation
+ * \return string Example
+ */
+ function getExample()
+ {
+ return $this->prefix."-0501-0001";
+ }
+
+
+ /** \brief Test si les numeros deje en vigueur dans la base ne provoquent pas de
+ * de conflits qui empechera cette numerotation de fonctionner.
+ * \return boolean false si conflit, true si ok
+ */
+ function canBeActivated()
+ {
+ $DB=Database::getInstance();
+
+ $coyymm=''; $max='';
+
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref LIKE '".$this->prefix."____-%'";
+
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $row = $resql->fetchAssoc();
+ if ($row) {
+ $coyymm = substr($arr['max'],0,6);
+ $max=$arr['max'];
+ }
+ }
+ if ($coyymm && ! preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i',$coyymm))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /** \brief Return next value
+ * \param objsoc Objet third party
+ * \param commande Object order
+ * \return string Value if OK, 0 if KO
+ */
+ function getNextValue($objsoc,$commande)
+ {
+ $DB=Database::getInstance();
+
+ // D'abord on recupere la valeur max
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref like '".$this->prefix."____-%'";
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $arr = $resql->fetchAssoc();
+ if (is_array($arr)) $max = intval($arr['max']);
+ else $max=0;
+ }
+ else
+ {
+ return -1;
+ }
+
+ $yymm = date('ym');
+ $num = sprintf("%04s",$max+1);
+
+ return $this->prefix."-".$yymm."-".$num;
+ }
+
+
+}
+
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/common/modules/core/numref/services/moegi.php
===================================================================
--- trunk/catalog/common/modules/core/numref/services/moegi.php (rev 0)
+++ trunk/catalog/common/modules/core/numref/services/moegi.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -0,0 +1,102 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 Dolibarr
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 03/07/2013, 17:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class Poisson
+ @brief Module numerotation shipping
+*/
+
+
+class Moegi {
+
+ /**
+ */
+ protected $prefix = 'CT';
+
+
+ /** \brief Renvoi un exemple de numerotation
+ * \return string Example
+ */
+ function getExample()
+ {
+ return $this->prefix."-0501-0001";
+ }
+
+
+ /** \brief Test si les numeros deje en vigueur dans la base ne provoquent pas de
+ * de conflits qui empechera cette numerotation de fonctionner.
+ * \return boolean false si conflit, true si ok
+ */
+ function canBeActivated()
+ {
+ $DB=Database::getInstance();
+
+ $coyymm=''; $max='';
+
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref LIKE '".$this->prefix."____-%'";
+
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $row = $resql->fetchAssoc();
+ if ($row) {
+ $coyymm = substr($arr['max'],0,6);
+ $max=$arr['max'];
+ }
+ }
+ if ($coyymm && ! preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i',$coyymm))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /** \brief Return next value
+ * \param objsoc Objet third party
+ * \param commande Object order
+ * \return string Value if OK, 0 if KO
+ */
+ function getNextValue($objsoc,$commande)
+ {
+ $DB=Database::getInstance();
+
+ // D'abord on recupere la valeur max
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref like '".$this->prefix."____-%'";
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $arr = $resql->fetchAssoc();
+ if (is_array($arr)) $max = intval($arr['max']);
+ else $max=0;
+ }
+ else
+ {
+ return -1;
+ }
+
+ $yymm = date('ym');
+ $num = sprintf("%04s",$max+1);
+
+ return $this->prefix."-".$yymm."-".$num;
+ }
+
+
+}
+
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/common/modules/core/numref/shipping/shikamaru.php
===================================================================
--- trunk/catalog/common/modules/core/numref/shipping/shikamaru.php (rev 0)
+++ trunk/catalog/common/modules/core/numref/shipping/shikamaru.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -0,0 +1,102 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 Dolibarr
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 03/07/2013, 17:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class Poisson
+ @brief Module numerotation shipping
+*/
+
+
+class Shikamaru {
+
+ /**
+ */
+ protected $prefix = 'EX';
+
+
+ /** \brief Renvoi un exemple de numerotation
+ * \return string Example
+ */
+ function getExample()
+ {
+ return $this->prefix."-0501-0001";
+ }
+
+
+ /** \brief Test si les numeros deje en vigueur dans la base ne provoquent pas de
+ * de conflits qui empechera cette numerotation de fonctionner.
+ * \return boolean false si conflit, true si ok
+ */
+ function canBeActivated()
+ {
+ $DB=Database::getInstance();
+
+ $coyymm=''; $max='';
+
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref LIKE '".$this->prefix."____-%'";
+
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $row = $resql->fetchAssoc();
+ if ($row) {
+ $coyymm = substr($arr['max'],0,6);
+ $max=$arr['max'];
+ }
+ }
+ if ($coyymm && ! preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i',$coyymm))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /** \brief Return next value
+ * \param objsoc Objet third party
+ * \param commande Object order
+ * \return string Value if OK, 0 if KO
+ */
+ function getNextValue($objsoc,$commande)
+ {
+ $DB=Database::getInstance();
+
+ // D'abord on recupere la valeur max
+ $posindice=8;
+ $sql = "SELECT MAX(SUBSTRING(orders_ref FROM ".$posindice.")) as max";
+ $sql.= " FROM ".TABLE_ORDERS." ";
+ $sql.= " WHERE orders_ref like '".$this->prefix."____-%'";
+
+ $resql=$DB->query($sql);
+ if ($resql)
+ {
+ $arr = $resql->fetchAssoc();
+ if (is_array($arr)) $max = intval($arr['max']);
+ else $max=0;
+ }
+ else
+ {
+ return -1;
+ }
+
+ $yymm = date('ym');
+ $num = sprintf("%04s",$max+1);
+
+ return $this->prefix."-".$yymm."-".$num;
+ }
+
+
+}
+
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/includes/classes/checkout_process.php
===================================================================
--- trunk/catalog/includes/classes/checkout_process.php 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/includes/classes/checkout_process.php 2013-07-04 14:46:51 UTC (rev 4773)
@@ -481,7 +481,7 @@
$order_query = $DB->query("select orders_prefix, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, ip_address, class_payment, class_shipping from " . TABLE_HOLDING_ORDERS . " where orders_id = '" . (int)$pre_order_id . "'");
$order = $order_query->fetchAssoc();
- // NEw Ref
+ // New Ref
$numref= new NumRef('orders');
$ref = $numref->GetNewNumRef();
@@ -670,8 +670,22 @@
$message_final=tep_post_prepare_email('checkout_process.tpl',$language,$myarray);
+
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $message_final, STORE_OWNER, EMAIL_FROM);
+ //save mail in email docs
+ $HM2 = HistoryMail::getInstance();
+ $HM2->AddMail(
+ $order->customer['id'],
+ $order->customer['firstname'].' '.$order->customer['lastname'] ,
+ $order->customer['email_address'],
+ STORE_OWNER,
+ EMAIL_FROM ,
+ EMAIL_TEXT_SUBJECT,
+ $message_final['html']
+ );
+
+
/// admin notif
notification::notifInMess('checkout_process','copy '.EMAIL_TEXT_SUBJECT,$message_final,'customers_id='.$order->customer['id']);
@@ -738,18 +752,15 @@
'total_weight'=>$order->info['total_weight']);
-
-
if(empty($update))
- tep_db_perform(self::$tables['ORDERS'], $sql_data_array);
+ $r= tep_db_perform(self::$tables['ORDERS'], $sql_data_array);
else
- tep_db_perform(self::$tables['ORDERS'], $sql_data_array, 'update', $update);
+ $r =tep_db_perform(self::$tables['ORDERS'], $sql_data_array, 'update', $update);
- $cs_s=tep_db_query("select orders_id from " . self::$tables['ORDERS'] . " where customers_id='".$customer_id."' and date_purchased='".$date_purchased."'");
- $cs=tep_db_fetch_array($cs_s);
- $_SESSION['the_order_id'] =$this->the_order_id=$insert_id=$cs['orders_id'];
+ $_SESSION['the_order_id'] =$this->the_order_id=$insert_id= tep_db_insert_id($r);
+
return $this->the_order_id;
}
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2013-07-04 14:46:51 UTC (rev 4773)
@@ -356,10 +356,12 @@
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, 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, 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');
-
-
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_ORDERS_S', 'USE_MODELE_NUMREF_ORDERS', 'poisson', 'USE_MODELE_NUMREF_ORDERS_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'orders\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_BILLS_S', 'USE_MODELE_NUMREF_BILLS', 'sakura', 'USE_MODELE_NUMREF_BILLS_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'bills\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SHIPPING_S', 'USE_MODELE_NUMREF_SHIPPING', 'shikamaru', 'USE_MODELE_NUMREF_SHIPPING_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'shipping\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SERVICE_S', 'USE_MODELE_NUMREF_SERVICE', '', 'USE_MODELE_NUMREF_SERVICE_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'services\',');
COMMIT;
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_services.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_services.sql 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_services.sql 2013-07-04 14:46:51 UTC (rev 4773)
@@ -19,6 +19,7 @@
CREATE TABLE IF NOT EXISTS osc_services (
row_id int(11) NOT NULL AUTO_INCREMENT,
+ service_ref VARCHAR( 32 ) NULL DEFAULT NULL,
customers_id int(11) NOT NULL,
orders_id int(11) NOT NULL,
orders_products_id int(11) NOT NULL,
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_shipping.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_shipping.sql 2013-07-04 10:10:50 UTC (rev 4772)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_shipping.sql 2013-07-04 14:46:51 UTC (rev 4773)
@@ -18,6 +18,7 @@
--
CREATE TABLE IF NOT EXISTS osc_shipping (
row_id int(11) NOT NULL AUTO_INCREMENT,
+ shipping_ref VARCHAR( 32 ) NULL DEFAULT NULL,
orders_id int(11) NOT NULL,
method varchar(64) NOT NULL,
tracking varchar(128) NOT NULL,
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_services.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_services.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_services.sql 2013-07-04 14:46:51 UTC (rev 4773)
@@ -0,0 +1,14 @@
+--+######################################################################--+
+--| 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_services ADD service_ref VARCHAR( 32 ) NULL DEFAULT NULL AFTER row_id ;
Added: trunk/catalog/install/includ...
[truncated message content] |
|
From: <os...@us...> - 2013-07-04 10:10:54
|
Revision: 4772
http://sourceforge.net/p/oscss/svn/4772
Author: oscim
Date: 2013-07-04 10:10:50 +0000 (Thu, 04 Jul 2013)
Log Message:
-----------
upgrade num for orders, bills and shipping
adjust all file for display numref
adjust db
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
trunk/catalog/admin/includes/modules/account/history.php
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/widget/orderLast.php
trunk/catalog/includes/classes/checkout_process.php
trunk/catalog/includes/modules/account/history.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history_info.php
trunk/catalog/install/includes/sql/mysql/tables/osc_orders.sql
trunk/catalog/templates/defaut/includes/content/account_history_info.php
trunk/catalog/templates/defaut/includes/gabarit/history/account.display_view.page.gab
trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders.sql
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-04 10:10:50 UTC (rev 4772)
@@ -4,15 +4,14 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/03/2012, 11:35
+ @date 04/04/2013, 11:35
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
global $price, $current_theme;
-// print_r(orders::$order);
?>
-<h3><?php echo sprintf(__('@orders heading edit num %s ref %s'),orders::$order->info['orders_id'] , orders::$order->info['orders_prefix'] ) ; ?></h3>
+<h3><?php echo sprintf(__('@orders heading edit num %s ref %s'),orders::$order->info['orders_id'] , orders::$order->info['orders_ref'] ) ; ?></h3>
<div class="box_uniq main-orders">
@@ -454,7 +453,7 @@
<?php
/**
- Liste and manage shipping
+ Liste and manage shipping
*/
?>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2013-07-04 10:10:50 UTC (rev 4772)
@@ -44,11 +44,14 @@
$lang['orders table heading facture_id']="Fact." ;
$lang['orders table heading class_payment']="Class. pay" ;
$lang['orders table heading class_shipping']="Class. ship" ;
+ $lang['orders table heading order ref']="Réf." ;
+ $lang['orders table heading facture ref']="Fact.Réf." ;
-
/* Edit */
/* heading tabs */
+ $lang['@orders heading edit num %s ref %s']="Edition Commande n°%s - ref:%s" ;
+
$lang['tab orders briefs']="Details" ;
$lang['tab orders details']="Commande" ;
$lang['tab orders history']="Suivi" ;
@@ -82,7 +85,7 @@
$lang['entry telephone number']="Tél. : " ;
$lang['entry email address']="Email : " ;
$lang['entry shipping address actived']="Utilisation d'une adresse de livraison" ;
-
+
$lang['table heading comments']="Commentaires" ;
/* Section tabs 2 */
@@ -115,8 +118,8 @@
$lang['label shipping tracking number']="Numéro d'expedition : " ;
$lang['label shipping tracking url']="Url de suivi : " ;
$lang['@orders shipping tracking url no found for this module']="Pas de service de suivi " ;
-
+
$lang['@orders txt expedition process update']="Commande transmise au transporteur " ;
/* Section tabs service */
Modified: trunk/catalog/admin/includes/modules/account/history.php
===================================================================
--- trunk/catalog/admin/includes/modules/account/history.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/admin/includes/modules/account/history.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -36,8 +36,8 @@
/**
@brief Load , adjust and define var environement GetConf master module
- @param $opt array
- type => '' string name type for define return
+ @param $opt array
+ type => '' string name type for define return
languages_id => '' int
*/
public function GetConf($opt){
@@ -68,7 +68,7 @@
/**
@brief format db value for this allfields
@param $key string name key
- @param $item array
+ @param $item array
*/
public function formatdbvalue($key,$item){
global $languages_id;
@@ -118,14 +118,14 @@
$DB=Database::getInstance();
- $_query = $DB->query($sql="SELECT o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC");
+ $_query = $DB->query($sql="SELECT o.orders_id,o.orders_ref, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC");
foreach($_query->fetchAllAssoc() as $row){
$n = new stdClass();
$n->date = tep_datetime_short($row['date_purchased']);
$n->type = 'order';
- $n->text = sprintf(__('history new commande n %s'), ' <a class="linkdoc" href="'.tep_href_link(FILENAME_ORDERS, 'action=edit&oID='.$row['orders_id']).'">'.$row['orders_id'].'</a> ');
+ $n->text = sprintf(__('history new commande n %s'), ' <a class="linkdoc" href="'.tep_href_link(FILENAME_ORDERS, 'action=edit&oID='.$row['orders_id']).'">'.(($row['orders_ref'])? $row['orders_ref'] : $row['orders_id']).'</a> ');
$result[strtotime($row['date_purchased'])]=$n;
}
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -171,7 +171,14 @@
// 'class'=>'tcenter',
// 'default'=>true,
// ),
- // 'o.orders_prefix' => __('orders table heading order prefix'),
+ 'o.orders_ref ' => array(
+ 'sort'=>true,
+ 'alias'=>'ref',
+ 'text'=>__('orders table heading order ref'),
+ 'width'=>'5%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
'o.customers_id' => array(
'sort'=>true,
'text'=> __('orders table heading customers'),
@@ -250,6 +257,14 @@
'class'=>'tcenter',
// 'default'=>true,
),
+ 'o.facture_ref' => array(
+ 'sort'=>true,
+ 'alias'=>'facture_ref',
+ 'text'=> __('orders table heading facture ref'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+// 'default'=>true,
+ ),
'o.class_payment' => array(
'sort'=>true,
// 'alias'=>'orders_status_name',
@@ -594,9 +609,9 @@
$comments= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
foreach($_POST['action_multi'] as $oID )
- if (up_status_order($oID, $status, array('status'=>$status,'comments'=>'', 'notify'=>$notify, 'comments'=> $comments) ) )
+ if (up_status_order($oID, $status, array('status'=>$status,'comments'=>'', 'notify'=>$notify, 'comments'=> $comments) ) )
$res[]=true;
- else
+ else
$res[]=false;
@@ -635,9 +650,9 @@
}
}
- if (!in_array(false,$res))
+ if (!in_array(false,$res))
$messageStack->add_session(__('success order updated'), 'success');
- else
+ else
$messageStack->add_session(__('warning order not updated'), 'warning');
tep_redirect(tep_href_link(self::FILENAME));
@@ -656,7 +671,7 @@
/// Adjust process for status
if($status>0)
$new_st = substr((int)$status,0,1);
- else
+ else
$new_st = $status;
switch($new_st){
@@ -854,7 +869,7 @@
// $myarray['date_start']=date('Y-m-d H:i:s');;
// $myarray['date_end']=date('Y-m-d', strtotime('+'.(int)$optionContract['povc_duration'].' '.(string)$optionContract['povc_unit']));
// $myarray['date_revival']=date('Y-m-d', strtotime('+'.(int)($optionContract['povc_duration']*0.2).' '.(string)$optionContract['povc_unit']));
-//
+//
// }
if(substr($res->date_start,0,4) <'2000')
@@ -1180,7 +1195,7 @@
case 'delete':
case 'edit':
case 'copy_to':
- if(!self::test_oID((int)self::$oID))
+ if(!self::test_oID((int)self::$oID))
break;
case 'new':
self::$order=self::GetDBValue();
@@ -1370,10 +1385,10 @@
$col=count(self::DTheaderTable());
return array(
0 => self::$InitInfo['tfooter']['listing'] ,
- 1 =>array(
+ 1 =>array(
array(
- 'colspan'=>$col,
- 'class'=>'tleft',
+ 'colspan'=>$col,
+ 'class'=>'tleft',
'txt'=>'<span class="fleft">'.__('action multiple') . ' ' . tep_draw_pull_down_menu('status_multi', array_merge(array(array('id' => '', 'text' => __('text action multiple orders'))), orders::$orders_statuses) ) . __('export: ') . tep_draw_pull_down_menu('modeexport', orders::$export->mode ).'</span> <span class="fleft" style="margin-left:50px;"> '. tep_image_submit('button_confirm.gif', IMAGE_CONFIRM, '' ).'</span>' ) )
) ;
}
Modified: trunk/catalog/admin/includes/widget/orderLast.php
===================================================================
--- trunk/catalog/admin/includes/widget/orderLast.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/admin/includes/widget/orderLast.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 0203/2012, 20:02
+ @version 2.1.2
+ @date 04/07/2013, 10:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -45,7 +45,7 @@
</tr>
<?php foreach($_query->fetchAllAssoc() as $row) : ?>
<tr>
- <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_ORDERS, 'oID='.$row['orders_id'].'&action=edit') ?>"><?php echo $row['orders_prefix'].$row['orders_id'] ?></strong></td>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_ORDERS, 'oID='.$row['orders_id'].'&action=edit') ?>"><?php echo (!empty($row['orders_ref'])? $row['orders_ref'] : $row['orders_id'] ) ?></strong></td>
<td class="tcenter">
<?php if(( $filepath=$datadocs->GetDoc('packingslip', $row['orders_id'] )) && file_exists($filepath)): ?>
<a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='. $row['orders_id']) ?>"><?php echo basename($filepath) ?></a>
@@ -71,7 +71,7 @@
</tr>
<?php foreach($_query2->fetchAllAssoc() as $row) : ?>
<tr>
- <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_ORDERS, 'oID='.$row['orders_id'].'&action=edit') ?>"><?php echo $row['orders_prefix'].$row['orders_id'] ?></strong></td>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_ORDERS, 'oID='.$row['orders_id'].'&action=edit') ?>"><?php echo (!empty($row['orders_ref'])? $row['orders_ref'] : $row['orders_id'] ) ?></strong></td>
<td class="tcenter">
<?php if(( $filepath=$datadocs->GetDoc('packingslip', $row['orders_id'] )) && file_exists($filepath)): ?>
<a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='. $row['orders_id']) ?>"><?php echo basename($filepath) ?></a>
Modified: trunk/catalog/includes/classes/checkout_process.php
===================================================================
--- trunk/catalog/includes/classes/checkout_process.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/includes/classes/checkout_process.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 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 02/03/2012, 21:44
+ @version 2.1.2
+ @date 04/07/2013, 10:36
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class checkout_process
@@ -177,7 +177,7 @@
$result[$key]=$this->modules[$key]->$funct($order);
}
}
-
+
return $result;
}
@@ -317,6 +317,7 @@
public function process_exe($order_totals,$order=''){
global $customer_id, $currencies,$order;
+ $error = 0;
$ip = tep_get_ip_address();
$total_weight='';
$total_cost='';
@@ -325,27 +326,37 @@
$order = (!is_object($order)? new order('', ((!self::$mode)? 'holding' : '') ) : $order );
- /**
- 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);
- }
- /**
- Process class
- */
- $this->insert_order_total($order_totals);
+ $DB = Database::getInstance();
- /**
- Process class
- */
- $customer_notification =$this->insert_status_history($order);
+ $DB->beginTransaction();
+ /**
+ Process class
+ */
+ self::$Id=$the_order_id=$insert_id=$this->insert_order($customer_id, $order);
+
+ if($insert_id<=0)
+ $error++;
+
+ /// unqieuemnt held_horder
+ if($error == 0 && !self::$mode) {
+ self::purgeHolding();
+ // self::preventDuplicateholding($the_order_id);
+ }
+ /**
+ Process class
+ */
+ if( ! $this->insert_order_total($order_totals) )
+ $error++;
+
+ /**
+ Process class
+ */
+ $customer_notification =$this->insert_status_history($order);
+
+
/**
Before process module ACA
*/
@@ -438,13 +449,21 @@
Fin pre commande
*/
+ if( $error > 0){
+ $DB->rollbackTransaction();
+ return false;
+ }
+ else{
+ $DB->commitTransaction();
- return array ( 'the_order_id'=>$the_order_id,
- 'customer_notification'=>$customer_notification,
- 'total_weight'=>$total_weight,
- 'total_tax'=>$total_tax,
- 'total_cost'=>$total_cost,
- );
+ return array (
+ 'the_order_id'=>$the_order_id,
+ 'customer_notification'=>$customer_notification,
+ 'total_weight'=>$total_weight,
+ 'total_tax'=>$total_tax,
+ 'total_cost'=>$total_cost,
+ );
+ }
}
@@ -462,8 +481,17 @@
$order_query = $DB->query("select orders_prefix, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, ip_address, class_payment, class_shipping from " . TABLE_HOLDING_ORDERS . " where orders_id = '" . (int)$pre_order_id . "'");
$order = $order_query->fetchAssoc();
- $sql_data_array = array('holding_origin_id'=>(int)$pre_order_id,
- 'orders_prefix' => tep_db_input($order['orders_prefix']),
+ // NEw Ref
+ $numref= new NumRef('orders');
+ $ref = $numref->GetNewNumRef();
+
+ $this->the_order_formated=$_SESSION['the_order_formated']=$ref;
+
+ $sql_data_array = array(
+ 'holding_origin_id'=>(int)$pre_order_id,
+ 'orders_type' => 0,
+ 'orders_ref' => tep_db_input($ref),
+ 'orders_prefix' => tep_db_input($order['orders_prefix']), // obsolete
'currency' => tep_db_input($order['currency']),
'customers_id' => (int)$order['customers_id'],
'currency_value' => tep_db_input($order['currency_value']),
@@ -659,10 +687,11 @@
*/
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,
- 'orders_prefix' => $format_prefix,
+
+
+ $sql_data_array = array(
+ 'customers_id' => $customer_id,
+ 'orders_prefix' => '', // obsolete
'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
'customers_company' => (string)$order->customer['company'],
'customers_street_address' => (string)$order->customer['street_address'],
@@ -700,6 +729,7 @@
'cc_owner' => $order->info['cc_owner'],
'cc_number' => substr_replace($order->info['cc_number'],"XXXXXXXX",4,8),
'cc_expires' => $order->info['cc_expires'],
+
'date_purchased' => $date_purchased,
'orders_status' => (int)$order->info['order_status'],
'currency' => (string)$order->info['currency'],
@@ -707,26 +737,19 @@
'ip_address' => tep_get_ip_address(),
'total_weight'=>$order->info['total_weight']);
- if(empty($update)) tep_db_perform(self::$tables['ORDERS'], $sql_data_array);
- else tep_db_perform(self::$tables['ORDERS'], $sql_data_array, 'update', $update);
+
+
+ if(empty($update))
+ tep_db_perform(self::$tables['ORDERS'], $sql_data_array);
+ else
+ tep_db_perform(self::$tables['ORDERS'], $sql_data_array, 'update', $update);
+
$cs_s=tep_db_query("select orders_id from " . self::$tables['ORDERS'] . " where customers_id='".$customer_id."' and date_purchased='".$date_purchased."'");
$cs=tep_db_fetch_array($cs_s);
$_SESSION['the_order_id'] =$this->the_order_id=$insert_id=$cs['orders_id'];
- /* Ajout prefix de numero de commande */
- if(defined('ORDERS_NUMBER_PREFIX') && ORDERS_NUMBER_PREFIX !='' ){
- preg_match('#([a-zA-Z]*)(.{0,1})([0-9])#',ltrim(ORDERS_NUMBER_PREFIX),$reg);
- $the_order_final=date($reg[1]).$reg[2].str_pad('',(int)($reg[3]-strlen($insert_id)),"0" ,STR_PAD_LEFT);
- $sql_data_array = array( 'orders_prefix' =>$the_order_final );
- tep_db_perform(self::$tables['ORDERS'], $sql_data_array, 'update', " orders_id='".$insert_id."' ");
- $the_order_final .=$insert_id;
- $this->the_order_formated=$_SESSION['the_order_formated']=$the_order_final;
- }
-
-
-
return $this->the_order_id;
}
@@ -738,6 +761,7 @@
* @return no
*/
private function insert_order_total($order_totals){
+ $error = array();
for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $this->the_order_id,
'title' => tep_db_input($order_totals[$i]['title']),
@@ -745,8 +769,13 @@
'value' => tep_db_input($order_totals[$i]['value']),
'class' => tep_db_input($order_totals[$i]['code']),
'sort_order' => (int)$order_totals[$i]['sort_order']);
- tep_db_perform(self::$tables['TOTAL'], $sql_data_array);
+ $error[] = tep_db_perform(self::$tables['TOTAL'], $sql_data_array);
}
+
+ if(in_array(false, $error))
+ return false;
+ else
+ return true;
}
/**
Modified: trunk/catalog/includes/modules/account/history.php
===================================================================
--- trunk/catalog/includes/modules/account/history.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/includes/modules/account/history.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -13,7 +13,7 @@
*/
class history
- extends
+ extends
AbstractAccount
implements
InterfaceModule
@@ -29,7 +29,7 @@
*/
public static $history_split;
/**
- @var string action
+ @var string action
*/
public static $action ='';
@@ -49,13 +49,13 @@
$this->sql_data_array=array();
$this->cInfo = new objectInfo(array());
- // adjust action
+ // adjust action
if(isset($_GET['action']))
self::$action = tep_db_prepare_input($_GET['action']);
elseif(isset($_GET['aca_action']))
self::$action = tep_db_prepare_input($_GET['aca_action']);
-
+
}
public function get_header($action=''){}
@@ -81,8 +81,8 @@
}
/**
- @fn after_check_action ($action)
- @brief call after check_action incurrent module
+ @fn after_check_action ($action)
+ @brief call after check_action incurrent module
@return none
*/
public function after_check_action ($action) {
@@ -101,7 +101,7 @@
switch(self::$action){
case 'display_view':
- $sql="SELECT o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC";
+ $sql="SELECT o.orders_id,o.orders_ref, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC";
self::$history_split = new splitPageResults($sql, MAX_DISPLAY_ORDER_HISTORY);
$_query = $DB->query(self::$history_split->sql_query);
@@ -147,7 +147,7 @@
default:
- $orders_query = tep_db_query("select o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id and s.language_id = '" . (int)$languages_id . "' AND status_type='orders' ORDER BY orders_id desc limit 1");
+ $orders_query = tep_db_query("select o.orders_id,o.orders_ref, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id and s.language_id = '" . (int)$languages_id . "' AND status_type='orders' ORDER BY orders_id desc limit 1");
$result = $orders_query->fetchAssoc();
}
@@ -163,7 +163,7 @@
*/
// public function display_view_min_listMyOrders($cID){
// global $page;
-//
+//
// $v['title']=__("history tab");
// $v['href_link']= tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL');
// return array(new objectInfo($v));
@@ -186,7 +186,7 @@
return new objectInfo(array(
'title'=>__("history heading listing"),
- 'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'/'.$this->type.'.'.__FUNCTION__.'.page'),false,true)
+ 'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'/'.$this->type.'.'.__FUNCTION__.'.page'),false,true)
) );
break;
default:
@@ -219,9 +219,9 @@
- /**
- @remarks implements InterfaceModule depend
- if module twin in backoffice, report all content install in the other module
+ /**
+ @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;}
@@ -230,7 +230,7 @@
/**
@fn check()
- @brief test if count all var , and keys is equal
+ @brief test if count all var , and keys is equal
@return boolean true/false
*/
function check() { return false; }
@@ -238,7 +238,7 @@
/**
@fn keys()
- @return array all key configuration define by this module
+ @return array all key configuration define by this module
*/
function keys() {
return array();
@@ -246,13 +246,13 @@
/**
@fn install()
- @brief add all configuration
- @note
+ @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__MODTYPENAME_MAJ_'
- if module twin in backoffice, report all content install in the other module
- - Not use language in DB , but function :__()
- for MODULE_TOTO_ST
+ - Not use language in DB , but function :__()
+ for MODULE_TOTO_ST
var title MODULE_TOTO_ST_S (small description)
var description MODULE_TOTO_ST_L (long description)
*/
@@ -261,9 +261,9 @@
/**
@fn remove()
@brief delete all configuration
- @note
+ @note
- please, pefix all var configuration by 'MODULE_PAYMENT__MODTYPENAME_MAJ_'
- - if module twin in backoffice, report all content remove in the other module
+ - if module twin in backoffice, report all content remove in the other module
*/
function remove() { return false; }
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history_info.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history_info.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history_info.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -18,7 +18,7 @@
<div id="accountHistoryInfo">
- <h3><?php echo sprintf(HEADING_ORDER_NUMBER,$order->info['orders_prefix'].$_GET['order_id']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></h3>
+ <h3><?php echo '#'.(!empty($order->info['orders_ref'])? $order->info['orders_ref'] :$order->info['orders_id'] ) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></h3>
<h4><?php echo HEADING_ORDER_DATE . ' ' . tep_date_long($order->info['date_purchased']); ?></h4>
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_orders.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_orders.sql 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_orders.sql 2013-07-04 10:10:50 UTC (rev 4772)
@@ -15,6 +15,8 @@
drop table if exists osc_orders;
create table osc_orders (
orders_id int(11) not null auto_increment,
+ orders_type INT NOT NULL DEFAULT '0',
+ orders_ref VARCHAR( 32 ) NULL DEFAULT NULL,
orders_prefix varchar(32) null ,
customers_id int(11) default '0' not null ,
customers_name varchar(64) not null ,
@@ -60,6 +62,7 @@
ip_address varchar(15) not null ,
total_weight varchar(5) not null default '0' ,
facture_id int(11) null ,
+ facture_ref VARCHAR( 32 ) NULL,
holding_origin_id INT( 11 ) NULL ,
class_payment VARCHAR( 30 ) NULL ,
class_shipping VARCHAR( 30 ) NULL ,
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders.sql 2013-07-04 10:10:50 UTC (rev 4772)
@@ -0,0 +1,18 @@
+--+######################################################################--+
+--| 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_orders ADD orders_type INT NOT NULL DEFAULT '0' AFTER orders_id ;
+
+ALTER TABLE osc_orders ADD orders_ref VARCHAR( 32 ) NULL DEFAULT NULL AFTER orders_type ;
+
+ALTER TABLE osc_orders ADD facture_ref VARCHAR( 32 ) NULL AFTER facture_id ;
Modified: trunk/catalog/templates/defaut/includes/content/account_history_info.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/account_history_info.php 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/templates/defaut/includes/content/account_history_info.php 2013-07-04 10:10:50 UTC (rev 4772)
@@ -14,7 +14,7 @@
<div id="accountHistoryInfo">
<h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h2>
- <h3><?php echo sprintf(HEADING_ORDER_NUMBER,$order->info['orders_prefix'].$_GET['order_id']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></h3>
+ <h3><?php echo '#'.(!empty($order->info['orders_ref'])? $order->info['orders_ref'] :$order->info['orders_id'] ) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></h3>
<h4><?php echo HEADING_ORDER_DATE . ' ' . tep_date_long($order->info['date_purchased']); ?></h4>
Modified: trunk/catalog/templates/defaut/includes/gabarit/history/account.display_view.page.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/history/account.display_view.page.gab 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/templates/defaut/includes/gabarit/history/account.display_view.page.gab 2013-07-04 10:10:50 UTC (rev 4772)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 16/12/11, 21:42
+ @date 04/07/2013, 22:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief This listing orders for module account/history
@@ -30,7 +30,7 @@
<tbody>
<?php foreach(history::$current as $row): ?>
<tr>
- <td><?php echo $row->orders_prefix.$row->orders_id; ?></td>
+ <td><?php echo (!empty($row->orders_ref)? $row->orders_ref :$row->orders_id ); ?></td>
<td><?php echo $row->orders_status_name; ?></td>
<td><?php echo $row->date_purchased ; ?></td>
<td><?php echo $row->count_products; ?></td>
Modified: trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab 2013-07-03 08:53:38 UTC (rev 4771)
+++ trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab 2013-07-04 10:10:50 UTC (rev 4772)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 15/04/2012, 22:44
+ @date 04/07/2013, 22:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*\dir includes/gabarit/
@@ -19,7 +19,7 @@
<div class="contentBox overview">
<h4><?php echo OVERVIEW_PREVIOUS_ORDERS ; ?></h4>
<ul>
- <li><?php echo '#' . history::$current['orders_prefix'].history::$current['orders_id']; ?> <?php echo tep_date_short(history::$current['date_purchased']); ?> <?php echo history::$current['order_total']; ?> <?php echo '<a class="navBtMini" href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history_info&order_id=' . history::$current['orders_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_VIEW . '</a>'; ?></li>
+ <li><?php echo '#' . (!empty(history::$current['orders_ref'])? history::$current['orders_ref'] :history::$current['orders_id'] ); ?> <?php echo tep_date_short(history::$current['date_purchased']); ?> <?php echo history::$current['order_total']; ?> <?php echo '<a class="navBtMini" href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history_info&order_id=' . history::$current['orders_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_VIEW . '</a>'; ?></li>
<li><?php echo history::$current['orders_status_name']; ?></li>
<li><?php if (tep_not_null(history::$current['delivery_name'])) echo tep_output_string_protected(history::$current['delivery_name']) . ', ' . history::$current['delivery_country'];
else echo tep_output_string_protected(history::$current['billing_name']) . ', ' . history::$current['billing_country']; ?></li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-03 08:53:40
|
Revision: 4771
http://sourceforge.net/p/oscss/svn/4771
Author: oscim
Date: 2013-07-03 08:53:38 +0000 (Wed, 03 Jul 2013)
Log Message:
-----------
Fix call db type customers
Modified Paths:
--------------
trunk/catalog/create_account.php
Modified: trunk/catalog/create_account.php
===================================================================
--- trunk/catalog/create_account.php 2013-07-03 08:52:14 UTC (rev 4770)
+++ trunk/catalog/create_account.php 2013-07-03 08:53:38 UTC (rev 4771)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 18/12/11, 21:44
+ @date 03/007/2013, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*\file
@@ -179,6 +179,12 @@
else
$page->init(basename(__FILE__),$language);
+
+ // calcul all type customers
+ $DB=Database::getInstance();
+ $query = $DB->query("SELECT status_id as id, status_name as text FROM ".TABLE_STATUS." WHERE status_type='customers' AND language_id = '".$languages_id."' AND status_status = 1 " );
+ $array_listtype =$query->fetchAllAssoc();
+
$page->post_init();
$page->javascript->add_framework("ext/jquery/jquery.min.js");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-03 08:52:20
|
Revision: 4770
http://sourceforge.net/p/oscss/svn/4770
Author: oscim
Date: 2013-07-03 08:52:14 +0000 (Wed, 03 Jul 2013)
Log Message:
-----------
Fix check create account forumulaire for js by extra_fields
Fix language fr item no found
add type customers in database
add rox sort in extra fields for customers
Update screenshot and desc for demo public template
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt
trunk/catalog/admin/includes/modules/configuration/modcustextra.php
trunk/catalog/includes/functions/general.php
trunk/catalog/includes/languages/fr_FR/fr_FR.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/thumb.jpg
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_extra_fields.sql
trunk/catalog/templates/defaut/includes/js/create_account.js.php
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_extra_fields.sql
Removed Paths:
-------------
trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafileds.php
Copied: trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php (from rev 4769, trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafileds.php)
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php 2013-07-03 08:52:14 UTC (rev 4770)
@@ -0,0 +1,362 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 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 03/07/2013, 15:46
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+
+*/
+
+
+
+
+class sqlcustomersextrafields
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+
+// if(!isset($option['key'])) return 'key';
+
+ if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
+ if(isset($option['size'])) $sql_data_array['fields_size'] = $option['size'];
+ if(isset($option['sort'])) $sql_data_array['fields_sort'] = $option['sort'];
+ if(isset($option['input_type'])) $sql_data_array['fields_input_type'] = $option['input_type'];
+ if(isset($option['input_value'])) $sql_data_array['fields_input_value'] = $option['input_value'];
+ if(isset($option['required_status'])) $sql_data_array['fields_required_status'] = $option['required_status'];
+ if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
+ if(isset($option['status'])) $sql_data_array['fields_status'] = $option['status'];
+ if(isset($option['required_email'])) $sql_data_array['fields_required_email'] = $option['required_email'];
+ if(isset($option['key'])) $sql_data_array['fields_key'] = $option['key'];
+ if(isset($option['admin'])) $sql_data_array['fields_admin'] = $option['admin'];
+ if(isset($option['special_mod'])) $sql_data_array['fields_special_mod'] = $option['special_mod'];
+ if(isset($option['group_class'])) $sql_data_array['fields_group_class'] = $option['group_class'];
+
+ $res=tep_db_perform(TABLE_EXTRA_FIELDS, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['key']) && !isset($option['id'])) return 'key or id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND fields_id = '".(int)$option['id']."' ";
+ if(isset($option['key'])) $where .="AND fields_key = '".(string)tep_db_input($option['key'])."' ";
+
+// if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
+ if(isset($option['size'])) $sql_data_array['fields_size'] = $option['size'];
+ if(isset($option['sort'])) $sql_data_array['fields_sort'] = $option['sort'];
+ if(isset($option['input_type'])) $sql_data_array['fields_input_type'] = $option['input_type'];
+ if(isset($option['input_value'])) $sql_data_array['fields_input_value'] = $option['input_value'];
+ if(isset($option['required_status'])) $sql_data_array['fields_required_status'] = $option['required_status'];
+ if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
+ if(isset($option['status'])) $sql_data_array['fields_status'] = $option['status'];
+ if(isset($option['required_email'])) $sql_data_array['fields_required_email'] = $option['required_email'];
+// if(isset($option['key'])) $sql_data_array['fields_key'] = $option['key'];
+ if(isset($option['admin'])) $sql_data_array['fields_admin'] = $option['admin'];
+ if(isset($option['special_mod'])) $sql_data_array['fields_special_mod'] = $option['special_mod'];
+ if(isset($option['group_class'])) $sql_data_array['fields_group_class'] = $option['group_class'];
+
+
+
+
+
+ $res=tep_db_perform(TABLE_EXTRA_FIELDS, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
+ if(isset($option['key'])) $sql .="AND fields_key = '".(string)tep_db_input($option['key'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_EXTRA_FIELDS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
+ if(isset($option['key'])) $sql .="AND fields_key = '".(string)tep_db_input($option['key'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_EXTRA_FIELDS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'fields_') ===0)
+ $key=substr($key,7);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen($shortkey=false){
+
+ $par = array(
+ 'fields_id' =>-1,
+ 'fields_size' =>'',
+ 'fields_sort' =>5,
+ 'fields_input_type' =>'',
+ 'fields_input_value' =>'',
+ 'fields_required_status'=>0,
+ 'fields_name' =>'',
+ 'fields_status' =>0,
+ 'fields_required_email' =>0,
+ 'fields_key' =>'',
+ 'fields_admin' =>0,
+ 'fields_special_mod' =>'',
+ 'fields_group_class' =>''
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+}
+
+
+
+
+class sqlcustomersextrafieldslabels
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+
+ if(!isset($option['languages_id'])) return 'languages_id';
+
+ if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
+ if(isset($option['languages_id'])) $sql_data_array['languages_id'] = $option['languages_id'];
+ if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
+ if(isset($option['format'])) $sql_data_array['fields_format'] = $option['format'];
+ if(isset($option['format'])) $sql_data_array['fields_format'] = $option['format'];
+ if(isset($option['unity_type'])) $sql_data_array['fields_unity_type_id'] = $option['unity_type'];
+ if(isset($option['unity'])) $sql_data_array['fields_unity_id'] = $option['unity'];
+
+ $res=tep_db_perform(TABLE_EXTRA_FIELDS_LABELS, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['languages_id']) && !isset($option['id'])) return 'languages_id or id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND fields_id = '".(int)$option['id']."' ";
+ if(isset($option['languages_id'])) $where .="AND languages_id = '".(string)tep_db_input($option['languages_id'])."' ";
+
+// if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
+// if(isset($option['languages_id'])) $sql_data_array['languages_id'] = $option['languages_id'];
+ if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
+ if(isset($option['format'])) $sql_data_array['fields_format'] = $option['format'];
+ if(isset($option['unity_type'])) $sql_data_array['fields_unity_type_id'] = $option['unity_type'];
+ if(isset($option['unity'])) $sql_data_array['fields_unity_id'] = $option['unity'];
+
+ $res=tep_db_perform(TABLE_EXTRA_FIELDS_LABELS, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(string)tep_db_input($option['languages_id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_EXTRA_FIELDS_LABELS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(string)tep_db_input($option['languages_id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_EXTRA_FIELDS_LABELS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'fields_') ===0)
+ $key=substr($key,7);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen($shortkey=false){
+
+ $par = array(
+ 'fields_id' =>-1,
+ 'languages_id' =>0,
+ 'fields_name' =>'',
+ 'fields_format' =>'%label% %input% %unit%',
+ 'fields_unity_type_id' =>0,
+ 'fields_unity_id' =>0,
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+}
+?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafileds.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafileds.php 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafileds.php 2013-07-03 08:52:14 UTC (rev 4770)
@@ -1,359 +0,0 @@
-<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/09/11, 20:11
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-
-*/
-
-
-
-
-class sqlcustomersextrafileds
- implements ModSqlDataDriver{
-
-
- /**
- @brief create new ligne in table configuration
- */
- public static function create($option){
-
-// if(!isset($option['key'])) return 'key';
-
- if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
- if(isset($option['size'])) $sql_data_array['fields_size'] = $option['size'];
- if(isset($option['input_type'])) $sql_data_array['fields_input_type'] = $option['input_type'];
- if(isset($option['input_value'])) $sql_data_array['fields_input_value'] = $option['input_value'];
- if(isset($option['required_status'])) $sql_data_array['fields_required_status'] = $option['required_status'];
- if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
- if(isset($option['status'])) $sql_data_array['fields_status'] = $option['status'];
- if(isset($option['required_email'])) $sql_data_array['fields_required_email'] = $option['required_email'];
- if(isset($option['key'])) $sql_data_array['fields_key'] = $option['key'];
- if(isset($option['admin'])) $sql_data_array['fields_admin'] = $option['admin'];
- if(isset($option['special_mod'])) $sql_data_array['fields_special_mod'] = $option['special_mod'];
- if(isset($option['group_class'])) $sql_data_array['fields_group_class'] = $option['group_class'];
-
- $res=tep_db_perform(TABLE_EXTRA_FIELDS, $sql_data_array);
-
- if(!$res)
- return $res;
- else
- return $res->__get('insertId');
- }
-
-
-
- /**
- @brief update ligne in table configuration
- */
- public static function update($option){
-
- if(!isset($option['key']) && !isset($option['id'])) return 'key or id';
-
- $where ='';
- if(isset($option['id'])) $where .="AND fields_id = '".(int)$option['id']."' ";
- if(isset($option['key'])) $where .="AND fields_key = '".(string)tep_db_input($option['key'])."' ";
-
-// if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
- if(isset($option['size'])) $sql_data_array['fields_size'] = $option['size'];
- if(isset($option['input_type'])) $sql_data_array['fields_input_type'] = $option['input_type'];
- if(isset($option['input_value'])) $sql_data_array['fields_input_value'] = $option['input_value'];
- if(isset($option['required_status'])) $sql_data_array['fields_required_status'] = $option['required_status'];
- if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
- if(isset($option['status'])) $sql_data_array['fields_status'] = $option['status'];
- if(isset($option['required_email'])) $sql_data_array['fields_required_email'] = $option['required_email'];
-// if(isset($option['key'])) $sql_data_array['fields_key'] = $option['key'];
- if(isset($option['admin'])) $sql_data_array['fields_admin'] = $option['admin'];
- if(isset($option['special_mod'])) $sql_data_array['fields_special_mod'] = $option['special_mod'];
- if(isset($option['group_class'])) $sql_data_array['fields_group_class'] = $option['group_class'];
-
-
-
-
-
- $res=tep_db_perform(TABLE_EXTRA_FIELDS, $sql_data_array, 'update' , substr($where,3) );
-
- return $res;
- }
-
- /**
- @brief load ligne in table configuration
- @param option array
- id => row id int (configuration_id)
- key => string key (configuration_key)
- group_id => group_id int (configuration_group_id)
-
- @return
-
- object(stdClass)[13]
- public 'id' => string '1' (length=1)
-
- OR
- array(
- object(stdClass)[13]
- ...
- object(stdClass)[13]
- ..
- )
-
- */
- public static function fetch($option,$shortkey=false){
- $DB=Database::getInstance();
-
- $sql ="";
- if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
- if(isset($option['key'])) $sql .="AND fields_key = '".(string)tep_db_input($option['key'])."' ";
-
- $sql ="SELECT * FROM ".TABLE_EXTRA_FIELDS." WHERE ".substr($sql,3);
-
- $res=$DB->query($sql);
-
- $num = $res->__get('numRows');
-
- if($num == 1){
- $result=$res->fetchAssoc();
- return ((!$shortkey)? $result : self::CleanKey($result));
- }
- elseif($num > 1){
- $array=array();
-
- foreach($res->fetchAllAssoc() as $result)
- $array[]= ((!$shortkey)? $result : self::CleanKey($result));
-
- return $array;
- }
-
- return false;
- }
-
- /**
- @brief delete row
- */
- public static function delete($option){
- $DB=Database::getInstance();
-
- $sql ="";
- if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
- if(isset($option['key'])) $sql .="AND fields_key = '".(string)tep_db_input($option['key'])."' ";
-
- if(strlen($sql)==0)
- return false;
-
- $sql ="DELETE FROM ".TABLE_EXTRA_FIELDS." WHERE ".substr($sql,3);
-
- $res=$DB->query($sql);
-
- return $res;
- }
-
- /**
- @fn CleanKey()
- @brief Clean string name key
- */
- private static function CleanKey($array){
-
- $object= new stdclass();
-
- foreach($array as $key=>$value){
- if( strpos($key,'fields_') ===0)
- $key=substr($key,7);
-
- $object->$key = $value;
- }
-
- return $object;
- }
-
- /**
- @brief
- @return array empty
- */
- public static function Specimen($shortkey=false){
-
- $par = array(
- 'fields_id' =>-1,
- 'fields_size' =>'',
- 'fields_input_type' =>'',
- 'fields_input_value' =>'',
- 'fields_required_status'=>0,
- 'fields_name' =>'',
- 'fields_status' =>0,
- 'fields_required_email' =>0,
- 'fields_key' =>'',
- 'fields_admin' =>0,
- 'fields_special_mod' =>'',
- 'fields_group_class' =>''
- );
-
- return ((!$shortkey)? $par : self::CleanKey($par));
- }
-
-}
-
-
-
-
-class sqlcustomersextrafiledslabels
- implements ModSqlDataDriver{
-
-
- /**
- @brief create new ligne in table configuration
- */
- public static function create($option){
-
- if(!isset($option['languages_id'])) return 'languages_id';
-
- if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
- if(isset($option['languages_id'])) $sql_data_array['languages_id'] = $option['languages_id'];
- if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
- if(isset($option['format'])) $sql_data_array['fields_format'] = $option['format'];
- if(isset($option['format'])) $sql_data_array['fields_format'] = $option['format'];
- if(isset($option['unity_type'])) $sql_data_array['fields_unity_type_id'] = $option['unity_type'];
- if(isset($option['unity'])) $sql_data_array['fields_unity_id'] = $option['unity'];
-
- $res=tep_db_perform(TABLE_EXTRA_FIELDS_LABELS, $sql_data_array);
-
- if(!$res)
- return $res;
- else
- return $res->__get('insertId');
- }
-
-
-
- /**
- @brief update ligne in table configuration
- */
- public static function update($option){
-
- if(!isset($option['languages_id']) && !isset($option['id'])) return 'languages_id or id';
-
- $where ='';
- if(isset($option['id'])) $where .="AND fields_id = '".(int)$option['id']."' ";
- if(isset($option['languages_id'])) $where .="AND languages_id = '".(string)tep_db_input($option['languages_id'])."' ";
-
-// if(isset($option['id'])) $sql_data_array['fields_id'] = $option['id'];
-// if(isset($option['languages_id'])) $sql_data_array['languages_id'] = $option['languages_id'];
- if(isset($option['name'])) $sql_data_array['fields_name'] = $option['name'];
- if(isset($option['format'])) $sql_data_array['fields_format'] = $option['format'];
- if(isset($option['unity_type'])) $sql_data_array['fields_unity_type_id'] = $option['unity_type'];
- if(isset($option['unity'])) $sql_data_array['fields_unity_id'] = $option['unity'];
-
- $res=tep_db_perform(TABLE_EXTRA_FIELDS_LABELS, $sql_data_array, 'update' , substr($where,3) );
-
- return $res;
- }
-
- /**
- @brief load ligne in table configuration
- @param option array
- id => row id int (configuration_id)
- key => string key (configuration_key)
- group_id => group_id int (configuration_group_id)
-
- @return
-
- object(stdClass)[13]
- public 'id' => string '1' (length=1)
-
- OR
- array(
- object(stdClass)[13]
- ...
- object(stdClass)[13]
- ..
- )
-
- */
- public static function fetch($option,$shortkey=false){
- $DB=Database::getInstance();
-
- $sql ="";
- if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
- if(isset($option['languages_id'])) $sql .="AND languages_id = '".(string)tep_db_input($option['languages_id'])."' ";
-
- $sql ="SELECT * FROM ".TABLE_EXTRA_FIELDS_LABELS." WHERE ".substr($sql,3);
-
- $res=$DB->query($sql);
-
- $num = $res->__get('numRows');
-
- if($num == 1){
- $result=$res->fetchAssoc();
- return ((!$shortkey)? $result : self::CleanKey($result));
- }
- elseif($num > 1){
- $array=array();
-
- foreach($res->fetchAllAssoc() as $result)
- $array[]= ((!$shortkey)? $result : self::CleanKey($result));
-
- return $array;
- }
-
- return false;
- }
-
- /**
- @brief delete row
- */
- public static function delete($option){
- $DB=Database::getInstance();
-
- $sql ="";
- if(isset($option['id'])) $sql .="AND fields_id = '".(int)$option['id']."' ";
- if(isset($option['languages_id'])) $sql .="AND languages_id = '".(string)tep_db_input($option['languages_id'])."' ";
-
- if(strlen($sql)==0)
- return false;
-
- $sql ="DELETE FROM ".TABLE_EXTRA_FIELDS_LABELS." WHERE ".substr($sql,3);
-
- $res=$DB->query($sql);
-
- return $res;
- }
-
- /**
- @fn CleanKey()
- @brief Clean string name key
- */
- private static function CleanKey($array){
-
- $object= new stdclass();
-
- foreach($array as $key=>$value){
- if( strpos($key,'fields_') ===0)
- $key=substr($key,7);
-
- $object->$key = $value;
- }
-
- return $object;
- }
-
- /**
- @brief
- @return array empty
- */
- public static function Specimen($shortkey=false){
-
- $par = array(
- 'fields_id' =>-1,
- 'languages_id' =>0,
- 'fields_name' =>'',
- 'fields_format' =>'%label% %input% %unit%',
- 'fields_unity_type_id' =>0,
- 'fields_unity_id' =>0,
- );
-
- return ((!$shortkey)? $par : self::CleanKey($par));
- }
-
-}
-?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab 2013-07-03 08:52:14 UTC (rev 4770)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/02/2012, 15:46
+ @date 03/07/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief form for add and manage extra field for customers
@@ -71,6 +71,11 @@
<?php echo tep_draw_input_field('fields_input_value', 'fields_input_value', modcustextra::$fInfo->fields_input_value) ?>
<?php endif; ?>
</p>
+
+ <p class="block_input">
+ <label for="fields_sort" title="<?php echo __('text field sort help') ?>"><?php echo __('text field sort').tep_image(DIR_WS_ICONS . 'icon_help.gif') ?></label>
+ <?php echo tep_draw_input_field('fields_sort','fields_sort', modcustextra::$fInfo->fields_sort) ?>
+ </p>
</fieldset>
<fieldset class="block_field">
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt 2013-07-03 08:52:14 UTC (rev 4770)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 24/10/11, 15:46
+ @date 03/07/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -49,6 +49,7 @@
$lang['text radio field']=" bouton radio" ;
$lang['text check field']=" case à cocher" ;
$lang['text hidden field']=" caché" ;
+ $lang['text field sort']="Position/Tri : " ;
$lang['text field input value']="La valeur par defaut du champ " ;
$lang['text field input value help']="Cette valeur sera affiché dans le champs si celui ci est vide" ;
Modified: trunk/catalog/admin/includes/modules/configuration/modcustextra.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modcustextra.php 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/admin/includes/modules/configuration/modcustextra.php 2013-07-03 08:52:14 UTC (rev 4770)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 26/02/2012, 15:46
+ @date 03/07/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modcustextra
@@ -68,6 +68,7 @@
'input_value' => tep_db_prepare_input($_POST['fields_input_value']),
'required_status'=> tep_db_prepare_input($_POST['fields_required_status']),
'size' => tep_db_prepare_input($_POST['fields_size']),
+ 'sort' => tep_db_prepare_input($_POST['fields_sort']),
'required_email' => tep_db_prepare_input($_POST['fields_required_email']),
'key' => tep_db_prepare_input($_POST['fields_key']),
'admin' => tep_db_prepare_input($_POST['fields_admin']),
@@ -80,10 +81,10 @@
$sql_data_array['id']=$fields_id;
}
- if (! sqlcustomersextrafileds::fetch($sql_data_array) )
- $fields_id = sqlcustomersextrafileds::create($sql_data_array);
+ if (! sqlcustomersextrafields::fetch($sql_data_array) )
+ $fields_id = sqlcustomersextrafields::create($sql_data_array);
else
- sqlcustomersextrafileds::update( $sql_data_array );
+ sqlcustomersextrafields::update( $sql_data_array );
foreach( tep_get_languages() as $rows){
$language_id = $rows['id'];
@@ -95,10 +96,10 @@
'format' => tep_db_prepare_input($_POST['fields_format'][$language_id]),
);
- if(! sqlcustomersextrafiledslabels::fetch($data_array) )
- sqlcustomersextrafiledslabels::create($data_array);
+ if(! sqlcustomersextrafieldslabels::fetch($data_array) )
+ sqlcustomersextrafieldslabels::create($data_array);
else
- sqlcustomersextrafiledslabels::update($data_array);
+ sqlcustomersextrafieldslabels::update($data_array);
}
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','fID'),false) . 'fID=' . $fields_id));
@@ -114,7 +115,7 @@
tep_db_query("delete from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where fields_id = '" . (int)$fields_id . "'");
- sqlcustomersextrafileds::delete( array('id'=>$fields_id) );
+ sqlcustomersextrafields::delete( array('id'=>$fields_id) );
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action'),false) ));
break;
@@ -124,7 +125,7 @@
*/
case 'setflag':
if(isset($_GET['flag']) )
- if( !sqlcustomersextrafileds::update(array('id'=>(int)self::$cID ,'status'=>(int)tep_db_prepare_input($_GET['flag']) )) )
+ if( !sqlcustomersextrafields::update(array('id'=>(int)self::$cID ,'status'=>(int)tep_db_prepare_input($_GET['flag']) )) )
$messageStack->add_session('error update for extra fields', 'error');
if(!isset($_GET['forceajax']))
@@ -145,21 +146,21 @@
switch($action){
case 'new':
- $fields=sqlcustomersextrafileds::Specimen();
+ $fields=sqlcustomersextrafields::Specimen();
foreach( tep_get_languages() as $rows){
$language_id = $rows['id'];
- $fields['lg'][$language_id] = new objectInfo(sqlcustomersextrafiledslabels::Specimen());
+ $fields['lg'][$language_id] = new objectInfo(sqlcustomersextrafieldslabels::Specimen());
}
self::$fInfo = new objectInfo($fields);
break;
case 'edit':
- $res = sqlcustomersextrafileds::fetch(array('id'=>(int)$_GET['cID']));
+ $res = sqlcustomersextrafields::fetch(array('id'=>(int)$_GET['cID']));
- $r = sqlcustomersextrafiledslabels::fetch(array('id'=>(int)$_GET['cID']));
+ $r = sqlcustomersextrafieldslabels::fetch(array('id'=>(int)$_GET['cID']));
if(!isset($r[0]))
$result[] = $r ;
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/includes/functions/general.php 2013-07-03 08:52:14 UTC (rev 4770)
@@ -362,8 +362,8 @@
@fn tep_get_countries($countries_id = '', $with_iso_codes = false)
@brief Returns an array with countries
TABLES: countries
- @param $countries_id int countrie id for retrun one result in array
- @param $with_iso_codes add info iso code
+ @param $countries_id int countrie id for retrun one result in array
+ @param $with_iso_codes add info iso code
@return array (
countries_id
countries_name
@@ -375,27 +375,27 @@
$list = '';
$where = '';
- if (_cst_bool('COUNTRY_LOCALNAME'))
+ if (_cst_bool('COUNTRY_LOCALNAME'))
$list .=" ,countries_localname as countries_name, countries_localname ";
else
$list .=" , countries_name ";
- if ($with_iso_codes == true)
+ if ($with_iso_codes == true)
$list .= " , countries_iso_code_2, countries_iso_code_3 ";
- if (tep_not_null($countries_id) && (int)$countries_id > 0)
+ if (tep_not_null($countries_id) && (int)$countries_id > 0)
$where = " countries_id = '" . (int)$countries_id . "' ";
else
$where = " country_visible = '1' ";
-
+
$countries = $DB->query("SELECT countries_id ".$list." FROM " . TABLE_COUNTRIES . " WHERE ".$where." ORDER BY countries_name");
if($countries->__get('numRows'))
foreach($countries->fetchAllAssoc() as $row)
$countries_array[] = $row;
- if (tep_not_null($countries_id) && (int)$countries_id > 0)
+ if (tep_not_null($countries_id) && (int)$countries_id > 0)
return $countries_array[0];
else
return $countries_array;
@@ -549,7 +549,7 @@
//CLR 030714 Add processing around $value. This is needed for text attributes.
$uprid = $uprid . '{' . $option . '}' . (is_array($value)? implode(',',$value) : htmlspecialchars(stripslashes(trim($value)) , ENT_QUOTES) );
}
- }
+ }
// else {
// $uprid = htmlspecialchars(stripslashes(trim($value)) , ENT_QUOTES);
// }
@@ -753,28 +753,28 @@
@brief extra fields for customers
@param $customer_id int
@param $languages_id int
- @param special_mod string default null
+ @param special_mod string default null
@param $group_class string default null
@param $format false or format for sprintf
- @return string
+ @return string
*/
function tep_get_extra_fields($customer_id,$languages_id, $special_mod='', $group_class='', $format=false){
$DB=Database::getInstance();
- // ne liste que les element FO
+ // ne liste que les element FO
- $sql = "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
+ $sql = "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
LEFT JOIN " . TABLE_EXTRA_FIELDS_LABELS . " cei ON( cei.fields_id=ce.fields_id AND cei.languages_id ='" . $languages_id."' )
- WHERE
- ce.fields_admin IN ( 0 , 3 )
+ WHERE
+ ce.fields_admin IN ( 0 , 3 )
AND ce.fields_status=1 ";
if(tep_not_null($special_mod))
$sql .= " AND fields_special_mod='".$special_mod."' ";
@@ -786,7 +786,7 @@
else
$sql .= " AND fields_group_class='' ";
- $sql .= " ORDER BY ce.fields_group_class";
+ $sql .= " ORDER BY ce.fields_sort ASC, ce.fields_key ";
$extra_fields_query = $DB->query($sql);
$extra_fields_string ='';
Modified: trunk/catalog/includes/languages/fr_FR/fr_FR.php
===================================================================
--- trunk/catalog/includes/languages/fr_FR/fr_FR.php 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/includes/languages/fr_FR/fr_FR.php 2013-07-03 08:52:14 UTC (rev 4770)
@@ -195,13 +195,13 @@
define('ENTRY_COMPANY_TAX_ID_TEXT',"" );
define('ENTRY_GENDER',"Civilité :" );
define('ENTRY_GENDER_ERROR',"Veuillez choisir votre genre." );
-// define('ENTRY_GENDER_TEXT',"*" );
+define('ENTRY_GENDER_TEXT',"*" );
define('ENTRY_FIRST_NAME',"Prénom :" );
define('ENTRY_FIRST_NAME_ERROR',"Votre prénom doit contenir un minimum de " . ENTRY_FIRST_NAME_MIN_LENGTH . " caractères." );
-// define('ENTRY_FIRST_NAME_TEXT',"*" );
+define('ENTRY_FIRST_NAME_TEXT',"*" );
define('ENTRY_LAST_NAME',"Nom :" );
define('ENTRY_LAST_NAME_ERROR',"Votre nom doit contenir un minimum de " . ENTRY_LAST_NAME_MIN_LENGTH . " caractères." );
-// define('ENTRY_LAST_NAME_TEXT',"*" );
+define('ENTRY_LAST_NAME_TEXT',"*" );
define('ENTRY_DATE_OF_BIRTH',"Date de naissance :" );
define('ENTRY_DATE_OF_BIRTH_ERROR',"Votre date de naissance doit avoir ce format : JJ/MM/AAAA (ex. 21/05/1970)" );
define('ENTRY_DATE_OF_BIRTH_TEXT'," (ex. 21/05/1970)" );
@@ -209,25 +209,29 @@
define('ENTRY_EMAIL_ADDRESS_ERROR',"Votre adresse e-mail doit contenir un minimum de " . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . " caractères." );
define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR',"Votre adresse e-mail ne semble pas être valide - veuillez effectuer toutes les corrections nécessaires." );
define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS',"Votre adresse e-mail est déjà enregistrée sur notre site - Veuillez ouvrir une session avec cette adresse e-mail ou créez un compte avec une adresse différente." );
-// define('ENTRY_EMAIL_ADDRESS_TEXT',"*" );
+define('ENTRY_EMAIL_ADDRESS_TEXT',"*" );
define('ENTRY_STREET_ADDRESS',"Adresse :" );
define('ENTRY_STREET_ADDRESS_ERROR',"Votre adresse doit contenir un minimum de " . ENTRY_STREET_ADDRESS_MIN_LENGTH . " caractères." );
-// define('ENTRY_STREET_ADDRESS_TEXT',"*" );
+define('ENTRY_STREET_ADDRESS_TEXT',"*" );
define('ENTRY_SUBURB',"Complément d'adresse :" );
define('ENTRY_SUBURB_ERROR',"" );
define('ENTRY_SUBURB_TEXT',"" );
define('ENTRY_POST_CODE',"Code postal :" );
define('ENTRY_POST_CODE_ERROR',"Votre code postal doit contenir un minimum de " . ENTRY_POSTCODE_MIN_LENGTH . " caractères." );
-// define('ENTRY_POST_CODE_TEXT',"*" );
+define('ENTRY_POST_CODE_TEXT',"*" );
define('ENTRY_CITY',"Ville: " );
define('ENTRY_CITY_ERROR',"Votre ville doit contenir un minimum de " . ENTRY_CITY_MIN_LENGTH . " caractères." );
+define('ENTRY_CITY_TEXT',"*" );
define('ENTRY_STATE',"état/Département :" );
define('ENTRY_STATE_ERROR',"Votre état doit contenir un minimum de " . ENTRY_STATE_MIN_LENGTH . " caractères." );
define('ENTRY_STATE_ERROR_SELECT',"Veuillez choisir un état à partir de la liste déroulante." );
+define('ENTRY_STATE_TEXT',"*" );
define('ENTRY_COUNTRY',"Pays :" );
define('ENTRY_COUNTRY_ERROR',"Veuillez choisir un pays à partir de la liste déroulante." );
+define('ENTRY_COUNTRY_TEXT',"*" );
define('ENTRY_TELEPHONE_NUMBER',"Numéro de téléphone :" );
define('ENTRY_TELEPHONE_NUMBER_ERROR',"Votre numéro de téléphone doit contenir un minimum de " . ENTRY_TELEPHONE_MIN_LENGTH . " caractères." );
+define('ENTRY_TELEPHONE_NUMBER_TEXT',"*" );
define('ENTRY_FAX_NUMBER',"Numéro de fax :" );
define('ENTRY_FAX_NUMBER_ERROR',"" );
define('ENTRY_FAX_NUMBER_TEXT',"" );
@@ -239,14 +243,21 @@
define('ENTRY_PASSWORD',"Mot de passe :" );
define('ENTRY_PASSWORD_ERROR',"Votre mot de passe doit contenir un minimum de " . ENTRY_PASSWORD_MIN_LENGTH . " caractères." );
define('ENTRY_PASSWORD_ERROR_NOT_MATCHING',"Le mot de passe de confirmation doit être identique à votre mot de passe." );
+define('ENTRY_PASSWORD_TEXT',"*" );
define('ENTRY_PASSWORD_CONFIRMATION',"Confirmation du mot de passe :" );
+define('ENTRY_PASSWORD_CONFIRMATION_TEXT',"*" );
define('ENTRY_PASSWORD_CURRENT',"Mot de passe actuel :" );
+define('ENTRY_PASSWORD_CURRENT_TEXT',"*" );
define('ENTRY_PASSWORD_CURRENT_ERROR',"Votre mot de passe doit contenir un minimum de " . ENTRY_PASSWORD_MIN_LENGTH . " caractères." );
define('ENTRY_PASSWORD_NEW',"Nouveau mot de passe :" );
+define('ENTRY_PASSWORD_NEW_TEXT',"*" );
define('ENTRY_PASSWORD_NEW_ERROR',"Votre nouveau mot de passe doit contenir un minimum de " . ENTRY_PASSWORD_MIN_LENGTH . " caractères." );
define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING',"Le mot de passe de confirmation doit être identique à votre nouveau mot de passe." );
define('PASSWORD_HIDDEN',"--CACHE--" );
+define('ENTRY_EXTRA_FIELDS_LENG_ERROR',"Ce champs (%s) doit contenir un minimum de %s caractères." );
+define('ENTRY_EXTRA_FIELDS_REQUIRED_ERROR',"Ce champs (%s) est obligatoire." );
+
define('FORM_REQUIRED_INFORMATION',"* Information requise" );
// constants for use in tep_prev_next_display function
@@ -387,7 +398,7 @@
define('TEXT_PRODUCT_OPTIONS',"Options disponibles" );
// no touch
-define('TEXT_FIELD_REQUIRED', ' *' );
+define('TEXT_FIELD_REQUIRED', FORM_REQUIRED_INFORMATION );
/*
The following copyright announcement can only be
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml 2013-07-03 08:52:14 UTC (rev 4770)
@@ -3,7 +3,7 @@
<name>2cShopHtml5Oscim</name>
<version>1.0.0</version>
<author>oscim</author>
- <desc>Thème generic, 2 colonnes, classique ecommerce. <br />
+ <desc>Thème generic, 2 colonnes, classique ecommerce. use less framework <br />
Ce template exploite jquery et des plugins pour jquery.<br />
Html5 </desc>
<thumb>thumb.jpg</thumb>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/thumb.jpg
===================================================================
(Binary files differ)
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2013-07-03 08:52:14 UTC (rev 4770)
@@ -75,4 +75,7 @@
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
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'shipping', 1, 'OSC_SHIPPING_LIVERY', '');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'customers', 1, 'OSC_CUSTOMERS_PERSO', '');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'customers', 1, 'OSC_CUSTOMERS_PRO', '');
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_extra_fields.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_extra_fields.sql 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_extra_fields.sql 2013-07-03 08:52:14 UTC (rev 4770)
@@ -25,6 +25,7 @@
fields_admin int(1) NOT NULL COMMENT 'perament(0) dispo uniquement admin (1) permanent hidden(2)',
fields_special_mod varchar(100) NOT NULL COMMENT 'flag module proprietaire',
fields_group_class varchar(100) NOT NULL,
+ fields_sort INT( 3 ) NOT NULL DEFAULT '5' ,
PRIMARY KEY (fields_id)
) DEFAULT CHARSET=utf8 ;
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_extra_fields.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_extra_fields.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_extra_fields.sql 2013-07-03 08:52:14 UTC (rev 4770)
@@ -0,0 +1,14 @@
+--+######################################################################--+
+--| 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_extra_fields ADD fields_sort INT( 3 ) NOT NULL DEFAULT '5' AFTER fields_group_class ;
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/js/create_account.js.php
===================================================================
--- trunk/catalog/templates/defaut/includes/js/create_account.js.php 2013-07-02 18:29:20 UTC (rev 4769)
+++ trunk/catalog/templates/defaut/includes/js/create_account.js.php 2013-07-03 08:52:14 UTC (rev 4770)
@@ -3,8 +3,8 @@
@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
- @date 19/06/10, 21:03
+ @version 2.1.1
+ @date 03/07/2013, 21:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -55,8 +55,30 @@
required: true,
equalTo: "#password"
},
+ // BOF Customers extra fields
+ <?php
+ global $page;
+ $languages_id=$page->the_var('languages_id');
+ $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
+ while($extra_fields = tep_db_fetch_array($extra_fields_query)){ ?>
+ <?php echo 'fields_' . $extra_fields['fields_id']?>: {
+ required: true,
+ minlength: <?php echo $extra_fields['fields_size']; ?>,
+ },
+ <?php } ?>
+ // EOF Customers extra fields
},
messages: {
+ <?php
+ global $page;
+ $languages_id=$page->the_var('languages_id');
+ $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
+ while($extra_fields = tep_db_fetch_array($extra_fields_query)){ ?>
+ <?php echo 'fields_' . $extra_fields['fields_id']?>: {
+ required: "<?php printf(ENTRY_EXTRA_FIELDS_REQUIRED_ERROR,$extra_fields['fields_name'] ); ?>",
+ minlength: "<?php printf(ENTRY_EXTRA_FIELDS_LENG_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']); ?>" ,
+ },
+ <?php } ?>
gender: "<?php echo ENTRY_GENDER_ERROR; ?>",
firstname: "<?php echo ENTRY_FIRST_NAME_ERROR ?>",
lastname: "<?php echo ENTRY_LAST_NAME_ERROR ?>",
@@ -96,15 +118,5 @@
});
});
-// BOF Customers extra fields
- <?php
-global $page;
- $languages_id=$page->the_var('languages_id');
- $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
- while($extra_fields = tep_db_fetch_array($extra_fields_query)){
- $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']);?>
- check_input("<?php echo 'fields_' . $extra_fields['fields_id']?>", <?php echo $extra_fields['fields_id']-1;?>, "<?php echo $string_error; ?>");
- <?php } ?>
-// EOF Customers extra fields
//--></script>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-02 18:29:23
|
Revision: 4769
http://sourceforge.net/p/oscss/svn/4769
Author: oscim
Date: 2013-07-02 18:29:20 +0000 (Tue, 02 Jul 2013)
Log Message:
-----------
Fix less link icon
Add advanced filter
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/template/oscss/css/less/styles.less
Modified: trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2013-07-02 09:51:24 UTC (rev 4768)
+++ trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2013-07-02 18:29:20 UTC (rev 4769)
@@ -24,7 +24,31 @@
</li>
</ul>-->
<!-- </fieldset> -->
+<fieldset>
+ <legend><?php echo __('@products filter legend products by stock'); ?></legend>
+ <ul class="inline">
+ <li>
+ <label class="inline" for="filters_bystock_stock"><?php echo __('@products label text bystock view'); ?></label>
+ <?php echo tep_draw_radio_field('filters[bystock]', 'filters_bystock', '0', (int)(!isset($_SESSION['filters']['bystock']) || @$_SESSION['filters']['bystock'] == '0') ); ?>
+ </li>
+ <li>
+ <label class="inline" for="filters_bystock_stock"><?php echo __('@products label text bystock all'); ?></label>
+ <?php echo tep_draw_radio_field('filters[bystock]', 'filters_bystock', '1', (int)(@$_SESSION['filters']['bystock'] == '1') ); ?>
+ </li>
+ </ul>
+</fieldset>
+<?php if(!isset($_SESSION['filters']['bystock']) || (int)$_SESSION['filters']['bystock'] == 0): ?>
+ <fieldset>
+ <legend><?php echo __('@products filter legend products by attribut'); ?></legend>
+ <ul class="inline">
+ <li>
+ <label class="inline" for="filters_byattribute_all"><?php echo __('@products label text byattribute all'); ?></label>
+ <?php echo tep_draw_checkbox_field('filters[byattribute][all]', 'filters_byattribute_all', 'on', (bool)(@$_SESSION['filters']['byattribute']['all'] == 'on') ); ?>
+ </li>
+ </ul>
+ </fieldset>
+<?php endif; ?>
<fieldset>
<legend><?php echo __('@products filter legend products expected'); ?></legend>
<ul class="inline">
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2013-07-02 09:51:24 UTC (rev 4768)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2013-07-02 18:29:20 UTC (rev 4769)
@@ -59,7 +59,14 @@
$lang['@products label text status publied']="Actif" ;
$lang['@products label text status no publied']="Inactif" ;
+ $lang['@products filter legend products by attribut']="Les attributs " ;
+ $lang['@products label text byattribute all']="Afficher avec les attributs " ;
+ $lang['@products filter legend products by stock']="Les stocks " ;
+ $lang['@products label text bystock view']="Afficher avec les stocks des produits maitres (cumuls des attributs)" ;
+ $lang['@products label text bystock all']="Afficher avec les stocks avec plusieures lignes d'un même produit par declinaisons d'attributs " ;
+
+
/* All fields used on listign and filters */
$lang['products table heading id']="id" ;
$lang['products table heading name']="Produits" ;
@@ -76,6 +83,10 @@
$lang['products table heading ref']="Ref" ;
$lang['products table heading barcode type']="CodeBarre Type" ;
$lang['products table heading barcode']="CodeBarre" ;
+ $lang['products table heading option id']="Option Id" ;
+ $lang['products table heading option value id']="Opt Valeur Id" ;
+ $lang['products table heading options name']="Option Name" ;
+ $lang['products table heading values name']="Opt Valeur Nom" ;
$lang['products table heading date_added']="Créer" ;
$lang['products table heading last modified']="Modifiés" ;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-07-02 09:51:24 UTC (rev 4768)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-07-02 18:29:20 UTC (rev 4769)
@@ -189,15 +189,8 @@
'class'=>'tcenter',
'default'=>true,
),
- 'p.products_ref' => array(
- 'sort'=>true,
- 'search'=>true,
- 'alias'=>'ref',
- 'text'=>__('products table heading ref'),
- 'width'=>'5%',
- 'class'=>'tleft',
- 'default'=>true,
- ),
+
+
'p.products_image' => array(
'sort'=>true,
'alias'=>'image',
@@ -216,6 +209,67 @@
'text'=>__('products table heading modele'),
),
);
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && ($_SESSION['filters'][__CLASS__]['bystock'] > 0) ) {
+ self::$allfields['if(ps.products_stock_ref, ps.products_stock_ref , p.products_ref)']= array(
+ 'sort'=>true,
+ 'search'=>true,
+ 'alias'=>'ref',
+ 'text'=>__('products table heading ref'),
+ 'width'=>'5%',
+ 'class'=>'tleft',
+ 'default'=>true,
+ );
+ }
+ else{
+ self::$allfields['p.products_ref']= array(
+ 'sort'=>true,
+ 'search'=>true,
+ 'alias'=>'ref',
+ 'text'=>__('products table heading ref'),
+ 'width'=>'5%',
+ 'class'=>'tleft',
+ 'default'=>true,
+ );
+ }
+
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && ($_SESSION['filters'][__CLASS__]['bystock'] > 0) ) {
+
+ self::$allfields['ps.products_stock_id']= array(
+ 'sort'=>true,
+ 'alias'=>'products_stock_id',
+ 'text'=>__('products table heading stock rowid'),
+ 'width'=>'6%',
+ );
+ }
+ elseif(isset($_SESSION['filters'][__CLASS__]['byattribute']) && in_array('on',$_SESSION['filters'][__CLASS__]['byattribute']) ){
+ self::$allfields['pa.options_id']= array(
+ 'sort'=>true,
+ 'alias'=>'options_id',
+ 'text'=>__('products table heading option id'),
+ 'width'=>'6%',
+ );
+ self::$allfields['pa.options_values_id']= array(
+ 'sort'=>true,
+ 'alias'=>'options_values_id',
+ 'text'=>__('products table heading option value id'),
+ 'width'=>'6%',
+ );
+ self::$allfields['po.products_options_name']= array(
+ 'sort'=>true,
+ 'alias'=>'options_name',
+ 'text'=>__('products table heading options name'),
+ 'width'=>'12%',
+ 'default'=>true,
+ );
+ self::$allfields['pov.products_options_values_name']= array(
+ 'sort'=>true,
+ 'alias'=>'options_values_name',
+ 'text'=>__('products table heading values name'),
+ 'width'=>'12%',
+ 'default'=>true,
+ );
+ }
+
/* DEB Datatype RootListing categorie */
if( DataTypes::is_active('categorie')) {
self::$allfields['cat.categories_id']= array(
@@ -251,19 +305,24 @@
}
/* END Datatype RootListing featured */
- self::$allfields['p.products_weight']= array(
- 'sort'=>true,
- 'alias'=>'weight',
- 'text'=>__('products table heading weight'),
- 'default'=>true,
- );
- self::$allfields['p.products_price']= array(
- 'sort'=>true,
- 'alias'=>'price',
- 'text'=>__('products table heading price'),
- );
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && ($_SESSION['filters'][__CLASS__]['bystock'] > 0) ) {
+// /** TODO implements adjust col by cumul attributes */
+ }
+ else {
+ self::$allfields['p.products_weight']= array(
+ 'sort'=>true,
+ 'alias'=>'weight',
+ 'text'=>__('products table heading weight'),
+ 'default'=>true,
+ );
+ self::$allfields['p.products_price']= array(
+ 'sort'=>true,
+ 'alias'=>'price',
+ 'text'=>__('products table heading price'),
+ );
+ }
// self::$allfields['p.products_price']= array(
// 'sort'=>false,
// 'alias'=>'price_ttx',
@@ -276,7 +335,7 @@
'text'=>__('products table heading taxe id'),
);
- if(_cst_bool('SET_BARCODE')) {
+// if(_cst_bool('SET_BARCODE')) {
self::$allfields['p.products_barcode_type']= array(
'sort'=>true,
'alias'=>'barcode_type',
@@ -284,28 +343,51 @@
'text'=>__('products table heading barcode type'),
'class'=>'tcenter',
);
- self::$allfields['p.products_barcode']= array(
- 'sort'=>true,
- 'alias'=>'barcode',
- 'text'=>__('products table heading barcode'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- );
- }
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && ($_SESSION['filters'][__CLASS__]['bystock'] > 0) ) {
+
+ self::$allfields['if(ps.products_stock_barcode, ps.products_stock_barcode , p.products_barcode)']= array(
+ 'sort'=>true,
+ 'alias'=>'barcode',
+ 'text'=>__('products table heading barcode'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+ }
+ else {
+ self::$allfields['p.products_barcode']= array(
+ 'sort'=>true,
+ 'alias'=>'barcode',
+ 'text'=>__('products table heading barcode'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+ }
+// }
+
if(_cst_bool('STOCK_CHECK')) {
- self::$allfields['p.products_quantity']= array(
- 'sort'=>true,
- 'alias'=>'quantity',
- 'text'=>__('products table heading quantity'),
- );
- self::$allfields['p.track_stock']= array(
- 'sort'=>true,
- 'alias'=>'track_stock',
- 'text'=>__('products table heading track_stock'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- );
+// if(isset($_SESSION['filters'][__CLASS__]['byattribute']) && in_array('on',$_SESSION['filters'][__CLASS__]['byattribute']) )
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && $_SESSION['filters'][__CLASS__]['bystock'] > 0 )
+ self::$allfields['if(ps.products_stock_quantity, ps.products_stock_quantity, p.products_quantity)']= array(
+ 'sort'=>true,
+ 'alias'=>'quantity',
+ 'text'=>__('products table heading quantity'),
+ );
+ else {
+ self::$allfields['p.products_quantity']= array(
+ 'sort'=>true,
+ 'alias'=>'quantity',
+ 'text'=>__('products table heading quantity'),
+ );
+
+ self::$allfields['p.track_stock']= array(
+ 'sort'=>true,
+ 'alias'=>'track_stock',
+ 'text'=>__('products table heading track_stock'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+ }
}
self::$allfields['p.products_date_added']= array(
@@ -381,6 +463,17 @@
else
$_SESSION['filters']['allfields'] = array();
+
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']))
+ $_SESSION['filters']['bystock'] = $_SESSION['filters'] [__CLASS__]['bystock'];
+ else
+ $_SESSION['filters']['bystock'] = 0;
+
+ if(isset($_SESSION['filters'][__CLASS__]['byattribute']))
+ $_SESSION['filters']['byattribute'] = $_SESSION['filters'] [__CLASS__]['byattribute'];
+ else
+ $_SESSION['filters']['byattribute'] = array();
+
$in_session = $_SESSION['filters']['allfields'];
// check and appli
foreach(self::$allfields as $key=>$row){
@@ -567,9 +660,9 @@
$array[] = $key;
if(in_array('publied', $array) && !in_array('nopublied', $array) )
- self::$InitInfo['adjust']['sWhere'] .=" AND products_status >= 0";
+ self::$InitInfo['adjust']['sWhere'] .=" AND p.products_status > 0";
elseif(!in_array('publied', $array) && in_array('nopublied', $array) )
- self::$InitInfo['adjust']['sWhere'] .=" AND products_status < 0 ";
+ self::$InitInfo['adjust']['sWhere'] .=" AND p.products_status <= 0 ";
/**
@@ -687,7 +780,20 @@
case 'filters':
$_SESSION['filters'] =array();
+// foreach($_POST['filters']['bystock'] as $key=>$row){
+ if( (int)$_POST['filters']['bystock'] >= 0 )
+ $_SESSION['filters'][__CLASS__]['bystock'] = (int)$_POST['filters']['bystock'] ;
+ else
+ unset($_SESSION['filters'][__CLASS__]['bystock']);
+// }
+ foreach($_POST['filters']['byattribute'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['byattribute'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['byattribute'][$key]);
+ }
+
foreach($_POST['filters']['listfield'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
@@ -1087,6 +1193,17 @@
$query_raw .=", p.products_id as id FROM " . TABLE_PRODUCTS . " p ".
" JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON(p.products_id = pd.products_id and pd.language_id = '" . (int)$adjust->languages_id . "') ";
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && $_SESSION['filters'][__CLASS__]['bystock'] > 0 ) {
+ $query_raw .=" LEFT JOIN " . TABLE_PRODUCTS_STOCK . " ps ON(p.products_id = ps.products_id ) ";
+ }
+ elseif(isset($_SESSION['filters'][__CLASS__]['byattribute']) && in_array('on',$_SESSION['filters'][__CLASS__]['byattribute']) ) {
+ $query_raw .=" LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa ON(p.products_id = pa.products_id ) ";
+ $query_raw .=" LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON(pa.options_id = po.products_options_id AND po.language_id='" . (int)$adjust->languages_id . "' ) ";
+ $query_raw .=" LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov ON(pa.options_values_id = pov.products_options_values_id AND pov.language_id='" . (int)$adjust->languages_id . "' ) ";
+ }
+
+
+
if( DataTypes::is_active('categorie')){
$query_raw .=" LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2p ON(p.products_id = p2p.products_id ) ".
" JOIN " . TABLE_CATEGORIES . " cat ON( cat.categories_id =p2p.categories_id ) ".
@@ -1111,9 +1228,16 @@
}
/* END Sub module add col */
- $query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
- " GROUP BY p.products_id ";
+ $query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '');
+ if(isset($_SESSION['filters'][__CLASS__]['bystock']) && $_SESSION['filters'][__CLASS__]['bystock'] > 0 ) {
+ $query_raw .=" GROUP BY ps.products_stock_id, p.products_id ";
+ }
+ elseif(isset($_SESSION['filters'][__CLASS__]['byattribute']) && in_array('on',$_SESSION['filters'][__CLASS__]['byattribute']) )
+ $query_raw .=" GROUP BY pa.options_values_id, pa.options_id, p.products_id ";
+ else
+ $query_raw .=" GROUP BY p.products_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){
@@ -1125,6 +1249,10 @@
$query_raw .=" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' p.products_date_added DESC ');
+ $_query = $DB->query($query_raw);
+ $query_numrows = $_query->__get('numRows'); //($query_raw) ) ;
+// var_dump($query_raw);
+// var_dump($query_numrows);
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
Modified: trunk/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- trunk/catalog/admin/includes/template/oscss/css/less/styles.less 2013-07-02 09:51:24 UTC (rev 4768)
+++ trunk/catalog/admin/includes/template/oscss/css/less/styles.less 2013-07-02 18:29:20 UTC (rev 4769)
@@ -614,10 +614,10 @@
// rattrapage fichier Forms.less
form .block_form .block_input span.edit-input .edit-input-value-alternate.Val-true {
- background-image: url("../../img/1/check.png");
+ background-image: url("./img/1/check.png");
}
form .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {
- background-image: url("../../img/1/busy.png");
+ background-image: url("./img/1/busy.png");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-02 09:51:28
|
Revision: 4768
http://sourceforge.net/p/oscss/svn/4768
Author: oscim
Date: 2013-07-02 09:51:24 +0000 (Tue, 02 Jul 2013)
Log Message:
-----------
Add ref uniq for product and attribute product , add method for block if ref is already used
adjust sql install and upgrade
adjust attributemanager method and js
fix language fr for new message
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products_stock.sql
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/attributeManager.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/javascript/attributeManager.js
trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2013-07-02 09:51:24 UTC (rev 4768)
@@ -61,9 +61,9 @@
$resobj=tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
if(!$resobj){
- $DB->rollbackTransaction();
- return false;
- }
+ $DB->rollbackTransaction();
+ return false;
+ }
$products_id = $resobj->__get('insertId');
@@ -82,14 +82,14 @@
$error++;
}
- if( $error > 0){
- $DB->rollbackTransaction();
- return false;
- }
- else{
- $DB->commitTransaction();
- return $products_id;
- }
+ if( $error > 0){
+ $DB->rollbackTransaction();
+ return false;
+ }
+ else{
+ $DB->commitTransaction();
+ return $products_id;
+ }
}
/**
@@ -134,18 +134,17 @@
$sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products());
if( !tep_db_perform(TABLE_PRODUCTS, $sql_data_array) )
- $error++;
+ $error++;
}
elseif ($action == 'update_product') {
$sql_data_array['products_last_modified'] ='now()';
$sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products());
if( ! tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update',"products_id = '" . (int)$products_id . "'") )
- $error++;
+ $error++;
}
-
/**
TODO Couplage avec MLinkto + datatype actif
*/
@@ -153,13 +152,10 @@
/// Clean link product to categorie and save new link
if(isset($option['cPath']) && count($post['categories']) == 0){
$post['categories'][] = $option['cPath'];
- $r = sqlcategorie::DataInCat('products', $products_id, $post['categories']);
+ sqlcategorie::DataInCat('products', $products_id, $post['categories']);
}
elseif(count($post['categories']) > 0)
- $r = sqlcategorie::DataInCat('products', $products_id, $post['categories']);
-
- if($r === false)
- $error++;
+ sqlcategorie::DataInCat('products', $products_id, $post['categories']);
}
if( DataTypes::is_active('featured')) {
if(count($post['linkto']['featured']) > 0)
@@ -179,8 +175,8 @@
)
);
- if($r === false)
- $error++;
+// if($r == false)
+// $error++;
}
@@ -212,26 +208,29 @@
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
$language_id = $list_languages[$i]['id'];
- $sql_data_array = array('products_name' => tep_db_prepare_input($post['products_name'][$language_id]) );
- if ($action == 'insert_product') {
- $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id);
+ $sql_data_array = array('products_name' => tep_db_prepare_input($post['products_name'][$language_id]) );
- $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
- // ACA START INSERT IN PRODUCT_DESCRIPTION TABLE
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products_description ($language_id));
+ if ($action == 'insert_product') {
+ $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id);
- if( !tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array) )
- $error++;
- }
+ $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
+ // ACA START INSERT IN PRODUCT_DESCRIPTION TABLE
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products_description ($language_id));
- elseif ($action == 'update_product') {
- // ACA START UPDATE PRODUCT_DESCRIPTION TABLE
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products_description ($language_id));
+ if( !tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array) )
+ $error++;
+ }
- if( ! tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', " products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "' ") )
- $error++;
- }
+ elseif ($action == 'update_product') {
+ if(isset($post['products_name'][$language_id]) && strlen($post['products_name'][$language_id])> 0) {
+ // ACA START UPDATE PRODUCT_DESCRIPTION TABLE
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products_description ($language_id));
+
+ if( ! tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', " products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "' ") )
+ $error++;
+ }
+ }
}
/// Call ACA module after update
@@ -248,6 +247,9 @@
}
}
+
+
+
/**
@brief load ligne in table configuration
@param option array
@@ -281,7 +283,13 @@
$ID = (int) $option['id'];
$sql .="AND p.products_id = '".(int)tep_db_input($option['id'])."' ";
}
+ elseif(isset($option['ref'])){
+ if( ($ID = self::GetByRef($option['ref'])) && $ID === false)
+ return false;
+ $sql .="AND p.products_id = '".(int)tep_db_input($ID)."' ";
+ }
+
if(isset($option['language_id'])){
$languages_id = (int)$option['language_id'];
$sql .="AND pd.language_id = '".(int)tep_db_input($option['language_id'])."' ";
@@ -292,13 +300,45 @@
$sql =substr($sql,3);
+ $sql_query = "SELECT
+ pd.products_name
+ , pd.products_description
+ , pd.products_url
+ , p.products_id
+ , p.products_quantity
+ , p.products_quantity_alert
+ , p.products_type , p.products_type as products_virtual_typeID
+ , p.products_model
+ , p.products_image
+ , p.products_price
+ , p.products_weight
+ , p.products_weight_brut
+ , p.track_stock
+ , p.products_date_added
+ , p.products_last_modified
+ , products_date_available
+ , p.products_status
+ , p.products_tax_class_id
+ , p.manufacturers_id
+ , p.products_ref
+ , p.products_barcode_type
+ , p.products_barcode
+ , p.products_ordered
+ FROM " . TABLE_PRODUCTS . " p, ".
+ " " . TABLE_PRODUCTS_DESCRIPTION . " pd ".
+ " WHERE p.products_id = pd.products_id ". $sql;
-// $DB=Database::getInstance();
+ $product_query = $DB->query( $sql_query );
- $product_query = $DB->query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity,p.products_quantity_alert,p.products_type as products_virtual_typeID, p.products_model, p.products_image, p.products_price, p.products_weight,p.products_weight_brut, p.track_stock, p.products_date_added, p.products_last_modified, products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id,p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id ". $sql );
- $product = tep_db_fetch_array($product_query);
+ if( ! $product_query->__get('numRows') )
+ return false;
+
+ $product = $product_query->fetchAssoc();
+
tep_db_free_result($product_query);
+ $product['products_images'] = explode('|', $product['products_image']);
+
/**
TODO Couplage avec MLinkto + datatype actif
*/
@@ -335,9 +375,10 @@
}
//<!-- EOF Separate Pricing Per Customer -->
- self::$modules->load_db_values($ID);
+ self::$modules->load_db_values($ID);
+
return ((!$shortkey)? $product : self::CleanKey($product));
// if($num == 1){
// $result=$res->fetchAssoc();
@@ -418,7 +459,7 @@
'products_quantity_alert' => '',
'products_model' => '',
- 'products_image' => '',
+ 'products_image' => array(),
'products_price' => '',
'products_tax_class_id' => '',
@@ -525,7 +566,29 @@
}
+ /**
+ @brief search ref and retrun id product
+ @param $ref string
+ @return products id integer
+ */
+ public static function GetByRef($ref){
+ $DB=Database::getInstance();
+ $sql_query = " SELECT IF( ps.products_id,ps.products_id, p.products_id ) as id
+ FROM " . TABLE_PRODUCTS . " p LEFT JOIN ".TABLE_PRODUCTS_STOCK." ps USING(products_id) ".
+ " WHERE products_ref ='".$ref."' OR products_stock_ref ='".$ref."' ";
+
+ $_query = $DB->query( $sql_query );
+
+ if( ! $_query->__get('numRows') )
+ return false;
+
+ $product = $_query->fetchAssoc();
+
+ return $product['id'];
+ }
+
+
/**
@fn MaintenanceTables()
@brief clean and maintient link table and data
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2013-07-02 09:51:24 UTC (rev 4768)
@@ -50,6 +50,10 @@
<fieldset class="block_field">
<ul>
+ <li class="block_input">
+ <label class="inline" for="products_ref" title="<?php echo __('@products text ref help'); ?>"><?php echo __('@products text ref'); ?></label>
+ <?php echo (tep_not_null(products::$Info->products_ref)? products::$Info->products_ref : tep_draw_input_field('products_ref','', products::$Info->products_ref,'',true) ); ?>
+ </li>
<?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>
@@ -63,6 +67,15 @@
</li>
<?php endif; ?>
+
+ <li class="block_input">
+ <label class="inline" for="products_barcode_type"><?php echo __('@products text codebarre type'); ?></label>
+ <?php echo tep_draw_pull_down_menu('products_barcode_type', products::$barcode_type_array, products::$Info->products_barcode_type, ''); ?>
+ </li>
+ <li class="block_input">
+ <label class="inline" for="products_barcode"><?php echo __('@products text codebarre'); ?></label>
+ <?php echo tep_draw_input_field('products_barcode','', products::$Info->products_barcode); ?>
+ </li>
<?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): ?>
@@ -81,13 +94,13 @@
<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 />
+ <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, '', true); ?>
</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>'; ?>
+ <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ', true); ?>
</div>
<div class="fleft w_50">
<label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
@@ -171,7 +184,11 @@
</fieldset>
<?php endif; ?>
+<?php
+// print_r(products::$Info->products_images);
+
+?>
<?php if( ! in_array(products::$Info->products_type , explode(',',TYPE_VIRTUAL_PRODUCTS)) ) : // physical product ?>
<?php if( _cst_bool('STOCK_CHECK') && products::CheckClassProduct('CLASS_STOCK')): /** Si Class de stock defini, les prix sont pris en charge par un onglet */ ?>
@@ -245,16 +262,56 @@
<div class="edit box_right fright w_30">
<fieldset class="block_field">
- <legend><?php echo __('text legend image'); ?></legend>
+ <legend>
+ <?php echo __('text legend image'); ?>
+ <span class="button_nav">
+ <a
+ class="buttonimg browser"
+ onclick="<?php echo tep_get_filebroswerserveur("products_image", "image", '') ?>; return false;"
+ href="#<?php //echo tep_href_link(self::FILENAME, '&datatype='.MLinkTo::$current.'&action=new_light&origin=' ) ?>"
+ title="<?php //echo sprintf(__('add category datatype %s'), MLinkTo::$current )?>"
+ ><?php echo tep_image(DIR_WS_ICONS.'icon_add_new.png' ) ?>
+ </a>
+ </span>
+ </legend>
<dl>
+ <?php /*if(count(products::$Info->products_images) <=1) :?>
<dt class="block_input">
<p class="new_product_img" ><?php echo tep_info_image(products::$Info->products_image, products::$Info->products_image, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="new_product_img" id="products_imageimg"'); ?></p>
</dt>
- <?php if(products::CheckClassProduct('CLASS_IMAGE')): /** Si image de prix defini, les prix sont pris en charge par un onglet */ ?>
+ <?php if(products::CheckClassProduct('CLASS_IMAGE')): ?>
<dt class="block_input">
<?php echo '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur("products_image", "image", '').'return false;">'.tep_draw_input_field('products_image','', products::$Info->products_image ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>'; ?>
</dt>
<?php endif; ?>
+ <?php else:*/ ?>
+ <dt class="block_input">
+ <?php foreach(products::$Info->products_images as $i=>$row_img): ?>
+ <p class="new_product_img multi" >
+ <?php echo tep_info_image($row_img, $row_img, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="new_product_img" id="products_imageimg_'.$i.'"'); ?>
+ <span class="is_default"></span>
+ <span class="button_nav">
+ <a
+ class="buttonimg browser"
+ onclick="<?php echo tep_get_filebroswerserveur("products_imageimg_".$i, "image", '') ?>; return false;"
+ href="<?php //echo tep_href_link(self::FILENAME, '&datatype='.MLinkTo::$current.'&action=new_light&origin=' ) ?>"
+ title="<?php //echo sprintf(__('add category datatype %s'), MLinkTo::$current )?>"
+ ><?php echo tep_image(DIR_WS_ICONS.'icon_edit.png' ) ?>
+ </a>
+ <a
+ class="buttonimg fancy"
+ href="<?php //echo tep_href_link(self::FILENAME, '&datatype='.MLinkTo::$current.'&action=new_light&origin=' ) ?>"
+ title="<?php //echo sprintf(__('add category datatype %s'), MLinkTo::$current )?>"
+ ><?php echo tep_image(DIR_WS_ICONS.'icon_delete.png' ) ?>
+ </a>
+ </span>
+ </p>
+ <?php endforeach; ?>
+</dt>
+ <dt class="block_input">
+ <?php echo /*'<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur("products_image", "image", '').'return false;">'.*/tep_draw_input_field('products_image','', products::$Info->products_image )/*.' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>'*/; ?>
+ </dt>
+ <?php /*endif;*/ ?>
</dl>
</fieldset>
Modified: trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- trunk/catalog/admin/includes/javascript/modules/pages/products.js.php 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/admin/includes/javascript/modules/pages/products.js.php 2013-07-02 09:51:24 UTC (rev 4768)
@@ -51,7 +51,7 @@
/**
- Display / Hide Input quantity if mode No stock
+ Display / Hide Input quantity if mode No stock
*/
$("select#track_stock").change(function(){
var val = $("select#track_stock option:selected" ).val();
@@ -65,29 +65,48 @@
$("#products_quantity_block input").removeAttr( 'disabled' );
}
});
+
+ $("input#products_ref").change(function(){
+ self.isValidRef( $(this) );
+ });
+
},
- // Public methode
+ // Public methode
+ isValidRef:function( $current ) {
+ var stringRef = $current.val();
+
+ if(stringRef.length <= 1 )
+ return false;
+
+ $.get("<?php echo tep_get_http().DIR_WS_ADMIN .products::FILENAME ?>",
+ { 'action': "isValidRef", 'forceajax' : true , 'stringref': stringRef },
+ function(data) {
+ $current.replaceWith(data);
+ });
+ return true;
+ },
+
GetAllValues:function( ) {
- self.prices.gross = $("input#products_price_gross").val( );
- self.prices.final = $("input#products_price_final").val( );
- self.prices.base = $("input#products_price").val( );
+ self.prices.gross = $("input#products_price_gross").val( );
+ self.prices.final = $("input#products_price_final").val( );
+ self.prices.base = $("input#products_price").val( );
},
AppliValues:function( ) {
- $("input#products_price_gross").val( self.doRound( self.prices.gross, 6) );
-// $("input#products_price_final").val( self.doRound( self.prices.final, 6) );
- $("input#products_price").val( self.doRound( self.prices.base, 6) );
+ $("input#products_price_gross").val( self.doRound( self.prices.gross, 6) );
+// $("input#products_price_final").val( self.doRound( self.prices.final, 6) );
+ $("input#products_price").val( self.doRound( self.prices.base, 6) );
},
updateGross:function() {
self.prices.base = $("input#products_price").val();
var grossValue = self.CalculGross( self.prices.base );
- self.prices.gross = self.doRound( grossValue , 6);
-// self.prices.final = self.doRound( grossValue , 6) ;
+ self.prices.gross = self.doRound( grossValue , 6);
+// self.prices.final = self.doRound( grossValue , 6) ;
self.CalculFinal( grossValue);
},
@@ -95,8 +114,8 @@
updateNet:function( $current ) {
self.prices.gross = $current.val();
- self.prices.base = self.doRound( self.CalculNet( self.prices.gross ) , 6) ;
-// self.prices.final = self.doRound( self.prices.gross , 6) ;
+ self.prices.base = self.doRound( self.CalculNet( self.prices.gross ) , 6) ;
+// self.prices.final = self.doRound( self.prices.gross , 6) ;
self.CalculFinal( self.prices.gross );
},
@@ -110,15 +129,15 @@
}
-
+
self.prices.final = self.doRound( basefinal , 6) ;
- },
+ },
CalculGross:function( value ) {
var taxRate = self.getTaxRate();
-
- if (taxRate > 0) {
- value = value * ((taxRate / 100) + 1);
+
+ if (taxRate > 0) {
+ value = value * ((taxRate / 100) + 1);
}
return value;
@@ -127,8 +146,8 @@
CalculNet:function( value ) {
var taxRate = self.getTaxRate();
- if (taxRate > 0) {
- value = value / ((taxRate / 100) + 1);
+ if (taxRate > 0) {
+ value = value / ((taxRate / 100) + 1);
}
return value;
@@ -149,11 +168,11 @@
var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;
var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;
- if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
- return tax_rates[parameterVal];
+ if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
+ return tax_rates[parameterVal];
}
- else {
- return 0;
+ else {
+ return 0;
}
},
@@ -238,7 +257,7 @@
$('#bt_products_date_available').datepicker({altField: '#products_date_available'});
-<?php oscss_cstr::CallBack('OSCSS_JSCORE.products.utlis.Init();'); // Active check key ?>
+ <?php oscss_cstr::CallBack('OSCSS_JSCORE.products.utlis.Init();'); // Active check key ?>
});
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2013-07-02 09:51:24 UTC (rev 4768)
@@ -72,6 +72,10 @@
$lang['products table heading price ttx']="Prix TTC" ;
$lang['products table heading type']="Type" ;
$lang['products table heading weight']="Poids" ;
+ $lang['products table heading weight brut']="Poids Brut" ;
+ $lang['products table heading ref']="Ref" ;
+ $lang['products table heading barcode type']="CodeBarre Type" ;
+ $lang['products table heading barcode']="CodeBarre" ;
$lang['products table heading date_added']="Créer" ;
$lang['products table heading last modified']="Modifiés" ;
@@ -131,6 +135,9 @@
$lang['text products type']="Type de produit :" ;
$lang['text products ordered']="Ordre tri:" ;
$lang['text sort order']="Ordre de tri :" ;
+ $lang['@products text codebarre type']="Type Code Barre :" ;
+ $lang['@products text codebarre']="Code Barre :" ;
+ $lang['@products text ref']="Ref :" ;
$lang['@products legend option de prix supplementaire']="Options de prix supplementaires" ;
@@ -138,6 +145,9 @@
$lang['@products text status on']="Actif " ;
$lang['@products text status off']="Désactivé" ;
+ $lang['@products barcode ean13']="EAN 13" ;
+ $lang['@products barcode ean8']="EAN 8" ;
+
$lang['@products text model']="Modèle :" ;
$lang['@products text model help']="Ce modèle est destiné à être affiché dans la page produit et eventullement dans les listings. Il ne s'agit pas d'une référence unique produits, mais du modéle definis par le fabricant" ;
@@ -202,7 +212,10 @@
$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" ;
+ $lang['@products ref is already used']="Réference produit déjà utilisé" ;
+ $lang['@products ref is valid']="Réference produit disponible" ;
+
/* js alert */
$lang['js alert products name']="Le nom du produit est obligatoire" ;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-07-02 09:51:24 UTC (rev 4768)
@@ -53,6 +53,10 @@
*/
public static $tax_class_array;
/**
+ @var array $barcode_type_array liste available barcode product
+ */
+ public static $barcode_type_array;
+ /**
@var array $track_stock tableau gestion stock
*/
public static $track_stock;
@@ -185,6 +189,15 @@
'class'=>'tcenter',
'default'=>true,
),
+ 'p.products_ref' => array(
+ 'sort'=>true,
+ 'search'=>true,
+ 'alias'=>'ref',
+ 'text'=>__('products table heading ref'),
+ 'width'=>'5%',
+ 'class'=>'tleft',
+ 'default'=>true,
+ ),
'p.products_image' => array(
'sort'=>true,
'alias'=>'image',
@@ -263,6 +276,23 @@
'text'=>__('products table heading taxe id'),
);
+ if(_cst_bool('SET_BARCODE')) {
+ self::$allfields['p.products_barcode_type']= array(
+ 'sort'=>true,
+ 'alias'=>'barcode_type',
+ 'width'=>'2%',
+ 'text'=>__('products table heading barcode type'),
+ 'class'=>'tcenter',
+ );
+ self::$allfields['p.products_barcode']= array(
+ 'sort'=>true,
+ 'alias'=>'barcode',
+ 'text'=>__('products table heading barcode'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+ }
+
if(_cst_bool('STOCK_CHECK')) {
self::$allfields['p.products_quantity']= array(
'sort'=>true,
@@ -715,7 +745,9 @@
// if(!tep_action_check('setflag', self::FILENAME)){
if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
- if (isset(self::$Id)) tep_set_product_status(self::$Id, $_GET['flag']);
+ if (isset(self::$Id))
+ sqlproduct::update(array('id'=>self::$Id, 'sqlarray'=>array('products_status'=>$_GET['flag'])));
+// tep_set_product_status(self::$Id, $_GET['flag']);
osCSS_Cache::clear('product');
}
@@ -726,10 +758,32 @@
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','cPath','pID','setflag','flag'), false) ));
break;
+ /**
+ @remarks Test key , by ajax
+ */
+ case 'isValidRef':
+ $ref = tep_db_prepare_input(trim($_REQUEST['stringref']));
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+ if( sqlproduct::fetch(array('ref'=>$ref)) === false){
+ self::$Info['isValidRef'] = true;
+ $messageStack->$messageStackFunction(__('@products ref is valid'), 'success');
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','pID'), false).'action=edit' ));
+ }
+ else{
+ self::$Info['isValidRef'] = false;
+ $messageStack->$messageStackFunction(__('@products ref is already used'), 'error');
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
+ break;
+
+
+
/**
@remarks specific multi action
*/
@@ -783,7 +837,8 @@
$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).' 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),
+ $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']) : ''),
'products_price' => tep_db_prepare_input($_POST['products_price']),
'products_date_available' => $products_date_available,
@@ -793,8 +848,17 @@
// 'manufacturers_id' => (isset($_POST['manufacturers_id']) ?tep_db_prepare_input($_POST['manufacturers_id']) : ''),
'track_stock' => (isset($_POST['track_stock']) ? tep_db_prepare_input($_POST['track_stock']) : ((self::$modules->type_flag==1 ) ? 1 : 0) ),
'products_ordered' => (isset($_POST['products_ordered']) ? tep_db_prepare_input($_POST['products_ordered']) : '0' )
- );
+ );
+ // block if no check ref product Or attribute
+ if( isset($_POST['products_ref']) ){
+ if(sqlproduct::GetByRef(tep_db_prepare_input(trim($_POST['products_ref']))) != false)
+ tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id.'&action=edit' ));
+
+ $params['sqlarray']['products_ref'] = tep_db_prepare_input(trim($_POST['products_ref']));
+ }
+
+
//! added qtpro
if(self::$product_investigation['has_tracked_options'] or self::$product_investigation['stock_entries_count'] > 0){
//Do not modify the stock from this page if the product has database entries or has tracked options
@@ -895,7 +959,13 @@
}
+ self::$barcode_type_array = array(
+ array('id' => '0', 'text' => TEXT_NONE),
+ array('id' => '1', 'text' => __('@products barcode ean13')),
+ array('id' => '2', 'text' => __('@products barcode ean8')),
+ );
+
if (!isset(self::$Info->products_status)) self::$Info->products_status = '1';
switch (self::$Info->products_status) {
case '0': self::$in_status = false; self::$out_status = true; break;
@@ -1080,8 +1150,20 @@
case 'setflag':
return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
break;
+ /**
+ @remarks Ajax View result
+ */
+ case 'isValidRef':
+ $stringref = tep_db_prepare_input($_REQUEST['stringref']) ;
+ if( ! (bool)self::$list['isValidRef'])
+ $print = tep_draw_input_field('products_ref', '', (string)$stringref , '');
+ else
+ $print = $stringref. tep_draw_hidden_field('products_ref', '', (string)$stringref, ' ');
+ return $print;
+ break;
+
/**
@remarks Normal View Page
*/
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.sql 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.sql 2013-07-02 09:51:24 UTC (rev 4768)
@@ -19,6 +19,7 @@
products_stock_quantity int(11) NOT NULL DEFAULT '0',
products_stock_quantity_alert int(11) DEFAULT NULL,
products_stock_barcode varchar(68) DEFAULT NULL,
+ products_stock_ref varchar(64) DEFAULT NULL,
PRIMARY KEY (products_stock_id),
UNIQUE KEY idx_products_stock_attributes (products_id,products_stock_attributes)
) DEFAULT CHARSET=utf8;
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products_stock.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products_stock.sql 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products_stock.sql 2013-07-02 09:51:24 UTC (rev 4768)
@@ -12,4 +12,5 @@
--+######################################################################--+
ALTER TABLE osc_products_stock ADD products_stock_quantity_alert INT NULL ,
-ADD products_stock_barcode VARCHAR( 68 ) NULL ;
\ No newline at end of file
+ADD products_stock_barcode VARCHAR( 68 ) NULL ,
+ADD products_stock_ref VARCHAR( 64 ) NULL ;
\ No newline at end of file
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/attributeManager.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/attributeManager.php 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/attributeManager.php 2013-07-02 09:51:24 UTC (rev 4768)
@@ -170,7 +170,7 @@
</td>
<td align="right">
- <?php echo tep_draw_pull_down_menu("new_option_value_$optionId",$attributeManager->buildOptionValueDropDown($optionId),$selectedOptionValue,'style="margin:3px 0px 3px 0px;" id="new_option_value_'.$optionId.'"')?>
+ <?php echo tep_draw_pull_down_menu("new_option_value_$optionId",$attributeManager->buildOptionValueDropDown($optionId),$selectedOptionValue,'style="margin:0px;" id="new_option_value_'.$optionId.'"')?>
<input type="image" src="<?php echo DIR_WS_ICONS ?>icon_add.png" value="Add" border="0" onclick="return amAddOptionValueToProduct('<?php echo $optionId?>');" title="<?php echo htmlspecialchars(sprintf(AM_AJAX_ADDS_ATTRIBUTE_TO_OPTION, $optionInfo['name'])); ?>" />
<input type="image" title="<?php echo htmlspecialchars(sprintf(AM_AJAX_ADDS_NEW_VALUE_TO_OPTION,$optionInfo['name'])) ?>" border="0" src="<?php echo DIR_WS_ICONS ?>icon_add_new.png" onclick="return customPrompt('amAddNewOptionValueToProduct','<?php echo addslashes("option_id:$optionId|option_name:".str_replace('"','"',$optionInfo['name']))?>');" />
@@ -215,7 +215,7 @@
<span class="inlineblock" style="width:95px">
<?php echo ADJUST_PRICE ?>
</span>
-
+
<span class="inlineblock" style="width:25px"></span>
</td>
</tr>
@@ -263,12 +263,12 @@
<?php /** Weight */ ?>
<?php if(!in_array($TypeProduct, explode(',', TYPE_VIRTUAL_PRODUCTS))) { ?>
<span class="inlineblock" style="width:80px">
- <?php echo tep_draw_input_field("weight_$optionValueId",'',$optionValueInfo['weight'],' style="margin:3px 0px 3px 0px;" size="7" onfocus="amF(this)" onblur="amB(this)" onchange="return amUpdateWeight(\''.$optionId.'\',\''.$optionValueId.'\',\'weight\');"'); ?>
+ <?php echo tep_draw_input_field("weight_$optionValueId",'',$optionValueInfo['weight'],' style="margin:0px;" size="7" onfocus="amF(this)" onblur="amB(this)" onchange="return amUpdateWeight(\''.$optionId.'\',\''.$optionValueId.'\',\'weight\');"'); ?>
</span>
<?php } ?>
<?php /** Price */ ?>
<span class="inlineblock" style="width:95px">
- <?php echo drawDropDownPrefix('id="prefix_'.$optionValueId.'" style="margin:3px 0px 3px 0px;" onchange="return amUpdate(\''.$optionId.'\',\''.$optionValueId.'\',\'prefix\');"',$optionValueInfo['prefix']);?><?php echo tep_draw_input_field("price_$optionValueId",'',$optionValueInfo['price'],' style="margin:3px 0px 3px 0px;" size="7" onfocus="amF(this)" onblur="amB(this)" onchange="return amUpdate(\''.$optionId.'\',\''.$optionValueId.'\',\'price\');"'); ?>
+ <?php echo drawDropDownPrefix('id="prefix_'.$optionValueId.'" style="margin:0px;" onchange="return amUpdate(\''.$optionId.'\',\''.$optionValueId.'\',\'prefix\');"',$optionValueInfo['prefix']);?><?php echo tep_draw_input_field("price_$optionValueId",'',$optionValueInfo['price'],' style="margin:0px;" size="7" onfocus="amF(this)" onblur="amB(this)" onchange="return amUpdate(\''.$optionId.'\',\''.$optionValueId.'\',\'price\');"'); ?>
</span>
<?php /** Remove */ ?>
<span class="button img col">
@@ -324,13 +324,13 @@
<td align="right" valign="middle" class="newOptionPanel-label">
<?php echo AM_AJAX_OPTION; ?> <?php echo tep_draw_pull_down_menu('optionDropDown',$optionDrop,$selectedOption,'id="optionDropDown" onchange="return amUpdateNewOptionValue(this.value);" class="optionDropDown"')?>
</td>
- <td align="right" valign="middle" class="newOptionPanel-button">
+ <td align="right" valign="middle" class="newOptionPanel-button buttonimg">
<input border="0" type="image" src="<?php echo DIR_WS_ICONS ?>icon_add_new.png" onclick="return customPrompt('amAddOption');" title="<?php echo AM_AJAX_ADDS_NEW_OPTION; ?>" />
</td>
<td align="right" valign="middle" class="newOptionPanel-label">
<?php echo AM_AJAX_VALUE; ?> <?php echo tep_draw_pull_down_menu('optionValueDropDown',$optionValueDrop,(is_numeric($selectedOptionValue) ? $selectedOptionValue : ''),'id="optionValueDropDown" class="optionValueDropDown"')?>
</td>
- <td align="right" valign="middle" class="newOptionPanel-button">
+ <td align="right" valign="middle" class="newOptionPanel-button buttonimg">
<input border="0" type="image" src="<?php echo DIR_WS_ICONS ?>icon_add_new.png" onclick="return customPrompt('amAddOptionValue');" title="<?php echo AM_AJAX_ADDS_NEW_OPTION_VALUE; ?>" />
</td>
<td valign="top" class="newOptionPanel-label">
@@ -349,7 +349,7 @@
</td>
<?php } ?>
- <td align="right" valign="middle" class="newOptionPanel-button">
+ <td align="right" valign="middle" class="newOptionPanel-button buttonimg">
<input type="image" src="<?php echo DIR_WS_ICONS ?>icon_add.png" value="Add" onclick="return amAddAttributeToProduct();" title="<?php echo AM_AJAX_ADDS_ATTRIBUTE_TO_PRODUCT; ?>" border="0" />
</td>
</tr>
@@ -417,9 +417,18 @@
<?php $title[$title_num]=$k; $title_num++; endwhile; ?>
<td align="right">
- <span style="margin-right:41px;">
- <?php echo AM_AJAX_QUANTITY; ?>
+ <span style="margin-right:31px;">
+ <?php echo AM_AJAX_REF; ?>
</span>
+ <span style="margin-right:31px;">
+ <?php echo AM_AJAX_BARCODE; ?>
+ </span>
+ <span style="margin-right:31px;">
+ <?php echo AM_AJAX_QUANTITY_ALERT; ?>
+ </span>
+ <span style="margin-right:51px;">
+ <?php echo AM_AJAX_QUANTITY; ?>
+ </span>
</td>
</tr>
@@ -452,9 +461,18 @@
<?php endfor; ?>
<td align="right">
- <span style="margin-right:41px;">
- <?php echo tep_draw_input_field("productStockQuantity_$rec[products_stock_id]",'', $rec['products_stock_quantity'], ' style="margin:3px 0px 3px 0px;" size="4" onchange="return amUpdateProductStockQuantity(\''.$rec['products_stock_id'].'\');"'); ?>
+ <span style="margin-right:31px;">
+ <?php echo tep_draw_input_field("productStockRef_$rec[products_stock_id]",'', $rec['products_stock_ref'], ' style="margin:0" size="18" onchange="return amUpdateProductStockRef(\''.$rec['products_stock_id'].'\');"'); ?>
</span>
+ <span style="margin-right:31px;">
+ <?php echo tep_draw_input_field("productStockBarCode_$rec[products_stock_id]",'', $rec['products_stock_barcode'], ' style="margin:0" size="18" onchange="return amUpdateProductStockBarCode(\''.$rec['products_stock_id'].'\');"'); ?>
+ </span>
+ <span style="margin-right:31px;">
+ <?php echo tep_draw_input_field("productStockQuantityAlert_$rec[products_stock_id]",'', $rec['products_stock_quantity_alert'], ' style="margin:0" size="4" onchange="return amUpdateProductStockQuantityAlert(\''.$rec['products_stock_id'].'\');"'); ?>
+ </span>
+ <span style="margin-right:31px;">
+ <?php echo tep_draw_input_field("productStockQuantity_$rec[products_stock_id]",'', $rec['products_stock_quantity'], ' style="margin:0" size="4" onchange="return amUpdateProductStockQuantity(\''.$rec['products_stock_id'].'\');"'); ?>
+ </span>
<input type="image" border="0" onclick="return customPrompt('amRemoveStockOptionValueFromProduct','<?php echo addslashes("option_id:$rec[products_stock_id]")?>');" src="<?php echo DIR_WS_ICONS ?>icon_disable.png" title="<?php echo AM_AJAX_ADDS_ATTRIBUTE_TO_PRODUCT; ?>" />
</td>
</tr>
@@ -514,7 +532,7 @@
}
?>
<td>
- <?php echo tep_draw_input_field("stockQuantity", '', @$db_quantity, ' style="margin:3px 0px 3px 0px;" size="4"'); ?>
+ <?php echo tep_draw_input_field("stockQuantity", '', @$db_quantity, ' style="margin:0px;" size="4"'); ?>
</td>
<td valign="top">
<input type="image" src="<?php echo DIR_WS_ICONS ?>icon_add.png" value="Add" onclick="return amAddStockToProduct('<?php echo implode(",", $dropDownOptions); ?>');" title="<?php echo AM_AJAX_UPDATE_OR_INSERT_ATTRIBUTE_COMBINATIONBY_QUANTITY; ?>" border="0" /><br/>
@@ -530,4 +548,5 @@
?>
<?php
} // End QT Pro Plugin
-?>
\ No newline at end of file
+?>
+
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerInstant.class.php 2013-07-02 09:51:24 UTC (rev 4768)
@@ -43,6 +43,9 @@
$this->registerPageAction('RemoveStockOptionValueFromProduct','RemoveStockOptionValueFromProduct');
$this->registerPageAction('AddStockToProduct','AddStockToProduct');
$this->registerPageAction('updateProductStockQuantity','updateProductStockQuantity');
+ $this->registerPageAction('updateProductStockQuantityAlert','updateProductStockQuantityAlert');
+ $this->registerPageAction('updateProductStockBarCode','updateProductStockBarCode');
+ $this->registerPageAction('updateProductStockRef','updateProductStockRef');
}
if(AM_USE_SORT_ORDER) {
$this->registerPageAction('moveOption','moveOption');
@@ -335,6 +338,10 @@
function AddStockToProduct($get) {
$this->getAndPrepare('stockQuantity',$get,$stockQuantity);
$this->getAndPrepare('stockOptions',$get,$stockOptions);
+
+ if( empty($stockOptions) )
+ return false;
+
$stockOptions=substr($stockOptions,0,strlen($stockOptions)-1);
$q=amDB::query("select products_stock_id as stock_id from " . TABLE_PRODUCTS_STOCK . " where products_id ='".$this->intPID."' and products_stock_attributes='" . $stockOptions . "' order by products_stock_attributes");
if (amDB::numRows($q)>0) {
@@ -346,60 +353,15 @@
amDB::query("delete from " . TABLE_PRODUCTS_STOCK . " where products_stock_id=$stock_id");
}
} else {
- amDB::query("insert into " . TABLE_PRODUCTS_STOCK . " values (NULL," . $this->intPID . ",'".$stockOptions."'," . (int)$stockQuantity . ")");
+ amDB::query("insert into " . TABLE_PRODUCTS_STOCK . " values (NULL," . $this->intPID . ",'".$stockOptions."'," . (int)$stockQuantity . ", NULL, NULL)");
}
qtpro_update_summary_stock($get['products_id']);
return true;
-
-
-
-
-// amDB::perform(TABLE_PRODUCTS_STOCK, $data);
-
}
-
-// function addStockToProduct($get) {
-// customPrompt('debug','we are here');
-// $inputok = true;
-// // Work out how many option were sent
-// while(list($v1,$v2)=each($get)) {
-// if (preg_match("/^option(\d+)$/",$v1,$m1)) {
-// if (is_numeric($v2) and ($v2==(int)$v2)) $val_array[]=$m1[1]."-".$v2;
-// else $inputok = false;
-// }
-// }
-//
-// $this->getAndPrepare('stockQuantity',$get,$stockQuantity);
-// if (($inputok)) {
-// sort($val_array, SORT_NUMERIC);
-// $val=join(",",$val_array);
-// $q=tep_db_query("select products_stock_id as stock_id from " . TABLE_PRODUCTS_STOCK . " where products_id ='$this->intPID' and products_stock_attributes='" . $val . "' order by products_stock_attributes");
-// if (tep_db_num_rows($q)>0) {
-// $stock_item=tep_db_fetch_array($q);
-// $stock_id=$stock_item[stock_id];
-// if ($stockQuantity=intval($stockQuantity)) {
-// amDB::query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity=" . (int)$stockQuantity . " where products_stock_id=$stock_id");
-//
-// } else {
-// amDB::query("delete from " . TABLE_PRODUCTS_STOCK . " where products_stock_id=$stock_id");
-// }
-// } else {
-// amDB::query("insert into " . TABLE_PRODUCTS_STOCK . " values (0," . $this->intPID . ",'$val'," . (int)$stockQuantity . ")");
-// }
-// $q=tep_db_query("select sum(products_stock_quantity) as summa from " . TABLE_PRODUCTS_STOCK . " where products_id=" . (int)$VARS['product_id'] . " and products_stock_quantity>0");
-// $list=tep_db_fetch_array($q);
-// $summa= (empty($list[summa])) ? 0 : $list[summa];
-// amDB::query("update " . TABLE_PRODUCTS . " set products_quantity=$summa where products_id=" . $this->intPID);
-// if (($summa<1) && (STOCK_ALLOW_CHECKOUT == 'false')) {
-// amDB::query("update " . TABLE_PRODUCTS . " set products_status='0' where products_id=" . $this->intPI);
-// }
-// }
-// }
-
/**
* Updates the quantity on the products stock table
* @author Phocea
@@ -407,7 +369,6 @@
* @return void
*/
function updateProductStockQuantity($get) {
-// customprompt();
$this->getAndPrepare('products_stock_id', $get, $products_stock_id);
$this->getAndPrepare('productStockQuantity', $get, $productStockQuantity);
$data = array(
@@ -417,6 +378,60 @@
qtpro_update_summary_stock($get['products_id']);
}
+
+ /**
+ * Updates the quantity alert on the products stock table
+ * @author Phocea
+ * @param $get $_GET
+ * @return void
+ */
+ function updateProductStockQuantityAlert($get) {
+ $this->getAndPrepare('products_stock_id', $get, $products_stock_id);
+ $this->getAndPrepare('productStockQuantityAlert', $get, $productStockQuantityAlert);
+ $data = array(
+ 'products_stock_quantity_alert' => $productStockQuantityAlert
+ );
+ amDB::perform(TABLE_PRODUCTS_STOCK,$data, 'update',"products_stock_id='$products_stock_id'");
+ }
+
+ /**
+ * Updates the barcode on the products stock table
+ * @author Phocea
+ * @param $get $_GET
+ * @return void
+ */
+ function updateProductStockBarCode($get) {
+ $this->getAndPrepare('products_stock_id', $get, $products_stock_id);
+ $this->getAndPrepare('productStockBarCode', $get, $productStockBarCode);
+ $data = array(
+ 'products_stock_barcode' => $productStockBarCode
+ );
+ amDB::perform(TABLE_PRODUCTS_STOCK,$data, 'update',"products_stock_id='$products_stock_id'");
+ }
+
+ /**
+ * Updates the ref on the products stock table
+ * @author Phocea
+ * @param $get $_GET
+ * @return void
+ */
+ function updateProductStockRef($get) {
+ $this->getAndPrepare('products_stock_id', $get, $products_stock_id);
+ $this->getAndPrepare('productStockRef', $get, $productStockRef);
+
+ $messageStack=messageStack::getInstance();
+ if( ($ID = sqlproduct::GetByRef(trim($productStockRef))) && $ID != false){
+ $messageStack->add_session(__('@products ref is already used'), 'error');
+ return false;
+ }
+
+ $data = array(
+ 'products_stock_ref' => $productStockRef
+ );
+ amDB::perform(TABLE_PRODUCTS_STOCK,$data, 'update',"products_stock_id='$products_stock_id'");
+
+ return true;
+ }
// End QT Pro Plugin
/**
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/javascript/attributeManager.js
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/javascript/attributeManager.js 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/javascript/attributeManager.js 2013-07-02 09:51:24 UTC (rev 4768)
@@ -159,6 +159,22 @@
return false;
}
+function amUpdateProductStockQuantityAlert(products_stock_id) {
+// customPrompt('debug','products_stock_id:'+products_stock_id+'productStockQuantity:'+getDropDownValue('productStockQuantity_'+products_stock_id));
+ amSendRequest('amAction=updateProductStockQuantityAlert&products_stock_id='+products_stock_id+'&productStockQuantityAlert='+getDropDownValue('productStockQuantityAlert_'+products_stock_id),'',false);
+ return false;
+}
+
+function amUpdateProductStockBarCode(products_stock_id) {
+ amSendRequest('amAction=updateProductStockBarCode&products_stock_id='+products_stock_id+'&productStockBarCode='+getDropDownValue('productStockBarCode_'+products_stock_id),'',false);
+ return false;
+}
+
+function amUpdateProductStockRef(products_stock_id) {
+ amSendRequest('amAction=updateProductStockRef&products_stock_id='+products_stock_id+'&productStockRef='+getDropDownValue('productStockRef_'+products_stock_id),'',false);
+ return false;
+}
+
var check = [];
function checkBox(id) {
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php 2013-07-01 20:05:18 UTC (rev 4767)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/catalog/admin/includes/modules/products/attributeManager.php 2013-07-02 09:51:24 UTC (rev 4768)
@@ -63,7 +63,7 @@
$title= __('options(s)');
- $m='<div class="tabs_lang attributeManager">'."\n";
+ $m='<div class="attributeManager">'."\n";
if (!isset($_GET['pID'])) $m .= NOT_DISPO_PREV_SAVE;
else {
$m.='<div id="attributeManager"></div>'."\n".
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-01 20:05:24
|
Revision: 4767
http://sourceforge.net/p/oscss/svn/4767
Author: oscim
Date: 2013-07-01 20:05:18 +0000 (Mon, 01 Jul 2013)
Log Message:
-----------
Fix
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/orders/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/modules/pages/orders.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/orders/display_view.copy_to.gab
Added: trunk/catalog/admin/includes/gabarit/orders/display_view.copy_to.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.copy_to.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.copy_to.gab 2013-07-01 20:05:18 UTC (rev 4767)
@@ -0,0 +1,36 @@
+<?php
+/**
+ @licence GPL 2005-2013 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 15/05/11, 09:53
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+// orders::$order->info['orders_id']
+?>
+<h4><?php echo __('@orders heading copy to'); ?></h4>
+<hr />
+<div class="box_left">
+<?php echo tep_draw_form('orders', orders::FILENAME, tep_get_all_get_params(array('oID', 'action','forceajax','forceview')) .'action=multiconfirm'); ?>
+<p>
+
+TODO
+ - Choix du client
+ - Choix du statut
+<p/>
+ <?php /*if(tep_not_null($_POST['status_multi'])){*/ ?>
+ <p><?php //echo tep_draw_hidden_field('status_multi', '', $_POST['status_multi']).__('text info multi action detail').orders::$orders_statuses[$_POST['status_multi']]['text']; ?></p>
+ <p><?php echo tep_draw_checkbox_field('notify','','',false) . __('text info multi notify'); ?></p>
+ <p><?php echo tep_draw_checkbox_field('notify_comments', '', '', false ,'class="radio"') . __('entry notify comments') ; ?></p>
+ <p><?php echo tep_draw_textarea_field('comments', '', '30', '5', '','style="width:100%"') ; ?></p>
+ <?php /*}*/ ?>
+
+
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_delete.gif', __('image modify multi'), ' onclick="$.fancybox.close();" ') . tep_js_back(tep_href_link(orders::FILENAME), IMAGE_CANCEL); ?>
+ </div>
+</form>
+</div>
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.delete.gab 2013-07-01 16:05:40 UTC (rev 4766)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.delete.gab 2013-07-01 20:05:18 UTC (rev 4767)
@@ -12,7 +12,7 @@
?>
<h3><?php echo __('text info heading delete order'); ?></h3>
-<?php echo tep_draw_form('orders', orders::FILENAME, 'oID=' . orders::$oInfo->orders_id . '&action=deleteconfirm'); ?>
+<?php echo tep_draw_form('orders', orders::FILENAME, 'oID=' . orders::$order->info['orders_id'] . '&action=deleteconfirm'); ?>
<p><?php echo __('text info delete intro'); ?></p>
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-01 16:05:40 UTC (rev 4766)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2013-07-01 20:05:18 UTC (rev 4767)
@@ -11,6 +11,9 @@
global $price, $current_theme;
// print_r(orders::$order);
?>
+
+<h3><?php echo sprintf(__('@orders heading edit num %s ref %s'),orders::$order->info['orders_id'] , orders::$order->info['orders_prefix'] ) ; ?></h3>
+
<div class="box_uniq main-orders">
<div id="tabs">
@@ -703,10 +706,10 @@
<td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
<td><?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'trash'), '', tep_href_link(orders::FILENAME, 'file_type=packingslip&action=deletefile&id='.$_GET['oID'].'&oID='.$_GET['oID']) ,'' ) ; ?></td>
</tr>
- <?php else: ?>
+ <?php elseif(_cst_bool('USE_LOCAL_GENERAT_PDF')): ?>
<tr>
<td colspan="3"> </td>
- <td><?php if(!_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action')).'action=pdf&forceview=pdf&file_type=packingslip&id='.$_GET['oID']) . '" >' . __('pdf generate') . '</a>' ; ?> </td>
+ <td><?php echo '<a class="button" href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action')).'action=pdf&forceview=pdf&file_type=packingslip&id='.$_GET['oID']) . '" >' . __('pdf generate') . '</a>' ; ?> </td>
</tr>
<?php endif; ?>
@@ -725,10 +728,10 @@
<td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
<td><?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'trash'), '', tep_href_link(orders::FILENAME, 'file_type=delivery&action=deletefile&id='.$ashipping->row_id.'&oID='.$_GET['oID']) ,'' ) ; ?></td>
</tr>
- <?php else: ?>
+ <?php elseif(_cst_bool('USE_LOCAL_GENERAT_PDF')): ?>
<tr>
<td colspan="3"> </td>
- <td><?php if(!_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action')).'action=pdf&forceview=pdf&file_type=delivery&id='.$ashipping->row_id) . '" >' . __('pdf generate') . '</a>' ; ?> </td>
+ <td><?php echo '<a class="button" href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action')).'action=pdf&forceview=pdf&file_type=delivery&id='.$ashipping->row_id) . '" >' . __('pdf generate') . '</a>' ; ?> </td>
</tr>
<?php endif; ?>
<?php endif; ?>
@@ -747,10 +750,10 @@
<td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
<td><?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'trash'), '', tep_href_link(orders::FILENAME, 'file_type=invoice&action=deletefile&id='.$_GET['oID'].'&oID='.$_GET['oID']) ,'' ) ; ?></td>
</tr>
- <?php else: ?>
+ <?php elseif(_cst_bool('USE_LOCAL_GENERAT_PDF')): ?>
<tr>
<td colspan="3"> </td>
- <td><?php if(!_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(orders::FILENAME , tep_get_all_get_params(array('page_admin','action','forceview')).'action=pdf&forceview=pdf&file_type=invoice&id='.$_GET['oID']) . '">' . __('pdf generate') . '</a>' ; ?></td>
+ <td><?php echo '<a class="button" href="' . tep_href_link(orders::FILENAME , tep_get_all_get_params(array('page_admin','action','forceview')).'action=pdf&forceview=pdf&file_type=invoice&id='.$_GET['oID']) . '">' . __('pdf generate') . '</a>' ; ?></td>
</tr>
<?php endif; ?>
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-01 16:05:40 UTC (rev 4766)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2013-07-01 20:05:18 UTC (rev 4767)
@@ -581,55 +581,64 @@
case 'multiconfirm':
$res=array();
- $status = tep_db_prepare_input(@$_POST['status_multi']);
-// $modeexport = tep_db_prepare_input(@$_POST['modeexport']);
- $notify =(isset($_POST['notify'])) ? tep_db_prepare_input($_POST['notify']): '';
- $comments= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
- if(isset($_POST['action_multi']) && is_array($_POST['action_multi']) ) {
+ if(!isset($_POST['status_multi']) || empty($_POST['status_multi']))
+ $res[]=false;
- if(isset($_POST['status_multi'])){
- foreach($_POST['action_multi'] as $oID )
- if (up_status_order($oID, array('status'=>$status,'comments'=>'', 'notify'=>$notify, 'comments'=> $comments) ) ) $res[]=true;
- else $res[]=false;
- }
+ if(!isset($_POST['action_multi']) || !is_array($_POST['action_multi']) )
+ $res[]=false;
+ if (!in_array(false,$res)) {
+ $status = tep_db_prepare_input(@$_POST['status_multi']);
- if(isset($_POST['modeexport'])){
+ $notify =(isset($_POST['notify'])) ? tep_db_prepare_input($_POST['notify']): '';
+ $comments= (isset($_POST['comments'])) ? tep_db_prepare_input($_POST['comments']) :'';
- $modeexport=tep_db_prepare_input($_POST['modeexport']);
- $encodage=tep_db_prepare_input($_POST['encodage']);
- $export_type=tep_db_prepare_input($_POST['export_type']);
- $od=array();
+ foreach($_POST['action_multi'] as $oID )
+ if (up_status_order($oID, $status, array('status'=>$status,'comments'=>'', 'notify'=>$notify, 'comments'=> $comments) ) )
+ $res[]=true;
+ else
+ $res[]=false;
- self::$export->pre_export(array( 'mode' => $modeexport, 'encodage'=>$encodage, 'export_type'=>$export_type, 'page_admin'=>$page_module));
- foreach($_POST['action_multi'] as $oID ){
- $order = new order((int)$oID);
- $qer=tep_db_query("SELECT countries_iso_code_2 FROM " . TABLE_COUNTRIES . " WHERE countries_name='".$order->customer['country']."' ");
- $c=tep_db_fetch_array($qer);
+ if(isset($_POST['modeexport'])){
- $od[]=array('IDExpedition'=>$oID,
- 'IDCustomer'=>$order->customer['id'],
- 'Namecustomer'=>self::$export->decodage($order->customer['name']),
- 'Compagnycustomer'=>self::$export->decodage($order->customer['company']),
- 'Streetadress'=>self::$export->decodage($order->delivery['street_address']),
- 'Streetadress2'=>self::$export->decodage($order->delivery['suburb']) ,
- 'Cityshipping'=>self::$export->decodage($order->delivery['city']),
- 'Stateshipping'=>self::$export->decodage($order->customer['state']) ,
- 'telephone'=>self::$export->decodage($order->customer['telephone']),
- 'postcode'=>self::$export->decodage($order->delivery['postcode']),
- 'codecountryiso'=>$c['countries_iso_code_2'],
- 'weight'=>round($order->info['total_weight'],3),
- 'Contreremb'=>'');
- }
+ $modeexport=tep_db_prepare_input($_POST['modeexport']);
+ $encodage=tep_db_prepare_input($_POST['encodage']);
+ $export_type=tep_db_prepare_input($_POST['export_type']);
+ $od=array();
- print self::$export->op_export($od);
+ self::$export->pre_export(array( 'mode' => $modeexport, 'encodage'=>$encodage, 'export_type'=>$export_type, 'page_admin'=>$page_module));
+
+ foreach($_POST['action_multi'] as $oID ){
+
+ $order = new order((int)$oID);
+ $qer=tep_db_query("SELECT countries_iso_code_2 FROM " . TABLE_COUNTRIES . " WHERE countries_name='".$order->customer['country']."' ");
+ $c=tep_db_fetch_array($qer);
+
+ $od[]=array('IDExpedition'=>$oID,
+ 'IDCustomer'=>$order->customer['id'],
+ 'Namecustomer'=>self::$export->decodage($order->customer['name']),
+ 'Compagnycustomer'=>self::$export->decodage($order->customer['company']),
+ 'Streetadress'=>self::$export->decodage($order->delivery['street_address']),
+ 'Streetadress2'=>self::$export->decodage($order->delivery['suburb']) ,
+ 'Cityshipping'=>self::$export->decodage($order->delivery['city']),
+ 'Stateshipping'=>self::$export->decodage($order->customer['state']) ,
+ 'telephone'=>self::$export->decodage($order->customer['telephone']),
+ 'postcode'=>self::$export->decodage($order->delivery['postcode']),
+ 'codecountryiso'=>$c['countries_iso_code_2'],
+ 'weight'=>round($order->info['total_weight'],3),
+ 'Contreremb'=>'');
}
+
+ print self::$export->op_export($od);
+ }
}
- if (in_array(false,$res)) $messageStack->add_session(__('success order updated'), 'success');
- else $messageStack->add_session(__('warning order not updated'), 'warning');
+ if (!in_array(false,$res))
+ $messageStack->add_session(__('success order updated'), 'success');
+ else
+ $messageStack->add_session(__('warning order not updated'), 'warning');
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -649,6 +658,7 @@
$new_st = substr((int)$status,0,1);
else
$new_st = $status;
+
switch($new_st){
case DEFAULT_ORDERS_STATUS_PAYED:
if( ! _cst_bool('USE_LOCAL_GENERAT_PDF')) {
@@ -657,10 +667,9 @@
$_REQUEST['file_type'] = 'invoice';
self::check_action('pdf');
self::$action=$actions;
+ }
- $r = sqlorder::update(array('id'=>$oID, 'status'=>DEFAULT_ORDERS_STATUS_COMPLETED, 'comments'=>__('@orders txt close and numero facture')));
-
- }
+ $r = sqlorder::update(array('id'=>$oID, 'status'=>DEFAULT_ORDERS_STATUS_COMPLETED, 'comments'=>__('@orders txt close and numero facture')));
break;
case DEFAULT_ORDERS_STATUS_ANNULATE:
break;
@@ -940,6 +949,7 @@
case 'export';
break;
+
case 'edit':
$activ_add = array();
@@ -1116,14 +1126,15 @@
return $res;
break;
+// case 'copy_to':
case 'delete';
default:
$orders_query_raw = "select distinct o.orders_id,o.orders_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 orders_status_name, s.status_color as orders_status_color,ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_STATUS . " s where o.orders_status = s.status_id and s.status_type='orders' and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.orders_id='".self::$oID."' ";
- $currency_query = $DB->query($orders_query_raw);
+ $_query = $DB->query($orders_query_raw);
- return new objectInfo($currency_query->fetchAssoc() );
+ return new objectInfo($_query->fetchAssoc() );
}
}
@@ -1148,12 +1159,12 @@
/**
@remarks Normal View Page
*/
- case 'delete':
- if(self::test_oID((int)self::$oID)) {
- self::$oInfo=self::GetDBValue();
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
- }
- break;
+// case 'delete':
+// if(self::test_oID((int)self::$oID)) {
+// self::$oInfo=self::GetDBValue();
+// return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+// }
+// break;
case 'multi':
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
@@ -1166,17 +1177,17 @@
}
break;
+ case 'delete':
+ case 'edit':
+ case 'copy_to':
+ if(!self::test_oID((int)self::$oID))
+ break;
case 'new':
- self::$cInfo=self::GetDBValue();
+ self::$order=self::GetDBValue();
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
- case 'edit':
- self::$order= self::GetDBValue();
-
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
- break;
default:
self::load_db_values();
/// use master gabarit
@@ -1299,11 +1310,22 @@
@return string
*/
private static function get_item_action($orders){
+
+ $action_str='';
+
+ if(tep_action_check('copy_to', self::FILENAME))
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_COPY_TO, 'copyto'), '', tep_href_link(self::FILENAME, 'oID=' . $orders['oID'] . '&action=copy_to') ,'' );
+ if(tep_action_check('edit', self::FILENAME))
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'oID=' . $orders['oID'] . '&action=edit') ,'' );
+ if(tep_action_check('delete', self::FILENAME))
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'oID=' . $orders['oID'] . '&action=delete') ,'' );
+// $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_COPY_TO, 'copyto'), 'fancy', tep_href_link(self::FILENAME, 'pID=' . $products['id'] . '&action=copy_to') ,'' );
+
+
return sprintf(
CsrtAction::getFormat('row_action'),
'' ,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'oID=' . $orders['oID'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'oID=' . $orders['oID'] . '&action=delete') ,'' )
+ $action_str
);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-01 16:05:43
|
Revision: 4766
http://sourceforge.net/p/oscss/svn/4766
Author: oscim
Date: 2013-07-01 16:05:40 +0000 (Mon, 01 Jul 2013)
Log Message:
-----------
Fix
Modified Paths:
--------------
trunk/catalog/includes/languages/fr_FR/fr_FR.php
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products_attributes.sql
Modified: trunk/catalog/includes/languages/fr_FR/fr_FR.php
===================================================================
--- trunk/catalog/includes/languages/fr_FR/fr_FR.php 2013-07-01 13:54:49 UTC (rev 4765)
+++ trunk/catalog/includes/languages/fr_FR/fr_FR.php 2013-07-01 16:05:40 UTC (rev 4766)
@@ -195,13 +195,13 @@
define('ENTRY_COMPANY_TAX_ID_TEXT',"" );
define('ENTRY_GENDER',"Civilité :" );
define('ENTRY_GENDER_ERROR',"Veuillez choisir votre genre." );
-define('ENTRY_GENDER_TEXT',"*" );
+// define('ENTRY_GENDER_TEXT',"*" );
define('ENTRY_FIRST_NAME',"Prénom :" );
define('ENTRY_FIRST_NAME_ERROR',"Votre prénom doit contenir un minimum de " . ENTRY_FIRST_NAME_MIN_LENGTH . " caractères." );
-define('ENTRY_FIRST_NAME_TEXT',"*" );
+// define('ENTRY_FIRST_NAME_TEXT',"*" );
define('ENTRY_LAST_NAME',"Nom :" );
define('ENTRY_LAST_NAME_ERROR',"Votre nom doit contenir un minimum de " . ENTRY_LAST_NAME_MIN_LENGTH . " caractères." );
-define('ENTRY_LAST_NAME_TEXT',"*" );
+// define('ENTRY_LAST_NAME_TEXT',"*" );
define('ENTRY_DATE_OF_BIRTH',"Date de naissance :" );
define('ENTRY_DATE_OF_BIRTH_ERROR',"Votre date de naissance doit avoir ce format : JJ/MM/AAAA (ex. 21/05/1970)" );
define('ENTRY_DATE_OF_BIRTH_TEXT'," (ex. 21/05/1970)" );
@@ -209,29 +209,25 @@
define('ENTRY_EMAIL_ADDRESS_ERROR',"Votre adresse e-mail doit contenir un minimum de " . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . " caractères." );
define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR',"Votre adresse e-mail ne semble pas être valide - veuillez effectuer toutes les corrections nécessaires." );
define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS',"Votre adresse e-mail est déjà enregistrée sur notre site - Veuillez ouvrir une session avec cette adresse e-mail ou créez un compte avec une adresse différente." );
-define('ENTRY_EMAIL_ADDRESS_TEXT',"*" );
+// define('ENTRY_EMAIL_ADDRESS_TEXT',"*" );
define('ENTRY_STREET_ADDRESS',"Adresse :" );
define('ENTRY_STREET_ADDRESS_ERROR',"Votre adresse doit contenir un minimum de " . ENTRY_STREET_ADDRESS_MIN_LENGTH . " caractères." );
-define('ENTRY_STREET_ADDRESS_TEXT',"*" );
+// define('ENTRY_STREET_ADDRESS_TEXT',"*" );
define('ENTRY_SUBURB',"Complément d'adresse :" );
define('ENTRY_SUBURB_ERROR',"" );
define('ENTRY_SUBURB_TEXT',"" );
define('ENTRY_POST_CODE',"Code postal :" );
define('ENTRY_POST_CODE_ERROR',"Votre code postal doit contenir un minimum de " . ENTRY_POSTCODE_MIN_LENGTH . " caractères." );
-define('ENTRY_POST_CODE_TEXT',"*" );
+// define('ENTRY_POST_CODE_TEXT',"*" );
define('ENTRY_CITY',"Ville: " );
define('ENTRY_CITY_ERROR',"Votre ville doit contenir un minimum de " . ENTRY_CITY_MIN_LENGTH . " caractères." );
-define('ENTRY_CITY_TEXT',"*" );
define('ENTRY_STATE',"état/Département :" );
define('ENTRY_STATE_ERROR',"Votre état doit contenir un minimum de " . ENTRY_STATE_MIN_LENGTH . " caractères." );
define('ENTRY_STATE_ERROR_SELECT',"Veuillez choisir un état à partir de la liste déroulante." );
-define('ENTRY_STATE_TEXT',"*" );
define('ENTRY_COUNTRY',"Pays :" );
define('ENTRY_COUNTRY_ERROR',"Veuillez choisir un pays à partir de la liste déroulante." );
-define('ENTRY_COUNTRY_TEXT',"*" );
define('ENTRY_TELEPHONE_NUMBER',"Numéro de téléphone :" );
define('ENTRY_TELEPHONE_NUMBER_ERROR',"Votre numéro de téléphone doit contenir un minimum de " . ENTRY_TELEPHONE_MIN_LENGTH . " caractères." );
-define('ENTRY_TELEPHONE_NUMBER_TEXT',"*" );
define('ENTRY_FAX_NUMBER',"Numéro de fax :" );
define('ENTRY_FAX_NUMBER_ERROR',"" );
define('ENTRY_FAX_NUMBER_TEXT',"" );
@@ -243,14 +239,10 @@
define('ENTRY_PASSWORD',"Mot de passe :" );
define('ENTRY_PASSWORD_ERROR',"Votre mot de passe doit contenir un minimum de " . ENTRY_PASSWORD_MIN_LENGTH . " caractères." );
define('ENTRY_PASSWORD_ERROR_NOT_MATCHING',"Le mot de passe de confirmation doit être identique à votre mot de passe." );
-define('ENTRY_PASSWORD_TEXT',"*" );
define('ENTRY_PASSWORD_CONFIRMATION',"Confirmation du mot de passe :" );
-define('ENTRY_PASSWORD_CONFIRMATION_TEXT',"*" );
define('ENTRY_PASSWORD_CURRENT',"Mot de passe actuel :" );
-define('ENTRY_PASSWORD_CURRENT_TEXT',"*" );
define('ENTRY_PASSWORD_CURRENT_ERROR',"Votre mot de passe doit contenir un minimum de " . ENTRY_PASSWORD_MIN_LENGTH . " caractères." );
define('ENTRY_PASSWORD_NEW',"Nouveau mot de passe :" );
-define('ENTRY_PASSWORD_NEW_TEXT',"*" );
define('ENTRY_PASSWORD_NEW_ERROR',"Votre nouveau mot de passe doit contenir un minimum de " . ENTRY_PASSWORD_MIN_LENGTH . " caractères." );
define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING',"Le mot de passe de confirmation doit être identique à votre nouveau mot de passe." );
define('PASSWORD_HIDDEN',"--CACHE--" );
@@ -395,7 +387,7 @@
define('TEXT_PRODUCT_OPTIONS',"Options disponibles" );
// no touch
-define('TEXT_FIELD_REQUIRED', FORM_REQUIRED_INFORMATION );
+define('TEXT_FIELD_REQUIRED', ' *' );
/*
The following copyright announcement can only be
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products_attributes.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products_attributes.sql 2013-07-01 13:54:49 UTC (rev 4765)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products_attributes.sql 2013-07-01 16:05:40 UTC (rev 4766)
@@ -17,6 +17,8 @@
orders_products_attributes_id int(11) not null auto_increment,
orders_id int(11) default '0' not null ,
orders_products_id int(11) default '0' not null ,
+ products_options_id int(11) NOT NULL,
+ products_options_values_id int(11) NOT NULL,
products_options varchar(32) not null ,
products_options_values varchar(32) not null ,
options_values_price decimal(15,4) default '0.0000' not null ,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-07-01 13:54:52
|
Revision: 4765
http://sourceforge.net/p/oscss/svn/4765
Author: oscim
Date: 2013-07-01 13:54:49 +0000 (Mon, 01 Jul 2013)
Log Message:
-----------
Fix less and path image
Fix bug in order class after last update
fix path file in install manufacturers
Modified Paths:
--------------
trunk/catalog/admin/includes/template/defaut/css/less/styles.less
trunk/catalog/admin/includes/template/oscss/css/less/styles.less
trunk/catalog/common/classes/order.php
trunk/extensions/MANUFACTURERS_stable/install.xml
Modified: trunk/catalog/admin/includes/template/defaut/css/less/styles.less
===================================================================
--- trunk/catalog/admin/includes/template/defaut/css/less/styles.less 2013-06-30 14:57:45 UTC (rev 4764)
+++ trunk/catalog/admin/includes/template/defaut/css/less/styles.less 2013-07-01 13:54:49 UTC (rev 4765)
@@ -9,7 +9,7 @@
*/
/**
- * Mixin
+ * Mixin
*/
.wrap () {
@@ -23,19 +23,19 @@
* Retro-compatibilte oscommerce oscss < 2.xx
*/
/* info box block droit */
-.infoBoxHeading {
- background-color: #ffffff;
- border-width:0;
+.infoBoxHeading {
+ background-color: #ffffff;
+ border-width:0;
.rounded(5px);
}
-.infoBoxContent{
- border-width: 0px 1px 0px 1px;
- border-color: #E6E6E6;
- border-style: solid;
- padding: 2px 2px 5px 10px;
- font-size: 10px;
- color: #000;
- background-color: #f1f1f1;
+.infoBoxContent{
+ border-width: 0px 1px 0px 1px;
+ border-color: #E6E6E6;
+ border-style: solid;
+ padding: 2px 2px 5px 10px;
+ font-size: 10px;
+ color: #000;
+ background-color: #f1f1f1;
list-style:none;
line-height:1.7em;
.rounded(5px);
@@ -66,7 +66,7 @@
img { border:0 ; margin:0; padding:0; }
h1 { font-size:(@font_size * 1) ; padding:(@padding_base * 2); }
h2 { font-size:(@font_size * 1.2) ;}
-h3 {
+h3 {
clear:both;
color: @title_h3_color;
font-size: (@font_size * 1.9);
@@ -78,9 +78,9 @@
h5 { font-size: @font_size ;text-shadow:0 1px 0 #fff;}
p {padding:1em;}
ul {list-style:none;}
-th {
- margin:2px 1px;
- text-align: left;
+th {
+ margin:2px 1px;
+ text-align: left;
padding: 2px @padding_base;
height:@lineheight;
line-height:(@lineheight * 0.7);
@@ -89,8 +89,8 @@
-/**
- * general class
+/**
+ * general class
*/
.error{ color:@field_required; }
.alert{ color:#ae0405; }
@@ -136,11 +136,11 @@
h4.Ctrtirroir,
h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 (@padding_base * 2); font-size: (@font_size * 1.1); }
.Ctrtirroir {
- background:transparent url("../../../../../images/icons/icon_down.gif") left top no-repeat;
- padding-left:20px;
- height:@lineheight;
+ background:transparent url("../../../images/icons/icon_down.gif") left top no-repeat;
+ padding-left:20px;
+ height:@lineheight;
}
-.Ctrtirroir.closed {background:transparent url("../../../../../images/icons/icon_arrow_right.gif") left top no-repeat; }
+.Ctrtirroir.closed {background:transparent url("../../../images/icons/icon_arrow_right.gif") left top no-repeat; }
fieldset ul.tirroir li { float: left; position: relative; width: 100%;}
@@ -152,12 +152,12 @@
width:(@display_width * 0.75 ) ;
display:block;
position: fixed;
- margin: 10px 1%;
+ margin: 10px 1%;
right: 0;
top:0;
z-index:99;
-
+
p{
padding:0;
margin:0;
@@ -173,28 +173,28 @@
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;
+ margin:0 2px;
cursor : pointer;
- background:transparent url("../../../../../images/check-off.png") center center no-repeat;
+ background:transparent url("../../../images/check-off.png") center center no-repeat;
font-size:0;
-
+
&:hover{
opacity : 0.6;
}
}
}
-
-
+
+
}
@@ -204,33 +204,33 @@
-body {
- background:#faf9f7 ;
- background-attachment:fixed;
- font: normal @font_size Verdana, Arial, sans-serif;
+body {
+ background:#faf9f7 ;
+ background-attachment:fixed;
+ font: normal @font_size Verdana, Arial, sans-serif;
}
/**
- * Structure base html
+ * Structure base html
* no specific forms (cf section forms )
*/
.configuration{
div#central{
-
+
div#ssmenu{
display: block;
- height: ( @lineheight * 1.5);
- line-height: ( @lineheight * 1.5);
+ height: ( @lineheight * 1.5);
+ line-height: ( @lineheight * 1.5);
padding: 5px 10px;
width: 100%;
}
-
- div.box_right {
- right:0;
- width:39%;
-
+
+ div.box_right {
+ right:0;
+ width:39%;
+
ul{ list-style:none; }
}
}
@@ -240,90 +240,90 @@
// div#central{
// }
// }
-
+
div#glob {
- width:100%;
- z-index:10;
+ width:100%;
+ z-index:10;
height:100%;
-
-
+
+
div#central{
- position:relative;
- padding:10px 5px;
+ position:relative;
+ padding:10px 5px;
top:79px;
margin-bottom: 79px;
// border-left: 1px solid black;
// border-right: 1px solid black;
// border-bottom: 1px solid black;
background:@color_011;
-
- div.box_uniq {
- width:100%;
- float:left;
+
+ div.box_uniq {
+ width:100%;
+ float:left;
padding: 0;
background:none;
}
-
+
div.box_left { width:60%; float:left; }
-
+
div.box_right {
- width:39%;
- float:right;
+ width:39%;
+ float:right;
}
-
+
h4{font-weight:bold; padding:15px 5px 8px; clear:both; }
}
-
+
}
-
+
div#center,
- div#bas {
- margin: 0 auto;
- position: relative;
+ div#bas {
+ margin: 0 auto;
+ position: relative;
min-width:@display_max_width;
width:@display_width ;
}
-
- div#bas {
- // margin-top:8em;
- clear:both;
- height:25px;
+
+ div#bas {
+ // margin-top:8em;
+ clear:both;
+ height:25px;
background:@bas_bg;
color:@bas_bg_txt;
-
+
a,
- a:link,
+ a:link,
a:visited {
text-shadow : none;
padding: 4px 25px;
color:(@bas_bg_txt + #015);
}
-
+
}
- footer {
- background: @footer_bg;
- clear:both;width:100%;
+ footer {
+ background: @footer_bg;
+ clear:both;width:100%;
text-align:center;
color:@footer_bg_txt;
-
+
a,
- a:link,
- a:visited {
+ a:link,
+ a:visited {
color: (@footer_bg_txt + #015);
- text-decoration: none;
-
+ text-decoration: none;
+
&:hover{
- text-decoration: underline;
+ text-decoration: underline;
}
}
}
-
-
-
-
- /**
- * Bouton
+
+
+
+
+ /**
+ * Bouton
*/
.button,
select.button,
@@ -342,7 +342,7 @@
line-height: 25px;
margin:8px 20px;
text-shadow: none;
-
+
.rounded(5px);
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
@@ -352,21 +352,21 @@
height:( @lineheight * 1.3);
width:18px;
}
-
+
input.button,
button.button{font-size:@font_size; background:#ccc;padding:2px 5px; }
-
-
+
+
a.button{ padding:2px 5px; margin:10px 20px ;text-decoration:none; height:( @lineheight * 1.3) ; line-height:( @lineheight * 1.3);}
a.button:hover{color:@color_011;text-decoration:none; }
-
+
a.button,
select.button,
input.button,
- button.button {
+ button.button {
.gradient( @color_bouton_cl_1, @color_bouton_cl_2, @color_bouton_cl_3) ;
}
-
+
a.button.ActionYes,
input.button.ActionYes,
input[type=image].button.ActionYes,
@@ -374,73 +374,73 @@
button.button.ActionYes {
.gradient( @color_bouton_submit_cl_1, @color_bouton_submit_cl_2, @color_bouton_submit_cl_3) ;
}
-
+
a.button.ActionBack,
input[type=image].button.ActionBack,
button.button.ActionBack {
color:@color_011;
.gradient( @color_bouton_back_cl_1, @color_bouton_back_cl_3, @color_bouton_back_cl_2) ;
}
-
-
+
+
input:hover.button,
button:hover.button{background:#797979;color:@color_011;}
-
+
a:hover.button,
input:hover.button,
button:hover.button {
.gradient( @color_bouton_cl_1, @color_bouton_cl_3, @color_bouton_cl_2) ;
opacity:0.6;
}
-
+
a:hover.button.ActionYes,
input:hover.button.ActionYes,
button:hover.button.ActionYes {
.gradient( @color_bouton_submit_cl_1, @color_bouton_submit_cl_3, @color_bouton_submit_cl_2) ;
color:black;
}
-
+
a.button.ActionBack,
input.button.ActionBack,
button.button.ActionBack {
color:@color_011;
.gradient( @color_bouton_back_cl_1, @color_bouton_back_cl_2, @color_bouton_back_cl_3) ;
}
-
+
a:hover.button.ActionBack,
input:hover.button.ActionBack,
button:hover.button.ActionBack {
.gradient( @color_bouton_back_cl_1, @color_bouton_back_cl_3, @color_bouton_back_cl_2) ;
}
-
+
input[type=image].button,
a.buttonimg img{ opacity:1;}
-
+
input[type=image]:hover.button ,
a:hover.buttonimg img,
a.buttonimg img:hover{ opacity:0.6;}
-
+
/* Spe buttons broswer img */
a.button.browser {height:24px;}
a.button img {vertical-align:middle;margin:0.3em 0.3em 0 0;}
.row_action a.button {margin:0;}
-
-
+
+
/* Block html content all bouton */
.button_nav{
clear:both;
-
+
form{
- float:right;
+ float:right;
width:100px;
-
+
p {margin:0;padding:0;}
}
}
-
-
- /**
- * Section for block widget in dashbord
+
+
+ /**
+ * Section for block widget in dashbord
*/
.widget{
float: left;
@@ -449,62 +449,62 @@
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
+
h3 {
color: @color_widget_title;
- clear: both;
- margin-bottom:@margin;
+ clear: both;
+ margin-bottom:@margin;
padding:5px 0 5px 5px;
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
-
+
a{
color: @color_widget_title;
text-decoration:none;
-
+
&:hover{
color: gray;
}
}
}
-
+
ol {padding-left:25px;}
-
+
.dataTableBase tr{
- background-color: #F0F0F0;
-
- th {
- height: 20px;
+ background-color: #F0F0F0;
+
+ th {
+ height: 20px;
line-height: 20px;
background : @color_widget_bg_th;
}
-
+
&:nth-child(odd) {
- background-color: #D7D7D7;
+ background-color: #D7D7D7;
}
-
+
a{
font-weight : bold;
color: @color_widget_bg_th;
}
}
-
-
+
+
/* sous menu en widget , specifique page conf et dashboard configuration */
div#ssmenu{
- a {
- background: none repeat scroll 0 0 #797979;
- border-right: 1px solid #444444;
- clear: both;
- color: @color_011;
- font-size: @font_size;
- margin: 0 0 1px 25px;
- padding: 5px 10px;
- text-shadow: 0 1px 0 #000000;
+ a {
+ background: none repeat scroll 0 0 #797979;
+ border-right: 1px solid #444444;
+ clear: both;
+ color: @color_011;
+ font-size: @font_size;
+ margin: 0 0 1px 25px;
+ padding: 5px 10px;
+ text-shadow: 0 1px 0 #000000;
width: 40%;
-
- &:hover {
- float:left;
+
+ &:hover {
+ float:left;
margin:0;
background:#eee;
color:#000;
@@ -513,8 +513,8 @@
}
}
}
-
-
+
+
.edit{
background:#eee;
background-attachment:none;
@@ -523,10 +523,10 @@
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
-
-
-
+
+
+
/**
* class qui rend element enfant visible au survol de l'element parent
*/
@@ -537,12 +537,12 @@
.dataTable tr:hover .view.fils,
.dataTableRow.Selected .view.fils,
.view.parent:hover .view.fils{display:block;height:13px}
-
-
-
-
+
+
+
+
/**
- * Listing Filter for Datatable
+ * Listing Filter for Datatable
*/
div#central form#filters {
padding:0;
@@ -552,89 +552,89 @@
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
.border-radius( 5px, 5px, 5px, 5px);
.rounded(5px);
-
- p.Ctrtirroir {
- padding: 2px 10px 2px 20px;
- font-size:(@font_size*1.2);
- width:95.2%;
- color: #000000;
- font-weight: bold;
-
+
+ p.Ctrtirroir {
+ padding: 2px 10px 2px 20px;
+ font-size:(@font_size*1.2);
+ width:95.2%;
+ color: #000000;
+ font-weight: bold;
+
&:hover {
background-color: @bg_hover;
- cursor:pointer;
+ cursor:pointer;
}
}
-
+
div#filtre {
padding:0;
border:1px solid #AAAAAA;
- background: transparent;
-
+ background: transparent;
+
ul.ui-tabs-nav {
width:99.6%;
-
+
li{
line-height:1em;
width:auto;
}
}
}
-
+
fieldset label{width:auto;}
-
+
li.select{
color : @color_tab_text_selected ;
}
}
-
-
-
+
+
+
/**
- * Forms
+ * Forms
*/
-
+
input.radioInput {width:30px;}
-
+
div#form_bt { width: 80%; margin: 1em 2em;}
ul.form_radio_inline{display:inline-block;}
.noselected{}
- .selected{background:#f0d4bf;}
+ .selected{background:#f0d4bf;}
.color_type {display: inline-block; padding: 6px 0 6px 5px;background: none repeat scroll 0 0 transparent;}
-
-
+
+
div#central form#configuration p input[type="text"] { margin:5px 15px;width:60%; }
-
+
/* Select Categorie */
div#central #CurrentPathSelect *,
div#central #CurrentPathSelect form {
- margin:@margin 0;
- padding:0;
+ margin:@margin 0;
+ padding:0;
width:100%;
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
- select#cPath {
- margin:0;
- font-size:(@font_size * 1.3);
- color:black;
- font-weight:bold;
- padding:0.2em 0.6em;
+
+ select#cPath {
+ margin:0;
+ font-size:(@font_size * 1.3);
+ color:black;
+ font-weight:bold;
+ padding:0.2em 0.6em;
height: (@lineheight * 1.8) ;
-
+
&:hover {background-color: @bg_hover;cursor:pointer; }
-
+
option {
- margin:0;
+ margin:0;
background-color:#f5f5f5;
}
}
}
-
-
+
+
/**
- * Section specific Orders page
+ * Section specific Orders page
*/
.main-orders{
fieldset{
@@ -643,67 +643,67 @@
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
-
+
.box_uniq.block_form{
fieldset{
margin:1% 2%;
padding:0 1%;
}
-
+
.w_50 {
width:44%;
}
}
-
+
block_input{
br,
span.value_edit br{display:block;height:0;}
}
-
+
table.main-orders {
margin:1%;
width:98%;
-
+
thead tr th{
- background:@color_013;
+ background:@color_013;
color:@color_011;
- font-weight: normal;
+ font-weight: normal;
text-shadow: none;
}
-
+
tr th{
- margin:0;
- background:#eee;
+ margin:0;
+ background:#eee;
height:(@lineheight * 1.3);
line-height:(@lineheight * 0.5);
}
}
-
+
.block {
width: 46%;
margin:@margin (@margin / 2);
- background:#c9c9c9;
+ background:#c9c9c9;
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
+
}
}
-
+
/* Ajsutement customer page */
div#central .box_uniq.block_form.main-customers .block_input label{width:35%;}
-
-
+
+
/**
* External - plugin - others
*/
div#fancybox-outer {
background:none;
border:none !important;
-
+
div#fancybox-content {
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon) ;
.border-radius(0,5px,5px,0);
-
+
h3{
color:@color_title_txt;
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
@@ -713,36 +713,36 @@
}
/* popup form by fancy . complet independant external css file specific for fancy in /javascript/jquery.fancy */
div#fancybox-inner{
- h3 {
+ h3 {
color:@color_title_txt;
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
.border-radius(5px,0,0,5px);
}
-
+
form {
float:left;
position: relative;
top:20px;
- padding: 0 0 30px;
+ padding: 0 0 30px;
margin:0 0 30px 0;
-
+
h3{ top: -25px;}
-
- fieldset {
- margin: 5px;
- padding:5pxem;
- border:none;
-
+
+ fieldset {
+ margin: 5px;
+ padding:5pxem;
+ border:none;
+
label { width: 100%; line-height: 18px; margin-right: 10px; display:inline-block; text-align: left; padding: 0 0 2px 0;}
-
+
select,
input[type="text"] { min-width:65%; display:inline-block;float:right;}
-
+
.button_nav {bottom: 0; position: absolute; right: 0 ; height:25px;}
}
}
}
- // UI
+ // UI
/* Layout helpers */
.ui-dialog {
.ui-widget-header{
@@ -754,164 +754,164 @@
.border-radius(0,5px,5px,0);
}
}
-
+
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: (@lineheight * 0.9); text-decoration: none; font-size: @font_size; list-style: none; }
- .ui-helper-clearfix {
- zoom: 1;
-
- &:before,
+ .ui-helper-clearfix {
+ zoom: 1;
+
+ &:before,
&:after { content: ""; display: table; }
&:after { clear: both; }
}
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
- /* Interaction states */
- .ui-state-default,
- .ui-widget-content .ui-state-default,
- .ui-widget-header .ui-state-default {
- font-weight: normal;
- color: @color_tab_text_default;
+
+
+ /* Interaction states */
+ .ui-state-default,
+ .ui-widget-content .ui-state-default,
+ .ui-widget-header .ui-state-default {
+ font-weight: normal;
+ color: @color_tab_text_default;
text-shadow : 0 1px 0 @color_tab_text_default_shadow;
- border-bottom:2px solid @color_tabs_cl_1;
+ border-bottom:2px solid @color_tabs_cl_1;
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
-
- a,
- a:link,
- a:visited {
- color: @color_tab_text_default;
- text-decoration: none;
+
+ a,
+ a:link,
+ a:visited {
+ color: @color_tab_text_default;
+ text-decoration: none;
text-shadow : 0 1px 0 @color_tab_text_hover_shadow;
}
}
-
- .ui-state-hover,
- .ui-widget-content .ui-state-hover,
- .ui-widget-header .ui-state-hover,
- .ui-state-focus,
- .ui-widget-content .ui-state-focus,
- .ui-widget-header .ui-state-focus {
- border-bottom:2px solid @color_tabs_cl_1;
+
+ .ui-state-hover,
+ .ui-widget-content .ui-state-hover,
+ .ui-widget-header .ui-state-hover,
+ .ui-state-focus,
+ .ui-widget-content .ui-state-focus,
+ .ui-widget-header .ui-state-focus {
+ border-bottom:2px solid @color_tabs_cl_1;
.gradient( @color_tabs_cl_1, @color_tabs_cl_3, @color_tabs_cl_2) ;
- font-weight: normal;
-
- a,
- a:link,
- a:visited {
- color: @color_tab_text_hover;
- text-decoration: none;
+ font-weight: normal;
+
+ a,
+ a:link,
+ a:visited {
+ color: @color_tab_text_hover;
+ text-decoration: none;
text-shadow : 0 1px 0 @color_tab_text_hover_shadow;
}
}
-
- .ui-state-hover a,
- .ui-state-hover a:hover {
- color: @color_tab_text_selected;
- text-decoration: none;
-
+
+ .ui-state-hover a,
+ .ui-state-hover a:hover {
+ color: @color_tab_text_selected;
+ text-decoration: none;
+
}
-
- .ui-state-active,
- .ui-widget-content .ui-state-active,
- .ui-widget-header .ui-state-active {
- border: 1px solid (@color_bg_gradient_base - 50);
+
+ .ui-state-active,
+ .ui-widget-content .ui-state-active,
+ .ui-widget-header .ui-state-active {
+ border: 1px solid (@color_bg_gradient_base - 50);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
- font-weight: normal;
- color: @color_tab_text_selected;
- border-bottom: 0 !important;
-
- a,
- a:link,
- a:visited {
- color: @color_tab_text_selected;
- text-decoration: none;
+ font-weight: normal;
+ color: @color_tab_text_selected;
+ border-bottom: 0 !important;
+
+ a,
+ a:link,
+ a:visited {
+ color: @color_tab_text_selected;
+ text-decoration: none;
}
}
-
-
+
+
.ui-widget :active { outline: none; }
-
- // UI generic
- .ui-widget {
- font-family: Verdana,Arial,sans-serif;
- font-size: (@font_size * 1.1);
-
+
+ // UI generic
+ .ui-widget {
+ font-family: Verdana,Arial,sans-serif;
+ font-size: (@font_size * 1.1);
+
.ui-widget { font-size: @font_size; }
-
+
}
-
-
+
+
.ui-widget-header {
border-radius: 0;
- border-bottom: 1px solid #aaaaaa;
- font-weight: bold;
+ border-bottom: 1px solid #aaaaaa;
+ font-weight: bold;
}
-
-
-
- // UI tabs
- div#glob .ui-tabs {
- position: relative;
- padding: (@padding_base * 2);
- zoom: 1;
-
- .ui-tabs-nav {
+
+
+
+ // UI tabs
+ div#glob .ui-tabs {
+ position: relative;
+ padding: (@padding_base * 2);
+ zoom: 1;
+
+ .ui-tabs-nav {
display: inline-block;
margin: 0;
padding: 0;
width: 100%;
-
- li {
- list-style: none;
- float: left;
- position: relative;
- top: 1px;
- margin: 0 @padding_base 0 0;
- padding: 0;
- white-space: nowrap;
+
+ li {
+ list-style: none;
+ float: left;
+ position: relative;
+ top: 1px;
+ margin: 0 @padding_base 0 0;
+ padding: 0;
+ white-space: nowrap;
line-height : (@lineheight * 1.2);
-
+
a {
- float: left;
- padding: (@padding_base * 2) (@padding_base * 4);
- text-decoration: none;
+ float: left;
+ padding: (@padding_base * 2) (@padding_base * 4);
+ text-decoration: none;
cursor: pointer;
font-size: (@font_size*1.3);
font-weight : bold;
}
}
-
- .ui-tabs-selected {
- margin-bottom: 0;
- padding-bottom: 1px;
+
+ .ui-tabs-selected {
+ margin-bottom: 0;
+ padding-bottom: 1px;
cursor: not-drop;
}
.ui-tabs-selected,
.ui-tabs-selected a,
.ui-state-disabled a,
- .ui-state-processing a {
- cursor: not-allowed !important;
+ .ui-state-processing a {
+ cursor: not-allowed !important;
text-shadow : 0 1px 0 @color_tab_text_selected_shadow;
}
}
-
+
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; }
-
+
.ui-tabs-panel { display: block; border-width: 0; padding: (@padding_base * 0.1); background: none; }
-
+
.ui-tabs-hide { display: none !important; }
-
+
div.box_uniq { width:99%; }
- }
-
-
-
-
-
-
-
+ }
+
+
+
+
+
+
+
// Toolips
.tooltip{
position:absolute;
@@ -921,7 +921,7 @@
padding:5px;
border:1px solid #fff;
width:250px;
-
+
p{
margin:0;
padding:0;
@@ -930,4 +930,3 @@
padding:(@padding_base * 0.1) (@padding_base * 0.5);
}
}
-
\ No newline at end of file
Modified: trunk/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- trunk/catalog/admin/includes/template/oscss/css/less/styles.less 2013-06-30 14:57:45 UTC (rev 4764)
+++ trunk/catalog/admin/includes/template/oscss/css/less/styles.less 2013-07-01 13:54:49 UTC (rev 4765)
@@ -21,19 +21,19 @@
* Retro-compatibilte oscommerce oscss < 2.xx
*/
/* info box block droit */
-.infoBoxHeading {
- background-color: #ffffff;
- border-width:0;
+.infoBoxHeading {
+ background-color: #ffffff;
+ border-width:0;
.rounded(5px);
}
-.infoBoxContent{
- border-width: 0px 1px 0px 1px;
- border-color: #E6E6E6;
- border-style: solid;
- padding: 2px 2px 5px 10px;
- font-size: 10px;
- color: #000;
- background-color: #f1f1f1;
+.infoBoxContent{
+ border-width: 0px 1px 0px 1px;
+ border-color: #E6E6E6;
+ border-style: solid;
+ padding: 2px 2px 5px 10px;
+ font-size: 10px;
+ color: #000;
+ background-color: #f1f1f1;
list-style:none;
line-height:1.7em;
.rounded(5px);
@@ -48,7 +48,7 @@
/**
- * Generalite
+ * Generalite
*/
@@ -64,7 +64,7 @@
img { border:0 ; margin:0; padding:0; }
h1 { font-size:(@font_size * 1) ; padding:(@padding_base * 2); }
h2 { font-size:(@font_size * 1.2) ;}
-h3 {
+h3 {
clear:both;
color: @title_h3_color;
font-size: (@font_size * 1.9);
@@ -76,9 +76,9 @@
h5 { font-size: @font_size ;text-shadow:0 1px 0 #fff;}
p {padding:1em;}
ul {list-style:none;}
-th {
- margin:2px 1px;
- text-align: left;
+th {
+ margin:2px 1px;
+ text-align: left;
padding: 2px @padding_base;
height:@lineheight;
line-height:(@lineheight * 0.7);
@@ -138,25 +138,25 @@
h4.Ctrtirroir,
h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 20px; font-size: (@font_size * 1.1);
&:hover{
- color:#A0A0A0;
+ color:#A0A0A0;
opacity : 0.6;
background-color: @bg_hover;
}
}
.Ctrtirroir {
- background:transparent url("../../../../../images/icons/icon_down.gif") left top no-repeat;
+ background:transparent url("../../../images/icons/icon_down.gif") left top no-repeat;
padding-left:20px;
- height:@lineheight;
+ height:@lineheight;
font-weight:bold;
cursor : pointer;
-
+
&:hover{
- color:#A0A0A0;
+ color:#A0A0A0;
opacity : 0.6;
background-color: @bg_hover;
}
}
-.Ctrtirroir.closed {background:transparent url("../../../../../images/icons/icon_arrow_right.gif") left top no-repeat; }
+.Ctrtirroir.closed {background:transparent url("../../../images/icons/icon_arrow_right.gif") left top no-repeat; }
fieldset ul.tirroir li { float: left; position: relative; width: auto;}
@@ -169,17 +169,17 @@
width:(@display_width * 0.75 ) ;
display:block;
position: fixed;
- margin: 10px 1%;
+ margin: 10px 1%;
right: 0;
top:0;
z-index:99;
-
-
+
+
p{
padding:0;
margin:0;
}
-
+
.item{
height: auto!important;
height: 25px;
@@ -190,28 +190,28 @@
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;
+ margin:0 2px;
cursor : pointer;
- background:transparent url("../../../../../images/check-off.png") center center no-repeat;
+ background:transparent url("../../../images/check-off.png") center center no-repeat;
font-size:0;
-
+
&:hover{
opacity : 0.6;
}
}
}
-
-
+
+
}
@@ -220,33 +220,33 @@
-body {
- background:#faf9f7 url("img/1/body.jpg") left -80px repeat-x;
- background-attachment:fixed;
- font: normal @font_size Verdana, Arial, sans-serif;
+body {
+ background:#faf9f7 url("img/1/body.jpg") left -80px repeat-x;
+ background-attachment:fixed;
+ font: normal @font_size Verdana, Arial, sans-serif;
}
/**
- * Structure base html
+ * Structure base html
* no specific forms (cf section forms )
*/
.configuration{
div#central{
-
+
div#ssmenu{
display: block;
- height: ( @lineheight * 1.5);
- line-height: ( @lineheight * 1.5);
+ height: ( @lineheight * 1.5);
+ line-height: ( @lineheight * 1.5);
padding: 5px 10px;
width: 100%;
}
-
- div.box_right {
- right:0;
- width:39%;
-
+
+ div.box_right {
+ right:0;
+ width:39%;
+
ul{ list-style:none; }
}
}
@@ -256,91 +256,91 @@
// div#central{
// }
// }
-
+
div#glob {
- width:100%;
- z-index:10;
+ width:100%;
+ z-index:10;
height:100%;
-
-
+
+
div#central{
- position:relative;
- padding:10px 5px;
+ position:relative;
+ padding:10px 5px;
top:79px;
margin-bottom: 79px;
border-left: 1px solid black;
border-right: 1px solid black;
border-bottom: 1px solid black;
background:@color_011;
-
- div.box_uniq {
- width:100%;
- float:left;
+
+ div.box_uniq {
+ width:100%;
+ float:left;
padding: 0;
background:none;
}
-
+
div.box_left { width:60%; float:left; }
-
+
div.box_right {
- width:39%;
- float:right;
+ width:39%;
+ float:right;
}
-
+
h4{clear:both;float:left;font-weight:bold; padding:3px 5px 8px 25px; }
}
-
+
}
-
+
div#center,
- div#bas {
- margin: 0 auto;
- position: relative;
+ div#bas {
+ margin: 0 auto;
+ position: relative;
min-width:@display_max_width;
width:@display_width ;
}
-
- div#bas {
- // margin-top:8em;
- clear:both;
- height:25px;
+
+ div#bas {
+ // margin-top:8em;
+ clear:both;
+ height:25px;
background:@bas_bg;
color:@bas_bg_txt;
-
+
a,
- a:link,
+ a:link,
a:visited {
text-shadow : none;
padding: 4px 25px;
color:@color_011;
}
-
+
}
- footer {
- background: @footer_bg;
- clear:both;width:100%;
+ footer {
+ background: @footer_bg;
+ clear:both;width:100%;
text-align:center;
color:@footer_bg_txt;
-
+
a,
- a:link,
- a:visited {
+ a:link,
+ a:visited {
color:@color_011;
- text-decoration: none;
-
+ text-decoration: none;
+
&:hover{
- text-decoration: underline;
+ text-decoration: underline;
}
}
}
-
-
-
-
- /**
- * Bouton
+
+
+
+
+ /**
+ * Bouton
*/
.button,
select.button,
@@ -359,7 +359,7 @@
line-height: 25px;
margin:8px 20px;
text-shadow: none;
-
+
.rounded(5px);
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
@@ -367,27 +367,27 @@
select.button option{
color:@color_015;
}
-
+
input[type=image].button {
float:left;
height:( @lineheight * 1.3);
width:18px;
}
-
+
input.button,
button.button{font-size:@font_size; background:#ccc;padding:2px 5px; }
-
-
+
+
a.button{ padding:2px 5px; margin:10px 20px ;text-decoration:none; height:( @lineheight * 1.3) ; line-height:( @lineheight * 1.3);}
a.button:hover{color:@color_011;text-decoration:none; }
-
+
a.button,
select.button,
input.button,
- button.button {
+ button.button {
.gradient( @color_bouton_cl_1, @color_bouton_cl_2, @color_bouton_cl_3) ;
}
-
+
a.button.ActionYes,
input.button.ActionYes,
input[type=image].button.ActionYes,
@@ -395,73 +395,73 @@
button.button.ActionYes {
.gradient( @color_bouton_submit_cl_1, @color_bouton_submit_cl_2, @color_bouton_submit_cl_3) ;
}
-
+
a.button.ActionBack,
input[type=image].button.ActionBack,
button.button.ActionBack {
color:@color_011;
.gradient( @color_bouton_back_cl_1, @color_bouton_back_cl_3, @color_bouton_back_cl_2) ;
}
-
-
+
+
input:hover.button,
button:hover.button{background:#797979;color:@color_011;}
-
+
a:hover.button,
input:hover.button,
button:hover.button {
.gradient( @color_bouton_cl_1, @color_bouton_cl_3, @color_bouton_cl_2) ;
opacity:0.6;
}
-
+
a:hover.button.ActionYes,
input:hover.button.ActionYes,
button:hover.button.ActionYes {
.gradient( @color_bouton_submit_cl_1, @color_bouton_submit_cl_3, @color_bouton_submit_cl_2) ;
color:black;
}
-
+
a.button.ActionBack,
input.button.ActionBack,
button.button.ActionBack {
color:@color_011;
.gradient( @color_bouton_back_cl_1, @color_bouton_back_cl_2, @color_bouton_back_cl_3) ;
}
-
+
a:hover.button.ActionBack,
input:hover.button.ActionBack,
button:hover.button.ActionBack {
.gradient( @color_bouton_back_cl_1, @color_bouton_back_cl_3, @color_bouton_back_cl_2) ;
}
-
+
input[type=image].button,
a.buttonimg img{ opacity:1;}
-
+
input[type=image]:hover.button ,
a:hover.buttonimg img,
a.buttonimg img:hover{ opacity:0.6;}
-
+
/* Spe buttons broswer img */
a.button.browser {height:24px;}
a.button img {vertical-align:middle;margin:0.3em 0.3em 0 0;}
.row_action a.button {margin:0;}
-
-
+
+
/* Block html content all bouton */
.button_nav{
clear:both;
-
+
form{
- float:right;
+ float:right;
width:100px;
-
+
p {margin:0;padding:0;}
}
}
-
-
- /**
- * Section for block widget in dashbord
+
+
+ /**
+ * Section for block widget in dashbord
*/
.widget{
float: left;
@@ -470,62 +470,62 @@
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
+
h3 {
color: @color_widget_title;
- clear: both;
- margin-bottom:@margin;
+ clear: both;
+ margin-bottom:@margin;
padding:5px 0 5px 5px;
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
-
+
a{
color: @color_widget_title;
text-decoration:none;
-
+
&:hover{
color: gray;
}
}
}
-
+
ol {padding-left:25px;}
-
+
.dataTableBase tr{
- background-color: #F0F0F0;
-
- th {
- height: 20px;
+ background-color: #F0F0F0;
+
+ th {
+ height: 20px;
line-height: 20px;
background : @color_widget_bg_th;
}
-
+
&:nth-child(odd) {
- background-color: #D7D7D7;
+ background-color: #D7D7D7;
}
-
+
a{
font-weight : bold;
color: @color_widget_bg_th;
}
}
-
-
+
+
/* sous menu en widget , specifique page conf et dashboard configuration */
div#ssmenu{
- a {
- background: none repeat scroll 0 0 #797979;
- border-right: 1px solid #444444;
- clear: both;
- color: @color_011;
- font-size: @font_size;
- margin: 0 0 1px 25px;
- padding: 5px 10px;
- text-shadow: 0 1px 0 #000000;
+ a {
+ background: none repeat scroll 0 0 #797979;
+ border-right: 1px solid #444444;
+ clear: both;
+ color: @color_011;
+ font-size: @font_size;
+ margin: 0 0 1px 25px;
+ padding: 5px 10px;
+ text-shadow: 0 1px 0 #000000;
width: 40%;
-
- &:hover {
- float:left;
+
+ &:hover {
+ float:left;
margin:0;
background:#eee;
color:#000;
@@ -534,8 +534,8 @@
}
}
}
-
-
+
+
.edit{
background:#eee;
background-attachment:none;
@@ -544,8 +544,8 @@
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
-
-
+
+
/**
* class qui rend element enfant visible au survol de l'element parent
*/
@@ -556,12 +556,12 @@
.dataTable tr:hover .view.fils,
.dataTableRow.Selected .view.fils,
.view.parent:hover .view.fils{display:block;height:13px}
-
-
-
-
+
+
+
+
/**
- * Listing Filter for Datatable
+ * Listing Filter for Datatable
*/
div#central form#filters {
padding:0;
@@ -571,45 +571,45 @@
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
.border-radius( 5px, 5px, 5px, 5px);
.rounded(5px);
-
- p.Ctrtirroir {
- padding: 2px 10px 2px 20px;
- font-size:(@font_size*1.2);
- color: #000000;
- font-weight: bold;
-
+
+ p.Ctrtirroir {
+ padding: 2px 10px 2px 20px;
+ font-size:(@font_size*1.2);
+ color: #000000;
+ font-weight: bold;
+
&:hover {
background-color: @bg_hover;
- cursor:pointer;
+ cursor:pointer;
}
}
-
+
div#filtre {
padding:0;
border:1px solid #AAAAAA;
- background: transparent;
-
+ background: transparent;
+
ul.ui-tabs-nav {
width:99.6%;
-
+
li{
line-height:1em;
width:auto;
}
}
}
-
+
fieldset label{width:auto;}
-
+
li.select{
color : @color_tab_text_selected ;
}
}
-
-
-
+
+
+
/**
- * Forms
+ * Forms
*/
// rattrapage fichier Forms.less
@@ -619,107 +619,107 @@
form .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {
background-image: url("../../img/1/busy.png");
}
-
-
-
+
+
+
input.radioInput {width:30px;}
-
+
div#form_bt { width: 80%; margin: 1em 2em;}
ul.form_radio_inline{display:inline-block;}
.noselected{}
- .selected{background:#f0d4bf;}
+ .selected{background:#f0d4bf;}
.color_type {display: inline-block; padding: 6px 0 6px 5px;background: none repeat scroll 0 0 transparent;}
-
-
+
+
div#central form#configuration p input[type="text"] { margin:5px 15px;width:60%; }
-
+
/* Select Categorie */
div#central #CurrentPathSelect *,
div#central #CurrentPathSelect form {
- margin:@margin 0;
- padding:0;
+ margin:@margin 0;
+ padding:0;
width:100%;
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
- select#cPath {
- margin:0;
- font-size:(@font_size * 1.3);
- color:black;
- font-weight:bold;
- padding:0.2em 0.6em;
+
+ select#cPath {
+ margin:0;
+ font-size:(@font_size * 1.3);
+ color:black;
+ font-weight:bold;
+ padding:0.2em 0.6em;
height: (@lineheight * 1.8) ;
-
+
&:hover {background-color: @bg_hover;cursor:pointer; }
-
+
option {
- margin:0;
+ margin:0;
background-color:#f5f5f5;
}
}
}
-
-
+
+
/**
- * Section specific Orders page
+ * Section specific Orders page
*/
.main-orders{
-
+
fieldset{
.border-radius(5px);
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
-
+
.box_uniq.block_form{
fieldset{
margin:1% 2%;
padding:0 1%;
}
-
+
.w_50 {
width:44%;
}
}
-
+
block_input{
br,
span.value_edit br{display:block;height:0;}
}
-
+
table.main-orders {
margin:1%;
width:98%;
-
+
thead tr th{
- background:@color_013;
+ background:@color_013;
color:@color_011;
- font-weight: normal;
+ font-weight: normal;
text-shadow: none;
}
-
+
tr th{
- margin:0;
- background:#eee;
+ margin:0;
+ background:#eee;
height:(@lineheight * 1.3);
line-height:(@lineheight * 0.5);
}
}
-
+
.block {
- background:#c9c9c9;
+ background:#c9c9c9;
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
+
}
-
+
&.master{
width: 100%;
display:table;
-
+
.block{
display:table-cell;
width: 49%;
@@ -727,84 +727,84 @@
}
}
}
-
+
/* Ajsutement customer page */
div#central .box_uniq.block_form.main-customers .block_input label{width:35%;}
-
-
+
+
/**
* Section shipping
*/
.main-shipping{
-
+
fieldset{
.border-radius(5px);
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
-
+
.box_uniq.block_form{
fieldset{
margin:1% 2%;
padding:0 1%;
}
-
+
.w_50 {
width:49%;
}
}
-
+
block_input{
br,
span.value_edit br{display:block;height:0;}
}
-
-
+
+
.block {
- background:#c9c9c9;
+ background:#c9c9c9;
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
-
+
+
h4{
clear:both;
width:100%;
}
}
-
+
table.main-shipping {
margin:1%;
width:98%;
-
+
thead tr th{
- background:@color_013;
+ background:@color_013;
color:@color_011;
- font-weight: normal;
+ font-weight: normal;
text-shadow: none;
}
-
+
tr th{
- margin:0;
- background:#eee;
+ margin:0;
+ background:#eee;
height:(@lineheight * 1.3);
line-height:(@lineheight * 0.5);
}
}
}
-
-
+
+
/**
* External - plugin - others
*/
div#fancybox-outer {
background:none;
border:none !important;
-
+
div#fancybox-content {
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon) ;
.border-radius(0,5px,5px,0);
-
+
h3{
color:@color_title_txt;
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
@@ -814,40 +814,40 @@
}
/* popup form by fancy . complet independant external css file specific for fancy in /javascript/jquery.fancy */
div#fancybox-inner{
- h3 {
+ h3 {
color:@color_title_txt;
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
.border-radius(5px,0,0,5px);
}
-
+
form {
float:left;
position: relative;
top:20px;
- padding: 0 0 30px;
+ padding: 0 0 30px;
margin:0 0 30px 0;
-
+
h3{ top: -25px;}
-
- fieldset {
- margin: 5px;
- padding:5pxem;
- border:none;
-
+
+ fieldset {
+ margin: 5px;
+ padding:5pxem;
+ border:none;
+
label { width: 100%; line-height: 18px; margin-right: 10px; display:inline-block; text-align: left; padding: 0 0 2px 0;}
-
+
select,
input[type="text"] { min-width:65%; display:inline-block;float:right;}
-
+
.button_nav {bottom: 0; position: absolute; right: 0 ; height:25px;}
}
}
}
-
-
- // UI
-
-
+
+
+ // UI
+
+
.ui-datepicker {
.ui-widget-header{
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
@@ -858,8 +858,8 @@
.border-radius(0,5px,5px,0);
}
}
-
-
+
+
/* Layout helpers */
.ui-dialog {
.ui-widget-header{
@@ -871,168 +871,168 @@
.border-radius(0,5px,5px,0);
}
}
-
+
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: (@lineheight * 0.7); text-decoration: none; font-size: @font_size; list-style: none; }
- .ui-helper-clearfix {
- zoom: 1;
-
- &:before,
+ .ui-helper-clearfix {
+ zoom: 1;
+
+ &:before,
&: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); }
-
-
- /* Interaction states */
- .ui-state-default,
- .ui-widget-content .ui-state-default,
- .ui-widget-header .ui-state-default {
- font-weight: normal;
- color: @color_tab_text_default;
+
+
+ /* Interaction states */
+ .ui-state-default,
+ .ui-widget-content .ui-state-default,
+ .ui-widget-header .ui-state-default {
+ font-weight: normal;
+ color: @color_tab_text_default;
text-shadow : 0 1px 0 @color_tab_text_default_shadow;
- border-bottom:2px solid @color_tabs_cl_1;
+ border-bottom:2px solid @color_tabs_cl_1;
.gradient( @color_tabs_cl_1, @color_tabs_cl_2, @color_tabs_cl_3) ;
-
- a,
- a:link,
- a:visited {
- color: @color_tab_text_default;
- text-decoration: none;
+
+ a,
+ a:link,
+ a:visited {
+ color: @color_tab_text_default;
+ text-decoration: none;
text-shadow : 0 1px 0 @color_tab_text_hover_shadow;
}
}
-
- .ui-state-hover,
- .ui-widget-content .ui-state-hover,
- .ui-widget-header .ui-state-hover,
- .ui-state-focus,
- .ui-widget-content .ui-state-focus,
- .ui-widget-header .ui-state-focus {
- border-bottom:2px solid @color_tabs_cl_1;
+
+ .ui-state-hover,
+ .ui-widget-content .ui-state-hover,
+ .ui-widget-header .ui-state-hover,
+ .ui-state-focus,
+ .ui-widget-content .ui-state-focus,
+ .ui-widget-header .ui-state-focus {
+ border-bottom:2px solid @color_tabs_cl_1;
.gradient( @color_tabs_cl_1, @color_tabs_cl_3, @color_tabs_cl_2) ;
- font-weight: normal;
-
- a,
- a:link,
- a:visited {
- color: @color_tab_text_hover;
- text-decoration: none;
+ font-weight: normal;
+
+ a,
+ a:link,
+ a:visited {
+ color: @color_tab_text_hover;
+ text-decoration: none;
text-shadow : 0 1px 0 @color_tab_text_hover_shadow;
}
}
-
- .ui-state-hover a,
- .ui-state-hover a:hover {
- color: @color_tab_text_selected;
- text-decoration: none;
-
+
+ .ui-state-hover a,
+ .ui-state-hover a:hover {
+ color: @color_tab_text_selected;
+ text-decoration: none;
+
}
-
- .ui-state-active,
- .ui-widget-content .ui-state-active,
- .ui-widget-header .ui-state-active {
- border: 1px solid (@color_bg_gradient_base - 50);
+
+ .ui-state-active,
+ .ui-widget-content .ui-state-active,
+ .ui-widget-header .ui-state-active {
+ border: 1px solid (@color_bg_gradient_base - 50);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
- font-weight: normal;
- color: @color_tab_text_selected;
- border-bottom: 0 !important;
-
- a,
- a:link,
- a:visited {
- color: @color_tab_text_selected;
- text-decoration: none;
+ font-weight: normal;
+ color: @color_tab_text_selected;
+ border-bottom: 0 !important;
+
+ a,
+ a:link,
+ a:visited {
+ color: @color_tab_text_selected;
+ text-decoration: none;
}
}
-
-
+
+
.ui-widget :active { outline: none; }
-
- // UI generic
- .ui-widget {
- font-family: Verdana,Arial,sans-serif;
- font-size: (@font_size * 1.1);
-
+
+ // UI generic
+ .ui-widget {
+ font-family: Verdana,Arial,sans-serif;
+ font-size: (@font_size * 1.1);
+
.ui-widget { font-size: @font_size; }
-
+
}
-
-
+
+
.ui-widget-header {
border-radius: 0;
-// border-bottom: 1px solid #aaaaaa;
- font-weight: bold;
+// border-bottom: 1px solid #aaaaaa;
+ font-weight: bold;
}
-
-
-
- // UI tabs
- div#glob .ui-tabs {
- position: relative;
- padding: (@padding_base * 2);
+
+
+
+ // UI tabs
+ div#glob .ui-tabs {
+ position: relative;
+ padding: (@padding_base * 2);
margin-top : (@margin * 1.5);
- zoom: 1;
-
- .ui-tabs-nav {
+ zoom: 1;
+
+ .ui-tabs-nav {
display: inline-block;
margin: 0;
padding: 0;
width: 100%;
-
- li {
- list-style: none;
- float: left;
- position: relative;
- top: 1px;
- margin: 0 (@margin * 1.5) 0 0;
- padding: 0;
- white-space: nowrap;
-
+
+ li {
+ list-style: none;
+ float: left;
+ position: relative;
+ top: 1px;
+ margin: 0 (@margin * 1.5) 0 0;
+ padding: 0;
+ white-space: nowrap;
+
a {
- float: left;
- padding: (@padding_base * 3) (@padding_base * 6);
- text-decoration: none;
+ float: left;
+ padding: (@padding_base * 3) (@padding_base * 6);
+ text-decoration: none;
cursor: pointer;
font-size: (@font_size*1.3);
font-weight : bold;
}
}
-
- .ui-tabs-selected {
- margin-bottom: 0;
- padding-bottom: 1px;
+
+ .ui-tabs-selected {
+ margin-bottom: 0;
+ padding-bottom: 1px;
cursor: not-drop;
-
+
a{
- padding: (@padding_base * 3) (@padding_base * 6);
+ padding: (@padding_base * 3) (@padding_base * 6);
}
}
.ui-tabs-selected,
.ui-tabs-selected a,
.ui-state-disabled a,
- .ui-state-processing a {
- cursor: not-allowed !important;
+ .ui-state-processing a {
+ cursor: not-allowed !important;
text-shadow : 0 1px 0 @color_tab_text_selected_shadow;
}
}
-
+
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; }
-
+
.ui-tabs-panel { display: block; border-width: 0; padding: (@padding_base * 0.1); background: none; }
-
+
.ui-tabs-hide { display: none !important; }
-
+
div.box_uniq { width:99%; }
- }
-
-
-
-
-
-
-
+ }
+
+
+
+
+
+
+
// Toolips
.tooltip{
position:absolute;
@@ -1042,7 +1042,7 @@
padding:5px;
border:1px solid #fff;
width:250px;
-
+
p{
margin:0;
padding:0;
@@ -1051,4 +1051,3 @@
padding:(@padding_base * 0.1) (@padding_base * 0.5);
}
}
-
\ No newline at end of file
Modified: trunk/catalog/common/classes/order.php
===================================================================
--- trunk/catalog/common/classes/order.php 2013-06-30 14:57:45 UTC (rev 4764)
+++ trunk/catalog/common/classes/order.php 2013-07-01 13:54:49 UTC (rev 4765)
@@ -120,7 +120,8 @@
$order_id = tep_db_prepare_input($order_id);
- $sql="select orders_id,orders_prefix,customers_id,customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, o.customers_telephone, o.customers_email_address, customers_address_format_id, customers_group_name, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified,ip_address, total_weight,orders_date_finished, class_payment, class_shipping ".((self::$mode)?" ,facture_id ,holding_origin_id ":'')." from " . self::$tables['ORDERS'] . " o left join " . TABLE_CUSTOMERS . " using(customers_id) left join " . TABLE_CUSTOMERS_GROUPS . " using(customers_group_id) where orders_id = '" . (int)$order_id . "'";
+ $sql="select orders_id,orders_prefix,customers_id,customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, o.customers_telephone, o.customers_email_address, customers_address_format_id, customers_group_name, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified,ip_address, total_weight,orders_date_finished, class_payment, class_shipping ".((self::$mode)?" ,facture_id ,holding_origin_id ":'')." from " . self::$tables['ORDERS'] . " o left join " . TABLE_CUSTOMERS . " using(customers_id) left join " . TABLE_
+CUSTOMERS_GROUPS . " using(customers_group_id) where orders_id = '" . (int)$order_id . "'";
$order_query = tep_db_query($sql);
$order = tep_db_fetch_array($order_query);
Modified: trunk/extensions/MANUFACTURERS_stable/install.xml
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/install.xml 2013-06-30 14:57:45 UTC (rev 4764)
+++ trunk/extensions/MANUFACTURERS_stable/install.xml 2013-07-01 13:54:49 UTC (rev 4765)
@@ -15,19 +15,19 @@
<file name="admin/includes/modules/products/manufacturers.php" />
<file name="admin/includes/classes/drivers/sqlmanufacturer.php" />
-
+
<file name="admin/includes/gabarit/manufacturers/display_view.edit.gab" />
<file name="admin/includes/gabarit/manufacturers/display_view.delete.gab" />
<file name="admin/includes/gabarit/manufacturers/filter.manufacturer.gab" />
<file name="admin/includes/gabarit/products/manufacturers/display_inline.edit.gab" />
-
- <file name="admin/includes/javascript/products/manufacturersjs.php" />
-
+
+ <file name="admin/includes/javascript/modules/products/manufacturers.js.php" />
+
<file name="common/classes/datatype_drivers/Data_manufacturer.php" />
-
+
<file name="templates/defaut/includes/boxes/manufacturers.php" />
<file name="templates/defaut/includes/boxes/manufacturer_info.php" />
-
+
<file name="templates/defaut/includes/gabarit/manufacturer/box.manufacturers.gab" />
<file name="templates/defaut/includes/gabarit/manufacturer/listing.detail.gab" />
</addfile>
@@ -47,7 +47,7 @@
<![CDATA[ define('BOX_MANUFACTURERS', 'Manufacturers'); ]]>
</add>
</add2endlg>
-
+
<add2end>
<file name="admin/includes/boxes/07_catalog.php" />
<add type="php"><![CDATA[ if(DataTypes::is_active('manufacturer'))
@@ -64,11 +64,11 @@
<![CDATA[
insert IGNORE into %DB_PREFIX%configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_DISPLAY_MANUFACTURERS_IN_A_LIST_S', 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST', '10', 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST_L', '21', '0', NULL, NOW(), NULL, NULL);
-
+
insert IGNORE into %DB_PREFIX%configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_MANUFACTURERS_LIST_S', 'MAX_MANUFACTURERS_LIST', '1', 'MAX_MANUFACTURERS_LIST_L', '21', '1', NULL, NOW(), NULL, NULL);
-
+
insert IGNORE into %DB_PREFIX%configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_DISPLAY_MANUFACTURER_NAME_LEN_S', 'MAX_DISPLAY_MANUFACTURER_NAME_LEN', '15', 'MAX_DISPLAY_MANUFACTURER_NAME_LEN_L', '21', '2', NULL, NOW(), NULL, NULL);
-
+
insert IGNORE into %DB_PREFIX%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_MANUFACTURER_S', 'DATATYPES_ROOTLISTING_MANUFACTURER', 'product', 'DATATYPES_ROOTLISTING_MANUFACTURER_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
]]>
</query>
@@ -77,6 +77,6 @@
delete from %DB_PREFIX%configuration where configuration_key IN(MAX_DISPLAY_MANUFACTURERS_IN_A_LIST , MAX_MANUFACTURERS_LIST, MAX_DISPLAY_MANUFACTURER_NAME_LEN, DATATYPES_ROOTLISTING_MANUFACTURER) '
]]></remove_query>
</sql>
-
+
<filesql> </filesql>
</contrib>
\ 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...> - 2013-06-30 14:57:48
|
Revision: 4764
http://sourceforge.net/p/oscss/svn/4764
Author: oscim
Date: 2013-06-30 14:57:45 +0000 (Sun, 30 Jun 2013)
Log Message:
-----------
Fix install db table osc_orders_products_attributes
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_attributes.sql
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_attributes.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_attributes.sql 2013-06-30 12:19:18 UTC (rev 4763)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_attributes.sql 2013-06-30 14:57:45 UTC (rev 4764)
@@ -14,13 +14,15 @@
drop table if exists osc_orders_products_attributes;
create table osc_orders_products_attributes (
- orders_products_attributes_id int(11) not null auto_increment,
- orders_id int(11) default '0' not null ,
- orders_products_id int(11) default '0' not null ,
- products_options varchar(32) not null ,
- products_options_values varchar(32) not null ,
- options_values_price decimal(15,4) default '0.0000' not null ,
- price_prefix char(1) not null ,
+ orders_products_attributes_id int(11) NOT NULL AUTO_INCREMENT,
+ orders_id int(11) NOT NULL DEFAULT '0',
+ orders_products_id int(11) NOT NULL DEFAULT '0',
+ products_options_id int(11) NOT NULL,
+ products_options_values_id int(11) NOT NULL,
+ products_options varchar(32) NOT NULL,
+ products_options_values varchar(32) NOT NULL,
+ options_values_price decimal(15,4) NOT NULL DEFAULT '0.0000',
+ price_prefix char(1) NOT NULL,
PRIMARY KEY (orders_products_attributes_id)
) DEFAULT CHARSET=utf8;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-30 12:19:21
|
Revision: 4763
http://sourceforge.net/p/oscss/svn/4763
Author: oscim
Date: 2013-06-30 12:19:18 +0000 (Sun, 30 Jun 2013)
Log Message:
-----------
Fix price for groups
Modified Paths:
--------------
trunk/catalog/common/classes/price.php
Modified: trunk/catalog/common/classes/price.php
===================================================================
--- trunk/catalog/common/classes/price.php 2013-06-29 15:16:40 UTC (rev 4762)
+++ trunk/catalog/common/classes/price.php 2013-06-30 12:19:18 UTC (rev 4763)
@@ -141,7 +141,7 @@
if ($customers_group_id > 0) { // recup prix spécifiqu au groupe
$price_query = tep_db_query("select customers_group_price as products_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" .$pid. "' and customers_group_id = '" . $customers_group_id . "'");
- if (tep_db_num_rows($price_query)) $products_price = (float)tep_db_fetch_array($price_query);
+ if (tep_db_num_rows($price_query)) $products_price = tep_db_fetch_array($price_query);
}
if (!isset($products_price['products_price'])) { // si pas de prix pour le groupe, recup prix général
$product_obj=product::get_item($pid);
@@ -151,7 +151,7 @@
$products_price['products_price'] += (float)$this->get_attributes_price($products_id, tep_get_prid_array($products_id));
- return $products_price['products_price'];
+ return (float)$products_price['products_price'];
}
private function get_attributes_price($products_id, $attributes=array()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-29 15:16:45
|
Revision: 4762
http://sourceforge.net/p/oscss/svn/4762
Author: oscim
Date: 2013-06-29 15:16:40 +0000 (Sat, 29 Jun 2013)
Log Message:
-----------
Fix url icon
Modified Paths:
--------------
trunk/catalog/admin/includes/template/defaut/css/less/datatable.less
Modified: trunk/catalog/admin/includes/template/defaut/css/less/datatable.less
===================================================================
--- trunk/catalog/admin/includes/template/defaut/css/less/datatable.less 2013-06-29 13:46:37 UTC (rev 4761)
+++ trunk/catalog/admin/includes/template/defaut/css/less/datatable.less 2013-06-29 15:16:40 UTC (rev 4762)
@@ -1,32 +1,32 @@
/**
- *
+ *
* Use var define in definition.less
* Use image based on /includes/javascript/jquery.dataTable
- *
+ *
* @font_size
* @lineheight
- *
- * @color_012
+ *
+ * @color_012
* @bg_hover
* @bg_hover_txt
- *
+ *
* @color_datatable_tr_th
* @color_datatable_tr_th_txt
- *
+ *
* @bg_table_tr_odd
* @bg_table_tr_even
- *
- * @color_sorting base color for
- *
+ *
+ * @color_sorting base color for
+ *
* @color_split_active hover rows
* @color_split_active_text hover rows text
- *
- * @color_bg_gradient_base,
- * @color_bg_gradient_eob,
+ *
+ * @color_bg_gradient_base,
+ * @color_bg_gradient_eob,
* @color_bg_gradient_eon
- *
+ *
* @color_bg_ext_datatable header and footer for dataTable
- *
+ *
* @color_split
* @color_split_active
* @color_split_active_text
@@ -34,124 +34,124 @@
*/
/**
- * Dipslay all listing in array
+ * Dipslay all listing in array
*/
.dataTableBase,
.dataTableSearch,
.dataTable{
float:left;
- width:100%;
- border-width:0;
+ width:100%;
+ border-width:0;
border:1px solid @color_012;
.rounded(5px);
-
+
a.button,
input[type=submit].button,
input[type=image].button,
button.button {
margin:0;
}
-
-
+
+
tr {
- padding:0;
+ padding:0;
margin:0;
-
- th{
- background-color: @color_datatable_tr_th;
- font-size:@font_size;
- font-weight:bold;
- text-align:center;
- color: @color_datatable_tr_th_txt;
- text-shadow:none;
+
+ th{
+ background-color: @color_datatable_tr_th;
+ font-size:@font_size;
+ font-weight:bold;
+ text-align:center;
+ color: @color_datatable_tr_th_txt;
+ text-shadow:none;
min-height:( @lineheight * 1.6 );
height:( @lineheight * 1.6 );
cursor: pointer;
}
-
-
+
+
.sorting_asc {
background: @color_datatable_tr_th url("../../../../../includes/javascript/jquery.dataTables/sort_asc.png") no-repeat center right;
padding-right: 20px;
}
-
+
.sorting_desc {
background: @color_datatable_tr_th url("../../../../../includes/javascript/jquery.dataTables/sort_desc.png") no-repeat center right;
padding-right: 20px;
}
-
+
.sorting {
background: @color_datatable_tr_th url("../../../../../includes/javascript/jquery.dataTables/sort_both.png") no-repeat center right;
padding-right: 20px;
}
}
-
-
+
+
tbody{
-
+
// rollover rows for mouse
tr,
tr.odd,
tr.even{
border:none;
cursor:default;
-
+
.highlighted,
&:hover{
- background-color: @bg_hover;
- cursor: pointer;
-
+ background-color: @bg_hover;
+ cursor: pointer;
+
td{
- background-color: @bg_hover;
+ background-color: @bg_hover;
}
- td,
+ td,
td a {
color : @bg_hover_txt ;
}
}
-
- td{
- line-height:( @lineheight * 1.1 );
+
+ td{
+ line-height:( @lineheight * 1.1 );
color: @datatable_color_txt;
- padding: 2px;
+ padding: 2px;
font-size: @font_size;
cursor:default;
-
+
a{
text-decoration:none;
color: @datatable_color_txt;
}
-
+
/* Replace value by icon */
.edit-input-value .Val.img { display: block; height: 16px; margin: auto; width: 16px;}
-
+
.edit-input-value .Flag-0.txt,
.edit-input-value .Val-0.txt { display:none}
.edit-input-value .Flag-0.img{background:transparent url("../../../../../images/icons/icon_status_red.gif") left top no-repeat}
.edit-input-value .Val-0.img { width: 10px; background:transparent url("../../../../../images/icons/icon_view_red.gif") left top no-repeat}
-
+
.edit-input-value .Flag-1.txt,
.edit-input-value .Val-1.txt { display:none}
.edit-input-value .Flag-1.img{background:transparent url("../../../../../images/icons/icon_status_green.gif") left top no-repeat}
.edit-input-value .Val-1.img {width: 10px; background:transparent url("../../../../../images/icons/icon_view_green.gif") left top no-repeat}
}
- .row_action {
- min-width:100px;
+ .row_action {
+ min-width:100px;
text-align:right;
}
-
- .row_action_large {
- min-width:250px;
+
+ .row_action_large {
+ min-width:250px;
text-align:right;
}
-
- .row_customers {
- min-width:100px;
+
+ .row_customers {
+ min-width:100px;
text-align:left;
}
-
-
+
+
.sorting_1{
background-color: ( @color_sorting + 50);
}
@@ -159,7 +159,7 @@
.sorting_1 a{
color : ( @color_sorting_text + 50);
}
-
+
.sorting_2{
background-color:( @color_sorting + 65);
}
@@ -167,7 +167,7 @@
.sorting_2 a{
color :( @color_sorting_text + 65);
}
-
+
.sorting_3{
background-color:( @color_sorting + 80);
}
@@ -175,23 +175,23 @@
.sorting_3 a{
color : (@color_sorting_text + 80);
}
-
-
+
+
}
-
+
.odd{
background-color: @bg_table_tr_odd;
}
-
+
.even{
background-color: @bg_table_tr_even;
}
-
+
.details {
background-color: #d1cfd0;
}
}
-
+
tfoot tr td input {width:80%;text-align:left;}
}
@@ -201,7 +201,7 @@
clear: both;
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon) ;
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
+
.paging_full_numbers{
a{
display:inline-block;
@@ -211,24 +211,24 @@
text-align:center;
border:1px solid gray;
}
-
-
+
+
.paginate_button,
.paginate_active{
.rounded(5px);
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
-
+
&:hover{
border:1px solid @color_split_border_hover;
background:white;
}
}
-
+
.paginate_active{
color : @color_split_active_text;
background-color: @color_split_active;
-
+
&:hover{
cursor: not-allowed !important;
color : @color_split_active_text;
@@ -236,40 +236,40 @@
}
}
}
-
- .top,
+
+ .top,
.bottom {
padding: 1px 10px;
background-color: @color_bg_ext_datatable;
-
+
.dataTables_length {
// clear: both;
float: left;
width: 40%;
-
+
form label {
padding:0;
margin:0;
}
}
-
+
.dataTables_paginate {
float: right;
text-align: right;
padding-top: 0px;
}
-
+
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
}
-
+
.top{
.border-radius( 5px,0, 0, 5px);
-
+
.dataTables_filter {
clear: both;
position: relative;
@@ -285,11 +285,11 @@
margin-bottom: 5px;
}
}
-
+
.bottom {
padding: 5px 10px;
.border-radius( 0, 5px, 5px, 0);
-
+
.dataTables_info {
clear:both;
}
@@ -389,7 +389,7 @@
padding: 3px 8px;
}
-.DTTT_button embed {
+.DTTT_button embed {
outline: none;
}
@@ -398,13 +398,13 @@
a.DTTT_button:hover {
border: 1px solid #666;
text-decoration: none !important;
-
+
-webkit-box-shadow: 1px 1px 3px #999;
-moz-box-shadow: 1px 1px 3px #999;
-ms-box-shadow: 1px 1px 3px #999;
-o-box-shadow: 1px 1px 3px #999;
box-shadow: 1px 1px 3px #999;
-
+
background: #f3f3f3; /* Old browsers */
background: -webkit-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* FF3.6+ */
@@ -419,7 +419,7 @@
a.DTTT_disabled {
color: #999;
border: 1px solid #d0d0d0;
-
+
background: #ffffff; /* Old browsers */
background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* FF3.6+ */
@@ -442,7 +442,7 @@
text-align: center;
color: #333;
padding: 10px 30px;
-
+
background: #ffffff; /* Old browsers */
background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */
@@ -450,13 +450,13 @@
background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */
background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */
-
+
opacity: 0.9;
-
+
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-
+
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-29 13:46:45
|
Revision: 4761
http://sourceforge.net/p/oscss/svn/4761
Author: oscim
Date: 2013-06-29 13:46:37 +0000 (Sat, 29 Jun 2013)
Log Message:
-----------
Adujst less and add items for firebug
fix template BO
add colum in table product stock for product_barcode, product_qantity_alert
Modified Paths:
--------------
trunk/catalog/admin/includes/template/defaut/css/less/forms.less
trunk/catalog/admin/includes/template/defaut/gabarit-1.php
trunk/catalog/admin/includes/template/oscss/gabarit-1.php
trunk/catalog/includes/classes/pad_base.php
trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.sql
Added Paths:
-----------
trunk/catalog/admin/includes/javascript/less-1.3.3.min.js
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products_stock.sql
Removed Paths:
-------------
trunk/catalog/admin/includes/javascript/less-1.3.0.min.js
Deleted: trunk/catalog/admin/includes/javascript/less-1.3.0.min.js
===================================================================
--- trunk/catalog/admin/includes/javascript/less-1.3.0.min.js 2013-06-28 13:14:11 UTC (rev 4760)
+++ trunk/catalog/admin/includes/javascript/less-1.3.0.min.js 2013-06-29 13:46:37 UTC (rev 4761)
@@ -1,9 +0,0 @@
-//
-// LESS - Leaner CSS v1.3.0
-// http://lesscss.org
-//
-// Copyright (c) 2009-2011, Alexis Sellier
-// Licensed under the Apache 2.0 License.
-//
-(function(a,b){function c(b){return a.less[b.split("/")[1]]}function l(){var a=document.getElementsByTagName("style");for(var b=0;b<a.length;b++)a[b].type.match(j)&&(new d.Parser).parse(a[b].innerHTML||"",function(c,d){var e=d.toCSS(),f=a[b];f.type="text/css",f.styleSheet?f.styleSheet.cssText=e:f.innerHTML=e})}function m(a,b){for(var c=0;c<d.sheets.length;c++)n(d.sheets[c],a,b,d.sheets.length-(c+1))}function n(b,c,e,f){var h=a.location.href.replace(/[#?].*$/,""),i=b.href.replace(/\?.*$/,""),j=g&&g.getItem(i),k=g&&g.getItem(i+":timestamp"),l={css:j,timestamp:k};/^(https?|file):/.test(i)||(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=h.slice(0,h.lastIndexOf("/")+1)+i);var m=i.match(/([^\/]+)$/)[1];q(b.href,b.type,function(a,g){if(!e&&l&&g&&(new Date(g)).valueOf()===(new Date(l.timestamp)).valueOf())p(l.css,b),c(null,null,a,b,{local:!0,remaining:f});else try{(new d.Parser({optimization:d.optimization,paths:[i.replace(/[\w\.-]+$/,"")],mime:b.type,filename:m})).parse(a,function(d,e){if(d)return u(d,i);try{c(d,e,a,b,{local:!1,lastModified:g,remaining:f}),s(document.getElementById("less-error-message:"+o(i)))}catch(d){u(d,i)}})}catch(h){u(h,i)}},function(a,b){throw new Error("Couldn't load "+b+" ("+a+")")})}function o(a){return a.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function p(a,b,c){var d,e=b.href?b.href.replace(/\?.*$/,""):"",f="less:"+(b.title||o(e));(d=document.getElementById(f))===null&&(d=document.createElement("style"),d.type="text/css",d.media=b.media||"screen",d.id=f,document.getElementsByTagName("head")[0].appendChild(d));if(d.styleSheet)try{d.styleSheet.cssText=a}catch(h){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(a){d.childNodes.length>0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&g&&(t("saving "+e+" to cache."),g.setItem(e,a),g.setItem(e+":timestamp",c))}function q(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var g=r(),h=f?!1:d.async;typeof g.overrideMimeType=="function"&&g.overrideMimeType("text/css"),g.open("GET",a,h),g.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),g.send(null),f?g.status===0||g.status>=200&&g.status<300?c(g.responseText):e(g.status,a):h?g.onreadystatechange=function(){g.readyState==4&&i(g,c,e)}:i(g,c,e)}function r(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){return t("browser doesn't support AJAX."),null}}function s(a){return a&&a.parentNode.removeChild(a)}function t(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function u(a,b){var c="less-error-message:"+o(b),e='<li><label>{line}</label><pre class="{class}">{content}</pre></li>',f=document.createElement("div"),g,h,i=[],j=a.filename||b;f.id=c,f.className="less-error-message",h="<h3>"+(a.message||"There is an error in your .less file")+"</h3>"+'<p>in <a href="'+j+'">'+j+"</a> ";var k=function(a,b,c){a.extract[b]&&i.push(e.replace(/\{line\}/,parseInt(a.line)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};a.stack?h+="<br/>"+a.stack.split("\n").slice(1).join("<br/>"):a.extract&&(k(a,0,""),k(a,1,"line"),k(a,2,""),h+="on line "+a.line+", column "+(a.column+1)+":</p>"+"<ul>"+i.join("")+"</ul>"),f.innerHTML=h,p([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}typeof define=="function"&&define.amd&&define("less",[],function(){return d}),Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"||a instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=this.length>>>0;for(var d=0;d<c;d++)d in this&&a.call(b,this[d],d,this)}),Array.prototype.map||(Array.prototype.map=function(a){var b=this.length>>>0,c=new Array(b),d=arguments[1];for(var e=0;e<b;e++)e in this&&(c[e]=a.call(d,this[e],e,this));return c}),Array.prototype.filter||(Array.prototype.filter=function(a){var b=[],c=arguments[1];for(var d=0;d<this.length;d++)a.call(c,this[d])&&b.push(this[d]);return b}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=this.length>>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c<b;c++)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length,c=arguments[1]||0;if(!b)return-1;if(c>=b)return-1;c<0&&(c+=b);for(;c<b;c++){if(!Object.prototype.hasOwnProperty.call(this,c))continue;if(a===this[c])return c}return-1}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b}),String.prototype.trim||(String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")});var d,e;typeof environment=="object"&&{}.toString.call(environment)==="[object Environment]"?(typeof a=="undefined"?d={}:d=a.less={},e=d.tree={},d.mode="rhino"):typeof a=="undefined"?(d=exports,e=c("./tree"),d.mode="node"):(typeof a.less=="undefined"&&(a.less={}),d=a.less,e=a.less.tree={},d.mode="browser"),d.Parser=function v(a){function q(){h=k[g],i=f,l=f}function r(){k[g]=h,f=i,l=f}function s(){f>l&&(k[g]=k[g].slice(f-l),l=f)}function t(a){var c,d,e,h,i,j,n,o;if(a instanceof Function)return a.call(m.parsers);if(typeof a=="string")c=b.charAt(f)===a?a:null,e=1,s();else{s();if(c=a.exec(k[g]))e=c[0].length;else return null}if(c){o=f+=e,j=f+k[g].length-e;while(f<j){h=b.charCodeAt(f);if(h!==32&&h!==10&&h!==9)break;f++}return k[g]=k[g].slice(e+(f-o)),l=f,k[g].length===0&&g<k.length-1&&g++,typeof c=="string"?c:c.length===1?c[0]:c}}function u(a,c){var d=t(a);if(!d)v(c||(typeof a=="string"?"expected '"+a+"' got '"+b.charAt(f)+"'":"unexpected token"));else return d}function v(a,b){throw{index:f,type:b||"Syntax",message:a}}function w(a){return typeof a=="string"?b.charAt(f)===a:a.test(k[g])?!0:!1}function x(a){return d.mode==="node"?c("path").basename(a):a.match(/[^\/]+$/)[0]}function y(a,c){return a.filename&&c.filename&&a.filename!==c.filename?m.imports.contents[x(a.filename)]:b}function z(a,b){for(var c=a,d=-1;c>=0&&b.charAt(c)!=="\n";c--)d++;return{line:typeof a=="number"?(b.slice(0,a).match(/\n/g)||"").length:null,column:d}}function A(a,b){var c=y(a,b),d=z(a.index,c),e=d.line,f=d.column,g=c.split("\n");this.type=a.type||"Syntax",this.message=a.message,this.filename=a.filename||b.filename,this.index=a.index,this.line=typeof e=="number"?e+1:null,this.callLine=a.call&&z(a.call,c).line+1,this.callExtract=g[z(a.call,c).line],this.stack=a.stack,this.column=f,this.extract=[g[e-1],g[e],g[e+1]]}var b,f,g,h,i,j,k,l,m,n=this,o=function(){},p=this.imports={paths:a&&a.paths||[],queue:[],files:{},contents:{},mime:a&&a.mime,error:null,push:function(b,c){var e=this;this.queue.push(b),d.Parser.importer(b,this.paths,function(a,d,f){e.queue.splice(e.queue.indexOf(b),1),e.files[b]=d,e.contents[b]=f,a&&!e.error&&(e.error=a),c(a,d),e.queue.length===0&&o()},a)}};return this.env=a=a||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null,m={imports:p,parse:function(h,i){var n,p,q,r,s,u,v=[],w,x=null;f=g=l=j=0,b=h.replace(/\r\n/g,"\n"),k=function(c){var d=0,e=/[^"'`\{\}\/\(\)\\]+/g,f=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,g=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`\\\r\n]|\\.)*)`/g,h=0,i,j=c[0],k;for(var l=0,m,n;l<b.length;l++){e.lastIndex=l,(i=e.exec(b))&&i.index===l&&(l+=i[0].length,j.push(i[0])),m=b.charAt(l),f.lastIndex=g.lastIndex=l,(i=g.exec(b))&&i.index===l&&(l+=i[0].length,j.push(i[0]),m=b.charAt(l)),!k&&m==="/"&&(n=b.charAt(l+1),(n==="/"||n==="*")&&(i=f.exec(b))&&i.index===l&&(l+=i[0].length,j.push(i[0]),m=b.charAt(l)));switch(m){case"{":if(!k){h++,j.push(m);break};case"}":if(!k){h--,j.push(m),c[++d]=j=[];break};case"(":if(!k){k=!0,j.push(m);break};case")":if(k){k=!1,j.push(m);break};default:j.push(m)}}return h>0&&(x=new A({index:l,type:"Parse",message:"missing closing `}`",filename:a.filename},a)),c.map(function(a){return a.join("")})}([[]]);if(x)return i(x);try{n=new e.Ruleset([],t(this.parsers.primary)),n.root=!0}catch(y){return i(new A(y,a))}n.toCSS=function(b){var f,g,h;return function(f,g){var h=[],i;f=f||{},typeof g=="object"&&!Array.isArray(g)&&(g=Object.keys(g).map(function(a){var b=g[a];return b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b])),new e.Rule("@"+a,b,!1,0)}),h=[new e.Ruleset(null,g)]);try{var j=b.call(this,{frames:h}).toCSS([],{compress:f.compress||!1})}catch(k){throw new A(k,a)}if(i=m.imports.error)throw i instanceof A?i:new A(i,a);return f.yuicompress&&d.mode==="node"?c("./cssmin").compressor.cssmin(j):f.compress?j.replace(/(\s)+/g,"$1"):j}}(n.eval);if(f<b.length-1){f=j,u=b.split("\n"),s=(b.slice(0,f).match(/\n/g)||"").length+1;for(var z=f,B=-1;z>=0&&b.charAt(z)!=="\n";z--)B++;x={type:"Parse",message:"Syntax Error on line "+s,index:f,filename:a.filename,line:s,column:B,extract:[u[s-2],u[s-1],u[s]]}}this.imports.queue.length>0?o=function(){i(x,n)}:i(x,n)},parsers:{primary:function(){var a,b=[];while((a=t(this.mixin.definition)||t(this.rule)||t(this.ruleset)||t(this.mixin.call)||t(this.comment)||t(this.directive))||t(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(f)!=="/")return;if(b.charAt(f+1)==="/")return new e.Comment(t(/^\/\/.*/),!0);if(a=t(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)},entities:{quoted:function(){var a,c=f,d;b.charAt(c)==="~"&&(c++,d=!0);if(b.charAt(c)!=='"'&&b.charAt(c)!=="'")return;d&&t("~");if(a=t(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],d)},keyword:function(){var a;if(a=t(/^[_A-Za-z-][_A-Za-z0-9-]*/))return e.colors.hasOwnProperty(a)?new e.Color(e.colors[a].slice(1)):new e.Keyword(a)},call:function(){var b,c,d=f;if(!(b=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(k[g])))return;b=b[1].toLowerCase();if(b==="url")return null;f+=b.length;if(b==="alpha")return t(this.alpha);t("("),c=t(this.entities.arguments);if(!t(")"))return;if(b)return new e.Call(b,c,d,a.filename)},arguments:function(){var a=[],b;while(b=t(this.entities.assignment)||t(this.expression)){a.push(b);if(!t(","))break}return a},literal:function(){return t(this.entities.dimension)||t(this.entities.color)||t(this.entities.quoted)},assignment:function(){var a,b;if((a=t(/^\w+(?=\s?=)/i))&&t("=")&&(b=t(this.entity)))return new e.Assignment(a,b)},url:function(){var a;if(b.charAt(f)!=="u"||!t(/^url\(/))return;return a=t(this.entities.quoted)||t(this.entities.variable)||t(this.entities.dataURI)||t(/^[-\w%@$\/.&=:;#+?~]+/)||"",u(")"),new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),p.paths)},dataURI:function(){var a;if(t(/^data:/)){a={},a.mime=t(/^[^\/]+\/[^,;)]+/)||"",a.charset=t(/^;\s*charset=[^,;)]+/)||"",a.base64=t(/^;\s*base64/)||"",a.data=t(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var c,d=f;if(b.charAt(f)==="@"&&(c=t(/^@@?[\w-]+/)))return new e.Variable(c,d,a.filename)},color:function(){var a;if(b.charAt(f)==="#"&&(a=t(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,c=b.charCodeAt(f);if(c>57||c<45||c===47)return;if(a=t(/^(-?\d*\.?\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,c=f,d;b.charAt(c)==="~"&&(c++,d=!0);if(b.charAt(c)!=="`")return;d&&t("~");if(a=t(/^`([^`]*)`/))return new e.JavaScript(a[1],f,d)}},variable:function(){var a;if(b.charAt(f)==="@"&&(a=t(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!w(/^[@\w.%-]+\/[@\w.-]+/))return;if((a=t(this.entity))&&t("/")&&(b=t(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var c=[],d,g,h,i=f,j=b.charAt(f),k=!1;if(j!=="."&&j!=="#")return;while(d=t(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))c.push(new e.Element(g,d,f)),g=t(">");t("(")&&(h=t(this.entities.arguments))&&t(")"),t(this.important)&&(k=!0);if(c.length>0&&(t(";")||w("}")))return new e.mixin.Call(c,h||[],i,a.filename,k)},definition:function(){var a,c=[],d,g,h,i,j,k=!1;if(b.charAt(f)!=="."&&b.charAt(f)!=="#"||w(/^[^{]*(;|})/))return;q();if(d=t(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=d[1];do{if(b.charAt(f)==="."&&t(/^\.{3}/)){k=!0;break}if(!(h=t(this.entities.variable)||t(this.entities.literal)||t(this.entities.keyword)))break;if(h instanceof e.Variable)if(t(":"))i=u(this.expression,"expected expression"),c.push({name:h.name,value:i});else{if(t(/^\.{3}/)){c.push({name:h.name,variadic:!0}),k=!0;break}c.push({name:h.name})}else c.push({value:h})}while(t(","));u(")"),t(/^when/)&&(j=u(this.conditions,"expected condition")),g=t(this.block);if(g)return new e.mixin.Definition(a,c,g,j,k);r()}}},entity:function(){return t(this.entities.literal)||t(this.entities.variable)||t(this.entities.url)||t(this.entities.call)||t(this.entities.keyword)||t(this.entities.javascript)||t(this.comment)},end:function(){return t(";")||w("}")},alpha:function(){var a;if(!t(/^\(opacity=/i))return;if(a=t(/^\d+/)||t(this.entities.variable))return u(")"),new e.Alpha(a)},element:function(){var a,b,c,d;c=t(this.combinator),a=t(/^(?:\d+\.\d+|\d+)%/)||t(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||t("*")||t(this.attribute)||t(/^\([^)@]+\)/),a||t("(")&&(d=t(this.entities.variable))&&t(")")&&(a=new e.Paren(d));if(a)return new e.Element(c,a,f);if(c.value&&c.value.charAt(0)==="&")return new e.Element(c,null,f)},combinator:function(){var a,c=b.charAt(f);if(c===">"||c==="+"||c==="~"){f++;while(b.charAt(f)===" ")f++;return new e.Combinator(c)}if(c==="&"){a="&",f++,b.charAt(f)===" "&&(a="& ");while(b.charAt(f)===" ")f++;return new e.Combinator(a)}return b.charAt(f-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,c,d=[],g,h;if(t("("))return a=t(this.entity),u(")"),new e.Selector([new e.Element("",a,f)]);while(c=t(this.element)){g=b.charAt(f),d.push(c);if(g==="{"||g==="}"||g===";"||g===",")break}if(d.length>0)return new e.Selector(d)},tag:function(){return t(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||t("*")},attribute:function(){var a="",b,c,d;if(!t("["))return;if(b=t(/^[a-zA-Z-]+/)||t(this.entities.quoted))(d=t(/^[|~*$^]?=/))&&(c=t(this.entities.quoted)||t(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!t("]"))return;if(a)return"["+a+"]"},block:function(){var a;if(t("{")&&(a=t(this.primary))&&t("}"))return a},ruleset:function(){var b=[],c,d,g;q();while(c=t(this.selector)){b.push(c),t(this.comment);if(!t(","))break;t(this.comment)}if(b.length>0&&(d=t(this.block)))return new e.Ruleset(b,d,a.strictImports);j=f,r()},rule:function(){var a,c,d=b.charAt(f),h,l;q();if(d==="."||d==="#"||d==="&")return;if(a=t(this.variable)||t(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(k[g]))?(f+=l[0].length-1,c=new e.Anonymous(l[1])):a==="font"?c=t(this.font):c=t(this.value),h=t(this.important);if(c&&t(this.end))return new e.Rule(a,c,h,i);j=f,r()}},"import":function(){var a,b,c=f;if(t(/^@import\s+/)&&(a=t(this.entities.quoted)||t(this.entities.url))){b=t(this.mediaFeatures);if(t(";"))return new e.Import(a,p,b,c)}},mediaFeature:function(){var a,b,c=[];do if(a=t(this.entities.keyword))c.push(a);else if(t("(")){b=t(this.property),a=t(this.entity);if(!t(")"))return null;if(b&&a)c.push(new e.Paren(new e.Rule(b,a,null,f,!0)));else if(a)c.push(new e.Paren(a));else return null}while(a);if(c.length>0)return new e.Expression(c)},mediaFeatures:function(){var a,b=[];do if(a=t(this.mediaFeature)){b.push(a);if(!t(","))break}else if(a=t(this.entities.variable)){b.push(a);if(!t(","))break}while(a);return b.length>0?b:null},media:function(){var a,b;if(t(/^@media/)){a=t(this.mediaFeatures);if(b=t(this.block))return new e.Media(b,a)}},directive:function(){var a,c,d,g,h,i;if(b.charAt(f)!=="@")return;if(c=t(this["import"])||t(this.media))return c;if(a=t(/^@page|@keyframes/)||t(/^@(?:-webkit-|-moz-|-o-|-ms-)[a-z0-9-]+/)){g=(t(/^[^{]+/)||"").trim();if(d=t(this.block))return new e.Directive(a+" "+g,d)}else if(a=t(/^@[-a-z]+/))if(a==="@font-face"){if(d=t(this.block))return new e.Directive(a,d)}else if((c=t(this.entity))&&t(";"))return new e.Directive(a,c)},font:function(){var a=[],b=[],c,d,f,g;while(g=t(this.shorthand)||t(this.entity))b.push(g);a.push(new e.Expression(b));if(t(","))while(g=t(this.expression)){a.push(g);if(!t(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=t(this.expression)){b.push(a);if(!t(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(f)==="!")return t(/^! *important/)},sub:function(){var a;if(t("(")&&(a=t(this.expression))&&t(")"))return a},multiplication:function(){var a,b,c,d;if(a=t(this.operand)){while(!w(/^\/\*/)&&(c=t("/")||t("*"))&&(b=t(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,c,d,g;if(a=t(this.multiplication)){while((d=t(/^[-+]\s+/)||b.charAt(f-1)!=" "&&(t("+")||t("-")))&&(c=t(this.multiplication)))g=new e.Operation(d,[g||a,c]);return g||a}},conditions:function(){var a,b,c=f,d;if(a=t(this.condition)){while(t(",")&&(b=t(this.condition)))d=new e.Condition("or",d||a,b,c);return d||a}},condition:function(){var a,b,c,d,g=f,h=!1;t(/^not/)&&(h=!0),u("(");if(a=t(this.addition)||t(this.entities.keyword)||t(this.entities.quoted))return(d=t(/^(?:>=|=<|[<=>])/))?(b=t(this.addition)||t(this.entities.keyword)||t(this.entities.quoted))?c=new e.Condition(d,a,b,g,h):v("expected expression"):c=new e.Condition("=",a,new e.Keyword("true"),g,h),u(")"),t(/^and/)?new e.Condition("and",c,t(this.condition)):c},operand:function(){var a,c=b.charAt(f+1);b.charAt(f)==="-"&&(c==="@"||c==="(")&&(a=t("-"));var d=t(this.sub)||t(this.entities.dimension)||t(this.entities.color)||t(this.entities.variable)||t(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),d]):d},expression:function(){var a,b,c=[],d;while(a=t(this.addition)||t(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=t(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}};if(d.mode==="browser"||d.mode==="rhino")d.Parser.importer=function(a,b,c,d){!/^([a-z]+:)?\//.test(a)&&b.length>0&&(a=b[0]+a),n({href:a,title:a,type:d.mime},function(e){e&&typeof d.errback=="function"?d.errback.call(null,a,b,c,d):c.apply(null,arguments)},!0)};(function(a){function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function d(a){return Math.min(1,Math.max(0,a))}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){return a=a<0?a+1:a>1?a-1:a,a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();return e.s+=c.value/100,e.s=d(e.s),b(e)},desaturate:function(a,c){var e=a.toHSL();return e.s-=c.value/100,e.s=d(e.s),b(e)},lighten:function(a,c){var e=a.toHSL();return e.l+=c.value/100,e.l=d(e.l),b(e)},darken:function(a,c){var e=a.toHSL();return e.l-=c.value/100,e.l=d(e.l),b(e)},fadein:function(a,c){var e=a.toHSL();return e.a+=c.value/100,e.a=d(e.a),b(e)},fadeout:function(a,c){var e=a.toHSL();return e.a-=c.value/100,e.a=d(e.a),b(e)},fade:function(a,c){var e=a.toHSL();return e.a=c.value/100,e.a=d(e.a),b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;return d.h=e<0?360+e:e,b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e<c.length;e++)d=d.replace(/%[sda]/i,function(a){var b=a.match(/s/i)?c[e].value:c[e].toCSS();return a.match(/[A-Z]$/)?encodeURIComponent(b):b});return d=d.replace(/%%/g,"%"),new a.Quoted('"'+d+'"',d)},round:function(a){return this._math("round",a)},ceil:function(a){return this._math("ceil",a)},floor:function(a){return this._math("floor",a)},_math:function(b,d){if(d instanceof a.Dimension)return new a.Dimension(Math[b](c(d)),d.unit);if(typeof d=="number")return Math[b](d);throw{type:"Argument",message:"argument must be a number"}},argb:function(b){return new a.Anonymous(b.toARGB())},percentage:function(b){return new a.Dimension(b.value*100,"%")},color:function(b){if(b instanceof a.Quoted)return new a.Color(b.value.slice(1));throw{type:"Argument",message:"argument must be a string"}},iscolor:function(b){return this._isa(b,a.Color)},isnumber:function(b){return this._isa(b,a.Dimension)},isstring:function(b){return this._isa(b,a.Quoted)},iskeyword:function(b){return this._isa(b,a.Keyword)},isurl:function(b){return this._isa(b,a.URL)},ispixel:function(b){return b instanceof a.Dimension&&b.unit==="px"?a.True:a.False},ispercentage:function(b){return b instanceof a.Dimension&&b.unit==="%"?a.True:a.False},isem:function(b){return b instanceof a.Dimension&&b.unit==="em"?a.True:a.False},_isa:function(b,c){return b instanceof c?a.True:a.False}}})(c("./tree")),function(a){a.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(c("./tree")),function(a){a.Alpha=function(a){this.value=a},a.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(a){return this.value.eval&&(this.value=this.value.eval(a)),this}}}(c("../tree")),function(a){a.Anonymous=function(a){this.value=a.value||a},a.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Assignment=function(a,b){this.key=a,this.value=b},a.Assignment.prototype={toCSS:function(){return this.key+"="+(this.value.toCSS?this.value.toCSS():this.value)},eval:function(a){return this.value.eval&&(this.value=this.value.eval(a)),this}}}(c("../tree")),function(a){a.Call=function(a,b,c,d){this.name=a,this.args=b,this.index=c,this.filename=d},a.Call.prototype={eval:function(b){var c=this.args.map(function(a){return a.eval(b)});if(!(this.name in a.functions))return new a.Anonymous(this.name+"("+c.map(function(a){return a.toCSS()}).join(", ")+")");try{return a.functions[this.name].apply(a.functions,c)}catch(d){throw{type:d.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(d.message?": "+d.message:""),index:this.index,filename:this.filename}}},toCSS:function(a){return this.eval(a).toCSS()}}}(c("../tree")),function(a){a.Color=function(a,b){Array.isArray(a)?this.rgb=a:a.length==6?this.rgb=a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):this.rgb=a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha=typeof b=="number"?b:1},a.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(a){return Math.round(a)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(a){return a=Math.round(a),a=(a>255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b<c?6:0);break;case b:g=(c-a)/j+2;break;case c:g=(a-b)/j+4}g/=6}return{h:g*360,s:h,l:i,a:d}},toARGB:function(){var a=[Math.round(this.alpha*255)].concat(this.rgb);return"#"+a.map(function(a){return a=Math.round(a),a=(a>255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")}}}(c("../tree")),function(a){a.Comment=function(a,b){this.value=a,this.silent=!!b},a.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Condition=function(a,b,c,d,e){this.op=a.trim(),this.lvalue=b,this.rvalue=c,this.index=d,this.negate=e},a.Condition.prototype.eval=function(a){var b=this.lvalue.eval(a),c=this.rvalue.eval(a),d=this.index,e,e=function(a){switch(a){case"and":return b&&c;case"or":return b||c;default:if(b.compare)e=b.compare(c);else if(c.compare)e=c.compare(b);else throw{type:"Type",message:"Unable to perform comparison",index:d};switch(e){case-1:return a==="<"||a==="=<";case 0:return a==="="||a===">="||a==="=<";case 1:return a===">"||a===">="}}}(this.op);return this.negate?!e:e}}(c("../tree")),function(a){a.Dimension=function(a,b){this.value=parseFloat(a),this.unit=b||null},a.Dimension.prototype={eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},toCSS:function(){var a=this.value+this.unit;return a},operate:function(b,c){return new a.Dimension(a.operate(b,this.value,c.value),this.unit||c.unit)},compare:function(b){return b instanceof a.Dimension?b.value>this.value?-1:b.value<this.value?1:0:-1}}}(c("../tree")),function(a){a.Directive=function(b,c,d){this.name=b,Array.isArray(c)?(this.ruleset=new a.Ruleset([],c),this.ruleset.allowImports=!0):this.value=c},a.Directive.prototype={toCSS:function(a,b){return this.ruleset?(this.ruleset.root=!0,this.name+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(a){return a.frames.unshift(this),this.ruleset=this.ruleset&&this.ruleset.eval(a),a.frames.shift(),this},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(c("../tree")),function(a){a.Element=function(b,c,d){this.combinator=b instanceof a.Combinator?b:new a.Combinator(b),typeof c=="string"?this.value=c.trim():c?this.value=c:this.value="",this.index=d},a.Element.prototype.eval=function(b){return new a.Element(this.combinator,this.value.eval?this.value.eval(b):this.value,this.index)},a.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+(this.value.toCSS?this.value.toCSS(a):this.value)},a.Combinator=function(a){a===" "?this.value=" ":a==="& "?this.value="& ":this.value=a?a.trim():""},a.Combinator.prototype.toCSS=function(a){return{"":""," ":" ","&":"","& ":" ",":":" :","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS?b.toCSS(a):""}).join(" ")}}}(c("../tree")),function(a){a.Import=function(b,c,d,e){var f=this;this.index=e,this._path=b,this.features=d&&new a.Value(d),b instanceof a.Quoted?this.path=/\.(le?|c)ss(\?.*)?$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css(\?.*)?$/.test(this.path),this.css||c.push(this.path,function(b,c){b&&(b.index=e),f.root=c||new a.Ruleset([],[])})},a.Import.prototype={toCSS:function(a){var b=this.features?" "+this.features.toCSS(a):"";return this.css?"@import "+this._path.toCSS()+b+";\n":""},eval:function(b){var c,d=this.features&&this.features.eval(b);if(this.css)return this;c=new a.Ruleset([],this.root.rules.slice(0));for(var e=0;e<c.rules.length;e++)c.rules[e]instanceof a.Import&&Array.prototype
-.splice.apply(c.rules,[e,1].concat(c.rules[e].eval(b)));return this.features?new a.Media(c.rules,this.features.value):c.rules}}}(c("../tree")),function(a){a.JavaScript=function(a,b,c){this.escaped=c,this.expression=a,this.index=b},a.JavaScript.prototype={eval:function(b){var c,d=this,e={},f=this.expression.replace(/@\{([\w-]+)\}/g,function(c,e){return a.jsify((new a.Variable("@"+e,d.index)).eval(b))});try{f=new Function("return ("+f+")")}catch(g){throw{message:"JavaScript evaluation error: `"+f+"`",index:this.index}}for(var h in b.frames[0].variables())e[h.slice(1)]={value:b.frames[0].variables()[h].value,toJS:function(){return this.value.eval(b).toCSS()}};try{c=f.call(e)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message+"'",index:this.index}}return typeof c=="string"?new a.Quoted('"'+c+'"',c,this.escaped,this.index):Array.isArray(c)?new a.Anonymous(c.join(", ")):new a.Anonymous(c)}}}(c("../tree")),function(a){a.Keyword=function(a){this.value=a},a.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value},compare:function(b){return b instanceof a.Keyword?b.value===this.value?0:1:-1}},a.True=new a.Keyword("true"),a.False=new a.Keyword("false")}(c("../tree")),function(a){a.Media=function(b,c){var d=new a.Element("&",null,0),e=[new a.Selector([d])];this.features=new a.Value(c),this.ruleset=new a.Ruleset(e,b),this.ruleset.allowImports=!0},a.Media.prototype={toCSS:function(a,b){var c=this.features.toCSS(b);return this.ruleset.root=a.length===0||a[0].multiMedia,"@media "+c+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")},eval:function(b){b.mediaBlocks||(b.mediaBlocks=[],b.mediaPath=[]);var c=b.mediaBlocks.length;b.mediaPath.push(this),b.mediaBlocks.push(this);var d=new a.Media([],[]);return d.features=this.features.eval(b),b.frames.unshift(this.ruleset),d.ruleset=this.ruleset.eval(b),b.frames.shift(),b.mediaBlocks[c]=d,b.mediaPath.pop(),b.mediaPath.length===0?d.evalTop(b):d.evalNested(b)},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)},evalTop:function(b){var c=this;if(b.mediaBlocks.length>1){var d=new a.Element("&",null,0),e=[new a.Selector([d])];c=new a.Ruleset(e,b.mediaBlocks),c.multiMedia=!0}return delete b.mediaBlocks,delete b.mediaPath,c},evalNested:function(b){var c,d,e=b.mediaPath.concat([this]);for(c=0;c<e.length;c++)d=e[c].features instanceof a.Value?e[c].features.value:e[c].features,e[c]=Array.isArray(d)?d:[d];return this.features=new a.Value(this.permute(e).map(function(b){b=b.map(function(b){return b.toCSS?b:new a.Anonymous(b)});for(c=b.length-1;c>0;c--)b.splice(c,0,new a.Anonymous("and"));return new a.Expression(b)})),new a.Ruleset([],[])},permute:function(a){if(a.length===0)return[];if(a.length===1)return a[0];var b=[],c=this.permute(a.slice(1));for(var d=0;d<c.length;d++)for(var e=0;e<a[0].length;e++)b.push([a[0][e]].concat(c[d]));return b}}}(c("../tree")),function(a){a.mixin={},a.mixin.Call=function(b,c,d,e,f){this.selector=new a.Selector(b),this.arguments=c,this.index=d,this.filename=e,this.important=f},a.mixin.Call.prototype={eval:function(a){var b,c,d=[],e=!1;for(var f=0;f<a.frames.length;f++)if((b=a.frames[f].find(this.selector)).length>0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g<b.length;g++)if(b[g].match(c,a))try{Array.prototype.push.apply(d,b[g].eval(a,this.arguments,this.important).rules),e=!0}catch(h){throw{message:h.message,index:this.index,filename:this.filename,stack:h.stack}}if(e)return d;throw{type:"Runtime",message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(a){return a.toCSS()}).join(", ")+")`",index:this.index,filename:this.filename}}throw{type:"Name",message:this.selector.toCSS().trim()+" is undefined",index:this.index,filename:this.filename}}},a.mixin.Definition=function(b,c,d,e,f){this.name=b,this.selectors=[new a.Selector([new a.Element(null,b)])],this.params=c,this.condition=e,this.variadic=f,this.arity=c.length,this.rules=d,this._lookups={},this.required=c.reduce(function(a,b){return!b.name||b.name&&!b.value?a+1:a},0),this.parent=a.Ruleset.prototype,this.frames=[]},a.mixin.Definition.prototype={toCSS:function(){return""},variable:function(a){return this.parent.variable.call(this,a)},variables:function(){return this.parent.variables.call(this)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},evalParams:function(b,c){var d=new a.Ruleset(null,[]),e;for(var f=0,g,h;f<this.params.length;f++)if(h=this.params[f].name)if(this.params[f].variadic&&c){e=[];for(var i=f;i<c.length;i++)e.push(c[i].eval(b));d.rules.unshift(new a.Rule(h,(new a.Expression(e)).eval(b)))}else if(g=c&&c[f]||this.params[f].value)d.rules.unshift(new a.Rule(h,g.eval(b)));else throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+c.length+" for "+this.arity+")"};return d},eval:function(b,c,d){var e=this.evalParams(b,c),f,g=[],h,i;for(var j=0;j<Math.max(this.params.length,c&&c.length);j++)g.push(c[j]||this.params[j].value);return e.rules.unshift(new a.Rule("@arguments",(new a.Expression(g)).eval(b))),h=d?this.rules.map(function(b){return new a.Rule(b.name,b.value,"!important",b.index)}):this.rules.slice(0),(new a.Ruleset(null,h)).eval({frames:[this,e].concat(this.frames,b.frames)})},match:function(a,b){var c=a&&a.length||0,d,e;if(!this.variadic){if(c<this.required)return!1;if(c>this.params.length)return!1;if(this.required>0&&c>this.params.length)return!1}if(this.condition&&!this.condition.eval({frames:[this.evalParams(b,a)].concat(b.frames)}))return!1;d=Math.min(c,this.arity);for(var f=0;f<d;f++)if(!this.params[f].name&&a[f].eval(b).toCSS()!=this.params[f].value.eval(b).toCSS())return!1;return!0}}}(c("../tree")),function(a){a.Operation=function(a,b){this.op=a.trim(),this.operands=b},a.Operation.prototype.eval=function(b){var c=this.operands[0].eval(b),d=this.operands[1].eval(b),e;if(c instanceof a.Dimension&&d instanceof a.Color)if(this.op==="*"||this.op==="+")e=d,d=c,c=e;else throw{name:"OperationError",message:"Can't substract or divide a color from a number"};return c.operate(this.op,d)},a.operate=function(a,b,c){switch(a){case"+":return b+c;case"-":return b-c;case"*":return b*c;case"/":return b/c}}}(c("../tree")),function(a){a.Paren=function(a){this.value=a},a.Paren.prototype={toCSS:function(a){return"("+this.value.toCSS(a)+")"},eval:function(b){return new a.Paren(this.value.eval(b))}}}(c("../tree")),function(a){a.Quoted=function(a,b,c,d){this.escaped=c,this.value=b||"",this.quote=a.charAt(0),this.index=d},a.Quoted.prototype={toCSS:function(){return this.escaped?this.value:this.quote+this.value+this.quote},eval:function(b){var c=this,d=this.value.replace(/`([^`]+)`/g,function(d,e){return(new a.JavaScript(e,c.index,!0)).eval(b).value}).replace(/@\{([\w-]+)\}/g,function(d,e){var f=(new a.Variable("@"+e,c.index)).eval(b);return"value"in f?f.value:f.toCSS()});return new a.Quoted(this.quote+d+this.quote,d,this.escaped,this.index)}}}(c("../tree")),function(a){a.Rule=function(b,c,d,e,f){this.name=b,this.value=c instanceof a.Value?c:new a.Value([c]),this.important=d?" "+d.trim():"",this.index=e,this.inline=f||!1,b.charAt(0)==="@"?this.variable=!0:this.variable=!1},a.Rule.prototype.toCSS=function(a){return this.variable?"":this.name+(a.compress?":":": ")+this.value.toCSS(a)+this.important+(this.inline?"":";")},a.Rule.prototype.eval=function(b){return new a.Rule(this.name,this.value.eval(b),this.important,this.index,this.inline)},a.Shorthand=function(a,b){this.a=a,this.b=b},a.Shorthand.prototype={toCSS:function(a){return this.a.toCSS(a)+"/"+this.b.toCSS(a)},eval:function(){return this}}}(c("../tree")),function(a){a.Ruleset=function(a,b,c){this.selectors=a,this.rules=b,this._lookups={},this.strictImports=c},a.Ruleset.prototype={eval:function(b){var c=this.selectors&&this.selectors.map(function(a){return a.eval(b)}),d=new a.Ruleset(c,this.rules.slice(0),this.strictImports);d.root=this.root,d.allowImports=this.allowImports,b.frames.unshift(d);if(d.root||d.allowImports||!d.strictImports)for(var e=0;e<d.rules.length;e++)d.rules[e]instanceof a.Import&&Array.prototype.splice.apply(d.rules,[e,1].concat(d.rules[e].eval(b)));for(var e=0;e<d.rules.length;e++)d.rules[e]instanceof a.mixin.Definition&&(d.rules[e].frames=b.frames.slice(0));for(var e=0;e<d.rules.length;e++)d.rules[e]instanceof a.mixin.Call&&Array.prototype.splice.apply(d.rules,[e,1].concat(d.rules[e].eval(b)));for(var e=0,f;e<d.rules.length;e++)f=d.rules[e],f instanceof a.mixin.Definition||(d.rules[e]=f.eval?f.eval(b):f);return b.frames.shift(),d},match:function(a){return!a||a.length===0},variables:function(){return this._variables?this._variables:this._variables=this.rules.reduce(function(b,c){return c instanceof a.Rule&&c.variable===!0&&(b[c.name]=c),b},{})},variable:function(a){return this.variables()[a]},rulesets:function(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(b){return b instanceof a.Ruleset||b instanceof a.mixin.Definition})},find:function(b,c){c=c||this;var d=[],e,f,g=b.toCSS();return g in this._lookups?this._lookups[g]:(this.rulesets().forEach(function(e){if(e!==c)for(var g=0;g<e.selectors.length;g++)if(f=b.match(e.selectors[g])){b.elements.length>e.selectors[g].elements.length?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}}),this._lookups[g]=d)},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;this.root||(b.length===0?g=this.selectors.map(function(a){return[a]}):this.joinSelectors(g,b,this.selectors));for(var j=0;j<this.rules.length;j++)i=this.rules[j],i.rules||i instanceof a.Directive||i instanceof a.Media?f.push(i.toCSS(g,c)):i instanceof a.Comment?i.silent||(this.root?f.push(i.toCSS(c)):e.push(i.toCSS(c))):i.toCSS&&!i.variable?e.push(i.toCSS(c)):i.value&&!i.variable&&e.push(i.value.toString());return f=f.join(""),this.root?d.push(e.join(c.compress?"":"\n")):e.length>0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":",\n"),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f),d.join("")+(c.compress?"\n":"")},joinSelectors:function(a,b,c){for(var d=0;d<c.length;d++)this.joinSelector(a,b,c[d])},joinSelector:function(b,c,d){var e=[],f=[],g=[],h=[],i=!1,j;for(var k=0;k<d.elements.length;k++)j=d.elements[k],j.combinator.value.charAt(0)==="&"&&(i=!0),i?h.push(j):g.push(j);i||(h=g,g=[]),g.length>0&&e.push(new a.Selector(g)),h.length>0&&f.push(new a.Selector(h));for(var l=0;l<c.length;l++)b.push(e.concat(c[l]).concat(f))}}}(c("../tree")),function(a){a.Selector=function(a){this.elements=a,this.elements[0].combinator.value===""&&(this.elements[0].combinator.value=" ")},a.Selector.prototype.match=function(a){var b=this.elements.length,c=a.elements.length,d=Math.min(b,c);if(b<c)return!1;for(var e=0;e<d;e++)if(this.elements[e].value!==a.elements[e].value)return!1;return!0},a.Selector.prototype.eval=function(b){return new a.Selector(this.elements.map(function(a){return a.eval(b)}))},a.Selector.prototype.toCSS=function(a){return this._css?this._css:this._css=this.elements.map(function(b){return typeof b=="string"?" "+b.trim():b.toCSS(a)}).join("")}}(c("../tree")),function(b){b.URL=function(b,c){b.data?this.attrs=b:(typeof a!="undefined"&&!/^(?:https?:\/\/|file:\/\/|data:|\/)/.test(b.value)&&c.length>0&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("../tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("../tree")),function(a){a.Variable=function(a,b,c){this.name=a,this.index=b,this.file=c},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{type:"Name",message:"variable "+e+" is undefined",filename:this.file,index:this.index}}}}(c("../tree")),function(a){a.find=function(a,b){for(var c=0,d;c<a.length;c++)if(d=b.call(a,a[c]))return d;return null},a.jsify=function(a){return Array.isArray(a.value)&&a.value.length>1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)}}(c("./tree"));var f=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||f?"development":"production"),d.async=!1,d.poll=d.poll||(f?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&m(function(a,b,c,d,e){b&&p(b.toCSS(),d,e.lastModified)})},d.poll)):d.optimization=3;var g;try{g=typeof a.localStorage=="undefined"?null:a.localStorage}catch(h){g=null}var i=document.getElementsByTagName("link"),j=/^text\/(x-)?less$/;d.sheets=[];for(var k=0;k<i.length;k++)(i[k].rel==="stylesheet/less"||i[k].rel.match(/stylesheet/)&&i[k].type.match(j))&&d.sheets.push(i[k]);d.refresh=function(a){var b,c;b=c=new Date,m(function(a,d,e,f,g){g.local?t("loading "+f.href+" from cache."):(t("parsed "+f.href+" successfully."),p(d.toCSS(),f,g.lastModified)),t("css for "+f.href+" generated in "+(new Date-c)+"ms"),g.remaining===0&&t("css generated in "+(new Date-b)+"ms"),c=new Date},a),l()},d.refreshStyles=l,d.refresh(d.env==="development")})(window);
\ No newline at end of file
Added: trunk/catalog/admin/includes/javascript/less-1.3.3.min.js
===================================================================
--- trunk/catalog/admin/includes/javascript/less-1.3.3.min.js (rev 0)
+++ trunk/catalog/admin/includes/javascript/less-1.3.3.min.js 2013-06-29 13:46:37 UTC (rev 4761)
@@ -0,0 +1,9 @@
+//
+// LESS - Leaner CSS v1.3.3
+// http://lesscss.org
+//
+// Copyright (c) 2009-2013, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+(function(e,t){function n(t){return e.less[t.split("/")[1]]}function f(){r.env==="development"?(r.optimization=0,r.watchTimer=setInterval(function(){r.watchMode&&g(function(e,t,n,r,i){t&&S(t.toCSS(),r,i.lastModified)})},r.poll)):r.optimization=3}function m(){var e=document.getElementsByTagName("style");for(var t=0;t<e.length;t++)e[t].type.match(p)&&(new r.Parser({filename:document.location.href.replace(/#.*$/,""),dumpLineNumbers:r.dumpLineNumbers})).parse(e[t].innerHTML||"",function(n,r){var i=r.toCSS(),s=e[t];s.type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.innerHTML=i})}function g(e,t){for(var n=0;n<r.sheets.length;n++)w(r.sheets[n],e,t,r.sheets.length-(n+1))}function y(e,t){var n=b(e),r=b(t),i,s,o,u,a="";if(n.hostPart!==r.hostPart)return"";s=Math.max(r.directories.length,n.directories.length);for(i=0;i<s;i++)if(r.directories[i]!==n.directories[i])break;u=r.directories.slice(i),o=n.directories.slice(i);for(i=0;i<u.length-1;i++)a+="../";for(i=0;i<o.length-1;i++)a+=o[i]+"/";return a}function b(e,t){var n=/^((?:[a-z-]+:)?\/\/(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/,r=e.match(n),i={},s=[],o,u;if(!r)throw new Error("Could not parse sheet href - '"+e+"'");if(!r[1]||r[2]){u=t.match(n);if(!u)throw new Error("Could not parse page url - '"+t+"'");r[1]=u[1],r[2]||(r[3]=u[3]+r[3])}if(r[3]){s=r[3].replace("\\","/").split("/");for(o=0;o<s.length;o++)s[o]===".."&&o>0&&(s.splice(o-1,2),o-=2)}return i.hostPart=r[1],i.directories=s,i.path=r[1]+s.join("/"),i.fileUrl=i.path+(r[4]||""),i.url=i.fileUrl+(r[5]||""),i}function w(t,n,i,s){var o=t.contents||{},u=t.files||{},a=b(t.href,e.location.href),f=a.url,c=l&&l.getItem(f),h=l&&l.getItem(f+":timestamp"),p={css:c,timestamp:h},d;r.relativeUrls?r.rootpath?t.entryPath?d=b(r.rootpath+y(a.path,t.entryPath)).path:d=r.rootpath:d=a.path:r.rootpath?d=r.rootpath:t.entryPath?d=t.entryPath:d=a.path,x(f,t.type,function(e,l){v+=e.replace(/@import .+?;/ig,"");if(!i&&p&&l&&(new Date(l)).valueOf()===(new Date(p.timestamp)).valueOf())S(p.css,t),n(null,null,e,t,{local:!0,remaining:s},f);else try{o[f]=e,(new r.Parser({optimization:r.optimization,paths:[a.path],entryPath:t.entryPath||a.path,mime:t.type,filename:f,rootpath:d,relativeUrls:t.relativeUrls,contents:o,files:u,dumpLineNumbers:r.dumpLineNumbers})).parse(e,function(r,i){if(r)return k(r,f);try{n(r,i,e,t,{local:!1,lastModified:l,remaining:s},f),N(document.getElementById("less-error-message:"+E(f)))}catch(r){k(r,f)}})}catch(c){k(c,f)}},function(e,t){throw new Error("Couldn't load "+t+" ("+e+")")})}function E(e){return e.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function S(e,t,n){var r,i=t.href||"",s="less:"+(t.title||E(i));if((r=document.getElementById(s))===null){r=document.createElement("style"),r.type="text/css",t.media&&(r.media=t.media),r.id=s;var o=t&&t.nextSibling||null;(o||document.getElementsByTagName("head")[0]).parentNode.insertBefore(r,o)}if(r.styleSheet)try{r.styleSheet.cssText=e}catch(u){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(e){r.childNodes.length>0?r.firstChild.nodeValue!==e.nodeValue&&r.replaceChild(e,r.firstChild):r.appendChild(e)})(document.createTextNode(e));if(n&&l){C("saving "+i+" to cache.");try{l.setItem(i,e),l.setItem(i+":timestamp",n)}catch(u){C("failed to save")}}}function x(e,t,n,i){function a(t,n,r){t.status>=200&&t.status<300?n(t.responseText,t.getResponseHeader("Last-Modified")):typeof r=="function"&&r(t.status,e)}var s=T(),u=o?r.fileAsync:r.async;typeof s.overrideMimeType=="function"&&s.overrideMimeType("text/css"),s.open("GET",e,u),s.setRequestHeader("Accept",t||"text/x-less, text/css; q=0.9, */*; q=0.5"),s.send(null),o&&!r.fileAsync?s.status===0||s.status>=200&&s.status<300?n(s.responseText):i(s.status,e):u?s.onreadystatechange=function(){s.readyState==4&&a(s,n,i)}:a(s,n,i)}function T(){if(e.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(t){return C("browser doesn't support AJAX."),null}}function N(e){return e&&e.parentNode.removeChild(e)}function C(e){r.env=="development"&&typeof console!="undefined"&&console.log("less: "+e)}function k(e,t){var n="less-error-message:"+E(t),i='<li><label>{line}</label><pre class="{class}">{content}</pre></li>',s=document.createElement("div"),o,u,a=[],f=e.filename||t,l=f.match(/([^\/]+(\?.*)?)$/)[1];s.id=n,s.className="less-error-message",u="<h3>"+(e.message||"There is an error in your .less file")+"</h3>"+'<p>in <a href="'+f+'">'+l+"</a> ";var c=function(e,t,n){e.extract[t]&&a.push(i.replace(/\{line\}/,parseInt(e.line)+(t-1)).replace(/\{class\}/,n).replace(/\{content\}/,e.extract[t]))};e.stack?u+="<br/>"+e.stack.split("\n").slice(1).join("<br/>"):e.extract&&(c(e,0,""),c(e,1,"line"),c(e,2,""),u+="on line "+e.line+", column "+(e.column+1)+":</p>"+"<ul>"+a.join("")+"</ul>"),s.innerHTML=u,S([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),s.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),r.env=="development"&&(o=setInterval(function(){document.body&&(document.getElementById(n)?document.body.replaceChild(s,document.getElementById(n)):document.body.insertBefore(s,document.body.firstChild),clearInterval(o))},10))}Array.isArray||(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"||e instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n=this.length>>>0;for(var r=0;r<n;r++)r in this&&e.call(t,this[r],r,this)}),Array.prototype.map||(Array.prototype.map=function(e){var t=this.length>>>0,n=new Array(t),r=arguments[1];for(var i=0;i<t;i++)i in this&&(n[i]=e.call(r,this[i],i,this));return n}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=[],n=arguments[1];for(var r=0;r<this.length;r++)e.call(n,this[r])&&t.push(this[r]);return t}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=this.length>>>0,n=0;if(t===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var r=arguments[1];else do{if(n in this){r=this[n++];break}if(++n>=t)throw new TypeError}while(!0);for(;n<t;n++)n in this&&(r=e.call(null,r,this[n],n,this));return r}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length,n=arguments[1]||0;if(!t)return-1;if(n>=t)return-1;n<0&&(n+=t);for(;n<t;n++){if(!Object.prototype.hasOwnProperty.call(this,n))continue;if(e===this[n])return n}return-1}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}),String.prototype.trim||(String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")});var r,i,s;typeof environment=="object"&&{}.toString.call(environment)==="[object Environment]"?(typeof e=="undefined"?r={}:r=e.less={},i=r.tree={},r.mode="rhino"):typeof e=="undefined"?(r=exports,i=n("./tree"),r.mode="node"):(typeof e.less=="undefined"&&(e.less={}),r=e.less,i=e.less.tree={},r.mode="browser"),r.Parser=function(t){function g(){a=c[u],f=o,h=o}function y(){c[u]=a,o=f,h=o}function b(){o>h&&(c[u]=c[u].slice(o-h),h=o)}function w(e){var t=e.charCodeAt(0);return t===32||t===10||t===9}function E(e){var t,n,r,i,a;if(e instanceof Function)return e.call(p.parsers);if(typeof e=="string")t=s.charAt(o)===e?e:null,r=1,b();else{b();if(!(t=e.exec(c[u])))return null;r=t[0].length}if(t)return S(r),typeof t=="string"?t:t.length===1?t[0]:t}function S(e){var t=o,n=u,r=o+c[u].length,i=o+=e;while(o<r){if(!w(s.charAt(o)))break;o++}return c[u]=c[u].slice(e+(o-i)),h=o,c[u].length===0&&u<c.length-1&&u++,t!==o||n!==u}function x(e,t){var n=E(e);if(!!n)return n;T(t||(typeof e=="string"?"expected '"+e+"' got '"+s.charAt(o)+"'":"unexpected token"))}function T(e,t){var n=new Error(e);throw n.index=o,n.type=t||"Syntax",n}function N(e){return typeof e=="string"?s.charAt(o)===e:e.test(c[u])?!0:!1}function C(e,t){return e.filename&&t.filename&&e.filename!==t.filename?p.imports.contents[e.filename]:s}function k(e,t){for(var n=e,r=-1;n>=0&&t.charAt(n)!=="\n";n--)r++;return{line:typeof e=="number"?(t.slice(0,e).match(/\n/g)||"").length:null,column:r}}function L(e){return r.mode==="browser"||r.mode==="rhino"?e.filename:n("path").resolve(e.filename)}function A(e,t,n){return{lineNumber:k(e,t).line+1,fileName:L(n)}}function O(e,t){var n=C(e,t),r=k(e.index,n),i=r.line,s=r.column,o=n.split("\n");this.type=e.type||"Syntax",this.message=e.message,this.filename=e.filename||t.filename,this.index=e.index,this.line=typeof i=="number"?i+1:null,this.callLine=e.call&&k(e.call,n).line+1,this.callExtract=o[k(e.call,n).line],this.stack=e.stack,this.column=s,this.extract=[o[i-1],o[i],o[i+1]]}var s,o,u,a,f,l,c,h,p,d=this,t=t||{};t.contents||(t.contents={}),t.rootpath=t.rootpath||"",t.files||(t.files={});var v=function(){},m=this.imports={paths:t.paths||[],queue:[],files:t.files,contents:t.contents,mime:t.mime,error:null,push:function(e,n){var i=this;this.queue.push(e),r.Parser.importer(e,this.paths,function(t,r,s){i.queue.splice(i.queue.indexOf(e),1);var o=s in i.files;i.files[s]=r,t&&!i.error&&(i.error=t),n(t,r,o),i.queue.length===0&&v(i.error)},t)}};return this.env=t=t||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null,p={imports:m,parse:function(e,a){var f,d,m,g,y,b,w=[],S,x=null;o=u=h=l=0,s=e.replace(/\r\n/g,"\n"),s=s.replace(/^\uFEFF/,""),c=function(e){var n=0,r=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,i=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,o=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,u=0,a,f=e[0],l;for(var c=0,h,p;c<s.length;){r.lastIndex=c,(a=r.exec(s))&&a.index===c&&(c+=a[0].length,f.push(a[0])),h=s.charAt(c),i.lastIndex=o.lastIndex=c;if(a=o.exec(s))if(a.index===c){c+=a[0].length,f.push(a[0]);continue}if(!l&&h==="/"){p=s.charAt(c+1);if(p==="/"||p==="*")if(a=i.exec(s))if(a.index===c){c+=a[0].length,f.push(a[0]);continue}}switch(h){case"{":if(!l){u++,f.push(h);break};case"}":if(!l){u--,f.push(h),e[++n]=f=[];break};case"(":if(!l){l=!0,f.push(h);break};case")":if(l){l=!1,f.push(h);break};default:f.push(h)}c++}return u!=0&&(x=new O({index:c-1,type:"Parse",message:u>0?"missing closing `}`":"missing opening `{`",filename:t.filename},t)),e.map(function(e){return e.join("")})}([[]]);if(x)return a(x,t);try{f=new i.Ruleset([],E(this.parsers.primary)),f.root=!0}catch(T){return a(new O(T,t))}f.toCSS=function(e){var s,o,u;return function(s,o){var u=[],a;s=s||{},typeof o=="object"&&!Array.isArray(o)&&(o=Object.keys(o).map(function(e){var t=o[e];return t instanceof i.Value||(t instanceof i.Expression||(t=new i.Expression([t])),t=new i.Value([t])),new i.Rule("@"+e,t,!1,0)}),u=[new i.Ruleset(null,o)]);try{var f=e.call(this,{frames:u}).toCSS([],{compress:s.compress||!1,dumpLineNumbers:t.dumpLineNumbers})}catch(l){throw new O(l,t)}if(a=p.imports.error)throw a instanceof O?a:new O(a,t);return s.yuicompress&&r.mode==="node"?n("ycssmin").cssmin(f):s.compress?f.replace(/(\s)+/g,"$1"):f}}(f.eval);if(o<s.length-1){o=l,b=s.split("\n"),y...
[truncated message content] |
|
From: <os...@us...> - 2013-06-28 13:14:14
|
Revision: 4760
http://sourceforge.net/p/oscss/svn/4760
Author: oscim
Date: 2013-06-28 13:14:11 +0000 (Fri, 28 Jun 2013)
Log Message:
-----------
Add colum ref and barcode in products tables
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products.sql
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_products.sql 2013-06-28 13:14:11 UTC (rev 4760)
@@ -0,0 +1,18 @@
+--+######################################################################--+
+--| 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_products ADD products_ref VARCHAR( 64 ) NOT NULL AFTER products_id ;
+
+
+ALTER TABLE osc_products ADD products_barcode_type INT( 1 ) NULL AFTER track_stock ,
+ADD products_barcode VARCHAR( 64 ) NULL AFTER products_barcode_type ;
\ 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...> - 2013-06-28 13:14:00
|
Revision: 4759
http://sourceforge.net/p/oscss/svn/4759
Author: oscim
Date: 2013-06-28 13:13:58 +0000 (Fri, 28 Jun 2013)
Log Message:
-----------
Add colum ref and barcode in products tables
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-28 13:13:37
|
Revision: 4758
http://sourceforge.net/p/oscss/svn/4758
Author: oscim
Date: 2013-06-28 13:13:34 +0000 (Fri, 28 Jun 2013)
Log Message:
-----------
Add colum ref and barcode in products tables
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql 2013-06-28 08:22:01 UTC (rev 4757)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql 2013-06-28 13:13:34 UTC (rev 4758)
@@ -15,6 +15,7 @@
drop table if exists osc_products;
create table osc_products (
products_id int(11) NOT NULL AUTO_INCREMENT,
+ products_ref varchar(64) NOT NULL,
products_type int(2) NOT NULL DEFAULT '1',
products_quantity int(4) NOT NULL DEFAULT '0',
products_quantity_alert int(3) DEFAULT NULL,
@@ -30,6 +31,8 @@
products_tax_class_id int(11) NOT NULL DEFAULT '0',
manufacturers_id int(11) DEFAULT NULL,
track_stock int(1) DEFAULT '1',
+ products_barcode_type int(1) NOT NULL,
+ products_barcode varchar(64) NOT NULL,
products_ordered int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (products_id),
KEY idx_products_date_added (products_date_added)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-28 08:22:08
|
Revision: 4757
http://sourceforge.net/p/oscss/svn/4757
Author: oscim
Date: 2013-06-28 08:22:01 +0000 (Fri, 28 Jun 2013)
Log Message:
-----------
Fix loaded Datatypes
Modified Paths:
--------------
trunk/catalog/admin/includes/appli_top_Test.php
trunk/catalog/includes/appli_top_Test.php
Modified: trunk/catalog/admin/includes/appli_top_Test.php
===================================================================
--- trunk/catalog/admin/includes/appli_top_Test.php 2013-06-24 19:03:27 UTC (rev 4756)
+++ trunk/catalog/admin/includes/appli_top_Test.php 2013-06-28 08:22:01 UTC (rev 4757)
@@ -31,7 +31,7 @@
if (file_exists($rpa.'includes/local/configure.php')) include($rpa.'includes/local/configure.php');
else require($rpa.'includes/configure.php');
- //force current directory
+ //force current directory
@chdir(DIR_FS_ADMIN);
// force config in object, by stdclass
@@ -171,6 +171,9 @@
$oscss->pile_file_lang($rpa.DIR_WS_LANGUAGES . $language . '/'.$page_admin.'.txt');
}
+ /// Init Dynamic DataType
+ DataTypes::getInstance();
+
/// lib specifique a la page
if (oscss_cstr::TestFile(DIR_WS_FUNCTIONS . 'lib.' . $current_page)) require(DIR_WS_FUNCTIONS . 'lib.' . $current_page );
Modified: trunk/catalog/includes/appli_top_Test.php
===================================================================
--- trunk/catalog/includes/appli_top_Test.php 2013-06-24 19:03:27 UTC (rev 4756)
+++ trunk/catalog/includes/appli_top_Test.php 2013-06-28 08:22:01 UTC (rev 4757)
@@ -302,6 +302,9 @@
//! init cache lang (.txt)
$page->cache_lang();
+ /// Init Dynamic DataType
+ DataTypes::getInstance();
+
/// Ultimate SEO URLs v2.1
if (_cst_bool('SEO_ENABLED')) $seo_urls = seo_url::getInstance($languages_id);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-24 19:03:31
|
Revision: 4756
http://sourceforge.net/p/oscss/svn/4756
Author: oscim
Date: 2013-06-24 19:03:27 +0000 (Mon, 24 Jun 2013)
Log Message:
-----------
Fix php notice
adjustment behavior and return extra
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/configuration/my_boutique.listing.gab
trunk/catalog/common/classes/ExtraUtility.php
trunk/catalog/common/classes/formUtility.php
trunk/catalog/includes/classes/core_page/customer.php
trunk/catalog/includes/functions/general.php
Modified: trunk/catalog/admin/includes/gabarit/configuration/my_boutique.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/my_boutique.listing.gab 2013-06-23 14:43:39 UTC (rev 4755)
+++ trunk/catalog/admin/includes/gabarit/configuration/my_boutique.listing.gab 2013-06-24 19:03:27 UTC (rev 4756)
@@ -12,14 +12,14 @@
?>
<div id="ssmenu">
- <?php echo tep_ssmenu_configuration($_GET['gparentID']) ?>
+ <?php echo tep_ssmenu_configuration(@$_GET['gparentID']) ?>
</div>
<h3 class="main-title"><?php echo __('heading my boutique') ?></h3>
-<?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=save_mutli') ?>
+<?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . @$_GET['gparentID'].'&gID=' . @$_GET['gID'] . '&action=save_mutli') ?>
<div class="block_form">
@@ -176,7 +176,7 @@
<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'] )) ; ?>
+ <?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>
</div>
Modified: trunk/catalog/common/classes/ExtraUtility.php
===================================================================
--- trunk/catalog/common/classes/ExtraUtility.php 2013-06-23 14:43:39 UTC (rev 4755)
+++ trunk/catalog/common/classes/ExtraUtility.php 2013-06-24 19:03:27 UTC (rev 4756)
@@ -15,7 +15,7 @@
/**
@var string for create html display required input
*/
- protected static $required = '<span class="inputRequirement"> * </span>';
+// protected static $required = '<span class="inputRequirement"> * </span>';
/**
@fn CheckFormFields($rows, $value)
@@ -128,7 +128,7 @@
public static function FormatFields($rows, $active=true){
$input = '';
- $flag_r = (($rows->required_status==1) ? self::$required: '');
+ $flag_r = ''; //(($rows->required_status==1) ? self::$required: '');
if($active){
switch((int)$rows->input_type) {
Modified: trunk/catalog/common/classes/formUtility.php
===================================================================
--- trunk/catalog/common/classes/formUtility.php 2013-06-23 14:43:39 UTC (rev 4755)
+++ trunk/catalog/common/classes/formUtility.php 2013-06-24 19:03:27 UTC (rev 4756)
@@ -11,6 +11,10 @@
*/
class formUtility {
+ /**
+ @var string for create html display required input
+ */
+ protected static $required = '<span class="required"> * </span>';
/**
*/
@@ -134,7 +138,7 @@
$field .= ' />';
- if ($required == true) $field .= '<span class="nobr">'.TEXT_FIELD_REQUIRED.'</span>';
+ if ($required == true) $field .= self::$required;
return $field;
}
@@ -206,7 +210,7 @@
}
$field .= '</select>';
- if ($required == true) $field .= TEXT_FIELD_REQUIRED;
+ if ($required == true) $field .= self::$required;
return $field;
}
@@ -223,7 +227,7 @@
$field .= $values[$i]['text'] . ' '.'</li>';
}
$field .= '</ul>';
- if ($required == true) $field .= TEXT_FIELD_REQUIRED;
+ if ($required == true) $field .= self::$required;
return $field;
}
@@ -240,7 +244,7 @@
$field .= $values[$i]['text'] . ' '.'</li>';
}
$field .= '</ul>';
- if ($required == true) $field .= TEXT_FIELD_REQUIRED;
+ if ($required == true) $field .= self::$required;
return $field;
}
Modified: trunk/catalog/includes/classes/core_page/customer.php
===================================================================
--- trunk/catalog/includes/classes/core_page/customer.php 2013-06-23 14:43:39 UTC (rev 4755)
+++ trunk/catalog/includes/classes/core_page/customer.php 2013-06-24 19:03:27 UTC (rev 4756)
@@ -182,44 +182,44 @@
$newcustomer=array();
if ( ( ($resul=$this->CheckData($_post)) && $resul !=false && is_array($resul))
- && ( ($pass=$this->CheckDataPassword($_post)) && $pass !=false && is_array($pass) ) ){
+ && ( ($pass=$this->CheckDataPassword($_post)) && $pass !=false && is_array($pass) ) ){
- $resul=array_merge($pass,$resul);
+ $resul=array_merge($pass,$resul);
- /// include the password crypto functions
-// require_once(DIR_WS_FUNCTIONS . 'password_funcs.php');
+ /// include the password crypto functions
+ // require_once(DIR_WS_FUNCTIONS . 'password_funcs.php');
- if (_cst_bool('CUSTOMER_FORCE_UCWORDS')) {
- $resul['lastname']=ucwords($resul['lastname']);
- $resul['firstname']=ucwords($resul['firstname']);
- }
- if (_cst_bool('CUSTOMER_FORCE_STRTOUPPER')) {
- $resul['lastname']=strtoupper($resul['lastname']);
- }
+ if (_cst_bool('CUSTOMER_FORCE_UCWORDS')) {
+ $resul['lastname']=ucwords($resul['lastname']);
+ $resul['firstname']=ucwords($resul['firstname']);
+ }
+ if (_cst_bool('CUSTOMER_FORCE_STRTOUPPER')) {
+ $resul['lastname']=strtoupper($resul['lastname']);
+ }
- $check_customer['customers_group_id']=( (_cst_bool('ACCOUNT_COMPANY') && isset($resul['company_tax_id']))? 0 : 1 );
+ $check_customer['customers_group_id']=( (_cst_bool('ACCOUNT_COMPANY') && isset($resul['company_tax_id']))? 0 : 1 );
- $sql_data_array = array('customers_firstname' => $resul['firstname'],
- 'customers_lastname' => $resul['lastname'],
- 'customers_email_address' => $resul['email_address'],
- 'customers_telephone' => $resul['telephone'],
- 'customers_fax' => $resul['fax'],
- 'customers_newsletter' => $resul['newsletter'],
- 'customers_password' =>PasswordUtility::encrypt_password($resul['password']),
- 'customers_group_ra'=> $check_customer['customers_group_id'],
- 'customers_language'=> $this->languages_id,
- 'customers_status'=> (_cst_bool('ACCOUNT_FORCE_ACTIV_MAIL')? 2 : 1)
- );
+ $sql_data_array = array('customers_firstname' => $resul['firstname'],
+ 'customers_lastname' => $resul['lastname'],
+ 'customers_email_address' => $resul['email_address'],
+ 'customers_telephone' => $resul['telephone'],
+ 'customers_fax' => $resul['fax'],
+ 'customers_newsletter' => $resul['newsletter'],
+ 'customers_password' =>PasswordUtility::encrypt_password($resul['password']),
+ 'customers_group_ra'=> $check_customer['customers_group_id'],
+ 'customers_language'=> $this->languages_id,
+ 'customers_status'=> (_cst_bool('ACCOUNT_FORCE_ACTIV_MAIL')? 2 : 1)
+ );
- if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['customers_gender'] = $resul['gender'];
- if (_cst_bool('ACCOUNT_DOB')) $sql_data_array['customers_dob'] = tep_date_raw($resul['dob']);
+ if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['customers_gender'] = $resul['gender'];
+ if (_cst_bool('ACCOUNT_DOB')) $sql_data_array['customers_dob'] = tep_date_raw($resul['dob']);
- $res=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
- $newcustomer = $sql_data_array;
+ $res=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
+ $newcustomer = $sql_data_array;
- $newcustomer['customers_id']=$customer_id=tep_db_insert_id($res);
+ $newcustomer['customers_id']=$customer_id=tep_db_insert_id($res);
- 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())");
+ 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())");
/**
@@ -263,65 +263,65 @@
if ( ($resul=$this->CheckDataAddressBook($_post)) && $resul !=false && is_array($resul)) {
- if (_cst_bool('CUSTOMER_CITY_FORCE_STRTOUPPER')) {
- $resul['city']=strtoupper($resul['city']);
- }
+ if (_cst_bool('CUSTOMER_CITY_FORCE_STRTOUPPER')) {
+ $resul['city']=strtoupper($resul['city']);
+ }
- $sql_data_array = array('customers_id' => $customer_id,
- 'entry_firstname' => $resul['firstname'],
- 'entry_lastname' => $resul['lastname'],
- 'entry_street_address' => $resul['street_address'],
- 'entry_postcode' => $resul['postcode'],
- 'entry_city' => $resul['city'],
- 'entry_country_id' => $resul['country']);
+ $sql_data_array = array('customers_id' => $customer_id,
+ 'entry_firstname' => $resul['firstname'],
+ 'entry_lastname' => $resul['lastname'],
+ 'entry_street_address' => $resul['street_address'],
+ 'entry_postcode' => $resul['postcode'],
+ 'entry_city' => $resul['city'],
+ 'entry_country_id' => $resul['country']);
- if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['entry_gender'] = $resul['gender'];
- if (_cst_bool('ACCOUNT_COMPANY')){
- $sql_data_array['entry_company'] = $resul['company'];
- $sql_data_array['entry_company_tax_id'] = $resul['company_tax_id'];
- }
- if (_cst_bool('ACCOUNT_SUBURB')) $sql_data_array['entry_suburb'] = $resul['suburb'];
- if (_cst_bool('ACCOUNT_STATE')) {
- if (isset($resul['zone_id']) && $resul['zone_id'] > 0) {
- $sql_data_array['entry_zone_id'] = @$resul['zone_id'];
- $sql_data_array['entry_state'] = '';
- } else {
- $sql_data_array['entry_zone_id'] = '0';
- $sql_data_array['entry_state'] = @$resul['state'];
- }
- }
+ if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['entry_gender'] = $resul['gender'];
+ if (_cst_bool('ACCOUNT_COMPANY')){
+ $sql_data_array['entry_company'] = $resul['company'];
+ $sql_data_array['entry_company_tax_id'] = $resul['company_tax_id'];
+ }
+ if (_cst_bool('ACCOUNT_SUBURB')) $sql_data_array['entry_suburb'] = $resul['suburb'];
+ if (_cst_bool('ACCOUNT_STATE')) {
+ if (isset($resul['zone_id']) && $resul['zone_id'] > 0) {
+ $sql_data_array['entry_zone_id'] = @$resul['zone_id'];
+ $sql_data_array['entry_state'] = '';
+ } else {
+ $sql_data_array['entry_zone_id'] = '0';
+ $sql_data_array['entry_state'] = @$resul['state'];
+ }
+ }
- tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
+ tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
- $newcustomer=array_merge($newcustomer,$sql_data_array);
+ $newcustomer=array_merge($newcustomer,$sql_data_array);
- $cs_s=tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id='".$customer_id."' ORDER BY address_book_id DESC");
- $cs=tep_db_fetch_array($cs_s);
- $address_id=$cs['address_book_id'];
+ $cs_s=tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id='".$customer_id."' ORDER BY address_book_id DESC");
+ $cs=tep_db_fetch_array($cs_s);
+ $address_id=$cs['address_book_id'];
- $newcustomer['address_book_id']= $address_id;
+ $newcustomer['address_book_id']= $address_id;
- tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
- }
- else {
- $resul=$this->CheckData($_post);
- $sql_data_array = array('customers_id' => $customer_id,
- 'entry_firstname' => $resul['firstname'],
- 'entry_lastname' => $resul['lastname']);
+ tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
+ }
+ else {
+ $resul=$this->CheckData($_post);
+ $sql_data_array = array('customers_id' => $customer_id,
+ 'entry_firstname' => $resul['firstname'],
+ 'entry_lastname' => $resul['lastname']);
- tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
+ tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
- $cs_s=tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id='".$customer_id."' ORDER BY address_book_id DESC");
- $cs=tep_db_fetch_array($cs_s);
- $address_id=$cs['address_book_id'];
+ $cs_s=tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id='".$customer_id."' ORDER BY address_book_id DESC");
+ $cs=tep_db_fetch_array($cs_s);
+ $address_id=$cs['address_book_id'];
- $newcustomer['address_book_id']= $address_id;
+ $newcustomer['address_book_id']= $address_id;
- tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
+ tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
}
/**
- @brief call method module account
+ @brief call method module account
*/
$page=page::getInstance();
$aca_account=$page->new_class('account',$customer_id);
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2013-06-23 14:43:39 UTC (rev 4755)
+++ trunk/catalog/includes/functions/general.php 2013-06-24 19:03:27 UTC (rev 4756)
@@ -753,9 +753,12 @@
@brief extra fields for customers
@param $customer_id int
@param $languages_id int
+ @param special_mod string default null
+ @param $group_class string default null
+ @param $format false or format for sprintf
@return string
*/
-function tep_get_extra_fields($customer_id,$languages_id){
+function tep_get_extra_fields($customer_id,$languages_id, $special_mod='', $group_class='', $format=false){
$DB=Database::getInstance();
// ne liste que les element FO
@@ -772,10 +775,19 @@
LEFT JOIN " . TABLE_EXTRA_FIELDS_LABELS . " cei ON( cei.fields_id=ce.fields_id AND cei.languages_id ='" . $languages_id."' )
WHERE
ce.fields_admin IN ( 0 , 3 )
- AND ce.fields_status=1
- AND fields_special_mod=''
- ORDER BY ce.fields_group_class";
+ AND ce.fields_status=1 ";
+ if(tep_not_null($special_mod))
+ $sql .= " AND fields_special_mod='".$special_mod."' ";
+ else
+ $sql .= " AND fields_special_mod='' ";
+ if(tep_not_null($group_class))
+ $sql .= " AND fields_group_class='".$group_class."' ";
+ else
+ $sql .= " AND fields_group_class='' ";
+
+ $sql .= " ORDER BY ce.fields_group_class";
+
$extra_fields_query = $DB->query($sql);
$extra_fields_string ='';
if($extra_fields_query->__get('numRows')>0){
@@ -809,8 +821,10 @@
$robj->select_values[] = array('id' => $item, 'text' => $item);
}
-
- $extra_fields_string .=ExtraUtility::DisplayRow($robj, false);
+ if(!$format)
+ $extra_fields_string .=ExtraUtility::DisplayRow($robj, false );
+ else
+ $extra_fields_string .=ExtraUtility::DisplayRow($robj, false, $format);
}
}
return $extra_fields_string;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-06-23 14:43:43
|
Revision: 4755
http://sourceforge.net/p/oscss/svn/4755
Author: oscim
Date: 2013-06-23 14:43:39 +0000 (Sun, 23 Jun 2013)
Log Message:
-----------
Fix bug in add repository
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/packageRepository.php
trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
trunk/catalog/admin/includes/modules/pages/package.php
Modified: trunk/catalog/admin/includes/exts/package/packageRepository.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageRepository.php 2013-06-23 08:58:40 UTC (rev 4754)
+++ trunk/catalog/admin/includes/exts/package/packageRepository.php 2013-06-23 14:43:39 UTC (rev 4755)
@@ -31,13 +31,14 @@
$re='<channel>
<title>'.(string)@$array['title'].'</title>
<key>'.(string)@$array['key'].'</key>'.
- '<description>'.(string)@$array['description'].'</description>'.
- '<repository>'.(string)@$array['repository'].'</repository>'.
- '<ident>'.
- ' <user>'.(int)@$array['user'].'</user>'.
- ' <token>'.(string)@$array['token'].'</token>'.
- '</ident>'.
- '<service>';
+ '<description>'.(string)@$array['description'].'</description>'."\n\r".
+ '<repository>'.(string)@$array['repository'].'</repository>'."\n\r".
+ '<version>'.(string)@$array['version'].'</version>'."\n\r".
+ '<ident>'."\n\r".
+ ' <user>'.(int)@$array['user'].'</user>'."\n\r".
+ ' <token>'.(string)@$array['token'].'</token>'."\n\r".
+ '</ident>'."\n\r".
+ '<service>'."\n\r";
if($active_service){
$re .='<listing>listing_package</listing>'.
@@ -45,8 +46,8 @@
'<download>download_package</download>';
}
- $re .='</service>'.
- '</channel>'."\n";
+ $re .='</service>'."\n\r".
+ '</channel>'."\n\r";
return $re;
}
@@ -69,27 +70,26 @@
$doc->formatOutput = true;
- $re = self::Modele($option, true);
- $sxe=simplexml_load_string($re);
+ $re = self::Modele($option, true);
+ $sxe=simplexml_load_string($re);
-// $domnode->preserveWhiteSpace = false;
+ $doc->preserveWhiteSpace = false;
// Import node into current document
- $dom_sxe=$doc->importNode($sxe, true);
+ $dom_sxe=$doc->importNode(dom_import_simplexml($sxe), true);
+
// Add new child at the end of the children
- $doc->appendChild($dom_sxe);
+ $doc->documentElement->appendChild($dom_sxe);
// Dump the internal XML tree back into a string
$saveXml = $doc->saveXML();
-
- $file_vers= @fopen(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE,'w');
+ $file_vers=@fopen(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE,'w+');
fputs( $file_vers,$saveXml);
fclose($file_vers);
-
}
catch(Exception $e){
$messageStack->add_session($e->getMessage(),'error' );
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2013-06-23 08:58:40 UTC (rev 4754)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2013-06-23 14:43:39 UTC (rev 4755)
@@ -65,13 +65,13 @@
<?php endforeach; ?>
<?php endif; ?>
<!-- Section for add service in Source -->
- <li>
+<!-- <li>
<?php echo __('@package service add in current source') ?>
<ul>
<li><?php echo tep_draw_input_field('service_add[]', '', '',' class="w_70" '); ?></li>
<li><?php echo tep_draw_input_field('service_add[]', '', '',' class="w_70" '); ?></li>
</ul>
- </li>
+ </li>-->
</ul>
</fieldset>
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2013-06-23 08:58:40 UTC (rev 4754)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2013-06-23 14:43:39 UTC (rev 4755)
@@ -290,10 +290,10 @@
$opt['user'] = tep_db_prepare_input($_REQUEST['user']);
$opt['token'] = tep_db_prepare_input($_REQUEST['token']);
- if( self::$objChild->SourceAdd($key, $opt) == true){
+ if( self::$objChild->SourceAdd($opt['key'], $opt) == true){
$messageStack->add_session(__('@package update source process success'), 'success');
- tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit&key='.$key));
+ tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit&key='.$opt['key']));
}
else{
$messageStack->add_session(__('@package update source process error'), 'error');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|