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...> - 2012-04-30 12:58:02
|
Revision: 4345
http://oscss.svn.sourceforge.net/oscss/?rev=4345&view=rev
Author: oscim
Date: 2012-04-30 12:57:55 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
Suite travail featured
convertion du module de page cms_content vers les module ModTwo, et implementation des filtres
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/featured.php
trunk/catalog/admin/includes/modules/pages/orders.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-04-30 12:57:55 UTC (rev 4345)
@@ -52,6 +52,7 @@
$res=tep_db_perform(TABLE_FEATURED, $sql_data_array);
+
if(!$res)
return $res;
else
@@ -77,8 +78,8 @@
if(isset($option['max'])) $sql_data_array['featured_max'] = (int)tep_db_prepare_input($option['max']);
if(isset($option['status'])) $sql_data_array['featured_status'] = (int)tep_db_prepare_input($option['status']);
- $sql_data_array['last_modified'] = 'NOW()';
- $sql_data_array['user_modified'] = $_SESSION['login_id'];
+ $sql_data_array['date_update'] = 'NOW()';
+ $sql_data_array['user_update'] = $_SESSION['login_id'];
$res=tep_db_perform(TABLE_FEATURED, $sql_data_array, 'update' , substr($where,3) );
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-04-30 12:57:55 UTC (rev 4345)
@@ -10,6 +10,7 @@
*/
global $oscss;
$contents=array();
+
?>
<h3><?php echo __('heading title edit'); ?></h3>
<div class="box_uniq block_form">
@@ -41,13 +42,13 @@
<fieldset id="fieldset_<?php echo $i ?>" class="block_field">
<p class="block_input">
<label for="<?php echo 'content_title' . cms_content::$languages[$i]['id']; ?>"><?php echo __('entry title'); ?></label>
- <?php echo tep_draw_input_field('content_title[' . cms_content::$languages[$i]['id'] . ']', 'content_title' . $i, cms_content::$cInfo->title[ cms_content::$languages[$i]['id']], 'size="70"', true) ; ?>
+ <?php echo tep_draw_input_field('content_title[' . cms_content::$languages[$i]['id'] . ']', 'content_title' . $i, cms_content::$Info->title[ cms_content::$languages[$i]['id']], 'size="70"', true) ; ?>
</p>
<p class="block_input" >
- <?php echo __('txt info permalink').tep_catalog_href_link('content.php','content=' . cms_content::$cInfo->content_id.'&language='.cms_content::$languages[$i]['code'] , 'NONSSL', false); ?>
+ <?php echo __('txt info permalink').tep_catalog_href_link('content.php','content=' . cms_content::$Info->id.'&language='.cms_content::$languages[$i]['code'] , 'NONSSL', false); ?>
</p>
<br style="clear:both" />
- <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','content_text[' . cms_content::$languages[$i]['id'] . ']','1000','800',cms_content::$cInfo->text[cms_content::$languages[$i]['id']]); ?>
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','content_text[' . cms_content::$languages[$i]['id'] . ']','1000','800',cms_content::$Info->text[cms_content::$languages[$i]['id']]); ?>
</fieldset>
<?php } ?>
</div>
@@ -57,7 +58,7 @@
<dl>
<dt class="block_input w_90">
<label for="content_name" title="<?php echo __('entry content help'); ?>"><?php echo __('entry content').tep_image(DIR_WS_ICONS .'icon_help.gif') ?></label>
- <?php echo tep_draw_input_field('content_name', '', cms_content::$cInfo->content_name) . tep_draw_hidden_field('p_format','','HTML'); ?>
+ <?php echo tep_draw_input_field('content_name', '', cms_content::$Info->name) . tep_draw_hidden_field('p_format','','HTML'); ?>
</dt>
<dt class="block_input w_90">
@@ -70,21 +71,21 @@
<span class="button_nav"><?php echo '<a class="buttonimg fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=content&action=new_light&origin='. urlencode(cms_content::FILENAME.'?action=edit&cID='. (int)@$_GET['cID']) ) . '" title="'. __('add category datatype content').'">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). '</a>'; ?> </span>
</label>
<ul id="cat_list_in_edit">
- <?php foreach(cms_content::$cInfo->categories as $v){ $k=$v['categories_id'];
+ <?php foreach(cms_content::$Info->categories as $v){ $k=$v['categories_id'];
echo '<li class="selected">'. tep_draw_checkbox_field('categories['.$k.']','cat_'.$k, tep_get_generated_category_path_ids($k), true ).' '.tep_get_category_name($k).'</li>';
}
foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>'content'))/*get_cat_list(0)*/ as $v)
- if(!isset(cms_content::$cInfo->categories[$v['categories_id']])){
- echo '<li class="'.(isset(cms_content::$cInfo->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. tep_draw_checkbox_field('categories['.$v['categories_id'].']','cat_'.$v['categories_id'], tep_get_generated_category_path_ids($v['categories_id']), (isset(cms_content::$cInfo->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
+ if(!isset(cms_content::$Info->categories[$v['categories_id']])){
+ echo '<li class="'.(isset(cms_content::$Info->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. tep_draw_checkbox_field('categories['.$v['categories_id'].']','cat_'.$v['categories_id'], tep_get_generated_category_path_ids($v['categories_id']), (isset(cms_content::$Info->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
}
else
- echo '<li class="'.(isset(cms_content::$cInfo->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. ' '.$v['categories_name'].'</li>';
+ echo '<li class="'.(isset(cms_content::$Info->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. ' '.$v['categories_name'].'</li>';
?>
</ul>
</dt>
<dt class="block_input button_nav w_90" >
<?php echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );?>
- <?php echo tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$cInfo->content_id), IMAGE_CANCEL); ?>
+ <?php echo tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$Info->id), IMAGE_CANCEL); ?>
</dt>
</dl>
</div>
Modified: trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab 2012-04-30 12:57:55 UTC (rev 4345)
@@ -25,21 +25,19 @@
<div id="tabs-1" class="tabPage">
<?php echo tep_draw_form('featured', featured::FILENAME, 'action='.((featured::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
-
-
<p class="block_input">
- <Label><?php echo __('text info featured name') ?></label>
- <?php echo tep_draw_input_field('featured_name', '', featured::$Info->name) ?>
+ <label ><?php echo __('featured text info type'); ?></label>
+ <?php echo tep_draw_pull_down_menu('featured_type', tep_get_status_array('featured_list',0,'status_name'),featured::$Info->type); ?>
</p>
<p class="block_input">
- <Label><?php echo __('text info featured name') ?></label>
- <?php echo tep_draw_input_field('featured_name', '', featured::$Info->name) ?>
+ <Label><?php echo __('featured text info featured min') ?></label>
+ <?php echo tep_draw_input_field('featured_min', '', featured::$Info->min) ?>
</p>
<p class="block_input">
- <Label><?php echo __('text info featured name') ?></label>
- <?php echo tep_draw_input_field('featured_name', '', featured::$Info->name) ?>
+ <Label><?php echo __('featured text info featured max') ?></label>
+ <?php echo tep_draw_input_field('featured_max', '', featured::$Info->max) ?>
</p>
<!-- <p class="block_input">
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2012-04-30 12:57:55 UTC (rev 4345)
@@ -74,6 +74,7 @@
define('BOX_HEADING_CONF_OPTION_ORDERS',"Option des commandes" );
define('BOX_HEADING_CONF_CONFIGURATION_ORDERS',"Configuration commandes" );
define('BOX_HEADING_CONF_EXPEDITION_EMBALLAGE',"Expédition/Emballage" );
+ define('BOX_HEADING_CONF_PAYMENT',"Gestion des paiments" );
define('BOX_HEADING_CONF_VIEW_SYSINFO',"info. systeme" );
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-04-30 12:57:55 UTC (rev 4345)
@@ -12,12 +12,18 @@
$lang['heading title edit']="Édition d'une page" ;
/* listing */
- $lang['table heading id']="ID" ;
- $lang['table heading listings']="Clef" ;
- $lang['table heading date added']="Crée(s)" ;
- $lang['table heading categories']="Catégorie" ;
- $lang['table heading c title']="Titre" ;
- $lang['table heading last modified']="Dernière modification" ;
+ $lang['view filtres for listing'] = "Filtres" ;
+ $lang['featured filter tab fields'] = "Colonnes" ;
+ $lang['filter legend choose fields'] = "Listes des colonnes visibles" ;
+
+ $lang['cms_content table heading id']="ID" ;
+ $lang['cms_content table heading key']="Clef" ;
+ $lang['cms_content table heading categories']="Catégorie" ;
+ $lang['cms_content table heading title']="Titre" ;
+ $lang['cms_content table heading date_added']="Crée(s)" ;
+ $lang['cms_content table heading last modified']="Modifié(s)" ;
+ $lang['cms_content table heading status']="État" ;
+ $lang['cms_content table heading hidden']="Menu" ;
$lang['table heading action']="Action" ;
$lang['add category datatype content']="Ajouter une catégorie" ;
@@ -35,10 +41,10 @@
$lang['text info image nonexistent']="L'IMAGE N'EXISTE PAS" ;
$lang['text info content size']="Taille :" ;
$lang['text info heading delete content']="Supprimer le contenu" ;
-$lang['table heading status']="État" ;
+
$lang['entry title']="Titre " ;
$lang['text content status']="Statut :" ;
-$lang['table heading view status']="Menu" ;
+
$lang['text content enabled']="Actif" ;
$lang['text content disabled']="Inactif" ;
$lang['txt info permalink']="Lien vers cette page: " ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-04-30 12:57:55 UTC (rev 4345)
@@ -11,10 +11,30 @@
*/
-$lang['table heading datatype'] = "Données" ;
-$lang['table heading datatype id'] = "Id." ;
-$lang['table heading name'] = "Données" ;
-$lang['table heading status'] = "Etat" ;
-$lang['table heading action'] = "Action" ;
+/* Listing */
+ $lang['image add featured'] = "Creer une liste" ;
+ $lang['view filtres for listing'] = "Filtres" ;
+ $lang['featured filter tab fields'] = "Colonnes" ;
+ $lang['filter legend choose fields'] = "Listes des colonnes visibles" ;
+
+ $lang['featured table heading id'] = "Id" ;
+ $lang['featured table heading datatype id'] = "Id." ;
+ $lang['featured table heading min'] = "Min." ;
+ $lang['featured table heading max'] = "Max." ;
+ $lang['featured table heading status'] = "Etat" ;
+ $lang['featured table heading status type name'] = "Type" ;
+ $lang['featured table heading status type id'] = "Type id" ;
+ $lang['featured table heading date_added'] = "Ajouté" ;
+ $lang['featured table heading user_added'] = "Créer par" ;
+ $lang['featured table heading user_update'] = "Modifié par" ;
+ $lang['featured table heading date_update'] = "Modifié" ;
+ $lang['table heading action'] = "Action" ;
+
+
+/* Edit / add */
+ $lang['featured tab specification'] = "Caractéristique" ;
+ $lang['featured text info type'] = "Choix du type" ;
+ $lang['featured text info featured min'] = "Nombre minimum d'entrée" ;
+ $lang['featured text info featured max'] = "Nombre maximum d'entrée" ;
// $lang['table heading datatype'] = "Données" ;
?>
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-04-30 12:57:55 UTC (rev 4345)
@@ -10,50 +10,66 @@
@brief multiple class for content
*/
-
+// error_reporting(E_ALL);
/**
@class cms_content
*/
class cms_content
+ extends ModTwo /// new abstract class for nextgen module
implements
/// Use module BO V2
- ExtModPage,
+// ExtModPage,
/// Bacic module
InterfaceModule,
- /// Use Listing page Ajax mecanism
- InterfacedTJsonS,
- /// Detail inline
- InterfacedInnerHtml
+ ExtModConfig
{
-
+ /**
+ @def FILENAME
+ */
const FILENAME = FILENAME_CMS_CONTENT;
-
+ /**
+ @var object
+ */
public static $code;
-
- public static $action;
-
+ /**
+ @var object
+ */
+// public static $action;
+ /**
+ @var string file
+ */
+ public static $Id;
+ /**
+ @var object
+ */
public static $list=array();
/**
- @param object
+ @var object
*/
public static $modules;
/**
- @param object
+ @var object
*/
- public static $cInfo;
+ public static $Info;
/**
- @param array
+ @var array
*/
public static $languages;
/**
- @param bool
+ @var bool
*/
public static $enabled_status;
/**
- @param bool
+ @var bool
*/
public static $disabled_status;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
+
+
/**
class constructor
*/
@@ -70,17 +86,19 @@
self::$code=__CLASS__;
- self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+ parent::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
/**
@remarks not load if not first init
*/
- if(defined('JSONSTATMENT')) return;
+ 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']:'') );
- //! detail item in ajax
- if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+ //! 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']:'') );
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+ }
// self::$modules=new ACAcontent;
// Use factory class aca
@@ -89,6 +107,181 @@
self::$modules->set_image_handler();
self::$languages = tep_get_languages();
+
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'c.content_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('cms_content table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'c.content_name' => array(
+ 'sort'=>true,
+ 'alias'=>'thekey',
+ 'text'=>__('cms_content table heading key'),
+ ),
+ 'cd.content_title' => array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('cms_content table heading title'),
+ 'default'=>true,
+ 'width'=>'18%',
+ ),
+ 'catd.categories_name' => array(
+ 'sort'=>true,
+ 'alias'=>'cat_title',
+ 'text'=>__('cms_content table heading categories'),
+ 'width'=>'12%',
+ 'default'=>true,
+ ),
+ 'c.date_added' => array(
+ 'sort'=>true,
+ 'alias'=>'added',
+ 'text'=>__('cms_content table heading date_added'),
+ 'width'=>'10%',
+ ),
+ 'c.last_modified' => array(
+ 'sort'=>true,
+ 'alias'=>'modified',
+ 'text'=>__('cms_content table heading last modified'),
+ 'width'=>'10%',
+ ),
+ 'c.content_status' => array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('cms_content table heading status'),
+ 'width'=>'5%',
+ ),
+ 'c.content_hidden' => array(
+ 'sort'=>true,
+ 'alias'=>'hidden',
+ 'text'=>__('cms_content table heading hidden'),
+ 'width'=>'5%',
+ 'default'=>true,
+ ),
+ );
+
+// , 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'=>' ' ),
+ array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+ false,
+ false,
+ );
+
+ // min fields and not view directly colonne fields
+ $listfield = ' c.content_id as id,';
+ // 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[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+ $_SESSION['filters']['allfields'][$clean] = '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 Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'title'=>__('featured 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
+ */
+ 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'),
+ );
+
+ $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),
+ );
+ }
+
}
@@ -96,7 +289,7 @@
global $messageStack,$oscss;
$DB=Database::getInstance();
- self::$action=$actions;
+ parent::$action=$actions;
$cID=(isset($_GET['cID'])? $_GET['cID'] :'' );
@@ -104,7 +297,7 @@
self::$modules-> set_image_handler();
self::$languages = tep_get_languages();
- $actions['action'] = self::$action;
+ $actions['action'] = parent::$action;
$actions['display_file']='';
$actions['action_class']=(isset($_GET['action_class']))? $_GET['action_class'] : '';
$actions['action_method']=(isset($_GET['action_method']))? $_GET['action_method'] : '';
@@ -113,9 +306,26 @@
$actions = self::$modules->check_action($actions);
$action = $actions['action'];
- // if(((self::$action == 'update')||(self::$action == 'insert'))) self::$action = 'edit';
- switch (self::$action) {
+ switch (parent::$action) {
+
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'][__CLASS__]['allfields'] =array();
+ foreach($_POST['allfields'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
/**
OPERATION SQL
*/
@@ -167,7 +377,7 @@
if (isset($content_id))
$params['id']=$content_id;
- $params['action']=self::$action;
+ $params['action']=parent::$action;
$params['post']=$_POST;
$params['language_id']= $languages_id;
$params['cPath']=(isset($_POST['cPath'])) ? tep_db_prepare_input($_POST['cPath']) : 0;
@@ -222,41 +432,37 @@
sqlcontent::Maintenance();
}
- return self::$action;
+ return parent::$action;
}
/**
*/
public function get_header(){
- self::$modules->get_header_js(self::$action);
+ self::$modules->get_header_js(parent::$action);
}
/**
@fn load_db_values($ID)
@brief this load db value function
- This method construct static var $cInfo
+ This method construct static var $Info
@param $ID integer id content | 0
- @return $cInfo
+ @return $Info
*/
- public static function load_db_values($ID){
+// public static function load_db_values($ID){
+ /**
+ @fn featured::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
global $language_id;
$DB=Database::getInstance();
- $cID = tep_db_prepare_input((int)$ID);
-// if(in_array(self::$action ,array('edit' ,'delete', 'detail') ) )
-// $cInfo_array=sqlcontent::fetch(array('id'=>$cID,'language_id'=>$language_id));
-// elseif(self::$action == 'new')
-// $cInfo_array = sqlcontent::Specimen();
-//
+ $action=parent::$action;
-
-
-
-
- $action=self::$action;
-
switch ($action) {
/**
@@ -271,37 +477,60 @@
@remarks Normal View Page
*/
case 'delete':
- $cInfo_array=sqlcontent::fetch(array('id'=>$cID,'language_id'=>$language_id));
- break;
- case 'new':
- $cInfo_array = sqlcontent::Specimen();
- break;
case 'detail':
case 'edit':
- $cInfo_array=sqlcontent::fetch(array('id'=>$cID,'language_id'=>$language_id));
+ case 'new':
+ 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;
+ case '1':
+ default: self::$enabled_status = true; self::$disabled_status = false;
+ }
break;
+
default:
- }
- self::$cInfo = new objectInfo($cInfo_array);
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows, $languages_id;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
- if (!isset(self::$cInfo->content_status)) self::$cInfo->content_status = '1';
- switch (self::$cInfo->content_status) {
- case '0': self::$enabled_status = false; self::$disabled_status = true; break;
- case '1':
- default: self::$enabled_status = true; self::$disabled_status = false;
+ $query_raw = "select ".$adjust->listfields.", c.content_id as id from " . TABLE_CONTENT . " c ".
+ " LEFT JOIN " . TABLE_CONTENT_DESCRIPTION . " cd ON(c.content_id =cd.content_id AND cd.language_id='".(int)$languages_id."') ".
+ " LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " p2c ON(c.content_id=p2c.content_id ) ".
+ " LEFT JOIN " . TABLE_CATEGORIES . " cat ON( cat.categories_id =p2c.categories_id ) ".
+ " LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " catd ON( catd.categories_id =p2c.categories_id AND cd.language_id='".(int)$languages_id."' ) ".
+ " WHERE 1 " .
+ ((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " GROUP BY c.content_id ".
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' c.date_added DESC ');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+
}
-
- return self::$cInfo;
}
+
/**
@fn display_view()
@brief this methode is switch for call gabarit action
*/
public function display_view(){
- $action=self::$action;
+ $action=parent::$action;
switch ($action) {
@@ -309,10 +538,10 @@
@remarks Ajax View result
*/
case 'setflag':
- return self::get_item_status(array('content_status'=>(int)$_GET['flag'], 'content_id'=>(int)$_GET['cID']));
+ return self::get_item_status(array('content_status'=>(int)$_GET['flag'], 'content_id'=>(int)self::$Id));
break;
case 'viewflag':
- return self::get_item_content_hidden(array('content_hidden'=>(int)$_GET['flag'], 'content_id'=>(int)$_GET['cID']));
+ return self::get_item_content_hidden(array('content_hidden'=>(int)$_GET['flag'], 'content_id'=>(int)self::$Id));
break;
/**
@@ -320,21 +549,24 @@
*/
case 'delete':
- self::load_db_values($_GET['cID']);
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
case 'edit':
- self::load_db_values($_GET['cID']);
+ self::GetDBValue(self::$Id);
+ /// use master gabarit
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
case 'new':
self::load_db_values(-1);
-// $action='edit';
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
default:
- self::tep_get_list();
- $action='listing';
+ self::$list=self::tep_get_list();
+ /// use master gabarit
+ MGabCont::SetCurrentName(__CLASS__);
+ return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
}
- /// use master gabarit
- return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+
}
@@ -342,17 +574,70 @@
/** public static InterfacedTJsonS */
+
+
+
/**
+ @fn tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options='')
+ @brief Constructeur listing element cms content
+ @param $page integer default(1) split page
+ @param $rowbyp integer default(10) nbr line in page
+ @param $sOrder string | null
+ @param $sWhere string | null
+ @param $options array
+ @return Array
+ */
+ public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
+
+ global $query_numrows;
+
+ /// @remarks force load conf
+ self::GetConf();
+
+ $res=array();
+
+ /**
+ @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;
+
+ $res = self::GetDBValue();
+
+ self::$list= $query_numrows ; //= count($res);
+
+ return $res;
+ }
+
+
+ /** static InterfacedInnerHtml */
+
+ /**
+ @fn detail_row_page($id)
+ @brief call Ajax , detail of line in listing
+ @param $id int content_id
+ */
+ public static function detail_row_page($id){
+ parent::$action ='detail';
+ self::GetConf();
+ self::load_db_values((int)$id);
+ return MGabCont::CallGab('inline','display_view',__CLASS__);
+ }
+
+ /**
@fn get_item_action($content)
@brief private model for row action
@param $content array
*/
- private static function get_item_action($content){
+ public static function ButtonRowsActions($content){
return sprintf(
CsrtAction::getFormat('row_action'),
- self::$modules->display_ColumnRowAction($content['content_id']) ,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['content_id'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['content_id'] . '&action=delete') ,'' )
+ self::$modules->display_ColumnRowAction($content['id']) ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=delete') ,'' )
);
}
@@ -361,15 +646,15 @@
@brief private model for row status
@param $content array
*/
- private static function get_item_status($content){
+ public static function RowStatus($content){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setflag&cID=' . $content['content_id'].'&flag=';
+ $query_s='action=setflag&cID=' . $content['id'].'&flag=';
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($content['content_status'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($content['status'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
- (int)$content['content_status'],
- ( ($content['content_status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ (int)$content['status'],
+ ( ($content['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
).
'</a>';
}
@@ -379,128 +664,78 @@
@brief private model for row hidden
@param $content array
*/
- private static function get_item_content_hidden($content){
+ public static function RowHidden($content){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=viewflag&cID=' . $content['content_id'].'&flag=';
+ $query_s='action=viewflag&cID=' . $content['id'].'&flag=';
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($content['content_hidden'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($content['hidden'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
- (int)$content['content_hidden'],
- ( ($content['content_hidden'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ (int)$content['hidden'],
+ ( ($content['hidden'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
).
'</a>';
}
/**
- @fn emptyResult()
- @brief private methode for construct empty result retrun by tep_get_list
- @return array
+ @brief return Filename
*/
- private static function emptyResult(){
- return array( 'null',
- 'content_id',
- 'content_name',
- 'content_title',
- 'categories_name',
- 'date_added',
- 'content_status',
- 'content_hidden',
- 'action'
- );
+ public static function GetFILENAME(){
+ return self::FILENAME;
}
+ /** public static InterfacedTJsonS */
+
/**
- @fn tep_get_modele()
- @brief this array is rows in listing, the value boolean is sort active/inactive
+ @brief format db value for display page
+ @param $_query ressource db sql
@return array
*/
- public static function tep_get_modele(){
- return array( 0=>false,
- 'content_id'=>true,
- 'content_name'=>true,
- 'content_title'=>true,
- 'categories_name'=>false,
- 'date_added'=>true,
- 'content_status'=>true,
- 'content_hidden'=>true,
- 'action'=>false
- );
- }
-
- /**
- @fn tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options='')
- @brief Constructeur listing element cms content
- @param $page integer default(1) split page
- @param $rowbyp integer default(10) nbr line in page
- @param $sOrder string | null
- @param $sWhere string | null
- @param $options array
- @return Array
- */
- public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
- global $query_numrows,$languages_id;
-
- new self;
-
+ private static function FormatDBValue($_query){
$DB=Database::getInstance();
+ $res=array();
- $sWhere=str_replace('content_id','c.content_id',$sWhere);
- if(isset($_GET['cPath']) && (int)$_GET['cPath'] > 0) $sWhere .=" AND categories_id='". (int)tep_db_prepare_input($_GET['cPath'])."' ";
+ switch (parent::$action) {
+ case 'edit';
+ global $query_numrows,$languages_id;
- $query_raw = "SELECT DISTINCT c.content_id, content_name, date_added, content_title, last_modified, content_status, content_hidden FROM " . TABLE_CONTENT . " c ," . TABLE_CONTENT_DESCRIPTION . " cd, " . TABLE_CONTENT_TO_CATEGORIES . " p2c WHERE c.content_id =cd.content_id AND cd.language_id='".(int)$languages_id."' AND c.content_id=p2c.content_id ".$sWhere." ORDER BY ".((!empty($sOrder)) ? $sOrder :'date_added DESC') ;
+ break;
+ case 'listing':
+ global $query_numrows,$languages_id;
- $split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
+ while ($item = $_query->fetchAssoc()) {
- $_query = $DB->query($query_raw);
+ $item['categories_name']='';
+ $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']."' ");
+ $rescat=$objres->fetchAllAssoc();
- while ($ressql = $_query->fetchAssoc() ) {
- $ressql['date_added']=tep_date_short($ressql['date_added']);
- $ressql['categories_name']='';
- $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='".$ressql['content_id']."' ");
- $res=$objres->fetchAllAssoc();
+ foreach($rescat as $cat)
+ $item['categories_name'] .=','.$cat['categories_name'];
- foreach($res as $cat)
- $ressql['categories_name'] .=','.$cat['categories_name'];
+ if(strlen($item['categories_name'])>25)$item['categories_name']= substr($item['categories_name'],0 ,20).'...';
- if(strlen($ressql['categories_name'])>25)$ressql['categories_name']= substr($ressql['categories_name'],0 ,20).'...';
+ $item[0]=$item['id'];
+ $item[1]=$item['id'];
- $ressql[0]=$ressql['content_id'];
- $ressql['content_status']=self::get_item_status($ressql);
- $ressql['content_hidden']=self::get_item_content_hidden($ressql);
- $ressql['action']=self::get_item_action($ressql);
- self::$list[]=$ressql;
- }
+ foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
+ if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
+ elseif($k == 'status') $ord[$k]=self::RowStatus($item);
+ elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);
+ elseif($k == 'added') $ord[$k]=tep_date_short($item[$k]);
+ elseif($k == 'modified') $ord[$k]=tep_date_short($item[$k]);
+ else $ord[$k]=$item[$k];
- $li=$res=array();
- foreach(self::$list as $item){
- foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(tep_not_null($item[$k]))?$item[$k]:' ';
- $res[]=$li;
+ $res[]=$ord;
+ }
+ break;
}
- if(count($res)==0) $res[]= self::emptyResult();
return $res;
}
- /** static InterfacedInnerHtml */
-
- /**
- @fn detail_row_page($id)
- @brief call Ajax , detail of line in listing
- @param $id int content_id
- */
- public static function detail_row_page($id){
- self::$action ='detail';
- self::GetConf();
- self::load_db_values((int)$id);
- return MGabCont::CallGab('inline','display_view',__CLASS__);
- }
-
-
-
/** Interface module */
function check() { return false; }
Modified: trunk/catalog/admin/includes/modules/pages/featured.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featured.php 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/modules/pages/featured.php 2012-04-30 12:57:55 UTC (rev 4345)
@@ -35,7 +35,12 @@
@var current object
*/
public static $Info;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
+
/**
@brief class constructor
*/
@@ -72,47 +77,186 @@
/**
@remarks not load if not first init
*/
- if(defined('JSONSTATMENT')) return;
+ if(!defined('JSONSTATMENT')) {
- if(self::$action =='' || self::$action =='listing')
- //! active datatable in ajax, precise les GET necessaire
- define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code.
- (isset(parent::$action)?'&action='.parent::$action : '' ).
- (isset(self::$Id)?'&file='.self::$Id : '' )
- );
+ if(self::$action =='' || self::$action =='listing')
+ //! active datatable in ajax, precise les GET necessaire
+ define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code.
+ (isset(parent::$action)?'&action='.parent::$action : '' ).
+ (isset(self::$Id)?'&file='.self::$Id : '' )
+ );
- /**
- @remarks this define col theader title, and ajust html code
- Just for Edit listing
- */
- self::$InitInfo['theader']['listing']=array(
- array('width'=>'5%','class'=>'tcenter', 'txt'=>__('table heading datatype') ) ,
-// array('width'=>'2%','class'=>'tcenter', 'txt'=>__('table heading datatype id') ) ,
-// array('width'=>'15%','class'=>'tcenter', 'txt'=>__('table heading name') ) ,
- array('width'=>'8%','class'=>'tcenter', 'txt'=>__('table heading status') ),
- array('width'=>'8%','class'=>'tcenter', 'txt'=>__('table heading action') ),
- );
+ }
- /**
- @remarks this define col in table, and if is possible sort
- Just for Edit listing
- */
- self::$InitInfo['modele']['listing']=array(
-// 0 =>false,
- 'row_id' =>true,
- 'type' =>true,
- 'featured_status' =>true,
-// 'featured_visible'=>true,
- 'action'=>false,
- );
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'c.row_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('featured table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'c.k_status_type' => array(
+ 'sort'=>true,
+ 'alias'=>'type',
+ 'text'=>__('featured table heading status type id'),
+ 'width'=>'8%',
+ 'class'=>'tcenter',
+ ),
+ 's.status_name' => array(
+ 'sort'=>true,
+ 'alias'=>'type_name',
+ 'text'=>__('featured table heading status type name'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'c.featured_min' => array(
+ 'sort'=>true,
+ 'alias'=>'min',
+ 'text'=>__('featured table heading min'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ ),
+ 'c.featured_max' => array(
+ 'sort'=>true,
+ 'alias'=>'max',
+ 'text'=>__('featured table heading max'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ ),
+ 'c.date_added' => array(
+ 'sort'=>true,
+ 'alias'=>'date_added',
+ 'text'=>__('featured table heading date_added'),
+ 'width'=>'10%',
+ ),
+ 'c.date_update' => array(
+ 'sort'=>true,
+ 'alias'=>'date_update',
+ 'text'=>__('featured table heading date_update'),
+ 'width'=>'10%',
+ ),
+ 'c.user_added' => array(
+ 'sort'=>true,
+ 'alias'=>'user_added',
+ 'text'=>__('featured table heading user_added'),
+ 'width'=>'10%',
+ ),
+ 'c.user_update' => array(
+ 'sort'=>true,
+ 'alias'=>'user_update',
+ 'text'=>__('featured table heading user_update'),
+ 'width'=>'10%',
+ ),
+ 'c.featured_status' => array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('featured table heading status'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ );
+// , 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();
+
+ $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[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+ $_SESSION['filters']['allfields'][$clean] = '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 Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'title'=>__('featured 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
*/
- if(self::$action =='' || self::$action =='listing'){
- self::$InitInfo['MenuModule'][]=array(
+ if(self::$action =='listing'){
+ $i = 0;
+ self::$InitInfo['MenuModule'][$i]=array(
'type'=>'getLink',
'format'=>'button_nav',
'image'=>'',
@@ -140,12 +284,28 @@
switch (self::$action) {
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'][__CLASS__]['allfields'] =array();
+ foreach($_POST['allfields'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
case 'setflag':
if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
$c_id =(int) tep_db_prepare_input($_GET['cID']);
if ($c_id > 0){
- $myarray = array('id'=>$c_id, 'visible'=>$_GET['flag'] );
+ $myarray = array('id'=>$c_id, 'status'=>$_GET['flag'] );
sqlfeatured::update($myarray);
}
}
@@ -156,10 +316,12 @@
case 'insert':
$myarray = array(
- 'name'=>tep_db_prepare_input($_POST['featured_name']),
- );
+ 'type'=>tep_db_prepare_input($_POST['featured_type']),
+ 'min'=>tep_db_prepare_input($_POST['featured_min']),
+ 'max'=>tep_db_prepare_input($_POST['featured_max']),
+ );
- sqlfeatured::create($myarray);
+ $res = sqlfeatured::create($myarray);
tep_redirect(tep_href_link(self::FILENAME ));
break;
@@ -169,10 +331,11 @@
if ($c_id > 0){
$myarray = array(
- 'id'=>$c_id,
- 'name'=>tep_db_prepare_input($_POST['featured_name']),
- 'visible'=>tep_db_prepare_input($_POST['featured_visible']),
- );
+ 'id'=>$c_id,
+ 'type'=>tep_db_prepare_input($_POST['featured_type']),
+ 'min'=>tep_db_prepare_input($_POST['featured_min']),
+ 'max'=>tep_db_prepare_input($_POST['featured_max']),
+ );
sqlfeatured::update($myarray);
}
@@ -229,10 +392,12 @@
/**
@remarks retrun object load one inventaire
*/
- global $query_numrows;
+ global $query_numrows, $languages_id;
$adjust=new objectInfo(self::$InitInfo['adjust']);
- $query_raw = "select row_id , k_status_type as type , featured_status from " . TABLE_FEATURED . " c ".
+
+ $query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
+ " LEFT JOIN ".TABLE_STATUS." s ON(status_id = k_status_type AND s.language_id = '".$languages_id."' AND status_type='featured_list') " .
((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' row_id ASC ');
@@ -257,7 +422,7 @@
@remarks Ajax View result
*/
case 'setflag':
- return self::RowStatus(array('country_visible'=>(int)$_GET['flag'], 'featured_id'=>(int)$_GET['cID']));
+ return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)$_GET['cID']));
break;
@@ -345,7 +510,9 @@
foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
- elseif($k == 'featured_visible') $ord[$k]=self::RowStatus($item);
+ elseif($k == 'status') $ord[$k]=self::RowStatus($item);
+ elseif($k == 'date_added') $ord[$k]=tep_datetime_short($item[$k]);
+ elseif($k == 'date_update') $ord[$k]=tep_datetime_short($item[$k]);
else $ord[$k]=$item[$k];
$res[]=$ord;
@@ -365,8 +532,8 @@
CsrtAction::getFormat('row_action'),
''
,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['featured_id'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['featured_id'] . '&action=delete') ,'' )
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=delete') ,'' )
);
}
@@ -376,14 +543,14 @@
@return string html
*/
private static function RowStatus($item){
- $exclude=array('action','pID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setflag&cID=' . $item['featured_id'].'&flag=';
+ $exclude=array('action','flag','file','setflag','forceajax');
+ $query_s='action=setflag&cID=' . $item['id'].'&flag=';
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['country_visible'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, $query_s.(($item['status'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
- (int)$item['country_visible'],
- ( ($item['country_visible'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ (int)$item['status'],
+ ( ($item['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
).
'</a>';
}
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2012-04-30 08:13:39 UTC (rev 4344)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2012-04-30 12:57:55 UTC (rev 4345)
@@ -290,7 +290,7 @@
}
}
- self::$InitInfo['modele']['listing']['action']=true;
+ 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') );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-30 08:13:45
|
Revision: 4344
http://oscss.svn.sourceforge.net/oscss/?rev=4344&view=rev
Author: oscim
Date: 2012-04-30 08:13:39 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
correction pour plus de soupllesse dans la function tep_db_perform, qui ne prennait pas en charge les commande sql NOW, NULL, en fonction de leur casse
Modified Paths:
--------------
trunk/catalog/common/functions/database.php
Modified: trunk/catalog/common/functions/database.php
===================================================================
--- trunk/catalog/common/functions/database.php 2012-04-29 22:01:12 UTC (rev 4343)
+++ trunk/catalog/common/functions/database.php 2012-04-30 08:13:39 UTC (rev 4344)
@@ -86,11 +86,12 @@
else
return $DB->query($query);
}
+
function tep_db_perform($table, $data, $action = 'insert', $parameters = '') {
$DB=Database::getInstance();
reset($data);
- if ($action == 'insert') {
+ if (strtolower($action) == 'insert') {
$query = 'INSERT INTO `' . $table . '` (';
while (list($columns, ) = each($data)) {
$query .= '`' . $columns . '`, ';
@@ -98,36 +99,38 @@
$query = substr($query, 0, -2) . ') values (';
reset($data);
while (list(, $value) = each($data)) {
- switch ((string)$value) {
- case 'now()':
- $query .= 'now(), ';
- break;
- case 'null':
- $query .= 'null, ';
- break;
- default:
- $query .= "'" . tep_db_input($value) . "', ";
- break;
- }
+ switch ((string)strtoupper($value)) {
+ case 'NOW()':
+ $query .= 'NOW(), ';
+ break;
+ case 'NULL':
+ $query .= 'NULL, ';
+ break;
+ default:
+ $query .= "'" . tep_db_input($value) . "', ";
+ break;
+ }
}
$query = substr($query, 0, -2) . ')';
- } elseif ($action == 'update') {
+ }
+ elseif (strtolower($action) == 'update') {
$query = 'UPDATE `' . $table . '` SET ';
while (list($columns, $value) = each($data)) {
- switch ((string)$value) {
- case 'now()':
- $query .= '`' .$columns . '`=now(), ';
- break;
- case 'null':
- $query .= '`' .$columns .= '`=null, ';
- break;
- default:
- $query .= '`' .$columns . "`='" . tep_db_input($value) . "', ";
- break;
- }
+ switch ((string)strtoupper($value)) {
+ case 'NOW()':
+ $query .= '`' .$columns . '`=NOW(), ';
+ break;
+ case 'NULL':
+ $query .= '`' .$columns .= '`=NULL, ';
+ break;
+ default:
+
+ $query .= '`' .$columns . "`='" . tep_db_input($value) . "', ";
+ }
}
$query = substr($query, 0, -2) . ' WHERE ' . $parameters . ';';
}
+
if(_cst_bool('STORE_DB_TRANSACTIONS')){
$time_start = explode(' ', microtime());
$RESULT=$DB->query($query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-29 22:01:18
|
Revision: 4343
http://oscss.svn.sourceforge.net/oscss/?rev=4343&view=rev
Author: oscim
Date: 2012-04-29 22:01:12 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Int?\195?\169gration des datatype dans la generation des sitemap en xml pour le referencement.
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/ggsitemap.php
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/common/classes/datatype_drivers/Data_content.php
trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php
trunk/catalog/common/classes/datatype_drivers/Data_product.php
Modified: trunk/catalog/admin/includes/modules/pages/ggsitemap.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/ggsitemap.php 2012-04-29 19:52:22 UTC (rev 4342)
+++ trunk/catalog/admin/includes/modules/pages/ggsitemap.php 2012-04-29 22:01:12 UTC (rev 4343)
@@ -70,24 +70,23 @@
$google = new GoogleSitemap(DB_SERVER, DB_SERVER_USERNAME, DB_DATABASE, DB_SERVER_PASSWORD);
$submit = true;
- if ($google->GenerateProductSitemap()){
- self::$list[]= __('google sitemaps product success');
- } else {
- $submit = false;
- self::$list[]= __('google sitemaps product error');
- }
+ $detail= array();
+ $DT=DataTypes::getInstance();
+ foreach($DT->GetAllDataType() as $k=>$row){
+ $type = substr($k, 5);
+ if(method_exists($row, 'Sitemap') && $row->Sitemap() !=false){
+ if ($google->GenerateSitemap_datatype($type, $row)){
+ self::$list[]= __('google sitemaps '.$type.' success');
+ $detail[]= __('google sitemaps here product').' ' . $google->base_url . 'sitemap'.$type.'.xml' ;
+ }
+ else {
+ $submit = false;
+ self::$list[]= __('google sitemaps '.$type.' error');
+ }
+ }
+ }
-
- if ($google->GenerateCategorySitemap()){
- self::$list[]= __('google sitemaps category success');
- } else {
- $submit = false;
- self::$list[]= __('google sitemaps category error');
- }
-
-
-
if ($google->GenerateSitemapIndex()){
self::$list[]= __('google sitemaps index success');
} else {
@@ -104,8 +103,9 @@
self::$list[]= urldecode($google->GenerateSubmitURL()) . "\n\n";
self::$list[]= __('google sitemaps here index') .' '. $google->base_url . 'sitemapindex.xml' ;
- self::$list[]= __('google sitemaps here product').' ' . $google->base_url . 'sitemapproducts.xml' ;
- self::$list[]= __('google sitemaps here category').' ' . $google->base_url . 'sitemapcategories.xml' ;
+
+ self::$list = array_merge( self::$list,$detail);
+
} else {
print_r($google->debug);
}
@@ -117,7 +117,7 @@
return htmlspecialchars(utf8_encode('http://www.google.com/webmasters/sitemaps/ping?sitemap=' . urlencode(HTTP_SERVER . DIR_WS_CATALOG . 'sitemapindex.xml' ) ));
}
-/** Interface module */
+ /** Interface module */
function check() { return false; }
function install() { return false; }
@@ -346,150 +346,75 @@
}
+ /**
+ @fn GenerateSitemap_datatype($type)
+ @param $type string name type
+ @param $obj object datatype mod
+ */
+ function GenerateSitemap_datatype($type, $obj){
-/**
- * Function to generate product sitemap data
- * @author Bobby Easland
- * @version 1.1
- * @return boolean
- */
- function GenerateProductSitemap(){
- $sql = "SELECT p.products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c WHERE products_status='1' and p.products_id=p2c.products_id and c.categories_id=p2c.categories_id and c.categories_status ORDER BY products_ordered DESC";
+ $TYPE = strtoupper($type);
+ $anch = each($obj->reg_anchors);
+ $anchor =$anch[0];
+ $fil = each($obj->reg_filenames);
+ $filename =$fil[1];
+
+ $sql = "SELECT ".$obj->listing_sql['id']." as id, ".$obj->listing_sql['dates']." ,".$obj->listing_sql['ratio']." as ratio ".
+ $obj->listing_sql['tables'].
+ $obj->listing_sql['where'].
+ "";
+
if ( $products_query = $this->DB->query($sql) ){
- $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success';
- $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $products_query->__get('numRows');
+
+ $this->debug['QUERY'][$TYPE]['STATUS'] = 'success';
+ $this->debug['QUERY'][$TYPE]['NUM_ROWS'] = $products_query->__get('numRows');
$container = array();
$number = 0;
$top = 0;
while( $result = $products_query->fetchAssoc() ){
- $top = max($top, $result['products_ordered']);
- //$location = $this->hrefLink('product' . $result['pID'] . FILENAME_PRODUCT_INFO, 'source=google', 'NONSSL', false);
- $location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false);
- $lastmod = tep_not_null($result['last_mod']) ? $result['last_mod'] : $result['date_added'];
- $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ;
- $ratio = $top > 0 ? $result['products_ordered']/$top : 0;
- $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');
+ $top = max($top, $result['ratio']);
+ //$location = $this->hrefLink('product' . $result['pID'] . FILENAME_PRODUCT_INFO, 'source=google', 'NONSSL', false);
- $container[] = array('loc' => htmlspecialchars(utf8_encode($location)),
- 'lastmod' => date ("Y-m-d", strtotime($lastmod)),
- 'changefreq' => $changefreq,
- 'priority' => $priority
- );
+ $location = $this->hrefLink($filename, $anchor.'=' . $result['id'], 'NONSSL', false);
- if ( sizeof($container) >= 50000 ){
- $type = $number == 0 ? 'products' : 'products' . $number;
- $this->GenerateSitemap($container, $type);
- $container = array();
- $number++;
- }
- } # end while
- $products_query->__destruct();
- if ( sizeof($container) > 1 ) {
- $type = $number == 0 ? 'products' : 'products' . $number;
- return $this->GenerateSitemap($container, $type);
- } # end if
- } else {
- $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'false';
- $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = '0';
- }
- }
+ $lastmod = tep_not_null($result['modified']) ? $result['modified'] : $result['added'];
+ $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ;
+ $ratio = $top > 0 ? $result['ratio']/$top : 0;
+ $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');
+ $container[] = array(
+ 'loc' => htmlspecialchars(utf8_encode($location)),
+ 'lastmod' => date ("Y-m-d", strtotime($lastmod)),
+ 'changefreq' => $changefreq,
+ 'priority' => $priority
+ );
-/**
- * Funciton to generate category sitemap data
- * @author Bobby Easland
- * @version 1.1
- * @return boolean
- */
- function GenerateCategorySitemap(){
- $sql = "SELECT categories_id as cID, date_added, last_modified as last_mod FROM " . TABLE_CATEGORIES . " WHERE categories_status='1' ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";
-
- if ( $categories_query = $this->DB->query($sql) ){
- $this->debug['QUERY']['CATEOGRY']['STATUS'] = 'success';
- $this->debug['QUERY']['CATEOGRY']['NUM_ROWS'] = $categories_query->__get('numRows');
- $container = array();
- $number = 0;
-
- while( $result = $categories_query->fetchAssoc() ){
- //$location = $this->hrefLink('category' . $this->GetFullcPath($result['cID']) . FILENAME_DEFAULT, 'source=google', 'NONSSL', false);
- $location = $this->hrefLink(FILENAME_DEFAULT, 'cPath=' . $this->GetFullcPath($result['cID']), 'NONSSL', false);
- $lastmod = tep_not_null($result['last_mod']) ? $result['last_mod'] : $result['date_added'];
- $changefreq = GOOGLE_SITEMAP_CAT_CHANGE_FREQ;
- $priority = .5;
-
- $container[] = array('loc' => htmlspecialchars(utf8_encode($location)),
- 'lastmod' => date ("Y-m-d", strtotime($lastmod)),
- 'changefreq' => $changefreq,
- 'priority' => $priority
- );
-
- if ( sizeof($container) >= 50000 ){
- $type = $number == 0 ? 'categories' : 'categories' . $number;
- $this->GenerateSitemap($container, $type);
- $container = array();
- $number++;
- }
+ if ( sizeof($container) >= 50000 ){
+ $type2 = $number == 0 ? $type : $type . $number;
+ $this->GenerateSitemap($container, $type2);
+ $container = array();
+ $number++;
+ }
} # end while
- $categories_query->__destruct();
-
+ $products_query->__destruct();
if ( sizeof($container) > 1 ) {
- $type = $number == 0 ? 'categories' : 'categories' . $number;
- return $this->GenerateSitemap($container, $type);
+ $type2 = $number == 0 ? $type : $type . $number;
+ return $this->GenerateSitemap($container, $type2);
} # end if
-
} else {
- $this->debug['QUERY']['CATEOGRY']['STATUS'] = 'false';
- $this->debug['QUERY']['CATEOGRY']['NUM_ROWS'] = '0';
+ $this->debug['QUERY'][$TYPE]['STATUS'] = 'false';
+ $this->debug['QUERY'][$TYPE]['NUM_ROWS'] = '0';
}
}
-/**
- * Function to retrieve full cPath from category ID
- * @author Bobby Easland
- * @version 1.0
- * @param mixed $cID Could contain cPath or single category_id
- * @return string Full cPath string
- */
- function GetFullcPath($cID){
- if ( preg_match('/_/', $cID) ){
- return $cID;
- } else {
- $c = array();
- $this->GetParentCategories($c, $cID);
- $c = array_reverse($c);
- $c[] = $cID;
- $cID = sizeof($c) > 1 ? implode('_', $c) : $cID;
- return $cID;
- }
- }
/**
- * Recursion function to retrieve parent categories from category ID
- * @author Bobby Easland
- * @version 1.0
- * @param mixed $categories Passed by reference
- * @param integer $categories_id
- */
- function GetParentCategories(&$categories, $categories_id) {
- $sql = "SELECT parent_id FROM " . TABLE_CATEGORIES . " WHERE categories_id='" . (int)$categories_id . "' and categories_status='1' ";
- $parent_categories_query = $this->DB->query($sql);
- while ($parent_categories = $parent_categories_query->fetchAssoc()) {
- if ($parent_categories['parent_id'] == 0) return true;
- $categories[sizeof($categories)] = $parent_categories['parent_id'];
- if ($parent_categories['parent_id'] != $categories_id) {
- $this->GetParentCategories($categories, $parent_categories['parent_id']);
- }
- }
- }
-
-
-/**
* Function to return href_link
* @author Bobby Easland
* @version 1.1
@@ -497,11 +422,7 @@
* @return boolean
*/
function hrefLink($page, $parameters, $connection, $add_session_id) {
-// if (_cst_bool('SEO_ENABLED')) {
- return tep_catalog_href_link($page, $parameters, $connection, $add_session_id);
-// } else {
-// return $this->base_url . $page . '?' . $parameters;
-// }
+ return tep_catalog_href_link($page, $parameters, $connection, $add_session_id);
}
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-29 19:52:22 UTC (rev 4342)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-29 22:01:12 UTC (rev 4343)
@@ -54,8 +54,11 @@
based on conf DATATYPES_ROOTLISTING_CATEGORIE
*/
public $RootListing = array();
+ /**
+ @var prefix alias a utilise systematiquement dans les requete sql
+ */
+ public $p = 'cat';
-
/**
@var type subchilds result calculate
*/
@@ -70,7 +73,31 @@
$this->RootListing = array_map('trim',explode(',',DATATYPES_ROOTLISTING_CATEGORIE));
}
+ /**
+ @brief sql for sitemap index
+ @param $mode le type de control (public)
+ @return true
+ */
+ function Sitemap($mode='public'){
+ global $languages_id;
+ $this->listing_sql['tables'] = " FROM " . TABLE_CATEGORIES . " ".$this->p." ".
+ " LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " ".$this->p."d ON( ".$this->p."d.categories_id = ".$this->p.".categories_id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
+ "";
+ // permanente contrainte
+ $this->listing_sql['where'] = " WHERE ".$this->p.".categories_status = '1' ";
+ // sort in sitemap
+ $this->listing_sql['sort'] = " ".$this->p.".parent_id ";
+ // l id
+ $this->listing_sql['id'] = " ".$this->p.".categories_id ";
+ // colone utilsie pour le ratio
+ $this->listing_sql['ratio'] = " ".$this->p.".last_modified ";
+ // list normalise date
+ $this->listing_sql['dates'] = " ".$this->p.".date_added as added, ".$this->p.".last_modified as modified ";
+
+ return true;
+ }
+
/**
@brief test si al page est du type produits
@param $mode le type de control (page/cpath/seo)
Modified: trunk/catalog/common/classes/datatype_drivers/Data_content.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-04-29 19:52:22 UTC (rev 4342)
+++ trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-04-29 22:01:12 UTC (rev 4343)
@@ -68,6 +68,7 @@
function __construct($next=false){
global $languages_id;
+// $this->conf = new objectInfo(explode())
if($next) {
// $this->use_in_search = _cst_bool('DATA_CONTENT_USEINSEARCH');
@@ -79,11 +80,33 @@
$this->listing_sql['sort'] = " ".$this->p."d.content_title ";
$this->listing_sql['base_key'] = "content_id ";
$this->listing_sql['col_count'] = " ".$this->p.".content_id ";
+ // list normalise date
+ $this->listing_sql['dates'] = " ".$this->p.".date_added as added, ".$this->p.".last_modified as modified ";
}
}
+
/**
- @brief test si al page est du type produits
+ @brief sql for sitemap index
+ @param $mode le type de control (public)
+ @return true
+ */
+ function Sitemap($mode='public'){
+ // sort in sitemap
+ $this->listing_sql['sort'] = " ".$this->p.".content_id ";
+ // l id
+ $this->listing_sql['id'] = " ".$this->p.".content_id ";
+ // colone utilsie pour le ratio
+ $this->listing_sql['ratio'] = " ".$this->p.".last_modified ";
+ // list normalise date
+ $this->listing_sql['dates'] = " ".$this->p.".date_added as added, ".$this->p.".last_modified as modified ";
+
+ return true;
+ }
+
+
+ /**
+ @brief test si la page est du type produits
@param $mode le type de control (page/cpath/seo)
*/
function is_type($mode='unique'){
Modified: trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-04-29 19:52:22 UTC (rev 4342)
+++ trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-04-29 22:01:12 UTC (rev 4343)
@@ -54,7 +54,13 @@
based on conf DATATYPES_ROOTLISTING_MANUFACTURER
*/
public $RootListing = array();
+ /**
+ @var prefix alias a utilise systematiquement dans les requete sql
+ */
+ public $p = 'm';
+
+
/**
@brief constructor
@param next bool true for complete load , but use 2 call
@@ -64,6 +70,31 @@
}
/**
+ @brief sql for sitemap index
+ @param $mode le type de control (public)
+ @return true
+ */
+ function Sitemap($mode='public'){
+ global $languages_id;
+
+ $this->listing_sql['tables'] = " FROM " . TABLE_MANUFACTURERS . " ".$this->p." ".
+ " LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " ".$this->p."d ON( ".$this->p."d.manufacturers_id = ".$this->p.".manufacturers_id AND ".$this->p."d.languages_id = '" . (int)$languages_id . "' ) ".
+ "";
+ // permanente contrainte
+ $this->listing_sql['where'] = " WHERE 1 ";
+ // sort in sitemap
+ $this->listing_sql['sort'] = " ".$this->p.".manufacturers_name ";
+ // l id
+ $this->listing_sql['id'] = " ".$this->p.".manufacturers_id ";
+ // colone utilsie pour le ratio
+ $this->listing_sql['ratio'] = " ".$this->p."d.url_clicked ";
+ // list normalise date
+ $this->listing_sql['dates'] = " ".$this->p.".date_added as added, ".$this->p.".last_modified as modified ";
+
+ return true;
+ }
+
+ /**
@brief test si al page est du type produits
@param $mode le type de control (page/cpath/seo)
*/
Modified: trunk/catalog/common/classes/datatype_drivers/Data_product.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-04-29 19:52:22 UTC (rev 4342)
+++ trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-04-29 22:01:12 UTC (rev 4343)
@@ -19,22 +19,22 @@
@var DataType array reg for seo class
*/
public $reg_anchors = array(
+ 'products_id' => 'p', // unique page prodcuts
'pID' => 'pi', // popup image product
- 'products_id' => 'p' // unique page prodcuts
);
/**
@var DataType array reg check for control get params , please respect order $reg_anchors
*/
public $reg_check = array(
+ '([0-9]*)', // unique page prodcuts
'([0-9]*)', // popup image product
- '([0-9]*)' // unique page prodcuts
);
/**
@var DataType files for folder /content , please respect order $reg_anchors
*/
public $reg_filenames = array(
+ 'FILENAME_PRODUCT_INFO' => FILENAME_DEFAULT, // unique page prodcuts
'FILENAME_POPUP_IMAGE' => 'popup_image.php', // popup image product
- 'FILENAME_PRODUCT_INFO' => FILENAME_DEFAULT // unique page prodcuts
);
/**
@var DataType Tables define
@@ -90,15 +90,38 @@
$this->listing_sql['tables'] = " FROM " . TABLE_PRODUCTS . " ".$this->p." ".
" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " ".$this->p."d ON( ".$this->p."d.products_id = ".$this->p.".products_id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
"";
-
+ // permanente contrainte
$this->listing_sql['where'] = " WHERE ".$this->p.".products_status = '1' ";
+ // defaut sort listing
$this->listing_sql['sort'] = " ".$this->p."d.products_name ";
+ // sort in sitemap
+ $this->listing_sql['sort_in_sitemap'] = " ".$this->p."d.products_name ";
$this->listing_sql['base_key'] = "products_id ";
$this->listing_sql['col_count'] = " ".$this->p.".products_id ";
+ // list normalise date
+ $this->listing_sql['dates'] = " ".$this->p.".products_date_added as added, ".$this->p.".products_last_modified as modified, ".$this->p.".products_date_available as available ";
}
}
/**
+ @brief sql for sitemap index
+ @param $mode le type de control (public)
+ @return true
+ */
+ function Sitemap($mode='public'){
+ // sort in sitemap
+ $this->listing_sql['sort'] = " ".$this->p.".products_ordered ";
+ // l id
+ $this->listing_sql['id'] = " ".$this->p.".products_id ";
+ // colone utilsie pour le ratio
+ $this->listing_sql['ratio'] = " ".$this->p.".products_ordered ";
+ // list normalise date
+ $this->listing_sql['dates'] = " ".$this->p.".products_date_added as added, ".$this->p.".products_last_modified as modified, ".$this->p.".products_date_available as available ";
+
+ return true;
+ }
+
+ /**
@brief test si al page est du type produits
@param $mode le type de control (page/cpath/seo)
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-29 19:52:28
|
Revision: 4342
http://oscss.svn.sourceforge.net/oscss/?rev=4342&view=rev
Author: oscim
Date: 2012-04-29 19:52:22 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
coquille nom de colonne
ajout element manquant dans le dashboard
coquille dans le liens de menu dans la boxe
Modified Paths:
--------------
trunk/catalog/Documents/admin/data/dashboard.xml
trunk/catalog/admin/includes/boxes/08_cms.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt
trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql
Modified: trunk/catalog/Documents/admin/data/dashboard.xml
===================================================================
--- trunk/catalog/Documents/admin/data/dashboard.xml 2012-04-29 17:43:07 UTC (rev 4341)
+++ trunk/catalog/Documents/admin/data/dashboard.xml 2012-04-29 19:52:22 UTC (rev 4342)
@@ -116,7 +116,7 @@
</right>
</config_126>
- <config_127>
+ <config_127>
<left>
<widget>HelpConfig</widget>
</left>
@@ -135,6 +135,14 @@
</right>
</customers>
+ <docsandimage>
+ <left>
+ <widget></widget>
+ </left>
+ <right>
+ <widget>ImagesLast</widget>
+ </right>
+ </docsandimage>
<home>
<left>
Modified: trunk/catalog/admin/includes/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/boxes/08_cms.php 2012-04-29 17:43:07 UTC (rev 4341)
+++ trunk/catalog/admin/includes/boxes/08_cms.php 2012-04-29 19:52:22 UTC (rev 4342)
@@ -18,8 +18,8 @@
$tabl_link[] = array(
'ss_menu',
'BOX_NAVIGATION_DOCSANDIMAGE',
- 'annonce',
- @$img['annonce'],
+ 'docsandimage',
+ @$img['docsandimage'],
4=> array(
array('browser.php', 'BOX_NAVIGATION_IMAGE', 'images',@$img['image']),
array('browser.php?type=file', 'BOX_NAVIGATION_DOCSFILES', 'docsfiles',@$img['docsfiles'])
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt 2012-04-29 17:43:07 UTC (rev 4341)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt 2012-04-29 19:52:22 UTC (rev 4342)
@@ -16,6 +16,7 @@
$lang['heading title commercial']="Tableau de bord commercial" ;
$lang['heading title tools']="Aperçu" ;
$lang['heading title modules']="Aperçu" ;
+$lang['heading title docsandimage']="Aperçu" ;
$lang['heading title configuration']="Tableau de bord de la configuration" ;
$lang['heading title mail']="Tableau de bord campagne emailling" ;
$lang['heading title orders']="Tableau de bord des commandes" ;
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql 2012-04-29 17:43:07 UTC (rev 4341)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql 2012-04-29 19:52:22 UTC (rev 4342)
@@ -22,10 +22,12 @@
run_only_once tinyint(1) NOT NULL,
status tinyint(1) NOT NULL,
date_added datetime NOT NULL,
- date_update datetime NULL,
+ last_update datetime NULL,
user_added int(11) NOT NULL,
user_update int(11) NULL,
extra text,
PRIMARY KEY (id)
) DEFAULT CHARSET=utf8 ;
+
+
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql 2012-04-29 17:43:07 UTC (rev 4341)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql 2012-04-29 19:52:22 UTC (rev 4342)
@@ -15,7 +15,7 @@
ALTER TABLE osc_cronjob ADD COLUMN date_added datetime NOT NULL AFTER status;
-ALTER TABLE osc_cronjob ADD COLUMN date_update datetime NULL AFTER date_added;
-ALTER TABLE osc_cronjob ADD COLUMN user_added int(11) NOT NULL AFTER date_update;
+ALTER TABLE osc_cronjob ADD COLUMN last_update datetime NULL AFTER date_added;
+ALTER TABLE osc_cronjob ADD COLUMN user_added int(11) NOT NULL AFTER last_update;
ALTER TABLE osc_cronjob ADD COLUMN user_update int(11) NULL AFTER user_added;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-29 17:43:15
|
Revision: 4341
http://oscss.svn.sourceforge.net/oscss/?rev=4341&view=rev
Author: oscim
Date: 2012-04-29 17:43:07 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Suite travail d'implementation des filtre et mise en place sur orders
correction erreur lors du report du status courant sur la table master des commandes
normalisation et mise en forme des filtres
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/functions/lib.orders.php
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/modules/rapport/products_purchased.php
trunk/catalog/admin/includes/modules/rapport/products_viewed.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-29 17:43:07 UTC (rev 4341)
@@ -210,6 +210,7 @@
width => value width th balise
*/
public static function DFilterAllfields(){
+
$action=(empty(self::$action)? 'listing' :self::$action);
return ((isset(self::$InitInfo['allfields'][$action])) ? self::$InitInfo['allfields'][$action] : array());
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2012-04-29 17:43:07 UTC (rev 4341)
@@ -282,15 +282,14 @@
break;
case DEFAULT_ORDERS_STATUS_ID:
default:
-
+ $sql_data_array['last_modified'] = 'NOW()';
}
-
if(count($sql_data_array) > 0){
-
+ $sql_data_array['orders_status'] = $new_st;
$sql_data_array['last_modified'] = 'NOW()';
- /*$error =*/ tep_db_perform(TABLE_ORDERS, $sql_data_array, 'update', "orders_id = '" . $id . "'");
+ tep_db_perform(TABLE_ORDERS, $sql_data_array, 'update', "orders_id = '" . $id . "'");
}
Modified: trunk/catalog/admin/includes/functions/lib.orders.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.orders.php 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/functions/lib.orders.php 2012-04-29 17:43:07 UTC (rev 4341)
@@ -44,8 +44,9 @@
if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
+ $update = sqlorder::update(array('id'=> (int)$_oID, 'status'=> tep_db_input($status), 'notify'=>$notify , 'comments'=>$comments ));
- if(!sqlorder::update(array('id'=> (int)$_oID, 'status'=> tep_db_input($status), 'notify'=>$notify , 'comments'=>$comments )))
+ if(!$update)
$messageStack->add_session(__('error order not update status'), 'warning');
else
$messageStack->add_session(__('success order update status'), 'success');
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-04-29 17:43:07 UTC (rev 4341)
@@ -9,7 +9,6 @@
@encode UTF-8
*/
-print_r($_SESSION['filters']);
?>
<h3><?php echo __('heading title '.MGabCont::CallSt('GetClassName')); ?></h3>
@@ -26,7 +25,8 @@
<?php if(count(MGabCont::CallSt('DFilterModule')) > 0): ?>
<!-- EOB - Section Filtre // Doit être prise en charge par le mode de page -->
<?php echo tep_draw_form('filters', MGabCont::CallSt('GetFILENAME'), 'action=filters', 'post') ?>
- <div id="filtre" class="tabs">
+ <p class="Ctrtirroir"><?php echo __('view filtres for listing'); ?></p>
+ <div id="filtre" class="tirroir tabs">
<ul>
<?php $i=0; foreach(MGabCont::CallSt('DFilterModule') as $item): ?>
<li><a href="#tabfiltre-<?php echo $i++ ?>"><?php echo $item->title ?></a></li>
@@ -41,7 +41,7 @@
<p class=" button_nav">
<?php
- echo tep_get_all_post_params();
+ echo tep_get_all_post_params();
echo tep_image_submit('', __('image filters'));
?>
</p>
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-04-29 17:43:07 UTC (rev 4341)
@@ -1,19 +1,24 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 30/04/11, 21:28
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
?>
<fieldset>
+ <legend><?php echo __('filter legend choose fields'); ?></legend>
<ul class="inline">
- <?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item): $clean = substr($k, (strpos($k, '.')+1)); ?>
- <li><?php echo tep_draw_checkbox_field('allfields['.$clean.']', 'allfields['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?> <?php echo $item ?> </li>
+ <?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item):
+ $clean = substr($k, (strpos($k, '.')+1)); ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('allfields['.$clean.']', 'allfields['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?>
+ <?php echo (is_array($item)? $item['text'] : $item ) ?>
+ </li>
<?php endforeach; ?>
</ul>
</fieldset>
Added: trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab 2012-04-29 17:43:07 UTC (rev 4341)
@@ -0,0 +1,36 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<!-- <fieldset> -->
+<!-- <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <ul class="inline">
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ </li>
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ </li>
+ </ul>-->
+<!-- </fieldset> -->
+
+<fieldset>
+ <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <ul class="inline">
+ <?php foreach(orders::$orders_statuses as $item): ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('viewstatus['.$item['id'] .']', 'viewstatus['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['viewstatus']) <=1 || (string)@$_SESSION['filters']['viewstatus'][$item['id']] == 'on')); ?>
+ <?php echo $item['text'] ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+</fieldset>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2012-04-29 17:43:07 UTC (rev 4341)
@@ -20,12 +20,34 @@
$lang['tab orders shipping']="Livraisons" ;
$lang['tab orders service']="Services" ;
-$lang['table heading order id']="n°" ;
+/* Filter */
+ $lang['view filtres for listing']="Options des filtres" ;
+ $lang['orders filter tab clause']="Filtre" ;
+ $lang['orders filter tab fields']="Colonnes" ;
+ $lang['image filters']="Filtrer" ;
+
+ $lang['orders filter legend choose status']="Statut visible" ;
+ $lang['filter legend choose fields']="Colonnes visible" ;
+
+/* Listing */
+ $lang['orders table heading order id']="n°" ;
+ $lang['orders table heading customers']="Clients" ;
+ $lang['orders table heading order total']="Total" ;
+ $lang['orders table heading date purchased']="Achat le" ;
+ $lang['orders table heading last modified']="Modifié le" ;
+ $lang['orders table heading payment']="Payé par" ;
+ $lang['orders table heading status']="Statut" ;
+ $lang['orders table heading currency']="Devise" ;
+ $lang['orders table heading ip_address']="ip" ;
+ $lang['orders table heading total_weight']="Poids" ;
+ $lang['orders table heading facture_id']="Fact." ;
+ $lang['orders table heading class_payment']="Class. pay" ;
+ $lang['orders table heading class_shipping']="Class. ship" ;
+
$lang['table heading comments']="Commentaires" ;
-$lang['table heading customers']="Clients" ;
-$lang['table heading order total']="Total" ;
-$lang['table heading date purchased']="Achat le" ;
+
+
$lang['table heading status']="Statut" ;
$lang['table heading id']="Id" ;
$lang['table heading action']="Action" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt 2012-04-29 17:43:07 UTC (rev 4341)
@@ -13,6 +13,8 @@
$lang['image back'] = "Retour";
$lang['image filters'] = "Filtrer";
+$lang['view filtres for listing']="Options des filtres" ;
+$lang['filter legend choose fields']="Colonnes visibles" ;
$lang['table heading code'] = "Code";
$lang['table heading name'] = "Titre";
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2012-04-29 17:43:07 UTC (rev 4341)
@@ -21,7 +21,7 @@
InterfacedInnerHtml {
/**
- @var const
+ @def FILENAME const
*/
const FILENAME = FILENAME_ORDERS;
@@ -73,6 +73,10 @@
@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
@@ -115,65 +119,22 @@
/**
@remarks not load if not first init
*/
- if(defined('JSONSTATMENT')) return;
+ if(!defined('JSONSTATMENT')){
+ //! 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 : '' )
+ );
- //! 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);
+ }
- //! 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 order id') ),
- 3 =>array('width'=>'40%','class'=>'tcenter', 'txt'=>__('table heading customers')),
- 4 =>array('width'=>'150px','class'=>'tcenter', 'txt'=>__('table heading order total')),
- 5 =>array('width'=>'10%', 'txt'=>__('table heading date purchased')),
- 6 =>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.orders_id','orders_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,
- 'orders_id'=>true,
- 'customers_id'=>true,
- 'order_total'=>true,
- 'date_purchased'=>true,
- 'payment_method'=>true,
- 'orders_status_name'=>true,
- 'action' =>false
- );
-
-
$DB=Database::getInstance();
self::$orders_statuses=array();
$orders_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='orders' and language_id = '" . (int)$languages_id . "'");
@@ -185,6 +146,213 @@
+
+ switch(self::$action){
+
+ case 'listing':
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'o.orders_id' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading order id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ // 'o.orders_prefix' => __('orders table heading order prefix'),
+ 'o.customers_id' => array(
+ 'sort'=>true,
+ 'text'=> __('orders table heading customers'),
+ 'width'=>'20%',
+ 'class'=>'tleft',
+ 'default'=>true,
+ ),
+ // 'o.customers_name' => __('orders table heading customers name'),
+ 'ot.text' => array(
+ 'sort'=>true,
+ 'alias'=>'order_total',
+ 'text'=>__('orders table heading order total'),
+ 'default'=>true,
+ ),
+ 'o.currency' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading currency'),
+ 'default'=>true,
+ ),
+ // 'o.currency_value' => array(
+ // 'sort'=>true,
+ // // 'alias'=>'order_total',
+ // 'text'=>__('orders table heading order_total'),
+ // 'width'=>'10%',
+ // 'class'=>'tcenter',
+ // ),
+
+ 'o.date_purchased' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading date purchased'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'o.last_modified' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading last modified'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ ),
+ 'o.payment_method' => array(
+ 'sort'=>true,
+ 'text'=>__('orders table heading payment'),
+ 'width'=>'12%',
+ 'class'=>'tcenter',
+ ),
+ 's.status_name' =>array(
+ 'sort'=>true,
+ 'alias'=>'orders_status_name',
+ 'text'=> __('orders table heading status'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'o.ip_address' => __('orders table heading ip_address'),
+ 'o.total_weight' => __('orders table heading total_weight'),
+ 'o.facture_id' => __('orders table heading facture_id'),
+ 'o.class_payment' => __('orders table heading class_payment'),
+ 'o.class_shipping' => __('orders table heading class_shipping'),
+ // 'p.products_ordered' => __('orders table heading purchased'),
+ );
+
+
+ /**
+ @remarks Construct all list , fields , th/td
+ */
+ self::$InitInfo['theader']['listing']=array(
+ 0 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ 1 =>array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+ 0 =>false,
+ 1 =>false,
+ );
+
+ // min fields and not view directly colonne fields
+ $listfield = '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%';
+ }
+
+
+
+ if(
+ ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+ $_SESSION['filters']['allfields'][$clean] = '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']=true;
+ self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+ self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;
+
+ /**
+ @remarks filter based on status orders
+ */
+ if(isset($_SESSION['filters'][__CLASS__]['viewstatus']))
+ $_SESSION['filters']['viewstatus'] = $_SESSION['filters'] [__CLASS__]['viewstatus'];
+ else
+ $_SESSION['filters']['viewstatus'] =array();
+
+ $list = '';
+ if(count($_SESSION['filters']['viewstatus']) > 0)
+ foreach($_SESSION['filters']['viewstatus'] as $key=>$row)
+ $list .=$key.',';
+ else
+ foreach(self::$orders_statuses as $row)
+ $list .=$row['id'].',';
+
+ self::$InitInfo['adjust']['sWhere'] =" AND orders_status IN (".substr($list, 0,-1).") ";
+
+
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'title'=>__('orders filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ ),
+ array(
+ 'title'=>__('orders filter tab fields'),
+ 'type'=>'listfield'
+ ),
+ );
+
+ /**
+ @remarks Put detail for listing methode
+ */
+ self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+
+ break;
+ }
+
+
+// =array();
+// if(self::$view =='opened')
+// self::$InitInfo['adjust']['sWhere'] .=" AND SUBSTRING(o.orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_COMPLETED."' ";
+// elseif(self::$view =='nopayed')
+// self::$InitInfo['adjust']['sWhere'] .=" AND orders_status >=0 AND SUBSTRING(orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_PAYED."' ";
+// elseif(self::$view =='allnoclosed')
+// self::$InitInfo['adjust']['sWhere'] .=" AND orders_status >=0 ";
+// elseif(self::$view =='all')
+// self::$InitInfo['adjust']['sWhere'] .='';
+// elseif(self::$view =='thisday')
+// self::$InitInfo['adjust']['sWhere'] .=' AND SUBSTRING(date_purchased,1,10) =\''.date('Y-m-d').'\' ';
+// else {
+
+
+
global $oscss;
$oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','comments','800','400');
@@ -193,6 +361,11 @@
}
+
+ /**
+ @fn check_action($actions)
+ @brief process action
+ */
public function check_action($actions){
global $messageStack,$page_module;
@@ -202,7 +375,32 @@
switch (self::$action) {
+
/**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'][__CLASS__]['allfields'] =array();
+ foreach($_POST['allfields'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+
+ $_SESSION['filters'][__CLASS__]['viewstatus'] =array();
+ foreach($_POST['viewstatus'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['viewstatus'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['viewstatus'][$key]);
+ }
+
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+ /**
@remarks pdf generate for all docs
*/
case 'pdf':
@@ -366,7 +564,6 @@
self::$action=$actions;
}
}
-
}
else
$messageStack->add_session(__('warning order not updated'), 'warning');
@@ -752,26 +949,14 @@
if(tep_not_null($adjust->sWhere)){
$adjust->sWhere=str_replace(
- array('orders_id', 'order_total', 'customers_id', 'orders_status_name'),
- array('o.orders_id', ' ot.text', 'o.customers_name', 's.status_name'),
- $adjust->sWhere
- );
+ array('orders_id', 'order_total', 'customers_id', 'orders_status_name'),
+ array('o.orders_id', ' ot.text', 'o.customers_name', 's.status_name'),
+ $adjust->sWhere
+ );
}
- $wh='';
- if(self::$view =='opened')
- $wh .=" AND SUBSTRING(o.orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(o.orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_COMPLETED."' ";
- elseif(self::$view =='nopayed')
- $wh .=" AND o.orders_status >=0 AND SUBSTRING(o.orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(o.orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_PAYED."' ";
- elseif(self::$view =='allnoclosed')
- $wh .=" AND o.orders_status >=0 ";
- elseif(self::$view =='all')
- $wh .='';
- elseif(self::$view =='thisday')
- $wh .=' AND SUBSTRING(o.date_purchased,1,10) =\''.date('Y-m-d').'\' ';
+ $query_raw = "select distinct ".$adjust->listfields." 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)$adjust->languages_id . "' and ot.class = 'ot_total' ".$adjust->sWhere." order by ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 'o.orders_id DESC');
- $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' ".$wh." and s.language_id = '" . (int)$adjust->languages_id . "' and ot.class = 'ot_total' ".$adjust->sWhere." order by ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 'o.orders_id DESC');
-
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -1021,17 +1206,21 @@
switch (parent::$action) {
case 'listing':
while ($orders = $_query->fetchAssoc()) {
- $ord['oID']=$orders['orders_id'];
- $ord['orders_id']=$orders['orders_prefix'].$orders['orders_id'];
- $ord['customers_id']=tep_customers_row_action($orders['customers_id'], array('origin'=>self::FILENAME));
- $ord['order_total']=strip_tags($orders['order_total']);
- $ord['date_purchased']=tep_datetime_short($orders['date_purchased']);
- $ord['payment_method']=$orders['payment_method'];
- $ord['orders_status_name']=sprintf( CsrtAction::getFormat('type_color'), $orders['orders_status_color'], $orders['orders_status_name'] );
- $ord[0]=$orders['orders_id'];
- $ord[1]=tep_draw_checkbox_field('action_multi['.$orders['orders_id'].']','action_mutli_'.$orders['orders_id'],$orders['orders_id']);
- $ord['action']=self::get_item_action($ord);
- $res[]=$ord;
+ $ord=$orders;
+ $ord['oID']=$orders['orders_id'];
+
+ if(isset($orders['orders_id']))$ord['orders_id']=$orders['orders_prefix'].$orders['orders_id'];
+ if(isset($orders['customers_id'])) $ord['customers_id']=tep_customers_row_action($orders['customers_id'], array('origin'=>self::FILENAME));
+ if(isset($orders['order_total'])) $ord['order_total']=strip_tags($orders['order_total']);
+ if(isset($orders['date_purchased'])) $ord['date_purchased']=tep_datetime_short($orders['date_purchased']);
+ if(isset($orders['last_modified'])) $ord['last_modified']=tep_datetime_short($orders['last_modified']);
+ if(isset($orders['payment_method'])) $ord['payment_method']=$orders['payment_method'];
+ if(isset($orders['orders_status_name'])) $ord['orders_status_name']=sprintf( CsrtAction::getFormat('type_color'), $orders['orders_status_color'], $orders['orders_status_name'] );
+
+ $ord[0]=$orders['orders_id'];
+ $ord[1]=tep_draw_checkbox_field('action_multi['.$orders['orders_id'].']','action_mutli_'.$orders['orders_id'],$orders['orders_id']);
+ $ord['action']=self::get_item_action($ord);
+ $res[]=$ord;
}
break;
}
Modified: trunk/catalog/admin/includes/modules/rapport/products_purchased.php
===================================================================
--- trunk/catalog/admin/includes/modules/rapport/products_purchased.php 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/modules/rapport/products_purchased.php 2012-04-29 17:43:07 UTC (rev 4341)
@@ -67,12 +67,12 @@
*/
public function check_action($actions){
- $_SESSION['filters']['allfields'] =array();
+ $_SESSION['filters'][__CLASS__]['allfields'] =array();
foreach($_POST['allfields'] as $key=>$row){
if( $row =='on' )
- $_SESSION['filters']['allfields'][$key] = 'on';
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
else
- unset($_SESSION['filters']['allfields'][$key]);
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
}
}
@@ -85,11 +85,20 @@
$this->allfields = array(
'p.products_id' => __('products_purchased table heading number'),
'p.products_type' => __('products_purchased table heading type'),
- 'p.products_model' => __('products_purchased table heading model'),
+ 'p.products_model' =>array(
+ 'text'=> __('products_purchased table heading model'),
+ 'default'=>true,
+ ),
'p.products_status' => __('products_purchased table heading status'),
'p.products_tax_class_id' => __('products_purchased table heading tax class id'),
- 'pd.products_name' => __('products_purchased table heading products'),
- 'p.products_ordered' => __('products_purchased table heading purchased'),
+ 'pd.products_name' =>array(
+ 'text'=> __('products_purchased table heading products'),
+ 'default'=>true,
+ ),
+ 'p.products_ordered' =>array(
+ 'text'=> __('products_purchased table heading purchased'),
+ 'default'=>true,
+ ),
);
if((DataTypes::is_active('manufacturer')))
@@ -97,20 +106,28 @@
$this->allfields['m.manufacturers_name'] = __('products_purchased table heading manufacturer');
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+ $in_session = $_SESSION['filters']['allfields'];
+
$listfield = '';
foreach($this->allfields as $key=>$row){
$clean = substr($key, (strpos($key, '.')+1));
if(
- ( isset($_SESSION['filters']['allfields'][$clean]) && (string)$_SESSION['filters']['allfields'][$clean] == 'on' )
- || count($_SESSION['filters']['allfields']) <=1
+ ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
) {
+ $_SESSION['filters']['allfields'][$clean] = 'on';
+
/**
@remarks this define col theader title, and ajust html code
*/
- $this->listing['theader'][]= array( 'txt'=>$row );
+ $this->listing['theader'][]= array( 'txt'=> (is_array($row)? $row['text'] : $row ) );
/**
@remarks this define col in table, and if is possible sort
*/
Modified: trunk/catalog/admin/includes/modules/rapport/products_viewed.php
===================================================================
--- trunk/catalog/admin/includes/modules/rapport/products_viewed.php 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/modules/rapport/products_viewed.php 2012-04-29 17:43:07 UTC (rev 4341)
@@ -69,12 +69,12 @@
*/
public function check_action($actions){
- $_SESSION['filters']['allfields'] =array();
+ $_SESSION['filters'][__CLASS__]['allfields'] =array();
foreach($_POST['allfields'] as $key=>$row){
if( $row =='on' )
- $_SESSION['filters']['allfields'][$key] = 'on';
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
else
- unset($_SESSION['filters']['allfields'][$key]);
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
}
@@ -89,12 +89,24 @@
$this->allfields = array(
'p.products_id' => __('products_viewed table heading number'),
'p.products_type' => __('products_viewed table heading type'),
- 'p.products_model' => __('products_viewed table heading model'),
+ 'p.products_model' => array(
+ 'text'=>__('products_viewed table heading model'),
+ 'default'=>true,
+ ),
'p.products_status' => __('products_viewed table heading status'),
'p.products_tax_class_id' => __('products_viewed table heading tax class id'),
- 'pd.products_name' => __('products_viewed table heading products'),
- 'pd.products_viewed' => __('products_viewed table heading viewed'),
- 'l.name' => __('products_viewed table heading language'),
+ 'pd.products_name' =>array(
+ 'text'=> __('products_viewed table heading products'),
+ 'default'=>true,
+ ),
+ 'pd.products_viewed' => array(
+ 'text'=>__('products_viewed table heading viewed'),
+ 'default'=>true,
+ ),
+ 'l.name' =>array(
+ 'text'=> __('products_viewed table heading language'),
+ 'default'=>true,
+ ),
);
if((DataTypes::is_active('manufacturer')))
@@ -103,22 +115,28 @@
- /**
- @remarks Define col based on session array det filter
- */
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+
$listfield = '';
foreach($this->allfields as $key=>$row){
$clean = substr($key, (strpos($key, '.')+1));
if(
- ( isset($_SESSION['filters']['allfields'][$clean]) && (string)$_SESSION['filters']['allfields'][$clean] == 'on' )
- || count($_SESSION['filters']['allfields']) <=1
+ ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
) {
+ $_SESSION['filters']['allfields'][$clean] = 'on';
+
/**
@remarks this define col theader title, and ajust html code
*/
- $this->listing['theader'][]= array( 'txt'=>$row );
+ $this->listing['theader'][]= array( 'txt'=> (is_array($row)? $row['text'] : $row ) );
/**
@remarks this define col in table, and if is possible sort
*/
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-04-28 22:37:06 UTC (rev 4340)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-04-29 17:43:07 UTC (rev 4341)
@@ -573,6 +573,41 @@
+
+/* Listing Filter for Datatable */
+form#filters {padding:0 1em;}
+form#filters p.Ctrtirroir { padding: 2px 25px; font-size:1.2; width:95.2%; background-color: #F5F5F5; border-color: #CCCCCC #CCCCCC -moz-use-text-color; border-style: solid solid none; border-width: 1px 1px medium; color: black; font-weight: bold; }
+form#filters p.Ctrtirroir:hover {background-color: #E6FF99;cursor:pointer; }
+form#filters #filtre {padding:0;}
+form#filters #filtre ul.ui-tabs-nav {width:99.6%}
+form#filters #filtre ul.ui-tabs-nav li{line-height:1em;}
+
+
+/* Ext */
+
+#central .dataTables_wrapper {min-height:200px}
+
+/* Toolips */
+
+.tooltip{
+ position:absolute;
+ z-index:999;
+ left:-9999px;
+ background-color:#dedede;
+ padding:5px;
+ border:1px solid #fff;
+ width:250px;
+}
+
+.tooltip p{
+ margin:0;
+ padding:0;
+ color:#fff;
+ background-color:#222;
+ padding:2px 7px;
+}
+
+
/* general Divers */
#content { margin-top: 2em;}
div.separator { height:0; margin:0; padding: 0; clear:both; visibility:hidden;}
@@ -702,31 +737,3 @@
-
-
-
-
-
-/* Ext */
-
-#central .dataTables_wrapper {min-height:200px}
-
-/* Toolips */
-
-.tooltip{
- position:absolute;
- z-index:999;
- left:-9999px;
- background-color:#dedede;
- padding:5px;
- border:1px solid #fff;
- width:250px;
-}
-
-.tooltip p{
- margin:0;
- padding:0;
- color:#fff;
- background-color:#222;
- padding:2px 7px;
-}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-28 22:37:14
|
Revision: 4340
http://oscss.svn.sourceforge.net/oscss/?rev=4340&view=rev
Author: oscim
Date: 2012-04-28 22:37:06 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Ajout prise en charge fonctionnalite de filtre dans les page de rapport qui impact les listing. Mise en oeuvre sur la class ModTwo / ModGab de maniere centralise.
Mise a niveau des rapport products_xx et configuration des colonnes visible
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/MGabCont.php
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_purchased.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_viewed.txt
trunk/catalog/admin/includes/modules/pages/rapport.php
trunk/catalog/admin/includes/modules/rapport/products_purchased.php
trunk/catalog/admin/includes/modules/rapport/products_viewed.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
trunk/catalog/admin/includes/gabarit/rapport/
trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab
Modified: trunk/catalog/admin/includes/classes/MGabCont.php
===================================================================
--- trunk/catalog/admin/includes/classes/MGabCont.php 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/classes/MGabCont.php 2012-04-28 22:37:06 UTC (rev 4340)
@@ -1,9 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 26/04/11, 16:51
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class MGabCont
@@ -98,9 +99,10 @@
Use in gabarit file
*/
public static function CallSt($method,$arg=''){
- if(self::$Name===false) return false;
+ if(self::$Name===false)
+ return false;
- return call_user_func(array(self::$Name, $method), $arg);
+ return @call_user_func(array(self::$Name, $method), $arg);
}
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-28 22:37:06 UTC (rev 4340)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 09/04/2012, 23:11
+ @date 22/04/2012 ,22:50:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -169,7 +169,52 @@
return ((isset(self::$InitInfo['theader'][$action])) ? self::$InitInfo['theader'][$action] : array());
}
+
/**
+ @brief Use in listing dataTable For filter listing
+ @return array
+ 0 => array
+ txt => string text display
+ class => string class css
+ colspan => int
+ width => value width th balise
+ */
+ public static function DFilterModule(){
+ $action=(empty(self::$action)? 'listing' :self::$action);
+ $list = ((isset(self::$InitInfo['tfilter'][$action])) ? self::$InitInfo['tfilter'][$action] : array());
+ $return= array();
+
+ foreach($list as $row){
+ $tp = new stdClass();
+ $tp->title = $row['title'];
+
+ if(isset($row['type']))
+ $tp->content = MGabCont::CallGab($row['type'],'filter',self::MASTER );
+ else
+ $tp->content = $row['content'];
+
+ $return[] = $tp;
+
+ }
+
+ return $return;
+ }
+
+ /**
+ @brief Use in listing dataTable For filter listing
+ @return array
+ 0 => array
+ txt => string text display
+ class => string class css
+ colspan => int
+ width => value width th balise
+ */
+ public static function DFilterAllfields(){
+ $action=(empty(self::$action)? 'listing' :self::$action);
+ return ((isset(self::$InitInfo['allfields'][$action])) ? self::$InitInfo['allfields'][$action] : array());
+ }
+
+ /**
@brief Use in listing dataTable call by ajax Base theader table , for display table
@return array
0 => array
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-04-28 22:37:06 UTC (rev 4340)
@@ -1,13 +1,15 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 11/04/11, 10:34
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+print_r($_SESSION['filters']);
?>
<h3><?php echo __('heading title '.MGabCont::CallSt('GetClassName')); ?></h3>
@@ -17,40 +19,75 @@
<?php endforeach; ?>
</div>
+
<div class="box_uniq ">
- <?php echo tep_draw_form('multi', MGabCont::CallSt('GetFILENAME'), 'action=multi', 'post') ?>
+
+
+ <?php if(count(MGabCont::CallSt('DFilterModule')) > 0): ?>
+ <!-- EOB - Section Filtre // Doit être prise en charge par le mode de page -->
+ <?php echo tep_draw_form('filters', MGabCont::CallSt('GetFILENAME'), 'action=filters', 'post') ?>
+ <div id="filtre" class="tabs">
+ <ul>
+ <?php $i=0; foreach(MGabCont::CallSt('DFilterModule') as $item): ?>
+ <li><a href="#tabfiltre-<?php echo $i++ ?>"><?php echo $item->title ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+
+ <?php $i=0; foreach(MGabCont::CallSt('DFilterModule') as $item): ?>
+ <div id="tabfiltre-<?php echo $i++ ?>">
+ <?php echo $item->content ?></a>
+ </div>
+ <?php endforeach; ?>
+
+ <p class=" button_nav">
+ <?php
+ echo tep_get_all_post_params();
+ echo tep_image_submit('', __('image filters'));
+ ?>
+ </p>
+
+ <br class="clear"/>
+ </div>
+ </form>
+ <!-- END - Section Filtre -->
+ <?php endif; ?>
+
+
+ <?php echo tep_draw_form('multi', MGabCont::CallSt('GetFILENAME'), 'action=multi', 'post') ?>
<table class="dataTable">
- <thead>
- <tr>
- <?php foreach(MGabCont::CallSt('DTheaderTable') as $item): ?>
- <th
- <?php if(isset($item['width'])) echo ' width="'.$item['width'].'"' ?>
- <?php if(isset($item['class'])) echo ' class="'.$item['class'].'"' ?>
- <?php if(isset($item['colspan'])) echo ' colspan="'.$item['colspan'].'"' ?>
- >
- <?php echo $item['txt'] ?>
- </th>
- <?php endforeach; ?>
- </tr>
- </thead>
- <tfoot>
- <?php foreach(MGabCont::CallSt('DTFootTable',true) as $tr => $td): ?>
- <tr>
- <?php foreach($td as $item): ?>
- <th
- <?php if(isset($item['width']) )echo ' width="'.$item['width'].'"' ?>
- <?php if(isset($item['class'])) echo ' class="'.$item['class'].'"' ?>
- <?php if(isset($item['colspan'])) echo ' colspan="'.$item['colspan'].'"' ?>
- >
- <?php echo $item['txt'] ?>
- </th>
- <?php endforeach; ?>
- </tr>
- <?php endforeach; ?>
- </tfoot>
- <tbody>
- <!-- AJAX BLOCK -->
- </tbody>
+ <thead>
+ <tr>
+ <?php foreach(MGabCont::CallSt('DTheaderTable') as $item): ?>
+ <th
+ <?php if(isset($item['width'])) echo ' width="'.$item['width'].'"' ?>
+ <?php if(isset($item['class'])) echo ' class="'.$item['class'].'"' ?>
+ <?php if(isset($item['colspan'])) echo ' colspan="'.$item['colspan'].'"' ?>
+ >
+ <?php echo $item['txt'] ?>
+ </th>
+ <?php endforeach; ?>
+ </tr>
+ </thead>
+
+ <tfoot>
+ <?php foreach(MGabCont::CallSt('DTFootTable',true) as $tr => $td): ?>
+ <tr>
+ <?php foreach($td as $item): ?>
+ <th
+ <?php if(isset($item['width']) )echo ' width="'.$item['width'].'"' ?>
+ <?php if(isset($item['class'])) echo ' class="'.$item['class'].'"' ?>
+ <?php if(isset($item['colspan'])) echo ' colspan="'.$item['colspan'].'"' ?>
+ >
+ <?php echo $item['txt'] ?>
+ </th>
+ <?php endforeach; ?>
+ </tr>
+ <?php endforeach; ?>
+ </tfoot>
+
+ <tbody>
+ <!-- AJAX BLOCK -->
+ </tbody>
</table>
</form>
</div>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-04-28 22:37:06 UTC (rev 4340)
@@ -0,0 +1,19 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 30/04/11, 21:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+ <fieldset>
+ <ul class="inline">
+ <?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item): $clean = substr($k, (strpos($k, '.')+1)); ?>
+ <li><?php echo tep_draw_checkbox_field('allfields['.$clean.']', 'allfields['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?> <?php echo $item ?> </li>
+ <?php endforeach; ?>
+ </ul>
+ </fieldset>
Added: trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab 2012-04-28 22:37:06 UTC (rev 4340)
@@ -0,0 +1,24 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+ <fieldset>
+ <ul>
+Not implemented
+ <li><?php //echo tep_draw_checkbox_field('clause['.$clean.']', 'clause['.$clean.']', 'on', (bool)(count($_SESSION['filters']['clause']) <=1 || (string)$_SESSION['filters']['clause'][$clean] == 'on')); ?> <?php echo __('products_purchased view exclusively products puchased not null') ?> </li>
+
+
+ </ul>
+
+ <p style="">
+ <?php //echo tep_draw_checkbox_field('allfields['.$clean.']', 'allfields['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?> <?php //echo $item ?>
+ </p>
+ </fieldset>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/rapport.txt 2012-04-28 22:37:06 UTC (rev 4340)
@@ -12,6 +12,7 @@
$lang['heading title rapport'] = "Liste des rapports";
$lang['image back'] = "Retour";
+$lang['image filters'] = "Filtrer";
$lang['table heading code'] = "Code";
$lang['table heading name'] = "Titre";
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_purchased.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_purchased.txt 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_purchased.txt 2012-04-28 22:37:06 UTC (rev 4340)
@@ -12,7 +12,25 @@
$lang['products_purchased heading title'] ="Produits les plus achetés" ;
$lang['products_purchased heading description'] ="Les produits les plus achetés" ;
+
$lang['products_purchased table heading number'] ="N°" ;
$lang['products_purchased table heading products'] ="Produits" ;
$lang['products_purchased table heading purchased'] ="Vu" ;
+$lang['products_purchased table heading manufacturer id'] ="Numero du fabricant" ;
+$lang['products_purchased table heading manufacturer'] ="Fabricant" ;
+$lang['products_purchased table heading type'] ="Type" ;
+$lang['products_purchased table heading status'] ="Etat" ;
+$lang['products_purchased table heading tax class id'] ="Taxes" ;
+$lang['products_purchased table heading model'] ="Modéle" ;
+
+
+
+$lang['products_purchased filter tab clause'] ="Filtre" ;
+$lang['products_purchased filter tab fields'] ="Colonnes" ;
+
+$lang['products_purchased view exclusively products puchased not null'] ="Voir aussi les produits jamais vendu" ;
+$lang['products_purchased filter tab fields'] ="Colonnes" ;
+$lang['products_purchased filter tab fields'] ="Colonnes" ;
+$lang['products_purchased filter tab fields'] ="Colonnes" ;
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_viewed.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_viewed.txt 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/rapport/products_viewed.txt 2012-04-28 22:37:06 UTC (rev 4340)
@@ -15,4 +15,12 @@
$lang['products_viewed table heading products'] ="Produits" ;
$lang['products_viewed table heading viewed'] ="Vu" ;
$lang['products_viewed table heading language'] ="Langue" ;
+$lang['products_viewed table heading manufacturer id'] ="Numero du fabricant" ;
+$lang['products_viewed table heading manufacturer'] ="Fabricant" ;
+$lang['products_viewed table heading type'] ="Type" ;
+$lang['products_viewed table heading status'] ="Etat" ;
+$lang['products_viewed table heading tax class id'] ="Taxes" ;
+$lang['products_viewed table heading model'] ="Modéle" ;
+
+$lang['products_viewed filter tab fields'] ="Filtre" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/rapport.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/rapport.php 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/modules/pages/rapport.php 2012-04-28 22:37:06 UTC (rev 4340)
@@ -117,15 +117,15 @@
@remarks this define menu master module in page
*/
if( self::$action =='view'){
- global $query_numrows, $oscss, $language;
+ global $query_numrows, $oscss, $language;
- $name = self::$Id;
- include_once(DIR_FS_ADMIN .DIR_WS_MODULES.'rapport/'.self::$Id.'.php');
+ $name = self::$Id;
+ include_once(DIR_FS_ADMIN .DIR_WS_MODULES.'rapport/'.self::$Id.'.php');
- $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/rapport/'.self::$Id.'.txt');
- self::$Info = $new = new $name();
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/rapport/'.self::$Id.'.txt');
+ self::$Info = $new = new $name();
- $new->load_db_values(0);
+ $new->load_db_values(0);
/**
@remarks this define col theader title, and ajust html code
@@ -133,6 +133,8 @@
*/
self::$InitInfo['theader']['view']=$new->listing['theader'];
+
+
/**
@remarks this define col in table, and if is possible sort
Just for Edit listing
@@ -141,6 +143,19 @@
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$InitInfo['allfields']['view']=$new->listing['allfields'];
+
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$InitInfo['tfilter']['view']=$new->listing['tfilter'];
+
self::$InitInfo['MenuModule'][]=array(
'type'=>'getLink',
'format'=>'button_nav',
@@ -169,8 +184,23 @@
global $messageStack;
self::$action=$actions;
+ switch (self::$action) {
+ case 'filters':
- switch (self::$action) {
+ global $query_numrows, $oscss, $language;
+
+ $name = self::$Id;
+ include_once(DIR_FS_ADMIN .DIR_WS_MODULES.'rapport/'.self::$Id.'.php');
+
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/rapport/'.self::$Id.'.txt');
+ self::$Info = $new = new $name();
+
+ $new->load_db_values(0);
+
+ $new->check_action(self::$action);
+
+ tep_redirect(tep_href_link(self::FILENAME, 'cID='.$_POST['cID'].'&action=view'));
+ break;
default:
}
Modified: trunk/catalog/admin/includes/modules/rapport/products_purchased.php
===================================================================
--- trunk/catalog/admin/includes/modules/rapport/products_purchased.php 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/modules/rapport/products_purchased.php 2012-04-28 22:37:06 UTC (rev 4340)
@@ -41,6 +41,10 @@
@var boolean true/false
*/
public $enabled;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public $allfields = array();
/**
@brief class constructor
@@ -62,6 +66,15 @@
/**
*/
public function check_action($actions){
+
+ $_SESSION['filters']['allfields'] =array();
+ foreach($_POST['allfields'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters']['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters']['allfields'][$key]);
+ }
+
}
/**
@@ -69,32 +82,71 @@
*/
function load_db_values ($id) {
- /**
- @remarks this define col theader title, and ajust html code
- Just for Edit listing
- */
- $this->listing['theader']=array(
- array('width'=>'5%','class'=>'tcenter', 'txt'=>__('products_purchased table heading number') ) ,
- array('width'=>'70%','class'=>'tcenter', 'txt'=>__('products_purchased table heading products') ) ,
- array('width'=>'10%','class'=>'tcenter', 'txt'=>__('products_purchased table heading purchased') ),
- );
+ $this->allfields = array(
+ 'p.products_id' => __('products_purchased table heading number'),
+ 'p.products_type' => __('products_purchased table heading type'),
+ 'p.products_model' => __('products_purchased table heading model'),
+ 'p.products_status' => __('products_purchased table heading status'),
+ 'p.products_tax_class_id' => __('products_purchased table heading tax class id'),
+ 'pd.products_name' => __('products_purchased table heading products'),
+ 'p.products_ordered' => __('products_purchased table heading purchased'),
+ );
+ if((DataTypes::is_active('manufacturer')))
+ $this->allfields['m.manufacturers_id'] = __('products_purchased table heading manufacturer id');
+ $this->allfields['m.manufacturers_name'] = __('products_purchased table heading manufacturer');
+
+
+
+ $listfield = '';
+ foreach($this->allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(
+ ( isset($_SESSION['filters']['allfields'][$clean]) && (string)$_SESSION['filters']['allfields'][$clean] == 'on' )
+ || count($_SESSION['filters']['allfields']) <=1
+ ) {
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ */
+ $this->listing['theader'][]= array( 'txt'=>$row );
+ /**
+ @remarks this define col in table, and if is possible sort
+ */
+ $this->listing['modele'][$key]=true;
+ $listfield .=$key.',';
+
+ }
+ }
+
+ $this->listing['allfields'] = $this->allfields ;
+
/**
@remarks this define col in table, and if is possible sort
- Just for Edit listing
+ Just for Filter listing
*/
- $this->listing['modele']=array(
- 'products_id'=>true,
- 'products_name' =>true,
- 'products_ordered'=>true,
- );
+ $this->listing['tfilter']=array(
+// array(
+// 'title'=>__('products_purchased filter tab clause'),
+// 'content' => tep_get_include_contents('rapport/filter.'.__CLASS__.''),
+// ),
+ array(
+ 'title'=>__('products_purchased filter tab fields'),
+ 'type'=>'listfield'
+ ),
+ );
+
global $languages_id;
- $this->query['select'] = " p.products_id, p.products_ordered, pd.products_name ";
- $this->query['tables'] = " " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd ";
- $this->query['where'] = " pd.products_id = p.products_id and pd.language_id = '" . $languages_id. "' and p.products_ordered > 0 ";
+ $this->query['select'] = substr($listfield,0,-1);
+ $this->query['tables'] = " " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON(pd.products_id = p.products_id and pd.language_id = '" . $languages_id. "') ";
+ if((DataTypes::is_active('manufacturer')))
+ $this->query['tables'] .= " LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (m.manufacturers_id = p.manufacturers_id) ";
+
+ $this->query['where'] = " 1 "; //" p.products_ordered > 0 ";
$this->query['groupby'] = " pd.products_id ";
$this->query['orderby'] = " p.products_ordered DESC, pd.products_name ";
@@ -113,7 +165,7 @@
$ord[$k]= '<a href="'.tep_href_link(FILENAME_CUSTOMERS, 'action=noedit&cID='.$item[$k]).'" >'.$item[$k].'</a>';
elseif($k == 'customers_email_address')
$ord[$k]= '<a href="'.tep_href_link(FILENAME_MAIL, 'origin='.urlencode(FILENAME_RAPPORT.'?cID='.__CLASS__.'&action=view').'&customer='.$item[$k]).'" >'.$item[$k].'</a>';
- else $ord[$k]=$item[$k];
+ else $ord[$k]=$item[substr($k,(strpos($k,'.')+1))];
}
Modified: trunk/catalog/admin/includes/modules/rapport/products_viewed.php
===================================================================
--- trunk/catalog/admin/includes/modules/rapport/products_viewed.php 2012-04-28 17:36:02 UTC (rev 4339)
+++ trunk/catalog/admin/includes/modules/rapport/products_viewed.php 2012-04-28 22:37:06 UTC (rev 4340)
@@ -42,7 +42,12 @@
@var boolean true/false
*/
public $enabled;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public $allfields = array();
+
/**
@brief class constructor
*/
@@ -63,6 +68,16 @@
/**
*/
public function check_action($actions){
+
+ $_SESSION['filters']['allfields'] =array();
+ foreach($_POST['allfields'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters']['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters']['allfields'][$key]);
+ }
+
+
}
/**
@@ -70,32 +85,73 @@
*/
function load_db_values ($id) {
+
+ $this->allfields = array(
+ 'p.products_id' => __('products_viewed table heading number'),
+ 'p.products_type' => __('products_viewed table heading type'),
+ 'p.products_model' => __('products_viewed table heading model'),
+ 'p.products_status' => __('products_viewed table heading status'),
+ 'p.products_tax_class_id' => __('products_viewed table heading tax class id'),
+ 'pd.products_name' => __('products_viewed table heading products'),
+ 'pd.products_viewed' => __('products_viewed table heading viewed'),
+ 'l.name' => __('products_viewed table heading language'),
+ );
+
+ if((DataTypes::is_active('manufacturer')))
+ $this->allfields['m.manufacturers_id'] = __('products_viewed table heading manufacturer id');
+ $this->allfields['m.manufacturers_name'] = __('products_viewed table heading manufacturer');
+
+
+
/**
- @remarks this define col theader title, and ajust html code
- Just for Edit listing
+ @remarks Define col based on session array det filter
*/
- $this->listing['theader']=array(
- array('width'=>'5%','class'=>'tcenter', 'txt'=>__('products_viewed table heading number') ) ,
- array('width'=>'70%','class'=>'tcenter', 'txt'=>__('products_viewed table heading products') ) ,
- array('width'=>'10%','class'=>'tcenter', 'txt'=>__('products_viewed table heading viewed') ),
- array('width'=>'5%','class'=>'tcenter', 'txt'=>__('products_viewed table heading language') ),
- );
+ $listfield = '';
+ foreach($this->allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+ if(
+ ( isset($_SESSION['filters']['allfields'][$clean]) && (string)$_SESSION['filters']['allfields'][$clean] == 'on' )
+ || count($_SESSION['filters']['allfields']) <=1
+ ) {
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ */
+ $this->listing['theader'][]= array( 'txt'=>$row );
+ /**
+ @remarks this define col in table, and if is possible sort
+ */
+ $this->listing['modele'][$key]=true;
+ $listfield .=$key.',';
+
+ }
+ }
+
+
+ $this->listing['allfields'] = $this->allfields ;
+
/**
@remarks this define col in table, and if is possible sort
- Just for Edit listing
+ Just for Filter listing
*/
- $this->listing['modele']=array(
- 'products_id'=>true,
- 'products_name' =>true,
- 'products_viewed'=>true,
- 'name'=>false,
- );
+ $this->listing['tfilter']=array(
+ array(
+ 'title'=>__('products_viewed filter tab fields'),
+ 'type'=>'listfield'
+ ),
+ );
- $this->query['select'] = " p.products_id, pd.products_name, pd.products_viewed, l.name ";
- $this->query['tables'] = " " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l ";
- $this->query['where'] = " p.products_id = pd.products_id and l.languages_id = pd.language_id ";
+ $this->query['select'] = substr($listfield,0,-1);
+ $this->query['tables'] = " " . TABLE_PRODUCTS . " p ";
+ $this->query['tables'] .= " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON(pd.products_id = p.products_id ) ";
+ $this->query['tables'] .= " LEFT JOIN " . TABLE_LANGUAGES . " l ON(l.languages_id = pd.language_id) ";
+ if((DataTypes::is_active('manufacturer')))
+ $this->query['tables'] .= " LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (m.manufacturers_id = p.manufacturers_id) ";
+
+ $this->query['where'] = " 1 ";
+
$this->query['orderby'] = " pd.products_viewed DESC";
}
@@ -109,7 +165,8 @@
function FormatDBValue($item) {
$ord = array();
foreach($this->listing['modele'] as $k=>$r){
- $ord[$k]=$item[$k];
+ $clean = substr($k,(strpos($k,'.')+1));
+ $ord[$k]=$item[$clean];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-28 17:36:08
|
Revision: 4339
http://oscss.svn.sourceforge.net/oscss/?rev=4339&view=rev
Author: oscim
Date: 2012-04-28 17:36:02 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
mise a niveau du fichier de version
Modified Paths:
--------------
trunk/catalog/Documents/oscss.version.xml
Modified: trunk/catalog/Documents/oscss.version.xml
===================================================================
--- trunk/catalog/Documents/oscss.version.xml 2012-04-28 17:35:37 UTC (rev 4338)
+++ trunk/catalog/Documents/oscss.version.xml 2012-04-28 17:36:02 UTC (rev 4339)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<core>
<version>2.1.1 (beta)</version>
- <svn>4031</svn>
+ <svn>4335</svn>
<level>unstable</level>
<template_admin>oscss</template_admin>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-28 17:35:47
|
Revision: 4338
http://oscss.svn.sourceforge.net/oscss/?rev=4338&view=rev
Author: oscim
Date: 2012-04-28 17:35:37 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Correction coquille, mise a niveau du code, ajout de commentaires
Control fonctionnement et ajustement comportement stock sans attribut des produit
correction des order_total concernant leur prise en charge en sous total dans le panier
report de l'usage des delinaison de la key dans l'affichage des titre et description des vars de configuration associ?\195?\169 au differents modules
Mise a niveau de ot_shipping et deport de la section configuration dans un module jumeau du BO
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/configUtility.php
trunk/catalog/admin/includes/classes/modulesUtility.php
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
trunk/catalog/common/classes/shoppingCart.php
trunk/catalog/includes/classes/Stock.php
trunk/catalog/includes/classes/drivers/data/product.php
trunk/catalog/includes/modules/order_total/ot_shipping.php
trunk/catalog/includes/modules/order_total/ot_tax.php
trunk/catalog/includes/triggers/cart_line.inc
trunk/catalog/templates/defaut/Childs_tpl/module.php
trunk/catalog/templates/defaut/includes/content/shopping_cart.php
Modified: trunk/catalog/admin/includes/classes/configUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/configUtility.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/admin/includes/classes/configUtility.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -1,10 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/09/11, 09:55
+ @date 26/04/2012, 09:55
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief class librairie for config action
@@ -41,8 +41,8 @@
else
foreach($value_array['array'] as $key=>$value){
- $keys =sprintf( ($use_format !=false && isset($use_format['label'])? $use_format['label'] : '<label>%s</label>' ) , $value['title']);
- $keys .=sprintf( ($use_format !=false && isset($use_format['description'])? $use_format['description'] : '%s' ) , $value['description']);
+ $keys =sprintf( ($use_format !=false && isset($use_format['label'])? $use_format['label'] : '<label>%s</label>' ) , __($value['title']));
+ $keys .=sprintf( ($use_format !=false && isset($use_format['description'])? $use_format['description'] : '%s' ) , __($value['description']) );
$key2 =self::CallExecConfigLine($value['set_function'], $key, $value['value']);
$keys .=sprintf( ($use_format !=false && isset($use_format['value_edit'])? $use_format['value_edit'] : '<span class="value_edit">%s</span>' ) , $key2);
Modified: trunk/catalog/admin/includes/classes/modulesUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/modulesUtility.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/admin/includes/classes/modulesUtility.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -1,10 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 23/10/11, 17:20
+ @date 26/04/2012, 09:55
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modulesUtility
@@ -19,16 +19,16 @@
protected function __construct(){
self::$pathType['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'process/');
- self::$pathType['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/');
- self::$pathType['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/');
- self::$pathType['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/');
- self::$pathType['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
- self::$pathType['products']=array('key'=>'MODULE_ACAPRO_INSTALLED', 'value'=>MODULE_ACAPRO_INSTALLED,'key_BO'=>'MODULE_ACAPRO_INSTALLED_BO', 'value_BO'=>MODULE_ACAPRO_INSTALLED_BO,'module_directory'=> 'products/','module_language'=>DIR_FS_ADMIN.'includes/languages/' );
- self::$pathType['content']=array('key'=>'MODULE_CONTENT_INSTALLED', 'value'=>MODULE_CONTENT_INSTALLED, 'key_BO'=>'MODULE_CONTENT_INSTALLED_BO', 'value_BO'=>MODULE_CONTENT_INSTALLED_BO,'module_directory'=>'content/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
- self::$pathType['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
- self::$pathType['account']=array('key'=>'MODULE_ACCOUNT_INSTALLED', 'value'=>MODULE_ACCOUNT_INSTALLED,'key_BO'=>'MODULE_ACCOUNT_INSTALLED_BO', 'value_BO'=>MODULE_ACCOUNT_INSTALLED_BO,'module_directory'=> 'account/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
- self::$pathType['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
- self::$pathType['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
+// self::$pathType['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/');
+// self::$pathType['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/');
+// self::$pathType['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/');
+// self::$pathType['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
+// self::$pathType['products']=array('key'=>'MODULE_ACAPRO_INSTALLED', 'value'=>MODULE_ACAPRO_INSTALLED,'key_BO'=>'MODULE_ACAPRO_INSTALLED_BO', 'value_BO'=>MODULE_ACAPRO_INSTALLED_BO,'module_directory'=> 'products/','module_language'=>DIR_FS_ADMIN.'includes/languages/' );
+// self::$pathType['content']=array('key'=>'MODULE_CONTENT_INSTALLED', 'value'=>MODULE_CONTENT_INSTALLED, 'key_BO'=>'MODULE_CONTENT_INSTALLED_BO', 'value_BO'=>MODULE_CONTENT_INSTALLED_BO,'module_directory'=>'content/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
+// self::$pathType['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
+// self::$pathType['account']=array('key'=>'MODULE_ACCOUNT_INSTALLED', 'value'=>MODULE_ACCOUNT_INSTALLED,'key_BO'=>'MODULE_ACCOUNT_INSTALLED_BO', 'value_BO'=>MODULE_ACCOUNT_INSTALLED_BO,'module_directory'=> 'account/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
+// self::$pathType['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
+// self::$pathType['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
}
@@ -50,16 +50,26 @@
if(isset(self::$pathType[$type]))
return new objectInfo(self::$pathType[$type]);
else
+ return new objectInfo(
+ array(
+ 'key'=>'MODULE_'.strtoupper($type).'_INSTALLED',
+ 'value'=>(defined('MODULE_'.strtoupper($type).'_INSTALLED')? constant('MODULE_'.strtoupper($type).'_INSTALLED') : ''),
+ 'key_BO'=>'MODULE_'.strtoupper($type).'_INSTALLED_BO',
+ 'value_BO'=>(defined('MODULE_'.strtoupper($type).'_INSTALLED_BO')? constant('MODULE_'.strtoupper($type).'_INSTALLED_BO') : ''),
+ 'module_directory'=>$type.'/',
+ 'module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES
+ )
+ );
return false;
}
/**
- @fn
+ @fn GetModule($type, $filename)
@brief
- @param
- @param
+ @param $type
+ @param $filename
*/
static public function GetModule($type, $filename){
self::getInstance();
@@ -103,7 +113,7 @@
$r->detail = self::info_module($filename,DIR_FS_CATALOG.DIR_WS_MODULES.$dt->module_directory, DIR_FS_ADMIN.DIR_WS_MODULES.$dt->module_directory, '.php');
-
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/'.$type . '/' .$r->detail->filelg.'.txt');
$oscss->pile_file_lang(DIR_FS_CATALOG.DIR_WS_LANGUAGES.$language.'/modules/'.$type . '/' .$r->detail->filelg.'.txt');
include_once($r->detail->path.$r->detail->filemod);
@@ -111,7 +121,7 @@
if (class_exists($r->detail->classe)) {
$module = new $r->detail->classe;
- $r->content = $module;
+ $r->content = $module;
}
}
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt 2012-04-28 17:35:37 UTC (rev 4338)
@@ -22,7 +22,6 @@
$lang['modexpedition legend other']="Autres" ;
-
$lang['modexpedition heading zone shipping']="Zones de livraison" ;
$lang['modexpedition heading modules shipping']="Modules de livraison" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2012-04-28 17:35:37 UTC (rev 4338)
@@ -23,6 +23,8 @@
$lang['modorder heading modules orders']="les modules qui construisent les differentes ligne de sous total d'une commande / facture. " ;
+$lang['modorder heading Configuration du modules'] = "Detail de la configuration du module " ;
+
$lang['table heading module code']="Nom" ;
$lang['table heading module title']="Description" ;
$lang['table heading module desc']="crée/modifié" ;
Modified: trunk/catalog/common/classes/shoppingCart.php
===================================================================
--- trunk/catalog/common/classes/shoppingCart.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/common/classes/shoppingCart.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -499,57 +499,58 @@
$products = $this->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
- $pid = tep_get_prid($products[$i]['id']);
- // Push all attributes information in an array
- if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
- while (list($option, $value) = each($products[$i]['attributes'])) {
- $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_options_values_url
- from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
- where pa.products_id = '" . $pid . "'
- and pa.options_id = '" . $option . "'
- and pa.options_id = popt.products_options_id
- and pa.options_values_id = '" . $value . "'
- and pa.options_values_id = poval.products_options_values_id
- and popt.language_id = '" . $languages_id . "'
- and poval.language_id = '" . $languages_id . "'");
- $attributes_values = tep_db_fetch_array($attributes);
- if(isset($products[$i]['attributes_values'][$option]) ) {
- /* Specifique option type texte / file champ personnalisé par le client */
- $hidden .=tep_draw_hidden_field('Valueid[' . $products[$i]['id'] . '][' . $option . ']', $value);
- $hidden .=tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']', $products[$i]['attributes_values'][$option]);
- $products[$i][$option]['products_options_values_name'] = '('.$products[$i]['attributes_values'][$option].')';
- } else{
- $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
- $hidden .=tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
- }
- $products[$i][$option]['options_values_id'] = $value;
- $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
- $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
- $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
- $products[$i][$option]['img_url'] = $attributes_values['products_options_values_url'];
+ $pid = tep_get_prid($products[$i]['id']);
+ // Push all attributes information in an array
+ if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
+ while (list($option, $value) = each($products[$i]['attributes'])) {
+ $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_options_values_url
+ from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
+ where pa.products_id = '" . $pid . "'
+ and pa.options_id = '" . $option . "'
+ and pa.options_id = popt.products_options_id
+ and pa.options_values_id = '" . $value . "'
+ and pa.options_values_id = poval.products_options_values_id
+ and popt.language_id = '" . $languages_id . "'
+ and poval.language_id = '" . $languages_id . "'");
+ $attributes_values = tep_db_fetch_array($attributes);
- }
- }
+ if(isset($products[$i]['attributes_values'][$option]) ) {
+ /* Specifique option type texte / file champ personnalisé par le client */
+ $hidden .=tep_draw_hidden_field('Valueid[' . $products[$i]['id'] . '][' . $option . ']', $value);
+ $hidden .=tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']', $products[$i]['attributes_values'][$option]);
+ $products[$i][$option]['products_options_values_name'] = '('.$products[$i]['attributes_values'][$option].')';
+ } else{
+ $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
+ $hidden .=tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
+ }
+ $products[$i][$option]['options_values_id'] = $value;
+ $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
+ $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
+ $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
+ $products[$i][$option]['img_url'] = $attributes_values['products_options_values_url'];
- $products[$i]['alert_stock'] = '';
- //! Stock check
- if( _cst_bool('STOCK_CHECK') )
- if( Stock::check_inline($products[$i]) ) {
- $any_out_of_stock = 1;
- $products[$i]['alert_stock'] = Stock::mark_inline();
- }
+ }
+ }
- if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
- reset($products[$i]['attributes']);
- while (list($option, $value) = each($products[$i]['attributes'])) {
- $products[$i]['name'] .= "<br />".'<span class="cartAttributes"> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</span>';
- if(tep_not_null($products[$i][$option]['img_url']))
- $products[$i]['image'] = '<a class="tn" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i][$option]['img_url'], $products[$i]['name'], $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')) . '</a>';
- }
- }
- //! modification par les modules order total
- $products[$i]=$this->process_cart($products[$i]);
+ $products[$i]['alert_stock'] = '';
+ //! Stock check
+ if( _cst_bool('STOCK_CHECK') )
+ if( Stock::check_inline($products[$i]) ) {
+ $any_out_of_stock = 1;
+ $products[$i]['alert_stock'] = Stock::mark_inline();
+ }
+
+ if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
+ reset($products[$i]['attributes']);
+ while (list($option, $value) = each($products[$i]['attributes'])) {
+ $products[$i]['name'] .= "<br />".'<span class="cartAttributes"> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</span>';
+ if(tep_not_null($products[$i][$option]['img_url']))
+ $products[$i]['image'] = '<a class="tn" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i][$option]['img_url'], $products[$i]['name'], $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')) . '</a>';
+ }
+ }
+ //! modification par les modules order total
+ $products[$i]=$this->process_cart($products[$i]);
}
}
$this->DC->products=$products;
@@ -559,8 +560,8 @@
}
/**
- \brief Init base module actif pour la page shopping_cart
- Intervention boucle definiton des produits
+ @brief Init base module actif pour la page shopping_cart
+ Intervention boucle definiton des produits
*/
private function process_cart($product){
$this->init_ot();
@@ -584,6 +585,7 @@
$this->ListTotal = strip_tags($this->show_total());
foreach($this->otm->_extents('show_list_total') as $k=>$mod){
+
$list[]=$mod;
}
return $list;
@@ -593,6 +595,10 @@
/**
+ @fn generate_cart_id($length = 5)
+ @brief generate uniq id for current cart
+ @param $length int lang for random value
+ @return string random value
*/
private function generate_cart_id($length = 5) {
return tep_create_random_value($length, 'digits');
Modified: trunk/catalog/includes/classes/Stock.php
===================================================================
--- trunk/catalog/includes/classes/Stock.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/includes/classes/Stock.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -15,42 +15,47 @@
class Stock {
/**
- @a string
+ @var $marck string
*/
private static $marck;
+
+ /**
+ @brief constructor
+ */
public function __construct(){
}
/**
- * \fn check_inline($product)
- * \brief Control d'une ligne de stock, utilisable dans les boucle produits
- * @param $product \a array (quantity, id, track_stock, attributes)
- * @return bool
- \li false = ok
- \li true = alert
+ @fn check_inline($product)
+ @brief Control d'une ligne de stock, utilisable dans les boucle produits
+ la aleur de stock fournis correspond à la demande de destock
+ @param $product array (quantity, id, track_stock, attributes)
+ @return bool
+ false = ok
+ true = alert
*/
public static function check_inline($product){
$attributes= (is_array($product['attributes']) ? $product['attributes'] : array() );
switch($product['track_stock']) {
case 0: /// no check stock
- self::$marck=0;
+ self::$marck=0;
break;
case 2: /// no check stock , product dispo sur commande
- self::$marck=1;
+ self::$marck=1;
break;
case 1: /// check stock
default:
- self::$marck=( ((tep_get_products_stock($product['id'],$attributes) - $product['quantity'] ) < 0)? 2 : 0);
+ self::$marck=( ((tep_get_products_stock($product['id'],$attributes) - $product['quantity'] ) < 0)? 2 : 0);
}
return (in_array(self::$marck, array(2,1) ) )? true : false;
}
/**
- \fn mark_inline()
- \brief Sortie visuel alert stock / hors stock
+ @fn mark_inline()
+ @brief Sortie visuel alert stock / hors stock
A utiliser apres l'appel de la methode check_inline
*/
public static function mark_inline(){
@@ -61,8 +66,9 @@
/**
- Control complet
- @return bool
+ @fn check_cart()
+ @brief Control complet
+ @return boolean
false = erreur
true = ok
*/
@@ -73,11 +79,11 @@
if (_cst_bool('STOCK_CHECK')) {
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
- $any_out_of_stock = self::check_inline($products[$i]);
+ $any_out_of_stock = self::check_inline($products[$i]);
}
// Out of Stock Et achat hors stock non autorisé
if (!_cst_bool('STOCK_ALLOW_CHECKOUT') && ($any_out_of_stock == true) ) {
- return false;
+ return false;
}
}
return true;
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -206,36 +206,37 @@
$tabl=$product=array();
while ($content = $content_query->fetchAssoc()) {
if (!in_array($content['products_name'],$exclude)) {
- $product=$content;
- $product['href']=tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $content['products_id'] );
- $product['key']=$content['products_id'];
- $product['id']=$content['products_id'];
- $product['title']=(tep_not_null($content['products_model'])?$content['products_model']:$content['products_name']);
- $product['name']=$content['products_name'];
+ $product=$content;
+ $product['href']=tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $content['products_id'] );
+ $product['key']=$content['products_id'];
+ $product['id']=$content['products_id'];
+ $product['title']=(tep_not_null($content['products_model'])?$content['products_model']:$content['products_name']);
+ $product['name']=$content['products_name'];
- $product['extra']=self::get_extra_product($content['products_id']);
+ $product['extra']=self::get_extra_product($content['products_id']);
- // boolean value If buy possible
- if(_cst_bool('STOCK_CHECK') && !_cst_bool('STOCK_ALLOW_CHECKOUT'))
- $product['action']['buy']=( ((int)$content['products_quantity']>0 && (int)$content['track_stock']===1) || (int)$content['track_stock']!=1)? true : false;
- else
- $product['action']['buy']=true;
+ // boolean value If buy possible
+ if(_cst_bool('STOCK_CHECK') && !_cst_bool('STOCK_ALLOW_CHECKOUT'))
+ $product['action']['buy']=( ((int)$content['products_quantity']>0 && (int)$content['track_stock']===1) || (int)$content['track_stock']!=1)? 'true' : 'false';
+ else
+ $product['action']['buy']= 'true';
- /**
- module aca
- */
- $product=product::get_option_data($product);
- self::$object_data[$content['products_id']]=$tabl[$content['products_id']]=new objectInfo($product);
- self::$array_data[$content['products_id']]=$product;
- self::add_cache($content['products_id']);
+ /**
+ module aca
+ */
+ $product=product::get_option_data($product);
+
+ self::$object_data[$content['products_id']]=$tabl[$content['products_id']]=new objectInfo($product);
+ self::$array_data[$content['products_id']]=$product;
+ self::add_cache($content['products_id']);
}
}
if((count(self::$object_data)>0))
foreach(self::$object_data as $k=>$content)
if (isset($content->name) && !in_array($content->name,$exclude)) {
- if((!empty($search) && strstr($content->name,$search) !=false) || empty($search)) $tabl[$content->id]=$content;
+ if((!empty($search) && strstr($content->name,$search) !=false) || empty($search)) $tabl[$content->id]=$content;
}
return $tabl;
Modified: trunk/catalog/includes/modules/order_total/ot_shipping.php
===================================================================
--- trunk/catalog/includes/modules/order_total/ot_shipping.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/includes/modules/order_total/ot_shipping.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -10,8 +10,34 @@
@brief total shipping
*/
class ot_shipping {
+ /**
+ @var
+ */
public $title;
+ /**
+ @var
+ */
+ public $description;
+ /**
+ @var
+ */
+ public $sort_order;
+ /**
+ @var
+ */
+ public $enabled;
+ /**
+ @var
+ */
+ public $shopping_cart;
+ /**
+ @var
+ */
public $output;
+ /**
+ @var
+ */
+ public $pre_output;
function ot_shipping() {
$this->code = 'ot_shipping';
@@ -56,18 +82,20 @@
if ( !_cst_bool('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING')){
$shipping_tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
$shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
- } else {
- $shipping_tax=0;
- $shipping_tax_description='';
+ }
+ else {
+ $shipping_tax=0;
+ $shipping_tax_description='';
}
- $order->info['tax'] += ($order->info['shipping_cost']-$order->info['shipping_cost_ht']);
- @$order->info['tax_groups']["$shipping_tax_description"] += ($order->info['shipping_cost']-$order->info['shipping_cost_ht']);
- $order->info['total'] += $order->info['shipping_cost'];
- $shipping_cost_ht +=$order->info['shipping_cost_ht'];
+ $order->info['tax'] += ($order->info['shipping_cost']-$order->info['shipping_cost_ht']);
+ @$order->info['tax_groups']["$shipping_tax_description"] += ($order->info['shipping_cost']-$order->info['shipping_cost_ht']);
+ $order->info['total'] += $order->info['shipping_cost'];
- $order->info['subtotal_ht'] += $order->info['shipping_cost_ht'];
+ $shipping_cost_ht +=$order->info['shipping_cost_ht'];
+ $order->info['subtotal_ht'] += $order->info['shipping_cost_ht'];
+
$this->output[] = $b=array('title' => $order->info['shipping_method'] . ':',
'text_ht' => $currencies->format($shipping_cost_ht, true, $order->info['currency'], $order->info['currency_value']),
'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
@@ -90,7 +118,6 @@
$ship->quote();
$result=$ship->cheapest();
-
$this->pre_output = new objectInfo(array('text'=>$this->title,
'value'=> $result['cost']
)
@@ -102,29 +129,17 @@
- function check() {
- if (!isset($this->_check)) {
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER'");
- $this->_check = tep_db_num_rows($check_query);
- }
-
- return $this->_check;
- }
-
- function keys() {
- return array( 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION');
- }
-
- function install() {
-
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '2', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '2', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Permettre la livraison gratuite', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false', 'Voulez vous accepter les livraisons gratuites en fonction du montant ?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
-
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Livraison gratuite pour commande au dessus', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Permettre la livraison gratuite pour les commandes au dessus du montant suivant.', '6', '4', 'currencies->format', now())");
-
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Attacher livraison gratuite pour les destinations', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Livraison gratuite pour des commandes envoyés à l\'ensemble des destinations.<br />(both=tous les deux)', '6', '5', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\',\'none\'), ', now())");
- }
-
- function remove() { return false;}
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+ function check() { return false; }
+ function keys() { return array(); }
+ function install() { return false; }
+ function remove() { return false; }
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/modules/order_total/ot_tax.php
===================================================================
--- trunk/catalog/includes/modules/order_total/ot_tax.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/includes/modules/order_total/ot_tax.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -9,9 +9,38 @@
@encode UTF-8
*/
class ot_tax
- implements InterfaceModule, InterfaceAcaOrderTotal{
+ implements
+ InterfaceModule,
+ InterfaceAcaOrderTotal
+ {
+ /**
+ @var
+ */
public $title;
+ /**
+ @var
+ */
+ public $description;
+ /**
+ @var
+ */
+ public $sort_order;
+ /**
+ @var
+ */
+ public $enabled;
+ /**
+ @var
+ */
+ public $shopping_cart;
+ /**
+ @var
+ */
public $output;
+ /**
+ @var
+ */
+ public $pre_output;
public function __construct() {
$this->code = __CLASS__;
@@ -44,21 +73,22 @@
public function show_list_total() {
global $currencies, $cart;
- $value=0;
- foreach($cart->get_products() as $row){
- $value += ($row['total_line_ttc'] - $row['total_line'] );
- }
+ $value=0;
+ foreach($cart->get_products() as $row){
+// print_r($row);
+ $value += ($row['total_line_ttc'] - $row['total_line'] );
+ }
- if ($value > 0) {
- $this->pre_output = new objectInfo(
- array(
- 'text'=>__('ot_tax tot cart taxe'),
- 'value' => $value)
- );
- }
+ if ($value > 0) {
+ $this->pre_output = new objectInfo(
+ array(
+ 'text'=>__('ot_tax tot cart taxe'),
+ 'value' => $value)
+ );
+ }
- return $this->pre_output;
+ return $this->pre_output;
}
Modified: trunk/catalog/includes/triggers/cart_line.inc
===================================================================
--- trunk/catalog/includes/triggers/cart_line.inc 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/includes/triggers/cart_line.inc 2012-04-28 17:35:37 UTC (rev 4338)
@@ -22,7 +22,7 @@
$products_box = $cart->get_products();
foreach($cart->get_products() as $i=>$products_box)
if($cart_id_get == $i)
- $current = $products_box;
+ $current = $products_box;
if(!isset($current) || !is_array($current) || empty($_GET['product_qty']))
return false;
@@ -42,7 +42,7 @@
$current['quantity'] = $product_qty_get;
if( Stock::check_inline($current) ){
$p =product::get_item($current['id']);
- $line['stock'] = Stock::mark_inline();
+ $line['stock'] = Stock::mark_inline();
}
$line['tot_taxe'] = $currencies->format( $products_sum - $proud_ht );
Modified: trunk/catalog/templates/defaut/Childs_tpl/module.php
===================================================================
--- trunk/catalog/templates/defaut/Childs_tpl/module.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/templates/defaut/Childs_tpl/module.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 04/03/2012, 21:54
+ @date 28/04/2012, 19:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -19,9 +19,10 @@
<div class="module">
<section class="module">
+
<?php if($load->module =='child') : ?>
<header>
- <h4 class="module title"><?php echo unhtmlentities($themodule->module_db->title) ;?></h4>
+ <h4 class="module title"><?php echo unhtmlentities($themodule->module_db->title) ;?></h4>
</header>
<?php endif; ?>
@@ -30,12 +31,12 @@
<?php endif; ?>
- <?php /*if ( isset($themodule->module_db->split) && ($themodule->module_db->split->number_of_rows > 0) && (in_array(PREV_NEXT_BAR_LOCATION ,array('1','3') )) ) { ?>
+ <?php if ( isset($themodule->module_db->split) && ($themodule->module_db->split->number_of_rows > 0) && (in_array(PREV_NEXT_BAR_LOCATION ,array('1','3') )) ) { ?>
<div id="splitPageTop" class="splitnav">
- <p class="sP1"><?php echo $themodule->module_db->split->display_count(TEXT_DISPLAY_NUMBER_OF); ?></p>
- <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $themodule->module_db->split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></p>
+ <p class="sP1"><?php echo $themodule->module_db->split->display_count(TEXT_DISPLAY_NUMBER_OF); ?></p>
+ <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $themodule->module_db->split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></p>
</div>
- <?php }*/ ?>
+ <?php } ?>
@@ -45,80 +46,88 @@
<?php if($ele->type =='product'): /** PRODUCTS */ ?>
<li class="one product">
- <section class="outerblock">
- <div class="innerblock">
- <?php if ($page->_draw_in_page('PRODUCT_LIST_NAME')) { ?>
- <p class="title product"><?php echo '<a href="' . $ele->href . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]">' . $ele->products_name . '</a>' ;?></p>
- <?php } ?>
- <?php if ($page->_draw_in_page('PRODUCT_LIST_IMAGE')) { ?>
- <p class="img product"><?php echo '<a href="' . $ele->href . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]" >' . tep_image(DIR_WS_IMAGES . @$ele->products_image, $ele->products_name, $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')) . '</a>' ; ?></p>
- <?php } ?>
+ <section class="outerblock">
+ <div class="innerblock">
+ <?php if ($page->_draw_in_page('PRODUCT_LIST_NAME')) { ?>
+ <p class="title product"><?php echo '<a href="' . $ele->href . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]">' . $ele->products_name . '</a>' ;?></p>
+ <?php } ?>
- <?php if (tep_not_null($ele->products_price) && $page->_draw_in_page('PRODUCT_LIST_PRICE')) { ?>
- <p class="price prod">
- <?php echo print_products_price_rv($ele) ?>
- </p>
- <?php } ?>
+ <?php if ($page->_draw_in_page('PRODUCT_LIST_IMAGE')) { ?>
+ <p class="img product"><?php echo '<a href="' . $ele->href . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]" >' . tep_image(DIR_WS_IMAGES . @$ele->products_image, $ele->products_name, $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')) . '</a>' ; ?></p>
+ <?php } ?>
- <div class="innerblock-more">
- <?php if ( $page->_draw_in_page('PRODUCT_LIST_BUY_NOW')) { ?>
+ <?php if (tep_not_null($ele->products_price) && $page->_draw_in_page('PRODUCT_LIST_PRICE')) { ?>
+ <p class="price prod">
+ <?php echo print_products_price_rv($ele) ?>
+ </p>
+ <?php } ?>
- <?php /** @remarks If buy possible and attribute , force choose attribute */ ?>
+ <div class="innerblock-more">
+ <?php if ( $page->_draw_in_page('PRODUCT_LIST_BUY_NOW')) { ?>
+ <?php /** @remarks If buy possible and attribute , force choose attribute in product_info page */ ?>
- <?php if (_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->products_id)) != 0): ?>
- <p><a class="submitBt" href="<?php echo $ele->href ?>" ><img border="0" class="left_bt" title="" alt="" src="<?php echo $page->getPathTemplate() ?>images/carticon.png"></a></p>
+ <?php if (_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->products_id)) != 0): ?>
+ <p><a class="submitBt" href="<?php echo $ele->href ?>" ><img border="0" class="left_bt" title="" alt="" src="<?php echo $page->getPathTemplate() ?>images/carticon.png"></a></p>
- <?php /** @remarks If buy possible and attribute */ ?>
+ <?php /** @remarks If buy possible */ ?>
+ <?php elseif (_test_bool($ele->action['buy'] )) : ?>
+ <?php echo tep_draw_form($themodule->id.'cart_quantity'.$ele->products_id, tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
+ <p>
+ <?php echo tep_draw_hidden_field('products_id', $ele->products_id). tep_draw_hidden_field('products_quantity', '1'); ?>
+ <input title="header=[<?php echo __('add to cart') ?>] body=[ ] fade=[on]" type="image" src="<?php echo $page->getPathTemplate() ?>images/carticon.png" onclick="this.form.submit()"/>
+ </p>
+ </form>
+ <?php endif; ?>
+ <?php } ?>
- <?php elseif (_test_bool($ele->action['buy'] )) : ?>
- <?php echo tep_draw_form($themodule->id.'cart_quantity'.$ele->products_id, tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
- <p>
- <?php echo tep_draw_hidden_field('products_id', $ele->products_id). tep_draw_hidden_field('products_quantity', '1'); ?>
- <input title="header=[<?php echo __('add to cart') ?>] body=[ ] fade=[on]" type="image" src="<?php echo $page->getPathTemplate() ?>images/carticon.png" onclick="this.form.submit()"/>
- </p>
- </form>
- <?php endif; ?>
- <?php } ?>
+ <a class="details prod" href="<?php echo $ele->href ?>" title="header=[<?php echo __('view more') ?>] body=[ ] fade=[on]"><?php echo __('more') ?></a>
+ </div>
+ </div>
+ </section>
+ </li>
+ <?php elseif($ele->type =='content') : /** POSTS */ ?>
- <a class="details prod" href="<?php echo $ele->href ?>" title="header=[<?php echo __('view more') ?>] body=[ ] fade=[on]"><?php echo __('more') ?></a>
- </div>
- </div>
- </section>
+ <li class="listing contents <?php echo $page->page_content_clean() ?>">
+ <section class="outerblock">
+ <p class="listing_s">
+ <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
+ </p>
+ </section>
</li>
- <?php elseif($ele->type =='content') : /** POSTS */ ?>
- <dl class="listing contents <?php echo $page->page_content_clean() ?>">
- <dt class="listing_s">
- <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
- </dt>
- </dl>
<?php elseif($ele->type =='categorie'): /** CATEGORIES */ ?>
+
<li class="one categorie">
- <section class="outerblock">
- <div class="innerblock">
- <p class="title categorie">
- <a href="<?php echo $ele->href ?>"> <?php echo $ele->categories_name ;?></a>
- </p>
- <p class="img categorie">
- <?php echo '<a href="' . $ele->href. '">' . tep_image(DIR_WS_IMAGES . $ele->categories_image, $ele->categories_name, $page->_conf_value('SUBCATEGORY_IMAGE_WIDTH'), $page->_conf_value('SUBCATEGORY_IMAGE_HEIGHT')) . '<br />' . $ele->categories_name . '</a>' ;?>
- </p>
- </div>
- </section>
+ <section class="outerblock">
+ <div class="innerblock">
+ <p class="title categorie">
+ <a href="<?php echo $ele->href ?>"> <?php echo $ele->categories_name ;?></a>
+ </p>
+ <p class="img categorie">
+ <?php echo '<a href="' . $ele->href. '">' . tep_image(DIR_WS_IMAGES . $ele->categories_image, $ele->categories_name, $page->_conf_value('SUBCATEGORY_IMAGE_WIDTH'), $page->_conf_value('SUBCATEGORY_IMAGE_HEIGHT')) . '<br />' . $ele->categories_name . '</a>' ;?>
+ </p>
+ </div>
+ </section>
</li>
- <?php else : /** Other */ ?>
- <dl class="listing contents <?php echo $page->page_content_clean() ?>">
- <dt class="listing_s">
+ <?php else : /** All Other display */ ?>
+
+ <li class="listing contents <?php echo $page->page_content_clean() ?>">
+ <section class="outerblock">
+ <p class="listing_s">
<a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
- </dt>
- </dl>
+ </p>
+ </section>
+ </li>
+
<?php endif; ?>
<?php endforeach; ?>
</ul>
+
</section>
@@ -129,5 +138,5 @@
</section>
<?php } ?>
<br class="clear" />
-</div>
-<?php ?>
\ No newline at end of file
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/shopping_cart.php 2012-04-28 16:10:39 UTC (rev 4337)
+++ trunk/catalog/templates/defaut/includes/content/shopping_cart.php 2012-04-28 17:35:37 UTC (rev 4338)
@@ -13,11 +13,12 @@
//! chargement cart fonction d'affichage
$DCart=$cart->init_draw();
+
?>
<div id="shoppingCart">
<?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
- <?php echo unhtmlentities($boxe->content) ?>
+ <?php if($boxe)echo unhtmlentities($boxe->content) ?>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
@@ -25,14 +26,15 @@
<?php if ($cart->count_contents() > 0): ?>
<table class="invoice invoiceDetails" cellspacing="0" >
- <tr>
- <th class="cart-header desc tleft"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
- <th class="cart-header puht tcenter"><?php echo HEADING_PRODUCTS_PRICE_U; ?></th>
- <th class="cart-header qty tcenter"><?php echo HEADING_PRODUCTS_QTY; ?></th>
- <th class="cart-header taxe tcenter"><?php echo HEADING_PRODUCTS_TAXE; ?></th>
- <th class="cart-header tottaxe tright"><?php echo HEADING_PRODUCTS_TOT_TAXE ?></th>
- <th class="cart-header totttc tright"><?php echo HEADING_PRODUCTS_TOT_TTC; ?></th>
- </tr>
+ <tr>
+ <th class="cart-header desc tleft"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
+ <th class="cart-header puht tcenter"><?php echo HEADING_PRODUCTS_PRICE_U; ?></th>
+ <th class="cart-header qty tcenter"><?php echo HEADING_PRODUCTS_QTY; ?></th>
+ <th class="cart-header taxe tcenter"><?php echo HEADING_PRODUCTS_TAXE; ?></th>
+ <th class="cart-header tottaxe tright"><?php echo HEADING_PRODUCTS_TOT_TAXE ?></th>
+ <th class="cart-header totttc tright"><?php echo HEADING_PRODUCTS_TOT_TTC; ?></th>
+ <th class="cart-header tright"> </th>
+ </tr>
@@ -40,29 +42,31 @@
<?php foreach($DCart->products as $i=>$product): ?>
- <tr class="cart-line <?php echo ($i%2)?'pair':'impair'; ?>">
- <td class="cart-line desc">
- <?php echo $product['name'] ;?><span id="ajaxcarttext<?php echo $i; ?>"><?php echo $product['alert_stock'] ;?></span>
- </td>
- <td class="cart-line puht tcenter">
- <?php echo $currencies->format($product['price']) ;?>
- </td>
- <td class="cart-line qty tcenter">
- <input class="Bt button cart-line" type="button" value="+" >
- <?php echo tep_draw_input_field('cart_quantity[]','cartQty_'.$i, $product['quantity'], 'class="CartQty" ');?>
- <input class="Bt button cart-line" type="button" value="-" >
-
- <?php echo tep_draw_hidden_field('products_id[]', $product['id']) ; ?>
- </td>
- <td class="cart-line taxe tcenter">
- <?php echo tep_get_tax_rate($product['tax_class_id']) ;?> </span>
- </td>
- <td class="cart-line tottaxe tright">
- <span id="ajaxcarttaxe<?php echo $i; ?>" class="cartPrice"> <?php echo ($product['final_price_ttc'] - $product['final_price']) ;?> </span>
- </td>
- <td class="cart-line totttc tright">
- <span id="ajaxcartPrice<?php echo $i; ?>" class="cartPrice"> <?php echo $currencies->format(tep_add_tax($product['final_price'], tep_get_tax_rate($product['tax_class_id'])) *$product['quantity'] ) ;?> </span>
- </td>
+ <tr id="cart-line-<?php echo $i; ?>" class="cart-line <?php echo ($i%2)?'pair':'impair'; ?>">
+ <td class="cart-line desc">
+ <?php echo $product['name'] ;?><span id="ajaxcarttext<?php echo $i; ?>"><?php echo $product['alert_stock'] ;?></span>
+ </td>
+ <td class="cart-line puht tcenter">
+ <?php echo $currencies->format($product['price']) ;?>
+ </td>
+ <td class="cart-line qty tcenter">
+ <input class="Bt button cart-line" type="button" value="+" >
+ <?php echo tep_draw_input_field('cart_quantity[]','cartQty_'.$i, $product['quantity'], 'class="CartQty" ');?>
+ <input class="Bt button cart-line" type="button" value="-" >
+ <?php echo tep_draw_hidden_field('products_id[]', $product['id']) ; ?>
+ </td>
+ <td class="cart-line taxe tcenter">
+ <?php echo tep_get_tax_rate($product['tax_class_id']) ;?> </span>
+ </td>
+ <td class="cart-line tottaxe tright">
+ <span id="ajaxcarttaxe<?php echo $i; ?>" class="cartPrice"> <?php echo$currencies->format( ($product['final_price_ttc'] - $product['final_price']) ) ;?> </span>
+ </td>
+ <td class="cart-line totttc tright">
+ <span id="ajaxcartPrice<?php echo $i; ?>" class="cartPrice"> <?php echo $currencies->format(tep_add_tax($product['final_price'], tep_get_tax_rate($product['tax_class_id'])) *$product['quantity'] ) ;?> </span>
+ </td>
+ <td class="cart-line tcenter">
+ <span id="ajaxcartdel<?php echo $i; ?>"> <?php echo tep_draw_checkbox_field('cart_delete['.$i.']','CartDel_'.$i, $i, false, 'class="CartDel" ');?> </span>
+ </td>
</tr>
@@ -78,12 +82,12 @@
<div class="SubTotal">
<ul id="TotCart">
<?php foreach($cart->show_list_total() as $i=>$tot): ?>
- <li><?php printf('<span>%s </span> %s' ,$tot->text, $currencies->format($tot->value)); ?></li>
+ <li><?php printf('<span class="text">%s </span><span class="value"> %s </span>' ,$tot->text, $currencies->format($tot->value)); ?></li>
<?php endforeach; ?>
<?php if($cart->get_content_type() !='virtual'): ?>
<li id="ajaxcartWeight" class="cartWeight">
- <?php echo '<span>' . SUB_TITLE_WEIGHT_TOTAL .'</span>' . $cart->show_weight().' '.UNIT_WEIGHT_NAME; ?>
+ <?php echo '<span class="text">' . SUB_TITLE_WEIGHT_TOTAL .'</span><span class="value">' . $cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span>'; ?>
</li>
<?php endif; ?>
@@ -93,11 +97,11 @@
<?php if ($DCart->any_out_of_stock == 1): ?>
- <?php if (_cst_bool('STOCK_ALLOW_CHECKOUT')) { ?>
- <div class="warning"><?php printf(OUT_OF_STOCK_CAN_CHECKOUT, STOCK_MARK_PRODUCT_OUT_OF_STOCK); ?></div>
- <?php } else { ?>
- <div class="warning"><?php printf(OUT_OF_STOCK_CANT_CHECKOUT,STOCK_MARK_PRODUCT_OUT_OF_STOCK ); ?></div>
- <?php } ?>
+ <?php if (_cst_bool('STOCK_ALLOW_CHECKOUT')): ?>
+ <div class="warning"><?php printf(OUT_OF_STOCK_CAN_CHECKOUT, STOCK_MARK_PRODUCT_OUT_OF_STOCK); ?></div>
+ <?php else : ?>
+ <div class="warning"><?php printf(OUT_OF_STOCK_CANT_CHECKOUT,STOCK_MARK_PRODUCT_OUT_OF_STOCK ); ?></div>
+ <?php endif; ?>
<?php endif ?>
@@ -107,8 +111,6 @@
<input class="Bt navBt submit" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE_CART; ?>" />
<?php echo '<a class="Bt navBt link" href="' . $navigation->GetBack() . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>'; ?>
-
- <?php /*! FOR DEV */ //echo '<a class="Bt navBt link" href="' . tep_href_link(/*'checkout.php'*/FILENAME_CHECKOUT_SHIPPING, ''/*'step=init'*/, 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
<?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-28 16:10:46
|
Revision: 4337
http://oscss.svn.sourceforge.net/oscss/?rev=4337&view=rev
Author: oscim
Date: 2012-04-28 16:10:39 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Suite correction et ajustement
correction coquille dans le js du product
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/fileUtility.php
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/ci_tag.class.php
trunk/catalog/admin/includes/exts/package/tags/addfile.php
trunk/catalog/admin/includes/exts/package/tags/addfilelg.php
trunk/catalog/admin/includes/exts/package/tags/config.php
trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
Modified: trunk/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/fileUtility.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/classes/fileUtility.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -137,42 +137,37 @@
*/
public static function _mkdir($path) {
$path = dirname($path);
- if (!file_exists($path) || !is_dir($path)) {
- if(strpos($path,DIR_FS_DOCUMENT_ROOT) ===0){
- $testpath = DIR_FS_DOCUMENT_ROOT;
- $listdir = str_replace( DIR_FS_DOCUMENT_ROOT, '', $path );
- }
- elseif(strpos($path,DIR_FS_ROOT_DOCS) ===0){
- $testpath = DIR_FS_ROOT_DOCS;
- $listdir = str_replace( DIR_FS_ROOT_DOCS, '', $path );
- }
+ if(strpos($path,DIR_FS_DOCUMENT_ROOT) ===0){
+ $testpath = DIR_FS_DOCUMENT_ROOT;
+ $listdir = str_replace( DIR_FS_DOCUMENT_ROOT, '', $path );
+ }
+ elseif(strpos($path,DIR_FS_ROOT_DOCS) ===0){
+ $testpath = DIR_FS_ROOT_DOCS;
+ $listdir = str_replace( DIR_FS_ROOT_DOCS, '', $path );
+ }
- $all = explode('/', $listdir);
- $res = array_slice($all, 0, (count($all)-2) );
- $tes = array_slice($all, (count($all)-2) );
+ $all = explode('/', $listdir);
+ $res = array_slice($all, 0, (count($all)-4) );
+ $tes = array_slice($all, (count($all)-4) );
- $testpath .= implode($res,'/');
+ $testpath .= implode($res,'/');
- foreach($tes as $row ){
-// if (!file_exists($testpath) )
-// continue;
-
-
+ foreach($tes as $row ){
$testpath .= '/'.$row;
- if (!file_exists($testpath) && !is_dir($testpath)) {
- if(!mkdir($testpath)) {
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__("cant create dir text"), 'error');
- }
+
+ if (!file_exists($testpath) && !is_dir($testpath)) {
+ if(!mkdir($testpath)) {
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__("cant create dir text"), 'error');
}
+ }
// if (!is_writeable($testpath))
- if( self::_chmod($path, '0755') ){
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error folder not writable for current user'). $source, 'error');
- }
+ if( self::_chmod($path, '0755') ){
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error folder not writable for current user'). $path, 'error');
+ }
+ }
- }
- }
return true;
}
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -512,6 +512,7 @@
}
if($ForTest){
+
//! Check full control
if (!$this->full_check('install')){
self::InProcess(__("Erreur durant traitement de cette fonction full_check()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
@@ -521,6 +522,7 @@
}
// if no test process
else{
+
//! We passed by all checks. So if an error appears
foreach ($this->contrib_data as $id=>$tag)
if ( $tag->do_install() ===false){
@@ -528,15 +530,9 @@
break;
}
-
- //! If we had a problems at runtime we should remove this CIP.
-// if (!self::check_bylevel(1))
-// $this->remove(true);
- // else {
- // $this->DeleteContribFull(false, 'ok');
//! up db etat install cip name if not error
/// error and fatal block install
- if (!self::check_bylevel(1))
+ if (self::check_bylevel(1) !=false)
$this->set_installed();
}
}
@@ -963,7 +959,7 @@
for($i=0; $i<$level; $i++){
if(isset(self::$level_error[$i]) /*&& in_array('1',self::$level_error[$i])*/) {
-// print_r(self::$level_error[$i]);
+print_r(self::$level_error[$i]);
return false;
}
}
Modified: trunk/catalog/admin/includes/exts/package/ci_tag.class.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -223,16 +223,42 @@
// create dir in folder backup
- if(is_dir( DIR_FS_CATALOG . $full_path ) )
+ if(is_dir( DIR_FS_CATALOG . $full_path ) ){
if(!$res=fileUtility::_mkdir(dirname(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path).'/'))
- CIP::InProcess(__('_medir error'). implode(',',$res). " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess(
+ __('_mkdir error'). implode(',',$res). " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path,
+ __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,
+ 'block'
+ );
+ }
+// var_dump(DIR_FS_CATALOG . $full_path );
+// echo '<br>';
// copy file in backup after upgrade
- if(is_file( DIR_FS_CATALOG . $full_path ) )
+ if(is_file( DIR_FS_CATALOG . $full_path ) ){
+ $inpath = CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.dirname($full_path).'/' ;
+
+
+ if( !file_exists($inpath) || !is_dir( $inpath ) ){
+
+ if(!$res=fileUtility::_mkdir($inpath) ){
+
+// var_dump($inpath);
+// echo '<br>';
+ CIP::InProcess(
+ __('_mkdir error'). '<pre>'.implode(',',$res).'</pre>'. " to ".'<pre>'.$inpath.'</pre>',
+ __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,
+ 'error'
+ );
+ return false;
+ }
+ }
+
if(!fileUtility::_copy(DIR_FS_CATALOG . $full_path, CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path)){
- CIP::InProcess(__('couldnt copy to text'). $full_path. " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess(__('couldnt copy to text').'<pre>'. $full_path.'</pre>'. " to ".'<pre>'.CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path.'</pre>', __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
+ }
// elseif (file_exists(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename))
// fileUtility::_chmod(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, 0777);
Modified: trunk/catalog/admin/includes/exts/package/tags/addfile.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -95,39 +95,30 @@
return true;
}
+ /**
+ @fn permissions_check_for_install()
+ @brief test file exists in contrib
+ */
public function permissions_check_for_install() {
if (!CIP::check_bylevel(1))return false;
-/// NOTE suppression des control qui sont efefctué sur des repertoire non installé
+
+ $error = array();
for($i = 0; $i < count($this->data['filename']);$i++){
+ $cip_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['srcdir'][$i].'/'.$this->data['filename'][$i];
-// if($this->fs_filename($i))
- if(!file_exists($this->fs_filename($i))){
+ if(!file_exists($cip_file)){
CIP::InProcess(
- 'in check before install -- <strong>'.__('original file no found').'</strong> <pre>'.$this->fs_filename($i).'</pre>',
+ 'in check before install -- <strong>'.__('original file no found').'</strong> <pre>'.$cip_file.'</pre>',
__CLASS__.'->'.__FUNCTION__.'::'.__LINE__,
'error'
);
- return false;
+ $error = false;
}
-
-// $fs_filename=replace_path_admin($this->fs_filename($i));
-// $path=dirname($fs_filename);
-//
-// if(!file_exists($path) || !is_dir($path))
-// parent::recursive_mkdir($fs_filename);
-//
-//
-// if(!is_writable($path))
-// if(! fileUtility::_chmod($path, 0777) ){
-// CIP::InProcess('check'.__('write permissins needed text').'<pre>'.$path.'</pre>', __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// return false;
-// }
-// if(file_exists($fs_filename) && !is_writable($fs_filename)) {
-// CIP::InProcess('check'.__('write permissins needed text').$this->fs_filename($i), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// return false;
-// }
-//
}
+
+ if(in_array(false, $error))
+ return false;
+
return true;
}
Modified: trunk/catalog/admin/includes/exts/package/tags/addfilelg.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfilelg.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/exts/package/tags/addfilelg.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -97,6 +97,40 @@
}
+
+ /**
+ @fn permissions_check_for_install()
+ @brief test file exists in contrib
+ */
+ public function permissions_check_for_install() {
+ if (!CIP::check_bylevel(1))return false;
+
+ $error = array();
+ for($i = 0; $i < count($this->data['filename']);$i++){
+ $cip_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['srcdir'][$i].'/'.$this->data['filename'][$i];
+
+ //! si element de langueu absent, remplace par celui de reference, cf attributes lgref
+ if (!file_exists($cip_file))
+ $cip_file=DIR_FS_CIP.$this->contrib.'/'. str_replace($this->data['lgfile'][$i] ,$this->data['lgref'][$i],$this->data['srcdir'][$i].'/'.$this->data['filename'][$i]);
+
+
+ if(!file_exists($cip_file)){
+ CIP::InProcess(
+ 'in check before install -- <strong>'.__('original file no found').'</strong> <pre>'.$cip_file.'</pre>',
+ __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,
+ 'error'
+ );
+ $error = false;
+ }
+ }
+
+ if(in_array(false, $error))
+ return false;
+
+ return true;
+ }
+
+
/**
@fn do_install()
@brief Insert all info about requirements of this CIP
@@ -109,7 +143,7 @@
$cip_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['srcdir'][$i].'/'.$this->data['filename'][$i];
$fs_filename=replace_path_admin($this->fs_filename($i));
- //! si element de langueu absnet, remplace par celui de reference, cf attributes lgref
+ //! si element de langueu absent, remplace par celui de reference, cf attributes lgref
if (!file_exists($cip_file))
$cip_file=DIR_FS_CIP.$this->contrib.'/'. str_replace($this->data['lgfile'][$i] ,$this->data['lgref'][$i],$this->data['srcdir'][$i].'/'.$this->data['filename'][$i]);
Modified: trunk/catalog/admin/includes/exts/package/tags/config.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/config.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/exts/package/tags/config.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -169,7 +169,7 @@
'" . $this->data['key'] . "',
'" . $this->data['value'] . "',
'" . $this->data['descr'] . "',
- " . self::$gid . ",
+ '" . (int)self::$gid . "',
" . ($this->data['sort_order'] == NULL ? "NULL" : $this->data['sort_order']) . ",
now(),
now(),
@@ -181,7 +181,11 @@
return false;
}
}
- else CIP::InProcess(__('configuration key deja existante ::').$this->data['key'], __CLASS__.'->'.__FUNCTION__,'noblock');
+ else
+ CIP::InProcess(
+ __('configuration key deja existante ::').$this->data['key'],
+ __CLASS__.'->'.__FUNCTION__
+ );
return true;
}
Modified: trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- trunk/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-04-28 14:39:33 UTC (rev 4336)
+++ trunk/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-04-28 16:10:39 UTC (rev 4337)
@@ -161,7 +161,7 @@
- $(function(){
+// $(function(){
// on cache les bouton enregsitrer si aucune modification effectué
// $('.button.ActionYes').hide();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-28 14:39:40
|
Revision: 4336
http://oscss.svn.sourceforge.net/oscss/?rev=4336&view=rev
Author: oscim
Date: 2012-04-28 14:39:33 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Correction et amelioration (suite) de la gestion des extension.
debugg section backup avant installation
Amelioration blockage de l'install lorsque celle ci contient des erreur, prise en charge de la suppression des elements deja install?\195?\169 / modifi?\195?\169
ajout d'un control de permission / backup sur le tag extrazip
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/fileUtility.php
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/ci_tag.class.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/tags/add2endlg.php
trunk/catalog/admin/includes/exts/package/tags/addfile.php
trunk/catalog/admin/includes/exts/package/tags/extractzip.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
Modified: trunk/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/fileUtility.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/classes/fileUtility.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -10,7 +10,7 @@
@class fileUtility
*/
-error_reporting(E_ALL);
+
class fileUtility {
public static $GError=array();
@@ -139,18 +139,27 @@
$path = dirname($path);
if (!file_exists($path) || !is_dir($path)) {
- $listdir = str_replace( DIR_FS_DOCUMENT_ROOT, '', $path );
+ if(strpos($path,DIR_FS_DOCUMENT_ROOT) ===0){
+ $testpath = DIR_FS_DOCUMENT_ROOT;
+ $listdir = str_replace( DIR_FS_DOCUMENT_ROOT, '', $path );
+ }
+ elseif(strpos($path,DIR_FS_ROOT_DOCS) ===0){
+ $testpath = DIR_FS_ROOT_DOCS;
+ $listdir = str_replace( DIR_FS_ROOT_DOCS, '', $path );
+ }
- $testpath = DIR_FS_DOCUMENT_ROOT;
-
$all = explode('/', $listdir);
$res = array_slice($all, 0, (count($all)-2) );
$tes = array_slice($all, (count($all)-2) );
$testpath .= implode($res,'/');
+
foreach($tes as $row ){
+// if (!file_exists($testpath) )
+// continue;
+
+
$testpath .= '/'.$row;
-
if (!file_exists($testpath) && !is_dir($testpath)) {
if(!mkdir($testpath)) {
self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__("cant create dir text"), 'error');
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -482,7 +482,10 @@
///================================================================== //Action //==================================================================
/**
- @brief Installateur Commande exe
+ @brief Installateur / testeur
+ Cette fonction assure les tests avant installation et l'installation proprement dite
+ Dans le contexte d'instalaltion, les test preallable ne sont pas appliqué
+
@param $ForTest boolenan if false reel install
*/
function install($ForTest = true) {
@@ -500,20 +503,24 @@
//! sort install tags by priority
if(isset($this->contrib_data['compare_tag_priority'])) usort($this->contrib_data,'compare_tag_priority');
- //! Check full control
- if (!$this->full_check('install')){
- self::InProcess(__("Erreur durant traitement de cette fonction full_check()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+
+
+ //! backup
+ if (!$this->total_backup()){
+ self::InProcess(__("Erreur durant traitement de cette fonction total_backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
- //! backup
-// if (!$this->total_backup()){
-// self::InProcess(__("Erreur durant traitement de cette fonction total_backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// return false;
-// }
+ if($ForTest){
+ //! Check full control
+ if (!$this->full_check('install')){
+ self::InProcess(__("Erreur durant traitement de cette fonction full_check()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
+ }
// if no test process
- if(!$ForTest){
+ else{
//! We passed by all checks. So if an error appears
foreach ($this->contrib_data as $id=>$tag)
if ( $tag->do_install() ===false){
@@ -523,14 +530,14 @@
//! If we had a problems at runtime we should remove this CIP.
- // if (!self::check_bylevel(1))
- // $this->remove(true);
+// if (!self::check_bylevel(1))
+// $this->remove(true);
// else {
// $this->DeleteContribFull(false, 'ok');
- //
- // //! up db etat install cip name
+ //! up db etat install cip name if not error
+ /// error and fatal block install
+ if (!self::check_bylevel(1))
$this->set_installed();
- // }
}
}
@@ -649,13 +656,13 @@
if (false /*_cst_bool('ALLOW_FILES_BACKUP')*/){
//! Files restore
if ( (method_exists($tag, 'restore_file' ) && !$this->restore()) || !self::check_bylevel(1)/* !$this->is_all_right()*/){
- self::InProcess(__("Erreur apres traitement de cette fonction restore()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
- return false;
+ self::InProcess(__("Erreur apres traitement de cette fonction restore()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
+ return false;
}
//! SQL restore;
if (!CipUtility::sql_restore() || !self::check_bylevel(1) /* !$this->is_all_right()*/){
- self::InProcess(__("Erreur apres traitement de cette fonction CipUtility::sql_restore()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
- return false;
+ self::InProcess(__("Erreur apres traitement de cette fonction CipUtility::sql_restore()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
+ return false;
}
}
return true;
@@ -665,13 +672,31 @@
/**
@brief on backup
+ Backup all file core after upgrade
*/
private function backup() {
- foreach ($this->contrib_data as $id=>$tag)
- if ( method_exists($tag, 'backup_file' ) && $tag->backup_file() ===false){
- self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->backup_file()','block');
- return false;
- }
+ foreach ($this->contrib_data as $id=>$tag){
+
+ if(isset($tag->data['filename']) ){
+ if(!is_array($tag->data['filename']))
+ $list = array($tag->data['filename']);
+ else
+ $list = $tag->data['filename'];
+
+ foreach($list as $row){
+ if ( file_exists(DIR_FS_CATALOG . $row) ){
+ if ( $tag->backup_file($row) ===false){
+ self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->backup_file()','block');
+ // return false;
+ }
+ }
+ }
+ }
+// if ( method_exists($tag, 'backup_file' ) && $tag->backup_file() ===false){
+// self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->backup_file()','block');
+// return false;
+// }
+ }
return true;
}
@@ -930,11 +955,19 @@
@brief Control niveau d'erreur pour suite ou block script
@param int level error control
@return boolean suite script
+ true > ok, false > not ok
*/
public static function CtrlForContinue($level=3){
- for($i=0; $i<$level; $i++)
- if(isset(self::$level_error[$i]) && in_array(true,self::$level_error[$i])) return false;
+// print_r(self::$level_error);
+// var_dump($level);
+ for($i=0; $i<$level; $i++){
+ if(isset(self::$level_error[$i]) /*&& in_array('1',self::$level_error[$i])*/) {
+// print_r(self::$level_error[$i]);
+ return false;
+}
+ }
+
return true;
}
Modified: trunk/catalog/admin/includes/exts/package/ci_tag.class.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -202,6 +202,9 @@
/**
@brief backup one file
@param $filename absolute path required
+ @return boolean
+ true : ok
+ false : not ok
*/
public static function backup_file($filename){
$filename=( is_array($filename)
@@ -214,28 +217,24 @@
foreach($filenames as $full_path){
- if(strpos('_'.$full_path, DIR_FS_ADMIN)> 0 )
- $filename = str_replace(DIR_FS_ADMIN,'',$full_path);
- elseif(strpos('_'.$full_path, DIR_FS_CATALOG)>0)
- $filename = str_replace(DIR_FS_CATALOG,'',$full_path);
- else
- $filename = $full_path;
+ // control exist in core file
+ if(!file_exists( DIR_FS_CATALOG . $full_path ) || is_link(DIR_FS_CATALOG . $full_path) )
+ return false;
- if(!is_file($full_path)
- or is_link($full_path))
- return false;
+ // create dir in folder backup
+ if(is_dir( DIR_FS_CATALOG . $full_path ) )
+ if(!$res=fileUtility::_mkdir(dirname(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path).'/'))
+ CIP::InProcess(__('_medir error'). implode(',',$res). " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- if(!$res=fileUtility::_mkdir(dirname(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename).'/'))
- CIP::InProcess(__('_medir error'). implode(',',$res). " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-
-
- if(!fileUtility::_copy($full_path, CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename)){
+ // copy file in backup after upgrade
+ if(is_file( DIR_FS_CATALOG . $full_path ) )
+ if(!fileUtility::_copy(DIR_FS_CATALOG . $full_path, CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$full_path)){
CIP::InProcess(__('couldnt copy to text'). $full_path. " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
- elseif (file_exists(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename))
- fileUtility::_chmod(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, 0777);
+// elseif (file_exists(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename))
+// fileUtility::_chmod(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, 0777);
}
return true;
@@ -328,7 +327,7 @@
// block Next process
fileUtility::CfgComport(true);
-var_dump(fileUtility::_mkdir($path));
+// var_dump(fileUtility::_mkdir($path));
// Create dir
if( ($res= fileUtility::_mkdir($path)) && $res ==false) {
// draw error
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -123,7 +123,7 @@
$cip->read_xml();
- return $array;
+ return array();
}
@@ -135,7 +135,9 @@
public function install_exts($pkgID){
global $messageStack;
+
$array=array();
+ $block = false;
//! retro compatibilite
$message=$messageStack;
@@ -151,8 +153,11 @@
$tp = '<h4 class="error">'. __('error in process install'). '</h4>'.
'<ul>';
foreach(ErrorAndBlockProcess::$ArrayError as $row)
- if(preg_match('#FATAL#i', $row))
+ if(preg_match('#FATAL#i', $row)){
+ $block = true;
+
$tp .='<li>'. $row .'</li>';
+ }
$tp .= '<div>';
@@ -163,6 +168,19 @@
else
$messageStack->add(__('msg was installed'), 'installed');
+ //! Error in process, block
+ if($block){
+ parent::$Rightlist=array_merge(parent::$Rightlist,(array)ErrorAndBlockProcess::$ArrayError);
+ $array[]='<div class="button_nav">'.
+ '<a class="button ActionYes" href="'.tep_href_link(parent::FILENAME,'action=remove_confirm&pkgID='.$pkgID).'" >'.__('image error in process delete all file').'</a> '.
+ '<a class="button ActionYes" href="'.tep_href_link(parent::FILENAME,'action=install&pkgID='.$pkgID).'" >'.__('image error reload install').'</a> '.
+ tep_js_back(tep_href_link(parent::FILENAME), __('image abondon and return listing')).
+ '</div>';
+
+ return $array;
+ }
+
+
//! Show post install message:
if ($cip->post_install_notes()) {
$array[]= '<h4>'.$cip->getIdent().'<h4>'.
@@ -245,7 +263,7 @@
// }
$array[]='<div class="button_nav">'.
- tep_js_back(tep_href_link(parent::FILENAME), IMAGE_CANCEL).
+ tep_js_back(tep_href_link(parent::FILENAME), __('image close and return listing')).
'</div>';
return $array;
}
Modified: trunk/catalog/admin/includes/exts/package/tags/add2endlg.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/add2endlg.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/exts/package/tags/add2endlg.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -26,20 +26,20 @@
function __construct($contrib='', $id='', $xml_data='', $dep='') {
$this->params=array(
- 'filename'=>array(
- 'sql_type'=>'varchar (255)',
- 'xml_error'=>"no file name; "
- ),
- 'add'=>array(
- 'sql_type'=>'text',
- 'xml_error'=>"no add section; "
- ),
- 'type'=>array(
- 'sql_type'=>"ENUM ('php', 'html')",
- ),
- 'lgref'=>array(
- 'sql_type'=>'varchar(255)',
- ),
+ 'filename'=>array(
+ 'sql_type'=>'varchar (255)',
+ 'xml_error'=>"no file name; "
+ ),
+ 'add'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>"no add section; "
+ ),
+ 'type'=>array(
+ 'sql_type'=>"ENUM ('php', 'html')",
+ ),
+ 'lgref'=>array(
+ 'sql_type'=>'varchar(255)',
+ ),
);
$this->ContribInstallerBaseTag($contrib, $id, $xml_data, $dep);
}
@@ -90,12 +90,12 @@
if(!is_dir($path))parent::recursive_mkdir($path);
if(!is_writable($path)) {
- CIP::InProcess('check'.__('write permissins needed text').$path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+ CIP::InProcess('check'.__('write permissins needed text').$path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
}
if(file_exists($fs_filename) && !is_writable($fs_filename)) {
- CIP::InProcess('check'.__('write permissins needed text').$this->fs_filename($i), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+ CIP::InProcess('check'.__('write permissins needed text').$this->fs_filename($i), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
}
}
return true;
Modified: trunk/catalog/admin/includes/exts/package/tags/addfile.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -30,11 +30,11 @@
public $params;//array with attributes
/**
- @param array liste des fichier a backup
+ @var array liste des fichier a backup
*/
protected static $backup_file=array();
/**
- @param array liste des fichier a backup
+ @var array liste des fichier a backup
*/
protected static $restore_file=array();
@@ -102,7 +102,11 @@
// if($this->fs_filename($i))
if(!file_exists($this->fs_filename($i))){
- CIP::InProcess('in check before install -- <strong>'.__('original file no found').'</strong> <pre>'.$this->fs_filename($i).'</pre>', __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess(
+ 'in check before install -- <strong>'.__('original file no found').'</strong> <pre>'.$this->fs_filename($i).'</pre>',
+ __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,
+ 'error'
+ );
return false;
}
Modified: trunk/catalog/admin/includes/exts/package/tags/extractzip.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-04-28 14:39:33 UTC (rev 4336)
@@ -38,6 +38,10 @@
'sql_type'=>'varchar (255)',
'xml_error'=>"no path section; "
),
+// 'filename'=>array(
+// 'sql_type'=>'varchar(255)',
+// 'xml_error'=>__('name of file missing in addfile section text')
+// ),
);
$this->ContribInstallerBaseTag($contrib, $id, $xml_data, $dep);
@@ -57,6 +61,21 @@
$this->zipContent = self::$PclZip->listContent( PCLZIP_OPT_PATH, DIR_FS_CATALOG.$this->data['path'] );
+ $i = 0;
+ reset($this->zipContent );
+ foreach($this->zipContent as $row){
+
+ $this->data['filename'][$i] = replace_path_admin($this->data['path'].$row['filename']);;
+ $this->data['srcdir'][$i] = 'catalog';
+ $i++;
+// $rs_filename=replace_path_admin($row['filename']);
+//
+// $path=dirname($rs_filename); //['filename']);
+// $fs_filename = $rs_filename; //['filename'];
+//
+
+ }
+
}
protected static function loadZipFile(){
@@ -80,19 +99,14 @@
$rs_filename=replace_path_admin($row['filename']);
- $path=dirname($rs_filename); //['filename']);
- $fs_filename = $rs_filename; //['filename'];
+ $path=dirname($rs_filename);
+ $fs_filename = $rs_filename;
-// if(!is_dir($path))
-// parent::recursive_mkdir($path);
-
if(is_dir($path) && !is_writable($path)) {
CIP::InProcess(__('write folder permissins needed text').$path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// return false;
}
elseif(file_exists($fs_filename) && !is_writable($fs_filename)) {
CIP::InProcess(__('write file permissins needed text').' '.$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
-// return false;
}
}
return true;
@@ -109,8 +123,8 @@
$rs_filename=replace_path_admin($row['filename']);
- $path=dirname($rs_filename); //['filename']);
- $fs_filename = $rs_filename; //['filename'];
+ $path=dirname($rs_filename);
+ $fs_filename = $rs_filename;
$backup_file=DIR_FS_BACKUP.CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION.'/'. $fs_filename;
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab 2012-04-28 14:39:33 UTC (rev 4336)
@@ -24,7 +24,7 @@
<div class="block_input button_nav" >
<?php
echo tep_image_submit('', __('image confirm delete'));
- echo tep_js_back(tep_href_link(package::FILENAME, 'type_data=source'), IMAGE_CANCEL) ;
+ echo tep_js_back(tep_href_link(package::FILENAME, ''), IMAGE_CANCEL) ;
?>
</div>
</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-04-27 15:34:28 UTC (rev 4335)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-04-28 14:39:33 UTC (rev 4336)
@@ -30,26 +30,26 @@
/** listing*/
- /* paquet */
- $lang['table heading nom']="Nom" ;
- $lang['table heading description']="Description" ;
- $lang['table heading size']="Taille" ;
- $lang['table heading status']="" ;
- $lang['table heading status detail']="" ;
- $lang['table heading present']="Présent" ;
- $lang['heading action']="Action" ;
- $lang['table heading action']="Action" ;
- $lang['table heading level']="Niveau" ;
- $lang['table heading repository']="Dépot" ;
+ /* paquet */
+ $lang['table heading nom']="Nom" ;
+ $lang['table heading description']="Description" ;
+ $lang['table heading size']="Taille" ;
+ $lang['table heading status']="" ;
+ $lang['table heading status detail']="" ;
+ $lang['table heading present']="Présent" ;
+ $lang['heading action']="Action" ;
+ $lang['table heading action']="Action" ;
+ $lang['table heading level']="Niveau" ;
+ $lang['table heading repository']="Dépot" ;
- $lang['listing pkg image edit']="Voir la configuration" ;
- $lang['listing pkg image remove']="Désinstaller cette extension" ;
- $lang['listing pkg image install']="Télécharger et/ou installer" ;
- /* source */
- $lang['heading source title']="Titre" ;
- $lang['heading source key']="Clef" ;
- $lang['heading source last update']="Dernière mise a jour" ;
+ $lang['listing pkg image edit']="Voir la configuration" ;
+ $lang['listing pkg image remove']="Désinstaller cette extension" ;
+ $lang['listing pkg image install']="Télécharger et/ou installer" ;
+ /* source */
+ $lang['heading source title']="Titre" ;
+ $lang['heading source key']="Clef" ;
+ $lang['heading source last update']="Dernière mise a jour" ;
/** Add */
@@ -69,6 +69,7 @@
$lang['msg was removed']="Extension desinstallée" ;
+ $lang['image close and return listing']="Revenir au listing" ;
/** view */
/* source */
@@ -97,6 +98,11 @@
/* bouton */
$lang['config extension']="Configurer cette extension " ;
$lang['text post install notes']="Note de fin d'installation" ;
+ $lang['image error in process delete all file']="Supprimer les elements déjà installés" ;
+ $lang['image error reload install']="Relancer l'installation" ;
+ $lang['image abondon and return listing']="Tous abandonner et revenir au listing" ;
+
+
/* text */
$lang['package heading title install']="installation du paquet" ;
$lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-27 15:34:40
|
Revision: 4335
http://oscss.svn.sourceforge.net/oscss/?rev=4335&view=rev
Author: oscim
Date: 2012-04-27 15:34:28 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
suite travail featured
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/09_commercial.php
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/database_tables.php
trunk/catalog/admin/includes/filenames.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php
trunk/catalog/admin/includes/modules/pages/featured.php
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_featured_data.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_data.sql
Modified: trunk/catalog/admin/includes/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/boxes/09_commercial.php 2012-04-27 12:55:44 UTC (rev 4334)
+++ trunk/catalog/admin/includes/boxes/09_commercial.php 2012-04-27 15:34:28 UTC (rev 4335)
@@ -22,4 +22,6 @@
// $tabl_link[609]= array('ss_menu', 'BOX_TOOLS_MAIL', 'mail',@$img['mail']);
$tabl_link[]= array(FILENAME_HELD_ORDERS, 'BOX_CUSTOMERS_HELD_ORDERS', 'held_orders',@$img['held_orders']);
$tabl_link[]= array(FILENAME_RECOVER_CART_SALES, 'BOX_RECOVER_CART_SALES', 'recover_cart_sales',@$img['recover_cart_sales']);
+
+ $tabl_link[]= array(FILENAME_FEATURED, 'BOX_FEATURED', 'featured',@$img['featured']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-04-27 12:55:44 UTC (rev 4334)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-04-27 15:34:28 UTC (rev 4335)
@@ -38,13 +38,14 @@
public static function create($option){
self::getInstance();
- if(!isset($option['name']))
- return 'name';
+ if(!isset($option['type']))
+ return 'type';
- $sql_data_array['featured_name'] = tep_db_prepare_input($option['name']);
- $sql_data_array['datatype'] = tep_db_prepare_input($option['datatype']);
- $sql_data_array['datatype_id '] = tep_db_prepare_input($option['datatype_id']);
- $sql_data_array['featured_visible'] = (isset($option['visible'])) ? tep_db_prepare_input($option['visible']) :'0';
+// $sql_data_array['row_id'] = tep_db_prepare_input($option['id']);
+ $sql_data_array['k_status_type'] = tep_db_prepare_input($option['type']);
+ $sql_data_array['featured_min'] = (isset($option['min'])) ? tep_db_prepare_input($option['min']) :1;
+ $sql_data_array['featured_max'] = (isset($option['max'])) ? tep_db_prepare_input($option['max']) :5;
+ $sql_data_array['featured_status'] = (isset($option['status'])) ? tep_db_prepare_input($option['status']) :0;
$sql_data_array['date_added'] = 'NOW()';
$sql_data_array['user_added'] = $_SESSION['login_id'];
@@ -67,13 +68,14 @@
return 'id';
$where ='';
- if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
- if(isset($option['datatype'])) $where .="AND featured_id = '".(int)$option['datatype']."' ";
- if(isset($option['datatype_id'])) $where .="AND featured_id = '".(int)$option['datatype_id']."' ";
+ if(isset($option['id'])) $where .="AND row_id = '".(int)$option['id']."' ";
+ if(isset($option['type'])) $where .="AND k_status_type = '".(int)$option['type']."' ";
+// if(isset($option['status'])) $where .="AND featured_status = '".(int)$option['status']."' ";
- if(isset($option['name']))$sql_data_array['featured_name'] = tep_db_prepare_input($option['name']);
- if(isset($option['visible'])) $sql_data_array['featured_visible'] = (int)tep_db_prepare_input($option['visible']);
+ if(isset($option['min']))$sql_data_array['featured_min'] = tep_db_prepare_input($option['min']);
+ if(isset($option['max'])) $sql_data_array['featured_max'] = (int)tep_db_prepare_input($option['max']);
+ if(isset($option['status'])) $sql_data_array['featured_status'] = (int)tep_db_prepare_input($option['status']);
$sql_data_array['last_modified'] = 'NOW()';
$sql_data_array['user_modified'] = $_SESSION['login_id'];
@@ -109,16 +111,213 @@
$DB=Database::getInstance();
$where ="";
+ if(isset($option['id'])) $where .="AND row_id = '".(int)$option['id']."' ";
+ if(isset($option['type'])) $where .="AND k_status_type = '".(int)$option['type']."' ";
+ if(isset($option['status'])) $where .="AND featured_status = '".(int)$option['status']."' ";
+
+
+ if($where=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_FEATURED . " a ".
+ " 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){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $where ="";
+ if(isset($option['id'])) $where .="AND row_id = '".(int)$option['id']."' ";
+ if(isset($option['type'])) $where .="AND k_status_type = '".(int)$option['type']."' ";
+ if(isset($option['status'])) $where .="AND featured_status = '".(int)$option['status']."' ";
+
+
+ if($where=='')
+ return false;
+
+ $DB->query("DELETE FROM " . TABLE_FEATURED ." WHERE ". substr($where, 3 ) );
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'row_id' => '',
+ 'k_status_type' => '',
+ 'featured_min' => '',
+ 'featured_max' => '',
+ 'featured_status' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'featured_') ===0)
+ $key=substr($key,strlen('featured_'));
+ elseif( strpos($key,'k_status_') ===0)
+ $key=substr($key,strlen('k_status_'));
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+
+class sqlfeatureddata
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['datatype']))
+ return 'datatype';
+
+// $sql_data_array['row_id'] = tep_db_prepare_input($option['id']);
+ $sql_data_array['featured_id'] = tep_db_prepare_input($option['featured_id']);
+ $sql_data_array['datatype'] = tep_db_prepare_input($option['datatype']);
+ $sql_data_array['datatype_id '] = tep_db_prepare_input($option['datatype_id']);
+
+ $sql_data_array['date_start'] = (isset($option['date_start'])) ? tep_db_prepare_input($option['date_start']) :'0';
+ $sql_data_array['date_end'] = (isset($option['date_end'])) ? tep_db_prepare_input($option['date_end']) :'0';
+
+ $sql_data_array['date_added'] = 'NOW()';
+ $sql_data_array['user_added'] = $_SESSION['login_id'];
+
+ $res=tep_db_perform(TABLE_FEATURED_DATA, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ $where ='';
if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
+ if(isset($option['featured_id'])) $where .="AND featured_id = '".(int)$option['featured_id']."' ";
+
+ $sql_data_array['date_start'] = (isset($option['date_start'])) ? tep_db_prepare_input($option['date_start']) :'0';
+ $sql_data_array['date_end'] = (isset($option['date_end'])) ? tep_db_prepare_input($option['date_end']) :'0';
+
+ $sql_data_array['last_modified'] = 'NOW()';
+ $sql_data_array['user_modified'] = $_SESSION['login_id'];
+
+ $res=tep_db_perform(TABLE_FEATURED_DATA, $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)
+ @param $shortkey use cleankey for return short key
+ @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){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $where ="";
+ if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
+ if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
+ if(isset($option['featured_id'])) $where .="AND featured_id = '".(int)$option['featured_id']."' ";
+
+
if($where=='')
return false;
- $sql="SELECT * FROM " . TABLE_FEATURED . " a ".
+ $sql="SELECT * FROM " . TABLE_FEATURED_DATA . " a ".
" WHERE ".substr($where,3);
$res=$DB->query($sql);
@@ -152,12 +351,13 @@
if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
+ if(isset($option['featured_id'])) $where .="AND featured_id = '".(int)$option['featured_id']."' ";
if($where=='')
return false;
- $DB->query("DELETE FROM " . TABLE_FEATURED ." WHERE ". substr($where, 3 ) );
+ $DB->query("DELETE FROM " . TABLE_FEATURED_DATA ." WHERE ". substr($where, 3 ) );
return true;
@@ -170,11 +370,12 @@
*/
public static function Specimen($shortkey=false){
$par = array(
+ 'row_id' => '',
'featured_id' => '',
'datatype' => '',
'datatype_id' => '',
- 'featured_name' => '',
- 'featured_visible' => '',
+ 'date_start' => '',
+ 'date_end' => '',
);
return ((!$shortkey)? $par : self::CleanKey($par));
@@ -191,8 +392,6 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'featured_') ===0)
- $key=substr($key,strlen('featured_'));
$object->$key = $value;
}
@@ -201,6 +400,4 @@
}
}
-
-
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/database_tables.php
===================================================================
--- trunk/catalog/admin/includes/database_tables.php 2012-04-27 12:55:44 UTC (rev 4334)
+++ trunk/catalog/admin/includes/database_tables.php 2012-04-27 15:34:28 UTC (rev 4335)
@@ -132,6 +132,12 @@
define('TABLE_NAVIGATION_LINKS_TO_CATEGORIES', DB_TABLE_PREFIX . 'navigation_links_to_categories');
+
+## featured
+ define('TABLE_FEATURED', DB_TABLE_PREFIX . 'featured');
+ define('TABLE_FEATURED_DATA', DB_TABLE_PREFIX . 'featured_data');
+
+
## Image index
define('TABLE_IMAGES', DB_TABLE_PREFIX . 'images');
/// TOP Not Used for dev
Modified: trunk/catalog/admin/includes/filenames.php
===================================================================
--- trunk/catalog/admin/includes/filenames.php 2012-04-27 12:55:44 UTC (rev 4334)
+++ trunk/catalog/admin/includes/filenames.php 2012-04-27 15:34:28 UTC (rev 4335)
@@ -34,6 +34,7 @@
define('FILENAME_DEFAULT', 'index.php');
define('FILENAME_FULL_TAG', 'header_tags.php');
define('FILENAME_FEEDS', 'rss.php');
+define('FILENAME_FEATURED', 'featured.php');
define('FILENAME_FORBIDEN', 'forbiden.php');
define('FILENAME_GEO_ZONES', 'geo_zones.php');
define('FILENAME_GOOGLE_SITEMAP', 'ggsitemap.php');
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php 2012-04-27 12:55:44 UTC (rev 4334)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php 2012-04-27 15:34:28 UTC (rev 4335)
@@ -17,4 +17,5 @@
define('BOX_TOOLS_NEWSLETTER_MANAGER_MODELES',"Modèle de bulletin" );
define('BOX_HEADING_CONF_BOX_RECOVER_CART_SALES',"Paniers abandonnés" );
define('BOX_CUSTOMERS_HELD_ORDERS',"Commandes abandonnées" );
+define('BOX_FEATURED',"Mise en avant" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/featured.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featured.php 2012-04-27 12:55:44 UTC (rev 4334)
+++ trunk/catalog/admin/includes/modules/pages/featured.php 2012-04-27 15:34:28 UTC (rev 4335)
@@ -87,8 +87,8 @@
*/
self::$InitInfo['theader']['listing']=array(
array('width'=>'5%','class'=>'tcenter', 'txt'=>__('table heading datatype') ) ,
- array('width'=>'2%','class'=>'tcenter', 'txt'=>__('table heading datatype id') ) ,
- array('width'=>'15%','class'=>'tcenter', 'txt'=>__('table heading name') ) ,
+// array('width'=>'2%','class'=>'tcenter', 'txt'=>__('table heading datatype id') ) ,
+// array('width'=>'15%','class'=>'tcenter', 'txt'=>__('table heading name') ) ,
array('width'=>'8%','class'=>'tcenter', 'txt'=>__('table heading status') ),
array('width'=>'8%','class'=>'tcenter', 'txt'=>__('table heading action') ),
);
@@ -99,10 +99,10 @@
*/
self::$InitInfo['modele']['listing']=array(
// 0 =>false,
- 'datatype' =>true,
- 'datatype_id' =>true,
- 'featured_name' =>true,
- 'featured_visible'=>true,
+ 'row_id' =>true,
+ 'type' =>true,
+ 'featured_status' =>true,
+// 'featured_visible'=>true,
'action'=>false,
);
@@ -232,9 +232,9 @@
global $query_numrows;
$adjust=new objectInfo(self::$InitInfo['adjust']);
- $query_raw = "select featured_id , featured_name , featured_visible, datatype, datatype_id from " . TABLE_FEATURED . " c ".
+ $query_raw = "select row_id , k_status_type as type , featured_status from " . TABLE_FEATURED . " c ".
((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
- " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' featured_name ASC ');
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' row_id ASC ');
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-04-27 15:34:28 UTC (rev 4335)
@@ -0,0 +1,27 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+CREATE TABLE IF NOT EXISTS osc_featured (
+ row_id int(11) NOT NULL AUTO_INCREMENT,
+ k_status_type int(11) NOT NULL,
+ featured_min int(3) NOT NULL,
+ featured_max int(3) NOT NULL,
+ featured_status int(1) NOT NULL,
+ date_added datetime NOT NULL,
+ user_added int(11) NOT NULL,
+ date_update datetime NOT NULL,
+ user_update int(11) NOT NULL,
+ PRIMARY KEY (row_id)
+);
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_featured_data.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured_data.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured_data.sql 2012-04-27 15:34:28 UTC (rev 4335)
@@ -0,0 +1,27 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+CREATE TABLE IF NOT EXISTS osc_featured_data (
+ row_id int(11) NOT NULL AUTO_INCREMENT,
+ featured_id int(11) NOT NULL,
+ datatype varchar(32) NOT NULL,
+ datatype_id int(11) NOT NULL,
+ date_added datetime NOT NULL,
+ user_added int(11) NOT NULL,
+ date_update datetime NOT NULL,
+ user_update int(11) NOT NULL,
+ date_start datetime NOT NULL,
+ date_end datetime NOT NULL,
+ PRIMARY KEY (row_id)
+);
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql 2012-04-27 15:34:28 UTC (rev 4335)
@@ -0,0 +1,27 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+CREATE TABLE IF NOT EXISTS osc_featured (
+ row_id int(11) NOT NULL AUTO_INCREMENT,
+ k_status_type int(11) NOT NULL,
+ featured_min int(3) NOT NULL,
+ featured_max int(3) NOT NULL,
+ featured_status int(1) NOT NULL,
+ date_added datetime NOT NULL,
+ user_added int(11) NOT NULL,
+ date_update datetime NOT NULL,
+ user_update int(11) NOT NULL,
+ PRIMARY KEY (row_id)
+);
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_data.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_data.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_data.sql 2012-04-27 15:34:28 UTC (rev 4335)
@@ -0,0 +1,27 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+CREATE TABLE IF NOT EXISTS osc_featured_data (
+ row_id int(11) NOT NULL AUTO_INCREMENT,
+ featured_id int(11) NOT NULL,
+ datatype varchar(32) NOT NULL,
+ datatype_id int(11) NOT NULL,
+ date_added datetime NOT NULL,
+ user_added int(11) NOT NULL,
+ date_update datetime NOT NULL,
+ user_update int(11) NOT NULL,
+ date_start datetime NOT NULL,
+ date_end datetime NOT NULL,
+ PRIMARY KEY (row_id)
+);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-27 12:55:50
|
Revision: 4334
http://oscss.svn.sourceforge.net/oscss/?rev=4334&view=rev
Author: oscim
Date: 2012-04-27 12:55:44 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/backup/display_view.viewalldb.gab
Modified: trunk/catalog/admin/includes/gabarit/backup/display_view.viewalldb.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/backup/display_view.viewalldb.gab 2012-04-27 08:14:40 UTC (rev 4333)
+++ trunk/catalog/admin/includes/gabarit/backup/display_view.viewalldb.gab 2012-04-27 12:55:44 UTC (rev 4334)
@@ -29,7 +29,7 @@
<div id="tabs-1" class="tabPage">
<fieldset class="block_field">
<h3><?php echo __('backup title all tables available') ?></h3>
- <table class="dataTableBase">
+ <table class="dataTable">
<thead>
<tr>
<th><?php echo __('table heading name'); ?></th>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-27 08:14:51
|
Revision: 4333
http://oscss.svn.sourceforge.net/oscss/?rev=4333&view=rev
Author: oscim
Date: 2012-04-27 08:14:40 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql 2012-04-27 07:47:49 UTC (rev 4332)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql 2012-04-27 08:14:40 UTC (rev 4333)
@@ -13,22 +13,22 @@
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (1, '4528838165ba2e6bdadf9b7d3d651da5', 'Contrib_Installer_2.2', 1, 'CONTRIB_INSTALLER', '2.2', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (2, '4f88808dacb5a4460eb57bdd1dc3189b', 'ADDRESS_BOOK_stable', 1, 'ADDRESS_BOOK', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (3, 'eec88916a23139e55400cf0dd834856f', 'DESC_BASE_stable', 1, 'DESC_BASE', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (4, '451a84aa41e342884b84890af7cf69e7', 'HEADER_TAGS_stable', 1, 'HEADER_TAGS', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (5, 'e62f47533278a4cacb1c9324a1aa7f27', 'ACCOUNT_EXTRA_stable', 1, 'ACCOUNT_EXTRA', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (6, 'a72e4a34f10af98a9814d865e717399f', 'SPECIAL_stable', 1, 'SPECIAL', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (7, '1415dd6d4b211ace908a6ac84621f88a', 'SVNUPDATE_unstable', 1, 'SVNUPDATE', '1.0', 'unstable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (8, 'da8a0d4a6c802e4d0bb48065258582b1', 'SPU_stable', 1, 'SPU', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (9, '2b911c015ed17a423c74ab9987330e60', 'ITEM_stable', 1, 'ITEM', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (10,'f88a77e3d68d251c3dc4008c327b5a0c', 'FLAT_stable', 1, 'FLAT', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (11, '0842ece8c3829d2d160429b838ce562d', 'MZMT_stable', 1, 'MZMT', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (13, '62a6e86c256f883172649a3dff05b5e2', 'MONEYORDER_stable', 1, 'MONEYORDER', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (14, '0c66e0c5102b0140f3b6b215cc8fc4cf', 'OT_TAX_stable', 1, 'OT_TAX', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (15, '62066c0ccd52035dc2443f846b7918b1', 'OT_SUBTOTAL_stable', 1, 'OT_SUBTOTAL', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (16, '51bf5a6d7c1ec758e702edf8a1a91b18', 'OT_TOTAL_stable', 1, 'OT_TOTAL', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (17, '6e4e3c45a31ae52d93324b58daa05f09', 'OT_SHIPPING_stable', 1, 'OT_SHIPPING', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (18, '5030551cd5ca2f5644f3d4e00ff6eba7', 'ACCOUNTHISTORY_stable', 1, 'ACCOUNTHISTORY', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (19, 'b795b63787e710cbb3d5a71714f70921', 'COD_stable', 1, 'COD', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (1, '4528838165ba2e6bdadf9b7d3d651da5', 'Contrib_Installer_2.2', 1, 'CONTRIB_INSTALLER', '2.2', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (2, '4f88808dacb5a4460eb57bdd1dc3189b', 'ADDRESS_BOOK_stable', 1, 'ADDRESS_BOOK', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (3, 'eec88916a23139e55400cf0dd834856f', 'DESC_BASE_stable', 1, 'DESC_BASE', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (4, '451a84aa41e342884b84890af7cf69e7', 'HEADER_TAGS_stable', 1, 'HEADER_TAGS', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (5, 'e62f47533278a4cacb1c9324a1aa7f27', 'ACCOUNT_EXTRA_stable', 1, 'ACCOUNT_EXTRA', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (6, 'a72e4a34f10af98a9814d865e717399f', 'SPECIAL_stable', 1, 'SPECIAL', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (7, '1415dd6d4b211ace908a6ac84621f88a', 'SVNUPDATE_unstable', 1, 'SVNUPDATE', '1.0', 'unstable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (8, 'da8a0d4a6c802e4d0bb48065258582b1', 'SPU_stable', 1, 'SPU', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (9, '2b911c015ed17a423c74ab9987330e60', 'ITEM_stable', 1, 'ITEM', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (10,'f88a77e3d68d251c3dc4008c327b5a0c', 'FLAT_stable', 1, 'FLAT', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (11, '0842ece8c3829d2d160429b838ce562d', 'MZMT_stable', 1, 'MZMT', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (13, '62a6e86c256f883172649a3dff05b5e2', 'MONEYORDER_stable', 1, 'MONEYORDER', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (14, '0c66e0c5102b0140f3b6b215cc8fc4cf', 'OT_TAX_stable', 1, 'OT_TAX', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (15, '62066c0ccd52035dc2443f846b7918b1', 'OT_SUBTOTAL_stable', 1, 'OT_SUBTOTAL', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (16, '51bf5a6d7c1ec758e702edf8a1a91b18', 'OT_TOTAL_stable', 1, 'OT_TOTAL', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (17, '6e4e3c45a31ae52d93324b58daa05f09', 'OT_SHIPPING_stable', 1, 'OT_SHIPPING', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (18, '5030551cd5ca2f5644f3d4e00ff6eba7', 'ACCOUNTHISTORY_stable', 1, 'ACCOUNTHISTORY', '1.0', 'stable');
+INSERT IGNORE INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (19, 'b795b63787e710cbb3d5a71714f70921', 'COD_stable', 1, 'COD', '1.0', 'stable');
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-04-27 07:47:49 UTC (rev 4332)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-04-27 08:14:40 UTC (rev 4333)
@@ -340,10 +340,9 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_MODELE_PDF_S', 'USE_MODELE_PDF', 'harry', 'USE_MODELE_PDF_L', '128', '5', NULL, NOW(), NULL, '','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 ('PUBLIC_DRIVERS_PAGE_S', 'PUBLIC_DRIVERS_PAGE', 'GabaritTemplate', 'PUBLIC_DRIVERS_PAGE_L', '128', '0', NOW(), NOW(),NULL, NULL, 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 ('NO_DISPLAY_SYMBOL_TAXE_S', 'NO_DISPLAY_SYMBOL_TAXE', 'GabaritTemplate', 'NO_DISPLAY_SYMBOL_TAXE_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function ,
+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 ('DATATYPES_DEFAULT_NOSELECTED_S', 'DATATYPES_DEFAULT_NOSELECTED', 'product', 'DATATYPES_DEFAULT_NOSELECTED_L', '128', '0', NOW(), NOW(),NULL, NULL, 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 ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '128', '0', NOW(), NOW(),NULL, NULL, 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 ('DATATYPES_S', 'DATATYPES', 'error,product,content,diver,categorie,manufacturer,home,', 'DATATYPES_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
-set_function,configuration_type) values ('DATATYPES_DEFAULT_NOSELECTED_S', 'DATATYPES_DEFAULT_NOSELECTED', 'product', 'DATATYPES_DEFAULT_NOSELECTED_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_CATEGORIE_S', 'DATATYPES_ROOTLISTING_CATEGORIE', 'product,content,nested', 'DATATYPES_ROOTLISTING_CATEGORIE_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_MANUFACTURER_S', 'DATATYPES_ROOTLISTING_MANUFACTURER', 'product', 'DATATYPES_ROOTLISTING_MANUFACTURER_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-27 07:48:00
|
Revision: 4332
http://oscss.svn.sourceforge.net/oscss/?rev=4332&view=rev
Author: oscim
Date: 2012-04-27 07:47:49 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
correction bug gener lorsque image inaccessible pour la generation des pdf
ajsutement lib et modele
correction coquille moteur upgrade , element manquant
correction template public defaut, dans les liens entre etape de checkout (renvoye vers checkout tjs en cours de dev et non fonctionnel)
Modified Paths:
--------------
trunk/catalog/Documents/modeles/pdf/harry/harry.php
trunk/catalog/common/functions/pdf_output.php
trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql
trunk/catalog/templates/defaut/includes/content/checkout_payment.php
trunk/catalog/templates/defaut/includes/content/checkout_shipping.php
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders_products.sql
Modified: trunk/catalog/Documents/modeles/pdf/harry/harry.php
===================================================================
--- trunk/catalog/Documents/modeles/pdf/harry/harry.php 2012-04-27 07:26:40 UTC (rev 4331)
+++ trunk/catalog/Documents/modeles/pdf/harry/harry.php 2012-04-27 07:47:49 UTC (rev 4332)
@@ -40,8 +40,9 @@
function Header(){
global $oID;
- $date = strftime('%A, %d %B %Y');
+ $date = strftime('%A, %d %B %Y');
//Logo + link shop
+ if(file_exists(LOGO_SHOP_FOR_PRINT))
$this->Image(LOGO_SHOP_FOR_PRINT,5,10,50,0,'',HTTP_SERVER.DIR_WS_CATALOG);
Modified: trunk/catalog/common/functions/pdf_output.php
===================================================================
--- trunk/catalog/common/functions/pdf_output.php 2012-04-27 07:26:40 UTC (rev 4331)
+++ trunk/catalog/common/functions/pdf_output.php 2012-04-27 07:47:49 UTC (rev 4332)
@@ -58,6 +58,7 @@
global $oID;
$date = strftime('%A, %d %B %Y');
//Logo + link shop
+ if(file_exists(LOGO_SHOP_FOR_PRINT))
$this->Image(LOGO_SHOP_FOR_PRINT,5,10,50,0,'',HTTP_SERVER.DIR_WS_CATALOG);
// Company Address
@@ -215,7 +216,8 @@
*/
function Header()
{
- // //Logo
+ //Logo
+ if(file_exists(LOGO_SHOP_FOR_PRINT))
$this->Image(LOGO_SHOP_FOR_PRINT,5,10,50,0,'',HTTP_SERVER.DIR_WS_CATALOG);
}
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/data/91_osc_configuration.sql 2012-04-27 07:26:40 UTC (rev 4331)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/data/91_osc_configuration.sql 2012-04-27 07:47:49 UTC (rev 4332)
@@ -257,4 +257,7 @@
UPDATE osc_configuration SET configuration_key = 'MAX_DISPLAY_ORDER_HISTORY',configuration_title = 'MAX_DISPLAY_ORDER_HISTORY_S',configuration_description = 'MAX_DISPLAY_ORDER_HISTORY_L',configuration_group_id = 28,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'MAX_DISPLAY_ORDER_HISTORY';
UPDATE osc_configuration SET configuration_key = 'USE_MODELE_PDF',configuration_title = 'USE_MODELE_PDF_S',configuration_description = 'USE_MODELE_PDF_L',configuration_group_id = 128,use_function = NULL,set_function = '',last_modified = NULL WHERE configuration_key = 'USE_MODELE_PDF';
UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_ID',configuration_title = 'DEFAULT_ORDERS_STATUS_ID_S',configuration_description = 'DEFAULT_ORDERS_STATUS_ID_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ID';
-UPDATE osc_configuration SET configuration_key = 'ORDERS_NUMBER_PREFIX',configuration_title = 'ORDERS_NUMBER_PREFIX_S',configuration_description = 'ORDERS_NUMBER_PREFIX_L',configuration_group_id = 129,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'ORDERS_NUMBER_PREFIX';
+
+
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', '', 'ORDERS_NUMBER_PREFIX_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
+
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql 2012-04-27 07:26:40 UTC (rev 4331)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql 2012-04-27 07:47:49 UTC (rev 4332)
@@ -15,4 +15,7 @@
-ALTER TABLE osc_holding_orders ADD orders_prefix VARCHAR( 32 ) NULL AFTER orders_id ;
\ No newline at end of file
+ALTER TABLE osc_holding_orders ADD orders_prefix VARCHAR( 32 ) NULL AFTER orders_id ;
+
+ALTER TABLE osc_holding_orders ADD class_payment VARCHAR( 30 ) NULL;
+ALTER TABLE osc_holding_orders ADD class_shipping VARCHAR( 30 ) NULL;
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders_products.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders_products.sql 2012-04-27 07:47:49 UTC (rev 4332)
@@ -0,0 +1,17 @@
+--+######################################################################--+
+--| 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_holding_orders_products ADD products_type int(1) NOT NULL DEFAULT '1' AFTER products_id ;
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/content/checkout_payment.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/checkout_payment.php 2012-04-27 07:26:40 UTC (rev 4331)
+++ trunk/catalog/templates/defaut/includes/content/checkout_payment.php 2012-04-27 07:47:49 UTC (rev 4332)
@@ -17,7 +17,7 @@
<h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h2>
- <?php echo tep_draw_form('checkout_payment', tep_href_link('checkout.php'/*FILENAME_CHECKOUT_CONFIRMATION*/, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>
+ <?php echo tep_draw_form('checkout_payment', tep_href_link(/*'checkout.php'*/FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>
<?php /** Retour des erreurs */
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) { ?>
Modified: trunk/catalog/templates/defaut/includes/content/checkout_shipping.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/checkout_shipping.php 2012-04-27 07:26:40 UTC (rev 4331)
+++ trunk/catalog/templates/defaut/includes/content/checkout_shipping.php 2012-04-27 07:47:49 UTC (rev 4332)
@@ -15,7 +15,7 @@
<h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h2>
- <?php echo tep_draw_form('checkout_address', tep_href_link('checkout.php'/*FILENAME_CHECKOUT_SHIPPING*/, '', 'SSL')) . '<p>' . tep_draw_hidden_field('action', 'process') . '</p>'; ?>
+ <?php echo tep_draw_form('checkout_address', tep_href_link(/*'checkout.php'*/FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . '<p>' . tep_draw_hidden_field('action', 'process') . '</p>'; ?>
<div class="contentBox shippingAddress">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-27 07:26:51
|
Revision: 4331
http://oscss.svn.sourceforge.net/oscss/?rev=4331&view=rev
Author: oscim
Date: 2012-04-27 07:26:40 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
suppressin element obsolete et suppression gestion des module de paiement dans la page bientot obsolete modules.php
Modified Paths:
--------------
trunk/catalog/admin/includes/content/modules.top.inc
Removed Paths:
-------------
trunk/catalog/includes/languages/fr_FR/modules/payment/cod.php
Modified: trunk/catalog/admin/includes/content/modules.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/modules.top.inc 2012-04-27 07:25:57 UTC (rev 4330)
+++ trunk/catalog/admin/includes/content/modules.top.inc 2012-04-27 07:26:40 UTC (rev 4331)
@@ -31,7 +31,7 @@
case 'process':
$code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout/','key_BO'=>'MODULE_CHECKOUT_PROCESS_INSTALLED_BO', 'value_BO'=>MODULE_CHECKOUT_PROCESS_INSTALLED_BO, 'prefix'=>'Pr');
// $code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED,'key_BO'=>'MODULE_SHIPPING_INSTALLED_BO', 'value_BO'=>MODULE_SHIPPING_INSTALLED_BO, 'module_directory'=>'shipping/', 'prefix'=>'');
- $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'key_BO'=>'MODULE_PAYMENT_INSTALLED_BO', 'value_BO'=>MODULE_PAYMENT_INSTALLED_BO,'module_directory'=> 'payment/', 'prefix'=>'');
+// $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'key_BO'=>'MODULE_PAYMENT_INSTALLED_BO', 'value_BO'=>MODULE_PAYMENT_INSTALLED_BO,'module_directory'=> 'payment/', 'prefix'=>'');
// $code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'key_BO'=>'MODULE_ORDER_TOTAL_INSTALLED_BO', 'value_BO'=>MODULE_ORDER_TOTAL_INSTALLED_BO, 'module_directory'=> 'order_total/', 'prefix'=>'');
$code_inistalletd_array['orders']=array('key_BO'=>'MODULE_ORDERS_INSTALLED_BO', 'value_BO'=>MODULE_ORDERS_INSTALLED_BO, 'module_directory'=> 'orders/', 'prefix'=>'');
break;
Deleted: trunk/catalog/includes/languages/fr_FR/modules/payment/cod.php
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/payment/cod.php 2012-04-27 07:25:57 UTC (rev 4330)
+++ trunk/catalog/includes/languages/fr_FR/modules/payment/cod.php 2012-04-27 07:26:40 UTC (rev 4331)
@@ -1,16 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 02/09/11, 09:52
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
- define('MODULE_PAYMENT_COD_TEXT_TITLE',"Paiement à la livraison" );
- define('MODULE_PAYMENT_COD_TEXT_DESCRIPTION',"(module cod) Paiement à la livraison" );
-if(!defined('MODULE_PAYMENT_COD_SORT_ORDER'))define('MODULE_PAYMENT_COD_SORT_ORDER', 'ordre de tri');
-if(!defined('MODULE_PAYMENT_COD_STATUS'))define('MODULE_PAYMENT_COD_STATUS', 'type de taxe');
-if(!defined('MODULE_PAYMENT_COD_ORDER_STATUS_ID'))define('MODULE_PAYMENT_COD_ORDER_STATUS_ID', 'Status Item');
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-27 07:26:09
|
Revision: 4330
http://oscss.svn.sourceforge.net/oscss/?rev=4330&view=rev
Author: oscim
Date: 2012-04-27 07:25:57 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
Correction coquille dans les page de configuration des expeditions, lors modification des zone de livraison
Ajout d'une section pour la prise en charge des zone et module de paiement,
correction coquille dans le sqlgeozones
ajustement des menu correspondant, et mise a niveau install et section upgrade
correction retour visuel indesirable si aucune commande dans mon compte public.
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
trunk/catalog/admin/includes/modules/pages/geo_zones.php
trunk/catalog/includes/modules/payment/cod.php
trunk/catalog/includes/modules/payment/moneyorder.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration_group.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_geo_zones.sql
trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/configuration/modpayment.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt
trunk/catalog/admin/includes/modules/configuration/modpayment.php
trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt
Modified: trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2012-04-27 07:25:57 UTC (rev 4330)
@@ -70,12 +70,18 @@
$where ='';
if(isset($option['id'])) $where .="AND geo_zone_id = '".(int)$option['id']."' ";
- $sql_data_array['geo_zone_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'1';
- $sql_data_array['geo_zone_grp'] = str_replace(' ','_',(isset($option['grp'])) ? tep_db_prepare_input($option['grp']) :'NULL');
+ if(isset($option['type']))
+ $sql_data_array['geo_zone_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'1';
+ if(isset($option['name']))
+ $sql_data_array['geo_zone_grp'] = str_replace(' ','_',(isset($option['grp'])) ? tep_db_prepare_input($option['grp']) :'NULL');
+
+ if(isset($option['type']))
$sql_data_array['geo_zone_name'] = (isset($option['name'])) ? tep_db_prepare_input($option['name']) :'NULL';
- $sql_data_array['geo_zone_description'] = (isset($option['description'])) ? tep_db_prepare_input($option['description']) :'NULL';
+ if(isset($option['description']))
+ $sql_data_array['geo_zone_description'] = (isset($option['description'])) ? tep_db_prepare_input($option['description']) :'NULL';
+
$sql_data_array['last_modified'] = 'now()';
$res=tep_db_perform(TABLE_GEO_ZONES, $sql_data_array, 'update' , substr($where,3) );
Added: trunk/catalog/admin/includes/gabarit/configuration/modpayment.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modpayment.listing.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/configuration/modpayment.listing.gab 2012-04-27 07:25:57 UTC (rev 4330)
@@ -0,0 +1,217 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 20:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief mise en forme de la gestion du stock
+
+ @note
+ les id css de type (id="modpayment-xxxx") sont urilisé dans la class associé, pour replacer la page apres enregsitrement
+*/
+?>
+
+<div id="ssmenu">
+ <?php echo tep_ssmenu_configuration($_GET['gparentID']) ?>
+</div>
+
+
+
+<h3 class="main-title"><?php echo __('heading modpayment configuration') ?></h3>
+
+
+ <div id="tabs">
+ <ul>
+<!-- <li><a href="#tabs-1"><?php echo __('tab shipping configuration'); ?></a></li> -->
+ <li><a href="#tabs-2"><?php echo __('tab shipping zones'); ?></a></li>
+ <li><a href="#tabs-3"><?php echo __('tab shipping modules'); ?></a></li>
+ </ul>
+
+<?php /*
+ <div id="tabs-1" class="tabPage">
+
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, FILENAME_CFG_127.'action=save_mutli') ?>
+ <div id="modpayment-config" class="block_form">
+
+
+ <fieldset class="block_field">
+ <legend><?php echo __('modpayment legend localisation entrepot') ?></legend>
+ <div class="block_input">
+ <?php $row = modpayment::$list['SHIPPING_ORIGIN_COUNTRY']; ?>
+ <div class="fleft w_50">
+ <label title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->description). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ <?php $row = modpayment::$list['SHIPPING_ORIGIN_ZIP']; ?>
+ <div class="fleft w_50">
+ <label title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->description). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </div>
+ </fieldset>
+
+
+ <fieldset class="block_field">
+ <?php $row = modpayment::$list['SHIPPING_MAX_WEIGHT']; ?>
+ <legend title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></legend>
+
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </p>
+ </fieldset>
+
+
+ <?php /// Attribut produit / option stock associé ?>
+ <fieldset class="block_field">
+ <legend class="block_field-title"><?php echo __('modpayment legend other') ?></legend>
+
+ <ul class="block_input">
+ <?php foreach(modpayment::$list as $row)
+ if(!in_array($row->key,array('SHIPPING_ORIGIN_COUNTRY', 'SHIPPING_ORIGIN_ZIP', 'SHIPPING_MAX_WEIGHT', 'HEADING_IMAGE_HEIGHT', 'SUBCATEGORY_IMAGE_WIDTH', 'SUBCATEGORY_IMAGE_HEIGHT', 'POPUP_IMAGE_WIDTH','POPUP_IMAGE_HEIGHT','STACK_IMAGE_WIDTH','STACK_IMAGE_HEIGHT','JPEG_QUALITY')) ) { ?>
+ <li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
+
+ <div class="block_input tirroir">
+ <label><?php echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </li>
+ <?php } ?>
+ </ul>
+ </fieldset>
+
+ <div class="button_nav">
+ <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
+ </div>
+
+
+ <!-- <div class="block_field">
+ <h4 class="block_field-title"><?php echo __('modpayment legend brief') ?></h4>
+
+ <p class="block_field-text"><?php printf(__('modpayment text path images %s'), DIR_FS_CATALOG_IMAGES ) ?></p>
+ <p class="block_field-text"><?php printf(__('modpayment text url images %s'), tep_catalog_href_link(DIR_WS_IMAGES,'','NONSSL',false) ) ?></p>
+
+ <p class="block_field-text"><?php echo __('modpayment text brief') ?></p>
+
+ </div>-->
+ </div>
+ </form>
+ </div>
+ */ ?>
+
+
+
+
+ <div id="tabs-2" class="tabPage">
+ <?php /** Liste des zone de livraison */ ?>
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, FILENAME_CFG_127.'action=zones') ?>
+ <div id="modpayment-zone" class="block_form">
+ <h4 class="main-title"><?php echo __('modpayment heading zone shipping'); ?></h4>
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading tax zones'); ?></th>
+ <th><?php echo __('table heading tax zones desc'); ?></th>
+ <th><?php echo __('table heading nbr sub'); ?></th>
+ <th><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- AJAX BLOCK -->
+
+ <?php foreach(modpayment::$zone as $row): ?>
+ <tr>
+ <td><?php echo tep_draw_input_field('modpayment[zone]['.$row->id.']','',$row->name, ' style="width:100%;" '); ?></td>
+ <td><?php echo $row->description; ?></td>
+ <td class="tcenter"><?php echo tep_date_short(empty($row->last_modified)? $row->date_added : $row->last_modified); ?></td>
+ <td class="tright"><?php echo '' ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
+ <div class="button_nav">
+ <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
+ </div>
+
+ </div>
+ </form>
+ </div>
+
+
+
+
+
+ <div id="tabs-3" class="tabPage">
+ <?php /** Liste des moduel de livraison */ ?>
+
+ <div id="modpayment-module" class="block_form">
+ <h4 class="main-title"><?php echo __('modpayment heading modules shipping'); ?></h4>
+
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading module code'); ?></th>
+ <th><?php echo __('table heading module title'); ?></th>
+ <th><?php echo __('table heading module desc'); ?></th>
+ <th><?php echo __('table heading module sort'); ?></th>
+ <th><?php echo __('table heading module status'); ?></th>
+ <th><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(modpayment::$module as $row): /*print_r($row)*/ ?>
+ <tr>
+ <td><?php echo $row->content->code; ?></td>
+ <td><?php echo $row->content->title; ?></td>
+ <td><?php echo $row->content->description; ?></td>
+ <td class="tcenter"><?php echo $row->content->sort_order; ?></td>
+ <td class="tcenter">
+ <?php echo modpayment::GetStatusMod($row); ?>
+ </td>
+ <td class="tright">
+ <?php echo modpayment::get_item_action($row); ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
+
+ <?php /** Form for edit config module */ ?>
+ <?php if(isset(modpayment::$moduleEdit)): ?>
+
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, FILENAME_CFG_127.'mod='.$_GET['mod'].'&action=modules-save') ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('modpayment heading Configuration du modules') ?></legend>
+ <?php echo modpayment::$moduleEdit; ?>
+
+ <div class="button_nav">
+ <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
+ </div>
+ </fieldset>
+ </form>
+
+ <?php endif; ?>
+
+
+ </div>
+
+
+ </div>
+
+</div>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt 2012-04-27 07:25:57 UTC (rev 4330)
@@ -0,0 +1,49 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 27/03/2012, 20:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+$lang['heading modpayment configuration']="Configuration des paiements de commandes" ;
+
+$lang['tab shipping configuration']="Configuration" ;
+$lang['tab shipping zones']="Zones" ;
+$lang['tab shipping modules']="Modules" ;
+
+
+$lang['modpayment legend localisation entrepot']="Localisation entrepot" ;
+$lang['modimages tailles txt intro']="Pour toutes les images, ces valeurs definissent les tailles (largeur et hauteur) maximun. Dans l'utilisation par defaut, (sans module specifique) les proportion de l'image sont conservées" ;
+$lang['modpayment legend other']="Autres" ;
+
+
+
+$lang['modpayment heading zone shipping']="Zones de paiement" ;
+$lang['modpayment heading modules shipping']="Modules de paiement" ;
+
+$lang['table heading tax zones']="Nom" ;
+$lang['table heading tax zones desc']="Description" ;
+$lang['table heading nbr sub']="crée/modifié" ;
+$lang['table heading action']="action" ;
+
+$lang['table heading module code']="Nom" ;
+$lang['table heading module title']="Description" ;
+$lang['table heading module desc']="crée/modifié" ;
+$lang['table heading module sort']="Ordre" ;
+$lang['table heading module status']="Etat" ;
+
+$lang['image config']="Configuration" ;
+
+/**
+ @remarks stock Valeur stocké en db pour conversion
+ @note
+ XXXX : key de configuration
+ XXXX_S : desciption courte
+ XXXX_L description longue
+*/
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-04-27 07:25:57 UTC (rev 4330)
@@ -100,6 +100,7 @@
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-config' ));
break;
+
/**
@brief Manage shipping zones
*/
@@ -165,7 +166,7 @@
sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
- if(isset($_GET['forceajax']))
+ if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-module' ));
}
@@ -273,21 +274,24 @@
*/
public function draw(){
global $action,$gparentID;
- if($action=='cfg') return;
+// if($action=='cfg') return;
-
-
switch($action){
case 'modules';
- return self::GetStatusMod( new objectInfo( array('status'=>(int)$_GET['flag'], 'content'=> new objectInfo(array('mod'=>(int)$_GET['mod'])) )) );
+ return self::GetStatusMod( new objectInfo( array('status'=>(int)$_GET['flag'], 'content'=> new objectInfo(array('mod'=>(int)$_GET['mod'])) )) );
break;
default:
self::$list = $this->load_db_values('');
- self::$zone =sqlgeozone::fetch(array('type'=>2), true);
+ $zone =sqlgeozone::fetch(array('type'=>2), true);
+
+ if(is_object($zone))
+ self::$zone[] = $zone;
+ else
+ self::$zone= $zone;
+
-
foreach(scan(DIR_FS_CATALOG_MODULES.'shipping/') as $row){
if( substr($row,-3) =='php'){
Added: trunk/catalog/admin/includes/modules/configuration/modpayment.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modpayment.php (rev 0)
+++ trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-04-27 07:25:57 UTC (rev 4330)
@@ -0,0 +1,348 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 27/03/2012, 19:49
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class modpayment
+*/
+
+
+define('FILENAME_CFG_127',"gparentID=127&gID=39&");
+
+Class modpayment
+ implements ext_configuration
+ {
+ /**
+ @var array
+ */
+ public static $list;
+ /**
+ @var array
+ */
+ public static $cfg;
+ /**
+ @var array
+ */
+ public static $zone;
+ /**
+ @var array
+ */
+ public static $module;
+ /**
+ @var array
+ */
+ public static $moduleEdit;
+
+
+
+ /**
+ */
+ function __construct(){
+ global $oscss;
+ $this->code=__CLASS__;
+ global $messageStack, $language,$lang;
+ if (!is_writeable(DIR_FS_TEMPLATES)) $messageStack->add(ERROR_DESTINATION_NOT_WRITEABLE. 'template/', 'error');
+
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/'.$this->code.'.txt');
+
+ self::$cfg =new sqlconfiguration();
+ }
+
+
+ /**
+ Action Prise en charge par le modules
+ @param
+ @e global $action
+ @e global $messageStack
+ */
+ public function draw_action(){
+ global $action,$messageStack;
+
+ $DB=Database::getInstance();
+ $gparentID = tep_db_prepare_input($_GET['gparentID']);
+ $gID= tep_db_prepare_input($_GET['gID']);
+
+ switch($action){
+ /**
+ @brief save Config base page
+ */
+ case 'save_mutli':
+ if(tep_not_null($gID) ){
+
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+
+ foreach($liste as $row) {
+
+ if(isset($_POST['configuration'][$row->key])) {
+ $configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
+
+ if( ($res=sqlconfiguration::update(array('key'=>$row->key , 'value'=>tep_db_input($configuration_value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
+
+ }
+
+ }
+
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+
+ }
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modpayment-config' ));
+ break;
+
+ /**
+ @brief Manage payment zones
+ */
+ case 'zones':
+
+ if(isset($_POST[__CLASS__]['zone']) && is_array($_POST[__CLASS__]['zone']) ){
+
+ foreach($_POST[__CLASS__]['zone'] as $key=>$row){
+ $sql_a['id'] = (int)tep_db_prepare_input($key);
+ $sql_a['name'] = tep_db_prepare_input($row);
+
+ sqlgeozone::update($sql_a);
+ }
+
+ }
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modpayment-zone' ));
+ break;
+
+ /**
+ @brief Manage payment zones
+ */
+ case 'modules':
+
+
+ if(isset($_GET['flag'])){
+
+ $mod=tep_db_prepare_input($_GET['mod']);
+ $flag=(int)tep_db_prepare_input($_GET['flag']);
+
+ // call type module
+ $typeOri=modulesUtility::GetModttype('payment');
+ // get current value
+ $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+
+
+
+ // call
+ $type=modulesUtility::LoadModule('payment',$mod.'.php');
+ // force install
+ if( $flag ==1 && !$type->content->check()){
+ $type->content->remove();
+ $type->content->install();
+ }
+ // force remove
+ elseif( $flag == 0 && $type->content->check())
+ $type->content->remove();
+
+ // up module
+ $r=explode(';',$typeOri->value);
+ $result[]=( ($flag ==1 ) ? $mod.'.php;' : '' );
+
+ foreach($r as $v)
+ if(trim($v) !='')
+ if( (
+ $flag ==1
+ || ($flag == 0 && $v != trim($mod).'.php' )
+ )
+ && !in_array($v,$result)
+ ){
+ $result[]=$v;
+ }
+
+ sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modpayment-module' ));
+ }
+
+ break;
+ case 'modules-edit':
+
+ $mod=tep_db_prepare_input($_GET['mod']);
+ // call
+ $Mod=modulesUtility::LoadModule('payment',$mod.'.php');
+ $ModCurr = $Mod->content;
+ $i=0;
+ foreach($ModCurr->keys() as $value){
+ $i++;
+ $current = sqlconfiguration::fetch(array('key'=>$value));
+
+ $keys_extra[$value]['title'] = $current['configuration_title'];
+ $keys_extra[$value]['value'] = $current['configuration_value'];
+ $keys_extra[$value]['description'] = $current['configuration_description'];
+ $keys_extra[$value]['use_function'] = $current['use_function'];
+ $keys_extra[$value]['set_function'] = $current['set_function'];
+ }
+
+ self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
+ break;
+ /**
+ @brief save Config base page
+ */
+ case 'modules-save':
+ foreach($_POST['configuration'] as $key=>$value) {
+
+ $configuration_value = tep_db_prepare_input($value);
+
+ if( ($res=sqlconfiguration::update(array('key'=>$key , 'value'=>tep_db_input($value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
+
+ }
+
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='. $_GET['mod'] ));
+ break;
+ }
+ }
+
+ /**
+ @fn load_db_values($Id)
+ @param $Id int
+ @return array
+ */
+ public function load_db_values($Id){
+
+
+ $list_edit=array();
+ $gID = 7;
+
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+
+ foreach($list as $row) {
+
+ $cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
+
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
+ else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
+
+ $conf = $row;
+ $row->cfgValue=$cfgValue;
+ $row->value_field=$value_field;
+
+ $list_edit[$row->key]=$conf;
+ }
+
+ return $list_edit;
+ }
+
+
+ /**
+ @brief Appelé dans le header de page
+ */
+ public static function draw_header(){
+ ?>
+ <style type="text/css">
+ #central form label {
+ display: inline-block;
+ font-weight: normal;
+ margin: 5px 10px;
+ text-align: left;
+ white-space: pre-wrap;
+ width: 90%;
+ }
+ #central form label {
+ width:100%;
+ font-weight:bold;
+ }
+ </style>
+ <?php
+ }
+
+
+ /**
+ @brief Contenu central
+ */
+ public function draw(){
+ global $action,$gparentID;
+// if($action=='cfg') return;
+
+ switch($action){
+ case 'modules';
+ return self::GetStatusMod( new objectInfo( array('status'=>(int)$_GET['flag'], 'content'=> new objectInfo(array('mod'=>(int)$_GET['mod'])) )) );
+ break;
+
+ default:
+ self::$list = $this->load_db_values('');
+
+ $zone =sqlgeozone::fetch(array('type'=>1), true);
+
+ if(is_object($zone))
+ self::$zone[] = $zone;
+ else
+ self::$zone= $zone;
+
+
+ foreach(scan(DIR_FS_CATALOG_MODULES.'payment/') as $row){
+ if( substr($row,-3) =='php'){
+
+ $class = substr($row,0, -4);
+
+ self::$module[]=modulesUtility::LoadModule('payment', $row);
+
+ }
+ }
+
+ return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
+ }
+ }
+
+
+
+ /**
+ @fn get_item_action($orders)
+ @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 $orders array
+ @return string
+ */
+ public static function get_item_action($row){
+ global $SecuKey;
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '',
+ (($row->status)
+ ? sprintf(CsrtAction::getLink('row_action_right', __('image config'), 'config'), '', tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127.'action=modules-edit&mod='.$row->content->code ),'' )
+ : ''
+ )
+ );
+ }
+
+ /**
+ @brief return format html for row status
+ @param $product array restuts row
+ @return string html
+ */
+ public static function GetStatusMod($row){
+ $exclude=array('action','mod','forceajax','type','class','function','funct', 'mod');
+ $query_s=FILENAME_CFG_127.'action=modules&mod=' . $row->content->code.'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params($exclude).$query_s.(($row->status == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$row->status,
+ ( ($row->status == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/geo_zones.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/geo_zones.php 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/admin/includes/modules/pages/geo_zones.php 2012-04-27 07:25:57 UTC (rev 4330)
@@ -108,12 +108,11 @@
self::init();
if(!empty(self::$saction) ||!empty( self::$getzID) ){
- $zones_query_raw = "select geo_zone_id, geo_zone_name, geo_zone_description from " . TABLE_GEO_ZONES . " WHERE geo_zone_id='". self::$getzID."' " ;
- $zones_query = tep_db_query($zones_query_raw);
- $thezone=tep_db_fetch_array($zones_query);
+ $zones_query_raw = "select geo_zone_id, geo_zone_name, geo_zone_description from " . TABLE_GEO_ZONES . " WHERE geo_zone_id='". self::$getzID."' " ;
+ $zones_query = tep_db_query($zones_query_raw);
+ $thezone=tep_db_fetch_array($zones_query);
}
-
switch (self::$action) {
@@ -418,38 +417,38 @@
$query_raw = "SELECT geo_zone_grp as text , geo_zone_grp as id FROM " . TABLE_GEO_ZONES . " GROUP BY id";
$currency_query = $DB->query($query_raw);
// $zones=
- self::$geoGrpDispo = $currency_query->fetchAllAssoc();
+ self::$geoGrpDispo = $currency_query->fetchAllAssoc();
- if (self::$is_zone) {
- $query_raw = "select geo_zone_id, geo_zone_name, geo_zone_type, geo_zone_grp, geo_zone_description, last_modified, date_added from " . TABLE_GEO_ZONES . " WHERE geo_zone_id='".$ID."' ";
- $currency_query = $DB->query($query_raw);
- $zones=$currency_query->fetchAssoc();
+ if (self::$is_zone) {
+ $query_raw = "select geo_zone_id, geo_zone_name, geo_zone_type, geo_zone_grp, geo_zone_description, last_modified, date_added from " . TABLE_GEO_ZONES . " WHERE geo_zone_id='".$ID."' ";
+ $currency_query = $DB->query($query_raw);
+ $zones=$currency_query->fetchAssoc();
-/**
- TODO desactived State
-*/
- $num_zones_query = $DB->query("select count(*) as num_zones from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$zones['geo_zone_id'] . "' group by geo_zone_id");
- $num_zones =$num_zones_query->fetchAssoc();
- $zones['num_zones'] = ($num_zones['num_zones'] > 0) ? $num_zones['num_zones'] : 0;
+ /**
+ TODO desactived State
+ */
+ $num_zones_query = $DB->query("select count(*) as num_zones from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$zones['geo_zone_id'] . "' group by geo_zone_id");
+ $num_zones =$num_zones_query->fetchAssoc();
+ $zones['num_zones'] = ($num_zones['num_zones'] > 0) ? $num_zones['num_zones'] : 0;
- /// get All grp other and respect type current
- $query_raw = "SELECT geo_zone_name as title , geo_zone_id as id FROM " . TABLE_GEO_ZONES . " WHERE geo_zone_grp = '".$zones['geo_zone_grp']."' AND geo_zone_type='".$zones['geo_zone_type']."' "; //AND geo_zone_id <> '".$zones['geo_zone_id']."' ";
- $currency_query = $DB->query($query_raw);
- $zones['grp_other'] = $currency_query->fetchAllAssoc();
+ /// get All grp other and respect type current
+ $query_raw = "SELECT geo_zone_name as title , geo_zone_id as id FROM " . TABLE_GEO_ZONES . " WHERE geo_zone_grp = '".$zones['geo_zone_grp']."' AND geo_zone_type='".$zones['geo_zone_type']."' "; //AND geo_zone_id <> '".$zones['geo_zone_id']."' ";
+ $currency_query = $DB->query($query_raw);
+ $zones['grp_other'] = $currency_query->fetchAllAssoc();
- /// get country not in group all
- $zones_query_raw = "select * from " . TABLE_COUNTRIES . " c
- where not exists
- (
- select 1
- from ".TABLE_ZONES_TO_GEO_ZONES." g2z, " . TABLE_GEO_ZONES . " gz WHERE ( g2z.zone_country_id = c.countries_id OR g2z.zone_country_id = 0 ) AND gz.geo_zone_id = g2z.geo_zone_id AND geo_zone_grp = '".$zones['geo_zone_grp']."' AND geo_zone_type='".$zones['geo_zone_type']."'
- )
- ";
- $currency_query = $DB->query($zones_query_raw);
- $zones['grp_notin'] = $currency_query->fetchAllAssoc();
+ /// get country not in group all
+ $zones_query_raw = "select * from " . TABLE_COUNTRIES . " c
+ where not exists
+ (
+ select 1
+ from ".TABLE_ZONES_TO_GEO_ZONES." g2z, " . TABLE_GEO_ZONES . " gz WHERE ( g2z.zone_country_id = c.countries_id OR g2z.zone_country_id = 0 ) AND gz.geo_zone_id = g2z.geo_zone_id AND geo_zone_grp = '".$zones['geo_zone_grp']."' AND geo_zone_type='".$zones['geo_zone_type']."'
+ )
+ ";
+ $currency_query = $DB->query($zones_query_raw);
+ $zones['grp_notin'] = $currency_query->fetchAllAssoc();
- }
+ }
if(!empty(self:: $getsID)){
Added: trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt (rev 0)
+++ trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt 2012-04-27 07:25:57 UTC (rev 4330)
@@ -0,0 +1,16 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 27/04/2012, 00:03
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+ $lang['MODULE_PAYMENT_COD_TEXT_TITLE']="Paiement à la livraison" ;
+ $lang['MODULE_PAYMENT_COD_TEXT_DESCRIPTION']="(module cod) Paiement à la livraison" ;
+ $lang['MODULE_PAYMENT_COD_SORT_ORDER']="ordre de tri";
+ $lang['MODULE_PAYMENT_COD_STATUS']="type de taxe";
+ $lang['MODULE_PAYMENT_COD_ORDER_STATUS_ID']="Status Item";
+?>
\ No newline at end of file
Modified: trunk/catalog/includes/modules/payment/cod.php
===================================================================
--- trunk/catalog/includes/modules/payment/cod.php 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/includes/modules/payment/cod.php 2012-04-27 07:25:57 UTC (rev 4330)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/01/11, 11:42
+ @version 2.1.1
+ @date 27/04/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -20,9 +20,9 @@
global $order;
$this->code = 'cod';
- $this->title = MODULE_PAYMENT_COD_TEXT_TITLE;
- $this->description = MODULE_PAYMENT_COD_TEXT_DESCRIPTION;
- $this->sort_order = MODULE_PAYMENT_COD_SORT_ORDER;
+ $this->title = __('MODULE_PAYMENT_COD_TEXT_TITLE');
+ $this->description = __('MODULE_PAYMENT_COD_TEXT_DESCRIPTION');
+ $this->sort_order = (!defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : 0 );
$this->enabled = _cst_bool('MODULE_PAYMENT_COD_STATUS');
if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
Modified: trunk/catalog/includes/modules/payment/moneyorder.php
===================================================================
--- trunk/catalog/includes/modules/payment/moneyorder.php 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/includes/modules/payment/moneyorder.php 2012-04-27 07:25:57 UTC (rev 4330)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 20/11/11, 00:03
+ @date 27/04/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -28,7 +28,7 @@
$this->title = __('module payment moneyorder text title');
$this->description = __('module payment moneyorder text description');
$this->sort_order = (defined('MODULE_PAYMENT_MONEYORDER_SORT_ORDER')? MODULE_PAYMENT_MONEYORDER_SORT_ORDER : 0);
- $this->icon = (tep_not_null('MODULE_PAYMENT_MONEYORDER_ICON')? substr(MODULE_PAYMENT_MONEYORDER_ICON,strlen(DIR_WS_CATALOG)) : '');
+ $this->icon = ((defined('MODULE_PAYMENT_MONEYORDER_ICON') && tep_not_null('MODULE_PAYMENT_MONEYORDER_ICON'))? substr(MODULE_PAYMENT_MONEYORDER_ICON,strlen(DIR_WS_CATALOG)) : '');
$this->enabled = true;
if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0)$this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2012-04-27 07:25:57 UTC (rev 4330)
@@ -71,6 +71,7 @@
insert into osc_configuration_group values (40 , 'OPTION_ORDERS', NULL, 0 , 1, 127, '1', 'OPTION_ORDERS');
insert into osc_configuration_group values (129,'CONFIGURATION_ORDERS', NULL, 0, 1, 40, '0', 'MODORDER');
insert into osc_configuration_group values (7, 'EXPEDITION_EMBALLAGE', NULL, 0, 1, 40, '0', 'MODEXPEDITION');
+ insert into osc_configuration_group values (41, 'PAYMENT', NULL, 0, 1, 40, '0', 'MODPAYMENT');
-- hidden in menu configuration
insert into osc_configuration_group values (37 , 'VIEW_SYSINFO', NULL, 0 , 0, 120, '1', 'MODSYSINFO');
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-04-27 07:25:57 UTC (rev 4330)
@@ -294,18 +294,24 @@
UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_ID',configuration_title = 'DEFAULT_ORDERS_STATUS_ID_S',configuration_description = 'DEFAULT_ORDERS_STATUS_ID_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ID';
UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_COMPLETED',configuration_title = 'DEFAULT_ORDERS_STATUS_COMPLETED_S',configuration_description = 'DEFAULT_ORDERS_STATUS_COMPLETED_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_COMPLETED';
UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_ANNULATE',configuration_title = 'DEFAULT_ORDERS_STATUS_ID_S',configuration_description = 'DEFAULT_ORDERS_STATUS_ID_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ANNULATE';
-UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_PAYED',configuration_title = 'DEFAULT_ORDERS_STATUS_PAYED_S',configuration_description = 'DEFAULT_ORDERS_STATUS_PAYED_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_PAYED';
+
+
+
UPDATE osc_configuration SET configuration_key = 'ORDERS_NUMBER_PREFIX',configuration_title = 'ORDERS_NUMBER_PREFIX_S',configuration_description = 'ORDERS_NUMBER_PREFIX_L',configuration_group_id = 129,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'ORDERS_NUMBER_PREFIX';
-UPDATE osc_configuration SET configuration_key = 'USE_LOCAL_GENERAT_ORDER_REF',configuration_title = 'USE_LOCAL_GENERAT_ORDER_REF_S',configuration_description = 'USE_LOCAL_GENERAT_ORDER_REF_L',configuration_group_id = 129,use_function = 'tep_value_for_humain',set_function = 'tep_cfg_select_option(array(''true'', ''false''),',last_modified = NULL WHERE configuration_key = 'USE_LOCAL_GENERAT_ORDER_REF';
UPDATE osc_configuration SET configuration_key = 'PUBLIC_PAGE_TYPE',configuration_title = 'PUBLIC_PAGE_TYPE_S',configuration_description = 'PUBLIC_PAGE_TYPE_L',configuration_group_id = 130,use_function = NULL,set_function = NULL,last_modified = NOW() WHERE configuration_key = 'PUBLIC_PAGE_TYPE';
UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_COMPLETED',configuration_title = 'DEFAULT_ORDERS_STATUS_COMPLETED_S',configuration_description = 'DEFAULT_ORDERS_STATUS_COMPLETED_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_COMPLETED';
UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_ANNULATE',configuration_title = 'DEFAULT_ORDERS_STATUS_ID_S',configuration_description = 'DEFAULT_ORDERS_STATUS_ID_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_ANNULATE';
-UPDATE osc_configuration SET configuration_key = 'DEFAULT_ORDERS_STATUS_PAYED',configuration_title = 'DEFAULT_ORDERS_STATUS_PAYED_S',configuration_description = 'DEFAULT_ORDERS_STATUS_PAYED_L',configuration_group_id = 129,use_function = 'tep_cfg_pull_down_order_statuses(',set_function = 'tep_cfg_pull_down_order_statuses(',last_modified = NULL WHERE configuration_key = 'DEFAULT_ORDERS_STATUS_PAYED';
-UPDATE osc_configuration SET configuration_key = 'USE_LOCAL_GENERAT_ORDER_REF',configuration_title = 'USE_LOCAL_GENERAT_ORDER_REF_S',configuration_description = 'USE_LOCAL_GENERAT_ORDER_REF_L',configuration_group_id = 129,use_function = 'tep_value_for_humain',set_function = 'tep_cfg_select_option(array(''true'', ''false''),',last_modified = NULL WHERE configuration_key = 'USE_LOCAL_GENERAT_ORDER_REF';
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_PAYED_S', 'DEFAULT_ORDERS_STATUS_PAYED', '2', 'DEFAULT_ORDERS_STATUS_PAYED_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('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');
+
+
+
+
-- 128 General environement
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_PDF_S', 'USE_LOCAL_GENERAT_PDF', 'true', 'USE_LOCAL_GENERAT_PDF_L', '128', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_MODELE_PDF_S', 'USE_MODELE_PDF', 'harry', 'USE_MODELE_PDF_L', '128', '5', NULL, NOW(), NULL, '','2');
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration_group.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration_group.sql 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration_group.sql 2012-04-27 07:25:57 UTC (rev 4330)
@@ -15,8 +15,6 @@
TRUNCATE osc_configuration_group;
--- Preserver les ID
-
insert into osc_configuration_group values (100,'APPARENCE', NULL, 2, 1, 0, '1', 'CG_APPARENCE');
insert into osc_configuration_group values (19, 'PAGE_PRODUCT_DETAIL', NULL, 0, 1, 100, '0', 'CG_PAGE_PRODUCT_DETAIL');
insert into osc_configuration_group values (4, 'IMAGES', NULL, 0, 1, 100, '0', 'MODIMAGES');
@@ -29,15 +27,20 @@
-- insert into osc_configuration_group values (3, 'VALUE_MAXI', NULL, 0, 1, 110, '0', 'CG_VALUE_MAXI');
insert into osc_configuration_group values (2, 'VALUE_MINI', NULL, 0, 1, 110, '0', 'CG_VALUE_MINI');
insert into osc_configuration_group values (1, 'MY_BOUTIQUE', NULL, 0, 1, 110, '0', 'CG_MY_BOUTIQUE');
- insert into osc_configuration_group values (25 , 'NEW_PRODUCTS', NULL, 0 , 1, 110, '0', 'CG_NEW_PRODUCTS');
- insert into osc_configuration_group values (28 , 'MEMBRES_DETAIL', NULL, 0 , 1, 110, '0', 'MODMEMBRES');
+
insert into osc_configuration_group values (30 , 'BOX_LOCALIZATION_ORDERS_STATUS', NULL, 0 , 1, 110, '0', 'MODSTATUS');
- insert into osc_configuration_group values (31 , 'BOX_LOCALIZATION_LANGUAGES', NULL, 0 , 1, 110, '0', 'MODLANGUE');
+
insert into osc_configuration_group values (120,'CONFIG_AVANCE', NULL, 4, 1, 0, '1', 'CG_CONFIG_AVANCE');
insert into osc_configuration_group values (24 , 'CG_CIP_MANAGER', NULL, 0 , 1, 120, '0', 'CG_CIP_MANAGER');
- insert into osc_configuration_group values (33 , 'BOX_CONFIGURATION_EXTRA_FIELDS', NULL, 0 , 1, 120, '0', 'MODCUSTEXTRA');
+ insert into osc_configuration_group values (10, 'LOGGING', NULL, 0, 1, 120, '1', 'CG_LOGGING');
+ insert into osc_configuration_group values (12, 'OPTION_MAIL', NULL, 0, 1, 120, '0', 'MODMAIL');
+ insert into osc_configuration_group values (14, 'COMPRESSION', NULL, 0, 1, 120, '0', 'CG_COMPRESSION');
+ insert into osc_configuration_group values (15, 'SESSION', NULL, 0, 1, 120, '0', 'CG_SESSION');
+ insert into osc_configuration_group values (16, 'SEO_URL', NULL, 0, 1, 120, '0', 'MODSEOURL');
+ insert into osc_configuration_group values (31 , 'BOX_LOCALIZATION_LANGUAGES', NULL, 0 , 1, 120, '0', 'MODLANGUE');
+
-- insert into osc_configuration_group values (26, 'ATTRIBUTE_PRODUCT', NULL,0 , 1, 120, '0', 'CG_ATTRIBUTE_PRODUCT');
insert into osc_configuration_group values (128,'BOX_CONFIGURATION_ENVIRONEMENT', NULL, 0, 1, 120, '0', 'CFG_ENVIRONEMENT');
@@ -47,25 +50,30 @@
insert into osc_configuration_group values (22, 'RECOVER_CART_SALES', NULL, 0, 1, 126, '0', 'CG_RECOVER_CART_SALES');
insert into osc_configuration_group values (127,'CONFIG_COMM', NULL, 3, 1, 0, '1', 'CG_CONFIG_COMM');
- insert into osc_configuration_group values (7, 'EXPEDITION_EMBALLAGE', NULL, 0, 1, 127, '0', 'MODEXPEDITION');
+
insert into osc_configuration_group values (9, 'STOCK', NULL, 0, 1, 127, '0', 'MODSTOCK');
insert into osc_configuration_group values (11, 'OPTION_CATALOG', NULL, 0, 1, 127, '0', 'CG_OPTION_CATALOG');
- insert into osc_configuration_group values (10, 'LOGGING', NULL, 0, 1, 120, '1', 'CG_LOGGING');
- insert into osc_configuration_group values (12, 'OPTION_MAIL', NULL, 0, 1, 120, '0', 'MODMAIL');
- insert into osc_configuration_group values (14, 'COMPRESSION', NULL, 0, 1, 120, '0', 'CG_COMPRESSION');
- insert into osc_configuration_group values (15, 'SESSION', NULL, 0, 1, 120, '0', 'CG_SESSION');
- insert into osc_configuration_group values (16, 'SEO_URL', NULL, 0, 1, 120, '0', 'MODSEOURL');
- insert into osc_configuration_group values (6, 'OPTION_MODULES', NULL, 0, 1, 120, '0', 'CG_OPTION_MODULES');
- insert into osc_configuration_group values (129,'CONFIGURATION_ORDERS', NULL, 0, 1, 127, '0', 'MODORDER');
+
+-- insert into osc_configuration_group values (6, 'OPTION_MODULES', NULL, 0, 1, 120, '0', 'CG_OPTION_MODULES');
+
-- insert into osc_configuration_group values (130,'CONFIGURATION_DATATYPES', NULL, 0, 1, 127, '0', 'MODDATATYPE');
insert into osc_configuration_group values (35 , 'OPTION_PRODUCTS', NULL, 0 , 1, 127, '1', 'OPTION_PRODUCTS');
insert into osc_configuration_group values (36, 'CONFIG_PRODUCTS', NULL , 0, 1, 35, '0', 'DATATYPEPRODUCT');
insert into osc_configuration_group values (13, 'DOWNLOADS', NULL, 0, 1, 35, '0', 'MODDOWNLOADS');
insert into osc_configuration_group values (34 , 'BOX_CONFIGURATION_PRODUCTS_EXTRA_FIELDS', NULL, 0 , 1, 35, '0', 'MODPRODEXTRA');
+ insert into osc_configuration_group values (25 , 'NEW_PRODUCTS', NULL, 0 , 1, 35, '0', 'CG_NEW_PRODUCTS');
+ insert into osc_configuration_group values (39 , 'OPTION_CUSTOMERS', NULL, 0 , 1, 127, '1', 'OPTION_CUSTOMERS');
+ insert into osc_configuration_group values (28 , 'MEMBRES_DETAIL', NULL, 0 , 1, 39, '0', 'MODMEMBRES');
+ insert into osc_configuration_group values (33 , 'BOX_CONFIGURATION_EXTRA_FIELDS', NULL, 0 , 1, 39, '0', 'MODCUSTEXTRA');
+ insert into osc_configuration_group values (40 , 'OPTION_ORDERS', NULL, 0 , 1, 127, '1', 'OPTION_ORDERS');
+ insert into osc_configuration_group values (129,'CONFIGURATION_ORDERS', NULL, 0, 1, 40, '0', 'MODORDER');
+ insert into osc_configuration_group values (7, 'EXPEDITION_EMBALLAGE', NULL, 0, 1, 40, '0', 'MODEXPEDITION');
+ insert into osc_configuration_group values (41, 'PAYMENT', NULL, 0, 1, 40, '0', 'MODPAYMENT');
+
-- hidden in menu configuration
insert into osc_configuration_group values (37 , 'VIEW_SYSINFO', NULL, 0 , 0, 120, '1', 'MODSYSINFO');
-insert into osc_configuration_group values (38 , 'VIEW_SYSINFO', NULL, 0 , 0, 120, '1', 'MODCORECACHE');
+insert into osc_configuration_group values (38 , 'VIEW_SYSINFO', NULL, 0 , 0, 120, '1', 'MODCORECACHE');
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_geo_zones.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_geo_zones.sql 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_geo_zones.sql 2012-04-27 07:25:57 UTC (rev 4330)
@@ -15,5 +15,5 @@
-
-ALTER TABLE osc_geo_zones ADD geo_zone_type TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER geo_zone_id ;
\ No newline at end of file
+ALTER TABLE osc_geo_zones ADD geo_zone_type TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER geo_zone_id ;
+ALTER TABLE osc_geo_zones ADD geo_zone_grp varchar(32) not null AFTER geo_zone_type ;
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab 2012-04-26 20:21:48 UTC (rev 4329)
+++ trunk/catalog/templates/defaut/includes/gabarit/history/box_view.gab 2012-04-27 07:25:57 UTC (rev 4330)
@@ -11,19 +11,19 @@
*\file
*/
global $language,$customer_id;
-
?>
+<?php if(history::$current !=false): ?>
+ <div class="contentBox myOrders">
-<div class="contentBox myOrders">
-
- <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 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>
- </ul>
- </div>
-</div>
\ No newline at end of file
+ <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 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>
+ </ul>
+ </div>
+ </div>
+<?php endif ?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-26 20:21:54
|
Revision: 4329
http://oscss.svn.sourceforge.net/oscss/?rev=4329&view=rev
Author: oscim
Date: 2012-04-26 20:21:48 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
mise a jour zip pour un environement sans rewrite
Modified Paths:
--------------
trunk/catalog/install/no_rewrite.zip
Modified: trunk/catalog/install/no_rewrite.zip
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-26 20:01:53
|
Revision: 4328
http://oscss.svn.sourceforge.net/oscss/?rev=4328&view=rev
Author: oscim
Date: 2012-04-26 20:01:45 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
Correction coquille
Amelioration box currencie et information fournis
Ajout d'un widget d'apercu des tache programm?\195?\169es
ajout de colonne de suivi dans la table des cronjob et ajsutement code module et fichier sql d'install
Modified Paths:
--------------
trunk/catalog/Documents/admin/data/dashboard.xml
trunk/catalog/admin/includes/languages/fr_FR/widget/currencies_update_server.txt
trunk/catalog/admin/includes/modules/configuration/modprodextra.php
trunk/catalog/admin/includes/modules/pages/cronjob.php
trunk/catalog/admin/includes/widget/currencies_update_server.php
trunk/catalog/admin/includes/widget/homeStats.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_cronjob.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql
Added Paths:
-----------
trunk/catalog/admin/includes/languages/fr_FR/widget/CrondJoblast.txt
trunk/catalog/admin/includes/widget/CrondJoblast.php
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql
Modified: trunk/catalog/Documents/admin/data/dashboard.xml
===================================================================
--- trunk/catalog/Documents/admin/data/dashboard.xml 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/Documents/admin/data/dashboard.xml 2012-04-26 20:01:45 UTC (rev 4328)
@@ -189,6 +189,7 @@
<tools>
<left>
<widget>currencies_update_server</widget>
+ <widget>CrondJoblast</widget>
</left>
<right>
<widget>homeStats</widget>
Added: trunk/catalog/admin/includes/languages/fr_FR/widget/CrondJoblast.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/widget/CrondJoblast.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/widget/CrondJoblast.txt 2012-04-26 20:01:45 UTC (rev 4328)
@@ -0,0 +1,25 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 11/04/2012, 20:02
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['CrondJoblast heading']="Tâches programmées" ;
+
+$lang['CrondJoblast tab added']="Crées" ;
+$lang['CrondJoblast tab updated']="Modifiées" ;
+$lang['CrondJoblast tab prev']="Executés" ;
+$lang['CrondJoblast tab next']="A venir" ;
+
+$lang['CrondJoblast box reference']="id" ;
+$lang['CrondJoblast box name']="Nom" ;
+$lang['CrondJoblast box date']="ajoutées le" ;
+$lang['CrondJoblast box date up']="modifiées le" ;
+$lang['CrondJoblast box date next']="date" ;
+$lang['CrondJoblast box date prev']="date" ;
+$lang['CrondJoblast box status']="Etat" ;
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/widget/currencies_update_server.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/widget/currencies_update_server.txt 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/admin/includes/languages/fr_FR/widget/currencies_update_server.txt 2012-04-26 20:01:45 UTC (rev 4328)
@@ -1,11 +1,15 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9h
- @date 06/06/10, 15:49
+ @version 2.1.1
+ @date 26/04/2012, 20:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$lang['suivi des devises']="Suivi des devises" ;
+$lang['currencies defaut current currencies']="Devise par defaut : " ;
+$lang['currencies number configured devises']="Devises installées :" ;
+$lang['currencies last update']="Dernière mise à jour des taux :" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/configuration/modprodextra.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-04-26 20:01:45 UTC (rev 4328)
@@ -16,8 +16,15 @@
Class modprodextra{
+ /**
+ @def FILENAME le filename courant
+ */
const FILENAME = FILENAME_CONFIGURATION;
/**
+ @var object
+ */
+ public static $enable = true;
+ /**
@var array
*/
public static $selected_labels;
@@ -52,6 +59,11 @@
$this->code=__CLASS__;
+
+ //! @remarks depend Data_product active
+ if( ! DataTypes::is_active('product'))
+ $this->enable=false;
+
global $messageStack, $language,$oscss;
$oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/'.$this->code.'.txt');
@@ -374,6 +386,8 @@
switch($action){
+// case 'notinstalled':
+// break;
/**
@remarks value listing
Modified: trunk/catalog/admin/includes/modules/pages/cronjob.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cronjob.php 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/admin/includes/modules/pages/cronjob.php 2012-04-26 20:01:45 UTC (rev 4328)
@@ -1,10 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/12/11, 21:45
+ @date 26/04/2012, 21:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class cronjob
@@ -83,7 +83,7 @@
$_id = tep_db_prepare_input($_GET['cID']);
if (!empty($_id))
- $DB->query("update " . TABLE_CRONJOB . " set status = '" .(int) $_GET['flag'] . "' where id = '" . (int)$_id . "'");
+ $DB->query("update " . TABLE_CRONJOB . " set status = '" .(int) $_GET['flag'] . "', last_update = NOW(), user_update = '".$_SESSION['login_id']."' where id = '" . (int)$_id . "'");
}
if(!isset($_GET['forceajax']))
@@ -106,7 +106,7 @@
if(self::$CronMod->config)
$string=$mod->insert($_POST['configuration']);
- $query="INSERT INTO ".TABLE_CRONJOB." (id,scriptpath, name, time_interval, fire_time, time_last_fired,run_only_once, status,extra) VALUES ('','$scriptpath','$name','$time_interval','$fire_time','0','$run_only_once',0,'".$string."' )";
+ $query="INSERT INTO ".TABLE_CRONJOB." (id,scriptpath, name, time_interval, fire_time, time_last_fired,run_only_once, status,extra, date_added, user_added) VALUES ('','$scriptpath','$name','$time_interval','$fire_time','0','$run_only_once',0,'".$string."' ,NOW(),'".$_SESSION['login_id']."')";
$res=$DB->query($query);
$id= tep_db_insert_id($res);
tep_redirect(tep_href_link(self::FILENAME,'action=edit&cID=' . $id ));
@@ -124,7 +124,7 @@
$string=$mod->update($_POST['configuration']);
- $query="UPDATE ".TABLE_CRONJOB." SET name='$name', scriptpath='$scriptpath', time_interval='$time_interval', fire_time='$fire_time', run_only_once='$run_only_once', extra='".$string."' WHERE id='$id'";
+ $query="UPDATE ".TABLE_CRONJOB." SET name='$name', scriptpath='$scriptpath', time_interval='$time_interval', fire_time='$fire_time', run_only_once='$run_only_once', extra='".$string."' , last_update = NOW(), user_update = '".$_SESSION['login_id']."' WHERE id='$id'";
$DB->query($query);
tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $id));
Added: trunk/catalog/admin/includes/widget/CrondJoblast.php
===================================================================
--- trunk/catalog/admin/includes/widget/CrondJoblast.php (rev 0)
+++ trunk/catalog/admin/includes/widget/CrondJoblast.php 2012-04-26 20:01:45 UTC (rev 4328)
@@ -0,0 +1,141 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 11/04/2012, 20:02
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $conf;
+
+$_query = tep_db_query("SELECT *,date_added as date FROM " . TABLE_CRONJOB . " ORDER BY date_added DESC LIMIT ".$conf->widget_max_line);
+
+$_query2 = tep_db_query("SELECT *, last_update as date FROM " . TABLE_CRONJOB . " ORDER BY last_update DESC LIMIT ".$conf->widget_max_line);
+
+$_query3 = tep_db_query("SELECT *, fire_time as date FROM " . TABLE_CRONJOB . " WHERE status = '1' ORDER BY fire_time DESC LIMIT ".$conf->widget_max_line);
+
+$_query4 = tep_db_query("SELECT *, time_last_fired as date FROM " . TABLE_CRONJOB . " WHERE status = '0' ORDER BY time_last_fired DESC LIMIT ".$conf->widget_max_line);
+
+$add = ( !$_query->__get('numRows') ) ? false : true ;
+$up = ( !$_query2->__get('numRows') ) ? false : true ;
+$prev = ( !$_query->__get('numRows') ) ? false : true ;
+$next = ( !$_query2->__get('numRows') ) ? false : true ;
+
+if( !$up && !$add && !$prev && !$next )
+ return false;
+
+
+?>
+<div id="CrondJoblast" class="<?php echo $widg['class'] ?>">
+<h3><?php echo __('CrondJoblast heading'); ?></h3>
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('CrondJoblast tab added'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('CrondJoblast tab updated'); ?></a></li>
+ <li><a href="#tabs-3"><?php echo __('CrondJoblast tab next'); ?></a></li>
+ <li><a href="#tabs-4"><?php echo __('CrondJoblast tab prev'); ?></a></li>
+ </ul>
+
+ <div id="tabs-1" class="tabPage">
+
+ <table class="dataTableBase">
+ <tr>
+ <th><?php echo __('CrondJoblast box reference'); ?></th>
+ <th><?php echo __('CrondJoblast box name'); ?></th>
+ <th><?php echo __('CrondJoblast box date'); ?></th>
+ <th><?php echo __('CrondJoblast box status'); ?></th>
+ </tr>
+ <?php foreach($_query->fetchAllAssoc() as $row) : ?>
+ <tr>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_CRONJOB, 'cID='.$row['id'].'&action=edit') ?>"><?php echo $row['id'] ?></a></strong></td>
+ <td style="width:200px;"><?php echo $row['name'] ?></td>
+ <td class="tcenter"><?php echo tep_date_short($row['date']) ?></td>
+ <td class="tcenter">
+ <span class="edit-input-value">
+ <span class="Val Flag-<?php echo $row['status'] ?> txt"><?php echo (($row['status'] ==1)? __('CrondJoblast txt active') : __('CrondJoblast txt inactive') ) ?></span>
+ <span class="Val Flag-<?php echo $row['status'] ?> img"></span>
+ </span>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ </div>
+
+ <div id="tabs-2" class="tabPage">
+ <table class="dataTableBase">
+ <tr>
+ <th><?php echo __('CrondJoblast box reference'); ?></th>
+ <th><?php echo __('CrondJoblast box name'); ?></th>
+ <th><?php echo __('CrondJoblast box date up'); ?></th>
+ <th><?php echo __('CrondJoblast box status'); ?></th>
+ </tr>
+ <?php foreach($_query2->fetchAllAssoc() as $row) : ?>
+ <tr>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_CRONJOB, 'cID='.$row['id'].'&action=edit') ?>"><?php echo $row['id'] ?></a></strong></td>
+ <td style="width:200px;"><?php echo $row['name'] ?></td>
+ <td class="tcenter"><?php echo tep_date_short($row['date']) ?></td>
+ <td class="tcenter">
+ <span class="edit-input-value">
+ <span class="Val Flag-<?php echo $row['status'] ?> txt"><?php echo (($row['status'] ==1)? __('ProductsLast txt active') : __('ProductsLast txt inactive') ) ?></span>
+ <span class="Val Flag-<?php echo $row['status'] ?> img"></span>
+ </span>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ </div>
+
+
+ <div id="tabs-3" class="tabPage">
+ <table class="dataTableBase">
+ <tr>
+ <th><?php echo __('CrondJoblast box reference'); ?></th>
+ <th><?php echo __('CrondJoblast box name'); ?></th>
+ <th><?php echo __('CrondJoblast box date next'); ?></th>
+ <th><?php echo __('CrondJoblast box status'); ?></th>
+ </tr>
+ <?php foreach($_query3->fetchAllAssoc() as $row) : ?>
+ <tr>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_CRONJOB, 'cID='.$row['id'].'&action=edit') ?>"><?php echo $row['id'] ?></a></strong></td>
+ <td style="width:200px;"><?php echo $row['name'] ?></td>
+ <td class="tcenter"><?php echo tep_date_short($row['date']) ?></td>
+ <td class="tcenter">
+ <span class="edit-input-value">
+ <span class="Val Flag-<?php echo $row['status'] ?> txt"><?php echo (($row['status'] ==1)? __('ProductsLast txt active') : __('ProductsLast txt inactive') ) ?></span>
+ <span class="Val Flag-<?php echo $row['status'] ?> img"></span>
+ </span>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ </div>
+
+
+ <div id="tabs-4" class="tabPage">
+ <table class="dataTableBase">
+ <tr>
+ <th><?php echo __('CrondJoblast box reference'); ?></th>
+ <th><?php echo __('CrondJoblast box name'); ?></th>
+ <th><?php echo __('CrondJoblast box date prev'); ?></th>
+ <th><?php echo __('CrondJoblast box status'); ?></th>
+ </tr>
+ <?php foreach($_query4->fetchAllAssoc() as $row) : ?>
+ <tr>
+ <td class="tcenter"><strong><a href="<?php echo tep_href_link(FILENAME_CRONJOB, 'cID='.$row['id'].'&action=edit') ?>"><?php echo $row['id'] ?></a></strong></td>
+ <td style="width:200px;"><?php echo $row['name'] ?></td>
+ <td class="tcenter"><?php echo tep_date_short($row['date']) ?></td>
+ <td class="tcenter">
+ <span class="edit-input-value">
+ <span class="Val Flag-<?php echo $row['status'] ?> txt"><?php echo (($row['status'] ==1)? __('ProductsLast txt active') : __('ProductsLast txt inactive') ) ?></span>
+ <span class="Val Flag-<?php echo $row['status'] ?> img"></span>
+ </span>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ </div>
+ </div>
+</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/widget/currencies_update_server.php
===================================================================
--- trunk/catalog/admin/includes/widget/currencies_update_server.php 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/admin/includes/widget/currencies_update_server.php 2012-04-26 20:01:45 UTC (rev 4328)
@@ -4,13 +4,25 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 12/04/2012, 20:02
+ @date 26/04/2012, 20:02
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+$DB=Database::getInstance();
+
+$query = $DB->query("SELECT count(*) as tot, last_updated FROM ".TABLE_CURRENCIES." WHERE 1 ORDER BY last_updated DESC");
+$dat = $query->fetchAssoc();
+
?>
-<div id="currencies_update_server" class="<?php echo $widg['class'] ?>" >
+<div id="currencies" class="<?php echo $widg['class'] ?>" >
<h3><?php echo __('Suivi des devises') ?></h3>
- <p><?php echo '<a href="' . tep_href_link(FILENAME_CURRENCIES, 'page=1&cID=1&action=update') . '">' . IMAGE_UPDATE_CURRENCIES . '</a>'; ?></p>
+
+ <ul>
+ <li><?php echo __('currencies defaut current currencies') .' '. DEFAULT_CURRENCY ?></li>
+ <li><?php echo __('currencies number configured devises') .' '. $dat['tot'] ?></li>
+ <li><?php echo __('currencies last update') .' '. tep_datetime_short($dat['last_updated']) ?></li>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_CURRENCIES, 'page=1&cID=1&action=update') . '">' . IMAGE_UPDATE_CURRENCIES . '</a>'; ?></li>
+ </ul>
</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/widget/homeStats.php
===================================================================
--- trunk/catalog/admin/includes/widget/homeStats.php 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/admin/includes/widget/homeStats.php 2012-04-26 20:01:45 UTC (rev 4328)
@@ -4,20 +4,18 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 03/04/2012, 23:57
+ @date 26/04/2012, 23:57
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$info=tep_get_system_information();
-
// Get the database system version
$database_query = tep_db_query("SELECT VERSION()");
$database_version = tep_db_fetch_array($database_query);
// Calculate total db size/row count
-//$result = tep_db_query("SHOW TABLE STATUS FROM ".DB_DATABASE);
$result = tep_db_query("SHOW TABLE STATUS");
$total_records = $total_size = 0;
@@ -42,20 +40,25 @@
<div id="homeStats" class="<?php echo $widg['class'] ?>">
<h3><?php echo __('main info') ;?></h3>
<dl>
- <dt><?php echo __('text oscss version') ;?></dt>
- <dd><?php echo PROJECT_VERSION ;?> - <a href="<?php echo tep_href_link(FILENAME_ACA,'aca.php?action_type=generic&action_class=SvnUpdate&action_method=draw_form&action_type=generic') ?>"><?php echo __('Check for upgrade') ?></a></dd>
+ <dt><strong><?php echo __('text oscss version') ;?></strong></dt>
+ <dd>
+ <ul>
+ <li><?php echo PROJECT_VERSION ;?></li>
+ <li><a href="<?php echo tep_href_link(FILENAME_ACA,'aca.php?action_type=generic&action_class=SvnUpdate&action_method=draw_form&action_type=generic') ?>"><?php echo __('Check for upgrade') ?></a></li>
+ </ul>
+ </dd>
- <dt><?php echo __('environment') ;?></dt>
+ <dt><strong><?php echo __('environment') ;?></strong></dt>
<dd>
- <ul>
- <li><?php echo PHP_OS ?></li>
- <li><?php echo 'PHP :'. $info['php'].' <a href="'.tep_href_link(FILENAME_CONFIGURATION,'gID=36').'">'.__('Show info').'</a>' ?></li>
- <li><?php echo __('zend : ').$info['zend'] ?></li>
- <li><?php echo __('Accelerator : ').$php_accelerator ?></li>
- </ul>
+ <ul>
+ <li><?php echo PHP_OS ?></li>
+ <li><?php echo 'PHP :'. $info['php'].' <a href="'.tep_href_link(FILENAME_CONFIGURATION,'gmod=modsysinfo').'">'.__('Show info').'</a>' ?></li>
+ <li><?php echo __('zend : ').$info['zend'] ?></li>
+ <li><?php echo __('Accelerator : ').$php_accelerator ?></li>
+ </ul>
</dd>
- <dt><?php echo __('base de donnee') ;?></dt>
+ <dt><strong><?php echo __('base de donnee') ;?></strong></dt>
<dd>
<ul>
<li><?php echo __('SQL ').$info['db_connector'] ?></li>
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_cronjob.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_cronjob.sql 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_cronjob.sql 2012-04-26 20:01:45 UTC (rev 4328)
@@ -12,5 +12,5 @@
--+######################################################################--+
-INSERT INTO osc_cronjob ( scriptpath, name, time_interval, fire_time, time_last_fired, run_only_once, status) VALUES ( 'includes/modules/cronjob/clean_cache_dir', 'clean_cache_dir', '60', NOW(), NULL, 0, 1);
+INSERT INTO osc_cronjob ( scriptpath, name, time_interval, fire_time, time_last_fired, run_only_once, status, date_added, user_added) VALUES ( 'includes/modules/cronjob/clean_cache_dir', 'clean_cache_dir', '60', NOW(), NULL, 0, 1, NOW(), 1);
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql 2012-04-26 14:13:26 UTC (rev 4327)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql 2012-04-26 20:01:45 UTC (rev 4328)
@@ -21,6 +21,10 @@
time_last_fired datetime null,
run_only_once tinyint(1) NOT NULL,
status tinyint(1) NOT NULL,
+ date_added datetime NOT NULL,
+ date_update datetime NULL,
+ user_added int(11) NOT NULL,
+ user_update int(11) NULL,
extra text,
PRIMARY KEY (id)
) DEFAULT CHARSET=utf8 ;
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_cronjob.sql 2012-04-26 20:01:45 UTC (rev 4328)
@@ -0,0 +1,21 @@
+--+######################################################################--+
+--| 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_cronjob ADD COLUMN date_added datetime NOT NULL AFTER status;
+ALTER TABLE osc_cronjob ADD COLUMN date_update datetime NULL AFTER date_added;
+ALTER TABLE osc_cronjob ADD COLUMN user_added int(11) NOT NULL AFTER date_update;
+ALTER TABLE osc_cronjob ADD COLUMN user_update int(11) NULL AFTER user_added;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-26 14:13:37
|
Revision: 4327
http://oscss.svn.sourceforge.net/oscss/?rev=4327&view=rev
Author: oscim
Date: 2012-04-26 14:13:26 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
Correction gestion de langue avec blockage des langues dont les dossier correspondant sont absent et retour visuel dans le listing ;
correction coquille listing avec langue multiple
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/configuration/modlangue.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modlangue.txt
trunk/catalog/admin/includes/modules/configuration/datatypeproduct.php
trunk/catalog/admin/includes/modules/configuration/modlangue.php
trunk/catalog/common/classes/language.php
Modified: trunk/catalog/admin/includes/gabarit/configuration/modlangue.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modlangue.listing.gab 2012-04-26 09:15:52 UTC (rev 4326)
+++ trunk/catalog/admin/includes/gabarit/configuration/modlangue.listing.gab 2012-04-26 14:13:26 UTC (rev 4327)
@@ -26,22 +26,32 @@
<table class="dataTable">
<thead>
<tr>
- <th><?php echo __('table heading language name') ?></th>
- <th class="tleft" style="width:40px"><?php echo __('table heading language code') ?></th>
- <th class="tright"><?php echo __('table heading action') ?></th>
+ <th rowspan="2"><?php echo __('table heading language name') ?></th>
+ <th rowspan="2" class="tleft" style="width:40px"><?php echo __('table heading language code') ?></th>
+ <th colspan="2"><?php echo __('table heading language folder') ?></th>
+ <th rowspan="2" class="tright"><?php echo __('table heading action') ?></th>
</tr>
+ <tr>
+<!-- <th><?php echo __('table heading language name') ?></th> -->
+<!-- <th class="tleft" style="width:40px"><?php echo __('table heading language code') ?></th> -->
+ <th class="tleft" style="width:40px"><?php echo __('table heading language folder public') ?></th>
+ <th class="tleft" style="width:40px"><?php echo __('table heading language folder admin') ?></th>
+<!-- <th class="tright"><?php echo __('table heading action') ?></th> -->
+ </tr>
</thead>
<tbody>
- <?php foreach (modlangue::$liste as $theme): ?>
- <tr class="view parent dataTableRow <?php echo (($theme->languages_id==@$_GET['lID'])?'Selected' :'') ?>">
- <td><?php echo $theme->name ?></td>
- <td><?php echo $theme->code ?></td>
+ <?php foreach (modlangue::$liste as $lang): ?>
+ <tr class="view parent dataTableRow <?php echo (($lang->languages_id==@$_GET['lID'])?'Selected' :'') ?>">
+ <td><?php echo $lang->name ?></td>
+ <td><?php echo $lang->code ?></td>
+ <td><?php echo (language::check_langue($lang->directory)? 'ok' : '--') ?></td>
+ <td><?php echo (language::check_langue($lang->directory, false)? 'ok' : '--') ?></td>
<td class="row_action">
- <a class="buttonimg" href="<?php echo tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID')). 'lID=' .$theme->languages_id. '&action=edit') ?>"><?php echo tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT )?></a>
- <a class="buttonimg" href="<?php echo tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID')). 'lID=' . $theme->languages_id . '&action=delete') ?>"><?php echo tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE) ?></a>
+ <a class="buttonimg" href="<?php echo tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID')). 'lID=' .$lang->languages_id. '&action=edit') ?>"><?php echo tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT )?></a>
+ <a class="buttonimg" href="<?php echo tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID')). 'lID=' . $lang->languages_id . '&action=delete') ?>"><?php echo tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE) ?></a>
- <?php if (isset(modlangue::$lInfo) && is_object(modlangue::$lInfo) && ($theme->languages_id == modlangue::$lInfo->languages_id)) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); }
- else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','oID')). 'lID=' . $theme->languages_id) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
+ <?php if (isset(modlangue::$lInfo) && is_object(modlangue::$lInfo) && ($lang->languages_id == modlangue::$lInfo->languages_id)) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); }
+ else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','oID')). 'lID=' . $lang->languages_id) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
</td>
</tr>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modlangue.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modlangue.txt 2012-04-26 09:15:52 UTC (rev 4326)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modlangue.txt 2012-04-26 14:13:26 UTC (rev 4327)
@@ -10,6 +10,9 @@
$lang['heading title']="Langues" ;
$lang['table heading language name']="Langue" ;
$lang['table heading language code']="Code" ;
+$lang['table heading language folder']="Repertoires" ;
+$lang['table heading language folder public']="Public" ;
+$lang['table heading language folder admin']="Admin" ;
$lang['table heading action']="Action" ;
$lang['text info language name']="Nom : " ;
$lang['text info language code']="Code : " ;
Modified: trunk/catalog/admin/includes/modules/configuration/datatypeproduct.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/datatypeproduct.php 2012-04-26 09:15:52 UTC (rev 4326)
+++ trunk/catalog/admin/includes/modules/configuration/datatypeproduct.php 2012-04-26 14:13:26 UTC (rev 4327)
@@ -165,7 +165,7 @@
}
- $list->types = sqlstatus::fetch(array('type'=>'product'), true);
+ $list->types = sqlstatus::fetch(array('type'=>'product', 'language_id'=>$languages_id), true);
foreach($list->types as $row){
if((bool)!in_array($row->id, explode(',', TYPE_VIRTUAL_PRODUCTS)) )
Modified: trunk/catalog/admin/includes/modules/configuration/modlangue.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modlangue.php 2012-04-26 09:15:52 UTC (rev 4326)
+++ trunk/catalog/admin/includes/modules/configuration/modlangue.php 2012-04-26 14:13:26 UTC (rev 4327)
@@ -44,75 +44,82 @@
$DB=Database::getInstance();
- if (tep_not_null(self::$action)) {
- switch (self::$action) {
- case 'insert':
- $name = tep_db_prepare_input($_POST['name']);
- $code = tep_db_prepare_input($_POST['code']);
- $image = tep_db_prepare_input($_POST['image']);
- $directory = tep_db_prepare_input($_POST['directory']);
- $sort_order = tep_db_prepare_input($_POST['sort_order']);
+ switch (self::$action) {
+ case 'insert':
+ $name = tep_db_prepare_input($_POST['name']);
+ $code = tep_db_prepare_input($_POST['code']);
+ $image = tep_db_prepare_input($_POST['image']);
+ $directory = tep_db_prepare_input($_POST['directory']);
+ $sort_order = tep_db_prepare_input($_POST['sort_order']);
- $res=$DB->query("insert into " . TABLE_LANGUAGES . " (name, code, image, directory, sort_order) values ('" . tep_db_input($name) . "', '" . tep_db_input($code) . "', '" . tep_db_input($image) . "', '" . tep_db_input($directory) . "', '" . tep_db_input($sort_order) . "')");
- $insert_id = $res->__get('insertId');
- self::repliqu_db_lang($languages_id,$insert_id);
+ /**
+ @remarks check Dir
+ */
+ if( !language::check_langue($directory) && !language::check_langue($directory, false) ){
+ $messageStack->add_session(__('error this folder language no found'), 'error');
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'),false).'action=new'));
+ }
- if (isset($_POST['default']) && ($_POST['default'] == 'on')) {
- $DB->query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($code) . "' where configuration_key = 'DEFAULT_LANGUAGE'");
- }
+ $res=$DB->query("insert into " . TABLE_LANGUAGES . " (name, code, image, directory, sort_order) values ('" . tep_db_input($name) . "', '" . tep_db_input($code) . "', '" . tep_db_input($image) . "', '" . tep_db_input($directory) . "', '" . tep_db_input($sort_order) . "')");
+ $insert_id = $res->__get('insertId');
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'),false)));
- break;
+ self::repliqu_db_lang($languages_id,$insert_id);
- case 'save':
- $lID = tep_db_prepare_input($_GET['lID']);
- $name = tep_db_prepare_input($_POST['name']);
- $code = tep_db_prepare_input($_POST['code']);
- $image = tep_db_prepare_input($_POST['image']);
- $directory = tep_db_prepare_input($_POST['directory']);
- $sort_order = tep_db_prepare_input($_POST['sort_order']);
+ if (isset($_POST['default']) && ($_POST['default'] == 'on')) {
+ $DB->query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($code) . "' where configuration_key = 'DEFAULT_LANGUAGE'");
+ }
- tep_db_query("update " . TABLE_LANGUAGES . " set name = '" . tep_db_input($name) . "', code = '" . tep_db_input($code) . "', image = '" . tep_db_input($image) . "', directory = '" . tep_db_input($directory) . "', sort_order = '" . tep_db_input($sort_order) . "' where languages_id = '" . (int)$lID . "'");
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'),false)));
+ break;
- if ($_POST['default'] == 'on') {
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($code) . "' where configuration_key = 'DEFAULT_LANGUAGE'");
- }
+ case 'save':
+ $lID = tep_db_prepare_input($_GET['lID']);
+ $name = tep_db_prepare_input($_POST['name']);
+ $code = tep_db_prepare_input($_POST['code']);
+ $image = tep_db_prepare_input($_POST['image']);
+ $directory = tep_db_prepare_input($_POST['directory']);
+ $sort_order = tep_db_prepare_input($_POST['sort_order']);
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'),false). 'lID=' . $_GET['lID']));
- break;
+ tep_db_query("update " . TABLE_LANGUAGES . " set name = '" . tep_db_input($name) . "', code = '" . tep_db_input($code) . "', image = '" . tep_db_input($image) . "', directory = '" . tep_db_input($directory) . "', sort_order = '" . tep_db_input($sort_order) . "' where languages_id = '" . (int)$lID . "'");
- case 'deleteconfirm':
- $lID = tep_db_prepare_input($_GET['lID']);
+ if ($_POST['default'] == 'on') {
+ tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($code) . "' where configuration_key = 'DEFAULT_LANGUAGE'");
+ }
- $lng_query = tep_db_query("select languages_id from " . TABLE_LANGUAGES . " where code = '" . DEFAULT_CURRENCY . "'");
- $lng = tep_db_fetch_array($lng_query);
- if ($lng['languages_id'] == $lID) {
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '' where configuration_key = 'DEFAULT_CURRENCY'");
- }
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'),false). 'lID=' . $_GET['lID']));
+ break;
- $this->delete_db_lang((int)$lID);
+ case 'deleteconfirm':
+ $lID = tep_db_prepare_input($_GET['lID']);
- tep_db_query("delete from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");
+ $lng_query = tep_db_query("select languages_id from " . TABLE_LANGUAGES . " where code = '" . DEFAULT_CURRENCY . "'");
+ $lng = tep_db_fetch_array($lng_query);
+ if ($lng['languages_id'] == $lID) {
+ tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '' where configuration_key = 'DEFAULT_CURRENCY'");
+ }
+ $this->delete_db_lang((int)$lID);
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'), false). 'page=' . $_GET['page']));
- break;
+ tep_db_query("delete from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");
- case 'delete':
- $lID = tep_db_prepare_input($_GET['lID']);
- $lng_query = tep_db_query("select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");
- $lng = tep_db_fetch_array($lng_query);
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'), false). 'page=' . $_GET['page']));
+ break;
- self::$remove_language = true;
- if ($lng['code'] == DEFAULT_LANGUAGE) {
- self::$remove_language = false;
- $messageStack->add(__('error remove default language'), 'error');
- }
- break;
- }
+ case 'delete':
+ $lID = tep_db_prepare_input($_GET['lID']);
+
+ $lng_query = tep_db_query("select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");
+ $lng = tep_db_fetch_array($lng_query);
+
+ self::$remove_language = true;
+ if ($lng['code'] == DEFAULT_LANGUAGE) {
+ self::$remove_language = false;
+ $messageStack->add(__('error remove default language'), 'error');
+ }
+ break;
}
}
Modified: trunk/catalog/common/classes/language.php
===================================================================
--- trunk/catalog/common/classes/language.php 2012-04-26 09:15:52 UTC (rev 4326)
+++ trunk/catalog/common/classes/language.php 2012-04-26 14:13:26 UTC (rev 4327)
@@ -176,7 +176,7 @@
@param $public boolean false =admin
@return boolean
*/
- private static function check_langue($directory,$public){
+ public static function check_langue($directory,$public=true){
$base=(!$public)? DIR_FS_ADMIN : DIR_FS_CATALOG ;
if(is_dir($base.DIR_WS_LANGUAGES.$directory)) return true;
// elseif(tep_cst_define('OSCSS_ALTERNATE') == true && is_dir(CORE_PATH.DIR_WS_LANGUAGES.$directory)) return true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-26 09:16:03
|
Revision: 4326
http://oscss.svn.sourceforge.net/oscss/?rev=4326&view=rev
Author: oscim
Date: 2012-04-26 09:15:52 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
ajustement et coquille
Report modif sql manquante
Modified Paths:
--------------
trunk/catalog/common/classes/datatype_drivers/Data_diver.php
trunk/catalog/templates/defaut/includes/gabarit/box.languages.gab
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql
Modified: trunk/catalog/common/classes/datatype_drivers/Data_diver.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_diver.php 2012-04-26 09:03:14 UTC (rev 4325)
+++ trunk/catalog/common/classes/datatype_drivers/Data_diver.php 2012-04-26 09:15:52 UTC (rev 4326)
@@ -84,7 +84,7 @@
case 'unique':
// default:
if(
- (isset($_GET['divers']) && ( !in_array($_GET['divers'], array('home', 'index')) && count(@$_GET) ==1 ) ) // echap page homme ou index sans auter arguement
+ (isset($_GET['divers']) && ( !in_array($_GET['divers'], array('home', 'index')) /*&& count(@$_GET) ==1*/ ) ) // echap page homme ou index sans auter arguement
|| isset($_GET['aca_mod']) // prise en charge des module aca
)
return true;
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_holding_orders.sql 2012-04-26 09:15:52 UTC (rev 4326)
@@ -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_holding_orders ADD orders_prefix VARCHAR( 32 ) NULL AFTER orders_id ;
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/gabarit/box.languages.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/box.languages.gab 2012-04-26 09:03:14 UTC (rev 4325)
+++ trunk/catalog/templates/defaut/includes/gabarit/box.languages.gab 2012-04-26 09:15:52 UTC (rev 4326)
@@ -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.1.0
- @date 18/11/10, 01:28
+ @version 2.1.1
+ @date 27/12/11, 01:28
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,7 +13,7 @@
<ul class="languages">
<?php while (list($key, $value) = each($lng->catalog_languages)):?>
<li>
- <a href="<?php echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key) ?>" class="<?php if($language==$key) echo 'Selected' ?>"><?php echo tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) ?></a>
+ <a href="<?php echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key) ?>" class="<?php if($language==$key) echo 'Selected' ?>"> <img title="<?php echo $value['name'] ?>" alt="<?php echo $value['name'] ?>" src="<?php echo /*$page->getPathTemplate().*/DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'] ?>" /></a>
</li>
<?php endwhile; ?>
</ul>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-26 09:03:24
|
Revision: 4325
http://oscss.svn.sourceforge.net/oscss/?rev=4325&view=rev
Author: oscim
Date: 2012-04-26 09:03:14 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
suppression gabarit specifique, utilisation du gabarit par defaut
Removed Paths:
-------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.languages.gab
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.languages.gab
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.languages.gab 2012-04-26 09:02:13 UTC (rev 4324)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.languages.gab 2012-04-26 09:03:14 UTC (rev 4325)
@@ -1,19 +0,0 @@
-<?php
-/**
- @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.1.1
- @date 27/12/11, 01:28
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-global $page,$lng, $language;
-?>
-<?php while (list($key, $value) = each($lng->catalog_languages)):?>
-
- <a href="<?php echo tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key) ?>" class="<?php if($language==$key) echo 'Selected' ?>">
- <img title="<?php echo $value['name'] ?>" alt="<?php echo $value['name'] ?>" src="<?php echo /*$page->getPathTemplate().*/DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'] ?>" />
- </a>
-
-<?php endwhile; ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-26 09:02:24
|
Revision: 4324
http://oscss.svn.sourceforge.net/oscss/?rev=4324&view=rev
Author: oscim
Date: 2012-04-26 09:02:13 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
coquille texte
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/widget/NewCustomersStats.txt
Modified: trunk/catalog/admin/includes/languages/fr_FR/widget/NewCustomersStats.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/widget/NewCustomersStats.txt 2012-04-25 22:25:33 UTC (rev 4323)
+++ trunk/catalog/admin/includes/languages/fr_FR/widget/NewCustomersStats.txt 2012-04-26 09:02:13 UTC (rev 4324)
@@ -1,11 +1,11 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9h
- @date 021/08/10, 15:49
+ @version 2.1.1
+ @date 24/04/2012, 15:49
@author oscim <mail aur...@os...> <www http://www.oscim.fr>/
@encode UTF-8
*/
-$lang['box title graph new customers']="Enregsitrement nouveaux clients" ;
+$lang['box title graph new customers']="Insciption nouveaux clients" ;
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-25 22:25:41
|
Revision: 4323
http://oscss.svn.sourceforge.net/oscss/?rev=4323&view=rev
Author: oscim
Date: 2012-04-25 22:25:33 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
Correct et ajustement des page package , ajout d'une etape de confirmation avant desinstallation; rajustement listing et contenu de langue,
Ajout d'un module ne natif pour l'approche commercial et promotion avant la mise en avant de contenu; report des elements en cours de dev.
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/tags/addfile.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab
trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
trunk/catalog/admin/includes/modules/pages/package.php
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/gabarit/featured/
trunk/catalog/admin/includes/gabarit/featured/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
trunk/catalog/admin/includes/modules/pages/featured.php
trunk/catalog/includes/modules/featured.php
Added: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,206 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlfeatured
+ @file sqlfeatured.php
+ @brief manage db update/insert/delete for featured
+*/
+
+
+
+
+class sqlfeatured
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['name']))
+ return 'name';
+
+ $sql_data_array['featured_name'] = tep_db_prepare_input($option['name']);
+ $sql_data_array['datatype'] = tep_db_prepare_input($option['datatype']);
+ $sql_data_array['datatype_id '] = tep_db_prepare_input($option['datatype_id']);
+ $sql_data_array['featured_visible'] = (isset($option['visible'])) ? tep_db_prepare_input($option['visible']) :'0';
+
+ $sql_data_array['date_added'] = 'NOW()';
+ $sql_data_array['user_added'] = $_SESSION['login_id'];
+
+ $res=tep_db_perform(TABLE_FEATURED, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
+ if(isset($option['datatype'])) $where .="AND featured_id = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype_id'])) $where .="AND featured_id = '".(int)$option['datatype_id']."' ";
+
+
+ if(isset($option['name']))$sql_data_array['featured_name'] = tep_db_prepare_input($option['name']);
+ if(isset($option['visible'])) $sql_data_array['featured_visible'] = (int)tep_db_prepare_input($option['visible']);
+
+ $sql_data_array['last_modified'] = 'NOW()';
+ $sql_data_array['user_modified'] = $_SESSION['login_id'];
+
+ $res=tep_db_perform(TABLE_FEATURED, $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)
+ @param $shortkey use cleankey for return short key
+ @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){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $where ="";
+ if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
+ if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
+
+
+ if($where=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_FEATURED . " a ".
+ " 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){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $where ="";
+ if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
+ if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
+
+
+ if($where=='')
+ return false;
+
+ $DB->query("DELETE FROM " . TABLE_FEATURED ." WHERE ". substr($where, 3 ) );
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'featured_id' => '',
+ 'datatype' => '',
+ 'datatype_id' => '',
+ 'featured_name' => '',
+ 'featured_visible' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'featured_') ===0)
+ $key=substr($key,strlen('featured_'));
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Property changes on: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -158,8 +158,10 @@
self::$cInfo->name = $resObj->folder_name;
- define('CONTRIB_INSTALLER_NAME', 'CIP');
- define('CONTRIB_INSTALLER_VERSION', 'oscss 2 2.0.1');
+ if(!defined('CONTRIB_INSTALLER_NAME')){
+ define('CONTRIB_INSTALLER_NAME', 'osCSS installer');
+ define('CONTRIB_INSTALLER_VERSION', '');
+ }
}
/** ================================================================== Get class variables: ================================================================== */
@@ -480,9 +482,10 @@
///================================================================== //Action //==================================================================
/**
- Installateur Commande exe
+ @brief Installateur Commande exe
+ @param $ForTest boolenan if false reel install
*/
- function install() {
+ function install($ForTest = true) {
// fileUtility::_rmdir(DIR_FS_CIP.$this->get_cip_name());
@@ -509,26 +512,33 @@
// return false;
// }
- //! We passed by all checks. So if an error appears
- foreach ($this->contrib_data as $id=>$tag)
- if ( $tag->do_install() ===false){
- self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->do_install()','block');
- break;
- }
+ // if no test process
+ if(!$ForTest){
+ //! We passed by all checks. So if an error appears
+ foreach ($this->contrib_data as $id=>$tag)
+ if ( $tag->do_install() ===false){
+ self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->do_install()','block');
+ break;
+ }
- //! If we had a problems at runtime we should remove this CIP.
-// if (!self::check_bylevel(1))
-// $this->remove(true);
-// else {
-// $this->DeleteContribFull(false, 'ok');
-//
-// //! up db etat install cip name
- $this->set_installed();
-// }
+ //! If we had a problems at runtime we should remove this CIP.
+ // if (!self::check_bylevel(1))
+ // $this->remove(true);
+ // else {
+ // $this->DeleteContribFull(false, 'ok');
+ //
+ // //! up db etat install cip name
+ $this->set_installed();
+ // }
+ }
}
+
+
/**
+ @fn remove($cleaning=false)
+ @param $cleaning boolean if true, delete all files
*/
function remove($cleaning=false) {
@@ -946,7 +956,7 @@
*/
self::$level_error[0][$id]=true;
- self::$ArrayError[$id]='[['.number_format( array_sum(explode(' ', microtime())) - array_sum(CIP::$stamptime), 8, '.', '' ).']]'.__('ERROR :').$origin.':: '.CIP::$cip_name.' '.$msg;
+ self::$ArrayError[$id]=/*'[['.number_format( array_sum(explode(' ', microtime())) - array_sum(CIP::$stamptime), 8, '.', '' ).']]'.*/__('ERROR :').$origin.':: '.CIP::$cip_name.' '.$msg;
case '1':
case 'block':
/**
@@ -954,13 +964,13 @@
*/
self::$level_error[1][$id]=true;
self::$error=true;
- self::$ArrayError[$id]='[['.number_format( array_sum(explode(' ', microtime())) - array_sum(CIP::$stamptime), 8, '.', '' ).']]'.__('FATAL :').$origin.':: '.CIP::$cip_name.' '.$msg;
+ self::$ArrayError[$id]=/*'[['.number_format( array_sum(explode(' ', microtime())) - array_sum(CIP::$stamptime), 8, '.', '' ).']]'.*/__('FATAL :').$origin.':: '.CIP::$cip_name.' '.$msg;
return;
break;
case '2':
case 'noblock':
self::$level_error[2][$id]=true;
- self::$ArrayError[$id]='[['. number_format( array_sum(explode(' ', microtime())) - array_sum(CIP::$stamptime), 8, '.', '' ).']]'.__('NO BLOCK :').' '.$origin.':: '.CIP::$cip_name.' '.$msg;
+ self::$ArrayError[$id]=/*'[['. number_format( array_sum(explode(' ', microtime())) - array_sum(CIP::$stamptime), 8, '.', '' ).']]'.*/__('NO BLOCK :').' '.$origin.':: '.CIP::$cip_name.' '.$msg;
break;
default:
/**
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -81,12 +81,18 @@
$description=$cip->get_data($cip->get_description_id());
if ($description) {
$array=$this->cip_description($description->data);
- parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
+
+ if (ErrorAndBlockProcess::$error)
+ parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
}
else
$array[]= '<strong style="color:red;">'.CIP::CONFIG_FILENAME. __('text doesnt exists').'!!!</strong>';
+ // test
+ $cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
+ $cip->install();
+ parent::$Rightlist=array_merge(parent::$Rightlist,(array)ErrorAndBlockProcess::$ArrayError);
$s ='<div class="button_nav">';
if($cip->check_bylevel(1)) $s .='<a class="button ActionYes" href="'.tep_href_link(parent::FILENAME,'action=install&pkgID='.$pkgID).'" title="'.__('icon install').'"> '.__('image cip install').'</a>';
@@ -98,6 +104,29 @@
}
+
+ /**
+ @fn remove_confirm($pkgID)
+ @brief Ciew for confirm remove extension
+ @param $pkgID id paquet cf table cip
+ */
+ public function remove_confirm($pkgID){
+ global $messageStack;
+
+ //! retro compatibilite
+ $message=$messageStack;
+
+ $obj=parent::load_db_values($pkgID);
+ $obj=$obj[0];
+
+ $cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
+
+ $cip->read_xml();
+
+ return $array;
+ }
+
+
/**
@fn install_exts($pkgID)
@brief execute installation process
@@ -114,11 +143,26 @@
$obj=$obj[0];
$cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
- $cip->install();
+ $cip->install(false);
- if (ErrorAndBlockProcess::$error) $messageStack->add('error in process install', 'error');
- else $messageStack->add(__('msg was installed'), 'installed');
+// print_r(ErrorAndBlockProcess::$ArrayError);
+ if (ErrorAndBlockProcess::$error) {
+ $messageStack->add('error in process install', 'error');
+ $tp = '<h4 class="error">'. __('error in process install'). '</h4>'.
+ '<ul>';
+ foreach(ErrorAndBlockProcess::$ArrayError as $row)
+ if(preg_match('#FATAL#i', $row))
+ $tp .='<li>'. $row .'</li>';
+ $tp .= '<div>';
+
+
+ $array[]=$tp;
+// parent::$Rightlist
+ }
+ else
+ $messageStack->add(__('msg was installed'), 'installed');
+
//! Show post install message:
if ($cip->post_install_notes()) {
$array[]= '<h4>'.$cip->getIdent().'<h4>'.
@@ -167,9 +211,9 @@
$obj=parent::load_db_values($pkgID);
$obj=$obj[0];
+
$cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
-
$res=$cip->remove();
Modified: trunk/catalog/admin/includes/exts/package/tags/addfile.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -98,7 +98,14 @@
public function permissions_check_for_install() {
if (!CIP::check_bylevel(1))return false;
/// NOTE suppression des control qui sont efefctué sur des repertoire non installé
-// for($i = 0; $i < count($this->data['filename']);$i++){
+ for($i = 0; $i < count($this->data['filename']);$i++){
+
+// if($this->fs_filename($i))
+ if(!file_exists($this->fs_filename($i))){
+ CIP::InProcess('in check before install -- <strong>'.__('original file no found').'</strong> <pre>'.$this->fs_filename($i).'</pre>', __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
+
// $fs_filename=replace_path_admin($this->fs_filename($i));
// $path=dirname($fs_filename);
//
@@ -116,7 +123,7 @@
// return false;
// }
//
-// }
+ }
return true;
}
Added: trunk/catalog/admin/includes/gabarit/featured/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featured/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/featured/display_view.delete.gab 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,34 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title delete featured'); ?></h3>
+
+
+<div class="box_uniq block_form">
+
+
+ <?php echo tep_draw_form('zone', featured::FILENAME, 'action=delete_confirm', 'post') ?>
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_draw_hidden_field('cID', '', featured::$Id);
+
+ echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
+ echo tep_js_back(tep_href_link(featured::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+ <br class="clear" />
+
+</div>
Added: trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/featured/display_view.edit.gab 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,65 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+
+// print_r(featured::$Info);
+?>
+<h3><?php echo __('heading title edit'); ?></h3>
+
+<div class="box_uniq block_form">
+
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('featured tab specification'); ?></a></li>
+ </ul>
+
+
+ <div id="tabs-1" class="tabPage">
+
+ <?php echo tep_draw_form('featured', featured::FILENAME, 'action='.((featured::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
+
+
+ <p class="block_input">
+ <Label><?php echo __('text info featured name') ?></label>
+ <?php echo tep_draw_input_field('featured_name', '', featured::$Info->name) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info featured name') ?></label>
+ <?php echo tep_draw_input_field('featured_name', '', featured::$Info->name) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info featured name') ?></label>
+ <?php echo tep_draw_input_field('featured_name', '', featured::$Info->name) ?>
+ </p>
+
+<!-- <p class="block_input">
+ <Label><?php //echo __('text info featured visible') ?></label>
+ <?php //echo tep_draw_radio_field('featured_visible', 'featured_visible_1', '1', $featured_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('featured_visible', 'featured_visible_0', '0', $featured_visible_N) . ' ' . VISIBLE_NO ?>
+ </p>-->
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_image_submit('', IMAGE_UPDATE) /*. tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' )*/;
+ echo tep_js_back(tep_href_link(featured::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+
+
+ <br class="clear" />
+ </div>
+
+</div>
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-04-25 22:25:33 UTC (rev 4323)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 03/01/12, 08:07
+ @date 24/04/2012, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -22,7 +22,7 @@
<div class="box_uniq">
-<table class="dataTableBase">
+<table class="dataTable">
<thead>
<tr>
<th><?php echo __('core') ?></th>
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab 2012-04-25 22:25:33 UTC (rev 4323)
@@ -19,9 +19,9 @@
</ul>
</div>
- <div class="fright w_50">
- <h3><?php echo __('package heading title detail logs') ?></h3>
- <ul>
+ <div class="box_uniq">
+ <h3 class="Ctrtirroir"><?php echo __('package heading title detail logs') ?></h3>
+ <ul class="tirroir">
<?php foreach(package::$Rightlist as $item): ?>
<li>- <?php echo $item ?></li>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab 2012-04-25 22:25:33 UTC (rev 4323)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/12/11, 10:05
+ @date 24/04/2012, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief gabarit for package list
@@ -30,18 +30,18 @@
<th><?php echo __('table heading description') ?></th>
<th><?php echo __('table heading level') ?></th>
<th><?php echo __('table heading repository') ?></th>
- <th><?php echo __('table heading status') ?></th>
+ <th title="<?php echo __('table heading status detail') ?>"><?php echo __('table heading status') ?></th>
<th class="row_action"><?php echo __('table heading action') ?></th>
</tr>
</thead>
<tfoot>
<tr>
<td style="width:2%;"> </td>
- <td style="width:9%;"><?php echo tep_draw_input_field('title','title',__('table heading nom'),'style="width:100%" class="search_init"'); ?></td>
+ <td style="width:12%;"><?php echo tep_draw_input_field('title','title',__('table heading nom'),'style="width:100%" class="search_init"'); ?></td>
<td style="width:60%;"><?php echo tep_draw_input_field('description','description',__('table heading description'),'style="width:100%" class="search_init"'); ?></td>
<td style="width:5%;"><?php echo tep_draw_input_field('level','level',__('table heading level'),'style="width:100%" class="search_init"'); ?></td>
<td style="width:5%;"><?php echo tep_draw_input_field('sourceTitle','sourceTitle',__('table heading repository'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:10%;"> </td>
+ <td style="width:2%;"> </td>
<td class="row_action"> </td>
</tr>
</tfoot>
Added: trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.remove.gab 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,31 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 24/04/2012, 10:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('title heading delete extension') ?></h3>
+
+<?php echo tep_draw_form('delete_exts', package::FILENAME, 'type_data=package&action=remove_confirm&pkgID='.$_GET['pkgID'], 'post'); ?>
+
+ <div class="box_uniq block_form">
+ <fieldset class="block_field">
+ <p>
+ <?php echo __('package remove your are sur') ?>
+ </p>
+
+ </fieldset>
+
+ <div class="block_input button_nav" >
+ <?php
+ echo tep_image_submit('', __('image confirm delete'));
+ echo tep_js_back(tep_href_link(package::FILENAME, 'type_data=source'), IMAGE_CANCEL) ;
+ ?>
+ </div>
+ </div>
+</form>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,20 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class featured
+*/
+
+
+$lang['table heading datatype'] = "Données" ;
+$lang['table heading datatype id'] = "Id." ;
+$lang['table heading name'] = "Données" ;
+$lang['table heading status'] = "Etat" ;
+$lang['table heading action'] = "Action" ;
+// $lang['table heading datatype'] = "Données" ;
+?>
Property changes on: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-04-25 22:25:33 UTC (rev 4323)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 24/04/2012, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file for module class package, item language french
@@ -34,12 +34,18 @@
$lang['table heading nom']="Nom" ;
$lang['table heading description']="Description" ;
$lang['table heading size']="Taille" ;
- $lang['table heading status']="Status" ;
+ $lang['table heading status']="" ;
+ $lang['table heading status detail']="" ;
+ $lang['table heading present']="Présent" ;
$lang['heading action']="Action" ;
$lang['table heading action']="Action" ;
- $lang['table heading level']="Develop" ;
+ $lang['table heading level']="Niveau" ;
$lang['table heading repository']="Dépot" ;
+
+ $lang['listing pkg image edit']="Voir la configuration" ;
+ $lang['listing pkg image remove']="Désinstaller cette extension" ;
+ $lang['listing pkg image install']="Télécharger et/ou installer" ;
/* source */
$lang['heading source title']="Titre" ;
$lang['heading source key']="Clef" ;
@@ -55,9 +61,15 @@
/** UnInstall */
+ $lang['title heading delete extension']="Desinstallation d'une extension" ;
+ $lang['package remove your are sur']="Vous êtes sur de vouloir supprimer cette extension " ;
+ $lang['image confirm delete']="Confimer la desinstallation" ;
$lang['msg was removed']="Extension desinstallée" ;
+ $lang['msg was removed']="Extension desinstallée" ;
+
+
/** view */
/* source */
$lang['title heading configuration source repository edit']="Modifié un depot" ;
@@ -89,6 +101,7 @@
$lang['package heading title install']="installation du paquet" ;
$lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
/* errors / alert / message */
+ $lang['error in process install']="Erreur dans le processus d'installation cette extension " ;
$lang['packageInstaller download file exts good']="Extension téléchargé" ;
$lang['packageInstaller error recup zip url']="Erreur lors de la récuperation du paquet" ;
Added: trunk/catalog/admin/includes/modules/pages/featured.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featured.php (rev 0)
+++ trunk/catalog/admin/includes/modules/pages/featured.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,447 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class featured
+*/
+
+class featured
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ /*IntModTwo, */ /// new interface module for nextgen module
+ ExtModConfig {
+
+ const FILENAME = FILENAME_FEATURED;
+
+ /**
+ @var string file
+ */
+ public static $Id;
+ /**
+ @var array list code action module
+ */
+ public static $list=array();
+ /**
+ @var bool $dir_ok
+ */
+ public static $dir_ok;
+ /**
+ @var current object
+ */
+ public static $Info;
+
+ /**
+ @brief class constructor
+ */
+ public function __construct() {
+ self::GetConf();
+ }
+
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
+ self::$code=__CLASS__;
+
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
+
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ 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;
+
+ if(self::$action =='' || self::$action =='listing')
+ //! active datatable in ajax, precise les GET necessaire
+ define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code.
+ (isset(parent::$action)?'&action='.parent::$action : '' ).
+ (isset(self::$Id)?'&file='.self::$Id : '' )
+ );
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$InitInfo['theader']['listing']=array(
+ array('width'=>'5%','class'=>'tcenter', 'txt'=>__('table heading datatype') ) ,
+ array('width'=>'2%','class'=>'tcenter', 'txt'=>__('table heading datatype id') ) ,
+ array('width'=>'15%','class'=>'tcenter', 'txt'=>__('table heading name') ) ,
+ array('width'=>'8%','class'=>'tcenter', 'txt'=>__('table heading status') ),
+ array('width'=>'8%','class'=>'tcenter', 'txt'=>__('table heading action') ),
+ );
+
+ /**
+ @remarks this define col in table, and if is possible sort
+ Just for Edit listing
+ */
+ self::$InitInfo['modele']['listing']=array(
+// 0 =>false,
+ 'datatype' =>true,
+ 'datatype_id' =>true,
+ 'featured_name' =>true,
+ 'featured_visible'=>true,
+ 'action'=>false,
+ );
+
+
+
+ /**
+ @remarks this define menu master module in page
+ */
+ if(self::$action =='' || self::$action =='listing'){
+ self::$InitInfo['MenuModule'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'',
+ 'title'=>__('image add featured'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
+
+ }
+
+ return true;
+ }
+
+
+ /**
+ @fn check_action($actions)
+ @brief Process action
+ @param $actions string
+ @return $actions string
+ */
+ public function check_action($actions){
+ global $messageStack;
+
+ self::$action=$actions;
+
+ switch (self::$action) {
+
+ case 'setflag':
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ $c_id =(int) tep_db_prepare_input($_GET['cID']);
+
+ if ($c_id > 0){
+ $myarray = array('id'=>$c_id, 'visible'=>$_GET['flag'] );
+ sqlfeatured::update($myarray);
+ }
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
+ break;
+
+ case 'insert':
+ $myarray = array(
+ 'name'=>tep_db_prepare_input($_POST['featured_name']),
+ );
+
+ sqlfeatured::create($myarray);
+
+ tep_redirect(tep_href_link(self::FILENAME ));
+ break;
+
+ case 'update':
+ $c_id =(int) tep_db_prepare_input($_GET['cID']);
+
+ if ($c_id > 0){
+ $myarray = array(
+ 'id'=>$c_id,
+ 'name'=>tep_db_prepare_input($_POST['featured_name']),
+ 'visible'=>tep_db_prepare_input($_POST['featured_visible']),
+ );
+
+ sqlfeatured::update($myarray);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . $c_id ));
+ break;
+
+ case 'delete_confirm':
+ $c_id =(int) tep_db_prepare_input($_POST['cID']);
+ if ($c_id > 0){
+ $myarray = array(
+ 'id'=>$c_id,
+ );
+ $res=sqlfeatured::delete($myarray);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+ }
+
+ return self::$action;
+ }
+
+ public function get_header(){
+ }
+
+
+ /**
+ @fn featured::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
+
+ $DB= Database::getInstance();
+
+ switch (self::$action) {
+
+ case 'delete':
+ case 'edit':
+ case 'new':
+ if( (int)self::$Id > 0) {
+ self::$Info = sqlfeatured::fetch(array('id'=>self::$Id ), true);
+ }
+ else{
+ self::$Info = sqlfeatured::Specimen(true);
+ }
+ break;
+
+
+ case 'listing':
+ default:
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+ $query_raw = "select featured_id , featured_name , featured_visible, datatype, datatype_id from " . TABLE_FEATURED . " c ".
+ ((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' featured_name ASC ');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+ }
+ }
+
+
+
+ /**
+ @fn display_view()
+ @brief this methode is switch for call gabarit action
+ */
+ public function display_view(){
+ switch (parent::$action) {
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ return self::RowStatus(array('country_visible'=>(int)$_GET['flag'], 'featured_id'=>(int)$_GET['cID']));
+ break;
+
+
+ /**
+ @remarks Normal View Page
+ */
+ case 'new':
+ self::load_db_values(0);
+ return MGabCont::CallGab('edit',__FUNCTION__,__CLASS__);
+ break;
+ case 'edit':
+ self::load_db_values(self::$Id);
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+ case 'delete':
+ self::load_db_values(self::$Id);
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+ case 'listing':
+ default:
+ self::$list=self::tep_get_list();
+ /// use master gabarit
+ MGabCont::SetCurrentName(__CLASS__);
+ return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
+ }
+ }
+
+
+
+ /**
+ @fn tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options='')
+ @brief Constructeur listing element cms _DATATYPE_REPLACE_
+ @param $page integer default(1) split page
+ @param $rowbyp integer default(10) nbr line in page
+ @param $sOrder string | null
+ @param $sWhere string | null
+ @param $options array
+ @return Array
+ */
+ public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
+ global $query_numrows;
+
+ /// @remarks force load conf
+ self::GetConf();
+
+ $res=array();
+
+ /**
+ @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;
+
+ $res = self::GetDBValue();
+
+ self::$list= $query_numrows ; //= count($res);
+
+ return $res;
+ }
+
+
+ /** public static InterfacedTJsonS */
+
+ /**
+ @brief format db value for display page
+ @param $_query ressource db sql
+ @return array
+ */
+ private static function FormatDBValue($_query){
+ $DB=Database::getInstance();
+ $res=array();
+
+ switch (parent::$action) {
+ case 'edit';
+ global $query_numrows,$languages_id;
+
+ break;
+ case 'listing':
+ global $query_numrows,$languages_id;
+
+ while ($item = $_query->fetchAssoc()) {
+
+ foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
+ if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
+ elseif($k == 'featured_visible') $ord[$k]=self::RowStatus($item);
+ else $ord[$k]=$item[$k];
+
+ $res[]=$ord;
+ }
+ break;
+ }
+
+ return $res;
+ }
+
+ /**
+ @fn ButtonRowsActions($item)
+ @return string html
+ */
+ public static function ButtonRowsActions($item){
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+''
+ ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['featured_id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['featured_id'] . '&action=delete') ,'' )
+ );
+ }
+
+ /**
+ @brief return format html for row status
+ @param $product array restuts row product
+ @return string html
+ */
+ private static function RowStatus($item){
+ $exclude=array('action','pID','forceajax','type','class','function','funct', 'mod');
+ $query_s='action=setflag&cID=' . $item['featured_id'].'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['country_visible'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$item['country_visible'],
+ ( ($item['country_visible'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+
+ /**
+ @brief return Filename
+ */
+ public static function GetFILENAME(){
+ return self::FILENAME;
+ }
+
+
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
+ function check() { return false; }
+
+
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ function keys() { return false; }
+
+ /**
+ @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
Property changes on: trunk/catalog/admin/includes/modules/pages/featured.php
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-04-25 12:49:11 UTC (rev 4322)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -18,19 +18,19 @@
Configuration
*/
/**
- File xml source
+ @def REPOSITORY_SOURCE File xml source
*/
const REPOSITORY_SOURCE = 'repository_sources.xml';
/**
- File xml global detail package repository
+ @def REPOSITORY_DATA File xml global detail package repository
*/
const REPOSITORY_DATA = 'repository_data.xml';
/**
- File cache, info repository
+ @def REPOSITORY_CACHE File cache, info repository
*/
const REPOSITORY_CACHE = 'repository-source';
/**
- this file url
+ @def FILENAME_PACKAGE this file url
*/
const FILENAME = FILENAME_PACKAGE;
/**
@@ -92,8 +92,10 @@
@var string key pck xxx_stable
*/
public static $pckID;
+
+
/**
- class constructor
+ @brief class constructor
*/
public function __construct() {
self::GetConf();
@@ -104,8 +106,9 @@
/**
+ @fn GetConf()
@brief Load , adjust and define var environement exe for module
- Is use in module and class abstract for init value config this module
+ Is use in module and class abstract for init value config this module
*/
public static function GetConf(){
global $languages_id;
@@ -121,7 +124,8 @@
/**
@remarks not load if not first init
*/
- if(defined('JSONSTATMENT')) return;
+ if(defined('JSONSTATMENT') && self::$action =='listing')
+ return;
switch(self::$type_data){
case 'source':
@@ -141,12 +145,15 @@
}
//! active datatable in ajax, precise les GET necessaire
- define('JSONSTATMENT', 'mod=page&type='.__CLASS__.'&type_data='.self::$type_data.'&mode='.$mode);
+ if( self::$action == 'listing')
+ define('JSONSTATMENT', 'mod=page&type='.__CLASS__.'&type_data='.self::$type_data.'&mode='.$mode);
}
-
+ /**
+ @fn check_action($actions)
+ */
public function check_action($actions){
global $messageStack;
@@ -235,7 +242,6 @@
else
$res = sqlconfiguration::update(array('key'=>$config_key, 'value'=>implode(';', $tss) ));
-// var_dump($res);
$objres =sqlcip::fetch(array('id'=>$objres->cip_id), true);
@@ -250,16 +256,39 @@
}
tep_redirect(tep_href_link(self::FILENAME, 'set=' . self::$set .'&class='.$_GET['class'].'&core='.@$_GET['core'].'&action=edit' ));
break;
+
+ /**
+ @remarks remove all extension
+ */
+ case 'remove_confirm' :
+
+ $action='detail';
+ $class=self::$code.'Installer';
+ if(!tep_class_exists('exts_'.self::$code.'_'.$class))return false;
+ $obj=new $class;
+
+
+// self::$list=$obj->view_exts((string)$_GET['pkgID']);
+ self::$list=$obj->remove_exts((string)$_REQUEST['pkgID']);
+
+ break;
+
default:
self::load_repository();
}
}
+ /**
+ @fn get_header()
+ */
public function get_header(){
}
+ /**
+ @fn load_db_values($pkg_code)
+ */
public static function load_db_values($pkg_code){
global $messageStack;
@@ -307,7 +336,8 @@
/**
- @p string $mode (global/installed/updatable/notinstall)
+ @fn load_repository($mode='global')
+ @param $mode string (global/installed/updatable/notinstall)
*/
public static function load_repository($mode='global'){
global $messageStack;
@@ -334,8 +364,6 @@
Mise à jour cache paquet installed / updatable / non install
*/
foreach($Feed as $item){
-// print_r($item);
-// exit;
$item->etat=(self::pkg_is_installed($item->ident.'_'.$item->level)? 1 : 0);
switch($mode){
@@ -366,7 +394,9 @@
-
+ /**
+ @fn display_view()
+ */
public function display_view(){
$action=self::$action;
@@ -431,14 +461,19 @@
self::$list=$obj->install_exts((string)$_GET['pkgID']);
break;
+
case 'remove':
- $action='detail';
+ $action='remove';
$class=self::$code.'Installer';
if(!tep_class_exists('exts_'.self::$code.'_'.$class))return false;
$obj=new $class;
- self::$list=$obj->remove_exts((string)$_GET['pkgID']);
+ self::$list=$obj->remove_confirm((string)$_GET['pkgID']);
+// self::$list=$obj->remove_exts((string)$_GET['pkgID']);
break;
+ case 'remove_confirm' :
+ $action='detail';
+ break;
case 'edit':
$action='configedit';
@@ -446,7 +481,6 @@
break;
case 'config':
$action='config';
-// var_dump(self::$objChild);
call_user_func(array(self::$objChild, 'load_config_value'));
break;
@@ -454,8 +488,8 @@
}
- /// use master gabarit
- return MGabCont::CallGab(self::$type_data.'.'.$action,__FUNCTION__,__CLASS__);
+ /// use master gabarit
+ return MGabCont::CallGab(self::$type_data.'.'.$action,__FUNCTION__,__CLASS__);
}
@@ -463,31 +497,40 @@
/** public static InterfacedTJsonS */
+ /**
+ @fn get_item_status($pkg, $pkgobj)
+ @brief view status for extension, view zip/dir/installed
+ @param $pkg key
+ @param $pkgobj object detail
+ */
private static function get_item_status($pkg, $pkgobj){
-
$s= '';
- if($pkgobj->etat==1) $s .=tep_image(DIR_WS_ICONS . 'install.gif', __('icon remove'))."\n";
- else $s .=tep_image(DIR_WS_ICONS . 'remove.gif', __('icon install'))."\n";
+ if($pkgobj->etat==1)
+ $s .=tep_image(DIR_WS_ICONS . 'install.gif', __('icon remove'))."\n";
+ else{
- if(!is_dir(DIR_FS_CIP.$pkg)) $s .=tep_image(DIR_WS_ICONS . 'unpack.gif', __('icon unzip'))."\n";
- if(file_exists(DIR_FS_CIP.$pkg.'.zip')) $s .=tep_image(DIR_WS_ICONS . 'pack.gif', __('icon install'))."\n";
-
-// else $s .=tep_image(DIR_WS_ICONS . 'remove.gif', ICON_INSTALL)."\n";
-
- $s .= '';
-
+ if(file_exists(DIR_FS_CIP.$pkg.'.zip')){
+ if(!is_dir(DIR_FS_CIP.$pkg))
+ $s .=tep_image(DIR_WS_ICONS . 'unpack.gif', __('icon unzip'))."\n";
+ else
+ $s .=tep_image(DIR_WS_ICONS . 'pack.gif', __('icon install'))."\n";
+ }
+ elseif(is_dir(DIR_FS_CIP.$pkg)){
+ $s .=tep_image(DIR_WS_ICONS . 'pack.gif', __('icon install'))."\n";
+ }
+ }
return $s;
}
private static function get_item_action($pkg, $pkg_full, $url_pck, $pkgobj){
-// var_dump(self::$type_data);
-// exit;
+
switch(self::$type_data){
case 'source':
return sprintf(
CsrtAction::getFormat('row_action'),
'' ,
- sprintf(CsrtAction::getLink('row_action_right', __('image synchro'), 'synchro'), 'fancy', tep_href_link(self::FILENAME,'type_data=source&action=source_synchro&key='.$pkgobj->key) ,'' ).
+/// TODO : Mettre en place la synchro ponctuel d'une source
+// sprintf(CsrtAction::getLink('row_action_right', __('image synchro'), 'synchro'), 'fancy', tep_href_link(self::FILENAME,'type_data=source&action=source_synchro&key='.$pkgobj->key) ,'' ).
sprintf(CsrtAction::getLink('row_action_right', __('image edit'), 'edit'), '', tep_href_link(self::FILENAME,'type_data=source&action=source_edit&key='.$pkgobj->key) ,'' ).
sprintf(CsrtAction::getLink('row_action_right', __('image delete'), 'delete'), '', tep_href_link(self::FILENAME,'type_data=source&action=source_delete&key='.$pkgobj->key) ,'' )
);
@@ -496,18 +539,28 @@
default:
return sprintf(
CsrtAction::getFormat('row_action'),
- '' ,
(($pkgobj->etat==1)
?
- sprintf(CsrtAction::getLink('row_action_right', __('icon remove'), 'install'), '', tep_href_link(self::FILENAME,'action=remove&pkgID='.urlencode($pkg_full)) ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', __('image edit'), 'edit'), '', tep_href_link(self::FILENAME,'action=config&class='.$pkg) ,'' )
+ sprintf(CsrtAction::getLink('row_action_right', __('listing pkg image remove'), 'remove'), '', tep_href_link(self::FILENAME,'action=remove&pkgID='.urlencode($pkg_full)) ,'' )
:
- sprintf(CsrtAction::getLink('row_action_right', __('icon install'), 'remove'), '', tep_href_link(self::FILENAME,'action=download&pkgID='.urlencode($pkg_full)) ,'' )
+ sprintf(CsrtAction::getLink('row_action_right', __('listing pkg image install'), 'install'), '', tep_href_link(self::FILENAME,'action=download&pkgID='.urlencode($pkg_full)) ,'' )
)
+ ,
+// '' ,
+ (($pkgobj->etat==1)
+ ?
+ sprintf(CsrtAction::getLink('row_action_right', __('listing pkg image edit'), 'edit'), '', tep_href_link(self::FILENAME,'action=config&class='.$pkg) ,'' )
+ :
+ ''
+ )
);
}
}
+ /**
+ @fn tep_get_modele()
+ @brief
+ */
public static function tep_get_modele(){
switch(self::$type_data){
@@ -634,6 +687,9 @@
+ /**
+ @brief status fag for active / desactive module in configuration extension
+ */
public static function status_flag($cond,$get){
$exclude=array('action','pID','forceajax','type','class','function','funct', 'mod');
$query_s=$get.'&action=setflag&flag=';
Added: trunk/catalog/includes/modules/featured.php
===================================================================
--- trunk/catalog/includes/modules/featured.php (rev 0)
+++ trunk/catalog/includes/modules/featured.php 2012-04-25 22:25:33 UTC (rev 4323)
@@ -0,0 +1,79 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/11/12, 08:18
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief module base new products
+ @note
+ function sql , name: sql_ name current file
+ function in_obj_ name: in_obj_ name current file
+*/
+
+/**
+ @brief Cherche les nouveauté d'ordre general, ou sur le parent de la catégorie en cours
+ Ne recupere que que l'id products
+ @param $featured_category_id int
+ @return bool false or ressource db
+*/
+function sql_featured(){
+// global $featured_category_id;
+
+ //! @remarks depend Data_annonce active
+ if( ! DataTypes::is_active('annonce'))
+ return false;
+
+ $page=page::getInstance();
+ $DB=Database::getInstance();
+ $languages_id=$page->the_var('languages_id');
+
+// if ( (!empty($featured_category_id)) || ((int)$featured_category_id == 0) ) {
+// $featured_query = $DB->query($sql="select distinct p.products_id from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_id = pd.products_id and language_id='".$languages_id."' and products_status = '1' and c.categories_status = '1' and p.products_date_added > SUBDATE(now(), INTERVAL ".(int)MAX_DATEADDED_FOR_NEWX_PRODUCT." MONTH) order by p.products_date_added desc limit " . $page->_conf_value('MAX_DISPLAY_NEW_PRODUCTS'));
+// } else {
+// $featured_query = $DB->query($sql="select distinct p.products_id from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$featured_category_id . "' and p.products_status = '1' and c.categories_status = '1' and p.products_date_added > SUBDATE(now(), INTERVAL ".(int)MAX_DATEADDED_FOR_NEWX_PRODUCT." MONTH) order by p.products_date_added desc limit " . $page->_conf_value('MAX_DISPLAY_NEW_PRODUCTS'));
+// }
+
+ $sql = "SELECT * FROM ".TABLE_FEATURED." WHERE 1";
+
+
+ $featured_query = $DB->query($sql);
+
+
+
+ if ($featured_query->__get('NumRows') > 0) return $featured_query;
+ else return false;
+}
+
+
+/**
+ @brief Prepa et passage en object du module, affichage dans le gabarit des modules
+ @return array (title, content)
+*/
+function in_obj_featured(){
+
+ $page=page::getInstance();
+
+ $languages_id=$page->the_var('languages_id');
+ $currencies=$page->return_object('currencies');
+ $mod=$page->oscss_modules->_return('product_listing');
+ /** init aca module */
+ $aca_listing=$page->new_class('listing');
+ $p=array();
+ if( ($res=$page->oscss_modules->_resultsql('featured')) ==false ) return null;
+ while ($featured = $res->fetchAssoc()){
+
+ $dt = $featured['datatype'];
+ $pd = $dt::get_item($featured['datatype_id']);
+ $pd->aca=$aca_listing->return_db_min($featured['products_id']);
+ $pd->type = $dt;
+ $p[]=$pd;
+ }
+
+ return new objectInfo(array('title'=>__('table heading featured'), 'content'=>$p , 'type'=>$dt ));
+
+}
+
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-25 12:49:21
|
Revision: 4322
http://oscss.svn.sourceforge.net/oscss/?rev=4322&view=rev
Author: oscim
Date: 2012-04-25 12:49:11 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
Correction coquille diverse
suite centralisation par datatype des gabarit public
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/includes/classes/core_page/listing.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/modules/products/desc_base.php
Added Paths:
-----------
trunk/catalog/templates/defaut/includes/gabarit/product/desc_base.display_view.gab
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2012-04-25 12:49:11 UTC (rev 4322)
@@ -170,8 +170,9 @@
foreach($value as $key=>$row)
$sql_data_array[$key] = $row;
+// print_r($sql_data_array);
+// exit;
-
tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $id . "'");
$categories_name_array = $post['categories_name'];
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab 2012-04-25 12:49:11 UTC (rev 4322)
@@ -8,6 +8,7 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+global $languages_id;
?>
<h3><?php echo __('heading title'); ?></h3>
@@ -36,7 +37,7 @@
<div class="box_uniq">
<div id="CurrentPathSelect" >
- <?php echo tep_draw_form('goto', products::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', tep_get_category_tree(), products::$cPath, 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
+ <?php echo tep_draw_form('goto', products::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', categorieUtility::get_category_tree(array('language_id'=>$languages_id )), products::$cPath, 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
</div>
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-04-25 12:49:11 UTC (rev 4322)
@@ -484,7 +484,6 @@
$mod[] = '';
$mod[] = '';
$mod[] = '';
- $mod[] = '';
if(_cst_bool('STOCK_CHECK')) $mod[] = '0';
$mod[] = '0';
$mod[] = '0';
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-04-25 12:49:11 UTC (rev 4322)
@@ -224,8 +224,11 @@
#central { position:relative; padding:10px 5px; top:73px;border-left: 1px solid black;
border-right: 1px solid black;border-bottom: 1px solid black;background:white; }
#central div.box_uniq { width:100%; float:left; }
+#central .ui-tabs div.box_uniq { width:99%; }
#central div.box_left { width:60%; float:left; }
+
+
#central div.box_right {border:1px solid #ACAAAC; width:39%; float:right; background:#f1f1f1; background-color: #ffffff;-moz-border-radius:6px; -webkit-border-radius: 6px;}
.configuration #central div.box_right { right:0; width:39%; }
.configuration #central div.box_right ul{ list-style:none; }
@@ -294,7 +297,7 @@
#central .widget h3 {margin-bottom:10px; padding:0 0 10px 5px;}
#central h4{font-weight:bold; padding:15px 5px 8px; clear:both; }
#central h4.Ctrtirroir,
-#central h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 20px; }
+#central h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 20px; font-size: 14px; }
/* Block formulaire central */
#central .block_form { -moz-border-radius:6px; -webkit-border-radius:6px; margin:0;padding:5px 0.2em 10px 0.2em; width:100%;display:inline-block; text-align: left; background:#C9C9C9;}
#central .block_form .tabs_lang{width:98.5%; float:left;}
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-25 12:49:11 UTC (rev 4322)
@@ -93,13 +93,12 @@
//! Recup des element cat en cours
categorie::resetCacheId((int)$current_category_id);
-// exit;
if( ($categories=categorie::get_item((int)$current_category_id)) ==false){
if($current_category_id !=0) $category_depth='nofound' ;
$categories=new objectInfo(array());
}
-// exit;
+
if ( ($count_cat=categorie::get_has_category_subcategories((int)$current_category_id)) && $count_cat > 0){
$category_depth = 'nested'; // navigate through the categories
$dd= explode(',', $categories->datatype);
@@ -146,15 +145,12 @@
case 'transversal':
case 'listing':
-// var_dump(__FUNCTION__.'-'.strtolower($mode));
if( isset($_GET['cPath']) && $_GET['cPath'] > 0)
return true;
break;
// Mode Display Unique
case 'unique':
-
-// var_dump(__FUNCTION__.'-'.strtolower($mode));
if( isset($_GET['cPath']) && $_GET['cPath'] > 0)
DataTypes::ForceChilds($this->DataType, $childs_type);
break;
@@ -254,7 +250,9 @@
$DB=Database::getInstance();
$category_depth = $page->GetVar('category_depth');
+ $current_category_id = $page->GetVar('current_category_id');
+ $categories=categorie::get_item((int)$current_category_id);
//! List des categorie enfant
$categories_query = $DB->query($sql="select c.categories_id from " . TABLE_CATEGORIES . " c where c.parent_id = '" . (int)$current_category_id . "' and c.categories_status='1' ");
@@ -292,8 +290,16 @@
if($category_depth == 'nested'){
$this->listing_sql .= (tep_not_null($list)? " AND ".$subtype->p."2c.categories_id IN (" . $list . ")" : '');
$this->listing_sort = " cat.sort_order, ". $this->listing_sort ;
+
+ // put dynamical sort for curent cat
+ if(tep_not_null($categories->sortchids))
+ $this->listing_sort = $categories->sortchids;
}
else{
+ // put dynamical sort for childs curent datatype for this cat
+ if(isset($categories->sortchids_datatype) && tep_not_null($categories->sortchids_datatype))
+ $this->listing_sort = $categories->sortchids_datatype;
+
$this->listing_sql .= " AND cat.categories_id = '" . (int)$current_category_id . "' ";
}
}
Modified: trunk/catalog/includes/classes/core_page/listing.php
===================================================================
--- trunk/catalog/includes/classes/core_page/listing.php 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/includes/classes/core_page/listing.php 2012-04-25 12:49:11 UTC (rev 4322)
@@ -161,6 +161,9 @@
$listing_sql = ' ORDER BY ';
$sort=listingUtility::sortby(@$_GET['sort']);
+
+ if( (strlen(self::$sql_sort)==0 && strlen($sort)==0) )
+ return;
$listing_sql .= ((strlen(self::$sql_sort)>0 && strlen($sort)>0)? self::$sql_sort.',': self::$sql_sort);
$listing_sql .= $sort;
return $listing_sql;
@@ -208,22 +211,7 @@
static public function sortby($GETsort){
global $categories;
$listing_sql = '';
-// if ( isset($GETsort)) {
-// $sort_col = substr($GETsort, 0 , 1);
-// $sort_order = substr($GETsort, 1);
-//
-// switch (self::$column_list[$sort_col-1]) {
-// case 'PRODUCT_LIST_MODEL': $listing_sql.="p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
-// case 'PRODUCT_LIST_NAME': $listing_sql.="pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break;
-// case 'PRODUCT_LIST_MANUFACTURER': $listing_sql.="m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
-// case 'PRODUCT_LIST_QUANTITY': $listing_sql.="p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
-// case 'PRODUCT_LIST_IMAGE': $listing_sql.="pd.products_name"; break;
-// case 'PRODUCT_LIST_WEIGHT': $listing_sql.="p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
-// case 'PRODUCT_LIST_PRICE': $listing_sql.="final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break;
-// }
-// }
-
/**
@brief Tri par default, option des categorie Champs sortchids_products & sortchids_content
*/
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/includes/classes/page.php 2012-04-25 12:49:11 UTC (rev 4322)
@@ -225,12 +225,14 @@
if( ($s=$path.$file.'.'.$ext_lg) && self::TestFile($s) && !in_array($s,(array)$doublon)) $sortie= $s;
}
else {
- if( ($s=$path_template.$file_path.$file) && self::TestFile($s) && !in_array($s,(array)$doublon)) $sortie= $s;
- elseif( ($s=DIR_WS_TEMPLATES . DEFAULT_TEMPLATE_NAME . '/' .$file_path.$file) && self::TestFile($s) && !in_array($s,(array)$doublon)) $sortie= $s;
- elseif( ($s=$path.$file) && self::TestFile($s) && !in_array($s,(array)$doublon) ) $sortie= $s;
+ if( ($s=$path_template.$file_path.$file) && self::TestFile($s) /*&& !in_array($s,(array)$doublon)*/) $sortie= $s;
+ elseif( ($s=DIR_WS_TEMPLATES . DEFAULT_TEMPLATE_NAME . '/' .$file_path.$file) && self::TestFile($s) /*&& !in_array($s,(array)$doublon)*/) $sortie= $s;
+ elseif( ($s=$path.$file) && self::TestFile($s) /*&& !in_array($s,(array)$doublon)*/ ) $sortie= $s;
}
- $doublon[]=$sortie;
+ if(tep_not_null($sortie) )
+ $doublon[]=$sortie;
+
return ($sortie!=NULL)? $sortie : false;
}
Modified: trunk/catalog/includes/modules/products/desc_base.php
===================================================================
--- trunk/catalog/includes/modules/products/desc_base.php 2012-04-25 07:36:51 UTC (rev 4321)
+++ trunk/catalog/includes/modules/products/desc_base.php 2012-04-25 12:49:11 UTC (rev 4322)
@@ -34,6 +34,7 @@
function __construct($page=''){
global $page;
$this->code = __CLASS__;
+ $this->type = 'product';
$this->title = __('desc base text title');
$this->description = __('description produit dans la page produit');
$this->sort_order = (defined('MODULE_ACAPRO_DESC_BASE_SORT_ORDER')) ? MODULE_ACAPRO_DESC_BASE_SORT_ORDER : 0 ;
@@ -88,7 +89,7 @@
$v=$this->content;
$v['title']=__('tab products desc base');
- $v['content']=tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__), false, true);
+ $v['content']=tep_output_string_protected(tep_get_include_contents( $this->type.'/'.__CLASS__.'.'.__FUNCTION__), false, true);
return array(new objectInfo($v));
}
Added: trunk/catalog/templates/defaut/includes/gabarit/product/desc_base.display_view.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/product/desc_base.display_view.gab (rev 0)
+++ trunk/catalog/templates/defaut/includes/gabarit/product/desc_base.display_view.gab 2012-04-25 12:49:11 UTC (rev 4322)
@@ -0,0 +1,17 @@
+<?php
+/**
+ @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 22/06/10, 18:12
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<div id="productDescription">
+ <div>
+ <?php echo desc_base::$products_description ?>
+ </div>
+ <p><?php echo desc_base::$products_url ?></p>
+</div>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-25 07:36:57
|
Revision: 4321
http://oscss.svn.sourceforge.net/oscss/?rev=4321&view=rev
Author: oscim
Date: 2012-04-25 07:36:51 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_admin_m_files_to_right.sql
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_admin_m_files_to_right.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_admin_m_files_to_right.sql 2012-04-25 07:36:33 UTC (rev 4320)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_admin_m_files_to_right.sql 2012-04-25 07:36:51 UTC (rev 4321)
@@ -12,7 +12,8 @@
--+######################################################################--+
-DROP TABLE IF EXISTS osc_admin_m_files_to_right
+DROP TABLE IF EXISTS osc_admin_m_files_to_right;
+
CREATE TABLE osc_admin_m_files_to_right (
files_id int(11) DEFAULT NULL,
type_id int(1) DEFAULT '0',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|