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-05-11 17:01:11
|
Revision: 4420
http://oscss.svn.sourceforge.net/oscss/?rev=4420&view=rev
Author: oscim
Date: 2012-05-11 17:01:00 +0000 (Fri, 11 May 2012)
Log Message:
-----------
Construction et refonte de la gestion des fabricants en extension exploitant les datatype
structuration de l'extension
Modified Paths:
--------------
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/modules/pages/manufacturers.php
trunk/extensions/MANUFACTURERS_unstable/install.xml
Added Paths:
-----------
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/classes/
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/classes/drivers/
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.delete.gab
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.edit.gab
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/filter.manufacturer.gab
trunk/extensions/MANUFACTURERS_unstable/catalog/common/
trunk/extensions/MANUFACTURERS_unstable/catalog/common/classes/
trunk/extensions/MANUFACTURERS_unstable/catalog/common/classes/datatype_drivers/
trunk/extensions/MANUFACTURERS_unstable/catalog/common/classes/datatype_drivers/Data_manufacturer.php
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/boxes/
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/boxes/manufacturer_info.php
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/boxes/manufacturers.php
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/gabarit/
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/gabarit/box.manufacturers.gab
trunk/extensions/MANUFACTURERS_unstable/catalog/templates/defaut/includes/gabarit/listing.detail.gab
trunk/extensions/MANUFACTURERS_unstable/sql/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/install/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/install/data/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/install/tables/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/install/tables/osc_manufacturers.sql
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/install/tables/osc_manufacturers_info.sql
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/remove/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/remove/data/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/remove/tables/
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/remove/tables/osc_manufacturers.sql
trunk/extensions/MANUFACTURERS_unstable/sql/mysql/remove/tables/osc_manufacturers_info.sql
Removed Paths:
-------------
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/manufacturers.listing.gab
trunk/extensions/MANUFACTURERS_unstable/catalog/admin/modules/
Added: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php (rev 0)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2012-05-11 17:01:00 UTC (rev 4420)
@@ -0,0 +1,262 @@
+<?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 11/05/2012 ,15:04:13
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlmanufacturers
+ @file sqlmanufacturers.php
+ @brief manage db update/insert/delete for manufacturers
+*/
+
+
+
+
+class sqlmanufacturers
+ 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['manufacturers_name'] = tep_db_prepare_input($option['name']);
+ $sql_data_array['manufacturers_image'] = tep_db_prepare_input($option['image']);
+// $sql_data_array['manufacturersvisible'] = (isset($option['visible'])) ? tep_db_prepare_input($option['visible']) :'0';
+
+ $res=tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array);
+ $id = $res->__get('insertId');
+
+ foreach(tep_get_languages() as $lg) {
+
+ $row = $option['langue'];
+
+ $sql_data_array_lg = array(
+ 'manufacturers_id'=>(int) $id,
+ 'languages_id'=> (int)$lg['id'],
+ 'manufacturers_url'=> ((isset($row['url'][$lg['id']])) ? tep_db_prepare_input($row['url'][$lg['id']]) : '' ),
+ );
+
+ $res=tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array_lg, 'update' , substr($where_lg,3));
+ }
+
+ if(!$res)
+ return $res;
+ else
+ return $id;
+ }
+
+ /**
+ @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 manufacturers_id = '".(int)$option['id']."' ";
+
+
+ if(isset($option['name']))$sql_data_array['manufacturers_name'] = tep_db_prepare_input($option['name']);
+ if(isset($option['name']))$sql_data_array['manufacturers_image'] = tep_db_prepare_input($option['image']);
+
+ $res=tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array, 'update' , substr($where,3) );
+
+
+ foreach(tep_get_languages() as $lg) {
+
+ $row = $option['langue'];
+
+ $where_lg .= $where . "AND languages_id = '".(int)$lg['id']."' ";
+
+ $sql_data_array_lg = array(
+ 'manufacturers_url'=> ((isset($row['url'][$lg['id']])) ? tep_db_prepare_input($row['url'][$lg['id']]) : '' ),
+ );
+
+ $res=tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array_lg, 'update' , substr($where_lg,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();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND manufacturers_id = '".(int)$option['id']."' ";
+ if(isset($option['name'])) $sql .="AND manufacturers_name = '".(string)tep_db_input($option['name'])."' ";
+// if(isset($option['visible'])) $sql .="AND manufacturersvisible = '".(int)$option['visible']."' ";
+
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_MANUFACTURERS . " a ".
+ " WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+
+ // call all langue for this post
+ $whlg = '';
+ if(isset($option['language_id']))
+ $whlg=" AND languages_id='" . $option['language_id'] . "' ";
+
+ $_query = $DB->query("select * from " . TABLE_MANUFACTURERS_INFO . " fd where fd.manufacturers_id = '" . (int)$result['manufacturers_id'] . "' ");
+
+ foreach($_query->fetchAllAssoc() as $row)
+ $result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row));
+
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result) {
+ // call all langue for this post
+ $whlg = '';
+ if(isset($option['language_id']))
+ $whlg=" AND languages_id='" . $option['language_id'] . "' ";
+
+ $_query = $DB->query("select * from " . TABLE_MANUFACTURERS_INFO . " fd where fd.manufacturers_id = '" . (int)$result['manufacturers_id'] . "' ");
+
+ foreach($_query->fetchAllAssoc() as $row)
+ $result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row));
+
+
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+ }
+
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND manufacturers_id = '".(int)$option['id']."' ";
+ if(isset($option['name'])) $sql .="AND manufacturers_name = '".(string)tep_db_input($option['name'])."' ";
+
+
+ if($sql=='')
+ return false;
+
+
+ $res = $DB->query("SELECT manufacturers_id as id FROM " . TABLE_MANUFACTURERS ." WHERE ". substr($sql, 3 ).' LIMIT 1' );
+ $result = $res->fetchAssoc();
+
+
+ // childs tables
+ $DB->query("DELETE FROM " . TABLE_MANUFACTURERS_INFO ." WHERE ". (int)$result['id'] );
+
+/// TODO link update tablke product for delete id manuf
+
+ $DB->query("DELETE FROM " . TABLE_MANUFACTURERS ." WHERE ". (int)$result['id'] );
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'manufacturers_id' => '',
+ 'manufacturers_name' => '',
+ 'manufacturers_image' => '',
+// 'manufacturersvisible' => '',
+ );
+
+ foreach(tep_get_languages() as $lg)
+ $par['lg'][$lg['id']] = array(
+ 'manufacturers_url'=>'',
+ );
+
+ 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,'manufacturers_') ===0)
+ $key=substr($key,strlen('manufacturers_'));
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.delete.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.delete.gab (rev 0)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.delete.gab 2012-05-11 17:01:00 UTC (rev 4420)
@@ -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 11/05/2012 ,15:04:13
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('@manufacturers heading title delete'); ?></h3>
+
+
+<div class="box_uniq block_form">
+
+
+ <?php echo tep_draw_form('zone', manufacturers::FILENAME, 'action=delete_confirm', 'post') ?>
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_draw_hidden_field('cID', '', manufacturers::$Id);
+
+ echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
+ echo tep_js_back(tep_href_link(manufacturers::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+ <br class="clear" />
+
+</div>
Added: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.edit.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.edit.gab (rev 0)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/display_view.edit.gab 2012-05-11 17:01:00 UTC (rev 4420)
@@ -0,0 +1,74 @@
+<?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/05/2012 ,15:04:13
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('@manufacturers heading title edit'); ?></h3>
+
+<div class="box_uniq block_form">
+<?php echo tep_draw_form('manufacturers', manufacturers::FILENAME, 'action='.((manufacturers::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
+
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('@manufacturers tab specification'); ?></a></li>
+ </ul>
+
+ <div class="fleft w_70">
+ <div id="tabs-1" class="tabPage">
+
+ <p class="block_input">
+ <Label><?php echo __('@manufacturers text info name') ?></label>
+ <?php echo tep_draw_input_field('name', '', manufacturers::$Info->name,'', true) ?>
+ </p>
+
+ <div class="tabs_lang">
+ <ul>
+ <?php foreach(tep_get_languages() as $lg): ?>
+ <li>
+ <a href="#fieldset_<?php echo $lg['id'] ?>">
+ <?php echo tep_language_image($lg['directory'] . '/images/' .$lg['image'], $lg['name']); ?>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ <?php foreach(tep_get_languages() as $lg): ?>
+ <fieldset id="fieldset_<?php echo $lg['id'] ?>" class="block_field">
+ <p class="block_input">
+ <label for="<?php echo 'url' . $lg['id']; ?>"><?php echo __('@manufacturers text info url'); ?></label>
+ <?php echo tep_draw_input_field('url[' . $lg['id'] . ']', 'url_' . $lg['id'], manufacturers::$Info->lg[ $lg['id']]->url, 'size="70"', false) ; ?>
+ </p>
+ </fieldset>
+ <?php endforeach; ?>
+ </div>
+
+ </div>
+ </div>
+
+ <div class="fleft w_30">
+
+ <p class="block_input">
+ <?php echo '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur("image", "image", '').'return false;">'.tep_draw_input_field('image','', manufacturers::$Info->image ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>'; ?>
+ </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(manufacturers::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </div>
+
+
+
+ <br class="clear" />
+ </div>
+
+</form>
+</div>
Added: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/filter.manufacturer.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/filter.manufacturer.gab (rev 0)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/filter.manufacturer.gab 2012-05-11 17:01:00 UTC (rev 4420)
@@ -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 oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $languages_id;
+
+$res = sqlmanufacturer::fetch(array('language_id'=>$languages_id), true);
+
+if(is_object($res))
+ $list =array($res);
+else
+ $list = $res;
+
+?>
+
+ <fieldset>
+ <legend><?php echo __('@products filter legend choose manufacturer'); ?></legend>
+ <ul >
+ <?php foreach($list as $k=>$item): ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('filters[manufacturer]['.$item->id.']', 'filters[manufacturer]['.$item->id.']', 'on', (bool) (count((string)$_SESSION['filters']['manufacturer'])<=0 || (string)@$_SESSION['filters']['manufacturer'][$item->id] == 'on')); ?>
+ <?php echo $item->name ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+ </fieldset>
Deleted: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/manufacturers.listing.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/manufacturers.listing.gab 2012-05-11 16:46:12 UTC (rev 4419)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/gabarit/manufacturers.listing.gab 2012-05-11 17:01:00 UTC (rev 4420)
@@ -1,34 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(FILENAME_MANUFACTURERS,'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png',IMAGE_INSERT ) . __('image insert manfufactured') . '</a>'; ?>
- </div>
-
-<div class="box_uniq">
- <div class="box_left">
- <table width="100%" class="dataTable">
- <thead>
- <tr>
- <th><?php echo __('table heading manufacturers'); ?></th>
- <th><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
- <tbody>
- <!-- BLOCK AJAX -->
- </tbody>
- </table>
- </div>
-
-<div class="box_right">
- <?php echo manufacturers::get_right_bar() ?>
-</div>
\ No newline at end of file
Modified: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt 2012-05-11 16:46:12 UTC (rev 4419)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt 2012-05-11 17:01:00 UTC (rev 4420)
@@ -1,30 +1,42 @@
<?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.9
- @date 18/07/10, 19:49
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['heading title']='Fabricants';
-$lang['table heading manufacturers']='Fabricants';
-$lang['table heading action']='Action';
-$lang['text heading new manufacturer']='Nouveau fabricant';
-$lang['text heading edit manufacturer']='Éditer le fabricant';
-$lang['text heading delete manufacturer']='Supprimer le fabricant';
-$lang['text manufacturers']='Fabricants :';
-$lang['text date added']='Date d\'ajout :';
-$lang['text last modified']='Dernière modification :';
-$lang['text products']='Produits :';
-$lang['text new intro']='Merci de compléter les informations sur le nouveau fabricant';
-$lang['text edit intro']='Merci de faire les changements nécessaires';
-$lang['text manufacturers name']='Nom du fabricant :';
-$lang['text manufacturers image']='Image du fabricant :';
-$lang['text manufacturers url']='URL du fabricant :';
-$lang['text delete intro']='Êtes-vous sûr de vouloir supprimer ce fabricant ?';
-$lang['text delete image']='Suppprimer l\'image du fabricant ?';
-$lang['text delete products']='Supprimer tous les produits de ce fabricant ? (en incluant les critiques, produits en promotion, produits à venir)';
-$lang['text delete warning products']='<strong>ATTENTION :</strong> Il reste %s produit(s) liées à ce fabricant !';
-$lang['image insert manfufactured']='Ajouter un fabricant';
+
+/* listing */
+ $lang['heading title manufacturers'] = "Listing Fabricants";
+ $lang['@manufacturers image add'] = "Ajouter un fabricant";
+
+ $lang['@manufacturers table heading title'] = "Nom";
+ $lang['@manufacturers table heading image'] = "Logo";
+ $lang['@manufacturers table heading date added'] = "Créer le";
+ $lang['@manufacturers table heading last modified'] = "Modifié le";
+ $lang['table heading action'] = "Action";
+ $lang['@manufacturers table heading url'] = "Url";
+ $lang['@manufacturers table heading url clicked'] = "Nbr click";
+ $lang['@manufacturers table heading last click'] = "Derniers click";
+
+
+/* Edit */
+ $lang['@manufacturers heading title edit'] = "Fiche fabricant - Edition d'un Fabricant";
+ $lang['@manufacturers tab specification'] = "Caractéristique";
+ $lang['@manufacturers text info name'] = "Nom";
+ $lang['@manufacturers text info url'] = "Url externe du fabicant";
+ $lang['@manufacturers text info image'] = "Logo";
+
+/* Delete */
+ $lang['@manufacturers heading title delete'] = "Supprimer ce fabricant";
+
+
+
+// $lang['text delete image']='Suppprimer l\'image du fabricant ?';
+// $lang['text delete products']='Supprimer tous les produits de ce fabricant ? (en incluant les critiques, produits en promotion, produits à venir)';
+// $lang['text delete warning products']='<strong>ATTENTION :</strong> Il reste %s produit(s) liées à ce fabricant !';
+// $lang['image insert manfufactured']='Ajouter un fabricant';
?>
\ No newline at end of file
Modified: trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/modules/pages/manufacturers.php
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/modules/pages/manufacturers.php 2012-05-11 16:46:12 UTC (rev 4419)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/admin/includes/modules/pages/manufacturers.php 2012-05-11 17:01:00 UTC (rev 4420)
@@ -1,306 +1,614 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 10:32
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @version 2.1.1
+ @date 11/05/2012 ,15:04:13
+ @author genrated by GenerCode
@encode UTF-8
- @class currencies
+ @class manufacturers
*/
class manufacturers
- implements ExtModPage, InterfacedTJsonS {
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ /*IntModTwo, */ /// new interface module for nextgen module
+ ExtModConfig {
- public static $code;
+ const FILENAME = FILENAME_MANUFACTURERS;
- public static $action;
-
+ /**
+ @var string file
+ */
+ public static $Id;
+ /**
+ @var array list code action module
+ */
public static $list=array();
/**
- class constructor
+ @var current object
*/
+ public static $Info;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
+
+
+ /**
+ @brief class constructor
+ */
public function __construct() {
+ self::GetConf();
+ }
+
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
self::$code=__CLASS__;
- //! active datatable in ajax, precise les GET necessaire
- define('JSONSTATMENT', 'mod=page&type='.self::$code);
- }
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
- public function check_action($actions){
- global $messageStack;
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
-// $messageStack
- self::$action=$actions;
- switch (self::$action) {
- case 'insert':
- case 'save':
- if (isset($_GET['mID'])) $manufacturers_id = tep_db_prepare_input($_GET['mID']);
- $manufacturers_name = tep_db_prepare_input($_POST['manufacturers_name']);
- $sql_data_array = array('manufacturers_name' => $manufacturers_name);
+ /**
+ @remarks not load if not first init
+ */
+ if(!defined('JSONSTATMENT')){
- if ($action == 'insert') {
- $insert_sql_data = array('date_added' => 'now()');
+ 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 : '' )
+ );
+ }
- $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
- tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array);
- $manufacturers_id = tep_db_insert_id();
- } elseif ($action == 'save') {
- $update_sql_data = array('last_modified' => 'now()');
- $sql_data_array = array_merge($sql_data_array, $update_sql_data);
- tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "'");
- }
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields['c.manufacturers_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('@manufacturers table heading title'),
+ 'default'=>true,
+ 'width'=>'35%',
+ );
- if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) {
- tep_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $manufacturers_image->filename . "' where manufacturers_id = '" . (int)$manufacturers_id . "'");
- }
+ self::$allfields['c.manufacturers_image'] = array(
+ 'sort'=>false,
+ 'alias'=>'image',
+ 'text'=>__('@manufacturers table heading image'),
+ );
- $languages = tep_get_languages();
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $manufacturers_url_array = $_POST['manufacturers_url'];
- $language_id = $languages[$i]['id'];
+ self::$allfields['mi.manufacturers_url'] = array(
+ 'alias'=>'url',
+ 'sort'=>true,
+ 'text'=>__('@manufacturers table heading url'),
+ );
- $sql_data_array = array('manufacturers_url' => tep_db_prepare_input($manufacturers_url_array[$language_id]));
+ self::$allfields['mi.url_clicked'] = array(
+ 'alias'=>'clicked',
+ 'sort'=>true,
+ 'text'=>__('@manufacturers table heading url clicked'),
+ );
- if ($action == 'insert') {
- $insert_sql_data = array('manufacturers_id' => $manufacturers_id,
- 'languages_id' => $language_id);
+ self::$allfields['mi.date_last_click'] = array(
+ 'alias'=>'last_click',
+ 'sort'=>false,
+ 'text'=>__('@manufacturers table heading last click'),
+ );
- $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
+ self::$allfields['c.date_added'] = array(
+ 'sort'=>true,
+ 'text'=>__('@manufacturers table heading date added'),
+ 'width'=>'8%',
+ );
+ self::$allfields['c.last_modified'] = array(
+ 'sort'=>true,
+ 'text'=>__('@manufacturers table heading last modified'),
+ 'width'=>'8%',
+ );
- tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);
- } elseif ($action == 'save') {
- tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "' and languages_id = '" . (int)$language_id . "'");
- }
- }
- osCSS_Cache::clear('manufacturer');
+ /**
+ @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'];
- tep_redirect(tep_href_link(FILENAME_MANUFACTURERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'mID=' . $manufacturers_id));
- break;
- case 'deleteconfirm':
- $manufacturers_id = tep_db_prepare_input($_GET['mID']);
+ self::$InitInfo['modele']['listing']=array(
+// 0=>false,
+ 1=>false,
+ );
- if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) {
- $manufacturer_query = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$manufacturers_id . "'");
- $manufacturer = tep_db_fetch_array($manufacturer_query);
+ // min fields and not view directly colonne fields
+ $listfield = " c.manufacturers_id as id, ";
+ $_SESSION['filters']['allfields'] = array();
+ // put in
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
- $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG_IMAGES . $manufacturer['manufacturers_image'];
+ $in_session = $_SESSION['filters']['allfields'];
+ // check and appli
+ foreach(self::$allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
- if (file_exists($image_location)) @unlink($image_location);
- }
+ 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%';
+ }
- tep_db_query("delete from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$manufacturers_id . "'");
- tep_db_query("delete from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$manufacturers_id . "'");
+ 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 (isset($_POST['delete_products']) && ($_POST['delete_products'] == 'on')) {
- $products_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where manufacturers_id = '" . (int)$manufacturers_id . "'");
- while ($products = tep_db_fetch_array($products_query)) {
- tep_remove_product($products['products_id']);
- }
- } else {
- tep_db_query("update " . TABLE_PRODUCTS . " set manufacturers_id = '' where manufacturers_id = '" . (int)$manufacturers_id . "'");
- }
- osCSS_Cache::clear('manufacturer');
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+ }
+ }
- tep_redirect(tep_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page']));
- break;
- case 'insertajax':
+ 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') );
- $manufacturers_name = tep_db_prepare_input($_GET['manufacturers_name']);
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;
- $sql_data_array = array('manufacturers_name' => $manufacturers_name);
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'type'=>'listfield'
+ ),
+ );
- $insert_sql_data = array('date_added' => 'now()');
+ /**
+ @remarks Put detail for listing methode
+ */
+ self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
- $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
- tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array);
- $manufacturers_id = tep_db_insert_id();
+ /**
+ @remarks this define menu master module in page
+ */
+ if(self::$action =='listing'){
+ $i = 0;
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'',
+ 'title'=>__('@manufacturers image add'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
+ }
- if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) {
- tep_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $manufacturers_image->filename . "' where manufacturers_id = '" . (int)$manufacturers_id . "'");
- }
+ return true;
+ }
- osCSS_Cache::clear('manufacturer');
- print "<script type=\"text/javascript\">get_ajax('parent.manufacturers_id',".
- "'manufacturers_id=".$manufacturers_id."',".
- "'".FILENAME_CATEGORIES."' );</script>";
+ /**
+ @fn check_action($actions)
+ @brief Process action
+ @param $actions string
+ @return $actions string
+ */
+ public function check_action($actions){
+ global $messageStack;
- break;
+ self::$action=$actions;
+ switch (self::$action) {
- default:
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'] =array();
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ }
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+ /**
+ @remarks specific ajax 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'] );
+ sqlmanufacturer::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['name']),
+ );
+
+ foreach(tep_get_languages() as $row) {
+ $myarray['langue']['url'][$row['id']] = tep_db_prepare_input($_POST['url'][$row['id']]);
+ }
+
+ if (isset($_POST['image']) && !preg_match('#^[0-9]*$#',$_POST['image']) && ($_POST['image'] != 'none')){
+ if( substr($_POST['image'], 0,strlen( DIR_WS_CATALOG_IMAGES)) ==DIR_WS_CATALOG_IMAGES )
+ $img_src= tep_db_prepare_input(substr($_POST['image'], strlen( DIR_WS_CATALOG_IMAGES) ) );
+ else
+ $img_src= tep_db_prepare_input($_POST['image']);
+
+ $sqli=sqlimage::fetch(array('pathkey'=>md5(DIR_WS_IMAGES.$img_src) ), true);
+
+ $myarray['image'] = $sqli->rowid;
+ }
+
+ sqlmanufacturer::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['name']),
+ );
+
+ foreach(tep_get_languages() as $row) {
+ $myarray['langue']['url'][$row['id']] = tep_db_prepare_input($_POST['url'][$row['id']]);
+ }
+
+ if (isset($_POST['image']) && !preg_match('#^[0-9]*$#',$_POST['image']) && ($_POST['image'] != 'none')){
+ if( substr($_POST['image'], 0,strlen( DIR_WS_CATALOG_IMAGES)) ==DIR_WS_CATALOG_IMAGES )
+ $img_src= tep_db_prepare_input(substr($_POST['image'], strlen( DIR_WS_CATALOG_IMAGES) ) );
+ else
+ $img_src= tep_db_prepare_input($_POST['image']);
+
+ $sqli=sqlimage::fetch(array('pathkey'=>md5(DIR_WS_IMAGES.$img_src) ), true);
+
+ $myarray['image'] = $sqli->rowid;
+ }
+
+// var_dump($myarray);
+// exit;
+ sqlmanufacturer::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=sqlmanufacturer::delete($myarray);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
}
-
return self::$action;
}
public function get_header(){
- echo tep_get_filebroswerserveur();
}
- public static function load_db_values($ID){
+ /**
+ @fn manufacturers::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
- $DB=Database::getInstance();
+ $DB= Database::getInstance();
- $query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from " . TABLE_MANUFACTURERS . " where manufacturers_id='".(int)$ID."' ";
- $query = $DB->query($query_raw);
+ switch (self::$action) {
- $manufacturer_products_query = $DB->query("select count(*) as products_count from " . TABLE_PRODUCTS . " where manufacturers_id = '" . (int)$ID. "'");
+ case 'delete':
+ case 'edit':
+ case 'new':
+ if( (int)self::$Id > 0) {
+ self::$Info = sqlmanufacturer::fetch(array('id'=>self::$Id ), true);
+ }
+ else{
+ self::$Info = sqlmanufacturer::Specimen(true);
+ }
+ break;
- return new objectInfo(array_merge($query->fetchAssoc(), $manufacturer_products_query->fetchAssoc()) );
- }
- public function display_view(){
- self::tep_get_list();
- return tep_get_include_contents(self::$code.'.listing');
+ case 'listing':
+ default:
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+ $query_raw = "select ".$adjust->listfields." from " . TABLE_MANUFACTURERS . " c ".
+ " LEFT JOIN ".TABLE_MANUFACTURERS_INFO." mi ON (mi.manufacturers_id = c.manufacturers_id AND mi.languages_id = '".(int)$adjust->languages_id."' ) ".
+ ((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' manufacturers_name ASC ');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+ }
}
- public static function get_right_bar(){
- $heading = array();
- $contents = array();
- if(isset($_GET['mID'])) $mInfo=self::load_db_values($_GET['mID']);
+ /**
+ @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'], 'manufacturers_id'=>(int)$_GET['cID']));
+ break;
- switch (self::$action) {
- case 'new':
- $heading[] = array('text' => __('text heading new manufacturer') );
- $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'action=insert', 'post', 'enctype="multipart/form-data"'));
- $contents[] = array('text' => TEXT_NEW_INTRO);
- $contents[] = array('class' => 'block_input','text' => __('text manufacturers name') . tep_draw_input_field('manufacturers_name'));
- $contents[] = array('class' => 'block_input','text' => __('text manufacturers image') . tep_draw_file_field('manufacturers_image'));
+ /**
+ @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);
+ }
+ }
- $manufacturer_inputs_string = '<div class="tabs_lang"><ul> ';
- $languages = tep_get_languages();
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $manufacturer_inputs_string .= '<li><a href="#manufactured_lang-'.($i+1).'" >' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '</a></li>';
- }
- $manufacturer_inputs_string .= '</ul> ';
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $manufacturer_inputs_string .='<p id="manufactured_lang-'.($i+1).'">'.tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', '').'</p>';
- }
- $manufacturer_inputs_string .= '</div>';
- $contents[] = array('class' => 'block_input','text' => __('text manufacturers url') . $manufacturer_inputs_string);
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button" href="' . tep_href_link(FILENAME_MANUFACTURERS ) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'edit':
- $heading[] = array('text' => __('text heading edit manufacturer') );
- $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
- $contents[] = array('text' => __('text edit intro'));
- $contents[] = array('class' => 'block_input','text' => __('text manufacturers name') . tep_draw_input_field('manufacturers_name','', $mInfo->manufacturers_name));
- $contents[] = array('class' => 'block_input','text' => __('text manufacturers image') . '<a class="button" href="#" onclick="'.tep_get_filebroswerserveur("products_image").'">'.tep_draw_input_field('products_image','', $mInfo->manufacturers_image) . PARCOURIR_SERVER . '</a>' . $mInfo->manufacturers_image);
+ /**
+ @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;
- $manufacturer_inputs_string = '<div class="tabs_lang"><ul> ';
- $languages = tep_get_languages();
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $manufacturer_inputs_string .= '<li><a href="#manufactured_lang-'.($i+1).'" >' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '</a></li>';
- }
- $manufacturer_inputs_string .= '</ul> ';
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $manufacturer_inputs_string .='<p id="manufactured_lang-'.($i+1).'">'.tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']').'</p>';
- }
- $manufacturer_inputs_string .= '</div>';
+ /// @remarks force load conf
+ self::GetConf();
- $contents[] = array('class' => 'block_input','text' => __('text manufacturers url') . $manufacturer_inputs_string);
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button" href="' . tep_href_link(FILENAME_MANUFACTURERS, 'mID=' . $mInfo->manufacturers_id) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'delete':
- $heading[] = array('text' => __('text heading delete manufacturer') );
+ $res=array();
- $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'));
- $contents[] = array('text' => __('text delete intro'));
- $contents[] = array('text' => '<strong>' . $mInfo->manufacturers_name . '</strong>');
- $contents[] = array('class' => 'block_input','text' => tep_draw_checkbox_field('delete_image', '', true) . __('text delete image'));
+ /**
+ @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;
- if ($mInfo->products_count > 0) {
- $contents[] = array('class' => 'block_input','text' => tep_draw_checkbox_field('delete_products') . __('text delete products'));
- $contents[] = array('text' => sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
- }
+ $res = self::GetDBValue();
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_MANUFACTURERS, 'mID=' . $mInfo->manufacturers_id) . '">' . IMAGE_CANCEL . '</a>');
- break;
- default:
- if (isset($mInfo) && is_object($mInfo)) {
- $heading[] = array('text' => $mInfo->manufacturers_name );
+ self::$list= $query_numrows ; //= count($res);
- // $contents[] = array('align' => 'center', 'text' => );
- $contents[] = array('text' => __('text date added') . tep_date_short($mInfo->date_added));
- if (tep_not_null($mInfo->last_modified)) $contents[] = array('text' => __('text last modified') . tep_date_short($mInfo->last_modified));
- $contents[] = array('text' => tep_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name));
- $contents[] = array('text' => __('text products') . $mInfo->products_count);
- }
- break;
- }
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- $box = new box;
- echo $box->infoBox($heading, $contents);
- }
+ return $res;
}
/** public static InterfacedTJsonS */
- private static function get_item_action($manufacturers){
- return '<span class="view fils fleft">'.
- '<a class="buttonimg" href="' . tep_href_link(FILENAME_MANUFACTURERS, 'mID=' . $manufacturers['manufacturers_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT) . '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_MANUFACTURERS, 'mID=' . $manufacturers['manufacturers_id'] . '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png', IMAGE_DELETE) . '</a>'.
- '</span> <span class=" fright">'.
- '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, 'mID=' . $manufacturers['manufacturers_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'.
- '</span>';
- }
+ /**
+ @brief format db value for display page
+ @param $_query ressource db sql
+ @return array
+ */
+ private static function FormatDBValue($_query){
+ $DB=Database::getInstance();
+ $res=array();
- public static function tep_get_modele(){
- return array( 'manufacturers_name',
-// 'code',
-// 'value'
- );
- }
+ switch (parent::$action) {
+ case 'edit';
+ global $query_numrows,$languages_id;
- public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
- global $query_numrows;
+ break;
+ case 'listing':
+ global $query_numrows,$languages_id;
- $DB=Database::getInstance();
+ while ($item = $_query->fetchAssoc()) {
- $query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from " . TABLE_MANUFACTURERS . " ".$sWhere." order by ".((!empty($sOrder)) ? $sOrder : 'manufacturers_name ASC');
- $currency_split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
+ $item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
- $currency_query = $DB->query($query_raw);
+ foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
+ if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
+ elseif(in_array($k , array('date_added', 'last_modified' ,'last_click')) ) $ord[$k]=(tep_not_null($item[$k])? tep_date_short($item[$k]) : '' );
+// elseif($k == 'manufacturers_visible') $ord[$k]=self::RowStatus($item);
+ else $ord[$k]=$item[$k];
- while ($currency = $currency_query->fetchAssoc() ) {
- self::$list[]=$currency;
+ $res[]=$ord;
+ }
+ break;
}
- $li=$res=array();
- foreach(self::$list as $item){
- foreach(self::tep_get_modele() as $k) $li[$k]=$item[$k];
- $li['action']=self::get_item_action($item);
- $res[]=$li;
- }
-
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['id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['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['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
Added: trunk/extensions/MANUFACTURERS_unstable/catalog/common/classes/datatype_drivers/Data_manufacturer.php
===================================================================
--- trunk/extensions/MANUFACTURERS_unstable/catalog/common/classes/datatype_drivers/Data_manufacturer.php (rev 0)
+++ trunk/extensions/MANUFACTURERS_unstable/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-05-11 17:01:00 UTC (rev 4420)
@@ -0,0 +1,243 @@
+<?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 16/03/2012, 16:16
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+
+*/
+
+class Data_manufacturer {
+
+ /**
+ @var DataType string
+ */
+ public $DataType = 'manufacturer';
+
+ /**
+ @var DataType array reg for seo class
+ */
+ public $reg_anchors = array(
+ 'manufacturers_id' => 'm'
+ );
+ /**
+ @var DataType array reg check for control get params , please respect order $reg_anchors
+ */
+ public $reg_check = array(
+ '([0-9]*)' // unique page
+ );
+ /**
+ @var DataType files for folder /content
+ */
+ public $reg_filenames = array(
+ 'FILENAME_MANUFACTURER' => FILENAME_DEFAULT // unique page
+ );
+ /**
+ @var DataType Tables define
+ */
+ public $db_tables = array(
+ 'TABLE_MANUFACTURERS' => 'manufacturers', //
+ 'TABLE_MANUFACTURERS_INFO' => 'manufacturers_info' //
+ );
+
+ /**
+ @var DataType dynamic
+ */
+ public $DataTypeDynamic = true;
+
+ /**
+ @var DataType root listing
+ Use for generate listing based on current data type precised in array
+ 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
+ */
+ function __construct($next=false){
+ $this->RootListing = array_map('trim',explode(',',DATATYPES_ROOTLISTING_MANUFACTURER));
+ }
+
+ /**
+ @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)
+ */
+ public function is_type($mode='unique'){
+
+
+ if( isset($_GET['manufacturers_id']) )
+ switch(strtolower($mode)){
+
+ case 'preload_root':
+ $page = page::getInstance();
+
+ $category_depth = $page->GetVar('category_depth');
+
+ if($category_depth == 'top'){
+ $category_depth = 'product';
+ $page->add_var_page('category_depth',$category_depth);
+ }
+ break;
+
+ case 'transversal':
+ return true;
+ break;
+ case 'listing':
+ return true;
+ break;
+ // listing mode, block home page
+ case 'unique':
+ DataTypes::ForceChilds($this->DataType, 'product');
+ break;
+ }
+ return false;
+ }
+
+
+ /**
+ @brief calcul du cpath specifique a ce tyep de donnée
+ */
+ function GetcPath(){
+ return false;
+ }
+
+ /**
+ @brief Prepare an retrun result Seo request
+ @param $mode string anchor key used
+ @param $subtype Not used
+ @param $id integer current id
+ @param $language_id integer current language id
+ @return array (
+ ID => '',
+ tName => '',
+ head_desc_tag => '',
+ head_keywords_tag =>''
+ )
+ */
+ public function SeoGetQuery($mode, $subtype, $id, $language_id){
+ $DB=Database::getInstance();
+
+ switch($mode){
+ default:
+ $sql = "SELECT manufacturers_id as ID , manufacturers_name as tName FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id='".(int)$id."' LIMIT 1";
+ $rsql = $DB->query($sql);
+ $result = $rsql->fetchAssoc();
+ $result['head_desc_tag']='';
+ $result['head_keywords_tag']='';
+
+ $result['sql']=$sql;
+ }
+
+ return $result;
+ }
+
+ /**
+ @brief chargement des données transversal
+ @param $type string name childs type for listing
+ @param subtype object childs DataType
+ */
+ function FO_load_listing($type,$subtype){
+ global $current_category_id, $languages_id;
+ $page = page::getInstance();
+ $category_depth = $page->GetVar('category_depth');
+
+ $this->ChildsType = $type;
+
+
+ $sql_tmp = $subtype->listing_sql;
+
+ $this->listing_sql =
+ "SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
+ $sql_tmp['tables'] .
+ $sql_tmp['where'] .
+ " AND manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' ";
+ $this->listing_sort = $sql_tmp['sort'] ;
+ $this->listing_col_count = $sql_tmp['col_count'] ;
+
+ }
+
+
+
+ /**
+ @brief calcul du cpath specifique a ce tyep de donnée
+ */
+ function FO_load_page($mode='unique'){
+ global $aca_product,$product_info, $page_content, $language, $cPath, $languages_id;
+
+ $page = page::getInstance();
+ $DB=Database::getInstance();
+
+ switch($mode){
+ case 'transversal':
+ case 'listing':
+ case 'unique':
+
+ /// get the categorie name and put it on the header
+ if (isset($_GET['manufacturers_id'])) {
+
+ $man=$DB->query("select * from " . TABLE_MANUFACTURERS . " m LEFT JOIN ".TABLE_MANUFACTURERS_INFO." mi ON(m.manufacturers_id = mi.manufacturers_id AND languages_id = '".$languages_id."') where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' ");
+ $manuf= $man->fetchAssoc();
+ tep_db_free_result($man);
+ $image = $manuf['manufacturers_image'];
+ $page->breadcrumb->add($manuf['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id']));
+
+
+ $page->add_var_page('manufacturers',$manuf);
+
+ // var use in draw master detail listing
+ $obj = new stdClass();
+ $obj->type = $this->DataType ;
+ $obj->gabarit = $this->DataType.'/listing.detail' ;
+ $obj->image = $manuf['manufacturers_image'];
+ $obj->nam...
[truncated message content] |
|
From: <os...@us...> - 2012-05-11 16:46:23
|
Revision: 4419
http://oscss.svn.sourceforge.net/oscss/?rev=4419&view=rev
Author: oscim
Date: 2012-05-11 16:46:12 +0000 (Fri, 11 May 2012)
Log Message:
-----------
Suppression des elements de configuration psecifique au datytype manufacturer
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-11 16:36:51 UTC (rev 4418)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-11 16:46:12 UTC (rev 4419)
@@ -255,9 +255,6 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('EXPECTED_PRODUCTS_FIELD_S', 'EXPECTED_PRODUCTS_FIELD', 'date_expected', 'EXPECTED_PRODUCTS_FIELD_L', '20', '9', NULL, NOW(), NULL, 'tep_cfg_select_option(array(\'products_name\', \'date_expected\'),');
-- 21 boxes
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_DISPLAY_MANUFACTURERS_IN_A_LIST_S', 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST', '10', 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST_L', '21', '0', NULL, NOW(), NULL, NULL);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_MANUFACTURERS_LIST_S', 'MAX_MANUFACTURERS_LIST', '1', 'MAX_MANUFACTURERS_LIST_L', '21', '1', NULL, NOW(), NULL, NULL);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_DISPLAY_MANUFACTURER_NAME_LEN_S', 'MAX_DISPLAY_MANUFACTURER_NAME_LEN', '15', 'MAX_DISPLAY_MANUFACTURER_NAME_LEN_L', '21', '2', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_RANDOM_SELECT_NEW_S', 'MAX_RANDOM_SELECT_NEW', '10', 'MAX_RANDOM_SELECT_NEW_L', '21', '3', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MAX_RANDOM_SELECT_SPECIALS_S', 'MAX_RANDOM_SELECT_SPECIALS', '10', 'MAX_RANDOM_SELECT_SPECIALS_L', '21', '4', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function) values ('OSCSS__B_RECENTLY_VIEWED_S', 'OSCSS__B_RECENTLY_VIEWED', 'true', 'OSCSS__B_RECENTLY_VIEWED_L', '21', '12', NOW(), NOW(),'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),');
@@ -345,9 +342,8 @@
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 ,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);
+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,home,', 'DATATYPES_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);
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_FEATURED_S', 'DATATYPES_ROOTLISTING_FEATURED', 'product', 'DATATYPES_ROOTLISTING_FEATURED_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
-- 129 option orders
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-05-11 16:36:51 UTC (rev 4418)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-05-11 16:46:12 UTC (rev 4419)
@@ -30,12 +30,12 @@
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 ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '0', '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 ('NO_DISPLAY_SYMBOL_TAXE_S', 'NO_DISPLAY_SYMBOL_TAXE', 'GabaritTemplate', 'NO_DISPLAY_SYMBOL_TAXE_L', '0', '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 ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_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_S', 'DATATYPES', 'error,product,content,diver,categorie,manufacturer,home,', 'DATATYPES_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_S', 'DATATYPES', 'error,product,content,diver,categorie,home,', 'DATATYPES_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_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);
+
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) values ('SMTP_MAIL_SERVER_S', 'SMTP_MAIL_SERVER', 'localhost', 'SMTP_MAIL_SERVER_L', '12', '1', NOW(), NOW(), NULL, NULL);
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) values ('SMTP_PORT_NUMBER_S', 'SMTP_PORT_NUMBER', '25', 'SMTP_PORT_NUMBER_L', '12', '1', NOW(), NOW(), NULL, NULL);
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) values ('SMTP_SENDMAIL_FROM_S', 'SMTP_SENDMAIL_FROM', 'root@localhost', 'SMTP_SENDMAIL_FROM_L', '12', '1', NOW(), NOW(), NULL, NULL);
@@ -226,9 +226,6 @@
UPDATE osc_configuration SET configuration_key = 'ALLOW_GUEST_TO_TELL_A_FRIEND',configuration_title = 'Permettre la recommandation d''un article',configuration_description = 'Permettre aux visiteurs de recommander un article.',configuration_group_id = 19,use_function = 'tep_value_for_humain',set_function = 'tep_cfg_select_option(array(''true'', ''false''),',last_modified = '2012-03-27 19:17:04' WHERE configuration_key = 'ALLOW_GUEST_TO_TELL_A_FRIEND';
UPDATE osc_configuration SET configuration_key = 'EXPECTED_PRODUCTS_SORT',configuration_title = 'EXPECTED_PRODUCTS_SORT_S',configuration_description = 'EXPECTED_PRODUCTS_SORT_L',configuration_group_id = 20,use_function = NULL,set_function = 'tep_cfg_select_option(array(''asc'', ''desc''),',last_modified = NULL WHERE configuration_key = 'EXPECTED_PRODUCTS_SORT';
UPDATE osc_configuration SET configuration_key = 'EXPECTED_PRODUCTS_FIELD',configuration_title = 'EXPECTED_PRODUCTS_FIELD_S',configuration_description = 'EXPECTED_PRODUCTS_FIELD_L',configuration_group_id = 20,use_function = NULL,set_function = 'tep_cfg_select_option(array(''products_name'', ''date_expected''),',last_modified = NULL WHERE configuration_key = 'EXPECTED_PRODUCTS_FIELD';
-UPDATE osc_configuration SET configuration_key = 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST',configuration_title = 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST_S',configuration_description = 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST_L',configuration_group_id = 21,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST';
-UPDATE osc_configuration SET configuration_key = 'MAX_MANUFACTURERS_LIST',configuration_title = 'MAX_MANUFACTURERS_LIST_S',configuration_description = 'MAX_MANUFACTURERS_LIST_L',configuration_group_id = 21,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'MAX_MANUFACTURERS_LIST';
-UPDATE osc_configuration SET configuration_key = 'MAX_DISPLAY_MANUFACTURER_NAME_LEN',configuration_title = 'MAX_DISPLAY_MANUFACTURER_NAME_LEN_S',configuration_description = 'MAX_DISPLAY_MANUFACTURER_NAME_LEN_L',configuration_group_id = 21,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'MAX_DISPLAY_MANUFACTURER_NAME_LEN';
UPDATE osc_configuration SET configuration_key = 'MAX_RANDOM_SELECT_NEW',configuration_title = 'MAX_RANDOM_SELECT_NEW_S',configuration_description = 'MAX_RANDOM_SELECT_NEW_L',configuration_group_id = 21,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'MAX_RANDOM_SELECT_NEW';
UPDATE osc_configuration SET configuration_key = 'MAX_RANDOM_SELECT_SPECIALS',configuration_title = 'MAX_RANDOM_SELECT_SPECIALS_S',configuration_description = 'MAX_RANDOM_SELECT_SPECIALS_L',configuration_group_id = 21,use_function = NULL,set_function = NULL,last_modified = NULL WHERE configuration_key = 'MAX_RANDOM_SELECT_SPECIALS';
UPDATE osc_configuration SET configuration_key = 'OSCSS__B_RECENTLY_VIEWED',configuration_title = 'OSCSS__B_RECENTLY_VIEWED_S',configuration_description = 'OSCSS__B_RECENTLY_VIEWED_L',configuration_group_id = 21,use_function = 'tep_value_for_humain',set_function = 'tep_cfg_select_option(array(''true'', ''false''),',last_modified = NOW() WHERE configuration_key = 'OSCSS__B_RECENTLY_VIEWED';
@@ -320,5 +317,5 @@
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');
-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_S', 'DATATYPES', 'error, product,content, diver, categorie, manufacturer,home,', 'DATATYPES_L', '130', '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-05-11 16:37:03
|
Revision: 4418
http://oscss.svn.sourceforge.net/oscss/?rev=4418&view=rev
Author: oscim
Date: 2012-05-11 16:36:51 +0000 (Fri, 11 May 2012)
Log Message:
-----------
Correction diverse
suite nettoyage du code et reportdu control de l'activation des datatype afin d'activer/desactiver les options et requetes associ?\195?\169
Suite travail correction et ajustement de featured
Suite fragmentation du code et des requetes associ?\195?\169 aux fabricants, et preparation de la suppresion des derniers fichier dependant des fabicants
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/04_tools.php
trunk/catalog/admin/includes/boxes/08_cms.php
trunk/catalog/admin/includes/boxes/09_commercial.php
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/07_catalog.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php
trunk/catalog/common/classes/datatype_drivers/Data_product.php
trunk/catalog/redirect.php
trunk/catalog/templates/defaut/cfg/init.php
trunk/catalog/templates/defaut/includes/boxes/manufacturer_info.php
trunk/catalog/templates/defaut/includes/boxes/manufacturers.php
trunk/catalog/templates/defaut/includes/content/index_listing.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab
Modified: trunk/catalog/admin/includes/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/boxes/04_tools.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/boxes/04_tools.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -13,8 +13,9 @@
$tabl_link[]= array(FILENAME_GOOGLE_SITEMAP, 'BOX_TOOLS_GOOGLE_SITEMAP', 'ggmap',@$img['ggmap']);
$tabl_link[]= array(FILENAME_FULL_TAG, 'BOX_TOOLS_HEADER_TAG', 'headertag',@$img['headertag']);
- $tabl_link[]= array(FILENAME_NAVIGATION_LINKS, 'BOX_NAVIGATION_LINK', 'nav',@$img['navigation_link']);
+ $tabl_link[]= array(FILENAME_NAVIGATION_LINKS, 'BOX_NAVIGATION_LINK', 'nav',@$img['navigation_link']);
+
// if(_cst_bool('USE_LOCAL_GENERAT_PDF'))
// $tabl_link[]= array(FILENAME_BATCH_PRINT, 'BOX_TOOLS_BATCH_CENTER', 'batch_print',@$img['batch_print']);
Modified: trunk/catalog/admin/includes/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -14,7 +14,6 @@
$tabl_link[]= array(FILENAME_CMS_CONTENT, 'BOX_CMS_CONTENT', 'cms_content',@$img['cms_content']);
-
$tabl_link[] = array(
'ss_menu',
'BOX_NAVIGATION_DOCSANDIMAGE',
Modified: trunk/catalog/admin/includes/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/boxes/09_commercial.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/boxes/09_commercial.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -23,6 +23,9 @@
$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']);
+
+
if( DataTypes::is_active('featured'))
- $tabl_link[]= array(FILENAME_FEATURED, 'BOX_FEATURED', 'featured',@$img['featured']);
+ $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-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -178,8 +178,6 @@
$_query = $DB->query("select languages_id , fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' ");
- $descr = $_query->fetchAllAssoc();
-
foreach($_query->fetchAllAssoc() as $row)
$result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row));
@@ -191,6 +189,7 @@
$array=array();
global $languages_id;
+ foreach($res->fetchAllAssoc() as $result) {
// call all langue for this post
$whlg = '';
if(isset($option['language_id']))
@@ -198,14 +197,12 @@
$_query = $DB->query("select languages_id , fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' ");
- $descr = $_query->fetchAllAssoc();
-
foreach($_query->fetchAllAssoc() as $row)
$result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row));
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
-
+ }
return $array;
}
@@ -256,6 +253,11 @@
'featured_status' => '',
);
+ foreach(tep_get_languages() as $lg)
+ $par['lg'][$lg['id']] = array(
+ 'featured_title'=>'',
+ );
+
return ((!$shortkey)? $par : self::CleanKey($par));
}
Added: trunk/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.featured.gab 2012-05-11 16:36:51 UTC (rev 4418)
@@ -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 oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $languages_id;
+
+$res = sqlfeatured::fetch(array('language_id'=>$languages_id), true);
+
+if(is_object($res))
+ $list =array($res);
+else
+ $list = $res;
+
+?>
+
+ <fieldset>
+ <legend><?php echo __('@filters filter legend choose featured'); ?></legend>
+ <ul >
+ <?php foreach($list as $k=>$item): ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('filters[featured]['.$item->id.']', 'filters[featured]['.$item->id.']', 'on', (bool) ((string)$_SESSION['filters']['featured'][$item->id] == 'on')); ?>
+ <?php echo $item->lg[$languages_id]->title ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+ </fieldset>
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/07_catalog.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/07_catalog.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/07_catalog.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -1,22 +1,18 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 10/04/2012, 17:23
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- @brief file languages for boxes menu
-*/
-
-define('BOX_HEADING_CONF_CATALOG',"Catalogue" );
-define('BOX_CATALOG_PRODUCTS',"Produits" );
-define('BOX_CATALOG_PRODUCT_ADD',"Ajouter Produit" );
-define('BOX_CATALOG_PRODUCTS_EXPECTED',"Produit(s) en attente" );
-define('BOX_CATALOG_ATTIBUTES',"Attribut(s)" );
-define('BOX_CATALOG_STOCK',"Stock(s)" );
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/04/2012, 17:23
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief file languages for boxes menu
+*/
-/* Begin SPECIALS_stable - installed by CIP */
-define('BOX_CATALOG_SPECIALS', 'Promotion');
-/* End SPECIALS_stable - installed by CIP */
+define('BOX_HEADING_CONF_CATALOG',"Catalogue" );
+define('BOX_CATALOG_PRODUCTS',"Produits" );
+define('BOX_CATALOG_PRODUCT_ADD',"Ajouter Produit" );
+define('BOX_CATALOG_PRODUCTS_EXPECTED',"Produit(s) en attente" );
+define('BOX_CATALOG_ATTIBUTES',"Attribut(s)" );
+define('BOX_CATALOG_STOCK',"Stock(s)" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-11 16:36:51 UTC (rev 4418)
@@ -45,6 +45,12 @@
/* Filtre */
$lang['@products filter tab clause']="Autres" ;
+
+ $lang['@products filter tab manufacturer']="Fabricant" ;
+ $lang['@products filter legend choose manufacturer']="Preciser les fabricants visibles" ;
+
+
+ $lang['@products filter tab clause']="Autres" ;
$lang['@products filter legend products expected']="Produits à venir" ;
$lang['@products label text expected publied']="Produits publiés " ;
$lang['@products label text expected no publied']="Produits à venir" ;
Modified: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -5,7 +5,7 @@
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
@date 22/04/2012 ,22:50:08
- @author genrated by GenerCode
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class featureds
*/
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -429,9 +429,28 @@
self::$InitInfo['adjust']['sWhere'] .=" AND fada.featured_id IN (".substr($list, 0,-1).") ";
}
+ }
+
+ /**
+ @remarks filter based on featured
+ */
+ if( DataTypes::is_active('manufacturer')) {
+ if(isset($_SESSION['filters'][__CLASS__]['manufacturer']))
+ $_SESSION['filters']['manufacturer'] = $_SESSION['filters'] [__CLASS__]['manufacturer'];
+ else
+ $_SESSION['filters']['manufacturer'] =array();
+
+ $list = '';
+ if(count($_SESSION['filters']['manufacturer']) > 0){
+ foreach($_SESSION['filters']['manufacturer'] as $key=>$row)
+ $list .=$key.',';
+
+ self::$InitInfo['adjust']['sWhere'] .=" AND p.manufacturers_id IN (".substr($list, 0,-1).") ";
+ }
}
+
/**
@remarks filter based on subtype products
*/
@@ -508,11 +527,11 @@
if( DataTypes::is_active('categorie'))
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'categorie' );
-// if( DataTypes::is_active('manufacturer'))
-// self::$InitInfo['tfilter']['listing'][]=array(
-// 'title'=>__('@products filter tab manufacturer'),
-// 'content'=>tep_get_include_contents(__CLASS__.'/filter.manufacturer'),
-// );
+ if( DataTypes::is_active('manufacturer'))
+ self::$InitInfo['tfilter']['listing'][]=array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ );
if( DataTypes::is_active('featured'))
self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'featured' );
@@ -627,6 +646,12 @@
$_SESSION['filters'][__CLASS__]['featured'][$key] = 'on';
}
+ if( DataTypes::is_active('manufacturer'))
+ foreach($_POST['filters']['manufacturer'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['manufacturer'][$key] = 'on';
+ }
+
foreach($_POST['filters']['language'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['language'][$key] = 'on';
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -379,7 +379,7 @@
/// add category names to the breadcrumb trail
$cPath_array = $page->GetVar('cPath_array');;
-// print_r($cPath_array);
+
if (isset($cPath_array)) {
for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
if( ($categories=categorie::get_item((int)$cPath_array[$i])) !=false)
@@ -390,6 +390,8 @@
// var use in draw master detail listing
$obj = new stdClass();
+ $obj->type = $this->DataType ;
+// $obj->gabarit = $this->DataType.'/listing.detail' ;
$obj->image = $categories->categories_image;
$obj->name = $categories->categories_name;
$obj->description = $categories->categories_description;
Modified: trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -198,7 +198,7 @@
@brief calcul du cpath specifique a ce tyep de donnée
*/
function FO_load_page($mode='unique'){
- global $aca_product,$product_info, $page_content, $language, $cPath;
+ global $aca_product,$product_info, $page_content, $language, $cPath, $languages_id;
$page = page::getInstance();
$DB=Database::getInstance();
@@ -211,7 +211,7 @@
/// get the categorie name and put it on the header
if (isset($_GET['manufacturers_id'])) {
- $man=$DB->query("select * from " . TABLE_MANUFACTURERS . " m where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' ");
+ $man=$DB->query("select * from " . TABLE_MANUFACTURERS . " m LEFT JOIN ".TABLE_MANUFACTURERS_INFO." mi ON(m.manufacturers_id = mi.manufacturers_id AND languages_id = '".$languages_id."') where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' ");
$manuf= $man->fetchAssoc();
tep_db_free_result($man);
$image = $manuf['manufacturers_image'];
@@ -222,10 +222,13 @@
// var use in draw master detail listing
$obj = new stdClass();
+ $obj->type = $this->DataType ;
+ $obj->gabarit = $this->DataType.'/listing.detail' ;
$obj->image = $manuf['manufacturers_image'];
$obj->name = $manuf['manufacturers_name'];
$obj->description = false;
+
$page->add_var_page('RootListing',$obj);
$page->add_var_page('current_id',(int)$_GET['manufacturers_id']);
}
Modified: trunk/catalog/common/classes/datatype_drivers/Data_product.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -279,7 +279,10 @@
$this->listing_sql['tables'] = " FROM " . TABLE_PRODUCTS . " ".$this->p." ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_SPECIALS . " s USING(products_id) ";
- $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_MANUFACTURERS . " m USING(manufacturers_id) ";
+
+ if( DataTypes::is_active('manufacturer'))
+ $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_MANUFACTURERS . " m USING(manufacturers_id) ";
+
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd using(products_id) ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa using(products_id) ";
@@ -325,11 +328,12 @@
}
}
-/** TODO link to datatype manufacturers */
- if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
- $this->listing_sql['where'] .= " and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";
- }
+ if( DataTypes::is_active('manufacturer'))
+ if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
+ $this->listing_sql['where'] .= " and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";
+ }
+
if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {
$this->listing_sql['where'] .= " and (";
for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
Modified: trunk/catalog/redirect.php
===================================================================
--- trunk/catalog/redirect.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/redirect.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -1,10 +1,10 @@
<?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 16/06/10, 08:11
+ @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/05/2012 ,15:04:13
*\author oscim <mail aur...@os...> <www http://www.oscim.fr>
*\encode UTF-8
*\file redirect.php
@@ -40,7 +40,11 @@
}
break;
- case 'manufacturer':
+ /**
+ @remarks use DataTypes manufacturer
+ */
+ case (DataTypes::is_active('manufacturer') && $_GET['action'] == 'manufacturer' ):
+
if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$manufacturer_query = $DB->query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");
if ($manufacturer_query->__get('NumRows')>0) {
@@ -52,7 +56,8 @@
tep_redirect($manufacturer['manufacturers_url']);
}
- } else {
+ }
+ else {
// no url exists for the selected language, lets use the default language then
$manufacturer_query = $DB->query("select mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_LANGUAGES . " l where mi.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" . DEFAULT_LANGUAGE . "'");
if ($manufacturer_query->__get('NumRows')>0) {
Modified: trunk/catalog/templates/defaut/cfg/init.php
===================================================================
--- trunk/catalog/templates/defaut/cfg/init.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/templates/defaut/cfg/init.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -160,6 +160,7 @@
$this->oscss_boxes->_add('categories', 'sidebar');
$this->oscss_boxes->_add('whats_new', 'sidebar', array('cache'=>false));
+ $this->oscss_boxes->_add('manufacturers', 'sidebar');
$this->oscss_boxes->_add('specials', 'sidebar', array('cache'=>false));
Modified: trunk/catalog/templates/defaut/includes/boxes/manufacturer_info.php
===================================================================
--- trunk/catalog/templates/defaut/includes/boxes/manufacturer_info.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/templates/defaut/includes/boxes/manufacturer_info.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -4,14 +4,13 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/11/12, 08:18
+ @date 10/05/2012, 08:18
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@group boxes
- @file manufacturer_info.php
- @brief Boite de detail d'un fabricant
- *
- * Cette boite ne produit un affichage que sur la page produit, et affiche le detail du fabricant du produits
+ @file manufacturer_info.php
+ @brief Boite de detail d'un fabricant
+ Cette boite ne produit un affichage que sur la page produit, et affiche le detail du fabricant du produits
*/
//! @remarks depend Data_product active
Modified: trunk/catalog/templates/defaut/includes/boxes/manufacturers.php
===================================================================
--- trunk/catalog/templates/defaut/includes/boxes/manufacturers.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/templates/defaut/includes/boxes/manufacturers.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -4,18 +4,18 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/11/12, 08:18
+ @date 10/05/2012, 08:18
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@group boxes
@file includes/boxes/manufacturers.php
*/
-
//! @remarks depend Data_manufacturer active
if( ! DataTypes::is_active('manufacturer') )
return false;
+
$DB=Database::getInstance();
global $page,$language,$languages_id, $manufacturers_array, $number_of_rows;
$s='';
@@ -34,11 +34,13 @@
while ($manufacturers = $manufacturers_query->fetchAssoc()) {
$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > $page->_conf_value('MAX_DISPLAY_MANUFACTURER_NAME_LEN')) ? substr($manufacturers['manufacturers_name'], 0, $page->_conf_value('MAX_DISPLAY_MANUFACTURER_NAME_LEN')) . '..' : $manufacturers['manufacturers_name']);
- $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
- 'text' => $manufacturers_name);
+ $manufacturers_array[] = array(
+ 'id' => $manufacturers['manufacturers_id'],
+ 'text' => $manufacturers_name
+ );
}
- $s=tep_get_include_contents('box.manufacturers');
+ $s=tep_get_include_contents('manufacturer/box.manufacturers');
$osCSS_Cache->writeBuffer($s);
}
else $s= $osCSS_Cache->getCache();
Modified: trunk/catalog/templates/defaut/includes/content/index_listing.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/index_listing.php 2012-05-11 08:51:54 UTC (rev 4417)
+++ trunk/catalog/templates/defaut/includes/content/index_listing.php 2012-05-11 16:36:51 UTC (rev 4418)
@@ -36,26 +36,32 @@
// load other module if not result current listing
else
$page->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center');
-?>
+/**
+ @remarks If specific gabarit load gabarit else continue
+*/
+ if(isset($RootListing->gabarit) && !empty($RootListing->gabarit) ): ?>
+ <?php echo tep_get_include_contents($RootListing->gabarit); ?>
+<?php else: ?>
+
<h1 class="content title <?php echo $language ;?>"><?php echo ( ($RootListing->name!=false)? $RootListing->name : '' ); ?></h1>
+ <div id="index">
+ <?php /** Image cat or manufacturer */ if (!empty($RootListing->image)) : ?>
+ <div id="headingCatImg">
+ <?php echo tep_image(DIR_WS_IMAGES . $RootListing->image, $RootListing->name , $page->_conf_value('HEADING_IMAGE_WIDTH'), $page->_conf_value('HEADING_IMAGE_HEIGHT')); ?>
+ </div>
+ <?php endif; ?>
+ <?php /** Image cat */ if($RootListing->description !=false) : ?>
+ <div id="headingCatTxt">
+ <?php echo $RootListing->description; ?>
+ </div>
+ <?php endif; ?>
-<div id="index">
- <?php /** Image cat or manufacturer */ if (!empty($RootListing->image)) : ?>
- <div id="headingCatImg">
- <?php echo tep_image(DIR_WS_IMAGES . $RootListing->image, $RootListing->name , $page->_conf_value('HEADING_IMAGE_WIDTH'), $page->_conf_value('HEADING_IMAGE_HEIGHT')); ?>
- </div>
- <?php endif; ?>
- <?php /** Image cat */ if($RootListing->description !=false) : ?>
- <div id="headingCatTxt">
- <?php echo $RootListing->description; ?>
- </div>
- <?php endif; ?>
+ <?php /** liste des categories */ if(!isset($_GET['manufacturers_id']) && $category_depth=='products') echo tep_manufacturers_list($page->the_var('current_category_id')); ?>
- <?php /** liste des categories */ if(!isset($_GET['manufacturers_id']) && $category_depth=='products') echo tep_manufacturers_list($page->the_var('current_category_id')); ?>
-
-</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-05-11 08:52:04
|
Revision: 4417
http://oscss.svn.sourceforge.net/oscss/?rev=4417&view=rev
Author: oscim
Date: 2012-05-11 08:51:54 +0000 (Fri, 11 May 2012)
Log Message:
-----------
Correction coquille dans le nommagde colonne ds les tables
ajout d'un filtre centralis?\195?\169 sur les featured
report de l'usage du filtre dans les product
amelioration code et diminution des requets sur la methode fetch de sqlfeatured
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/08_cms.php
trunk/catalog/admin/includes/boxes/09_commercial.php
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql
Modified: trunk/catalog/admin/includes/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-11 08:51:54 UTC (rev 4417)
@@ -26,7 +26,4 @@
)
);
- if( DataTypes::is_active('featured'))
- $tabl_link[]= array(FILENAME_FEATURED, 'BOX_CATALOG_FEATURED', 'featured', @$img['featured']);
-
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/boxes/09_commercial.php 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/boxes/09_commercial.php 2012-05-11 08:51:54 UTC (rev 4417)
@@ -23,6 +23,6 @@
$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']);
- if( ! DataTypes::is_active('featured'))
+ if( DataTypes::is_active('featured'))
$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-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-11 08:51:54 UTC (rev 4417)
@@ -157,12 +157,11 @@
if(isset($option['status'])) $where .="AND featured_status = '".(int)$option['status']."' ";
if(isset($option['key'])) $where .="AND featured_uniqkey = '".(int)$option['key']."' ";
- if($where=='')
- return false;
+ if($where !='')
+ $where = " WHERE ".substr($where,3);
- $sql="SELECT * FROM " . TABLE_FEATURED . " a ".
- " WHERE ".substr($where,3);
+ $sql="SELECT * FROM " . TABLE_FEATURED . " a ".$where ;
$res=$DB->query($sql);
@@ -173,16 +172,17 @@
// call all langue for this post
+ $whlg = '';
+ if(isset($option['language_id']))
+ $whlg=" AND languages_id='" . $option['language_id'] . "' ";
- foreach(tep_get_languages() as $lg){
+ $_query = $DB->query("select languages_id , fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' ");
- $_query = $DB->query("select fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' AND languages_id='" . $lg['id'] . "'");
- $descr = $_query->fetchAssoc();
+ $descr = $_query->fetchAllAssoc();
- $result['lg'][$lg['id']] = ((!$shortkey)? $descr : self::CleanKey($descr));
+ foreach($_query->fetchAllAssoc() as $row)
+ $result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row));
- tep_db_free_result($_query);
- }
return ((!$shortkey)? $result : self::CleanKey($result));
@@ -190,16 +190,22 @@
elseif($num > 1){
$array=array();
global $languages_id;
- foreach($res->fetchAllAssoc() as $result){
- $_query = $DB->query("select fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' AND languages_id='" . $languages_id . "'");
- $descr= $_query->fetchAssoc();
+ // call all langue for this post
+ $whlg = '';
+ if(isset($option['language_id']))
+ $whlg=" AND languages_id='" . $option['language_id'] . "' ";
- $result['lg'][$languages_id] =((!$shortkey)? $descr : self::CleanKey($descr));
-// var_dump($result);
+ $_query = $DB->query("select languages_id , fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' ");
+ $descr = $_query->fetchAllAssoc();
+
+ foreach($_query->fetchAllAssoc() as $row)
+ $result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row));
+
+
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
- }
+
return $array;
}
@@ -227,8 +233,8 @@
// childs tables
- $DB->query("delete from " . TABLE_FEATURED_DATA . " where row_id = '" . (int)$result['id'] . "'");
- $DB->query("delete from " . TABLE_FEATURED_DESCRIPTION . " where row_id = '" . (int)$result['id'] . "'");
+ $DB->query("delete from " . TABLE_FEATURED_DATA . " where featured_id = '" . (int)$result['id'] . "'");
+ $DB->query("delete from " . TABLE_FEATURED_DESCRIPTION . " where featured_id = '" . (int)$result['id'] . "'");
$DB->query("delete from " . TABLE_FEATURED . " where row_id = '" . (int)$result['id'] . "'");
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-05-11 08:51:54 UTC (rev 4417)
@@ -12,93 +12,99 @@
$contents=array();
?>
- <h3><?php echo __('heading title edit'); ?></h3>
- <div class="box_uniq block_form">
+<h3><?php echo __('heading title edit'); ?></h3>
+<div class="box_uniq block_form">
+<?php echo tep_draw_form('review', cms_content::FILENAME, 'cID=' . (int)@$_GET['cID'] . '&action='.((cms_content::$action=='new')?'insert': 'update'),'post'); ?>
- <?php echo tep_draw_form('review', cms_content::FILENAME, 'cID=' . (int)@$_GET['cID'] . '&action='.((cms_content::$action=='new')?'insert': 'update'),'post'); ?>
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1"><?php echo __('tab content data'); ?></a></li>
- <?php
- $g=6;
- cms_content::$modules->display_edit($contents,@$cID);
- if(is_array($contents))
- foreach ($contents as $value) {
- if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
- $g++;
- } ?>
- </ul>
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('tab content data'); ?></a></li>
+ <?php
+ $g=6;
+ cms_content::$modules->display_edit($contents,@$cID);
+ if(is_array($contents))
+ foreach ($contents as $value) {
+ if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
+ $g++;
+ } ?>
+ </ul>
- <div id="tabs-1" class="tabPage">
- <div class="edit box_left w_70" >
- <div class="tabs_lang">
- <ul>
- <?php for ($i=0, $n=sizeof(cms_content::$languages); $i<$n; $i++) { ?>
- <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image(cms_content::$languages[$i]['directory'] . '/images/' . cms_content::$languages[$i]['image'], cms_content::$languages[$i]['name']); ?></a></li>
- <?php } ?>
- </ul>
- <?php for ($i=0, $n=sizeof(cms_content::$languages); $i<$n; $i++) { ?>
- <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::$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::$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::$Info->text[cms_content::$languages[$i]['id']]); ?>
- </fieldset>
- <?php } ?>
- </div>
- </div>
+ <div class="edit box_left w_70" >
+ <div id="tabs-1" class="tabPage">
- <div class="edit box_right w_30">
+ <div class="tabs_lang">
+ <ul>
+ <?php for ($i=0, $n=sizeof(cms_content::$languages); $i<$n; $i++) { ?>
+ <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image(cms_content::$languages[$i]['directory'] . '/images/' . cms_content::$languages[$i]['image'], cms_content::$languages[$i]['name']); ?></a></li>
- <fieldset class="block_field">
- <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::$Info->name) . tep_draw_hidden_field('p_format','','HTML'); ?>
- </dt>
+ <?php } ?>
+ </ul>
+ <?php for ($i=0, $n=sizeof(cms_content::$languages); $i<$n; $i++) { ?>
+ <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::$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::$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::$Info->text[cms_content::$languages[$i]['id']]); ?>
+ </fieldset>
+ <?php } ?>
+ </div>
+ </div>
+ <?php
+ $g=6;
+ if(is_array($contents)){
+ reset($contents);
+ foreach ($contents as $value) {
+ echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
+ if (!empty($value['text'])) echo $value['text']."\n";
+ else echo '<br />';
+ echo '<div class="separator"></div></div>'."\n";
+ $g++;
+ }
+ } ?>
- <dt class="block_input w_90">
- <label><?php echo __('text content status'); ?></label>
- <?php echo tep_draw_radio_field('content_status', 'content_status_1', '1', cms_content::$enabled_status) . __('text content enabled') . tep_draw_radio_field('content_status', 'content_status_0', '0', cms_content::$disabled_status) . __('text content disabled'); ?>
- </dt>
-
+ <div class="separator"></div>
+ </div>
- <!-- All LinkTo -->
- <?php foreach(MLinkTo::LoadRightTo( 'cms_content', 'edit' , 'action='.cms_content::$action.'&cID='.@$_GET['cID'] ) as $row): ?>
- <dt class="block_input w_90">
- <?php echo $row['text'] ;?>
- </dt>
- <?php endforeach;?>
- <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::$Info->id), IMAGE_CANCEL); ?>
- </dt>
- </dl>
- </fieldset>
- </div>
- </div>
- <?php
- $g=6;
- if(is_array($contents)){
- reset($contents);
- foreach ($contents as $value) {
- echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
- if (!empty($value['text'])) echo $value['text']."\n";
- else echo '<br />';
- echo '<div class="separator"></div></div>'."\n";
- $g++;
- }
- } ?>
+ <div class="edit box_right w_30">
+ <fieldset class="block_field">
+ <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::$Info->name) . tep_draw_hidden_field('p_format','','HTML'); ?>
+ </dt>
+
+ <dt class="block_input w_90">
+ <label><?php echo __('text content status'); ?></label>
+ <?php echo tep_draw_radio_field('content_status', 'content_status_1', '1', cms_content::$enabled_status) . __('text content enabled') . tep_draw_radio_field('content_status', 'content_status_0', '0', cms_content::$disabled_status) . __('text content disabled'); ?>
+ </dt>
+
+
+ <!-- All LinkTo -->
+ <?php foreach(MLinkTo::LoadRightTo( 'cms_content', 'edit' , 'action='.cms_content::$action.'&cID='.@$_GET['cID'] ) as $row): ?>
+ <dt class="block_input w_90">
+ <?php echo $row['text'] ;?>
+ </dt>
+ <?php endforeach;?>
+
+
+ <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::$Info->id), IMAGE_CANCEL); ?>
+ </dt>
+ </dl>
+ </fieldset>
+ </div>
+
<div class="separator"></div>
- </div>
- </form>
- </div>
+ </div>
+</form>
+</div>
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-11 08:51:54 UTC (rev 4417)
@@ -8,8 +8,6 @@
@author genrated by GenerCode
@encode UTF-8
*/
-
-print_r(featureds::$Info);
?>
<h3><?php echo __('heading title edit'); ?></h3>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt 2012-05-11 08:51:54 UTC (rev 4417)
@@ -22,7 +22,10 @@
$lang['@filters filter tab language'] = "Langues" ;
$lang['@filters filter legend choose language'] = "La langue utilisée" ;
+$lang['@filters filter tab featured'] = "Mise en avant" ;
+$lang['@filters filter legend choose featured'] = "Les éléments associés à" ;
+
$lang['@filters filter tab subtype'] = "Sous-types" ;
$lang['@filters filter legend choose subtype'] = "Listes des types visibles" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-05-11 08:51:54 UTC (rev 4417)
@@ -30,6 +30,7 @@
/** listing*/
+ $lang['heading title source repository']="Catalogue d'extension" ;
/* paquet */
$lang['table heading nom']="Nom" ;
$lang['table heading description']="Description" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-11 08:51:54 UTC (rev 4417)
@@ -66,8 +66,7 @@
$lang['products table heading price ttx']="Prix TTC" ;
$lang['products table heading type']="Type" ;
$lang['products table heading weight']="Poids" ;
- $lang['products table heading manufacturers id']="Fab.id" ;
- $lang['products table heading manufacturers']="Fabricant" ;
+
$lang['products table heading date_added']="Créer" ;
$lang['products table heading last modified']="Modifiés" ;
$lang['products table heading available']="Dispo." ;
@@ -77,6 +76,12 @@
$lang['products table heading categories']="Catégories" ;
$lang['products table heading categories id']="Cat.id" ;
+ $lang['products table heading manufacturers id']="Fab.id" ;
+ $lang['products table heading manufacturers']="Fabricant" ;
+
+ $lang['products table heading featured id']="Mea.id" ;
+ $lang['products table heading featured']="Mise en avant" ;
+
$lang['table heading action']="Action" ;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-11 08:51:54 UTC (rev 4417)
@@ -217,14 +217,12 @@
}
/* END Datatype RootListing categorie */
- /* DEB Datatype RootListing categorie */
+ /* DEB Datatype RootListing manufacturer */
if( DataTypes::is_active('manufacturer')) {
self::$allfields['p.manufacturers_id']= array(
'sort'=>true,
'alias'=>'manufacturers_id',
'text'=>__('products table heading manufacturers id'),
- 'width'=>'5%',
- 'default'=>true,
);
self::$allfields['m.manufacturers_name']= array(
'sort'=>true,
@@ -233,8 +231,25 @@
'width'=>'12%',
);
}
- /* END Datatype RootListing categorie */
+ /* END Datatype RootListing manufacturer */
+
+ /* DEB Datatype RootListing featured */
+ if( DataTypes::is_active('featured')) {
+ self::$allfields['fada.featured_id']= array(
+ 'sort'=>true,
+ 'alias'=>'featured_id',
+ 'text'=>__('products table heading featured id'),
+ );
+ self::$allfields['fad.featured_title']= array(
+ 'sort'=>true,
+ 'alias'=>'featured',
+ 'text'=>__('products table heading featured'),
+ 'width'=>'12%',
+ );
+ }
+ /* END Datatype RootListing featured */
+
self::$allfields['p.products_weight']= array(
'sort'=>true,
'alias'=>'weight',
@@ -380,23 +395,44 @@
/**
@remarks filter based on categorie
*/
- if(isset($_SESSION['filters'][__CLASS__]['categorie']))
- $_SESSION['filters']['categorie'] = $_SESSION['filters'] [__CLASS__]['categorie'];
- else
- $_SESSION['filters']['categorie'] =array();
+ if( DataTypes::is_active('categorie')) {
+ if(isset($_SESSION['filters'][__CLASS__]['categorie']))
+ $_SESSION['filters']['categorie'] = $_SESSION['filters'] [__CLASS__]['categorie'];
+ else
+ $_SESSION['filters']['categorie'] =array();
- $list = '';
- if(count($_SESSION['filters']['categorie']) > 0)
- foreach($_SESSION['filters']['categorie'] as $key=>$row)
- $list .=$key.',';
- else{
- $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0')));
- foreach($allcats as $row)
- $list .=$row['id'].',';
+ $list = '';
+ if(count($_SESSION['filters']['categorie']) > 0)
+ foreach($_SESSION['filters']['categorie'] as $key=>$row)
+ $list .=$key.',';
+ else{
+ $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0')));
+ foreach($allcats as $row)
+ $list .=$row['id'].',';
+ }
+ self::$InitInfo['adjust']['sWhere'] .=" AND cat.categories_id IN (".substr($list, 0,-1).") ";
}
- self::$InitInfo['adjust']['sWhere'] .=" AND cat.categories_id IN (".substr($list, 0,-1).") ";
/**
+ @remarks filter based on featured
+ */
+ if( DataTypes::is_active('featured')) {
+ if(isset($_SESSION['filters'][__CLASS__]['featured']))
+ $_SESSION['filters']['featured'] = $_SESSION['filters'] [__CLASS__]['featured'];
+ else
+ $_SESSION['filters']['featured'] =array();
+
+ $list = '';
+ if(count($_SESSION['filters']['featured']) > 0){
+ foreach($_SESSION['filters']['featured'] as $key=>$row)
+ $list .=$key.',';
+
+ self::$InitInfo['adjust']['sWhere'] .=" AND fada.featured_id IN (".substr($list, 0,-1).") ";
+ }
+
+ }
+
+ /**
@remarks filter based on subtype products
*/
if(isset($_SESSION['filters'][__CLASS__]['subtype']))
@@ -468,25 +504,29 @@
/**
@remarks Active forms filter
*/
- self::$InitInfo['tfilter']['listing']=array(
- array(
- 'type'=>'categorie'
- ),
- array(
- 'type'=>'language'
- ),
- array(
- 'type'=>'listfield'
- ),
- array(
- 'type'=>'subtype'
- ),
- array(
+ self::$InitInfo['tfilter']['listing'] = array();
+
+ if( DataTypes::is_active('categorie'))
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'categorie' );
+// if( DataTypes::is_active('manufacturer'))
+// self::$InitInfo['tfilter']['listing'][]=array(
+// 'title'=>__('@products filter tab manufacturer'),
+// 'content'=>tep_get_include_contents(__CLASS__.'/filter.manufacturer'),
+// );
+ if( DataTypes::is_active('featured'))
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'featured' );
+
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'language' );
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'listfield' );
+ self::$InitInfo['tfilter']['listing'][]=array( 'type'=>'subtype' );
+
+ self::$InitInfo['tfilter']['listing'][]=array(
'title'=>__('@products filter tab clause'),
'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
- ),
- );
+ );
+
+
/**
@remarks this define menu master module in page
*/
@@ -575,11 +615,18 @@
unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
}
+ if( DataTypes::is_active('categorie'))
foreach($_POST['filters']['categorie'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['categorie'][$key] = 'on';
}
+ if( DataTypes::is_active('featured'))
+ foreach($_POST['filters']['featured'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['featured'][$key] = 'on';
+ }
+
foreach($_POST['filters']['language'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['language'][$key] = 'on';
@@ -882,12 +929,19 @@
if( DataTypes::is_active('categorie'))
$query_raw .=" LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2p ON(p.products_id = p2p.products_id ) ".
+
" LEFT JOIN " . TABLE_CATEGORIES . " cat ON( cat.categories_id =p2p.categories_id ) ".
" LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " catd ON( catd.categories_id =p2p.categories_id AND catd.language_id='".(int)$adjust->languages_id."' ) ";
if( DataTypes::is_active('manufacturer'))
$query_raw .= " LEFT JOIN " . TABLE_MANUFACTURERS . " m ON( m.manufacturers_id=p.manufacturers_id ) ";
+
+ if( DataTypes::is_active('featured')) {
+ $query_raw .= " LEFT JOIN " . TABLE_FEATURED_DATA . " fada ON( fada.datatype_id=p.products_id AND datatype = 'product' ) ";
+ $query_raw .= " LEFT JOIN " . TABLE_FEATURED_DESCRIPTION . " fad ON( fad.featured_id=fada.featured_id AND fad.languages_id = '".(int)$adjust->languages_id."' ) ";
+ }
+
$query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" GROUP BY p.products_id ".
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' p.products_date_added DESC ');
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql 2012-05-11 08:51:54 UTC (rev 4417)
@@ -18,6 +18,6 @@
CREATE TABLE IF NOT EXISTS osc_featured_description (
featured_id int(11) NOT NULL,
languages_id int(11) NOT NULL,
- featrued_title varchar(264) NOT NULL,
+ featured_title varchar(264) NOT NULL,
PRIMARY KEY (featured_id,languages_id)
);
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql 2012-05-10 21:29:00 UTC (rev 4416)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql 2012-05-11 08:51:54 UTC (rev 4417)
@@ -16,9 +16,10 @@
-- Structure de la table osc_featured_description
--
+
CREATE TABLE IF NOT EXISTS osc_featured_description (
featured_id int(11) NOT NULL,
languages_id int(11) NOT NULL,
- featrued_title varchar(264) NOT NULL,
+ featured_title varchar(264) NOT NULL,
PRIMARY KEY (featured_id,languages_id)
-);
+);
\ 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-05-10 21:29:06
|
Revision: 4416
http://oscss.svn.sourceforge.net/oscss/?rev=4416&view=rev
Author: oscim
Date: 2012-05-10 21:29:00 +0000 (Thu, 10 May 2012)
Log Message:
-----------
suppression des fichiers obsoletes
Removed Paths:
-------------
trunk/catalog/admin/includes/functions/lib.navigation_links.php
Deleted: trunk/catalog/admin/includes/functions/lib.navigation_links.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.navigation_links.php 2012-05-10 21:27:23 UTC (rev 4415)
+++ trunk/catalog/admin/includes/functions/lib.navigation_links.php 2012-05-10 21:29:00 UTC (rev 4416)
@@ -1,78 +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.0
- @date 19/12/10, 19:49
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-/**
- Return a navigation links name
-*/
-function oscss_get_navlink_name($nav_link_id, $language_id = 0) {
- global $languages_id;
-
- if ($language_id == 0) $language_id = $languages_id;
- $nav_link_query = tep_db_query("select nav_name from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " where nav_link_id = '" . (int)$nav_link_id . "' and language_id = '" . (int)$language_id . "'");
- $nav_link = tep_db_fetch_array($nav_link_query);
-
- return $nav_link['nav_name'];
-}
-
-/**
- Tableau des item présent, et prepa pour tep_draw_pull_down_menu
- @param
- @a array tableau des lien a exclure, par nav_link_id
-*/
-function parent_item_nav($exclude=false){
- global $languages_id;
- $tab=array();$ind='';
- $arry_navlink=list_item_order_niv();
- foreach($arry_navlink as $nav_links ){
- if ((is_array($exclude) && !in_array($nav_links['nav_link_id'],$exclude)) || !$exclude ){
- $ind=tep_decal($nav_links['niveau']);
- $tab[]=array('id'=>$nav_links['nav_link_id'], 'text'=> $ind.oscss_get_navlink_name($nav_links['nav_link_id']));
- }
- }
- return $tab;
-}
-
-
-/**
- Function construction du tableau des liens, appel hierarchise.
- Appel recursif
- @param
- @a int parent_id l'id root
- @a boolean false par defaut, true mode recursif
-*/
-function list_item_order_niv($parent_id=0,$recursif='false'){
- global $NAVLINK_CONDITION;
- $arry_navlink=array();
- $nav_links_query = tep_db_query($sql="SELECT * from ".TABLE_NAVIGATION_LINKS ." nv where parent_id ='".(int)$parent_id."' order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : ' parent_id, nav_sort_order ASC'));
- $niveau=($recursif !='false')? ((int)$recursif) : 0 ;
-
- while($nav_links = tep_db_fetch_array($nav_links_query)) {
-
-
- if ($nav_links['nav_link_status'] == '1') $status_image = tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . '<a href="' . tep_href_link(FILENAME_NAVIGATION_LINKS, 'action=setflag&flag=0&nID=' . $nav_links['nav_link_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 16, 16) . '</a>';
- else $status_image = '<a href="' . tep_href_link(FILENAME_NAVIGATION_LINKS, 'action=setflag&flag=1&nID=' . $nav_links['nav_link_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a>' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 16, 16);
-
-
- $arry_navlink[]=array_merge($nav_links, array('condition'=>$NAVLINK_CONDITION[$nav_links['customers_status']],'status_image'=>$status_image,'niveau'=> $niveau) );
-
- $isd=list_item_order_niv($nav_links['nav_link_id'],($niveau+1));
-
- if(count($isd) >0 ){
- $niveau++;
- $arry_navlink =array_merge($arry_navlink,$isd);
- $niveau--;
- }
- }
-
- return $arry_navlink;
-}
-
-?>
\ 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-05-10 21:27:30
|
Revision: 4415
http://oscss.svn.sourceforge.net/oscss/?rev=4415&view=rev
Author: oscim
Date: 2012-05-10 21:27:23 +0000 (Thu, 10 May 2012)
Log Message:
-----------
suppression des fichiers obsoletes
Removed Paths:
-------------
trunk/catalog/admin/includes/content/navigation_links.central.inc
trunk/catalog/admin/includes/content/navigation_links.header.inc
trunk/catalog/admin/includes/content/navigation_links.top.inc
trunk/catalog/admin/includes/languages/fr_FR/navigation_links.php
Deleted: trunk/catalog/admin/includes/content/navigation_links.central.inc
===================================================================
--- trunk/catalog/admin/includes/content/navigation_links.central.inc 2012-05-10 21:25:12 UTC (rev 4414)
+++ trunk/catalog/admin/includes/content/navigation_links.central.inc 2012-05-10 21:27:23 UTC (rev 4415)
@@ -1,126 +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 16/04/11, 15:47
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<?php if($action == 'deleteconfirm' ) { ?>
- <h4><?php echo TEXT_INFO_HEADING_DELETE_NAV; ?></h4>
- <hr />
- <?php echo tep_draw_form('orders', FILENAME_NAVIGATION_LINKS, tep_get_all_get_params(array('oID', 'action')) . 'nID=' . $_GET['nID'] . '&action=delete'); ?>
- <p><?php echo TEXT_INFO_DELETE_INTRO; ?></p>
- <div class="button_nav">
- <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_NAVIGATION_LINKS, tep_get_all_get_params(array('nID', 'action','forceajax')) ) . '">' . IMAGE_CANCEL . '</a>'; ?>
- </div>
- </form>
-
-<?php }elseif($action == 'new' || ($action == 'edit' && isset($_GET['nID']) )) {
- echo tep_draw_form('adminForm', FILENAME_NAVIGATION_LINKS , $action_post_form,'post') ;?>
- <h3><?php echo HEADING_TITLE_NEW_MENU ; ?></h3>
- <div class="block_form">
- <div class="tabs_lang">
- <ul>
- <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
- <li><a href="#nav_link_<?php echo $i ?>"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?></a></li>
- <?php } ?>
- </ul>
- <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++){ ?>
- <p id="nav_link_<?php echo $i ?>">
- <label for="name<?php echo $i ;?>"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' '.FIELDSET_NAME ;?></label>
- <?php echo tep_draw_input_field('nav_link_name['.$languages[$i]['id'].']', 'name'.$i, (isset($_GET['nID'])? oscss_get_navlink_name($_GET['nID'],$languages[$i]['id']) : '') ) ;?>
- </p>
- <?php } ?>
- </div>
-
- <fieldset class="block_field">
- <legend><?php echo FIELDSET_DATAS ; ?></legend>
- <p class="block_input">
- <label for="nav_link_status" title="<?php echo ENTRY_STATUS_DESC ; ?>"><?php echo ENTRY_STATUS_ON . tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_radio_field('nav_link_status', '1','1', (($nav_links['nav_link_status']==1)?true:false)) ;?>
- <label><?php echo ENTRY_STATUS_OFF ; ?></label>
- <?php echo tep_draw_radio_field('nav_link_status', '0','0', (($nav_links['nav_link_status']==2)?true:false)) ;?>
- </p>
- <p class="block_input">
- <?php echo tep_draw_pull_down_menu('parent_id', array_merge(array(array('id'=>'', 'text'=> TXT_CAT_ALL)),parent_item_nav(/*array($nav_links['nav_link_id'])*/)), $nav_links['parent_id']); ?>
- </p>
- <p class="block_input">
- <label for="internal" title="<?php echo ENTRY_INTERNAL_LINK_DESC ; ?>"><?php echo ENTRY_INTERNAL_LINK . tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_radio_field('type', 'internal','0', (($nav_links['nav_link_type']==0 || empty($nav_links['nav_link_type']) )?true:false) ) ;?><br />
- <label for="external" title="<?php echo ENTRY_EXTERNAL_LINK_DESC ; ?>"><?php echo ENTRY_EXTERNAL_LINK . tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_radio_field('type', 'external','1', (($nav_links['nav_link_type']==1)?true:false)) ;?>
- <label for="function" title="<?php echo ENTRY_FUNCTION_LINK_DESC ; ?>"><?php echo ENTRY_FUNCTION_LINK . tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_radio_field('type', 'function','2', (($nav_links['nav_link_type']==2)?true:false)) ;?>
- </p>
- <p class="block_input">
- <label for="link" title="<?php echo ENTRY_TARGET_DESC ; ?>"><?php echo ENTRY_TARGET . tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_input_field('link', '',tep_not_null(@$nav_links['nav_file']) ? $nav_links['nav_file'] : '') ;?>
- </p>
- <p class="block_input">
- <label for="css_id" title="<?php echo ENTRY_CSS_DESC ; ?>"><?php echo ENTRY_CSS . tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_input_field('css_id', '',tep_not_null(@$nav_links['nav_css_id']) ? $nav_links['nav_css_id'] : '') ;?>
- </p>
- <p class="block_input">
- <label for="sort" title="<?php echo ENTRY_SORT_ORDER_DESC ; ?>"><?php echo ENTRY_SORT_ORDER . tep_image(DIR_WS_ICONS . 'icon_help.gif') ; ?></label>
- <?php echo tep_draw_input_field('sort', '',tep_not_null(@$nav_links['nav_sort_order']) ? $nav_links['nav_sort_order'] : '') ;?>
- </p>
- <p class="block_input">
- <label for="condition" title="<?php echo ENTRY_CONDITION_DESC ; ?>"><?php echo ENTRY_CONDITION . tep_image(DIR_WS_ICONS . 'icon_help.gif') ; ?></label>
- <?php echo tep_draw_pull_down_menu('condition', $navlink_condition, @$nav_links['customers_status'], 'id="condition"') ;?>
- </p>
- </fieldset>
- <div class="button_nav">
- <?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) .'<a class="button" href="' . tep_href_link(FILENAME_NAVIGATION_LINKS) . '">' . IMAGE_CANCEL . '</a>'; ?>
- </div>
- </div>
- </form>
-<?php } else { ?>
-
- <h3><?php echo HEADING_TITLE ;?></h3>
-
- <?php echo tep_draw_form('adminForm', FILENAME_NAVIGATION_LINKS ,'action=sort' ,'post') ;?>
-
- <div class="button_nav">
- <?php echo tep_image_submit('button_save.gif', IMAGE_UPDATE). '<a class="button" href="' . tep_href_link(FILENAME_NAVIGATION_LINKS , 'action=new') . '">' . tep_image(DIR_WS_ICONS. 'icon_add_new.png', IMAGE_INSERT ) . IMAGE_INSERT . '</a>'; ?>
- </div>
-
- <div class="box_uniq">
- <table class="dataTable">
- <thead>
- <tr>
- <th><?php echo TABLE_HEADING_NAME ; ?></th>
- <th><?php echo TABLE_HEADING_PARENT; ?></th>
- <th><?php echo TABLE_HEADING_TARGET ; ?></th>
- <th><?php echo TABLE_HEADING_CSS; ?></th>
- <th class="tcenter"><?php echo TABLE_HEADING_SORT_ORDER; ?></th>
- <th><?php echo TABLE_HEADING_CONDITION; ?></th>
- <th class="tcenter"><?php echo TABLE_HEADING_STATUS; ?></th>
- <th class="row_action"><?php echo TABLE_HEADING_ACTION; ?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach($arry_navlink as $nav_links){ ?>
- <tr class="view parent dataTableRow">
- <td><?php for($i=0;$i<$nav_links['niveau'];$i++) echo '-'; echo ' '.oscss_get_navlink_name($nav_links['nav_link_id'],$languages_id) ;?></td>
- <td><?php echo oscss_get_navlink_name($nav_links['parent_id'],$languages_id);?></td>
- <td><?php echo $nav_links['nav_file'] ;?></td>
- <td><?php echo $nav_links['nav_css_id'] ;?></td>
- <td class="tcenter"><?php echo tep_draw_input_field('sort_order[]','sort_order_'.$nav_links['nav_link_id'],$nav_links['nav_sort_order'],'style="width:30px"') . tep_draw_hidden_field('nav_link_id[]', 'nav_link_id_'.$nav_links['nav_link_id'], $nav_links['nav_link_id']) ;?></td>
- <td class="tleft"><?php echo $NAVLINK_CONDITION[$nav_links['customers_status']] ;?></td>
- <td class="tcenter"><?php echo $nav_links['status_image'] ;?></td>
- <td class="row_action">
- <span class="view fils"><?php echo '<a class="buttonimg" href="'.tep_href_link(FILENAME_NAVIGATION_LINKS , 'action=edit&nID='.$nav_links['nav_link_id']).'">'.tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT) .'</a>' .'<a class="buttonimg fancy" href="'.tep_href_link(FILENAME_NAVIGATION_LINKS, 'nID=' . $nav_links['nav_link_id'] . '&action=deleteconfirm').'">'.tep_image(DIR_WS_ICONS . 'icon_delete.png', IMAGE_DELETE).'</a>'; ?>
- </span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
- </form>
-
-<?php } ?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/content/navigation_links.header.inc
===================================================================
--- trunk/catalog/admin/includes/content/navigation_links.header.inc 2012-05-10 21:25:12 UTC (rev 4414)
+++ trunk/catalog/admin/includes/content/navigation_links.header.inc 2012-05-10 21:27:23 UTC (rev 4415)
@@ -1,17 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 15/11/10, 11:27
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<?php if ($action == 'new' || $action == 'edit'): ?>
-<script type="text/javascript"><!--
-$(function() {
- $('.tabs_lang').tabs().find('.ui-tabs-nav').sortable({axis:'x'});
-});
-// --></script>
-<?php endif; ?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/content/navigation_links.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/navigation_links.top.inc 2012-05-10 21:25:12 UTC (rev 4414)
+++ trunk/catalog/admin/includes/content/navigation_links.top.inc 2012-05-10 21:27:23 UTC (rev 4415)
@@ -1,159 +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 23/01/11, 20:54
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-$nID=(isset($_GET['nID'])? $_GET['nID'] : '');
-
-$error = false ;
-switch ($action) {
- case 'setflag':
- if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') )
- if (isset($nID)) oscss_set_nav_status($nID, $_GET['flag']);
-
- osCSS_Cache::clear('menu');
- tep_redirect(tep_href_link(FILENAME_NAVIGATION_LINKS));
- break;
- case 'delete':
- if (isset($nID)) {
- tep_db_query(" delete from ".TABLE_NAVIGATION_LINKS." where nav_link_id ='".(int)$nID."' ");
- tep_db_query(" delete from ".TABLE_NAVIGATION_LINKS_DESCRIPTION." where nav_link_id ='".(int)$nID."' ");
- }
- osCSS_Cache::clear('menu');
- tep_redirect(tep_href_link(FILENAME_NAVIGATION_LINKS));
- break;
- case 'sort':
- if(isset($_POST['sort_order']) && is_array($_POST['nav_link_id']))
- for ($i=0; $i< sizeof($_POST['nav_link_id']) ; $i++ )
- tep_db_query(" update ".TABLE_NAVIGATION_LINKS." set nav_sort_order = '".$_POST['sort_order'][$i]."' where nav_link_id ='".(int)$_POST['nav_link_id'][$i]."' ");
-
- osCSS_Cache::clear('menu');
- tep_redirect(tep_href_link(FILENAME_NAVIGATION_LINKS));
- break;
- case 'insert_new':
- case 'update':
-
- $nav_link_type = tep_db_prepare_input($_POST['type']);
- $nav_file = tep_db_prepare_input($_POST['link']);
- $nav_css_id = tep_db_prepare_input($_POST['css_id']);
- $nav_sort_order = tep_db_prepare_input($_POST['sort']);
- $nav_customer_status = tep_db_prepare_input($_POST['condition']);
- $parent_id =(isset($_POST['parent_id'])) ? tep_db_prepare_input($_POST['parent_id']) : 0;
-
- $nID = (isset($nID) && is_numeric($nID)) ? (int)$nID : '';
-
-// print_r($_POST);
-// exit;
-
- if ($nav_link_type == '1' )
- if( oscss_check_url($nav_file) == false ) {
- $error = true;
- $messageStack->add_session(ERROR_BAD_URL, 'error');
- }
-
- if ($nav_link_type == '0' )
- if(!tep_not_null($nav_file) ) {
- $error = true;
- $messageStack->add_session(ERROR_NO_FILES, 'error');
- }
-
-
- if (!tep_not_null($nav_sort_order) || !is_numeric($nav_sort_order)) $nav_sort_order='0';
-// var_dump($error);
- if( $error == false ) {
-
- if($action == 'insert_new') {
- $sql_data_array=array('nav_link_id'=>'',
- 'nav_sort_order'=>$nav_sort_order,
- 'nav_css_id'=>$nav_css_id,
- 'nav_file'=>$nav_file,
- 'nav_link_type'=>$nav_link_type,
- 'customers_status'=>$nav_customer_status,
- 'nav_link_status'=>tep_db_prepare_input($_POST['nav_link_status']),
- 'parent_id'=>$parent_id
- );
- $res=tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array);
- $nav_link_id =tep_db_insert_id($res);
-// $query=tep_db_query("select nav_link_id from " . TABLE_NAVIGATION_LINKS . " where nav_file='".$nav_file."' and nav_sort_order = '".$nav_sort_order."' and nav_css_id ='".$nav_css_id."' and nav_link_type ='".$nav_link_type."'");
-// $res_q=tep_db_fetch_array($query);
-// $nav_link_id = $res_q['nav_link_id'];
-
- $languages = tep_get_languages();
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $sql_data_array=array('language_id'=>$languages[$i]['id'],
- 'nav_name'=>tep_db_prepare_input($_POST['nav_link_name'][$languages[$i]['id']]),
- 'nav_link_id'=>$nav_link_id );
- tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array);
- }
- } elseif($action == 'update') {
- $sql_data_array=array('nav_sort_order'=>$nav_sort_order,
- 'nav_css_id'=>$nav_css_id,
- 'nav_file'=>$nav_file,
- 'nav_link_type'=>$nav_link_type,
- 'customers_status'=>$nav_customer_status,
- 'nav_link_status'=>tep_db_prepare_input($_POST['nav_link_status']),
- 'parent_id'=>$parent_id
- );
- tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array, 'update', " nav_link_id ='".$nID."' ");
-// print_r($sql_data_array);
-// exit;
- $languages = tep_get_languages();
- for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
-
- $sql_data_array=array('nav_name'=>tep_db_prepare_input($_POST['nav_link_name'][$languages[$i]['id']]) );
-
- tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array, 'update'," language_id ='".$languages[$i]['id']."' and nav_link_id ='".$nID."' ");
- }
- }
-
- osCSS_Cache::clear('menu');
-
- }
- tep_redirect(tep_href_link(FILENAME_NAVIGATION_LINKS));
-
- break;
- case 'new';
- //! new item
- $action_post_form='action=insert_new';
-
- $nav_links=array('nav_sort_order'=>'',
- 'nav_css_id'=>'',
- 'nav_file'=>'',
- 'nav_link_type'=>'',
- 'customers_status'=>'',
- 'nav_link_status'=>0,
- 'parent_id'=>0
- );
- break;
- case 'edit';
- //! edit d'un item
- $action_post_form='action=update&nID='.$nID;
-
- $nav_links_query = tep_db_query("SELECT * from ".TABLE_NAVIGATION_LINKS ." where nav_link_id ='".(int)$nID."'" );
- $nav_links = tep_db_fetch_array($nav_links_query);
-
- break;
- default:
- //! Liste par defaut
-
- $arry_navlink=list_item_order_niv();
-}
-
-
-$languages = tep_get_languages();
-$NAVLINK_CONDITION = array( '0'=> CONDITIONS_NONE ,
- '1'=> CONDITIONS_LOG_OFF ,
- '2'=> CONDITIONS_LOG_ON
- );
-$navlink_condition = array( array('id' => '0','text' => CONDITIONS_NONE ),
- array('id' => '1', 'text' => CONDITIONS_LOG_OFF ),
- array('id' => '2', 'text' => CONDITIONS_LOG_ON )
- );
-
-?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/languages/fr_FR/navigation_links.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/navigation_links.php 2012-05-10 21:25:12 UTC (rev 4414)
+++ trunk/catalog/admin/includes/languages/fr_FR/navigation_links.php 2012-05-10 21:27:23 UTC (rev 4415)
@@ -1,50 +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.0.9
- @date 06/09/10, 11:09
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-define('HEADING_TITLE',"Gestionnaire du menu de navigation" );
-define('HEADING_TITLE_NEW_MENU',"Nouveau menu" );
-define('TABLE_HEADING_NAME',"Intitulé" );
-define('TABLE_HEADING_PARENT',"Parent" );
-define('TABLE_HEADING_TARGET',"Cible (fichier/url)" );
-define('TABLE_HEADING_CSS',"Css id" );
-define('TABLE_HEADING_SORT_ORDER',"Ordre de tri" );
-define('TABLE_HEADING_CONDITION',"Condition" );
-define('TABLE_HEADING_STATUS',"Status" );
-define('TABLE_HEADING_ACTION',"Action" );
-define('FIELDSET_NAME',"Intitulé" );
-define('FIELDSET_DATAS',"Informations" );
-define('ENTRY_INTERNAL_LINK',"Lien interne" );
-define('ENTRY_INTERNAL_LINK_DESC',"Lien interne sous forme de nom de fichier (ex : products_new.php)" );
-define('ENTRY_EXTERNAL_LINK',"Lien Externe" );
-define('ENTRY_EXTERNAL_LINK_DESC',"Lien externe sous forme d'url (ex : http://domaine.com/file.php)" );
-define('ENTRY_FUNCTION_LINK',"Fonction php" );
-define('ENTRY_FUNCTION_LINK_DESC',"Executer une fonction php (menuCat)" );
-define('ENTRY_TARGET',"Cible (fichier ou url)" );
-define('ENTRY_TARGET_DESC',"Entrez ici le nom de fichier ou l'url en fonction du choix ci dessus" );
-define('ENTRY_FUNCTION__LINK_DESC',"Fonction public (elle doit être accessible au boîtes)" );
-define('ENTRY_CSS',"id CSS" );
-define('ENTRY_CSS_DESC',"L'id que portera le bloc div de ce menu, afin de le paramétrer dans votre feuille de style" );
-define('ENTRY_SORT_ORDER',"Ordre de tri" );
-define('ENTRY_SORT_ORDER_DESC',"Ordre d'apparition" );
-define('ENTRY_CONDITION',"Condition" );
-define('ENTRY_CONDITION_DESC',"Sous quelle condition le menu s'affiche" );
-define('TXT_CAT_ALL',"Choix du lien parent" );
-
-define('CONDITIONS_NONE',"Aucune" );
-define('CONDITIONS_LOG_OFF',"L'utilisateur ne doit pas etre loggé" );
-define('CONDITIONS_LOG_ON',"L'utilisateur doit etre loggé" );
-define('ERROR_BAD_URL',"L'url ne semble pas valide" );
-define('ERROR_NO_FILES',"Aucun nom de fichier spécifié" );
-define('ERROR_FILES_DOESNT_EXIST',"le fichier spécifié n'existe pas" );
-define('ERROR_BAD_SORT_ORDER',"Merci de spécifier un ordre de tri correct" );
-
-define('TEXT_INFO_HEADING_DELETE_NAV',"Supprimer ce lien" );
-define('TEXT_INFO_DELETE_INTRO',"Êtes-vous sûr de vouloir supprimer ce lien ?" );
-?>
\ 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-05-10 21:25:20
|
Revision: 4414
http://oscss.svn.sourceforge.net/oscss/?rev=4414&view=rev
Author: oscim
Date: 2012-05-10 21:25:12 +0000 (Thu, 10 May 2012)
Log Message:
-----------
Correction erreur dans la methode delete de sqlfeatured
report en dynamqiue du selecteur track_ctock et mise en oeuvre dans les page product + nettoyage code
refonte des page de gestion des navigation link vers un module de page
mise a jour de la base d'install des status
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/functions/lib.navigation_links.php
trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab
trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/install/includes/language/fr_FR/osc_status.txt
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php
trunk/catalog/admin/includes/gabarit/navigation_links/
trunk/catalog/admin/includes/gabarit/navigation_links/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt
trunk/catalog/admin/includes/modules/pages/navigation_links.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-10 21:25:12 UTC (rev 4414)
@@ -222,9 +222,17 @@
if($where=='')
return false;
- $DB->query("DELETE FROM " . TABLE_FEATURED ." WHERE ". substr($where, 3 ) );
+ $res = $DB->query("SELECT row_id as id FROM " . TABLE_FEATURED ." WHERE ". substr($where, 3 ).' LIMIT 1' );
+ $result = $res->fetchAssoc();
+
+ // childs tables
+ $DB->query("delete from " . TABLE_FEATURED_DATA . " where row_id = '" . (int)$result['id'] . "'");
+ $DB->query("delete from " . TABLE_FEATURED_DESCRIPTION . " where row_id = '" . (int)$result['id'] . "'");
+ $DB->query("delete from " . TABLE_FEATURED . " where row_id = '" . (int)$result['id'] . "'");
+
+
return true;
}
Added: trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php 2012-05-10 21:25:12 UTC (rev 4414)
@@ -0,0 +1,273 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/05/2012 ,17:48:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlnavigation_links
+ @file sqlnavigation_links.php
+ @brief manage db update/insert/delete for navigation_links
+*/
+
+
+
+
+class sqlnavigation_links
+ 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['nav_link_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'0';
+ $sql_data_array['nav_link_status'] = (isset($option['status'])) ? tep_db_prepare_input($option['status']) :'0';
+ $sql_data_array['parent_id'] = (isset($option['parent_id'])) ? tep_db_prepare_input($option['parent_id']) :'0';
+ $sql_data_array['customers_status'] = (isset($option['customers_status'])) ? tep_db_prepare_input($option['customers_status']) :'0';
+ $sql_data_array['nav_sort_order'] = (isset($option['sort_order'])) ? tep_db_prepare_input($option['sort_order']) :'0';
+ $sql_data_array['nav_css_id'] = (isset($option['css_id'])) ? tep_db_prepare_input($option['css_id']) :'';
+ $sql_data_array['nav_file'] = (isset($option['file'])) ? tep_db_prepare_input($option['file']) :'';
+
+
+ $res=tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array);
+
+ $id = $res->__get('insertId');
+
+ foreach(tep_get_languages() as $lg) {
+
+ $row = $option['langue'];
+
+ $sql_data_array_lg = array(
+ 'nav_link_id'=> (int)$id,
+ 'language_id'=> (int)$lg['id'],
+ 'nav_name'=> ((isset($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ),
+ );
+
+ $res=tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array_lg);
+ }
+
+ if(!$res)
+ return $res;
+ else
+ return $res->$id;
+ }
+
+ /**
+ @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 nav_link_id = '".(int)$option['id']."' ";
+// if(isset($option['type'])) $where .="AND nav_link_type = '".(int)$option['type']."' ";
+// if(isset($option['status'])) $where .="AND nav_link_status = '".(int)$option['status']."' ";
+
+
+ if(isset($option['new_type']))$sql_data_array['nav_link_type'] = tep_db_prepare_input($option['new_type']);
+ if(isset($option['new_status']))$sql_data_array['nav_link_status'] = tep_db_prepare_input($option['new_status']);
+
+
+ if(isset($option['parent_id'])) $sql_data_array['parent_id'] = (int)tep_db_prepare_input($option['parent_id']);
+ if(isset($option['css_id'])) $sql_data_array['nav_css_id'] = (int)tep_db_prepare_input($option['css_id']);
+ if(isset($option['restrict'])) $sql_data_array['customers_status'] = (int)tep_db_prepare_input($option['restrict']);
+
+ if(count((array)$sql_data_array)>0)
+ $res=tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array, 'update' , substr($where,3) );
+
+
+ foreach(tep_get_languages() as $lg) {
+
+ $row = $option['langue'];
+
+ $where_lg .= "AND language_id = '".(int)$lg['id']."' ";
+
+ $sql_data_array_lg = array(
+ 'nav_name'=> ((isset($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ),
+ );
+
+ $res=tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array_lg, 'update' , substr($where_lg,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 nav_link_id = '".(int)$option['id']."' ";
+ if(isset($option['type'])) $where .="AND nav_link_type = '".(int)$option['type']."' ";
+ if(isset($option['status'])) $where .="AND nav_link_status = '".(int)$option['status']."' ";
+
+
+ if($where=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_NAVIGATION_LINKS . " a ".
+ " WHERE ".substr($where,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+
+
+ // call all langue for this post
+ foreach(tep_get_languages() as $lg){
+
+ $_query = $DB->query("select fd.nav_name as title from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' AND language_id='" . $lg['id'] . "'");
+ $descr = $_query->fetchAssoc();
+
+ $result['lg'][$lg['id']] = ((!$shortkey)? $descr : self::CleanKey($descr));
+
+ tep_db_free_result($_query);
+ }
+
+
+
+ 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 nav_link_id = '".(int)$option['id']."' ";
+ if(isset($option['type'])) $where .="AND nav_link_type = '".(int)$option['type']."' ";
+ if(isset($option['status'])) $where .="AND nav_link_status = '".(int)$option['status']."' ";
+
+
+ if($where=='')
+ return false;
+
+ $res = $DB->query("SELECT nav_link_id as id FROM " . TABLE_NAVIGATION_LINKS ." WHERE ". substr($where, 3 ).' LIMIT 1' );
+ $result = $res->fetchAssoc();
+
+
+ // childs tables
+ $DB->query("delete from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " where nav_link_id = '" . (int)$result['id'] . "'");
+
+ $DB->query("delete from " . TABLE_NAVIGATION_LINKS . " where nav_link_id = '" . (int)$result['id'] . "'");
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'nav_link_id' => '',
+ 'nav_sort_order' => '',
+ 'nav_css_id' => '',
+ 'nav_file' => '',
+ 'nav_link_type' => '',
+ 'customers_status' => '',
+ 'nav_link_status' => '',
+ 'parent_id' => '',
+ );
+
+ foreach(tep_get_languages() as $lg){
+ $par['lg'][$lg['id']] = array(
+ 'title'=>'',
+ );
+ }
+
+ 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,'nav_link_') ===0)
+ $key=substr($key,strlen('nav_link_'));
+ elseif( strpos($key,'nav_') ===0)
+ $key=substr($key,strlen('nav_'));
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/functions/lib.navigation_links.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.navigation_links.php 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/admin/includes/functions/lib.navigation_links.php 2012-05-10 21:25:12 UTC (rev 4414)
@@ -23,15 +23,6 @@
}
/**
- Sets the status of a navigation link
-*/
-function oscss_set_nav_status($nav_link_id, $status) {
- if ($status == '1') return tep_db_query("update " . TABLE_NAVIGATION_LINKS . " set nav_link_status = '1' where nav_link_id = '" . (int)$nav_link_id . "'");
- elseif ($status == '0') return tep_db_query("update " . TABLE_NAVIGATION_LINKS . " set nav_link_status = '0' where nav_link_id = '" . (int)$nav_link_id . "'");
- else return -1;
-}
-
-/**
Tableau des item présent, et prepa pour tep_draw_pull_down_menu
@param
@a array tableau des lien a exclure, par nav_link_id
Modified: trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab 2012-05-10 21:25:12 UTC (rev 4414)
@@ -39,8 +39,8 @@
<li>
<span class="label text"><?php echo __('text info lang customers') ?> </span>
<span class="input text">
- <?php foreach (tep_get_languages() as $row) { if(customers::$Info->customers_language == $row['id']) ?>
- <?php echo tep_language_image( $row['directory'] . '/images/' . $row['image'], $row['name']) . ' '.$row['name'] ?>
+ <?php foreach (tep_get_languages() as $row) { ?>
+ <?php if(customers::$Info->customers_language == $row['id']) echo tep_language_image( $row['directory'] . '/images/' . $row['image'], $row['name']) . ' '.$row['name'] ?>
<?php } ?>
</span>
</li>
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-10 21:25:12 UTC (rev 4414)
@@ -9,7 +9,7 @@
@encode UTF-8
*/
-// print_r(featureds::$Info);
+print_r(featureds::$Info);
?>
<h3><?php echo __('heading title edit'); ?></h3>
Added: trunk/catalog/admin/includes/gabarit/navigation_links/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/display_view.delete.gab 2012-05-10 21:25:12 UTC (rev 4414)
@@ -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 10/05/2012 ,17:48:30
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('@navigation_links heading title delete'); ?></h3>
+
+
+<div class="box_uniq block_form">
+
+
+ <?php echo tep_draw_form('zone', navigation_links::FILENAME, 'action=delete_confirm', 'post') ?>
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_draw_hidden_field('cID', '', navigation_links::$Id);
+
+ echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
+ echo tep_js_back(tep_href_link(navigation_links::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+ <br class="clear" />
+
+</div>
Added: trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab 2012-05-10 21:25:12 UTC (rev 4414)
@@ -0,0 +1,99 @@
+<?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 10/05/2012 ,17:48:30
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+
+?>
+<h3><?php echo __('@navigation_links heading title edit'); ?></h3>
+
+<div class="box_uniq block_form">
+<?php echo tep_draw_form('navigation_links', navigation_links::FILENAME, 'action='.((navigation_links::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
+
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('@navigation_links tab specification'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('@navigation_links tab other'); ?></a></li>
+ </ul>
+
+
+ <div id="tabs-1" class="tabPage">
+
+
+ <div class="tabs_lang">
+ <ul>
+ <?php foreach(tep_get_languages() as $lg): ?>
+ <li>
+ <a href="#fieldset_<?php echo $lg['id'] ?>">
+ <?php echo tep_language_image($lg['directory'] . '/images/' .$lg['image'], $lg['name']); ?>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ <?php foreach(tep_get_languages() as $lg): ?>
+ <fieldset id="fieldset_<?php echo $lg['id'] ?>" class="block_field">
+ <p class="block_input">
+ <label for="<?php echo 'title' . $lg['id']; ?>"><?php echo __('@navigation_links entry title'); ?></label>
+ <?php echo tep_draw_input_field('title[' . $lg['id'] . ']', 'title_' . $lg['id'], navigation_links::$Info->lg[ $lg['id']]->title, 'size="70"', true) ; ?>
+ </p>
+ </fieldset>
+ <?php endforeach; ?>
+ </div>
+
+ <p class="block_input">
+ <label for="products_virtual_type_id"><?php echo __('@navigation_links text type'); ?></label>
+ <?php echo tep_draw_pull_down_menu('type', tep_get_status_array('navigation_links',0,'status_name'), navigation_links::$Info->type); ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('@navigation_links text info parent') ?></label>
+ <?php echo tep_draw_pull_down_menu('parent_id', array_merge(array(array('id'=>0, 'text'=> '')),navigation_links::parent_item_nav()), navigation_links::$Info->parent_id); ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('@navigation_links text info file') ?></label>
+ <?php echo tep_draw_input_field('file', '', navigation_links::$Info->file) ?>
+ </p>
+
+
+ </div>
+
+
+ <div id="tabs-2" class="tabPage">
+ <p class="block_input">
+ <label for="type"><?php echo __('@navigation_links text restrict'); ?></label>
+ <?php echo tep_draw_pull_down_menu('restrict', tep_get_status_array('customers_restrict_access',0,'status_name'), navigation_links::$Info->customers_status); ?>
+ </p>
+
+
+ <p class="block_input">
+ <Label for="sort_order"><?php echo __('@navigation_links text info sort order') ?></label>
+ <?php echo tep_draw_input_field('sort_order', '', navigation_links::$Info->sort_order) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('@navigation_links text info css id') ?></label>
+ <?php echo tep_draw_input_field('css_id', '', navigation_links::$Info->css_id) ?>
+ </p>
+
+
+ </div>
+
+
+ <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(navigation_links::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+
+ <br class="clear" />
+ </div>
+ </form>
+</div>
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt 2012-05-10 21:25:12 UTC (rev 4414)
@@ -0,0 +1,46 @@
+<?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 10/05/2012 ,17:48:30
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class navigation_links
+*/
+
+
+/* Listing */
+ $lang['heading title navigation_links'] = "Gestionnaire du menu de navigation";
+ $lang['@navigation_links image add'] = "Ajouter un liens";
+
+ $lang['@tasks table heading title'] = "Titre";
+ $lang['@tasks table heading type'] = "Type Id";
+ $lang['@tasks table heading type name'] = "Type";
+ $lang['@tasks table heading customers_status'] = "Conditions";
+ $lang['@tasks table heading status'] = "Etat";
+ $lang['@tasks table heading parent_id'] = "Parent id";
+ $lang['@tasks table heading parent name'] = "Parent";
+ $lang['table heading action'] = "Action";
+
+/* Edit */
+ $lang['@navigation_links heading title edit'] = "Edition d'un lien";
+ $lang['@navigation_links tab specification'] = "Caractéristiques";
+ $lang['@navigation_links tab other'] = "Autre";
+
+ $lang['@navigation_links entry title'] = "Texte";
+ $lang['@navigation_links text type'] = "Type";
+ $lang['@navigation_links text info file'] = "Cible (fichier ou url)";
+ $lang['@navigation_links text restrict'] = "Condition";
+ $lang['@navigation_links text info sort order'] = "Ordre de tri";
+ $lang['@navigation_links text info css id'] = "id CSS";
+ $lang['@navigation_links text info parent'] = "Parent";
+
+/* Delete */
+ $lang['@navigation_links heading title delete'] = "Suppresion d'un lien";
+
+
+
+
+?>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-10 21:25:12 UTC (rev 4414)
@@ -164,13 +164,11 @@
/* mutliple choose */
- /* select stock mode */
- $lang['text product in stock']="En Stock" ;
- $lang['text product not in stock']="Hors stock" ;
+
/* general error */
$lang['error catalog image directory not writeable %s']="Erreur : Impossible d'écrire dans le répertoire d'images : %s " ;
$lang['error catalog image directory does not exist %s']="Erreur : Le répertoire d'images n'existe pas : %s " ;
Added: trunk/catalog/admin/includes/modules/pages/navigation_links.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/navigation_links.php (rev 0)
+++ trunk/catalog/admin/includes/modules/pages/navigation_links.php 2012-05-10 21:25:12 UTC (rev 4414)
@@ -0,0 +1,692 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/05/2012 ,17:48:30
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class navigation_links
+*/
+
+class navigation_links
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ /*IntModTwo, */ /// new interface module for nextgen module
+ ExtModConfig {
+
+ const FILENAME = FILENAME_NAVIGATION_LINKS;
+
+ /**
+ @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;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
+
+
+ /**
+ @brief class constructor
+ */
+ public function __construct() {
+ self::GetConf();
+ }
+
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
+ self::$code=__CLASS__;
+
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$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')){
+
+ 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::$allfields['cd.nav_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('@tasks table heading title'),
+ 'default'=>true,
+ 'width'=>'35%',
+ );
+
+ /* Db Type */
+ self::$allfields['c.nav_link_type'] = array(
+ 'sort'=>true,
+ 'alias'=>'type',
+ 'text'=>__('@tasks table heading type'),
+ 'width'=>'6%',
+ );
+ self::$allfields['s.status_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'type_name',
+ 'text'=>__('@tasks table heading type name'),
+ 'default'=>true,
+ 'width'=>'8%',
+ );
+ /* Db Type */
+
+ self::$allfields['c.customers_status'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_status',
+ 'text'=>__('@tasks table heading customers_status'),
+ 'default'=>true,
+
+ );
+
+ self::$allfields['c.customers_status'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_status',
+ 'text'=>__('@tasks table heading customers_status'),
+ 'default'=>true,
+
+ );
+
+ /* Db parent */
+ self::$allfields['c.parent_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'parent_id',
+ 'text'=>__('@tasks table heading parent_id'),
+
+ );
+ self::$allfields['cd2.nav_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'parent_name',
+ 'text'=>__('@tasks table heading parent name'),
+ 'default'=>true,
+ );
+ /* Db parent */
+
+ self::$allfields['c.nav_link_status'] = array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('@tasks table heading status'),
+ 'default'=>true,
+
+ );
+
+
+ /**
+ @remarks Construct all list , fields , th/td
+ */
+ self::$InitInfo['theader']['listing']=array(
+// array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+// array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+// 0=>false,
+// 1=>false,
+ );
+
+ // min fields and not view directly colonne fields
+ $listfield = " c.nav_link_id as id, ";
+ $_SESSION['filters']['allfields'] = array();
+ // put in
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+ // check and appli
+ foreach(self::$allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(is_array($row)){
+ $txt = $row['text'];
+ $alias = (isset($row['alias'])? $row['alias'] : $clean);
+ $css = (isset($row['class'])? $row['class'] : 'tcenter');
+ $width = (isset($row['width'])? $row['width'] : '5%');
+ }
+ else{
+ $txt = $row;
+ $alias = $clean;
+ $css = 'tcenter';
+ $width = '5%';
+ }
+
+ if(
+ ( isset($in_session[$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(
+ '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'=>'',
+ 'title'=>__('@navigation_links image add'),
+ '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) {
+
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'] =array();
+
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
+ /**
+ @remarks specific ajax 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'] );
+ sqlnavigation_links::update($myarray);
+ }
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
+ break;
+
+ case 'insert':
+ $myarray = array(
+ 'parent_id'=>tep_db_prepare_input($_POST['parent_id']),
+ 'type'=>tep_db_prepare_input($_POST['type']),
+ 'file'=>tep_db_prepare_input($_POST['file']),
+ 'css_id'=>tep_db_prepare_input($_POST['css_id']),
+ 'sort_order'=>tep_db_prepare_input($_POST['sort_order']),
+ 'restrict'=>tep_db_prepare_input($_POST['restrict']),
+ );
+
+ foreach(tep_get_languages() as $row) {
+ $myarray['langue']['title'][$row['id']] = tep_db_prepare_input($_POST['title'][$row['id']]);
+ }
+
+ sqlnavigation_links::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,
+ 'new_parent_id'=>tep_db_prepare_input($_POST['parent_id']),
+ 'new_type'=>tep_db_prepare_input($_POST['type']),
+ 'file'=>tep_db_prepare_input($_POST['file']),
+ 'css_id'=>tep_db_prepare_input($_POST['css_id']),
+ 'sort_order'=>tep_db_prepare_input($_POST['sort_order']),
+ 'restrict'=>tep_db_prepare_input($_POST['restrict']),
+ );
+
+ foreach(tep_get_languages() as $row) {
+ $myarray['langue']['title'][$row['id']] = tep_db_prepare_input($_POST['title'][$row['id']]);
+ }
+
+ sqlnavigation_links::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=sqlnavigation_links::delete($myarray);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+ }
+
+ return self::$action;
+ }
+
+ public function get_header(){
+ }
+
+
+ /**
+ @fn navigation_links::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 = sqlnavigation_links::fetch(array('id'=>self::$Id ), true);
+ }
+ else{
+ self::$Info = sqlnavigation_links::Specimen(true);
+ }
+ break;
+
+
+ case 'listing':
+ default:
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+ $query_raw = "select ".$adjust->listfields." from " . TABLE_NAVIGATION_LINKS . " c ".
+ " LEFT JOIN ".TABLE_NAVIGATION_LINKS_DESCRIPTION." cd ON( cd.nav_link_id = c.nav_link_id AND cd.language_id ='".$adjust->languages_id."' ) ".
+ " LEFT JOIN ".TABLE_NAVIGATION_LINKS_DESCRIPTION." cd2 ON( cd2.nav_link_id = c.parent_id AND cd.language_id ='".$adjust->languages_id."' ) ".
+ " LEFT JOIN ".TABLE_STATUS." s ON( s.status_id = c.nav_link_type AND s.status_type = 'navigation_links' AND s.language_id ='".$adjust->languages_id."' ) ".
+ ((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' parent_id 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'], 'nav_link_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 == 'status') $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['id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['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['id'].'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['status'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$item['status'],
+ ( ($item['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+
+ /**
+ @brief return Filename
+ */
+ public static function GetFILENAME(){
+ return self::FILENAME;
+ }
+
+
+
+
+ /**
+ Return a navigation links name
+ */
+ public static function navlink_name($nav_link_id, $language_id = 0) {
+ global $languages_id;
+
+ if ($language_id == 0) $language_id = $languages_id;
+ $nav_link_query = tep_db_query("select nav_name from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " where nav_link_id = '" . (int)$nav_link_id . "' and language_id = '" . (int)$language_id . "'");
+ $nav_link = tep_db_fetch_array($nav_link_query);
+
+ return $nav_link['nav_name'];
+ }
+
+ /**
+ Tableau des item présent, et prepa pour tep_draw_pull_down_menu
+ @param
+ @a array tableau des lien a exclure, par nav_link_id
+ */
+ public static function parent_item_nav($exclude=false){
+ global $languages_id;
+ $tab=array();$ind='';
+ $arry_navlink=self::list_item_order_niv();
+ foreach($arry_navlink as $nav_links ){
+ if ((is_array($exclude) && !in_array($nav_links['nav_link_id'],$exclude)) || !$exclude ){
+ $ind=tep_decal($nav_links['niveau']);
+ $tab[]=array('id'=>$nav_links['nav_link_id'], 'text'=> $ind.self::navlink_name($nav_links['nav_link_id']));
+ }
+ }
+ return $tab;
+ }
+
+
+ /**
+ Function construction du tableau des liens, appel hierarchise.
+ Appel recursif
+ @param
+ @a int parent_id l'id root
+ @a boolean false par defaut, true mode recursif
+ */
+ public static function list_item_order_niv($parent_id=0,$recursif='false'){
+ global $NAVLINK_CONDITION;
+ $arry_navlink=array();
+ $nav_links_query = tep_db_query($sql="SELECT * from ".TABLE_NAVIGATION_LINKS ." nv where parent_id ='".(int)$parent_id."' order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : ' parent_id, nav_sort_order ASC'));
+ $niveau=($recursif !='false')? ((int)$recursif) : 0 ;
+
+ while($nav_links = tep_db_fetch_array($nav_links_query)) {
+
+
+ if ($nav_links['nav_link_status'] == '1') $status_image = tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . '<a href="' . tep_href_link(FILENAME_NAVIGATION_LINKS, 'action=setflag&flag=0&nID=' . $nav_links['nav_link_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 16, 16) . '</a>';
+ else $status_image = '<a href="' . tep_href_link(FILENAME_NAVIGATION_LINKS, 'action=setflag&flag=1&nID=' . $nav_links['nav_link_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a>' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 16, 16);
+
+
+ $arry_navlink[]=array_merge($nav_links, array('condition'=>$NAVLINK_CONDITION[$nav_links['customers_status']],'status_image'=>$status_image,'niveau'=> $niveau) );
+
+ $isd=self::list_item_order_niv($nav_links['nav_link_id'],($niveau+1));
+
+ if(count($isd) >0 ){
+ $niveau++;
+ $arry_navlink =array_merge($arry_navlink,$isd);
+ $niveau--;
+ }
+ }
+
+ return $arry_navlink;
+ }
+
+
+
+ /**
+ @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
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-10 21:25:12 UTC (rev 4414)
@@ -764,15 +764,11 @@
default: self::$in_status = true; self::$out_status = false;
}
- self::$track_stock = array(
- array('id'=>0, 'text'=>__('pas de suivi de stock') ),
- array('id'=>1, 'text'=>__('en stock') ),
- array('id'=>2, 'text'=>__('hors stock') )
- );
+ self::$track_stock = tep_get_status_array('track_stock',0,'status_name');
- break;
+ break;
- default:
+ default:
//! Entretient liens avec categorie
sqlproduct::Maintenance();
Modified: trunk/catalog/install/includes/language/fr_FR/osc_status.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2012-05-10 21:25:12 UTC (rev 4414)
@@ -62,4 +62,20 @@
/* featrued*/
$lg['OSC_FEATURED_SELECTION']="Complexe" ;
$lg['OSC_FEATURED_UNE']="Simple" ;
+
+/* navigation link */
+$lg['OSC_NAVIGATION_LINKS_INTERNAL']="Lien interne" ;
+$lg['OSC_NAVIGATION_LINKS_EXTERNAL']="Lien externe" ;
+$lg['OSC_NAVIGATION_LINKS_FUNCTION']="Fonction php" ;
+
+/* customers_restrict_access */
+$lg['OSC_RESTRICT_ACCESS_NONE']="Aucune" ;
+$lg['OSC_RESTRICT_ACCESS_LOGGED']="loggué" ;
+
+
+/* track_stock */
+$lg['OSC_TRACK_STOCK_NONE']="Pas de suivi" ;
+$lg['OSC_TRACK_STOCK_ON']="En stock - suivi " ;
+$lg['OSC_TRACK_STOCK_NOSTOCK']="Hors stock - suivi" ;
+
?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-10 21:25:12 UTC (rev 4414)
@@ -58,3 +58,13 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'featured', 1, 'OSC_FEATURED_SELECTION','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'navigation_links', 1, 'OSC_NAVIGATION_LINKS_INTERNAL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'navigation_links', 1, 'OSC_NAVIGATION_LINKS_EXTERNAL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'navigation_links', 1, 'OSC_NAVIGATION_LINKS_FUNCTION','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'customers_restrict_access', 1, 'OSC_RESTRICT_ACCESS_NONE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'customers_restrict_access', 1, 'OSC_RESTRICT_ACCESS_LOGGED','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'track_stock', 1, 'OSC_TRACK_STOCK_NONE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'track_stock', 1, 'OSC_TRACK_STOCK_ON','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-05-10 12:46:22 UTC (rev 4413)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-05-10 21:25:12 UTC (rev 4414)
@@ -21,3 +21,15 @@
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_SELECTION','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'navigation_links', 1, 'OSC_NAVIGATION_LINKS_INTERNAL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'navigation_links', 1, 'OSC_NAVIGATION_LINKS_EXTERNAL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'navigation_links', 1, 'OSC_NAVIGATION_LINKS_FUNCTION','');
+
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'customers_restrict_access', 1, 'OSC_RESTRICT_ACCESS_NONE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'customers_restrict_access', 1, 'OSC_RESTRICT_ACCESS_LOGGED','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (0, 'track_stock', 1, 'OSC_TRACK_STOCK_NONE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'track_stock', 1, 'OSC_TRACK_STOCK_ON','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'track_stock', 1, 'OSC_TRACK_STOCK_NOSTOCK','');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-10 12:46:31
|
Revision: 4413
http://oscss.svn.sourceforge.net/oscss/?rev=4413&view=rev
Author: oscim
Date: 2012-05-10 12:46:22 +0000 (Thu, 10 May 2012)
Log Message:
-----------
Coquille
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-10 08:30:00 UTC (rev 4412)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-10 12:46:22 UTC (rev 4413)
@@ -12,6 +12,49 @@
--+######################################################################--+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'orders', 1, 'OSC_ORDERS_STATUS_CANCELED', '#666');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING', '#FF1A00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (11, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING_MONEY_ORDER', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (21, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED_MONEY_ORDER', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'orders', 1, 'OSC_ORDERS_STATUS_EXPEDIED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (6, 'orders', 1, 'OSC_ORDERS_STATUS_CLOSED', '#66FF00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name ) VALUES (1, 'task', 1, 'task');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'returns', 1, 'OSC_RETURNS_STATUS_PENDING','#FF1A00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'returns',1, 'OSC_RETURNS_STATUS_AWAITING_RETURN', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'returns',1, 'OSC_RETURNS_STATUS_CANCELLED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'returns',1, 'OSC_RETURNS_STATUS_COMPLETE', '#666');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'return_reasons', 1, 'OSC_RETURN_REASONS_FAULTY','#FF1A00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'return_reasons',1, 'OSC_RETURN_REASONS_DAMAGED', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'return_reasons',1, 'OSC_RETURN_REASONS_INCORRECT_ITEM', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'return_reasons',1, 'OSC_RETURN_REASONS_WARRANTY', '#666');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'refund_method', 1, 'OSC_REFUND_METHOD_PAYPAL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'refund_method', 1, 'OSC_REFUND_METHOD_NOCHEX','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'refund_method', 1, 'OSC_REFUND_METHOD_EXCHANGE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'refund_method', 1, 'OSC_REFUND_METHOD_GIFT_VOUCHERS','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'refund_method', 1, 'OSC_REFUND_METHOD_CUSTOMERS_POINTS','');
+
+insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'product', 1, 'OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL','');
+insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION','');
+insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SERVICE','');
+insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SOFTWARE','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_SELECT','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_TEXT','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_RADIO','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_CHECKBOX','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'geo_zone_type', 1, 'OSC_GEO_ZONE_VAT','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'geo_zone_type', 1, 'OSC_GEO_ZONE_SHIPPING','');
+
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'content', 1, 'OSC_CMS_CONTENT_SIMPLE','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'featured', 1, 'OSC_FEATURED_SELECTION','');
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-10 08:30:11
|
Revision: 4412
http://oscss.svn.sourceforge.net/oscss/?rev=4412&view=rev
Author: oscim
Date: 2012-05-10 08:30:00 +0000 (Thu, 10 May 2012)
Log Message:
-----------
FS#1055
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/packageRepository.php
trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
trunk/catalog/admin/includes/modules/pages/package.php
Modified: trunk/catalog/admin/includes/exts/package/packageRepository.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageRepository.php 2012-05-10 07:53:03 UTC (rev 4411)
+++ trunk/catalog/admin/includes/exts/package/packageRepository.php 2012-05-10 08:30:00 UTC (rev 4412)
@@ -69,6 +69,66 @@
}
+ /**
+ @brief manage repository source file xml
+ modifie file
+ @param $key string uniq key source
+ @param option array() param for save
+ */
+ public static function SourceUpdateConfig($key, $option){
+ global $messageStack;
+ try{
+ //! load xml file
+
+ if(!$Parser =$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE))
+ throw new Exception('file source repository no found');
+
+ $FeedItem = $Parser->xpath('channel');
+ foreach($FeedItem as $k=>$item){
+ if((string)$item->key == (string)$key){
+
+ $Parser->channel[$k]->ident->user = (string) $option['user'];
+ $Parser->channel[$k]->ident->token = (string)$option['token'];
+
+ }
+
+ }
+
+ // Create a new DOMDocument object
+ $doc = new DOMDocument('1.0');
+
+ // add spaces, new lines and make the XML more readable format
+ $doc->formatOutput = true;
+
+ // Get a DOMElement object from a SimpleXMLElement object
+ $domnode = dom_import_simplexml($Parser);
+
+ $domnode->preserveWhiteSpace = false;
+
+ // Import node into current document
+ $domnode = $doc->importNode($domnode, true);
+
+ // Add new child at the end of the children
+ $domnode = $doc->appendChild($domnode);
+
+ // Dump the internal XML tree back into a string
+ $saveXml = $doc->saveXML();
+
+ $file_vers= @fopen(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE,'w');
+ fputs( $file_vers,$saveXml);
+ fclose($file_vers);
+
+ }
+ catch(Exception $e){
+ $messageStack->add_session($e->getMessage(),'error' );
+ return false;
+ }
+
+ return true;
+ }
+
+
+
public static function SourceLastUpdate($key){
}
@@ -81,7 +141,9 @@
global $messageStack;
try{
//! load xml file
- if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE)) throw new Exception('file cache introuvable');
+ if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE))
+ throw new Exception('file cache introuvable');
+
$FeedItem = $Parser->xpath('channel');
foreach($FeedItem as $item){
if((string)$item->key == (string)$key)
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-05-10 07:53:03 UTC (rev 4411)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-05-10 08:30:00 UTC (rev 4412)
@@ -7,13 +7,12 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-// print_r(package::$list->service);
+
$r =package::$list->service;
?>
<h3><?php echo __('title heading configuration source repository edit') ?></h3>
- not implemented in this version
- <?php echo tep_draw_form('new_product', package::FILENAME, 'type_data=source&action=source_update', 'post'); ?>
+ <?php echo tep_draw_form('new_product', package::FILENAME, 'type_data=source&action=source_update_config', 'post'); ?>
<div class="box_uniq block_form">
<?php echo tep_draw_hidden_field('key', '', (string)package::$list->key, ' ') ?>
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-05-10 07:53:03 UTC (rev 4411)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-05-10 08:30:00 UTC (rev 4412)
@@ -159,25 +159,25 @@
global $messageStack;
switch(self::$action){
+
+ /**
+ @remarks
+ */
case 'source_test';
if(isset($_GET['mode'])) {
-//
// if(self::$objChild->SourceUpdate()==true)
// InitConnexion($repo, $action = '')
}
-
// tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
break;
-
+ /**
+ @remarks
+ */
case 'source_synchro';
if(isset($_GET['key'])) {
-//
// if(self::$objChild->SourceUpdate()==true)
-
// if(self::$objChild->SourceUpdate()==true)
-
-//
}
if(!isset($_GET['forceajax']))
@@ -185,12 +185,41 @@
// tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
break;
+
+ /**
+ @remarks
+ */
+ case 'source_update_config':
+ $key = tep_db_prepare_input($_POST['key']);
+
+ $opt['user'] = tep_db_prepare_input($_POST['user']);
+ $opt['token'] = tep_db_prepare_input($_POST['token']);
+
+// self::$objChild->SourceUpdateConfig($key, $opt);
+// exit;
+
+ if(self::$objChild->SourceUpdateConfig($key, $opt)==true)
+ tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit&key='.$key));
+
+
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
+ /**
+ @remarks
+ */
case 'source_update':
if(self::$objChild->SourceUpdate()==true)
tep_redirect(tep_href_link(self::FILENAME));
tep_redirect(tep_href_link(self::FILENAME));
break;
+
+ /**
+ @remarks
+ */
case 'download':
$class=self::$code.'Installer';
if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
@@ -200,6 +229,10 @@
// self::load_db_values(self::REPOSITORY_OFFICIAL,'action=view');
break;
+
+ /**
+ @remarks
+ */
case 'upload_confirm':
if ( !empty($_FILES['new_package']['tmp_name']) ) {
$categories_image = new upload('new_package', DIR_FS_CIP);
@@ -207,6 +240,9 @@
tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_update'));
break;
+ /**
+ @remarks active / desactive modules
+ */
case 'setflag':
$t=$ts=$tss =array();
$moduleid=(int)$_GET['dbset'];
@@ -250,7 +286,9 @@
tep_redirect(tep_href_link(self::FILENAME, 'action=config&class='.$objres->ident ));
break;
-
+ /**
+ @remarks save config one module
+ */
case 'save':
while (list($key, $value) = each($_POST['configuration'])) {
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-10 07:53:14
|
Revision: 4411
http://oscss.svn.sourceforge.net/oscss/?rev=4411&view=rev
Author: oscim
Date: 2012-05-10 07:53:03 +0000 (Thu, 10 May 2012)
Log Message:
-----------
FS#1061 Fix
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
trunk/catalog/admin/includes/modules/pages/adminGroup.php
Modified: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2012-05-10 06:49:01 UTC (rev 4410)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2012-05-10 07:53:03 UTC (rev 4411)
@@ -12,13 +12,13 @@
?>
<h3><?php echo __('text info heading edit group') ?></h3>
-<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'action='. ((adminGroup::$action == 'edit')? 'group_edit' : 'new_confirm') , 'post' ); ?>
+<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'gID='.@$_GET['gID'].'&action='. ((adminGroup::$action == 'edit')? 'group_edit' : 'new_confirm') , 'post' ); ?>
<div class="box_uniq">
<p><?php if (adminGroup::$action == 'edit') echo tep_draw_hidden_field('newsletter_id', '', (int)$_GET['gID'] ); ?></p>
<fieldset class="block_field">
<p class="block_input">
- <label for="title" title="<?php echo __('text info edit group intro') ; ?>"> <?php echo __('text newsletter title') . tep_image(DIR_WS_ICONS.'icon_help.gif'); ?></label>
+ <label for="title" > <?php echo __('text info edit group intro') . tep_image(DIR_WS_ICONS.'icon_help.gif'); ?></label>
<?php echo tep_draw_input_field('admin_groups_name','', adminGroup::$gInfo->admin_groups_name); ?>
</p>
Modified: trunk/catalog/admin/includes/modules/pages/adminGroup.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/adminGroup.php 2012-05-10 06:49:01 UTC (rev 4410)
+++ trunk/catalog/admin/includes/modules/pages/adminGroup.php 2012-05-10 07:53:03 UTC (rev 4411)
@@ -12,9 +12,9 @@
class adminGroup
- implements
- ExtModPage,
- InterfaceModule
+ implements
+ ExtModPage,
+ InterfaceModule
{
/**
@@ -78,7 +78,7 @@
}
/**
- @brief process action
+ @brief process action
*/
public function check_action($actions){
global $messageStack;
@@ -224,7 +224,7 @@
if (($admin_groups_name == '' || NULL) || (strlen($admin_groups_name) <= 5) ) {
tep_redirect(tep_href_link(self::FILENAME, 'gID=' . $_GET[gID] . '&gName=false&action=action=edit_group'));
} else {
- $check_groups_name_query = tep_db_query("select admin_groups_name as group_name_edit from " . TABLE_ADMIN_GROUPS . " where admin_groups_id <> " . $_GET['gID'] . " and admin_groups_name like '%" . $name_replace . "%'");
+ $check_groups_name_query = tep_db_query("select admin_groups_name as group_name_edit from " . TABLE_ADMIN_GROUPS . " where admin_groups_id <> '" . (int)$_GET['gID'] . "' and admin_groups_name like '%" . $name_replace . "%'");
$check_duplicate = tep_db_num_rows($check_groups_name_query);
if ($check_duplicate > 0){
tep_redirect(tep_href_link(self::FILENAME, 'gID=' . $_GET['gID'] . '&gName=used&action=edit_group'));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-10 06:49:11
|
Revision: 4410
http://oscss.svn.sourceforge.net/oscss/?rev=4410&view=rev
Author: oscim
Date: 2012-05-10 06:49:01 +0000 (Thu, 10 May 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-05-09 21:03:44 UTC (rev 4409)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-05-10 06:49:01 UTC (rev 4410)
@@ -25,5 +25,5 @@
date_update datetime NOT NULL,
user_update int(11) NOT NULL,
PRIMARY KEY (row_id),
- UNIQUE KEY featured_key (featured_key)
-);
+ UNIQUE KEY featured_uniqkey (featured_uniqkey)
+);
\ No newline at end of file
Modified: 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 2012-05-09 21:03:44 UTC (rev 4409)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql 2012-05-10 06:49:01 UTC (rev 4410)
@@ -11,6 +11,7 @@
--| 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,
@@ -23,5 +24,5 @@
date_update datetime NOT NULL,
user_update int(11) NOT NULL,
PRIMARY KEY (row_id),
- UNIQUE KEY featured_key (featured_key)
+ UNIQUE KEY featured_uniqkey (featured_uniqkey)
);
\ 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-05-09 21:03:51
|
Revision: 4409
http://oscss.svn.sourceforge.net/oscss/?rev=4409&view=rev
Author: oscim
Date: 2012-05-09 21:03:44 +0000 (Wed, 09 May 2012)
Log Message:
-----------
FIX FS#989
Modified Paths:
--------------
trunk/catalog/common/classes/datatype_drivers/Data_content.php
trunk/catalog/common/classes/datatype_drivers/Data_product.php
trunk/catalog/includes/triggers/search_suggest.inc
Modified: trunk/catalog/common/classes/datatype_drivers/Data_content.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-05-09 20:39:42 UTC (rev 4408)
+++ trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-05-09 21:03:44 UTC (rev 4409)
@@ -112,7 +112,7 @@
function is_type($mode='unique'){
switch(strtolower($mode)){
case 'search':
- if(isset($_GET['data']) && $_GET['data'] == $this->DataType )
+ if(isset($_REQUEST['data']) && $_REQUEST['data'] == $this->DataType )
return true;
break;
case 'cpath':
Modified: trunk/catalog/common/classes/datatype_drivers/Data_product.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-05-09 20:39:42 UTC (rev 4408)
+++ trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-05-09 21:03:44 UTC (rev 4409)
@@ -128,7 +128,7 @@
function is_type($mode='unique'){
switch($mode){
case 'search':
- if(isset($_GET['data']) && $_GET['data'] == $this->DataType )
+ if(isset($_REQUEST['data']) && $_REQUEST['data'] == $this->DataType )
return true;
break;
case 'cpath':
Modified: trunk/catalog/includes/triggers/search_suggest.inc
===================================================================
--- trunk/catalog/includes/triggers/search_suggest.inc 2012-05-09 20:39:42 UTC (rev 4408)
+++ trunk/catalog/includes/triggers/search_suggest.inc 2012-05-09 21:03:44 UTC (rev 4409)
@@ -11,13 +11,58 @@
*/
+
if(!isset($_GET['search'])) exit;
- else $sh=tep_db_prepare_input(utf8_encode(strtolower($_GET['search'])));
- $sql = "SELECT DISTINCT pd.products_name, pd.products_id FROM " . TABLE_PRODUCTS . " p, ".TABLE_PRODUCTS_DESCRIPTION." pd ," . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c WHERE p.products_id = pd.products_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and ( pd.products_name like '%" . tep_db_input($sh) . "%' ) and p2c.products_id=p.products_id and c.categories_id=p2c.categories_id and c.categories_status='1' LIMIT 15";
- $product_query = $DB->query($sql);
+ $_REQUEST['search'] = tep_db_prepare_input(utf8_encode(strtolower($_GET['search'])));
- while($product_array = $product_query->fetchAssoc())
- echo '<a href="'.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_array['products_id']).'">'.$product_array['products_name'].'</a>'."\n";
+ // force DATATYPES_DEFAULT_NOSELECTED if not type detected
+ if(!isset($_REQUEST['data']))
+ $_REQUEST['data'] = DATATYPES_DEFAULT_NOSELECTED;
+ /**
+ @remarks detect type by Get[data]
+ */
+ if( ($dyntype = DataTypes::is_type('search')) && $dyntype != false ){
+
+ $list = $dyntype->FO_load_page('search');
+
+ $subtype = $list->DataType;
+
+ $page->add_var_page('childs_gab',$dyntype->listing_sql['gab']);
+
+
+ $listing_sql = 'SELECT DISTINCT '.$dyntype->listing_sql['col_count'] .
+ ' '. $dyntype->listing_sql['tables'] .
+ ' '. $dyntype->listing_sql['where'] .
+ ' ORDER BY '. $dyntype->listing_sql['sort'].
+ " LIMIT 15";
+
+ $listing_query = $DB->query($listing_sql);
+
+
+ while($_array = $listing_query->fetchAssoc()){
+
+
+
+ // retro-compatibilite
+ if(in_array($subtype, array('product') ))
+ $key = $subtype.'s_id';
+ else
+ $key = $subtype. '_id';
+
+ if(!isset($_array[$key]) )
+ continue;
+
+ $pd=$subtype::get_item($_array[$key]);
+
+ if(!$pd )
+ continue;
+
+ echo '<a href="'.tep_href_link($pd->href).'">'.$pd->title.'</a>'."\n";
+
+ }
+
+ }
+
?>
\ 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-05-09 20:39:48
|
Revision: 4408
http://oscss.svn.sourceforge.net/oscss/?rev=4408&view=rev
Author: oscim
Date: 2012-05-09 20:39:42 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Ajout des fichier de correspondance destine a permettre la desinstallation des tables
Added Paths:
-----------
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_description.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers_info.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_labels.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_values.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_to_products_extra_fields.sql
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_description.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_description.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_description.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_featured_description ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_manufacturers ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers_info.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers_info.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_manufacturers_info.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_manufacturers_info ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_products_extra_fields ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_labels.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_labels.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_labels.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_products_extra_fields_labels ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_values.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_values.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_extra_fields_values.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_products_extra_fields_values ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_to_products_extra_fields.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_to_products_extra_fields.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_products_to_products_extra_fields.sql 2012-05-09 20:39:42 UTC (rev 4408)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_products_to_products_extra_fields ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-09 20:25:33
|
Revision: 4407
http://oscss.svn.sourceforge.net/oscss/?rev=4407&view=rev
Author: oscim
Date: 2012-05-09 20:25:25 +0000 (Wed, 09 May 2012)
Log Message:
-----------
suite travail et finalisation featured
correction coquille driver.content
nettoyage du code et ajout de commentaire
mise a niveau template defaut
correction dev genercod
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/includes/classes/drivers/data/content.php
trunk/catalog/includes/modules/featured.php
trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql
trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php
trunk/catalog/templates/defaut/cfg/init.php
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab
Modified: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -43,6 +43,7 @@
// $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_uniqkey'] = ((isset($option['key']) && strlen($option['key'])>5) ? tep_db_prepare_input($option['key']) :'uniqkey'.rand() );
$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;
@@ -91,9 +92,13 @@
$where .= "AND row_id = '".(int)$option['id']."' ";
}
if(isset($option['type'])) $where .="AND k_status_type = '".(int)$option['type']."' ";
+ if(isset($option['key'])) $where .="AND featured_uniqkey = '".(int)$option['key']."' ";
+
// if(isset($option['status'])) $where .="AND featured_status = '".(int)$option['status']."' ";
+ if(isset($option['new_type']))$sql_data_array['k_status_type'] = tep_db_prepare_input($option['new_type']);
+
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']);
@@ -150,8 +155,8 @@
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['key'])) $where .="AND featured_uniqkey = '".(int)$option['key']."' ";
-
if($where=='')
return false;
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-09 20:25:25 UTC (rev 4407)
@@ -45,6 +45,10 @@
</div>
+ <p class="block_input">
+ <Label><?php echo __('@featureds text info featureds keys') ?></label>
+ <?php echo tep_draw_input_field('featureds_key', '', featureds::$Info->uniqkey) ?>
+ </p>
<p class="block_input">
<label ><?php echo __('@featureds text info type'); ?></label>
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -24,6 +24,7 @@
define('BOX_HEADING_CONF_STATS_LOW_STOCK_ATTRIB',"Stock par produit" );
+define('BOX_NAVIGATION_LINK',"Gestion du Menu" );
define('BOX_TOOLS_GOOGLE_SITEMAP',"Sitmap google" );
define('BOX_TOOLS_HEADER_TAG',"Référencement" );
define('BOX_TOOLS_BANNER_MANAGER',"Bannière" );
@@ -36,7 +37,4 @@
define('BOX_HEADING_CONF_BOX_REPORTS',"Statistiques" );
define('BOX_HEADING_CONF_BOX_TOOLS_BATCH_CENTER',"Batch Print Center" );
define('BOX_TOOLS_CRONJOB',"Tache(s) programmée(s)" );
-
-
-define('BOX_NAVIGATION_LINK',"Gestion du Menu" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/09_commercial.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -17,5 +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" );
+define('BOX_HEADING_CONF_BOX_FEATURED',"Mise en avant" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-09 20:25:25 UTC (rev 4407)
@@ -25,6 +25,7 @@
$lang['@featureds table heading user_added'] = "Créer par" ;
$lang['@featureds table heading user_update'] = "Modifié par" ;
$lang['@featureds table heading date_update'] = "Modifié" ;
+ $lang['@featureds table heading key'] = "Clef" ;
$lang['table heading action'] = "Action" ;
/* bouton */
@@ -35,6 +36,7 @@
$lang['@featureds tab specification'] = "Caractéristique" ;
$lang['@featureds entry title'] = "Titre" ;
+ $lang['@featureds text info featureds keys'] = "Clef unique" ;
$lang['@featureds text info type'] = "Choix du type" ;
$lang['@featureds text info featureds min'] = "Nombre minimum d'entrée" ;
$lang['@featureds text info featureds max'] = "Nombre maximum d'entrée" ;
Modified: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -28,10 +28,6 @@
*/
public static $list=array();
/**
- @var bool $dir_ok
- */
- public static $dir_ok;
- /**
@var current object
*/
public static $Info;
@@ -103,12 +99,19 @@
'class'=>'tcenter',
'default'=>true,
),
-
+ 'c.featured_uniqkey' => array(
+ 'sort'=>true,
+// 'alias'=>'key',
+ 'text'=>__('@featureds table heading key'),
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
'fd.featured_title' => array(
'sort'=>true,
'alias'=>'title',
'text'=>__('@featureds table heading title'),
'class'=>'tcenter',
+ 'width'=>'40%',
'default'=>true,
),
@@ -330,6 +333,7 @@
'type'=>tep_db_prepare_input($_POST['featureds_type']),
'min'=>tep_db_prepare_input($_POST['featureds_min']),
'max'=>tep_db_prepare_input($_POST['featureds_max']),
+ 'key'=>tep_db_prepare_input($_POST['featureds_key']),
);
foreach(tep_get_languages() as $row) {
@@ -347,9 +351,10 @@
if ($c_id > 0){
$myarray = array(
'id'=>$c_id,
- 'type'=>tep_db_prepare_input($_POST['featureds_type']),
+// 'new_type'=>tep_db_prepare_input($_POST['featureds_type']),
'min'=>tep_db_prepare_input($_POST['featureds_min']),
'max'=>tep_db_prepare_input($_POST['featureds_max']),
+// 'key'=>tep_db_prepare_input($_POST['featureds_key']),
);
foreach(tep_get_languages() as $row) {
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -1017,50 +1017,6 @@
$add_tbl='';
$cat= (tep_not_null(self::$DiversInfo['current_category_id']))?" and p2c.categories_id = '" . (int)self::$DiversInfo['current_category_id'] . "' " : "" ;
$avenir=(isset($_GET['expected']) && tep_not_null($_GET['expected'])) ? " and p.products_date_available IS NOT NULL " : " and p.products_date_available IS NULL ";
-
-// if(tep_not_null($sWhere)){
-// $sWhere=str_replace(array('products_id'),array('p.products_id'), $sWhere);
-// }
-//
-// $products_query = "select distinct p.products_id, p.products_image, p.products_type as typeID , p.products_model,pd.products_name, p.products_quantity, p.products_price, p.products_status from " . TABLE_PRODUCTS . " p LEFT JOIN ".TABLE_STATUS." s on(p.products_type = s.status_id and s.status_type='product' and s.language_id='" . (int)$languages_id . "') , " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON (p2c.categories_id = cd.categories_id AND cd.language_id = '" . (int)$languages_id . "') ".$add_tbl." where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id ".$cat." ".$avenir." ".$sta." ".$sWhere." order by ".((!empty($sOrder)) ? $sOrder : 'pd.products_name ASC');
-//
-// $query_numrows= tep_db_num_rows($DB->query($products_query));
-//
-// $products_split = new splitPageResults($page, $rowbyp, $products_query,$query_numrows);
-//
-// $pq=$DB->query($products_query);
-//
-// while ($products = tep_db_fetch_array($pq)) {
-
-// $products['products_name']='<a rel="'.tep_href_link('document.php', 'mod=img&typ=product&w=200&h=200&id='.$products['products_id']) .'" class="screenshot" href="#" title="">'.$products['products_name'].'</a>';
-// (!empty($products['products_image']))
-// ? tep_info_image($products['products_image'], $products['products_name'], TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT)
-// : tep_info_image(IMAGE_NONEXISTENT, $products['products_name'], TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT) ;
-// $products['products_status']=self::get_status_product($products);
-//
-//
-// $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_PRODUCTS_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 products_id='".$products['products_id']."' ");
-// $res=$objres->fetchAllAssoc();
-//
-// $products['categories_name']='';
-// foreach($res as $cat)
-// $products['categories_name'] .=$cat['categories_name'].',';
-//
-// if(strlen($products['categories_name'])>25)$products['categories_name']= substr($products['categories_name'],0 ,20).'...';
-//
-// self::$list[]=$products;
-// }
-//
-// $li=$res=array();
-// foreach(self::$list as $item){
-// foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(isset($item[$k]) && !empty($item[$k]))? $item[$k] : ' ';
-// $li[0]=$item['products_id'];
-// $li['action']=self::get_item_action($item);
-// $res[]=$li;
-// }
-//
-// if(count($res)===0) $res[]= self::emptyResult();
-// return $res;
}
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -113,8 +113,11 @@
$res['href']=tep_href_link(FILENAME_CONTENT,'content=' . $content['id']);
$res['key']=$content['name'];
$res['original']=$content['text'];
+ $res['chapo'] = self::parse_content($content['text'],$content['id'], true);
$res['images']=array();
+ unset($res['text']);
+
self::$array_data[$content['id']]=$tabl[$content['id']]=new objectInfo($res);
self::$array_data[$content['id']]->text=self::parse_content($res['text'],$content['id']);
self::add_cache($content['id']);
@@ -166,14 +169,21 @@
/**
Parse content texte
Fucntion qui permet de prendre en charge des element contenu dans la description du cms.
+ @param $content
+ @param $id
+ @param $more
*/
- private static function parse_content($content,$id){
+ private static function parse_content($content,$id, $more=false){
$pattern ="#<img (.+)[^>]/>#i";
self::extract_img($id,$content,$pattern);
$sortie=(isset(self::$opt['img']) && !_test_bool(self::$opt['img']))? preg_replace($pattern, '', $content) : $content;
- if(isset(self::$opt['more']) && _test_bool(self::$opt['more'])){
+
+ if(
+ $more == true
+ || isset(self::$opt['more']) && _test_bool(self::$opt['more'])
+ ){
if(strpos($sortie,'<!-- pagebreak -->') > 0)
$sortie = substr($sortie, 0, strpos($sortie,'<!-- pagebreak -->'));
}
Modified: trunk/catalog/includes/modules/featured.php
===================================================================
--- trunk/catalog/includes/modules/featured.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/includes/modules/featured.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -37,7 +37,7 @@
if( $page->the_var('featured_key') !='')
- $wh_feat .="AND featured_key='".(string)$page->the_var('featured_key')."' ";
+ $wh_feat .="AND featured_uniqkey='".(string)$page->the_var('featured_key')."' ";
@@ -72,8 +72,11 @@
$res = $page->oscss_modules->_resultsql('featured');
$p=array();
- if( $res->__get('numRows') <= 0) return null;
+ // exit if no result
+ if( $res == false || $res->__get('numRows') <= 0)
+ return null;
+
foreach($res->fetchAllAssoc() as $featured){
$title= $featured['featured_title'] ;
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-05-09 20:25:25 UTC (rev 4407)
@@ -16,7 +16,7 @@
CREATE TABLE IF NOT EXISTS osc_featured (
row_id int(11) NOT NULL AUTO_INCREMENT,
k_status_type int(11) NOT NULL,
- featured_key varchar(32) NOT NULL,
+ featured_uniqkey varchar(32) NOT NULL,
featured_min int(3) NOT NULL,
featured_max int(3) NOT NULL,
featured_status int(1) NOT NULL,
Modified: 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 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql 2012-05-09 20:25:25 UTC (rev 4407)
@@ -14,7 +14,7 @@
CREATE TABLE IF NOT EXISTS osc_featured (
row_id int(11) NOT NULL AUTO_INCREMENT,
k_status_type int(11) NOT NULL,
- featured_key varchar(32) NOT NULL,
+ featured_uniqkey varchar(32) NOT NULL,
featured_min int(3) NOT NULL,
featured_max int(3) NOT NULL,
featured_status int(1) NOT NULL,
Modified: trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php
===================================================================
--- trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/05/2012, 19:30
+ @date 12/11/11, 19:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -36,17 +36,20 @@
<?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 */ ?>
+ <?php elseif($ele->type =='content') : /** POSTS */ ?>
<li class="one content">
<section class="outerblock">
<div class="innerblock">
- <p class="title categorie">
- <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
+ <p class="title content">
+ <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
</p>
+ <div class="chapo content">
+ <?php echo $ele->chapo ?>
+ </div>
</div>
</section>
</li>
Modified: trunk/catalog/templates/defaut/cfg/init.php
===================================================================
--- trunk/catalog/templates/defaut/cfg/init.php 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/catalog/templates/defaut/cfg/init.php 2012-05-09 20:25:25 UTC (rev 4407)
@@ -98,8 +98,8 @@
$load->mode = 'home';
// force put key for load specific featured
-// $this->add_var_page('featured_key','home_slideshow');
-// $this->oscss_modules->_add('featured.php','slideshow',array('sort'=>60));
+ $this->add_var_page('featured_key','home_slideshow');
+ $this->oscss_modules->_add('featured.php','slideshow',array('sort'=>60));
$this->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center',array('sort'=>60));
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab 2012-05-09 07:46:20 UTC (rev 4406)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab 2012-05-09 20:25:25 UTC (rev 4407)
@@ -14,7 +14,7 @@
<h3><?php echo __('heading title edit'); ?></h3>
<div class="box_uniq block_form">
- <?php echo tep_draw_form('review', _DATATYPE_REPLACE_s::FILENAME, 'cID=' . (int)@$_GET['cID'] . '&action='.((_DATATYPE_REPLACE_s::$action=='new')?'insert': 'update'),'post'); ?>
+ <?php echo tep_draw_form('review', _DATATYPE_REPLACE_s::FILENAME, 'cID=' . (int)_DATATYPE_REPLACE_s::$Id . '&action='.((_DATATYPE_REPLACE_s::$action=='new')?'insert': 'update'),'post'); ?>
<div id="tabs">
<ul>
<li><a href="#tabs-1"><?php echo __('tab _DATATYPE_REPLACE_ data'); ?></a></li>
@@ -41,13 +41,13 @@
<fieldset id="fieldset_<?php echo $i ?>" class="block_field">
<p class="block_input">
<label for="<?php echo '_DATATYPE_REPLACE__title' . _DATATYPE_REPLACE_s::$languages[$i]['id']; ?>"><?php echo __('entry title'); ?></label>
- <?php echo tep_draw_input_field('_DATATYPE_REPLACE__title[' . _DATATYPE_REPLACE_s::$languages[$i]['id'] . ']', '_DATATYPE_REPLACE__title' . $i, _DATATYPE_REPLACE_s::$cInfo->title[ _DATATYPE_REPLACE_s::$languages[$i]['id']], 'size="70"', true) ; ?>
+ <?php echo tep_draw_input_field('_DATATYPE_REPLACE__title[' . _DATATYPE_REPLACE_s::$languages[$i]['id'] . ']', '_DATATYPE_REPLACE__title' . $i, _DATATYPE_REPLACE_s::$Info->title[ _DATATYPE_REPLACE_s::$languages[$i]['id']], 'size="70"', true) ; ?>
</p>
<p class="block_input" >
- <?php echo __('txt info permalink').tep_catalog_href_link('_DATATYPE_REPLACE_.php','_DATATYPE_REPLACE_=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id.'&language='._DATATYPE_REPLACE_s::$languages[$i]['code'] , 'NONSSL', false); ?>
+ <?php echo __('txt info permalink').tep_catalog_href_link('_DATATYPE_REPLACE_.php','_DATATYPE_REPLACE_=' . _DATATYPE_REPLACE_s::$Info->_DATATYPE_REPLACE__id.'&language='._DATATYPE_REPLACE_s::$languages[$i]['code'] , 'NONSSL', false); ?>
</p>
<br style="clear:both" />
- <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','_DATATYPE_REPLACE__description[' . _DATATYPE_REPLACE_s::$languages[$i]['id'] . ']','1000','800',_DATATYPE_REPLACE_s::$cInfo->description[_DATATYPE_REPLACE_s::$languages[$i]['id']]); ?>
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','_DATATYPE_REPLACE__description[' . _DATATYPE_REPLACE_s::$languages[$i]['id'] . ']','1000','800',_DATATYPE_REPLACE_s::$Info->description[_DATATYPE_REPLACE_s::$languages[$i]['id']]); ?>
</fieldset>
<?php } ?>
</div>
@@ -63,24 +63,24 @@
<dt class="block_input w_90 CategoryView">
<label>
<span class="text"><?php echo __('txt categories'); ?></span>
- <span class="button_nav"><?php echo '<a class="buttonimg fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=_DATATYPE_REPLACE_&action=new_light&origin='. urlencode(_DATATYPE_REPLACE_s::FILENAME.'?action=edit&cID='. (int)@$_GET['cID']) ) . '" title="'. __('add category datatype _DATATYPE_REPLACE_').'">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). '</a>'; ?> </span>
+ <span class="button_nav"><?php echo '<a class="buttonimg fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=_DATATYPE_REPLACE_&action=new_light&origin='. urlencode(_DATATYPE_REPLACE_s::FILENAME.'?action=edit&cID='. (int)@_DATATYPE_REPLACE_s::$Id) ) . '" title="'. __('add category datatype _DATATYPE_REPLACE_').'">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). '</a>'; ?> </span>
</label>
<ul id="cat_list_in_edit">
- <?php foreach(_DATATYPE_REPLACE_s::$cInfo->categories as $v){ $k=$v['categories_id'];
+ <?php foreach(_DATATYPE_REPLACE_s::$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'=>'_DATATYPE_REPLACE_'))/*get_cat_list(0)*/ as $v)
- if(!isset(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])){
- echo '<li class="'.(isset(_DATATYPE_REPLACE_s::$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(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
+ if(!isset(_DATATYPE_REPLACE_s::$Info->categories[$v['categories_id']])){
+ echo '<li class="'.(isset(_DATATYPE_REPLACE_s::$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(_DATATYPE_REPLACE_s::$Info->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
}
else
- echo '<li class="'.(isset(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. ' '.$v['categories_name'].'</li>';
+ echo '<li class="'.(isset(_DATATYPE_REPLACE_s::$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(_DATATYPE_REPLACE_s::FILENAME, 'cID=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id), IMAGE_CANCEL); ?>
+ <?php echo tep_js_back(tep_href_link(_DATATYPE_REPLACE_s::FILENAME, 'cID=' . _DATATYPE_REPLACE_s::$Info->_DATATYPE_REPLACE__id), IMAGE_CANCEL); ?>
</dt>
</dl>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-09 07:46:31
|
Revision: 4406
http://oscss.svn.sourceforge.net/oscss/?rev=4406&view=rev
Author: oscim
Date: 2012-05-09 07:46:20 +0000 (Wed, 09 May 2012)
Log Message:
-----------
nettoyage du code
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/configuration/modpayment.php
trunk/catalog/includes/modules/payment/moneyorder.php
Modified: trunk/catalog/admin/includes/modules/configuration/modpayment.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-05-09 06:18:00 UTC (rev 4405)
+++ trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-05-09 07:46:20 UTC (rev 4406)
@@ -136,8 +136,6 @@
// get current value
$current_public = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
$current_private = sqlconfiguration::fetch(array('key'=>$typeOri->key_BO), true);
-// print_r($current_public);
-// print_r($current_private);
// call
$type=modulesUtility::LoadModule('payment',$mod.'.php');
@@ -186,7 +184,7 @@
$ModCurr = $Mod->content;
- if(!is_object($ModCurr) || !$ModCurr->check() )
+ if(/* !is_object($ModCurr) ||*/ !$ModCurr->check() )
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#error-noloadmod'));
$i=0;
Modified: trunk/catalog/includes/modules/payment/moneyorder.php
===================================================================
--- trunk/catalog/includes/modules/payment/moneyorder.php 2012-05-09 06:18:00 UTC (rev 4405)
+++ trunk/catalog/includes/modules/payment/moneyorder.php 2012-05-09 07:46:20 UTC (rev 4406)
@@ -19,6 +19,8 @@
public $title;
public $description;
public $enabled;
+ public $sort_order;
+ public $icon;
public function __construct() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-09 06:18:06
|
Revision: 4405
http://oscss.svn.sourceforge.net/oscss/?rev=4405&view=rev
Author: oscim
Date: 2012-05-09 06:18:00 +0000 (Wed, 09 May 2012)
Log Message:
-----------
ajustement revision version
Modified Paths:
--------------
trunk/catalog/Documents/oscss.version.xml
Modified: trunk/catalog/Documents/oscss.version.xml
===================================================================
--- trunk/catalog/Documents/oscss.version.xml 2012-05-09 06:17:31 UTC (rev 4404)
+++ trunk/catalog/Documents/oscss.version.xml 2012-05-09 06:18:00 UTC (rev 4405)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<core>
<version>2.1.1 (beta)</version>
- <svn>4335</svn>
+ <svn>4405</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-05-09 06:17:38
|
Revision: 4404
http://oscss.svn.sourceforge.net/oscss/?rev=4404&view=rev
Author: oscim
Date: 2012-05-09 06:17:31 +0000 (Wed, 09 May 2012)
Log Message:
-----------
ajustement des menu du backoffice
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/04_tools.php
trunk/catalog/admin/includes/boxes/08_cms.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/08_cms.php
Modified: trunk/catalog/admin/includes/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/boxes/04_tools.php 2012-05-08 20:37:33 UTC (rev 4403)
+++ trunk/catalog/admin/includes/boxes/04_tools.php 2012-05-09 06:17:31 UTC (rev 4404)
@@ -13,6 +13,8 @@
$tabl_link[]= array(FILENAME_GOOGLE_SITEMAP, 'BOX_TOOLS_GOOGLE_SITEMAP', 'ggmap',@$img['ggmap']);
$tabl_link[]= array(FILENAME_FULL_TAG, 'BOX_TOOLS_HEADER_TAG', 'headertag',@$img['headertag']);
+ $tabl_link[]= array(FILENAME_NAVIGATION_LINKS, 'BOX_NAVIGATION_LINK', 'nav',@$img['navigation_link']);
+
// if(_cst_bool('USE_LOCAL_GENERAT_PDF'))
// $tabl_link[]= array(FILENAME_BATCH_PRINT, 'BOX_TOOLS_BATCH_CENTER', 'batch_print',@$img['batch_print']);
Modified: trunk/catalog/admin/includes/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-08 20:37:33 UTC (rev 4403)
+++ trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-09 06:17:31 UTC (rev 4404)
@@ -13,8 +13,8 @@
if( DataTypes::is_active('content'))
$tabl_link[]= array(FILENAME_CMS_CONTENT, 'BOX_CMS_CONTENT', 'cms_content',@$img['cms_content']);
- $tabl_link[]= array(FILENAME_NAVIGATION_LINKS, 'BOX_NAVIGATION_LINK', 'nav',@$img['navigation_link']);
+
$tabl_link[] = array(
'ss_menu',
'BOX_NAVIGATION_DOCSANDIMAGE',
@@ -28,4 +28,5 @@
if( DataTypes::is_active('featured'))
$tabl_link[]= array(FILENAME_FEATURED, 'BOX_CATALOG_FEATURED', 'featured', @$img['featured']);
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2012-05-08 20:37:33 UTC (rev 4403)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2012-05-09 06:17:31 UTC (rev 4404)
@@ -1,81 +1,82 @@
-<?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 02/03/2012, 17:06
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-
-// define('BOX_HEADING_LOCALIZATION',"Localisation" );
-// define('BOX_HEADING_CONF_BOX_SITEMONITOR_SETUP',"Sitemonitor" );
-// define('BOX_HEADING_CONF_BOX_SITEMONITOR',"Sitemonitor" );
-// define('BOX_HEADING_CONF_ATTRIBUTE_PRODUCT',"Options de produits" );
-// define('BOX_CONFIGURATION_MYSTORE',"Mon magasin" );
-// define('BOX_HEADING_CONF_DETAIL_CLIENTS',"Détails clients" );
-// define('BOX_HEADING_CONF_OPTION_MODULES',"Option des Modules" );
-// define('BOX_HEADING_CONF_OPTION_MODULES_PAY',"Vue modes paiements" );
-// define('BOX_HEADING_CONF_OPTION_MODULES_SHIP',"Vue modes livraisons " );
-// define('BOX_HEADING_CONF_OPTION_MODULES_TOT',"Vue modes paiements total" );
-// define('BOX_HEADING_CONF_CONFIGURATION COMMERCIALE',"Configuration catalogue" );
-// define('BOX_HEADING_CONF_BOX_CONFIGURATION_ABONNEMENT',"Option des Abonnements" );
-// define('BOX_HEADING_CONF_PARAMETERS',"Paramètres" );
-// define('BOX_HEADING_LOCATION_AND_TAXES', 'Lieux / Taxes');
-
-define('BOX_ZONE_AND_TAXE', 'Taxe / Zone');
- define('BOX_TAXES_COUNTRIES',"Régions et Pays" );
- define('BOX_TAXES_GEO_ZONES',"Zones fiscales/livraisons" );
- define('BOX_TAXES_TAX_CLASSES',"Classes et Taux fiscaux" );
-
-define('BOX_HEADING_CONF_CONFIGURATION',"Configuration" );
- define('BOX_HEADING_CONF_MY_BOUTIQUE',"Ma boutique" );
- define('BOX_HEADING_CONF_VALUE_MINI',"Unité" );
- define('BOX_LOCALIZATION_ORDERS_STATUS',"Gestion Status" );
-
-define('BOX_HEADING_CONF_ESPACE_ADMIN',"Backoffice" );
- define('BOX_HEADING_CONF_PRODUCT_ATTENTE',"Produits en attentes" );
- define('BOX_HEADING_CONF_RECOVER_CART_SALES',"Récupération de panier" );
- define('BOX_HEADING_CONF_QUICK_UPDATE',"Général" );
-
-define('BOX_HEADING_CONF_APPARENCE',"Apparence" );
- define('BOX_HEADING_CONF_APPARENCE_GENERAL',"Apparence générale" );
- define('BOX_HEADING_CONF_PAGE_PRODUCT_DETAIL',"Page produit" );
- define('BOX_HEADING_CONF_OPEN_BOX',"Gestion des boîtes" );
- define('BOX_CONFIGURATION_TEMPLATE',"Template" );
- define('BOX_HEADING_CONF_LIST_PRODUTCS',"Liste produits" );
- define('BOX_HEADING_CONF_IMAGES',"Images" );
-
-define('BOX_HEADING_CONF_CONFIG_AVANCE',"Configuration avancée" );
- define('BOX_HEADING_CONF_SEO_URL',"SEO URLs" );
- define('BOX_HEADING_CONF_SESSION',"Session" );
- define('BOX_HEADING_CONF_LOGGING',"Log" );
- define('BOX_HEADING_CONF_OPTION_MAIL',"Options de mail" );
- define('BOX_HEADING_CONF_COMPRESSION',"Compression GZip" );
- define('BOX_HEADING_CONF_BOX_CONFIGURATION_ENVIRONEMENT',"Environement" );
- define('BOX_LOCALIZATION_LANGUAGES',"Langues" );
- define('BOX_HEADING_CONF_VALUE_MAXI',"Valeurs Maximun" );
- define('BOX_HEADING_CONF_CG_CIP_MANAGER',"Installateur extensions" );
-
-define('BOX_HEADING_CONF_CONFIG_COMM',"Configuration commerciale" );
- define('BOX_HEADING_CONF_OPTION_CATALOG',"Options du catalogue" );
- define('BOX_HEADING_CONF_STOCK',"Stock" );
- define('BOX_HEADING_CONF_OPTION_PRODUCTS',"Option des produits" );
- define('BOX_HEADING_CONF_CONFIG_PRODUCTS',"Configuration des produits" );
- define('BOX_HEADING_CONF_DOWNLOADS',"Téléchargements" );
- define('BOX_HEADING_CONF_BOX_CONFIGURATION_PRODUCTS_EXTRA_FIELDS',"Produits extra" );
- define('BOX_HEADING_CONF_NEW_PRODUCTS',"Nouveaux produits" );
- define('BOX_HEADING_CONF_OPTION_CUSTOMERS',"Option des utilisateurs" );
- define('BOX_HEADING_CONF_BOX_CONFIGURATION_EXTRA_FIELDS',"Clients extra" );
- define('BOX_HEADING_CONF_MEMBRES_DETAIL',"Membre détail" );
- 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" );
+<?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 02/03/2012, 17:06
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+
+// define('BOX_HEADING_LOCALIZATION',"Localisation" );
+// define('BOX_HEADING_CONF_BOX_SITEMONITOR_SETUP',"Sitemonitor" );
+// define('BOX_HEADING_CONF_BOX_SITEMONITOR',"Sitemonitor" );
+// define('BOX_HEADING_CONF_ATTRIBUTE_PRODUCT',"Options de produits" );
+// define('BOX_CONFIGURATION_MYSTORE',"Mon magasin" );
+// define('BOX_HEADING_CONF_DETAIL_CLIENTS',"Détails clients" );
+// define('BOX_HEADING_CONF_OPTION_MODULES',"Option des Modules" );
+// define('BOX_HEADING_CONF_OPTION_MODULES_PAY',"Vue modes paiements" );
+// define('BOX_HEADING_CONF_OPTION_MODULES_SHIP',"Vue modes livraisons " );
+// define('BOX_HEADING_CONF_OPTION_MODULES_TOT',"Vue modes paiements total" );
+// define('BOX_HEADING_CONF_CONFIGURATION COMMERCIALE',"Configuration catalogue" );
+// define('BOX_HEADING_CONF_BOX_CONFIGURATION_ABONNEMENT',"Option des Abonnements" );
+// define('BOX_HEADING_CONF_PARAMETERS',"Paramètres" );
+// define('BOX_HEADING_LOCATION_AND_TAXES', 'Lieux / Taxes');
+
+define('BOX_ZONE_AND_TAXE', 'Taxe / Zone');
+ define('BOX_TAXES_COUNTRIES',"Régions et Pays" );
+ define('BOX_TAXES_GEO_ZONES',"Zones fiscales/livraisons" );
+ define('BOX_TAXES_TAX_CLASSES',"Classes et Taux fiscaux" );
+
+define('BOX_HEADING_CONF_CONFIGURATION',"Configuration" );
+ define('BOX_HEADING_CONF_MY_BOUTIQUE',"Ma boutique" );
+ define('BOX_HEADING_CONF_VALUE_MINI',"Unité" );
+ define('BOX_LOCALIZATION_ORDERS_STATUS',"Gestion Status" );
+
+define('BOX_HEADING_CONF_ESPACE_ADMIN',"Backoffice" );
+ define('BOX_HEADING_CONF_PRODUCT_ATTENTE',"Produits en attentes" );
+ define('BOX_HEADING_CONF_RECOVER_CART_SALES',"Récupération de panier" );
+ define('BOX_HEADING_CONF_QUICK_UPDATE',"Général" );
+
+define('BOX_HEADING_CONF_APPARENCE',"Apparence" );
+ define('BOX_HEADING_CONF_APPARENCE_GENERAL',"Apparence générale" );
+ define('BOX_HEADING_CONF_PAGE_PRODUCT_DETAIL',"Page produit" );
+ define('BOX_HEADING_CONF_OPEN_BOX',"Gestion des boîtes" );
+ define('BOX_CONFIGURATION_TEMPLATE',"Template" );
+ define('BOX_HEADING_CONF_LIST_PRODUTCS',"Liste produits" );
+ define('BOX_HEADING_CONF_IMAGES',"Images" );
+
+define('BOX_HEADING_CONF_CONFIG_AVANCE',"Configuration avancée" );
+ define('BOX_HEADING_CONF_SEO_URL',"SEO URLs" );
+ define('BOX_HEADING_CONF_SESSION',"Session" );
+ define('BOX_HEADING_CONF_LOGGING',"Log" );
+ define('BOX_HEADING_CONF_OPTION_MAIL',"Options de mail" );
+ define('BOX_HEADING_CONF_COMPRESSION',"Compression GZip" );
+ define('BOX_HEADING_CONF_BOX_CONFIGURATION_ENVIRONEMENT',"Environement" );
+ define('BOX_LOCALIZATION_LANGUAGES',"Langues" );
+ define('BOX_HEADING_CONF_VALUE_MAXI',"Valeurs Maximun" );
+ define('BOX_HEADING_CONF_CG_CIP_MANAGER',"Installateur extensions" );
+
+define('BOX_HEADING_CONF_CONFIG_COMM',"Configuration commerciale" );
+ define('BOX_HEADING_CONF_OPTION_CATALOG',"Options du catalogue" );
+ define('BOX_HEADING_CONF_STOCK',"Stock" );
+ define('BOX_HEADING_CONF_OPTION_PRODUCTS',"Option des produits" );
+ define('BOX_HEADING_CONF_CONFIG_PRODUCTS',"Configuration des produits" );
+ define('BOX_HEADING_CONF_DOWNLOADS',"Téléchargements" );
+ define('BOX_HEADING_CONF_BOX_CONFIGURATION_PRODUCTS_EXTRA_FIELDS',"Produits extra" );
+ define('BOX_HEADING_CONF_NEW_PRODUCTS',"Nouveaux produits" );
+ define('BOX_HEADING_CONF_OPTION_CUSTOMERS',"Option des utilisateurs" );
+ define('BOX_HEADING_CONF_BOX_CONFIGURATION_EXTRA_FIELDS',"Clients extra" );
+ define('BOX_HEADING_CONF_MEMBRES_DETAIL',"Membre détail" );
+ 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" );
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-05-08 20:37:33 UTC (rev 4403)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-05-09 06:17:31 UTC (rev 4404)
@@ -38,7 +38,5 @@
define('BOX_TOOLS_CRONJOB',"Tache(s) programmée(s)" );
-/* Begin MANAGELOG_stable - installed by CIP */
-define('BOX_TOOLS_MANAGELOG', 'Fichier de Logs');
-/* End MANAGELOG_stable - installed by CIP */
+define('BOX_NAVIGATION_LINK',"Gestion du Menu" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/08_cms.php 2012-05-08 20:37:33 UTC (rev 4403)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/08_cms.php 2012-05-09 06:17:31 UTC (rev 4404)
@@ -12,9 +12,10 @@
define('BOX_CATALOG_CATEGORIES',"Catégories" );
define('BOX_HEADING_CONF_CMS',"Contenu" );
define('BOX_CMS_CONTENT',"Gestion des pages" );
-define('BOX_NAVIGATION_LINK',"Gestion du Menu" );
+
define('BOX_NAVIGATION_DOCSANDIMAGE',"Images et Fichiers" );
define('BOX_NAVIGATION_IMAGE',"Gestion des images" );
define('BOX_NAVIGATION_DOCSFILES',"Gestion des docs" );
+
?>
\ 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-05-08 20:37:39
|
Revision: 4403
http://oscss.svn.sourceforge.net/oscss/?rev=4403&view=rev
Author: oscim
Date: 2012-05-08 20:37:33 +0000 (Tue, 08 May 2012)
Log Message:
-----------
ajustement css
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2012-05-08 20:28:36 UTC (rev 4402)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2012-05-08 20:37:33 UTC (rev 4403)
@@ -50,8 +50,8 @@
width: inherit;
}
- #intro .intro.content {padding: 12px;color:#fff;-webkit-border-radius: 5px; -webkit-border-radius: 5px;height:190px;}
- #intro .intro.content div{padding: 12px;font-size: 0.9em; font-weight:bold; width:750px;}
+ #intro .intro.content {padding: 0;color:#fff;-webkit-border-radius: 5px; -webkit-border-radius: 5px;height:220px;}
+ #intro .intro.content div{padding: 12px;font-size: 0.9em; font-weight:bold; width:936px;}
nl#breadcrumbs {
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2012-05-08 20:28:36 UTC (rev 4402)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2012-05-08 20:37:33 UTC (rev 4403)
@@ -390,4 +390,21 @@
li.currentCheckoutBar a,
li.currentCheckoutBar span{color:#b3e050;}
-/* li.end.currentCheckoutBar {/*background:url("images/progress_end_full.gif") no-repeat scroll right 2px transparent;*/ width:139px;} */
\ No newline at end of file
+/* li.end.currentCheckoutBar {background:url("images/progress_end_full.gif") no-repeat scroll right 2px transparent; width:139px;} */
+
+
+#Page_sitemap aside {display:none}
+#Page_sitemap #content{width:100%}
+
+#Page_home #slider li,
+#Page_home #slider2 li {
+ height: 180px;
+ overflow: hidden;
+ width: 936px;
+ margin:0 0;
+}
+
+
+#Page_home .module section.outerblock{ width:100%; border-radius: 0 0 0 0;}
+
+ol#controls li a {color:white;}
\ 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-05-08 20:28:44
|
Revision: 4402
http://oscss.svn.sourceforge.net/oscss/?rev=4402&view=rev
Author: oscim
Date: 2012-05-08 20:28:36 +0000 (Tue, 08 May 2012)
Log Message:
-----------
report element featured dans le theme
Fix FS#936
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/newsletters/new_products.php
trunk/catalog/admin/includes/modules/newsletters/newsletter.php
trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql
trunk/catalog/templates/defaut/Childs_tpl/ssheader.php
trunk/catalog/templates/defaut/cfg/init.php
Added Paths:
-----------
trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php
Modified: trunk/catalog/admin/includes/modules/newsletters/new_products.php
===================================================================
--- trunk/catalog/admin/includes/modules/newsletters/new_products.php 2012-05-08 20:10:16 UTC (rev 4401)
+++ trunk/catalog/admin/includes/modules/newsletters/new_products.php 2012-05-08 20:28:36 UTC (rev 4402)
@@ -138,12 +138,12 @@
$formail=substr($formail,0,-1);
- $mail_query = $DB->query($sql="select s.customers_id as id, s.customers_firstname as firstname, s.customers_lastname as lastname , s.customers_email_address as email , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_id=customers_info_id and s.customers_newsletter = '1' AND s.customers_id=customers_info_id and s.customers_email_address IN (".$formail.") ");
+ $mail_query = $DB->query($sql="select s.customers_id as id,customers_gender as gender, s.customers_firstname as firstname, s.customers_lastname as lastname , s.customers_email_address as email , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_id=customers_info_id and s.customers_newsletter = '1' AND s.customers_id=customers_info_id and s.customers_email_address IN (".$formail.") ");
}
/// mode normal , send
else
- $mail_query = $DB->query($sql="select s.customers_id as id, s.customers_firstname as firstname, s.customers_lastname as lastname, s.customers_email_address as email , s.customers_email_address , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_newsletter = '1' AND s.customers_id=customers_info_id and NOT EXISTS(SELECT * FROM ".TABLE_NEWSLETTERS_SENT." ns WHERE ns.customers_id=s.customers_id AND ns.newsletters_id='" . $newsletter_id ."' and module_type='".__CLASS__."') LIMIT ".$max);
+ $mail_query = $DB->query($sql="select s.customers_id as id,customers_gender as gender, s.customers_firstname as firstname, s.customers_lastname as lastname, s.customers_email_address as email , s.customers_email_address , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_newsletter = '1' AND s.customers_id=customers_info_id and NOT EXISTS(SELECT * FROM ".TABLE_NEWSLETTERS_SENT." ns WHERE ns.customers_id=s.customers_id AND ns.newsletters_id='" . $newsletter_id ."' and module_type='".__CLASS__."') LIMIT ".$max);
if($mail_query->__get('numRows')) {
Modified: trunk/catalog/admin/includes/modules/newsletters/newsletter.php
===================================================================
--- trunk/catalog/admin/includes/modules/newsletters/newsletter.php 2012-05-08 20:10:16 UTC (rev 4401)
+++ trunk/catalog/admin/includes/modules/newsletters/newsletter.php 2012-05-08 20:28:36 UTC (rev 4402)
@@ -91,12 +91,12 @@
$formail=substr($formail,0,-1);
- $mail_query = $DB->query($sql="select s.customers_id as id, s.customers_firstname as firstname, s.customers_lastname as lastname , s.customers_email_address as email , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_id=customers_info_id AND s.customers_id=customers_info_id and s.customers_email_address IN (".$formail.") ");
+ $mail_query = $DB->query($sql="select s.customers_id as id,customers_gender as gender, s.customers_firstname as firstname, s.customers_lastname as lastname , s.customers_email_address as email , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_id=customers_info_id AND s.customers_id=customers_info_id and s.customers_email_address IN (".$formail.") ");
}
/// mode normal , send
else
- $mail_query = $DB->query($sql="select s.customers_id as id, s.customers_firstname as firstname, s.customers_lastname as lastname, s.customers_email_address as email , s.customers_email_address , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_newsletter = '1' AND s.customers_id=customers_info_id and NOT EXISTS(SELECT * FROM ".TABLE_NEWSLETTERS_SENT." ns WHERE ns.customers_id=s.customers_id AND ns.newsletters_id='" . $newsletter_id ."' and module_type='".__CLASS__."') LIMIT ".$max);
+ $mail_query = $DB->query($sql="select s.customers_id as id,customers_gender as gender, s.customers_firstname as firstname, s.customers_lastname as lastname, s.customers_email_address as email , s.customers_email_address , ci.customers_info_date_account_created as created, ci.customers_info_date_of_last_logon, customers_shopping_points as points from " . TABLE_CUSTOMERS . " s ," . TABLE_CUSTOMERS_INFO. " ci where s.customers_newsletter = '1' AND s.customers_id=customers_info_id and NOT EXISTS(SELECT * FROM ".TABLE_NEWSLETTERS_SENT." ns WHERE ns.customers_id=s.customers_id AND ns.newsletters_id='" . $newsletter_id ."' and module_type='".__CLASS__."') LIMIT ".$max);
if($mail_query->__get('numRows')) {
while ($mail = $mail_query->fetchAssoc()) {
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-05-08 20:10:16 UTC (rev 4401)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured.sql 2012-05-08 20:28:36 UTC (rev 4402)
@@ -16,6 +16,7 @@
CREATE TABLE IF NOT EXISTS osc_featured (
row_id int(11) NOT NULL AUTO_INCREMENT,
k_status_type int(11) NOT NULL,
+ featured_key varchar(32) NOT NULL,
featured_min int(3) NOT NULL,
featured_max int(3) NOT NULL,
featured_status int(1) NOT NULL,
@@ -23,5 +24,6 @@
user_added int(11) NOT NULL,
date_update datetime NOT NULL,
user_update int(11) NOT NULL,
- PRIMARY KEY (row_id)
+ PRIMARY KEY (row_id),
+ UNIQUE KEY featured_key (featured_key)
);
Modified: 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 2012-05-08 20:10:16 UTC (rev 4401)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured.sql 2012-05-08 20:28:36 UTC (rev 4402)
@@ -11,11 +11,10 @@
--| 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_key varchar(32) NOT NULL,
featured_min int(3) NOT NULL,
featured_max int(3) NOT NULL,
featured_status int(1) NOT NULL,
@@ -23,5 +22,6 @@
user_added int(11) NOT NULL,
date_update datetime NOT NULL,
user_update int(11) NOT NULL,
- PRIMARY KEY (row_id)
-);
+ PRIMARY KEY (row_id),
+ UNIQUE KEY featured_key (featured_key)
+);
\ No newline at end of file
Added: trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php
===================================================================
--- trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php (rev 0)
+++ trunk/catalog/templates/defaut/Childs_tpl/module.slideshow.php 2012-05-08 20:28:36 UTC (rev 4402)
@@ -0,0 +1,83 @@
+<?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 08/05/2012, 19:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $load, $themodule;
+?>
+
+<div id="slider" class="module">
+
+ <ul>
+
+ <?php foreach($themodule->module_db->content as $ele): ?>
+
+ <?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 } ?>
+
+ <?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 } ?>
+
+ <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 */ ?>
+ <li class="one content">
+ <section class="outerblock">
+ <div class="innerblock">
+ <p class="title categorie">
+ <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
+ </p>
+ </div>
+ </section>
+ </li>
+ <?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>
+ </li>
+
+ <?php else : /** Other */ ?>
+
+
+ <li class="one other">
+ <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>
+ </li>
+ <?php endif; ?>
+
+ <?php endforeach; ?>
+
+ </ul>
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/Childs_tpl/ssheader.php
===================================================================
--- trunk/catalog/templates/defaut/Childs_tpl/ssheader.php 2012-05-08 20:10:16 UTC (rev 4401)
+++ trunk/catalog/templates/defaut/Childs_tpl/ssheader.php 2012-05-08 20:28:36 UTC (rev 4402)
@@ -63,27 +63,35 @@
<nav>
<ul class="menu content">
- <li><a href="<?php echo tep_href_link() ?>" class="nav1"><?php echo __('home') ?></a></li>
+ <li><a href="<?php echo tep_href_link() ?>" class="nav1"><?php echo __('@template text link home') ?></a></li>
<li><a href="<?php echo tep_href_link(FILENAME_SMALL_PRICE) ?>" class="nav2"><?php echo PAGE_SMALL_PRICE ?></a></li>
<li>
<?php if(defined('FILENAME_WISHLIST')) : ?>
- <a href="<?php echo tep_href_link(FILENAME_WISHLIST) ?>" class="nav3"><?php echo __('wishlist') ?></a></li>
+ <a href="<?php echo tep_href_link(FILENAME_WISHLIST) ?>" class="nav3"><?php echo __('@template text link wishlist') ?></a></li>
<?php else : ?>
<a href="<?php echo tep_href_link(FILENAME_SPECIALS) ?>" class="nav3"><?php echo PAGE_SPECIALS ?></a></li>
<?php endif; ?>
<li><a id="GoLogin" href="<?php echo tep_href_link(FILENAME_ACCOUNT) ?>" class="nav4"><?php echo PAGE_ACCOUNT ?></a></li>
- <li><a href="<?php echo tep_href_link(FILENAME_CONTENT, 'content=1') ?>" class="nav5"><?php echo __('shipping') ?> </a></li>
+ <li><a href="<?php echo tep_href_link(FILENAME_CONTENT, 'content=1') ?>" class="nav5"><?php echo __('@template text link shipping') ?> </a></li>
<li><a href="<?php echo tep_href_link(FILENAME_CONTACT_US) ?>" class="nav6"><?php echo BOX_INFORMATION_CONTACT ?></a></li>
-<!-- <li class="currencies">
- <?php //$boxe =$page->oscss_boxes->_return('currencies'); ?>
- <?php //include('boxe.php'); ?>
- </li>-->
+ <li class="currencies">
+ <?php $boxe =$page->oscss_boxes->_return('currencies'); ?>
+ <?php include('boxe.php'); ?>
+ </li>
</ul>
</nav>
<?php if($load->mode =='home') : ?>
<section id="intro">
<div class="intro content">
+
+ <?php /**
+ @brief Call featured for slideshow
+ */
+/* global $themodule;
+ $themodule=templ_draw_list('type=modules&pile=slideshow');
+ include('module.slideshow.php'); */ ?>
+
<?php
/**
@remarks Call generic moduel cat_home for slider
Modified: trunk/catalog/templates/defaut/cfg/init.php
===================================================================
--- trunk/catalog/templates/defaut/cfg/init.php 2012-05-08 20:10:16 UTC (rev 4401)
+++ trunk/catalog/templates/defaut/cfg/init.php 2012-05-08 20:28:36 UTC (rev 4402)
@@ -97,6 +97,11 @@
$load->mode = 'home';
+ // force put key for load specific featured
+// $this->add_var_page('featured_key','home_slideshow');
+// $this->oscss_modules->_add('featured.php','slideshow',array('sort'=>60));
+
+
$this->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center',array('sort'=>60));
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-08 20:10:24
|
Revision: 4401
http://oscss.svn.sourceforge.net/oscss/?rev=4401&view=rev
Author: oscim
Date: 2012-05-08 20:10:16 +0000 (Tue, 08 May 2012)
Log Message:
-----------
correction du plugin de slider
suite travail de developpement du module featured, report des element manquant et mise a niveau de l'install
correction coquille dans la section dev
nettoyage du code
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/08_cms.php
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/classes/fileUtility.php
trunk/catalog/admin/includes/gabarit/featureds/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/admin/includes/modules/pages/mail.php
trunk/catalog/common/classes/datatype_drivers/Data_featured.php
trunk/catalog/common/classes/formUtility.php
trunk/catalog/includes/modules/featured.php
trunk/catalog/install/includes/language/fr_FR/osc_status.txt
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php
trunk/catalog/templates/defaut/includes/plugins/generic/slider/includes_header.php
trunk/dev/GenerCode/Dicos/Modele/catalog/admin/includes/modules/pages/_REPLDICO_.php
trunk/dev/GenerCode/datatype/Modele/install.xml
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql
Modified: trunk/catalog/admin/includes/boxes/08_cms.php
===================================================================
--- trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/boxes/08_cms.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -26,4 +26,6 @@
)
);
+ if( DataTypes::is_active('featured'))
+ $tabl_link[]= array(FILENAME_FEATURED, 'BOX_CATALOG_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-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -52,11 +52,27 @@
$res=tep_db_perform(TABLE_FEATURED, $sql_data_array);
+ $id = $res->__get('insertId');
+
+ foreach(tep_get_languages() as $lg) {
+
+ $row = $option['langue'];
+
+ $sql_data_array_lg = array(
+ 'featured_id'=>(int)$id,
+ 'languages_id'=>(int)$lg['id'],
+ 'featured_title'=> ((isset($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ),
+ );
+ $res=tep_db_perform(TABLE_FEATURED_DESCRIPTION, $sql_data_array_lg);
+ }
+
+
+
if(!$res)
return $res;
else
- return $res->__get('insertId');
+ return $id;
}
/**
@@ -69,7 +85,11 @@
return 'id';
$where ='';
- if(isset($option['id'])) $where .="AND row_id = '".(int)$option['id']."' ";
+ $where_lg ='';
+ if(isset($option['id'])){
+ $where_lg .= "AND featured_id = '".(int)$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']."' ";
@@ -83,6 +103,21 @@
$res=tep_db_perform(TABLE_FEATURED, $sql_data_array, 'update' , substr($where,3) );
+
+
+ foreach(tep_get_languages() as $lg) {
+
+ $row = $option['langue'];
+
+ $where_lg .= "AND languages_id = '".(int)$lg['id']."' ";
+
+ $sql_data_array_lg = array(
+ 'featured_title'=> ((isset($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ),
+ );
+
+ $res=tep_db_perform(TABLE_FEATURED_DESCRIPTION, $sql_data_array_lg, 'update' , substr($where_lg,3));
+ }
+
return $res;
}
@@ -130,15 +165,36 @@
if($num == 1){
$result=$res->fetchAssoc();
-// print_r(self::CleanKey($result));
+
+
+ // call all langue for this post
+
+ foreach(tep_get_languages() as $lg){
+
+ $_query = $DB->query("select fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' AND languages_id='" . $lg['id'] . "'");
+ $descr = $_query->fetchAssoc();
+
+ $result['lg'][$lg['id']] = ((!$shortkey)? $descr : self::CleanKey($descr));
+
+ tep_db_free_result($_query);
+ }
+
+
return ((!$shortkey)? $result : self::CleanKey($result));
}
elseif($num > 1){
$array=array();
+ global $languages_id;
+ foreach($res->fetchAllAssoc() as $result){
- foreach($res->fetchAllAssoc() as $result)
+ $_query = $DB->query("select fd.featured_title from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' AND languages_id='" . $languages_id . "'");
+ $descr= $_query->fetchAssoc();
+
+ $result['lg'][$languages_id] =((!$shortkey)? $descr : self::CleanKey($descr));
+// var_dump($result);
+
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
-
+ }
return $array;
}
@@ -209,7 +265,7 @@
}
/**
- @brief Function link to for contruct link featued vs datatype
+ @brief Function link to for contruct link featured vs datatype
@note normlised methode used in childs datatype
*/
public static function ListLinkTo($opt){
Modified: trunk/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/fileUtility.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/classes/fileUtility.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -183,11 +183,11 @@
if (is_dir($path) && $path!='/') {
self::_chmod(dirname($path));
- if(!chmod($path, (int)$mod))
+ if(!@chmod($path, (int)$mod))
return false;
}
elseif(file_exists($path) && $path!='/') {
- if(!chmod($path, (int)$mod))
+ if(!@chmod($path, (int)$mod))
return false;
}
return true;
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.delete.gab 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.delete.gab 2012-05-08 20:10:16 UTC (rev 4401)
@@ -9,21 +9,21 @@
@encode UTF-8
*/
?>
-<h3><?php echo __('heading title delete featured'); ?></h3>
+<h3><?php echo __('@featureds heading title delete featured'); ?></h3>
<div class="box_uniq block_form">
- <?php echo tep_draw_form('zone', featured::FILENAME, 'action=delete_confirm', 'post') ?>
+ <?php echo tep_draw_form('zone', featureds::FILENAME, 'action=delete_confirm', 'post') ?>
<p class="block_input button_nav">
<?php
- echo tep_draw_hidden_field('cID', '', featured::$Id);
+ echo tep_draw_hidden_field('cID', '', featureds::$Id);
echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
- echo tep_js_back(tep_href_link(featured::FILENAME), IMAGE_CANCEL) ;
+ echo tep_js_back(tep_href_link(featureds::FILENAME), IMAGE_CANCEL) ;
?>
</p>
</form>
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-08 20:10:16 UTC (rev 4401)
@@ -14,8 +14,8 @@
<h3><?php echo __('heading title edit'); ?></h3>
<div class="box_uniq block_form">
+<?php echo tep_draw_form('featureds', featureds::FILENAME, 'action='.((featureds::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
-
<div id="tabs">
<ul>
<li><a href="#tabs-1"><?php echo __('@featureds tab specification'); ?></a></li>
@@ -24,10 +24,31 @@
<div id="tabs-1" class="tabPage">
- <?php echo tep_draw_form('featureds', featureds::FILENAME, 'action='.((featureds::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
+ <div class="tabs_lang">
+ <ul>
+ <?php foreach(tep_get_languages() as $lg): ?>
+ <li>
+ <a href="#fieldset_<?php echo $lg['id'] ?>">
+ <?php echo tep_language_image($lg['directory'] . '/images/' .$lg['image'], $lg['name']); ?>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ <?php foreach(tep_get_languages() as $lg): ?>
+ <fieldset id="fieldset_<?php echo $lg['id'] ?>" class="block_field">
+ <p class="block_input">
+ <label for="<?php echo 'title' . $lg['id']; ?>"><?php echo __('@featureds entry title'); ?></label>
+ <?php echo tep_draw_input_field('title[' . $lg['id'] . ']', 'title_' . $lg['id'], featureds::$Info->lg[ $lg['id']]->title, 'size="70"', true) ; ?>
+ </p>
+ </fieldset>
+ <?php endforeach; ?>
+ </div>
+
+
+
<p class="block_input">
<label ><?php echo __('@featureds text info type'); ?></label>
- <?php echo tep_draw_pull_down_menu('featureds_type', tep_get_status_array('featureds',0,'status_name'),featureds::$Info->type); ?>
+ <?php echo tep_draw_pull_down_menu('featureds_type', tep_get_status_array('featured',0,'status_name'),featureds::$Info->type); ?>
</p>
<p class="block_input">
@@ -52,12 +73,12 @@
echo tep_js_back(tep_href_link(featureds::FILENAME), IMAGE_CANCEL) ;
?>
</p>
- </form>
+
</div>
<br class="clear" />
</div>
-
+</form>
</div>
Modified: trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab 2012-05-08 20:10:16 UTC (rev 4401)
@@ -34,11 +34,11 @@
</span>
</label>
<ul class="LinkToView">
- <?php foreach($list as $v): /*print_r($v); exit;*/?>
+ <?php foreach($list as $v): ?>
<?php if(!isset($curr::$Info->id[$v->id])): ?>
<li class="<?php echo (isset($curr::$Info->categories[$v->id])? 'selected' : 'noselected') ?>">
- <?php echo tep_draw_checkbox_field('linkto[featured]['.$v->id.']','linkto_featured_'.$v->id, $v->id, (isset($curr::$Info->featureds[$v->id])?true : false) ).' '. status_name('featured', $v->type ,$languages_id); ?>
+ <?php echo tep_draw_checkbox_field('linkto[featured]['.$v->id.']','linkto_featured_'.$v->id, $v->id, (isset($curr::$Info->featureds[$v->id])?true : false) ).' ['.status_name('featured', $v->type ,$languages_id).'] - '. $v->lg[$languages_id]->title ; ?>
</li>
<?php else: ?>
<li class="<?php echo (isset($curr::$Info->categories[$v->id])? 'selected' : 'noselected') ?>">
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-08 20:10:16 UTC (rev 4401)
@@ -17,6 +17,7 @@
$lang['@featureds table heading datatype id'] = "Id." ;
$lang['@featureds table heading min'] = "Min." ;
$lang['@featureds table heading max'] = "Max." ;
+ $lang['@featureds table heading title'] = "Titre" ;
$lang['@featureds table heading status'] = "Etat" ;
$lang['@featureds table heading status type name'] = "Type" ;
$lang['@featureds table heading status type id'] = "Type id" ;
@@ -32,12 +33,17 @@
/* Edit / add */
$lang['@featureds tab specification'] = "Caractéristique" ;
+
+ $lang['@featureds entry title'] = "Titre" ;
$lang['@featureds text info type'] = "Choix du type" ;
$lang['@featureds text info featureds min'] = "Nombre minimum d'entrée" ;
$lang['@featureds text info featureds max'] = "Nombre maximum d'entrée" ;
// $lang['table heading datatype'] = "Données" ;
+/* delete */
+ $lang['@featureds heading title delete featured'] = "Supprimer cette mise en avant ?" ;
+
/* rightto */
$lang['@featureds txt link to'] = "Mise en avant" ;
?>
Modified: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -103,6 +103,15 @@
'class'=>'tcenter',
'default'=>true,
),
+
+ 'fd.featured_title' => array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('@featureds table heading title'),
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+
'c.k_status_type' => array(
'sort'=>true,
'alias'=>'type',
@@ -118,6 +127,7 @@
'class'=>'tcenter',
'default'=>true,
),
+
'c.featured_min' => array(
'sort'=>true,
'alias'=>'min',
@@ -317,11 +327,15 @@
case 'insert':
$myarray = array(
- 'type'=>tep_db_prepare_input($_POST['featured_type']),
- 'min'=>tep_db_prepare_input($_POST['featured_min']),
- 'max'=>tep_db_prepare_input($_POST['featured_max']),
+ 'type'=>tep_db_prepare_input($_POST['featureds_type']),
+ 'min'=>tep_db_prepare_input($_POST['featureds_min']),
+ 'max'=>tep_db_prepare_input($_POST['featureds_max']),
);
+ foreach(tep_get_languages() as $row) {
+ $myarray['langue']['title'][$row['id']] = tep_db_prepare_input($_POST['title'][$row['id']]);
+ }
+
$res = sqlfeatured::create($myarray);
tep_redirect(tep_href_link(self::FILENAME ));
@@ -333,12 +347,17 @@
if ($c_id > 0){
$myarray = array(
'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']),
+ 'type'=>tep_db_prepare_input($_POST['featureds_type']),
+ 'min'=>tep_db_prepare_input($_POST['featureds_min']),
+ 'max'=>tep_db_prepare_input($_POST['featureds_max']),
);
- sqlfeatured::update($myarray);
+ foreach(tep_get_languages() as $row) {
+ $myarray['langue']['title'][$row['id']] = tep_db_prepare_input($_POST['title'][$row['id']]);
+ }
+
+
+ $res =sqlfeatured::update($myarray);
}
tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . $c_id ));
@@ -398,6 +417,7 @@
$query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
+ " LEFT JOIN ".TABLE_FEATURED_DESCRIPTION. " fd ON(fd.featured_id = c.row_id AND fd.languages_id = '".$adjust->languages_id."' ) ".
" LEFT JOIN ".TABLE_STATUS." s ON(status_id = k_status_type AND s.language_id = '".$adjust->languages_id."' AND status_type='".self::$datatype."') " .
((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' row_id ASC ');
@@ -440,7 +460,7 @@
break;
case 'delete':
self::load_db_values(self::$Id);
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
case 'listing':
default:
Modified: trunk/catalog/admin/includes/modules/pages/mail.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/mail.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/admin/includes/modules/pages/mail.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -149,8 +149,6 @@
$res = $query->fetchAssoc();
-// exit;
-
self::$list->from = (tep_cst_define('EMAIL_FROM') ? EMAIL_FROM : STORE_OWNER_EMAIL_ADDRESS );
self::$list->subject =__('@mail reload manually');
self::$list->content = $res['notif_text'];
Modified: trunk/catalog/common/classes/datatype_drivers/Data_featured.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_featured.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/common/classes/datatype_drivers/Data_featured.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -39,6 +39,7 @@
*/
public $db_tables = array(
'TABLE_FEATURED' => 'featured', //
+ 'TABLE_FEATURED_DESCRIPTION' => 'featured_description', //
'TABLE_FEATURED_DATA' => 'featured_data' //
);
Modified: trunk/catalog/common/classes/formUtility.php
===================================================================
--- trunk/catalog/common/classes/formUtility.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/common/classes/formUtility.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -187,9 +187,9 @@
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
if(isset($values[$i])){
- $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
- if ($default == $values[$i]['id']) $field .= ' selected="selected"';
- $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
+ $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
+ if ($default == $values[$i]['id']) $field .= ' selected="selected"';
+ $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
}
$field .= '</select>';
Modified: trunk/catalog/includes/modules/featured.php
===================================================================
--- trunk/catalog/includes/modules/featured.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/includes/modules/featured.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -4,13 +4,19 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/11/12, 08:18
+ @date 09/05/2012, 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
+
+
+ @example CallSpecififcfeatruedbykey
+
+ in file init.php precise
+ $this->add_var_page('featured_key','home_slideshow');
*/
/**
@@ -20,25 +26,29 @@
@return bool false or ressource db
*/
function sql_featured(){
-// global $featured_category_id;
//! @remarks depend Data_annonce active
- if( ! DataTypes::is_active('annonce'))
+ if( ! DataTypes::is_active('featured'))
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";
+ if( $page->the_var('featured_key') !='')
+ $wh_feat .="AND featured_key='".(string)$page->the_var('featured_key')."' ";
+
+ // type simple
+ $sql = "SELECT fda.datatype_id as id, datatype , featured_title FROM ".TABLE_FEATURED_DATA." fda ".
+ " LEFT JOIN ". TABLE_FEATURED_DESCRIPTION." fd ON(fd.featured_id = fda.featured_id AND languages_id = '".$languages_id."' ) ".
+ " LEFT JOIN ". TABLE_FEATURED." f ON(fda.featured_id = f.row_id ) ".
+ " WHERE k_status_type = '1' ".$wh_feat.
+ " ";
+
+
$featured_query = $DB->query($sql);
@@ -58,21 +68,25 @@
$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');
+
+ $res = $page->oscss_modules->_resultsql('featured');
+
$p=array();
- if( ($res=$page->oscss_modules->_resultsql('featured')) ==false ) return null;
- while ($featured = $res->fetchAssoc()){
+ if( $res->__get('numRows') <= 0) return null;
+ foreach($res->fetchAllAssoc() as $featured){
+
+ $title= $featured['featured_title'] ;
+
$dt = $featured['datatype'];
- $pd = $dt::get_item($featured['datatype_id']);
- $pd->aca=$aca_listing->return_db_min($featured['products_id']);
+
+ $pd = $dt::get_item($featured['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 ));
+ return new objectInfo(array('title'=>$title, 'content'=>$p , 'type'=>$dt ));
}
Modified: trunk/catalog/install/includes/language/fr_FR/osc_status.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2012-05-08 20:10:16 UTC (rev 4401)
@@ -60,6 +60,6 @@
$lg['OSC_ATTRIBUTE_OPTIONTYPE_CHECKBOX']="Checkbox" ;
/* featrued*/
-$lg['OSC_FEATURED_SELECTION']="Notre selection" ;
-$lg['OSC_FEATURED_UNE']="A la une" ;
+$lg['OSC_FEATURED_SELECTION']="Complexe" ;
+$lg['OSC_FEATURED_UNE']="Simple" ;
?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-08 20:10:16 UTC (rev 4401)
@@ -12,51 +12,6 @@
--+######################################################################--+
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'orders', 1, 'OSC_ORDERS_STATUS_CANCELED', '#666');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING', '#FF1A00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (11, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING_MONEY_ORDER', '#3393D9');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED', '#3393D9');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (21, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED_MONEY_ORDER', '#3393D9');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#66FF00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'orders', 1, 'OSC_ORDERS_STATUS_EXPEDIED', '#66FF00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (6, 'orders', 1, 'OSC_ORDERS_STATUS_CLOSED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name ) VALUES (1, 'task', 1, 'task');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'returns', 1, 'OSC_RETURNS_STATUS_PENDING','#FF1A00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'returns',1, 'OSC_RETURNS_STATUS_AWAITING_RETURN', '#3393D9');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'returns',1, 'OSC_RETURNS_STATUS_CANCELLED', '#66FF00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'returns',1, 'OSC_RETURNS_STATUS_COMPLETE', '#666');
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'return_reasons', 1, 'OSC_RETURN_REASONS_FAULTY','#FF1A00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'return_reasons',1, 'OSC_RETURN_REASONS_DAMAGED', '#3393D9');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'return_reasons',1, 'OSC_RETURN_REASONS_INCORRECT_ITEM', '#66FF00');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'return_reasons',1, 'OSC_RETURN_REASONS_WARRANTY', '#666');
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'refund_method', 1, 'OSC_REFUND_METHOD_PAYPAL','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'refund_method', 1, 'OSC_REFUND_METHOD_NOCHEX','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'refund_method', 1, 'OSC_REFUND_METHOD_EXCHANGE','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'refund_method', 1, 'OSC_REFUND_METHOD_GIFT_VOUCHERS','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'refund_method', 1, 'OSC_REFUND_METHOD_CUSTOMERS_POINTS','');
-
-insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'product', 1, 'OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL','');
-insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION','');
-insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SERVICE','');
-insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SOFTWARE','');
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_SELECT','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_TEXT','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_RADIO','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_CHECKBOX','');
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'geo_zone_type', 1, 'OSC_GEO_ZONE_VAT','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'geo_zone_type', 1, 'OSC_GEO_ZONE_SHIPPING','');
-
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'content', 1, 'OSC_CMS_CONTENT_SIMPLE','');
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'featured', 1, 'OSC_FEATURED_SELECTION','');
-
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'customers', 1, 'OSC_CUSTOMERS_RETAIL','');
-INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'customers', 1, 'OSC_CUSTOMERS_PROFESSIONNAL','');
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_featured_description.sql 2012-05-08 20:10:16 UTC (rev 4401)
@@ -0,0 +1,23 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+--
+-- Structure de la table osc_featured_description
+--
+
+CREATE TABLE IF NOT EXISTS osc_featured_description (
+ featured_id int(11) NOT NULL,
+ languages_id int(11) NOT NULL,
+ featrued_title varchar(264) NOT NULL,
+ PRIMARY KEY (featured_id,languages_id)
+);
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_featured_description.sql 2012-05-08 20:10:16 UTC (rev 4401)
@@ -0,0 +1,24 @@
+--+######################################################################--+
+--| 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/ |
+--+######################################################################--+
+
+
+--
+-- Structure de la table osc_featured_description
+--
+
+CREATE TABLE IF NOT EXISTS osc_featured_description (
+ featured_id int(11) NOT NULL,
+ languages_id int(11) NOT NULL,
+ featrued_title varchar(264) NOT NULL,
+ PRIMARY KEY (featured_id,languages_id)
+);
Modified: trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -12,7 +12,7 @@
*/
function lazyload_scripts(){
global $page;
- $dir_ws_here= $dir_ws_here=substr(dirname(__FILE__), strlen(DIR_FS_CATALOG) ).'/';
+ $dir_ws_here= substr(dirname(__FILE__), strlen(DIR_FS_CATALOG) ).'/';
$scripts=array('jquery'=> array(
'type'=>'framework',
'file'=>"ext/jquery/jquery.min.js",
Modified: trunk/catalog/templates/defaut/includes/plugins/generic/slider/includes_header.php
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/slider/includes_header.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/slider/includes_header.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -17,7 +17,7 @@
*/
function slider_scripts(){
global $page;
- $dir_ws_here=$page->getPathTemplate().'includes/plugins/generic/slider/';
+ $dir_ws_here= substr(dirname(__FILE__), strlen(DIR_FS_CATALOG) ).'/';
init_slider();
$scripts=array('jquery'=> array(
Modified: trunk/dev/GenerCode/Dicos/Modele/catalog/admin/includes/modules/pages/_REPLDICO_.php
===================================================================
--- trunk/dev/GenerCode/Dicos/Modele/catalog/admin/includes/modules/pages/_REPLDICO_.php 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/dev/GenerCode/Dicos/Modele/catalog/admin/includes/modules/pages/_REPLDICO_.php 2012-05-08 20:10:16 UTC (rev 4401)
@@ -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,48 +77,129 @@
/**
@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'=>'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,
- '_REPLDICO__name' =>true,
- '_REPLDICO__visible'=>true,
- 'action'=>false,
- );
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields['c._REPLDICO__name'] = array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('@tasks table heading title'),
+ 'default'=>true,
+ 'width'=>'35%',
+ );
- /**
- @remarks this define menu master module in page
- */
- if(self::$action =='' || self::$action =='listing'){
- self::$InitInfo['MenuModule'][]=array(
+
+ /**
+ @remarks Construct all list , fields , th/td
+ */
+ self::$InitInfo['theader']['listing']=array(
+ array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+ 0=>false,
+ 1=>false,
+ );
+
+ // min fields and not view directly colonne fields
+ $listfield = " _REPLDICO__id as id, ";
+ $_SESSION['filters']['allfields'] = array();
+ // put in
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+ // check and appli
+ foreach(self::$allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(is_array($row)){
+ $txt = $row['text'];
+ $alias = (isset($row['alias'])? $row['alias'] : $clean);
+ $css = (isset($row['class'])? $row['class'] : 'tcenter');
+ $width = (isset($row['width'])? $row['width'] : '5%');
+ }
+ else{
+ $txt = $row;
+ $alias = $clean;
+ $css = 'tcenter';
+ $width = '5%';
+ }
+
+ if(
+ ( isset($in_session[$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(
+ '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'=>'',
- 'title'=>__('image add _REPLDICO_'),
+ 'title'=>__('@_REPLDICO_ image add task'),
'url'=>tep_href_link(self::FILENAME, 'action=new'),
);
@@ -136,6 +222,24 @@
switch (self::$action) {
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'] =array();
+
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
+ /**
+ @remarks specific ajax action
+ */
case 'setflag':
if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
$c_id =(int) tep_db_prepare_input($_GET['cID']);
@@ -228,7 +332,7 @@
global $query_numrows;
$adjust=new objectInfo(self::$InitInfo['adjust']);
- $query_raw = "select _REPLDICO__id , _REPLDICO__name , _REPLDICO__visible from " . TABLE__REPLDICO_MAJ_ . " c ".
+ $query_raw = "select ".$adjust->listfields." from " . TABLE__REPLDICO_MAJ_ . " c ".
((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' _REPLDICO__name ASC ');
@@ -361,8 +465,8 @@
CsrtAction::getFormat('row_action'),
''
,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['_REPLDICO__id'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['_REPLDICO__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') ,'' )
);
}
@@ -373,7 +477,7 @@
*/
private static function RowStatus($item){
$exclude=array('action','pID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setflag&cID=' . $item['_REPLDICO__id'].'&flag=';
+ $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') ) . '">'.
sprintf(
Modified: trunk/dev/GenerCode/datatype/Modele/install.xml
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/install.xml 2012-05-08 20:06:11 UTC (rev 4400)
+++ trunk/dev/GenerCode/datatype/Modele/install.xml 2012-05-08 20:10:16 UTC (rev 4401)
@@ -91,7 +91,10 @@
<add2end>
<file name="admin/includes/boxes/08_cms.php" />
- <add type="php"><![CDATA[$tabl_link[]= array(FILENAME__DATATYPE_REPLACE_MAJ_, 'BOX_TOOLS__DATATYPE_REPLACE_MAJ_', '_DATATYPE_REPLACE_',@$img['_DATATYPE_REPLACE_']);]]></add>
+ <add type="php"><![CDATA[
+ if( DataTypes::is_active('_DATATYPE_REPLACE_'))
+ $tabl_link[]= array(FILENAME__DATATYPE_REPLACE_MAJ_, 'BOX_TOOLS__DATATYPE_REPLACE_MAJ_', '_DATATYPE_REPLACE_',@$img['_DATATYPE_REPLACE_']);
+ ]]></add>
</add2end>
<add2end>
@@ -113,9 +116,9 @@
<sql>
<query>
<![CDATA[
- insert IGNORE into %DB_PREFIX%configuration_group ( configuration_group_title,visible,configuration_group_parentid, configuration_group_group_id, configuration_group_key) values ('OPTION_ANNONCE', 1, 127, '1', 'OPTION_ANNONCE');
+ insert IGNORE into %DB_PREFIX%configuration_group ( configuration_group_title,visible,configuration_group_parentid, configuration_group_group_id, configuration_group_key) values ('OPTION_ANNONCE', 1, 127, '1', 'OPTION__DATATYPE_REPLACE_MAJ_');
- insert IGNORE into %DB_PREFIX%configuration_group ( configuration_group_title,visible,configuration_group_parentid, configuration_group_group_id, configuration_group_key) values ( 'EXTRA_ANNONCE', 1, LAST_INSERT_ID(), '0', 'MODANNONCEEXTRA');
+ insert IGNORE into %DB_PREFIX%configuration_group ( configuration_group_title,visible,configuration_group_parentid, configuration_group_group_id, configuration_group_key) values ( 'EXTRA_ANNONCE', 1, LAST_INSERT_ID(), '0', 'MOD_DATATYPE_REPLACE_MAJ_EXTRA');
]]>
</query>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-08 20:06:19
|
Revision: 4400
http://oscss.svn.sourceforge.net/oscss/?rev=4400&view=rev
Author: oscim
Date: 2012-05-08 20:06:11 +0000 (Tue, 08 May 2012)
Log Message:
-----------
Fix bug sur la prise en charge et le retour d'une pile specifique, lors de l'utilisation de plusieures piles dans une meme page
Modified Paths:
--------------
trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php
Modified: trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php
===================================================================
--- trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php 2012-05-08 13:04:58 UTC (rev 4399)
+++ trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php 2012-05-08 20:06:11 UTC (rev 4400)
@@ -111,6 +111,7 @@
asort($page->page['modules']['sort']);
if($type!=false && $modules!=false) {
+
$key=(strchr($modules,'.')==$this->ext)? substr($modules,0,strlen($modules)-4) :$modules ;
/** Charment de la pile d'action en attente */
if (isset($this->temp[$key]) ){
@@ -137,51 +138,62 @@
}else return false;
}
- elseif($type !=false && !$modules){
+ elseif($type !=false && $modules == false){
+
if (isset($page->page['modules']['sort'])) {
foreach ($page->page['modules']['sort'] as $key=>$value){
- if(empty($key))
- continue;
+ if($page->page['modules'][$type][$key] ==='true'){
- /** Charment de la pile d'action en attente */
- if (isset($this->temp[$key]) )
- $page->page['modules'][$type][$key]=$this->temp[$key]['value'];
- elseif (isset($this->temp['list']) && ( isset($this->temp['list'][$key]) && is_array($this->temp['list'][$key])) )
- $page->page['modules']['list'][$key]=array_merge( $page->page['modules']['list'][$key],$this->temp['list'][$key]);
+ $test_pile = array_values($page->page['modules'][$type]);
- /** Verif etat et exe */
- if(
- ( @$page->page['modules'][$type][$key] !='false' )
- ) {
- $mod=$this->ret_modules($key);
-
- // if not active, retrun is ''
- if(!is_array($mod))
+ if(empty($key) || $test_pile[0] !='true')
continue;
-// $file=$mod['dir_lang'] . $mod['name'] ;
- $function='sql_'.$mod['name_clean'];
+ /** Charment de la pile d'action en attente */
+ if (isset($this->temp[$key]) )
+ $page->page['modules'][$type][$key]=$this->temp[$key]['value'];
+ elseif (isset($this->temp['list']) && ( isset($this->temp['list'][$key]) && is_array($this->temp['list'][$key])) )
+ $page->page['modules']['list'][$key]=array_merge( $page->page['modules']['list'][$key],$this->temp['list'][$key]);
- require_once( $mod['path']);
+ /** Verif etat et exe */
+ if(
+ ( @$page->page['modules'][$type][$key] !='false' )
+ ) {
+ $mod=$this->ret_modules($key);
- if ( ($res=$this->test_value_content($function)) !=false) $exe=true;
- elseif(function_exists($function)) $exe=false;
- else $exe=true;
+ // if not active, retrun is ''
+ if(!is_array($mod))
+ continue;
- if($exe){
- if(page::TestFile($mod['dir_lang']. $mod['name']))require_once($mod['dir_lang']. $mod['name']);
- if(($path_lg=$page->fix_file($mod['dir_lang'] . $mod['name'],true)) !=false) $page->pile_file_lang($path_lg);
+ // $file=$mod['dir_lang'] . $mod['name'] ;
+ $function='sql_'.$mod['name_clean'];
+ require_once( $mod['path']);
- $this->modules_chargee[$key]=@$page->page['modules'][$type][$key];
- $page->page['modules']['list'][$key]['result_sql']=$res;
- }
- else{
- $page->page['modules']['list'][$mod['name_clean']]['draw']='false';
- $this->modules_chargee[$key]=$page->page['modules'][$type][$key]='false';
- }
- }
+ if ( ($res=$this->test_value_content($function)) !=false) $exe=true;
+ elseif(function_exists($function)) $exe=false;
+ else $exe=true;
+
+ if($exe){
+ if(page::TestFile($mod['dir_lang']. $mod['name']))require_once($mod['dir_lang']. $mod['name']);
+ if(($path_lg=$page->fix_file($mod['dir_lang'] . $mod['name'],true)) !=false) $page->pile_file_lang($path_lg);
+
+
+ $this->modules_chargee[$key]=@$page->page['modules'][$type][$key];
+ $page->page['modules']['list'][$key]['result_sql']=$res;
+ }
+ else{
+ $page->page['modules']['list'][$mod['name_clean']]['draw']='false';
+ $this->modules_chargee[$key]=$page->page['modules'][$type][$key]='false';
+ }
+ }
+ }
+ else{
+
+ $page->page['modules']['list'][$mod['name_clean']]['draw']='false';
+ unset($this->modules_chargee[$key]) ;//=$page->page['modules'][$type][$key]='false';
+ }
}
return $this->modules_chargee;
}else return false;
@@ -220,7 +232,7 @@
return false;
}
- else return $page->page['modules'];
+// else return $page->page['modules'];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-08 13:05:10
|
Revision: 4399
http://oscss.svn.sourceforge.net/oscss/?rev=4399&view=rev
Author: oscim
Date: 2012-05-08 13:04:58 +0000 (Tue, 08 May 2012)
Log Message:
-----------
Fix bug lors edition / manipulation des module de payement/expedition dans les pages de configuration correspondante
nettoyage et misea niveau du code dans les module money_order et cod, et fragmentation section BO/FO
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/payment/moneyorder.txt
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
trunk/catalog/admin/includes/modules/configuration/modpayment.php
trunk/catalog/admin/includes/modules/payment/cod.php
trunk/catalog/admin/includes/modules/payment/moneyorder.php
trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt
trunk/catalog/includes/modules/payment/cod.php
trunk/catalog/includes/modules/payment/moneyorder.php
Modified: trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab 2012-05-08 13:04:58 UTC (rev 4399)
@@ -119,7 +119,7 @@
<div id="modexpedition-zone" class="block_form">
<h4 class="main-title"><?php echo __('modexpedition heading zone shipping'); ?></h4>
- <table class="dataTable">
+ <table class="dataTableBase">
<thead>
<tr>
<th><?php echo __('table heading tax zones'); ?></th>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modexpedition.txt 2012-05-08 13:04:58 UTC (rev 4399)
@@ -38,6 +38,8 @@
$lang['image config']="Configuration" ;
+$lang['modexpedition heading Configuration du modules']="Configuration du module" ;
+
/**
@remarks stock Valeur stocké en db pour conversion
@note
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modpayment.txt 2012-05-08 13:04:58 UTC (rev 4399)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 27/03/2012, 20:05
+ @date 08/05/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -31,14 +31,16 @@
$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 code']="Code" ;
+$lang['table heading module title']="Nom" ;
+$lang['table heading module desc']="Description" ;
$lang['table heading module sort']="Ordre" ;
$lang['table heading module status']="Etat" ;
$lang['image config']="Configuration" ;
+$lang['modpayment heading Configuration du modules']="Configuration du module" ;
+
/**
@remarks stock Valeur stocké en db pour conversion
@note
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt 2012-05-08 13:04:58 UTC (rev 4399)
@@ -1,17 +1,23 @@
<?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 19/11/11, 19:20
+ @date 08/05/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']="tri";
-$lang['module payment cod status']="etat";
-$lang['module payment cod order status id']="Le statut des commande apres choix de ce type de paiment";
+$lang['MODULE_PAYMENT_COD_SORT_ORDER_S'] = "Ordre de tri";
+$lang['MODULE_PAYMENT_COD_SORT_ORDER_L'] = "Preciser la position de ce module par rapport aux autres";
+
+$lang['MODULE_PAYMENT_COD_ZONE_S'] = "Zone de paiement";
+$lang['MODULE_PAYMENT_COD_ZONE_L'] = "Permettre seulement cette méthode de paiement pour la zone choisie.";
+
+$lang['MODULE_PAYMENT_COD_ORDER_STATUS_ID_S'] = "Etat de la commande";
+$lang['MODULE_PAYMENT_COD_ORDER_STATUS_ID_L'] = "Sélectionner l'état de la commande que vous voulez par défault.";
+
?>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/payment/moneyorder.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/payment/moneyorder.txt 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/payment/moneyorder.txt 2012-05-08 13:04:58 UTC (rev 4399)
@@ -1,30 +1,29 @@
<?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 19/11/11, 19:20
+ @date 08/05/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$lang['module payment moneyorder text title']="Paiement par chéque";
$lang['module payment moneyorder text description']="Paiement par chéque. en attente du chèque pour confirmation de la commande";
-// $lang['module payment cod sort order']="tri";
-// $lang['module payment cod status']="etat";
-// $lang['module payment cod order status id']="Le statut des commande apres choix de ce type de paiment";
+$lang['MODULE_PAYMENT_MONEYORDER_PAYTO_S'] = "Payable à...";
+$lang['MODULE_PAYMENT_MONEYORDER_PAYTO_L'] = "A qu'elle ordre doit être effectue le paiement ?";
+$lang['MODULE_PAYMENT_MONEYORDER_SORT_ORDER_S'] = "Ordre de tri";
+$lang['MODULE_PAYMENT_MONEYORDER_SORT_ORDER_L'] = "Preciser la position de ce module par rapport aux autres";
-/* Necessaire a l'installion */
- $lang['MODULE_PAYMENT_MONEYORDER_STATUS_TITLE']="Paiement par chèque" ;
- $lang['MODULE_PAYMENT_MONEYORDER_STATUS']="Voulez-vous accepter le paiement par chèque ?" ;
- $lang['MODULE_PAYMENT_MONEYORDER_SORT_ORDER_TITLE']="ordre de tri" ;
- $lang['MODULE_PAYMENT_MONEYORDER_PAYTO_TITLE']="Payable à:" ;
-// $lang['MODULE_PAYMENT_MONEYORDER_PAYTO']= 'À qu'elle ordre doit être établi le règlement ?';
- $lang['MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID_TITLE']="État de la commande" ;
-// $lang['MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID']= 'Sélectionner l'état de la commande que vous voulez par défaut.';
- $lang['MODULE_PAYMENT_MONEYORDER_ZONE_TITLE']="Zone de paiement" ;
-// $lang['MODULE_PAYMENT_MONEYORDER_ZONE']= 'Permettre seulement cette méthode de paiement pour la zone choisie.';
+$lang['MODULE_PAYMENT_MONEYORDER_ZONE_S'] = "Zone de paiement";
+$lang['MODULE_PAYMENT_MONEYORDER_ZONE_L'] = "Permettre seulement cette méthode de paiement pour la zone choisie.";
+$lang['MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID_S'] = "Etat de la commande";
+$lang['MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID_L'] = "Sélectionner l'état de la commande que vous voulez par défault.";
+
+$lang['MODULE_PAYMENT_MONEYORDER_ICON_S'] = "Icone";
+$lang['MODULE_PAYMENT_MONEYORDER_ICON_L'] = "configurer un icone pour ce mode de livraison";
+
?>
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-05-08 13:04:58 UTC (rev 4399)
@@ -320,7 +320,8 @@
foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/') as $row){
if( substr($row,-3) =='php'){
$class = substr($row,0, -4);
- self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
+ if(!isset(self::$module[$class]))
+ self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
}
}
Modified: trunk/catalog/admin/includes/modules/configuration/modpayment.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-05-08 13:04:58 UTC (rev 4399)
@@ -4,13 +4,13 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 27/03/2012, 19:49
+ @date 08/05/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modpayment
*/
-error_reporting(E_ALL);
+
define('FILENAME_CFG_127',"gparentID=".$_GET['gparentID']."&gID=".$_GET['gID']."&");
Class modpayment
@@ -132,11 +132,13 @@
// call type module
$typeOri=modulesUtility::GetModttype('payment');
+
// get current value
- $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+ $current_public = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+ $current_private = sqlconfiguration::fetch(array('key'=>$typeOri->key_BO), true);
+// print_r($current_public);
+// print_r($current_private);
-
-
// call
$type=modulesUtility::LoadModule('payment',$mod.'.php');
// force install
@@ -163,22 +165,28 @@
$result[]=$v;
}
- sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
+ sqlconfiguration::update(array('id'=>$current_public->id, 'value'=>implode(';',$result)) );
+ sqlconfiguration::update(array('id'=>$current_private->id, 'value'=>implode(';',$result)) );
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modpayment-module' ));
}
break;
+
+ /**
+ @brief Configuration Module shipping. Edit options current module
+ @note module BO is priority vs FO module
+ */
case 'modules-edit':
$mod=tep_db_prepare_input($_GET['mod']);
// call
- $Mod=modulesUtility::LoadModule('payment',$mod);
+ $Mod=modulesUtility::LoadModule('payment',$mod.'.php');
$ModCurr = $Mod->content;
- if(!is_object($ModCurr))
+ if(!is_object($ModCurr) || !$ModCurr->check() )
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#error-noloadmod'));
$i=0;
@@ -195,6 +203,8 @@
self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
break;
+
+
/**
@brief save Config base page
*/
@@ -225,10 +235,11 @@
$list_edit=array();
- $gID = 7;
+ $gID = $_GET['gID'];
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+ if(is_array($list))
foreach($list as $row) {
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
@@ -295,17 +306,21 @@
else
self::$zone= $zone;
-
+ foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'payment/') as $row){
+ if( substr($row, 0,1) !='.' && substr($row, -1) !='~' && substr($row,-4) !='html'){
+ $class = substr($row,0, -4);
+ self::$module[$class]=modulesUtility::LoadModule('payment', $row);
+ }
+ }
foreach(scan(DIR_FS_CATALOG_MODULES.'payment/') as $row){
- if( substr($row, 0,1) !='.' && substr($row, -1) !='~' && substr($row,-4) !='html'){
-
- $class = substr($row,0, -4);
-
- self::$module[]=modulesUtility::LoadModule('payment', $row);
-
+ if( substr($row, 0,1) !='.' && substr($row, -1) !='~' && substr($row,-4) !='html'){
+ $class = substr($row,0, -4);
+ if(!isset(self::$module[$class]))
+ self::$module[$class]=modulesUtility::LoadModule('payment', $row);
}
}
+
return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
}
}
Modified: trunk/catalog/admin/includes/modules/payment/cod.php
===================================================================
--- trunk/catalog/admin/includes/modules/payment/cod.php 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/modules/payment/cod.php 2012-05-08 13:04:58 UTC (rev 4399)
@@ -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 19/11/11, 19:33
+ @date 08/05/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,6 +13,7 @@
public $code;
public $title;
public $description;
+ public $sort_order;
public $enabled;
// class constructor
@@ -25,45 +26,45 @@
$this->sort_order = (defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : 0 );
$this->enabled = true ;
- if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
+ if (defined('MODULE_PAYMENT_COD_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
}
- if (is_object($order))
- $this->update_status();
+// if (is_object($order))
+// $this->update_status();
}
// class methods
- public function update_status() {
- global $order;
+// public function update_status() {
+// global $order;
+//
+// if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
+// $check_flag = false;
+// $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and (zone_country_id = '" . $order->delivery['country']['id'] . "' OR zone_country_id ='0') order by zone_id");
+// while ($check = tep_db_fetch_array($check_query)) {
+// if ($check['zone_id'] < 1) {
+// $check_flag = true;
+// break;
+// } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
+// $check_flag = true;
+// break;
+// }
+// }
+//
+// if ($check_flag == false) {
+// $this->enabled = false;
+// }
+// }
+//
+// // disable the module if the order only contains virtual products
+// if ($this->enabled == true) {
+// if ($order->content_type == 'virtual') {
+// $this->enabled = false;
+// }
+// }
+// }
- if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
- $check_flag = false;
- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and (zone_country_id = '" . $order->delivery['country']['id'] . "' OR zone_country_id ='0') order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
- $check_flag = true;
- break;
- } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
- $check_flag = true;
- break;
- }
- }
- if ($check_flag == false) {
- $this->enabled = false;
- }
- }
-
-// disable the module if the order only contains virtual products
- if ($this->enabled == true) {
- if ($order->content_type == 'virtual') {
- $this->enabled = false;
- }
- }
- }
-
-
/**
@brief after save table order, adjust modules data save
@param $id int order id
@@ -107,29 +108,77 @@
return false;
}
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
public function check() {
if (!isset($this->_check)) {
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_COD_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
+ $DB=Database::getInstance();
+ $check_query = $DB->query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_PAYMENT_COD%' ");
+ if( $check_query->__get('numRows') == count($this->keys()) ) $this->_check=true;
+ else {
+ $this->remove();
+ $this->_check=false;
+ }
}
return $this->_check;
}
- public function install() {
-// 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 ('Paiement à la livraison', 'MODULE_PAYMENT_COD_STATUS', 'True', 'Voulez-vous accepter le paiement à la livraison ?', '6', '1', '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, set_function, date_added) values ('Zone de paiement', 'MODULE_PAYMENT_COD_ZONE', '0', 'Permettre seulement cette méthode de paiement pour la zone choisie.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- 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_PAYMENT_COD_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Etat de la commande', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'Sélectionner l\'état de la commande que vous voulez par défault.', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ public function keys() {
+ return array(
+ 'MODULE_PAYMENT_COD_ZONE',
+ 'MODULE_PAYMENT_COD_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_COD_SORT_ORDER'
+ );
}
- public function remove() {
- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
- }
+ /**
+ @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)
+ */
+ public function install() {
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_PAYMENT_COD_ZONE_S', 'MODULE_PAYMENT_COD_ZONE', '0', 'MODULE_PAYMENT_COD_ZONE_L', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_COD_SORT_ORDER_S', 'MODULE_PAYMENT_COD_SORT_ORDER', '0', 'MODULE_PAYMENT_COD_SORT_ORDER_L', '6', '0', now())");
- public function keys() {
- return array(/*'MODULE_PAYMENT_COD_STATUS',*/ 'MODULE_PAYMENT_COD_ZONE', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', 'MODULE_PAYMENT_COD_SORT_ORDER');
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_COD_ORDER_STATUS_ID_S', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID_L', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
}
+
+ /**
+ @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
+ */
+ public function remove() {
+ $DB=Database::getInstance();
+ $DB->query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
}
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/payment/moneyorder.php
===================================================================
--- trunk/catalog/admin/includes/modules/payment/moneyorder.php 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/admin/includes/modules/payment/moneyorder.php 2012-05-08 13:04:58 UTC (rev 4399)
@@ -1,18 +1,29 @@
<?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 19/11/11, 23:59
+ @date 08/05/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-class moneyorder implements InterfaceModule,InterfaceAcaPayment{
- var $code, $title, $description, $enabled;
+class moneyorder
+ implements
+ InterfaceModule,
+ InterfaceAcaPayment
+ {
+ public $code;
+ public $title;
+ public $description;
+ public $icon;
+ public $sort_order;
+ public $enabled;
+
+
public function __construct() {
global $order;
@@ -20,10 +31,11 @@
$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')? 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;
+ if (defined('MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0)
+ $this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
// if (is_object($order)) $this->update_status();
@@ -121,36 +133,87 @@
public function get_error() { return false; }
+
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
public function check() {
$DB=Database::getInstance();
if (!isset($this->_check)) {
$check_query = $DB->query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_PAYMENT_MONEYORDER%' ");
if( $check_query->__get('numRows') == count($this->keys()) ) $this->_check=true;
else {
- $this->remove();
- $this->_check=false;
+ $this->remove();
+ $this->_check=false;
}
}
return $this->_check;
}
+
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ public function keys() {
+ return array(
+ 'MODULE_PAYMENT_MONEYORDER_ZONE',
+ 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER',
+ 'MODULE_PAYMENT_MONEYORDER_PAYTO',
+ 'MODULE_PAYMENT_MONEYORDER_ICON'
+ );
+ }
+
+ /**
+ @fn install()
+ @brief add all configuration
+ @note
+ - Modules can emarquer sql installation instructions, however, in the case of transverse information, or dependent of an extension, preferring the implementation of an extension, file with sql independent
+ - please, pefix all var configuration by 'MODULE_OT__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)
+ */
public function install() {
$DB=Database::getInstance();
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__("Payable à..."))."', 'MODULE_PAYMENT_MONEYORDER_PAYTO', '', '".addslashes(__("A qu'elle ordre doit être effectue le paiement ?"))."', '6', '0', now());");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__("Ordre de tri"))."', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', '".addslashes(__("Ordre de tri pour l'affichage (Le plus petit nombre est montré en premier)."))."', '6', '1', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Zone de paiement', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', '".addslashes(__("Permettre seulement cette méthode de paiement pour la zone choisie."))."', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".addslashes(__("Etat de la commande"))."', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', '".addslashes(__("Sélectionner l'état de la commande que vous voulez par défault."))."', '6', '1', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".__('Icone pour ce mode paiement')."', 'MODULE_PAYMENT_MONEYORDER_ICON', '', '".addslashes(__("Choix d'un icone"))."', '6', '5', 'tep_cfg_choose_img(', NULL, now())");
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_MONEYORDER_PAYTO_S', 'MODULE_PAYMENT_MONEYORDER_PAYTO', '', 'MODULE_PAYMENT_MONEYORDER_PAYTO_L', '6', '0', now());");
+
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_MONEYORDER_SORT_ORDER_S', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER_L', '6', '1', now())");
+
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_PAYMENT_MONEYORDER_ZONE_S', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', 'MODULE_PAYMENT_MONEYORDER_ZONE_L', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID_S', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID_L', '6', '1', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
+
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_MONEYORDER_ICON_S', 'MODULE_PAYMENT_MONEYORDER_ICON', '', 'MODULE_PAYMENT_MONEYORDER_ICON_L', '6', '5', 'tep_cfg_choose_img(', NULL, now())");
}
+ /**
+ @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
+ */
public function remove() {
$DB=Database::getInstance();
$DB->query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
- public function keys() {
- return array( 'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', 'MODULE_PAYMENT_MONEYORDER_PAYTO','MODULE_PAYMENT_MONEYORDER_ICON');
- }
+
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/includes/languages/fr_FR/modules/payment/cod.txt 2012-05-08 13:04:58 UTC (rev 4399)
@@ -4,13 +4,10 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 27/04/2012, 00:03
+ @date 08/05/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";
+$lang['module payment cod text title']="Paiement à la livraison";
+$lang['module payment cod text description']="(module cod) Paiement à la livraison";
?>
\ No newline at end of file
Modified: trunk/catalog/includes/modules/payment/cod.php
===================================================================
--- trunk/catalog/includes/modules/payment/cod.php 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/includes/modules/payment/cod.php 2012-05-08 13:04:58 UTC (rev 4399)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 27/04/2012, 00:03
+ @date 08/05/2012, 00:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,6 +13,7 @@
public $code;
public $title;
public $description;
+ public $sort_order;
public $enabled;
// class constructor
@@ -20,10 +21,10 @@
global $order;
$this->code = 'cod';
- $this->title = __('MODULE_PAYMENT_COD_TEXT_TITLE');
- $this->description = __('MODULE_PAYMENT_COD_TEXT_DESCRIPTION');
+ $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');
+ $this->enabled = true;
if (defined('MODULE_PAYMENT_COD_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
@@ -96,29 +97,17 @@
return false;
}
- function check() {
- if (!isset($this->_check)) {
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_COD_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
- }
- return $this->_check;
- }
-
- function install() {
-// 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 ('Paiement à la livraison', 'MODULE_PAYMENT_COD_STATUS', 'True', 'Voulez-vous accepter le paiement à la livraison ?', '6', '1', '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, set_function, date_added) values ('Zone de paiement', 'MODULE_PAYMENT_COD_ZONE', '0', 'Permettre seulement cette méthode de paiement pour la zone choisie.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- 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_PAYMENT_COD_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Etat de la commande', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'Sélectionner l\'état de la commande que vous voulez par défault.', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
- }
-
- function remove() {
- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
- }
-
-
-
- function keys() {
- return array(/*'MODULE_PAYMENT_COD_STATUS',*/ 'MODULE_PAYMENT_COD_ZONE', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', 'MODULE_PAYMENT_COD_SORT_ORDER');
- }
+ /**
+ @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(); }
+ */
+ public function check() { }
+ public function install() { }
+ public function remove() { }
+ public function keys() { }
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/modules/payment/moneyorder.php
===================================================================
--- trunk/catalog/includes/modules/payment/moneyorder.php 2012-05-08 10:42:19 UTC (rev 4398)
+++ trunk/catalog/includes/modules/payment/moneyorder.php 2012-05-08 13:04:58 UTC (rev 4399)
@@ -93,27 +93,20 @@
public function get_error() { return false; }
- public function check() {
- $DB=Database::getInstance();
- if (!isset($this->_check)) {
- $check_query = $DB->query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_PAYMENT_MONEYORDER%' ");
- if( $check_query->__get('numRows') == count($this->keys()) ) $this->_check=true;
- else {
- $this->remove();
- $this->_check=false;
- }
- }
- return $this->_check;
- }
+/** Interface InterfaceModule */
- public function install() {
- }
- public function remove() {
- }
-
- public function keys() {
- return array( 'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', 'MODULE_PAYMENT_MONEYORDER_PAYTO','MODULE_PAYMENT_MONEYORDER_ICON');
- }
+ /**
+ @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(); }
+ */
+ public function check() { }
+ public function install() { }
+ public function remove() { }
+ public function keys() { }
}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-08 10:42:27
|
Revision: 4398
http://oscss.svn.sourceforge.net/oscss/?rev=4398&view=rev
Author: oscim
Date: 2012-05-08 10:42:19 +0000 (Tue, 08 May 2012)
Log Message:
-----------
Ajustement de ModuleUtility et force de mani?\195?\168re systematique le module du backoffice en priorit?\195?\169 si present.
Correction de la gestion / configuration des modules d'expedition, amelioration et ajout de control supplementaire
Activation / desactivation des modules (BO/FO identique) , automatisation isntallation
Mise a niveau du code des modules item et spu et fragmentation de la section admin et la section public. nettoyage du code et ajout de commentaire. corection des erreurs de notice
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/modulesUtility.php
trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
trunk/catalog/admin/includes/modules/shipping/item.php
trunk/catalog/admin/includes/modules/shipping/spu.php
trunk/catalog/includes/languages/fr_FR/modules/shipping/item.txt
trunk/catalog/includes/languages/fr_FR/modules/shipping/spu.txt
trunk/catalog/includes/modules/shipping/item.php
trunk/catalog/includes/modules/shipping/spu.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
Modified: trunk/catalog/admin/includes/classes/modulesUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/modulesUtility.php 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/admin/includes/classes/modulesUtility.php 2012-05-08 10:42:19 UTC (rev 4398)
@@ -101,11 +101,15 @@
$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);
+ if(isset($r->detail->path_BO) && file_exists($r->detail->path_BO.$r->detail->filemod))
+ include_once($r->detail->path_BO.$r->detail->filemod);
+ else
+ include_once($r->detail->path.$r->detail->filemod);
if (class_exists($r->detail->classe)) {
$module = new $r->detail->classe;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt 2012-05-08 10:42:19 UTC (rev 4398)
@@ -1,15 +1,36 @@
<?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, 12:45
+ @version 2.1.1
+ @date 111/05/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
$lang['module shipping text item title']="transporteur" ;
$lang['module shipping text item description']="livraison classique :" ;
$lang['module shipping item text way']="soit :" ;
$lang['module shipping item text title in shipping']="transporteur :" ;
+
+
+
+$lang['MODULE_SHIPPING_ITEM_COST_S'] = "Coût de livraison";
+$lang['MODULE_SHIPPING_ITEM_COST_L'] = "Le coût de livraison sera multiplié par le nombre d'articles dans la commande employant cette méthode.";
+
+$lang['MODULE_SHIPPING_ITEM_HANDLING_S'] = "Coûts de manutention";
+$lang['MODULE_SHIPPING_ITEM_HANDLING_L'] = "Majorer le prix, avec la valeur du coût de la manutention";
+
+$lang['MODULE_SHIPPING_ITEM_TAX_CLASS_S'] = "Type de taxe";
+$lang['MODULE_SHIPPING_ITEM_TAX_CLASS_L'] = "Employez la classe suivante de taxe sur les coûts de livraison.";
+
+$lang['MODULE_SHIPPING_ITEM_ZONE_S'] = "Zone de livraison";
+$lang['MODULE_SHIPPING_ITEM_ZONE_L'] = "Permettre seulement cette méthode de livraison pour la zone choisie.";
+
+$lang['MODULE_SHIPPING_ITEM_SORT_ORDER_S'] = "Ordre de tri";
+$lang['MODULE_SHIPPING_ITEM_SORT_ORDER_L'] = "Preciser la position de ce module par rapport aux autres";
+
+$lang['MODULE_SHIPPING_ITEM_ICON_S'] = "Icone";
+$lang['MODULE_SHIPPING_ITEM_ICON_L'] = "configurer un icone pour ce mode de livraison";
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt 2012-05-08 10:42:19 UTC (rev 4398)
@@ -11,7 +11,21 @@
$lang['module shipping text spu title']="Récupération des articles au magasin";
$lang['module shipping spu text description']="Récupération des articles au magasin durant les heures ouvrées.";
-// $lang['module payment cod sort order']="tri";
-// $lang['module payment cod status']="etat";
-// $lang['module payment cod order status id']="Le statut des commande apres choix de ce type de paiment";
+$lang['MODULE_SHIPPING_SPU_COST_S'] = "Coût de livraison";
+$lang['MODULE_SHIPPING_SPU_COST_L'] = "Le coût de livraison sera multiplié par le nombre d'articles dans la commande employant cette méthode.";
+
+$lang['MODULE_SHIPPING_SPU_ZIP_S'] = "Etat Province codes autorisés";
+$lang['MODULE_SHIPPING_SPU_ZIP_L'] = "Preciser les departements autorisés à utiliser cette methôde. ";
+
+// $lang['MODULE_SHIPPING_ITEM_TAX_CLASS_S'] = "Type de taxe";
+// $lang['MODULE_SHIPPING_ITEM_TAX_CLASS_L'] = "Employez la classe suivante de taxe sur les coûts de livraison.";
+
+$lang['MODULE_SHIPPING_SPU_ZONE_S'] = "Zone de livraison";
+$lang['MODULE_SHIPPING_SPU_ZONE_L'] = "Permettre seulement cette méthode de livraison pour la zone choisie.";
+
+$lang['MODULE_SHIPPING_SPU_SORT_ORDER_S'] = "Ordre de tri";
+$lang['MODULE_SHIPPING_SPU_SORT_ORDER_L'] = "Preciser la position de ce module par rapport aux autres";
+
+$lang['MODULE_SHIPPING_SPU_ICON_S'] = "Icone";
+$lang['MODULE_SHIPPING_SPU_ICON_L'] = "configurer un icone pour ce mode de livraison";
?>
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2012-05-08 10:42:19 UTC (rev 4398)
@@ -8,11 +8,10 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modexpedition
- Mise en forme et structuration des options de stock
*/
-define('FILENAME_CFG_127',"gparentID=127&gID=7&");
+define('FILENAME_CFG_127',"gparentID=".$_GET['gparentID']."&gID=".$_GET['gID']."&");
Class modexpedition
implements ext_configuration
@@ -46,7 +45,6 @@
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');
@@ -98,7 +96,7 @@
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-config' ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 ));
break;
/**
@@ -117,11 +115,13 @@
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-zone' ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#modexpedition-zone' ));
break;
+
/**
- @brief Manage shipping zones
+ @brief Active / inactive module shipping
+ @note config BO / FO is identique
*/
case 'modules':
@@ -133,13 +133,17 @@
// call type module
$typeOri=modulesUtility::GetModttype('shipping');
+
// get current value
- $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+ $current_public = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+ $current_private = sqlconfiguration::fetch(array('key'=>$typeOri->key_BO), true);
// call
$type=modulesUtility::LoadModule('shipping',$mod.'.php');
+
+
// force install
if( $flag ==1 && !$type->content->check()){
$type->content->remove();
@@ -164,19 +168,31 @@
$result[]=$v;
}
- sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
+ sqlconfiguration::update(array('id'=>$current_public->id, 'value'=>implode(';',$result)) );
+ sqlconfiguration::update(array('id'=>$current_private->id, 'value'=>implode(';',$result)) );
if(!isset($_GET['forceajax']))
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-module' ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#modexpedition-module' ));
}
break;
+
+
+
+ /**
+ @brief Configuration Module shipping. Edit options current module
+ @note module BO is priority vs FO module
+ */
case 'modules-edit':
$mod=tep_db_prepare_input($_GET['mod']);
// call
$Mod=modulesUtility::LoadModule('shipping',$mod.'.php');
$ModCurr = $Mod->content;
+
+ if(!$ModCurr->check())
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127));
+
$i=0;
foreach($ModCurr->keys() as $value){
$i++;
@@ -191,8 +207,10 @@
self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
break;
+
+
/**
- @brief save Config base page
+ @brief Configuration Module shipping. Save option current module
*/
case 'modules-save':
foreach($_POST['configuration'] as $key=>$value) {
@@ -207,7 +225,7 @@
if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='. $_GET['mod'] ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '&action=modules-edit&mod='. $_GET['mod'] ));
break;
}
}
@@ -221,7 +239,7 @@
$list_edit=array();
- $gID = 7;
+ $gID = tep_db_prepare_input($_GET['gID']);
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
@@ -292,16 +310,21 @@
self::$zone= $zone;
+
foreach(scan(DIR_FS_CATALOG_MODULES.'shipping/') as $row){
if( substr($row,-3) =='php'){
-
- $class = substr($row,0, -4);
-
- self::$module[]=modulesUtility::LoadModule('shipping', $row);
-
+ $class = substr($row,0, -4);
+ self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
}
}
+ foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'shipping/') as $row){
+ if( substr($row,-3) =='php'){
+ $class = substr($row,0, -4);
+ self::$module[$class]=modulesUtility::LoadModule('shipping', $row);
+ }
+ }
+
return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
}
}
Modified: trunk/catalog/admin/includes/modules/shipping/item.php
===================================================================
--- trunk/catalog/admin/includes/modules/shipping/item.php 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/admin/includes/modules/shipping/item.php 2012-05-08 10:42:19 UTC (rev 4398)
@@ -1,18 +1,22 @@
<?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:06
+ @date 111/05/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+
class item {
public $code;
public $title;
public $description;
+ public $icon;
+ public $sort_order;
public $enabled;
// class constructor
@@ -20,8 +24,8 @@
$this->code = __CLASS__;
$this->title = __('module shipping text item title');
$this->description = __('module shipping item text description');
- $this->sort_order = (defined('MODULE_SHIPPING_SPU_SORT_ORDER;')? MODULE_SHIPPING_SPU_SORT_ORDER: 0);
- $this->icon = (tep_not_null('MODULE_SHIPPING_SPU_ICON')? MODULE_SHIPPING_SPU_ICON : '');
+ $this->sort_order = (defined('MODULE_SHIPPING_ITEM_SORT_ORDER;')? MODULE_SHIPPING_ITEM_SORT_ORDER: 0);
+ $this->icon = (defined('MODULE_SHIPPING_ITEM_ICON')? MODULE_SHIPPING_ITEM_ICON : '');
$this->enabled = true ;
global $order;
@@ -35,9 +39,9 @@
if ($this->enabled == true ) {
$this->enabled = false;
if ( ((int)MODULE_SHIPPING_ITEM_ZONE > 0) && ((int)MODULE_SHIPPING_ITEM_ZONE == shipping::getGeoZoneID($order->delivery['country']['id'], $order->delivery['zone_id'])) )
- $this->enabled = true;
+ $this->enabled = true;
elseif ((int)MODULE_SHIPPING_ITEM_ZONE == 0)
- $this->enabled = true;
+ $this->enabled = true;
}
}
@@ -88,40 +92,88 @@
return false;
}
- /**
- */
+
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
public function check() {
if (!isset($this->_check)) {
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_SPU%' ");
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_ITEM%' ");
if( tep_db_num_rows($check_query) == count($this->keys()) ) $this->_check=true;
else {
- $this->remove();
- $this->_check=false;
+ $this->remove();
+ $this->_check=false;
}
}
return $this->_check;
}
- /**
- */
+
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ public function keys() {
+ return array(
+ 'MODULE_SHIPPING_ITEM_COST',
+ 'MODULE_SHIPPING_ITEM_HANDLING',
+ 'MODULE_SHIPPING_ITEM_TAX_CLASS',
+ 'MODULE_SHIPPING_ITEM_ZONE',
+ 'MODULE_SHIPPING_ITEM_SORT_ORDER',
+ 'MODULE_SHIPPING_ITEM_ICON'
+ );
+ }
+
+ /**
+ @fn install()
+ @brief add all configuration
+ @note
+ - Modules can emarquer sql installation instructions, however, in the case of transverse information, or dependent of an extension, preferring the implementation of an extension, file with sql independent
+ - please, pefix all var configuration by 'MODULE_OT__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)
+ */
public function install() {
- $DB=Database::getInstance();
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Coût de livraison', 'MODULE_SHIPPING_ITEM_COST', '2.50', 'Le coût de livraison sera multiplié par le nombre d\'articles dans la commande employant cette méthode.', '6', '0', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Coûts de manutention', 'MODULE_SHIPPING_ITEM_HANDLING', '0', 'Les coûts de manutention pour cette méthode de livraison.', '6', '0', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Type de taxe', 'MODULE_SHIPPING_ITEM_TAX_CLASS', '0', 'Employez la classe suivante de taxe sur les coûts de livraison.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Zone de livraison', 'MODULE_SHIPPING_ITEM_ZONE', '0', 'Permettre seulement cette méthode de livraison pour la zone choisie.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_shipping(', now())");
- $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_SHIPPING_ITEM_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '0', now())");
+ $DB=Database::getInstance();
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,set_function) values ('".addslashes(__("Icone"))."', 'MODULE_SHIPPING_ITEM_ICON', '', '".addslashes(__("Choix d'un icone"))."', '6', '0', now(),'tep_cfg_choose_img(')");
+ $DB->query($sql="INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_ITEM_COST_S', 'MODULE_SHIPPING_ITEM_COST', '2.50', 'MODULE_SHIPPING_ITEM_COST_L', '6', '0', now())");
+
+ $DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_ITEM_HANDLING_S', 'MODULE_SHIPPING_ITEM_HANDLING', '', 'MODULE_SHIPPING_ITEM_HANDLING_L', '6', '0', now())");
+
+ $DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function,set_function) values ('MODULE_SHIPPING_ITEM_TAX_CLASS_S', 'MODULE_SHIPPING_ITEM_TAX_CLASS', '', 'MODULE_SHIPPING_ITEM_TAX_CLASS_L', '6', '0', now(),'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(')");
+
+ $DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function,set_function) values ('MODULE_SHIPPING_ITEM_ZONE_S', 'MODULE_SHIPPING_ITEM_ZONE', '', 'MODULE_SHIPPING_ITEM_ZONE_L', '6', '0', now(),'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_shipping(')");
+
+ $DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_ITEM_SORT_ORDER_S', 'MODULE_SHIPPING_ITEM_SORT_ORDER', '', 'MODULE_SHIPPING_ITEM_SORT_ORDER_L', '6', '0', now())");
+
+ $DB->query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,set_function) values ('MODULE_SHIPPING_ITEM_ICON_S', 'MODULE_SHIPPING_ITEM_ICON', '', 'MODULE_SHIPPING_ITEM_ICON_L', '6', '0', now(),'tep_cfg_choose_img(')");
}
+ /**
+ @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
+ */
public function remove() {
$DB=Database::getInstance();
$DB->query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
- public function keys() {
- return array( 'MODULE_SHIPPING_ITEM_COST', 'MODULE_SHIPPING_ITEM_HANDLING', 'MODULE_SHIPPING_ITEM_TAX_CLASS', 'MODULE_SHIPPING_ITEM_ZONE', 'MODULE_SHIPPING_ITEM_SORT_ORDER','MODULE_SHIPPING_ITEM_ICON');
- }
}
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/shipping/spu.php
===================================================================
--- trunk/catalog/admin/includes/modules/shipping/spu.php 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/admin/includes/modules/shipping/spu.php 2012-05-08 10:42:19 UTC (rev 4398)
@@ -13,6 +13,8 @@
public $code;
public $title;
public $description;
+ public $icon;
+ public $sort_order;
public $enabled;
// class constructor
@@ -20,8 +22,8 @@
$this->code = __CLASS__;
$this->title = __('module shipping text spu title');
$this->description = __('module shipping spu text description');
- $this->sort_order = (defined('MODULE_SHIPPING_SPU_SORT_ORDER;')? MODULE_SHIPPING_SPU_SORT_ORDER: 0);
- $this->icon = (tep_not_null('MODULE_SHIPPING_SPU_ICON')? MODULE_SHIPPING_SPU_ICON : '');
+ $this->sort_order = (defined('MODULE_SHIPPING_SPU_SORT_ORDER')? MODULE_SHIPPING_SPU_SORT_ORDER: 0);
+ $this->icon = (defined('MODULE_SHIPPING_SPU_ICON')? MODULE_SHIPPING_SPU_ICON : '');
$this->enabled = true ;
global $order;
@@ -33,9 +35,9 @@
if ($this->enabled == true ) {
$this->enabled = false;
if ( ((int)MODULE_SHIPPING_SPU_ZONE > 0) && ((int)MODULE_SHIPPING_SPU_ZONE == shipping::getGeoZoneID($order->delivery['country']['id'], $order->delivery['zone_id'])) )
- $this->enabled = true;
+ $this->enabled = true;
elseif ((int)MODULE_SHIPPING_SPU_ZONE == 0)
- $this->enabled = true;
+ $this->enabled = true;
}
}
@@ -50,7 +52,6 @@
return true;
}
-// exit;
return false;
}
@@ -86,35 +87,76 @@
return false;
}
- /**
- */
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
public function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_SPU%' ");
if( tep_db_num_rows($check_query) == count($this->keys()) ) $this->_check=true;
else {
- $this->remove();
- $this->_check=false;
+ $this->remove();
+ $this->_check=false;
}
}
return $this->_check;
}
- /**
- */
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ public function keys() {
+ return array(
+ 'MODULE_SHIPPING_SPU_COST',
+ 'MODULE_SHIPPING_SPU_SORT_ORDER',
+ 'MODULE_SHIPPING_SPU_ZONE',
+ 'MODULE_SHIPPING_SPU_ZIP',
+ 'MODULE_SHIPPING_SPU_ICON'
+ );
+ }
+
+ /**
+ @fn install()
+ @brief add all configuration
+ @note
+ - Modules can emarquer sql installation instructions, however, in the case of transverse information, or dependent of an extension, preferring the implementation of an extension, file with sql independent
+ - please, pefix all var configuration by 'MODULE_OT__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)
+ */
public function install() {
$DB=Database::getInstance();
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__('Store Pickup Cost'))."', 'MODULE_SHIPPING_SPU_COST', '0.00', '".addslashes(__('Preciser le cout'))."', '6', '0', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".__('Shipping Zone')."', 'MODULE_SHIPPING_SPU_ZONE', '0', '".addslashes(__('If a zone is selected, only enable this shipping method for that zone.'))."', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_shipping(', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__('Sort order'))."', 'MODULE_SHIPPING_SPU_SORT_ORDER', '0', '".addslashes(__('Preciser un nombre pour le tri'))."', '6', '0', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,set_function) values ('choose icon', 'MODULE_SHIPPING_SPU_ICON', '', 'choose icon transporteur', '6', '0', now(),'tep_cfg_choose_img(')");
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_SPU_COST_S', 'MODULE_SHIPPING_SPU_COST', '0.00', 'MODULE_SHIPPING_SPU_COST_L', '6', '0', now())");
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_SHIPPING_SPU_ZONE_S', 'MODULE_SHIPPING_SPU_ZONE', '0', 'MODULE_SHIPPING_SPU_ZONE_L', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_shipping(', now())");
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_SPU_SORT_ORDER_S', 'MODULE_SHIPPING_SPU_SORT_ORDER', '0', 'MODULE_SHIPPING_SPU_SORT_ORDER_L', '6', '0', now())");
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,set_function) values ('MODULE_SHIPPING_SPU_ICON_S', 'MODULE_SHIPPING_SPU_ICON', '', 'MODULE_SHIPPING_SPU_ICON_L', '6', '0', now(),'tep_cfg_choose_img(')");
// chargée sur demande
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, configuration_type) values ('".addslashes(__('Store Pick Up Zip Code Allowed'))."', 'MODULE_SHIPPING_SPU_ZIP', '01, 07, 26, 38, 42, 69, 74', '".addslashes(__("Departement autorisé pour le retrait magasin ? laisser vide si vous ne l'utilisez pas"))."', '6', '0', now(),0)");
+ $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, configuration_type) values ('MODULE_SHIPPING_SPU_ZIP_S', 'MODULE_SHIPPING_SPU_ZIP', '01, 07, 26, 38, 42, 69, 74', 'MODULE_SHIPPING_SPU_ZIP_L', '6', '0', now(),0)");
}
- /**
- */
+ /**
+ @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
+ */
public function remove() {
$keys = '';
$keys_array = $this->keys();
@@ -125,11 +167,5 @@
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
}
-
- /**
- */
- public function keys() {
- return array( 'MODULE_SHIPPING_SPU_COST', 'MODULE_SHIPPING_SPU_SORT_ORDER', 'MODULE_SHIPPING_SPU_ZONE', 'MODULE_SHIPPING_SPU_ZIP','MODULE_SHIPPING_SPU_ICON');
- }
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/languages/fr_FR/modules/shipping/item.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/shipping/item.txt 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/includes/languages/fr_FR/modules/shipping/item.txt 2012-05-08 10:42:19 UTC (rev 4398)
@@ -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, 12:45
+ @version 2.1.1
+ @date 111/05/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,4 +12,5 @@
$lang['module shipping item text description']="livraison classique :" ;
$lang['module shipping item text way']="soit :" ;
$lang['module shipping item text title in shipping']="transporteur :" ;
+
?>
\ No newline at end of file
Modified: trunk/catalog/includes/languages/fr_FR/modules/shipping/spu.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/shipping/spu.txt 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/includes/languages/fr_FR/modules/shipping/spu.txt 2012-05-08 10:42:19 UTC (rev 4398)
@@ -1,29 +1,17 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @osCommerce, Open Source E-Commerce Solutions Copyright (c) 2003 osCommerce
+ @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.9
- @date 23/05/10, 15:22
+ @version 2.1.1
+ @date 111/05/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@CONTRIB is Store Pickup Shipping Module (http://www.oscommerce.com/community/contributions,164)
Made to work with latest check-out procedure by Matthijs (Mattice) >> e-mail: ma...@xs... >> site: http://www.matthijs.org
*/
-/** Specific install */
-$lang['Store Pickup Cost']="préciser un prix" ;
-$lang['Récupération des articles au magasin']="Récupération des articles au magasin" ;
-$lang['Sort order']="Ordre de tri" ;
-$lang['Preciser un nombre pour le tri']="Preciser un nombre pour le tri" ;
-$lang['Shipping Zone']="Zone de livraison" ;
-$lang['If a zone is selected, only enable this shipping method for that zone.']="Preciser que quelle zone ce mode d'expedition sera disponible" ;
-$lang['Store Pick Up Zip Code Allowed']="Préciser les code postal autoriser à disposer de cette méthode" ;
-$lang['Departement autorisé pour le retrait magasin ?']="Département autorisé pour le retrait magasin ?" ;
-/** Specifique admin */
-$lang['Récupération des articles au magasin']="Récupération des articles au magasin" ;
-$lang['Récupération des articles au magasin durant les heures ouvrées.']="Récupération des articles au magasin durant les heures ouvrées." ;
/** Affichage public */
// titre affiche lors choix
Modified: trunk/catalog/includes/modules/shipping/item.php
===================================================================
--- trunk/catalog/includes/modules/shipping/item.php 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/includes/modules/shipping/item.php 2012-05-08 10:42:19 UTC (rev 4398)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 12/03/2012, 15:01
+ @date 111/05/2012, 12:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -18,8 +18,12 @@
public $title;
public $description;
public $icon;
+ public $sort_order;
public $enabled;
+ public $core;
+ public $tax_class;
+
// class constructor
public function __construct() {
$this->code = 'item';
@@ -72,36 +76,23 @@
}
-/** Interface InterfaceModule */
- public function check() {
- $DB=Database::getInstance();
- if (!isset($this->_check)) {
- $check_query = $DB->query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_ITEM%' ");
- if( $check_query->__get('numRows') == count($this->keys()) ) $this->_check=true;
- else {
- $this->remove();
- $this->_check=false;
- }
- }
- return $this->_check;
- }
- public function install() {
- }
- public function remove() {
- }
+/** Interface InterfaceModule */
- public function keys() {
- return array(
- 'MODULE_SHIPPING_ITEM_COST',
- 'MODULE_SHIPPING_ITEM_HANDLING',
- 'MODULE_SHIPPING_ITEM_TAX_CLASS',
- 'MODULE_SHIPPING_ITEM_ZONE',
- 'MODULE_SHIPPING_ITEM_SORT_ORDER',
- 'MODULE_SHIPPING_ITEM_ICON'
- );
- }
+
+ /**
+ @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(); }
+ */
+ public function check() { }
+ public function install() { }
+ public function remove() { }
+ public function keys() { }
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/modules/shipping/spu.php
===================================================================
--- trunk/catalog/includes/modules/shipping/spu.php 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/includes/modules/shipping/spu.php 2012-05-08 10:42:19 UTC (rev 4398)
@@ -14,11 +14,12 @@
*/
class spu
implements InterfaceModule, InterfaceAcaShipping{
- var $code;
- var $title;
- var $description;
- var $icon;
- var $enabled;
+ public $code;
+ public $title;
+ public $description;
+ public $icon;
+ public $sort_order;
+ public $enabled;
/**
class constructor
@@ -27,8 +28,8 @@
$this->code = __CLASS__;
$this->title = __('Récupération des articles au magasin');
$this->description = __('Récupération des articles au magasin durant les heures ouvrées.');
- $this->sort_order = (defined('MODULE_SHIPPING_SPU_SORT_ORDER;')? MODULE_SHIPPING_SPU_SORT_ORDER: 0);
- $this->icon = (tep_not_null('MODULE_SHIPPING_SPU_ICON')? MODULE_SHIPPING_SPU_ICON : '');
+ $this->sort_order = (defined('MODULE_SHIPPING_SPU_SORT_ORDER')? MODULE_SHIPPING_SPU_SORT_ORDER: 0);
+ $this->icon = (defined('MODULE_SHIPPING_SPU_ICON')? MODULE_SHIPPING_SPU_ICON : '');
$this->enabled = true ;
global $order;
@@ -80,50 +81,19 @@
/** Interface InterfaceModule */
- /**
- */
- public function check() {
- if (!isset($this->_check)) {
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_SPU%' ");
- if( tep_db_num_rows($check_query) == count($this->keys()) ) $this->_check=true;
- else {
- $this->remove();
- $this->_check=false;
- }
- }
- return $this->_check;
- }
- /**
- */
- public function install() {
- $DB=Database::getInstance();
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__('Store Pickup Cost'))."', 'MODULE_SHIPPING_SPU_COST', '0.00', '".addslashes(__('Preciser le cout'))."', '6', '0', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".__('Shipping Zone')."', 'MODULE_SHIPPING_SPU_ZONE', '0', '".addslashes(__('If a zone is selected, only enable this shipping method for that zone.'))."', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_shipping(', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__('Sort order'))."', 'MODULE_SHIPPING_SPU_SORT_ORDER', '0', '".addslashes(__('Preciser un nombre pour le tri'))."', '6', '0', now())");
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,set_function) values ('choose icon', 'MODULE_SHIPPING_SPU_ICON', '', 'choose icon transporteur', '6', '0', now(),'tep_cfg_choose_img(')");
- // chargée sur demande
- $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, configuration_type) values ('".addslashes(__('Store Pick Up Zip Code Allowed'))."', 'MODULE_SHIPPING_SPU_ZIP', '01, 07, 26, 38, 42, 69, 74', '".addslashes(__("Departement autorisé pour le retrait magasin ? laisser vide si vous ne l'utilisez pas"))."', '6', '0', now(),0)");
- }
-
- /**
- */
- public function remove() {
- $keys = '';
- $keys_array = $this->keys();
- for ($i=0; $i<sizeof($keys_array); $i++) {
- $keys .= "'" . $keys_array[$i] . "',";
- }
- $keys = substr($keys, 0, -1);
-
- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
- }
-
- /**
- */
- public function keys() {
- return array( 'MODULE_SHIPPING_SPU_COST', 'MODULE_SHIPPING_SPU_SORT_ORDER', 'MODULE_SHIPPING_SPU_ZONE', 'MODULE_SHIPPING_SPU_ZIP','MODULE_SHIPPING_SPU_ICON');
- }
+ /**
+ @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(); }
+ */
+ public function check() { }
+ public function install() { }
+ public function remove() { }
+ public function keys() { }
}
?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-08 10:42:19 UTC (rev 4398)
@@ -91,8 +91,11 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_CHECKOUT_PROCESS_INSTALLED_S', 'MODULE_CHECKOUT_PROCESS_INSTALLED', '', 'MODULE_CHECKOUT_PROCESS_INSTALLED_L', '6', '20', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('MODULE_CHECKOUT_PROCESS_INSTALLED_BO_S', 'MODULE_CHECKOUT_PROCESS_INSTALLED_BO', '', 'MODULE_CHECKOUT_PROCESS_INSTALLED_BO_L', '6', '21', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',', '1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED', '', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED_BO', '', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED', '', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED_BO', '', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ORDER_TOTAL_INSTALLED_S', 'MODULE_ORDER_TOTAL_INSTALLED', 'ot_total.php;ot_subtotal.php;ot_tax.php;', 'MODULE_ORDER_TOTAL_INSTALLED_L', '6', '24', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('MODULE_ORDER_TOTAL_INSTALLED_S', 'MODULE_ORDER_TOTAL_INSTALLED_BO', 'ot_total.php;ot_subtotal.php;ot_tax.php;', 'MODULE_ORDER_TOTAL_INSTALLED_L', '6', '24', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('PLUGIN_GENERIC_INSTALLED_S', 'PLUGIN_GENERIC_INSTALLED', '', 'PLUGIN_GENERIC_INSTALLED_L', '6', '25', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('PLUGIN_PRODUCT_INSTALLED_S', 'PLUGIN_PRODUCT_INSTALLED', '', 'PLUGIN_PRODUCT_INSTALLED_L', '6', '26', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('PLUGIN_ACCOUNT_INSTALLED_S', 'PLUGIN_ACCOUNT_INSTALLED', '', 'PLUGIN_ACCOUNT_INSTALLED_L', '6', '27', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
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-05-08 09:13:10 UTC (rev 4397)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-05-08 10:42:19 UTC (rev 4398)
@@ -109,6 +109,9 @@
UPDATE osc_configuration SET configuration_key = 'MODULE_SHIPPING_INSTALLED',configuration_title = 'Modules de livraison installés',configuration_description = 'Liste des modules de livraison installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: ups.php;flat.php;item.php)',configuration_group_id = 6,use_function = NULL,set_function = 'tep_cfg_Non_Edit('';'',',last_modified = NULL WHERE configuration_key = 'MODULE_SHIPPING_INSTALLED';
UPDATE osc_configuration SET configuration_key = 'MODULE_PAYMENT_INSTALLED',configuration_title = 'Modules de paiement installés',configuration_description = 'Liste des modules de paiement installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)',configuration_group_id = 6,use_function = NULL,set_function = 'tep_cfg_Non_Edit('';'',',last_modified = NULL WHERE configuration_key = 'MODULE_PAYMENT_INSTALLED';
UPDATE osc_configuration SET configuration_key = 'MODULE_ORDER_TOTAL_INSTALLED',configuration_title = 'Modules total commande installés',configuration_description = 'Liste des modules de total installés; séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: ot_subtotal.php;ot_tax.php;ot_shipping.php;ot_total.php)',configuration_group_id = 6,use_function = NULL,set_function = 'tep_cfg_Non_Edit('';'',',last_modified = NULL WHERE configuration_key = 'MODULE_ORDER_TOTAL_INSTALLED';
+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) values ('MODULE_ORDER_TOTAL_INSTALLED_S', 'MODULE_ORDER_TOTAL_INSTALLED_BO', 'ot_total.php;ot_subtotal.php;ot_tax.php;', 'MODULE_ORDER_TOTAL_INSTALLED_L', '6', '24', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+insert 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) values ('MODULE_PAYMENT_INSTALLED_S', 'MODULE_PAYMENT_INSTALLED_BO', '', 'MODULE_PAYMENT_INSTALLED_L', '6', '23', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
+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) values ('MODULE_SHIPPING_INSTALLED_S', 'MODULE_SHIPPING_INSTALLED_BO', '', 'MODULE_SHIPPING_INSTALLED_L', '6', '22', NULL, NOW(), NULL, 'tep_cfg_Non_Edit(\';\',');
UPDATE osc_configuration SET configuration_key = 'PLUGIN_GENERIC_INSTALLED',configuration_title = 'Plugins génériques installés',configuration_description = 'Liste des plugins génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)',configuration_group_id = 6,use_function = NULL,set_function = 'tep_cfg_Non_Edit('';'',',last_modified = '2012-04-04 15:21:40' WHERE configuration_key = 'PLUGIN_GENERIC_INSTALLED';
UPDATE osc_configuration SET configuration_key = 'PLUGIN_PRODUCT_INSTALLED',configuration_title = 'Plugins de produit installés',configuration_description = 'Liste des plugins de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)',configuration_group_id = 6,use_function = NULL,set_function = 'tep_cfg_Non_Edit('';'',',last_modified = '2012-04-04 15:21:40' WHERE configuration_key = 'PLUGIN_PRODUCT_INSTALLED';
UPDATE osc_configuration SET configuration_key = 'PLUGIN_ACCOUNT_INSTALLED',configuration_title = 'Plugins de compte installés',configuration_description = 'Liste des plugins de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)',configuration_group_id = 6,use_function = NULL,set_function = 'tep_cfg_Non_Edit('';'',',last_modified = '2012-04-04 15:21:40' WHERE configuration_key = 'PLUGIN_ACCOUNT_INSTALLED';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-08 09:13:20
|
Revision: 4397
http://oscss.svn.sourceforge.net/oscss/?rev=4397&view=rev
Author: oscim
Date: 2012-05-08 09:13:10 +0000 (Tue, 08 May 2012)
Log Message:
-----------
F#S1032 Fix
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/categories.php
Modified: trunk/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/categories.php 2012-05-07 21:16:15 UTC (rev 4396)
+++ trunk/catalog/admin/includes/modules/pages/categories.php 2012-05-08 09:13:10 UTC (rev 4397)
@@ -530,7 +530,7 @@
sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['categories_id'] . '&action=edit' ),'' ).
sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['categories_id'] . '&action=delete') ,'' ),
- sprintf(CsrtAction::getLink('row_action_right', ICON_FOLDER, 'childs'), '', tep_href_link(self::FILENAME, 'cPath=' . $categories['cPath'] ),'' ).
+ sprintf(CsrtAction::getLink('row_action_right', ICON_FOLDER, 'childs'), '', tep_href_link(self::FILENAME, 'cPath=' . $categories['categories_id'] ),'' ).
sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'cPath=' . $categories['cPath'],'SSL', true, 'forceview') ,' target="blank" ' )
);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-07 21:16:23
|
Revision: 4396
http://oscss.svn.sourceforge.net/oscss/?rev=4396&view=rev
Author: oscim
Date: 2012-05-07 21:16:15 +0000 (Mon, 07 May 2012)
Log Message:
-----------
FIX FS#1049
nettoayge est normalisation du code
Modified Paths:
--------------
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/common/classes/datatype_drivers/Data_content.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/includes/classes/drivers/data/content.php
trunk/catalog/includes/classes/drivers/data/product.php
trunk/catalog/includes/classes/page.php
trunk/catalog/templates/defaut/includes/content/sitemap.php
trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -344,9 +344,10 @@
switch(strtolower(DataTypes::$CurrentMode)){
case 'transversal':
case 'listing':
-
+// var_dump('FO_load_page');
$category_depth = $page->GetVar('category_depth');
$current_category_id = $page->GetVar('current_category_id');
+ $breadcrumb=$page->return_object('breadcrumb');
//! Recup des element cat en cours
categorie::resetCacheId((int)$current_category_id);
@@ -359,7 +360,9 @@
//! 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' ");
$lis="'" . (int)$current_category_id . "', ";
- while ($cat= $categories_query->fetchAssoc() ){ $lis .="'".$cat['categories_id']."',"; }
+ while ($cat= $categories_query->fetchAssoc() )
+ $lis .="'".$cat['categories_id']."',";
+
$categories->list=$list= $current_category_id;
$categories->products_total=(isset($count_p)? $count_p : 0 );
@@ -374,6 +377,17 @@
$page->add_var_page('categories',$categories);
$page->add_var_page('category_depth',$category_depth);
+ /// add category names to the breadcrumb trail
+ $cPath_array = $page->GetVar('cPath_array');;
+// print_r($cPath_array);
+ if (isset($cPath_array)) {
+ for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
+ if( ($categories=categorie::get_item((int)$cPath_array[$i])) !=false)
+ $breadcrumb->add($categories->categories_name, tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
+ else break;
+ }
+ }
+
// var use in draw master detail listing
$obj = new stdClass();
$obj->image = $categories->categories_image;
Modified: trunk/catalog/common/classes/datatype_drivers/Data_content.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -287,8 +287,14 @@
// call transversal load in other modules
DataTypes::transversal('transversal');
+ $content = content::get_item((int)$_GET['content']);
+
+ $page->title=$content->title;
+ $breadcrumb->add($content->title, $content->href);
+
$page_content = $page->force_content('content.php');
+ $page->add_var_page('content',$content);
$page->add_var_page('current_id',@$_GET['content']);
return $page_content;
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -222,8 +222,8 @@
global $cPath_array;
if (tep_not_null($current_category_id)) {
+ self::get_parent_categories($cPath_array, $current_category_id) ;
- $cPath_array = self::get_parent_categories(array(), $current_category_id) ;
$cPath_array[] = $current_category_id;
$cPath_new = implode('_', $cPath_array);
}
@@ -279,10 +279,10 @@
$db_list=self::get_query((int)$categories_id);
foreach($db_list as $cats) {
if ($cats->parent_id == 0)
- return array();
+ return $categories_id;
$categories[sizeof($categories)] = $cats->parent_id;
if ($cats->parent_id != $categories_id) {
- $categories = self::get_parent_categories($categories, $cats->parent_id);
+ self::get_parent_categories($categories, $cats->parent_id);
}
}
}
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -76,10 +76,15 @@
public static $cache=array();
//! @p array
public static $opt=array();
+ /**
+ @var array cache
+ */
+ public static $object_data;
+ /**
+ @var array cache
+ */
+ public static $array_data=array();
- //! @p array cache
- public static $array_data=array();
-
//! @p string
private static $where_query='';
//! @p object
@@ -103,16 +108,16 @@
$tabl=$res=array();
while ($content = $content_query->fetchAssoc()) {
if (!in_array($content['name'],$exclude)) {
- $res=$content;
+ $res=$content;
- $res['href']=tep_href_link(FILENAME_CONTENT,'content=' . $content['id']);
- $res['key']=$content['name'];
- $res['original']=$content['text'];
- $res['images']=array();
+ $res['href']=tep_href_link(FILENAME_CONTENT,'content=' . $content['id']);
+ $res['key']=$content['name'];
+ $res['original']=$content['text'];
+ $res['images']=array();
- self::$array_data[$content['id']]=$tabl[$content['id']]=new objectInfo($res);
- self::$array_data[$content['id']]->text=self::parse_content($res['text'],$content['id']);
- self::add_cache($content['id']);
+ self::$array_data[$content['id']]=$tabl[$content['id']]=new objectInfo($res);
+ self::$array_data[$content['id']]->text=self::parse_content($res['text'],$content['id']);
+ self::add_cache($content['id']);
}
}
@@ -138,7 +143,7 @@
Requeteur
*/
protected static function cstr_query($orderby='', $limit='', $option=''){
- $query="SELECT content_title AS title, c.content_id AS id, c.content_name AS name, content_text AS text, c.date_added as date_added
+ $query="SELECT content_title AS title, c.content_id AS id, c.content_name AS name, content_text AS text, c.date_added as date_added, ctc.categories_id
FROM " . TABLE_CONTENT_DESCRIPTION . " cd, " . TABLE_CONTENT . " c, " . TABLE_CONTENT_TO_CATEGORIES . " ctc, " . TABLE_CATEGORIES . " cat
WHERE cat.categories_id=ctc.categories_id " . DataForceStatus(" AND cat.categories_status='1' ") . " " . DataForceStatus(" AND c.content_status = '1' ") . " AND c.content_id = ctc.content_id AND cd.content_id = ctc.content_id AND cd.language_id = '" . self::$lg_id . "' " ;
@@ -170,18 +175,18 @@
$sortie=(isset(self::$opt['img']) && !_test_bool(self::$opt['img']))? preg_replace($pattern, '', $content) : $content;
if(isset(self::$opt['more']) && _test_bool(self::$opt['more'])){
if(strpos($sortie,'<!-- pagebreak -->') > 0)
- $sortie = substr($sortie, 0, strpos($sortie,'<!-- pagebreak -->'));
+ $sortie = substr($sortie, 0, strpos($sortie,'<!-- pagebreak -->'));
}
/// process replace in text the var config in constante
$pattern = "/%_.*_%/i";
preg_match_all($pattern, $sortie, $replace,PREG_OFFSET_CAPTURE);
foreach($replace as $item){
if(isset($item[0][0])){
- $i= (string)$item[0][0];
- if($i =='') break;
- $re = substr( $i, 2 , strlen($i)-4) ;
- if($re !='' && tep_cst_define($re) !=false){
- $sortie = preg_replace("/%_".$re."_%/",tep_cst_define($re) , $sortie );
+ $i= (string)$item[0][0];
+ if($i =='') break;
+ $re = substr( $i, 2 , strlen($i)-4) ;
+ if($re !='' && tep_cst_define($re) !=false){
+ $sortie = preg_replace("/%_".$re."_%/",tep_cst_define($re) , $sortie );
}
}
}
@@ -259,7 +264,8 @@
}else{
$db_list=self::get_query('',$id);
foreach($db_list as $item)
- if((string)$id==(string)$item->name)return $item;
+ if((string)$id==(string)$item->name)
+ return $item;
}
return false;
}
@@ -292,17 +298,13 @@
public static function get_content_path($content_id) {
$cPath = '';
- $category_query = tep_db_query("select p2c.categories_id from " . TABLE_CONTENT . " p, " . TABLE_CONTENT_TO_CATEGORIES . " p2c where p.content_id = '" . (int)$content_id . "' and p.content_status = '1' and p.content_id = p2c.content_id limit 1");
- if (tep_db_num_rows($category_query)) {
- $category = tep_db_fetch_array($category_query);
+ if((int)$content_id ==0 )return false;
+ if( ($category=self::get_item($content_id)) == false) return false;
- $categories = tep_get_parent_categories(array(), $category['categories_id']);
- $categories = array_reverse($categories);
- $cPath = implode('_', $categories);
+ $cPath = categorie::get_path( $category->categories_id);
- if (tep_not_null($cPath)) $cPath .= '_';
- $cPath .= $category['categories_id'];
- }
+ if(!is_object(self::$object_data[(int)$content_id])) self::$object_data[(int)$content_id]=new objectInfo(array());
+ self::$object_data[(int)$content_id]->cPath=$cPath;
return $cPath;
}
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -186,10 +186,13 @@
@var $cache array cache result
*/
public static $cache=array();
-
- //! @p object cache
+ /**
+ @var array cache
+ */
public static $object_data;
- //! @p array cache
+ /**
+ @var array cache
+ */
public static $array_data=array();
//! @p string
@@ -437,13 +440,8 @@
if((int)$products_id ==0 )return false;
if( ($category=self::get_item($products_id)) == false) return false;
- $categories =tep_get_parent_categories(array(), $category->categories_id);
- $categories = array_reverse($categories);
- $cPath = implode('_', $categories);
+ $cPath = categorie::get_path( $category->categories_id);
- if (tep_not_null($cPath)) $cPath .= '_';
- $cPath .= $category->categories_id;
-
if(!is_object(self::$object_data[(int)$products_id])) self::$object_data[(int)$products_id]=new objectInfo(array());
self::$object_data[(int)$products_id]->cPath=$cPath;
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/includes/classes/page.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -484,7 +484,7 @@
$this->new_class('breadcrumb');
/// initialise beradcumb
$this->breadcrumb->add(HEADER_TITLE_TOP, tep_get_httpdir() );
- $this->breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));
+// $this->breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));
/* Init class gestion js */
@@ -504,6 +504,7 @@
/// add category names to the breadcrumb trail
+/// TODO A deporter dans le datatype mode transversal
if (isset($this->page['var']['cPath_array'])) {
for ($i=0, $n=sizeof($this->page['var']['cPath_array']); $i<$n; $i++) {
if( ($categories=categorie::get_item((int)$this->page['var']['cPath_array'][$i])) !=false)
Modified: trunk/catalog/templates/defaut/includes/content/sitemap.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/sitemap.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/catalog/templates/defaut/includes/content/sitemap.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -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 30/11/10, 21:57
+ @version 2.1.1
+ @date 08/05/2012, 21:57
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief Sitmap website
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-05-07 19:14:30 UTC (rev 4395)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-05-07 21:16:15 UTC (rev 4396)
@@ -81,7 +81,7 @@
global $languages_id;
- $this->RootListing = array_map('trim',explode(',',DATATYPES_ROOTLISTING__DATATYPE_REPLACE_MAJ_));
+// $this->RootListing = array_map('trim',explode(',',DATATYPES_ROOTLISTING__DATATYPE_REPLACE_MAJ_));
if($next) {
$this->listing_sql['tables'] = " FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " ".$this->p." ".
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|