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-03 08:11:38
|
Revision: 4370
http://oscss.svn.sourceforge.net/oscss/?rev=4370&view=rev
Author: oscim
Date: 2012-05-03 08:11:27 +0000 (Thu, 03 May 2012)
Log Message:
-----------
report element pour barre progress in checkout
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2012-05-03 07:59:08 UTC (rev 4369)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2012-05-03 08:11:27 UTC (rev 4370)
@@ -345,8 +345,8 @@
/*checkout */
div.orderProcess p.checkoutComment {clear:both;}
div.orderProcess fieldset {clear:both;}
-
-
+
+
/* Account page */
#account div.box{
float:left;
@@ -358,13 +358,36 @@
#account div.box div.contentBox{
padding:5px;
}
-
-
+
+
/* Process */
-
-
+
+
/* Shipping */
ul.shippingSelect.listSelect.listModules ,
ul.shippingSelect.listSelect.listModules li,
ul.shippingSelect.listSelect.listModules li label {width:100%; display:block; float:none;}
-/* {width:100%; display:block;} */
\ No newline at end of file
+/* {width:100%; display:block;} */
+
+/* etapes de la commande - barre verte du haut --*/
+div#progress { margin: 0 auto; width:650px}
+ul.checkoutBar { margin:20px 0 0 0 ;padding:0;}
+ul.checkoutBar li{/*background:url("images/progress_empty.gif") no-repeat scroll right top transparent;*/ display:inline-block; height:50px; margin:0 0 0 -3px; padding:0; width:122px;}
+ul.checkoutBar li a,
+ul.checkoutBar li span{position:relative; display:inline-block; top:-20px; left:45px; width:150px; text-align:center; white-space:nowrap;}
+/* ul.checkoutBar li.barCheck{background:url("images/progress.gif") no-repeat scroll right 2px transparent; }*/
+
+ul.checkoutBar li.start{/*background:url("images/progress_start.gif") no-repeat scroll right top transparent;*/ width:50px;}
+ul.checkoutBar li.start a,
+ul.checkoutBar li.start span{left:-30px; width:150px; }
+ul.checkoutBar li.end{/*background:url("images/progress_end.gif") no-repeat scroll right 2px transparent;*/ width:139px;}
+ul.checkoutBar li.end a,
+ul.checkoutBar li.end span{left:30px; width:150px; }
+
+li.barCheck a,
+li.barCheck span {color:#847676; text-decoration:none}
+
+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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 07:59:19
|
Revision: 4369
http://oscss.svn.sourceforge.net/oscss/?rev=4369&view=rev
Author: oscim
Date: 2012-05-03 07:59:08 +0000 (Thu, 03 May 2012)
Log Message:
-----------
Correction coquille li?\195?\169e alert stock
Correction htaccess modele et ceux gener?\195?\169 dans le backoffice, qui produisaient un erreur lors de l'utilisation du bouton mise a jour
correction affichage de la taxe, qu ne prennait pas en compte la quantit?\195?\169
Modified Paths:
--------------
trunk/catalog/common/classes/datatype_drivers/Data_diver.php
trunk/catalog/includes/application_top.php
trunk/catalog/includes/classes/Stock.php
trunk/catalog/includes/classes/order_total.php
trunk/catalog/includes/classes/shopping_cart_action.php
trunk/catalog/install/includes/modele/htaccess.txt
trunk/catalog/templates/defaut/includes/content/shopping_cart.php
Modified: trunk/catalog/common/classes/datatype_drivers/Data_diver.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_diver.php 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/common/classes/datatype_drivers/Data_diver.php 2012-05-03 07:59:08 UTC (rev 4369)
@@ -41,6 +41,8 @@
'deb' =>"
## contact
RewriteRule ^contact.(php|%_EXT_%)$ index.php?d=contact.php&%{QUERY_STRING} [L,QSA]
+## panier
+ RewriteRule ^shopping_cart.(php|html)$ index.php?d=shopping_cart.php&%{QUERY_STRING} [L,QSA]
## Move xxxx.php >> xxx.html
RewriteCond %{REQUEST_FILENAME} !-f
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/includes/application_top.php 2012-05-03 07:59:08 UTC (rev 4369)
@@ -362,7 +362,8 @@
/// Shopping cart actions
if (isset($_GET['action'])) {
/// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
- if ($session_started == false) tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
+ if ($session_started == false)
+ tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
$shop_action=new shopping_cart_action();
$shop_action->init($_GET['action']);
}
Modified: trunk/catalog/includes/classes/Stock.php
===================================================================
--- trunk/catalog/includes/classes/Stock.php 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/includes/classes/Stock.php 2012-05-03 07:59:08 UTC (rev 4369)
@@ -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 29/11/10, 11:33
+ \version 2.1.1
+ \date 04/05/2012, 11:33
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class Stock
@@ -37,6 +37,9 @@
true = alert
*/
public static function check_inline($product){
+ if( !_cst_bool('STOCK_CHECK') )
+ return false;
+
$attributes= (is_array($product['attributes']) ? $product['attributes'] : array() );
switch($product['track_stock']) {
Modified: trunk/catalog/includes/classes/order_total.php
===================================================================
--- trunk/catalog/includes/classes/order_total.php 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/includes/classes/order_total.php 2012-05-03 07:59:08 UTC (rev 4369)
@@ -124,7 +124,7 @@
} else {
reset($this->modules);
foreach ($this->modules as $key=>$module) {
- $funct='shopping_cart_action';
+ $funct='shopping_cart_action';
if (($module->enabled) and (method_exists($module, $funct ))) {
return $this->modules[$key]->$funct($action);
}
Modified: trunk/catalog/includes/classes/shopping_cart_action.php
===================================================================
--- trunk/catalog/includes/classes/shopping_cart_action.php 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/includes/classes/shopping_cart_action.php 2012-05-03 07:59:08 UTC (rev 4369)
@@ -41,10 +41,10 @@
global $cart;
for ($i=0, $n=sizeof($_POST['products_id']); $i<$n; $i++) {
if (isset($_POST['cart_delete']) && in_array($_POST['products_id'][$i], (is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array()) )) {
- $cart->remove($_POST['products_id'][$i]);
+ $cart->remove($_POST['products_id'][$i]);
} else {
- $attributes = (isset($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : '');
- $cart->add_cart($_POST['products_id'][$i], (int)tep_output_string_protected($_POST['cart_quantity'][$i]), $attributes, false);
+ $attributes = (isset($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : '');
+ $cart->add_cart($_POST['products_id'][$i], (int)tep_output_string_protected($_POST['cart_quantity'][$i]), $attributes, false);
}
}
}
Modified: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2012-05-03 07:59:08 UTC (rev 4369)
@@ -118,6 +118,8 @@
RewriteRule ^error/([0-9]*).html index.php?ServerError=$1 [L]
## Datatype - Data_diver## contact
RewriteRule ^contact.(php|html)$ index.php?d=contact.php&%{QUERY_STRING} [L,QSA]
+## panier
+ RewriteRule ^shopping_cart.(php|html)$ index.php?d=shopping_cart.php&%{QUERY_STRING} [L,QSA]
## Move xxxx.php >> xxx.html
RewriteCond %{REQUEST_FILENAME} !-f
Modified: trunk/catalog/templates/defaut/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/shopping_cart.php 2012-05-03 07:13:29 UTC (rev 4368)
+++ trunk/catalog/templates/defaut/includes/content/shopping_cart.php 2012-05-03 07:59:08 UTC (rev 4369)
@@ -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 18/12/11, 21:44
+ @date 04/05/2012, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -20,7 +20,7 @@
<?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
<?php if($boxe)echo unhtmlentities($boxe->content) ?>
- <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
+ <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product'),'post'); ?>
<?php if ($cart->count_contents() > 0): ?>
@@ -41,7 +41,7 @@
<?php echo $DCart->hidden ; ?>
- <?php foreach($DCart->products as $i=>$product): ?>
+ <?php foreach($DCart->products as $i=>$product): ?>
<tr id="cart-line-<?php echo $i; ?>" class="cart-line <?php echo ($i%2)?'pair':'impair'; ?>">
<td class="cart-line desc">
<?php echo $product['name'] ;?><span id="ajaxcarttext<?php echo $i; ?>"><?php echo $product['alert_stock'] ;?></span>
@@ -51,18 +51,18 @@
</td>
<td class="cart-line qty tcenter">
<input class="Bt button cart-line" type="button" value="+" >
- <?php echo tep_draw_input_field('cart_quantity[]','cartQty_'.$i, $product['quantity'], 'class="CartQty" ');?>
+ <?php echo tep_draw_input_field('cart_quantity['.$i.']','cartQty_'.$i, $product['quantity'], 'class="CartQty" ');?>
<input class="Bt button cart-line" type="button" value="-" >
- <?php echo tep_draw_hidden_field('products_id[]', $product['id']) ; ?>
+ <?php echo tep_draw_hidden_field('products_id['.$i.']', $product['id']) ; ?>
</td>
<td class="cart-line taxe tcenter">
<?php echo tep_get_tax_rate($product['tax_class_id']) ;?> </span>
</td>
<td class="cart-line tottaxe tright">
- <span id="ajaxcarttaxe<?php echo $i; ?>" class="cartPrice"> <?php echo$currencies->format( ($product['final_price_ttc'] - $product['final_price']) ) ;?> </span>
+ <span id="ajaxcarttaxe<?php echo $i; ?>" class="cartPrice"> <?php echo$currencies->format( ($product['final_price_ttc'] - $product['final_price'])* (int)$product['quantity'] ) ;?> </span>
</td>
<td class="cart-line totttc tright">
- <span id="ajaxcartPrice<?php echo $i; ?>" class="cartPrice"> <?php echo $currencies->format(tep_add_tax($product['final_price'], tep_get_tax_rate($product['tax_class_id'])) *$product['quantity'] ) ;?> </span>
+ <span id="ajaxcartPrice<?php echo $i; ?>" class="cartPrice"> <?php echo $currencies->format(tep_add_tax($product['final_price'], tep_get_tax_rate($product['tax_class_id'])) * (int)$product['quantity'] ) ;?> </span>
</td>
<td class="cart-line tcenter">
<span id="ajaxcartdel<?php echo $i; ?>"> <?php echo tep_draw_checkbox_field('cart_delete['.$i.']','CartDel_'.$i, $i, false, 'class="CartDel" ');?> </span>
@@ -70,7 +70,7 @@
</tr>
- <?php endforeach; ?>
+ <?php endforeach; ?>
</table>
@@ -81,15 +81,15 @@
<div class="SubTotal">
<ul id="TotCart">
- <?php foreach($cart->show_list_total() as $i=>$tot): ?>
- <li><?php printf('<span class="text">%s </span><span class="value"> %s </span>' ,$tot->text, $currencies->format($tot->value)); ?></li>
- <?php endforeach; ?>
+ <?php foreach($cart->show_list_total() as $i=>$tot): ?>
+ <li><?php printf('<span class="text">%s </span><span class="value"> %s </span>' ,$tot->text, $currencies->format($tot->value)); ?></li>
+ <?php endforeach; ?>
- <?php if($cart->get_content_type() !='virtual'): ?>
- <li id="ajaxcartWeight" class="cartWeight">
- <?php echo '<span class="text">' . SUB_TITLE_WEIGHT_TOTAL .'</span><span class="value">' . $cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span>'; ?>
- </li>
- <?php endif; ?>
+ <?php if($cart->get_content_type() !='virtual'): ?>
+ <li id="ajaxcartWeight" class="cartWeight">
+ <?php echo '<span class="text">' . SUB_TITLE_WEIGHT_TOTAL .'</span><span class="value">' . $cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span>'; ?>
+ </li>
+ <?php endif; ?>
</ul>
</div>
@@ -107,11 +107,11 @@
<div class="Bt navBt block">
- <?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=resetCart') . '">' . IMAGE_BUTTON_RESET_CART . '</a>'; ?>
- <input class="Bt navBt submit" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE_CART; ?>" />
+ <?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=resetCart') . '">' . IMAGE_BUTTON_RESET_CART . '</a>'; ?>
+ <input class="Bt navBt submit" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE_CART; ?>" />
- <?php echo '<a class="Bt navBt link" href="' . $navigation->GetBack() . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>'; ?>
- <?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
+ <?php echo '<a class="Bt navBt link" href="' . $navigation->GetBack() . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>'; ?>
+ <?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
</div>
@@ -120,7 +120,7 @@
<div class="infoText"><?php echo TEXT_CART_EMPTY; ?></div>
<div class="Bt navBt block">
- <?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . IMAGE_BUTTON_CONTINUE . '</a>'; ?>
+ <?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . IMAGE_BUTTON_CONTINUE . '</a>'; ?>
</div>
<?php endif; ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 07:13:39
|
Revision: 4368
http://oscss.svn.sourceforge.net/oscss/?rev=4368&view=rev
Author: oscim
Date: 2012-05-03 07:13:29 +0000 (Thu, 03 May 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql 2012-05-02 19:42:52 UTC (rev 4367)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql 2012-05-03 07:13:29 UTC (rev 4368)
@@ -17,4 +17,4 @@
ALTER TABLE osc_products_options_values ADD CONSTRAINT fk_osc_products_options_values_lgid FOREIGN KEY (language_id) REFERENCES osc_languages (languages_id);
-ALTER TABLE osc_products_options_values ADD CONSTRAINT fk_osc_products_options_values_products_options_values_id FOREIGN KEY (products_options_values_id) REFERENCES osc_products_options (products_options_id);
\ No newline at end of file
+-- ALTER TABLE osc_products_options_values ADD CONSTRAINT fk_osc_products_options_values_products_options_values_id FOREIGN KEY (products_options_values_id) REFERENCES osc_products_options (products_options_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-02 19:42:58
|
Revision: 4367
http://oscss.svn.sourceforge.net/oscss/?rev=4367&view=rev
Author: oscim
Date: 2012-05-02 19:42:52 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Added Paths:
-----------
trunk/catalog/includes/modules/listing_featured.php
Added: trunk/catalog/includes/modules/listing_featured.php
===================================================================
--- trunk/catalog/includes/modules/listing_featured.php (rev 0)
+++ trunk/catalog/includes/modules/listing_featured.php 2012-05-02 19:42:52 UTC (rev 4367)
@@ -0,0 +1,100 @@
+<?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 05/03/2012, 17:29
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief this generic module for call featured datatype
+*/
+
+
+function sql_listing_featured(){
+ global $product_info;
+
+
+ //! @remarks depend Data_product active
+ if( ! DataTypes::is_active('manufacturer') || ! DataTypes::is_active('product') )
+ return false;
+
+ $page=page::getInstance();
+ $DB=Database::getInstance();
+ $languages_id=$page->the_var('languages_id');
+
+
+
+ // no limit in sql , restric based on php control
+ $sql="SELECT * ".
+ " FROM " . TABLE_FEATURED . " f ".
+ " LEFT JOIN " . TABLE_FEATURED_DATA. " fd ON(fd.featured_id = f.row_id) ".
+ " WHERE 1 ".
+ " ORDER BY f.row_id DESC "; //. $page->_conf_value('MAX_DISPLAY_MANUFACTURER_PRODUCTS');
+
+
+
+ $_query = $DB->query( $sql );
+ if ($_query->__get('NumRows') > 0) return $_query;
+ else return false;
+}
+
+
+function in_obj_listing_featured($type){
+ global $page;
+
+ $resobj=$page->oscss_modules->_resultsql('listing_featured');
+
+ // type data for process , extract in DataTypes class
+// $subtype = DataTypes::GetTypePage('sub');
+
+
+ if( $resobj ==false )
+ return null;
+
+ // required by products
+ $languages_id=$page->the_var('languages_id');
+ $currencies=$page->return_object('currencies');
+
+ $p=array();
+ $result_subtype = '';
+
+ // loop for extract
+// while ($listing = tep_db_fetch_array($listing_query)){
+ foreach($resobj->fetchAllAssoc() as $listing){
+
+
+ $subtype = $listing['datatype'];
+
+ if(empty($result_subtype))
+ $result_subtype = $subtype;
+ elseif ($result_subtype != $subtype)
+ $result_subtype = '';
+
+
+ if(!isset($listing['datatype_id']) )
+ continue;
+
+ // result
+ $pd=$subtype::get_item($listing['datatype_id']);
+ if(!$pd )
+ continue;
+ // call loop for Aca modules
+// $pd->aca=$aca_listing->return_db_min($listing['datatype_id']);
+ // add type data in current item
+ $pd->type = $subtype;
+ $p[]=$pd;
+ }
+
+// print_r($p);
+// exit;
+ return new objectInfo(array(
+ 'title'=>'',
+ 'content'=>$p, // all array result
+ 'split'=> $listing_split , // object for link split page
+ 'type'=>$subtype // type result
+ ));
+
+}
+
+?>
\ 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-02 18:54:46
|
Revision: 4366
http://oscss.svn.sourceforge.net/oscss/?rev=4366&view=rev
Author: oscim
Date: 2012-05-02 18:54:40 +0000 (Wed, 02 May 2012)
Log Message:
-----------
ajustement css theme
ajustement generation des pdf , valeur a off
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2012-05-02 17:59:46 UTC (rev 4365)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2012-05-02 18:54:40 UTC (rev 4366)
@@ -121,7 +121,7 @@
}
p {
- padding-bottom: 20px;
+ padding:10px;
}
form p{width:100%;display:block; float:left;}
@@ -143,7 +143,7 @@
#content {
float: right;
- width: 74%;
+ width: 76%;
margin:10px 0 10px 0;
padding:5px 0 0 0;
}
@@ -151,7 +151,7 @@
aside {
float: left;
- width: 26%;
+ width: 24%;
margin:0;
padding:0;
}
@@ -184,7 +184,7 @@
/* sidebar */
aside section {
margin: 10px 12px 0 0;
- padding: 10px 15px 10px 0;
+/* padding: 10px 15px 10px 0; */
}
aside section ul {
@@ -357,4 +357,14 @@
}
#account div.box div.contentBox{
padding:5px;
- }
\ No newline at end of file
+ }
+
+
+ /* Process */
+
+
+ /* Shipping */
+ ul.shippingSelect.listSelect.listModules ,
+ ul.shippingSelect.listSelect.listModules li,
+ ul.shippingSelect.listSelect.listModules li label {width:100%; display:block; float:none;}
+/* {width:100%; display:block;} */
\ 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-02 17:59:46 UTC (rev 4365)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-02 18:54:40 UTC (rev 4366)
@@ -336,7 +336,7 @@
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 ('CUSTOMER_PUBLIC_PROFIL_S', 'CUSTOMER_PUBLIC_PROFIL', 'true', 'CUSTOMER_PUBLIC_PROFIL_L', '28', '21', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
-- 128 General environement
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_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 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', 'false', 'USE_LOCAL_GENERAT_PDF_L', '128', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_MODELE_PDF_S', 'USE_MODELE_PDF', 'harry', 'USE_MODELE_PDF_L', '128', '5', NULL, NOW(), NULL, '','2');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_DRIVERS_PAGE_S', 'PUBLIC_DRIVERS_PAGE', 'GabaritTemplate', 'PUBLIC_DRIVERS_PAGE_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('NO_DISPLAY_SYMBOL_TAXE_S', 'NO_DISPLAY_SYMBOL_TAXE', 'GabaritTemplate', 'NO_DISPLAY_SYMBOL_TAXE_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 17:59:53
|
Revision: 4365
http://oscss.svn.sourceforge.net/oscss/?rev=4365&view=rev
Author: oscim
Date: 2012-05-02 17:59:46 +0000 (Wed, 02 May 2012)
Log Message:
-----------
correction diverse mineurs
Suite travail featured
report desactivation colonne et menu si stock inactif
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/07_catalog.php
trunk/catalog/admin/includes/boxes/09_commercial.php
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/database_tables.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/common/classes/datatype_drivers/Data_featured.php
Modified: trunk/catalog/admin/includes/boxes/07_catalog.php
===================================================================
--- trunk/catalog/admin/includes/boxes/07_catalog.php 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/boxes/07_catalog.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -15,6 +15,8 @@
$tabl_link[]= array(FILENAME_PRODUCTS.'?cPath=&action=new', 'BOX_CATALOG_PRODUCT_ADD', 'product_add', @$img['product_add']);
$tabl_link[]= array(FILENAME_PRODUCTS.'?expected=true', 'BOX_CATALOG_PRODUCTS_EXPECTED', 'products', @$img['products']);
$tabl_link[]= array(FILENAME_ATTRIBUTES, 'BOX_CATALOG_ATTIBUTES', 'attributes', @$img['attributes']);
- $tabl_link[]= array(FILENAME_STOCK, 'BOX_CATALOG_STOCK', 'stock', @$img['stock']);
+ if(_cst_bool('STOCK_CHECK'))
+ $tabl_link[]= array(FILENAME_STOCK, 'BOX_CATALOG_STOCK', 'stock', @$img['stock']);
+
?>
\ 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-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/boxes/09_commercial.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -23,5 +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'))
$tabl_link[]= array(FILENAME_FEATURED, 'BOX_FEATURED', 'featured',@$img['featured']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -141,25 +141,24 @@
}
if( DataTypes::is_active('featured')) {
if(count($post['linkto']['featured']) > 0)
- sqlfeatured::AddLinkTo(
+ $r=sqlfeatured::AddLinkTo(
array(
'datatype'=> 'content',
- 'id'=> $products_id,
+ 'id'=> $content_id,
'featured_array'=> $post['linkto']['featured']
)
);
else
- sqlfeatured::AddLinkTo(
+ $r=sqlfeatured::AddLinkTo(
array(
'datatype'=> 'content',
- 'id'=> $products_id,
+ 'id'=> $content_id,
'featured_array'=> array(),
)
);
}
-
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
$language_id = $list_languages[$i]['id'];
@@ -261,16 +260,32 @@
tep_db_free_result($content_query);
}
- $cat_query = $DB->query("select categories_id from " . TABLE_CONTENT_TO_CATEGORIES . " where content_id='" . (int)$row['content_id'] . "' ");
- while($cat_l = tep_db_fetch_array($cat_query)){ $cat_list[$cat_l['categories_id']]=$cat_l; }
- $row['categories']=$cat_list;
-
+ /**
+ TODO Couplage avec MLinkto + datatype actif
+ */
+ if(DataTypes::is_active('categorie')) {
+ $cat_query = $DB->query("select categories_id from " . TABLE_CONTENT_TO_CATEGORIES . " where content_id='" . (int)$row['content_id'] . "' ");
+ while($cat_l = tep_db_fetch_array($cat_query)){ $cat_list[$cat_l['categories_id']]=$cat_l; }
+ $row['categories']=$cat_list;
tep_db_free_result($cat_query);
+ }
+ if( DataTypes::is_active('featured')) {
+ $res= sqlfeatured::ListLinkTo(
+ array(
+ 'datatype'=> 'content',
+ 'id'=> $ID,
+ ), true
+ );
+ foreach($res as $row2)
+ $row['featureds'][$row2->featured_id]=$row2;
+ }
+
+
self::$modules->load_db_values((int)$row['content_id']);
Modified: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -219,7 +219,7 @@
else
$id = (int)$opt['id'];
- if(!isset($opt['datatype']))
+ if(isset($opt['datatype']))
$datatype = $opt['datatype'] ;
else
$datatype = DATATYPES_DEFAULT_NOSELECTED;
@@ -252,7 +252,8 @@
else
$id = (int)$opt['id'];
- if(!isset($opt['datatype']))
+
+ if(isset($opt['datatype']))
$datatype = $opt['datatype'] ;
else
$datatype = DATATYPES_DEFAULT_NOSELECTED;
@@ -263,6 +264,13 @@
sqlfeatureddata::delete(array('datatype'=> $datatype , 'datatype_id'=>$id ));
foreach($data_array_link as $value)
+ if(sqlfeatureddata::fetch(
+ array(
+ 'featured_id'=> $value,
+ 'datatype'=> $datatype,
+ 'datatype_id'=> $id,
+ )
+ ) == false )
$res = sqlfeatureddata::create(
array(
'featured_id'=> $value,
Modified: trunk/catalog/admin/includes/database_tables.php
===================================================================
--- trunk/catalog/admin/includes/database_tables.php 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/database_tables.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -133,11 +133,6 @@
-## featured
- define('TABLE_FEATURED', DB_TABLE_PREFIX . 'featured');
- define('TABLE_FEATURED_DATA', DB_TABLE_PREFIX . 'featured_data');
-
-
## Image index
define('TABLE_IMAGES', DB_TABLE_PREFIX . 'images');
/// TOP Not Used for dev
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-05-02 17:59:46 UTC (rev 4365)
@@ -15,7 +15,7 @@
/* listing */
/* Heading */
- $lang['heading title cms_content']="Gestion du contenu" ;
+ $lang['heading title cms_content']="Gestion des pages" ;
/* Filtre */
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-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-02 17:59:46 UTC (rev 4365)
@@ -4,162 +4,40 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 30/03/2012, 09:32
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
@encode UTF-8
+ @class featureds
*/
-$lang['heading title search']="Rechercher :" ;
-$lang['heading title goto']="Aller à :" ;
+/* Listing */
+ $lang['heading title featureds'] = "Mise en avant" ;
+ $lang['@featureds table heading id'] = "Id" ;
+ $lang['@featureds table heading datatype id'] = "Id." ;
+ $lang['@featureds table heading min'] = "Min." ;
+ $lang['@featureds table heading max'] = "Max." ;
+ $lang['@featureds table heading status'] = "Etat" ;
+ $lang['@featureds table heading status type name'] = "Type" ;
+ $lang['@featureds table heading status type id'] = "Type id" ;
+ $lang['@featureds table heading date_added'] = "Ajouté" ;
+ $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['table heading action'] = "Action" ;
+ /* bouton */
+ $lang['@featureds image add featureds'] = "Ajouter une entrée" ;
-$lang['txt view image']="Voir" ;
-$lang['text new product']="Nouveau Produit " ;
-$lang['text last modified']="Dernière modification :" ;
-$lang['not dispo prev save']="Enregistrer votre produits pour accéder à ces options" ;
-$lang['text edit intro']="Merci de faire les changements nécessaires" ;
-// $lang['text info current categories']="Catégories courantes :" ;
-// $lang['empty category']="Catégorie vide" ;
+/* Edit / add */
+ $lang['@featureds tab specification'] = "Caractéristique" ;
+ $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" ;
-$lang['image preview public']="Prévisualiser la page public" ;
-$lang['image view public']="Voir la page public" ;
-$lang['image special']="Promotion" ;
-$lang['image expected on']="Produits en attente" ;
-$lang['image expected off']="Produits" ;
-$lang['alert quit editeur']="Êtes-vous sûr de vouloir quitter ce produits " ;
-$lang['for manufactured']=" pour créer une nouveau fabricant" ;
-$lang['txt stock']=" Gérer le stock" ;
-$lang['txt all']=" Tout(s)" ;
-// $lang['txt categories']="Catégories" ;
-// $lang['txt cat all']=" Toute(s) catégorie(s)" ;
-
-
-
-
-/* listing */
- /* Heading */
- $lang['heading title products']="Produits" ;
-
- /* Filtre */
- $lang['@products filter tab clause']="Produits" ;
-
- /* All fields used on listign and filters */
- $lang['products table heading id']="id" ;
- $lang['products table heading name']="Produits" ;
- $lang['products table heading modele']="Modèle" ;
- $lang['products table heading image']="Image" ;
- $lang['products table heading status']="Etat" ;
- $lang['products table heading stock']="Stock" ;
- $lang['products table heading price']="Prix" ;
- $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." ;
- $lang['products table heading taxe id']="Tax.id" ;
- $lang['products table heading track_stock']="Suivi stock" ;
-
- $lang['products table heading categories']="Catégories" ;
- $lang['products table heading categories id']="Cat.id" ;
-
- $lang['table heading action']="Action" ;
-
-
- /* Bouton */
- $lang['@products add category datatype product']="Ajouter une catégorie" ;
- $lang['@products image create new product']="Creer un nouveau produit" ;
- $lang['@products link rss low stock']="Suivi alerte stock" ;
-
-
-
-
-/* new products */
- $lang['heading title type']="Type :" ;
- $lang['text info intro choose product type']="Vous devez définir le type du produit, ce type déterminera les fonctionnalités associées. Pour tous les produits qui ne sont pas virtuels, ou ayant des caractéristiques spéciales, le type de 'produit physique'. Pour les produits de type virtuel (logiciel, abonnement, etc, préciser alors son type. ) " ;
-
-/* inline */
- $lang['product type :']="Type :" ;
-
-/* Fiche One products */
- $lang['heading title edit']="Fiche produit - Edition d'un produit" ;
- $lang['tab products data']="Caractéristiques" ;
- $lang['tab products desc']="Descriptions " ;
- $lang['tab products option']="Options" ;
- $lang['tab products cross']="Produits complémentaires" ;
-
- /* Edition products */
- $lang['text edit sort order']="Ordre de tri :" ;
- $lang['text edit product']="Édition Produit " ;
-// $lang['text categories']="Catégories :" ;
- $lang['text products']="Produits :" ;
- $lang['text products price info']="Prix :" ;
- $lang['text products tax class']="Classe fiscale :" ;
- $lang['text products price net']=" HT :" ;
- $lang['text products price gross']=" TTC :" ;
- $lang['text products final price']="Prix final : " ;
- $lang['text products quantity info']="Quantité :" ;
- $lang['text date added']="Date d'ajout :" ;
- $lang['text date available']="Date de disponibilité :" ;
- $lang['text products type']="Type de produit :" ;
- $lang['text products ordered']="Ordre tri:" ;
- $lang['text sort order']="Ordre de tri :" ;
- $lang['text products status']="Statut :" ;
- $lang['text products date available']="Date de disponibilité :" ;
- $lang['text products date format']="<small>(jj/mm/aaaa)</small>" ;
- $lang['text product available']="Actif " ;
- $lang['text product not available']="Désactivé" ;
- $lang['text products name']="Nom :" ;
- $lang['text products description']="Description :" ;
- $lang['text products quantity']="Quantité :" ;
- $lang['text products model']="Modèle :" ;
- $lang['text products image']="Image :" ;
- $lang['text products weight']="Poids :" ;
- $lang['text products weight help']="le poids du produit est nécessaire pour calculer les frais de livraison" ;
- $lang['text product more information']="Pour plus d'information, merci de visiter cette <a href=\"http://%s\">page web</a> de produits." ;
- $lang['text product date added']="Ce produit a été ajouté à notre catalogue le %s." ;
- $lang['text product date available']="Ce produit sera en stock le %s." ;
- $lang['text customers groups']="Groupe : " ;
- $lang['text customers groups note']="Tarif Groupe" ;
- $lang['text customers groups note detail']="Notez que si un champ est laissé vide, aucun prix pour ce groupe de clients sera inséré dans la base de données. Si un champ est rempli, mais la case n'est pas cochée, aucun prix ne sera inséré. Si un prix est déjà inséré dans la base de données, mais la case n'est pas cochée, celui-ci sera supprimé de la base de données." ;
-
- $lang['text legend stock']="Stock" ;
- $lang['text legend price']="Prix" ;
- $lang['text legend image']="Image" ;
-
-
- /* js alert */
- $lang['js alert products name']="Le nom du produit est obligatoire" ;
-
-
-/* delete products */
- $lang['text info heading delete product']="Supprimer le produit" ;
- $lang['text delete product intro']="Êtes-vous sûr de vouloir supprimer définitivement ce produit ?" ;
-
-/* duplicate products */
- $lang['text info copy to intro']="Veuillez choisir une nouvelle catégorie dans laquelle vous souhaitez copier ce produit" ;
- $lang['text info heading copy to']="Copier vers" ;
-
- $lang['create products in new link categorie for %s']="Copie réussie du produit" ;
- $lang['error for create products in new link categorie for %s']="Erreur lors de la copie du produit" ;
-
-
-
-/* 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 " ;
-?>
\ No newline at end of file
+/* rightto */
+ $lang['@featureds txt link to'] = "Mise en avant" ;
+?>
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-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-02 17:59:46 UTC (rev 4365)
@@ -51,6 +51,7 @@
$lang['products table heading name']="Produits" ;
$lang['products table heading modele']="Modèle" ;
$lang['products table heading image']="Image" ;
+ $lang['products table heading quantity']="Qté." ;
$lang['products table heading status']="Etat" ;
$lang['products table heading stock']="Stock" ;
$lang['products table heading price']="Prix" ;
@@ -63,7 +64,7 @@
$lang['products table heading last modified']="Modifiés" ;
$lang['products table heading available']="Dispo." ;
$lang['products table heading taxe id']="Tax.id" ;
- $lang['products table heading track_stock']="Suivi stock" ;
+ $lang['products table heading track_stock']="Mode stock" ;
$lang['products table heading categories']="Catégories" ;
$lang['products table heading categories id']="Cat.id" ;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -260,11 +260,18 @@
'text'=>__('products table heading taxe id'),
);
- self::$allfields['p.track_stock']= array(
+ if(_cst_bool('STOCK_CHECK')) {
+ self::$allfields['p.products_quantity']= array(
'sort'=>true,
+ 'alias'=>'quantity',
+ 'text'=>__('products table heading quantity'),
+ );
+ self::$allfields['p.track_stock']= array(
+ 'sort'=>true,
'alias'=>'track_stock',
'text'=>__('products table heading track_stock'),
);
+ }
self::$allfields['p.products_date_added']= array(
'sort'=>true,
@@ -463,15 +470,17 @@
'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype='.self::$datatype.'&action=new_light&origin='. self::FILENAME),
);
- $i++;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'button linkrss',
- 'title'=>tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .__('@products link rss low stock'),
- 'url'=>tep_href_link(FILENAME_FEEDS,'box=low_stock'),
- );
+ if(_cst_bool('STOCK_CHECK')) {
+ $i++;
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button linkrss',
+ 'title'=>tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .__('@products link rss low stock'),
+ 'url'=>tep_href_link(FILENAME_FEEDS,'box=low_stock'),
+ );
+ }
}
Modified: trunk/catalog/common/classes/datatype_drivers/Data_featured.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_featured.php 2012-05-02 13:13:49 UTC (rev 4364)
+++ trunk/catalog/common/classes/datatype_drivers/Data_featured.php 2012-05-02 17:59:46 UTC (rev 4365)
@@ -38,8 +38,8 @@
@var DataType Tables define
*/
public $db_tables = array(
- 'TABLE_FEATURED' => 'featureds', //
- 'TABLE_FEATURED_DATA' => 'featureds_data' //
+ 'TABLE_FEATURED' => 'featured', //
+ 'TABLE_FEATURED_DATA' => 'featured_data' //
);
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 13:13:56
|
Revision: 4364
http://oscss.svn.sourceforge.net/oscss/?rev=4364&view=rev
Author: oscim
Date: 2012-05-02 13:13:49 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Suite travail evolution myacount et module account
correction coquille , ajsutement fonctionnement , nettoyage code, deport des gabarit dans un sous dossier appropri?\195?\169
Modified Paths:
--------------
trunk/catalog/includes/modules/account/address_book.php
trunk/catalog/templates/defaut/includes/gabarit/address_book_details.gab
Added Paths:
-----------
trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.delete.gab
trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.edit.gab
trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.page.gab
Modified: trunk/catalog/includes/modules/account/address_book.php
===================================================================
--- trunk/catalog/includes/modules/account/address_book.php 2012-05-02 12:30:16 UTC (rev 4363)
+++ trunk/catalog/includes/modules/account/address_book.php 2012-05-02 13:13:49 UTC (rev 4364)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 15/04/2012, 22:44
+ @date 02/05/2012, 22:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*\dir includes/modules/account/
@@ -101,8 +101,8 @@
switch (self::$action) {
- case 'update':
- case 'new':
+ case 'ab_update':
+ case 'ab_insert':
/**
@brief use class customer class
*/
@@ -110,7 +110,10 @@
/// force retour error sans session
customer::definePostMess(0);
+ if(isset($_REQUEST['id']))
+ $new_address_book_id= (int)tep_db_input($_REQUEST['id']);
+
if ( ($resul=$custo->CheckDataAddressBook($_POST, 'addressbook')) && $resul !=false && is_array($resul)) {
if (_cst_bool('CUSTOMER_FORCE_UCWORDS')) {
@@ -142,16 +145,17 @@
if (isset($resul['zone_id']) && $resul['zone_id'] > 0) {
$sql_data_array['entry_zone_id'] = (int)$resul['zone_id'];
$sql_data_array['entry_state'] = '';
- } else {
+ }
+ else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $resul['state'];
}
}
- if ($action == 'update') {
- tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "address_book_id = '" . (int)$_GET['edit'] . "' and customers_id ='" . (int)$customer_id . "'");
- $new_address_book_id= (int)$_GET['edit'];
- } else {
+ if ($action == 'ab_update') {
+ tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "address_book_id = '" . $new_address_book_id . "' and customers_id ='" . (int)$customer_id . "'");
+ }
+ else {
$sql_data_array['customers_id'] = (int)$customer_id;
tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
@@ -161,24 +165,35 @@
$new_address_book_id=$cs['address_book_id'];
}
- if (isset($_POST['primary']) && ($_POST['primary'] == 'on')) {
- $sql_data_array=array();
- $sql_data_array['customers_default_address_id'] = $new_address_book_id;
- tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customer_id . "'");
- }
+ if (isset($_POST['primary']) && ($_POST['primary'] == 'on')) {
+ $sql_data_array=array();
+ $sql_data_array['customers_default_address_id'] = $new_address_book_id;
+ /**
+ @remarks Force adjust session
+ */
+ $_SESSION['country_id'] = (int)$resul['country'];
+ $_SESSION['state_id'] = (int)@$resul['zone_id'];
+
+ $res = tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customer_id . "'");
+
+ }
+
+
$page->messageStack->add('addressbook', __('SUCCESS_ADDRESS_BOOK_ENTRY_UPDATED'), 'success');
}
break;
- case 'deleteconfirm':
- if(!isset($_GET['delete']) || !is_numeric($_GET['delete']) ) return false;
-/** ADD control addresse defaut */
+ case 'ab_deleteconfirm':
+ if(!isset($_POST['id']) || !is_numeric($_POST['id']) ) return false;
- tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . (int)$_GET['delete'] . "' and customers_id = '" . (int)$customer_id . "'");
+/** TODO ADD control addresse defaut */
+
+ tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . (int)tep_db_input($_POST['id']) . "' and customers_id = '" . (int)$customer_id . "'");
+
$page->messageStack->add_session('addressbook', __('SUCCESS_ADDRESS_BOOK_ENTRY_DELETED'), 'success');
break;
}
@@ -189,7 +204,8 @@
/**
*/
public function after_check_action ($action) {
- if($action=='new') tep_redirect(tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL'));
+ if( in_array($action, array( 'ab_insert' ,'ab_update' , 'ab_deleteconfirm')) )
+ tep_redirect(tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL'));
}
/**
@@ -220,7 +236,7 @@
}
public function load_db_address($cID) {
- $entry_query = tep_db_query("select entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_zone_id, entry_country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$cID . "' and address_book_id = '" . (int)$_GET['edit'] . "'");
+ $entry_query = tep_db_query("select entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_zone_id, entry_country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$cID . "' and address_book_id = '" . (int)$_GET['id'] . "'");
if (!tep_db_num_rows($entry_query)) {
$page->messageStack->add_session('addressbook', __('ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY'));
@@ -320,7 +336,7 @@
return new objectInfo(array('title'=>self::$display_view_form_title,'content'=>tep_output_string_protected(tep_get_include_contents(__CLASS__.'/'.__FUNCTION__.'.delete'),false,true))) ;
break;
- case 'ab_add':
+ case 'ab_new':
case 'ab_edit':
global $page,$language, $navigation,$entry;
Added: trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.delete.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.delete.gab (rev 0)
+++ trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.delete.gab 2012-05-02 13:13:49 UTC (rev 4364)
@@ -0,0 +1,39 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 02/05/2012, 22:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $language,$customer_id,$entry;
+?>
+<div id="adressBookProcess">
+ <?php /** Retour d'erreur checkup sur la boutique */ $page->messageStack->_draw('addressbook'); ?>
+
+ <h2><?php echo address_book::$display_view_form_title; ?></h2>
+
+ <?php echo tep_draw_form('addressbook', address_book::href_link( 'deleteconfirm' ) , 'post'); ?>
+
+
+ <h3><?php echo __('DELETE_ADDRESS_TITLE'); ?></h3>
+ <p><?php echo __('DELETE_ADDRESS_DESCRIPTION'); ?></p>
+ <p><?php echo __('SELECTED_ADDRESS'); ?></p>
+
+ <p>
+ <?php echo tep_address_label($customer_id, $_GET['id'], true, ' ', '<br />'); ?>
+
+ <?php echo tep_draw_hidden_field('id', (int)$_GET['id']) ;?>
+ </p>
+
+
+
+ <div class="navBt">
+ <?php echo '<a class="navBt" href="' . address_book::href_link('') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_DELETE; ?>" />
+ </div>
+
+</form>
+</div>
\ No newline at end of file
Added: trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.edit.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.edit.gab (rev 0)
+++ trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.edit.gab 2012-05-02 13:13:49 UTC (rev 4364)
@@ -0,0 +1,51 @@
+<?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/05/2012, 22:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $language,$customer_id,$entry;
+?>
+<div id="adressBookProcess">
+ <?php /** Retour d'erreur checkup sur la boutique */ $page->messageStack->_draw('addressbook'); ?>
+
+ <h2><?php echo address_book::$display_view_form_title; ?></h2>
+
+
+ <?php echo tep_draw_form('addressbook', address_book::href_link( (($_GET['action'] == 'ab_edit') ? 'update': 'insert') ) , 'post', 'onsubmit="return check_form(\'addressbook\');"');
+
+ $customer_default_address_id=address_book::$account['customers_default_address_id'];
+ global $customer_default_address_id;
+ echo tep_get_include_contents('address_book_details');
+
+
+ if (isset($_GET['id']) && is_numeric($_GET['id'])) { ?>
+
+ <div class="navBt">
+ <?php echo '<a class="navBt" href="' . address_book::href_link('') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ <?php echo tep_draw_hidden_field('action', 'update') . tep_draw_hidden_field('id', $_GET['id']) ;?>
+ <input class="submitBt" id="send" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE; ?>" />
+ </div>
+
+ <?php } else {
+ if (sizeof($navigation->snapshot) > 0) {
+ $back_link = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
+ } else {
+ $back_link = address_book::href_link('');
+ }
+ ?>
+ <div class="navBt">
+ <?php echo tep_draw_hidden_field('action', 'process') ;?>
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>" />
+ <?php echo '<a class="navBt" href="' . $back_link . '">' .IMAGE_BUTTON_BACK . '</a>'; ?>
+ </div>
+ <?php } ?>
+
+
+</form>
+
+</div>
\ No newline at end of file
Added: trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.page.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.page.gab (rev 0)
+++ trunk/catalog/templates/defaut/includes/gabarit/address_book/display_view.page.gab 2012-05-02 13:13:49 UTC (rev 4364)
@@ -0,0 +1,58 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 02/05/2012, 22:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ *\dir includes/gabarit/
+ *\file
+ *\brief display module address_book list address,
+ *
+ * template html for function display_view in class address_book
+*/
+global $language,$customer_id;
+?>
+<div id="addressBook">
+
+ <?php /* Retour d'erreur checkup sur la boutique */ $page->messageStack->_draw('addressbook'); ?>
+
+ <div class="contentBox primaryAddress">
+ <h3><?php echo __("Adresse principale"); ?></h3>
+ <p class="infoText"><?php echo __("Cette adresse est employée comme adresse principale d'expédition et de facturation pour les commandes passées sur ce magasin.<br /><br />Cette adresse est également employée comme base pour le produit et les calculs d'impôts sur le service."); ?></p>
+ <h4><?php echo __("Adresse principale"); ?></h4>
+ <p class="address"><?php echo tep_address_label($customer_id, address_book::$account['customers_default_address_id'], true, ' ', '<br />'); ?></p>
+ </div>
+
+
+ <div class="contentBox addressBookEntry">
+ <h3><?php echo __("Entrées du carnet d'adresses") ; ?></h3>
+
+ <?php foreach(address_book::$adress_book as $addresses) : ?>
+ <p class="infoText">
+ <?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?>
+ <?php if ($addresses['address_book_id'] == address_book::$account['customers_default_address_id']) echo ' <small>' . __("(Adresse principale)") . '</small>'; ?>
+ </p>
+
+ <p class="bt">
+ <?php echo '<a class="navBtMini" href="' . address_book::href_link('edit' ,'id='.$addresses['address_book_id']) . '">' . SMALL_IMAGE_BUTTON_EDIT . '</a>';
+ if(address_book::$count >1) echo '<a class="navBtMini" href="' . address_book::href_link('delete' ,'id='.$addresses['address_book_id']) . '">' . SMALL_IMAGE_BUTTON_DELETE . '</a>'; ?>
+ </p>
+
+ <p class="address"><?php echo tep_address_format(tep_get_address_format_id($addresses['country_id']), $addresses, true, ' ', '<br />'); ?></p>
+
+ <?php endforeach; ?>
+ </div>
+
+ <div class="navBt">
+ <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ <?php if (tep_count_customer_address_book_entries() < MAX_ADDRESS_BOOK_ENTRIES) { ?>
+ <?php echo '<a class="navBt" href="' . address_book::href_link('new' ) . '">' . IMAGE_BUTTON_ADD_ADDRESS . '</a>'; ?>
+ <?php } ?>
+ </div>
+
+ <p class="warning"><?php printf(__('You can use maximun %s adress entrie'), MAX_ADDRESS_BOOK_ENTRIES); ?></p>
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/gabarit/address_book_details.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/address_book_details.gab 2012-05-02 12:30:16 UTC (rev 4363)
+++ trunk/catalog/templates/defaut/includes/gabarit/address_book_details.gab 2012-05-02 13:13:49 UTC (rev 4364)
@@ -1,10 +1,10 @@
<?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 29/01/11, 11:24
+ @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/05/2012, 22:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*\dir includes/gabarit/
@@ -13,11 +13,12 @@
*
* display form address for update/add/edit address customers
*/
+
+
global $entry,$customer_default_address_id;
if (!isset($process)) $process = false; ?>
<fieldset class="account">
-<!-- <legend><?php //echo NEW_ADDRESS_TITLE; ?></legend> -->
<?php if ($page->_draw_in_page('ACCOUNT_GENDER')) {
$entry['gender']=(isset($entry['gender']) ? $entry['gender'] : 'm' );
@@ -116,7 +117,7 @@
- <?php if (isset($_GET['edit']) && ($customer_default_address_id != $_GET['edit'])) { ?>
+ <?php if (isset($_GET['id']) && ($customer_default_address_id != $_GET['id'])) { ?>
<p>
<label for="primary"><?php echo SET_AS_PRIMARY; ?></label>
<?php echo tep_draw_checkbox_field('primary','primary', 'on', false, 'id="primary"') ; ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 12:30:27
|
Revision: 4363
http://oscss.svn.sourceforge.net/oscss/?rev=4363&view=rev
Author: oscim
Date: 2012-05-02 12:30:16 +0000 (Wed, 02 May 2012)
Log Message:
-----------
FS#1031
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/customers.php
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-02 12:25:28 UTC (rev 4362)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-02 12:30:16 UTC (rev 4363)
@@ -162,99 +162,102 @@
'alias'=>'language',
'text'=>__('@customers table heading language'),
),
- 'c.customers_dob' => array(
+ );
+
+ if (_cst_bool('ACCOUNT_DOB'))
+ self::$allfields['c.customers_dob'] = array(
'sort'=>true,
'alias'=>'dob',
'text'=>__('@customers table heading dob'),
- ),
- 'c.customers_email_address' => array(
+ );
+ self::$allfields['c.customers_email_address'] = array(
'sort'=>true,
'alias'=>'email_address',
'text'=>__('@customers table heading email address'),
- ),
- 'c.customers_telephone' => array(
+ );
+ self::$allfields['c.customers_telephone'] = array(
'sort'=>true,
'alias'=>'telephone',
'text'=>__('@customers table heading telephone'),
- ),
- 'c.customers_fax' => array(
+ );
+ self::$allfields['c.customers_fax'] = array(
'sort'=>true,
'alias'=>'fax',
'text'=>__('@customers table heading fax'),
- ),
- 'c.customers_language' => array(
+ );
+ self::$allfields['c.customers_language'] = array(
'sort'=>true,
'alias'=>'language',
'text'=>__('@customers table heading language'),
- ),
+ );
- 'c.customers_group_id' => array(
+ self::$allfields['c.customers_group_id'] = array(
'sort'=>true,
'alias'=>'group_id',
'text'=>__('@customers table heading group id'),
- ),
- 'cg.customers_group_name' => array(
+ );
+ self::$allfields['cg.customers_group_name'] = array(
'sort'=>true,
'alias'=>'cat_title',
'text'=>__('@customers table heading group name'),
'default'=>true,
- ),
+ );
- 'c.customers_discount' => array(
+ self::$allfields['c.customers_discount'] = array(
'sort'=>true,
'alias'=>'discount',
'text'=>__('@customers table heading discount'),
- ),
- 'c.customers_balance_account' => array(
+ );
+ self::$allfields['c.customers_balance_account'] = array(
'sort'=>true,
'alias'=>'balance_account',
'text'=>__('@customers table heading balance account'),
- ),
- 'c.customers_shopping_points' => array(
+ );
+ self::$allfields['c.customers_shopping_points'] = array(
'sort'=>true,
'alias'=>'shopping_points',
'text'=>__('@customers table heading shopping points'),
- ),
- 'ci.customers_info_date_account_created' => array(
+ );
+ self::$allfields['ci.customers_info_date_account_created'] = array(
'sort'=>true,
'alias'=>'added',
'text'=>__('@customers table heading date added'),
'width'=>'8%',
- ),
- 'ci.customers_info_date_account_last_modified' => array(
+ );
+ self::$allfields['ci.customers_info_date_account_last_modified'] = array(
'sort'=>true,
'alias'=>'modified',
'text'=>__('@customers table heading last modified'),
'width'=>'8%',
- ),
- 'ci.customers_info_date_of_last_logon' => array(
+ );
+ self::$allfields['ci.customers_info_date_of_last_logon'] = array(
'sort'=>true,
'alias'=>'last_logon',
'text'=>__('@customers table heading last logon'),
- ),
- 'ci.customers_info_number_of_logons' => array(
+ );
+ self::$allfields['ci.customers_info_number_of_logons'] = array(
'sort'=>true,
'alias'=>'number_of_logons',
'text'=>__('@customers table heading number of logons'),
'default'=>true,
- ),
- 'c.customers_group_ra' => array(
+ );
+ self::$allfields['c.customers_group_ra'] = array(
'sort'=>true,
'alias'=>'group_ra',
'text'=>__('@customers table heading group ra'),
'width'=>'5%',
'default'=>true,
- ),
- 'c.customers_status' => array(
+ );
+ self::$allfields['c.customers_status'] = array(
'sort'=>true,
'alias'=>'status',
'text'=>__('@customers table heading status'),
'width'=>'5%',
'default'=>true,
- ),
- );
+ );
+
/**
@remarks Construct all list , fields , th/td
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 12:25:35
|
Revision: 4362
http://oscss.svn.sourceforge.net/oscss/?rev=4362&view=rev
Author: oscim
Date: 2012-05-02 12:25:28 +0000 (Wed, 02 May 2012)
Log Message:
-----------
correction coquille
Ajustement liens customer vers rapport
correction sql erreur dans la definition de clef externe
ajustement css mise en forme taille image ds la page edition produit
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/customerUtility.php
trunk/catalog/admin/includes/gabarit/products/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/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql
Modified: trunk/catalog/admin/includes/classes/customerUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/customerUtility.php 2012-05-02 09:30:17 UTC (rev 4361)
+++ trunk/catalog/admin/includes/classes/customerUtility.php 2012-05-02 12:25:28 UTC (rev 4362)
@@ -179,7 +179,7 @@
$nom= /*tep_image(DIR_WS_CATALOG_LANGUAGES . $lg['directory'] . '/images/' . $lg['image'], $lg['name']) .' ' . */$customers_values['customers_firstname'] . ' ' . $customers_values['customers_lastname'];
$action= '<a href="'.tep_mailto($customers_values['customers_email_address'],$origin).'">'.tep_image(DIR_WS_ICONS.'icon_custom_mail.png',TXT_MINIF_EMAIL, 12,12).'</a> '
.'<a href="'.tep_href_link(FILENAME_CUSTOMERS,'cID=' . $customers_id. '&origin='.urlencode($origin) ).'&action=edit">'.tep_image(DIR_WS_ICONS.'icon_custom_edit.png',TXT_MINIF_DETAIL, 12,12).'</a> '
- .'<a href="'.tep_href_link(FILENAME_STATS,'module=stats_customers').'">'.tep_image(DIR_WS_ICONS.'icon_stats.png',TXT_MINIF_STATS_BUY , 12,12).'</a> '
+ .'<a href="'.tep_href_link(FILENAME_RAPPORT,'cID=customers_purchase&action=view').'">'.tep_image(DIR_WS_ICONS.'icon_stats.png',TXT_MINIF_STATS_BUY , 12,12).'</a> '
.$action_supp;
return sprintf($format,$nom, $action);
}
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-05-02 09:30:17 UTC (rev 4361)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-05-02 12:25:28 UTC (rev 4362)
@@ -164,21 +164,25 @@
<?php endif; ?>
+
+
<?php if( _cst_bool('STOCK_CHECK') && products::CheckClassProduct('CLASS_STOCK')): /** Si Class de stock defini, les prix sont pris en charge par un onglet */ ?>
+
<fieldset class="block_field">
- <legend><?php echo __('text legend stock'); ?></legend>
- <div class="block_input">
- <label class="inline"><?php echo __('table heading stock'); ?></label>
- <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?>
- <br style="clear:both;" />
- <?php if(products::$product_investigation['has_tracked_options'] or products::$product_investigation['stock_entries_count'] > 0) :?>
- <a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$Info->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a>
- <?php elseif(products::$Info->track_stock==1): ?>
- <label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label>
- <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity) ; ?><br />
- <?php endif; ?>
- </div>
+ <legend><?php echo __('@products text legend stock'); ?></legend>
+ <div class="block_input">
+ <label class="inline"><?php echo __('@products text label stock'); ?></label>
+ <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?>
+ <br style="clear:both;" />
+ <?php if(products::$product_investigation['has_tracked_options'] or products::$product_investigation['stock_entries_count'] > 0) :?>
+ <a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$Info->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a>
+ <?php elseif(products::$Info->track_stock==1): ?>
+ <label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label>
+ <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity) ; ?><br />
+ <?php endif; ?>
+ </div>
</fieldset>
+
<?php endif; ?>
</div>
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-02 09:30:17 UTC (rev 4361)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-02 12:25:28 UTC (rev 4362)
@@ -128,7 +128,10 @@
$lang['text customers groups note']="Tarif Groupe" ;
$lang['text customers groups note detail']="Notez que si un champ est laissé vide, aucun prix pour ce groupe de clients sera inséré dans la base de données. Si un champ est rempli, mais la case n'est pas cochée, aucun prix ne sera inséré. Si un prix est déjà inséré dans la base de données, mais la case n'est pas cochée, celui-ci sera supprimé de la base de données." ;
- $lang['text legend stock']="Stock" ;
+
+ $lang['@products text legend stock']="Stock" ;
+ $lang['@products text label stock']="Mode de gestion" ;
+
$lang['text legend price']="Prix" ;
$lang['text legend image']="Image" ;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-02 09:30:17 UTC (rev 4361)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-02 12:25:28 UTC (rev 4362)
@@ -1110,7 +1110,7 @@
foreach($rescat as $cat)
$item['cat_title'] .=','.$cat['categories_name'];
- if(strlen($item['cat_title'])>25)$item['cat_title']= substr($item['cat_title'],0 ,20).'...';
+ if(strlen($item['cat_title'])>35)$item['cat_title']= substr($item['cat_title'],0 ,30).'...';
}
if( ! DataTypes::is_active('featured')) {
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-05-02 09:30:17 UTC (rev 4361)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-05-02 12:25:28 UTC (rev 4362)
@@ -384,7 +384,7 @@
#central form .edit.col_right .block_input{width:95%;}
#central form .edit.col_right .block_input label{width:20%;text-align:left;font-weight:bold}
#central form p.new_product_img { float:left; padding:5px; margin : 0 auto;text-align:center; width:98%;}
-#central form p.new_product_img img{ -moz-border-radius:6px; -webkit-border-radius: 6px; border:1px solid #ACAAAC; margin:1px}
+#central form p.new_product_img img{ -moz-border-radius:6px; -webkit-border-radius: 6px; border:1px solid #ACAAAC; margin:1px; max-width: 400px;}
#central form fieldset legend { color:#666666; font-size:1.2em; font-style:italic; font-weight:bold; padding:0 5px 0 20px;}
#central form p select,
#central form p input[type="text"] { margin:5px 15px; min-width:200px; }
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql 2012-05-02 09:30:17 UTC (rev 4361)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.key.sql 2012-05-02 12:25:28 UTC (rev 4362)
@@ -13,9 +13,8 @@
ALTER TABLE osc_products_options_values ADD INDEX idx_osc_products_options_values_lgid (language_id);
-ALTER TABLE osc_products_options_values ADD INDEX idx_products_options_id (products_options_id);
-ALTER TABLE osc_products_options_values ADD INDEX idx_value_id (value_id);
+ALTER TABLE osc_products_options_values ADD INDEX idx_products_options_values_id (products_options_values_id);
ALTER TABLE osc_products_options_values ADD CONSTRAINT fk_osc_products_options_values_lgid FOREIGN KEY (language_id) REFERENCES osc_languages (languages_id);
-ALTER TABLE osc_products_options_values ADD CONSTRAINT fk_osc_products_options_values_products_options_id FOREIGN KEY (v) REFERENCES osc_products_options (products_options_id);
\ No newline at end of file
+ALTER TABLE osc_products_options_values ADD CONSTRAINT fk_osc_products_options_values_products_options_values_id FOREIGN KEY (products_options_values_id) REFERENCES osc_products_options (products_options_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-02 09:30:28
|
Revision: 4361
http://oscss.svn.sourceforge.net/oscss/?rev=4361&view=rev
Author: oscim
Date: 2012-05-02 09:30:17 +0000 (Wed, 02 May 2012)
Log Message:
-----------
correction suite evolution structure customers.php
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab
trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab
trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab
trunk/catalog/admin/includes/modules/account/address_book.php
Modified: trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab 2012-05-02 08:54:30 UTC (rev 4360)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab 2012-05-02 09:30:17 UTC (rev 4361)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/01/2012, 18:17
+ @date 02/05/2012, 19:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
@@ -16,25 +16,25 @@
<h4><?php echo __('address_book edit') ?></h4>
<div class="button_nav">
- <a class="button fancy" href="<?php echo tep_href_link('aca.php','cID='.customers::$cID.'&addressbook='.customers::$cInfo->customers_default_address_id.'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-new') ?>"><?php echo __('address_book add new address') ?></a>
+ <a class="button fancy" href="<?php echo tep_href_link('aca.php','cID='.customers::$Id.'&addressbook='.customers::$Info->customers_default_address_id.'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-new') ?>"><?php echo __('address_book add new address') ?></a>
</div>
<br class="clear"/>
<ul>
<?php foreach(address_book::$cInfo as $k=>$row): ?>
- <li><a href="#tabs-<?php echo $k ?>"><?php echo $k ?></a> <?php if(customers::$cInfo->customers_default_address_id == $row['address_book_id']) echo "**" ?> </li>
+ <li><a href="#tabs-<?php echo $k ?>"><?php echo $k ?></a> <?php if(customers::$Info->customers_default_address_id == $row['address_book_id']) echo "**" ?> </li>
<?php endforeach; ?>
</ul>
- <?php foreach(address_book::$cInfo as $k=>$row): /*print_r($row); */?>
+ <?php foreach(address_book::$cInfo as $k=>$row): ?>
<div id="tabs-<?php echo $k ?>" class="tabPage">
<div class="button_nav fright">
<?php printf(CsrtAction::getLink('row_action_right', __('address_book edit address'), 'edit'), 'fancy', tep_href_link('aca.php','cID='.$row['customers_id'].'&addressbook='.$row['address_book_id'].'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-edit' ),'' ) ?>
- <?php if(customers::$cInfo->customers_default_address_id != $row['address_book_id']) : ?>
+ <?php if(customers::$Info->customers_default_address_id != $row['address_book_id']) : ?>
<?php printf(CsrtAction::getLink('row_action_right', __('address_book delete address'), 'delete'), 'fancy', tep_href_link('aca.php','cID='.$row['customers_id'].'&addressbook='.$row['address_book_id'].'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-delete' ),'' ) ?>
<?php endif; ?>
@@ -42,7 +42,7 @@
<p class="block_input">
- <?php echo tep_draw_radio_field('default_address_id_define', '', $row['address_book_id'], ((customers::$cInfo->customers_default_address_id == $row['address_book_id'])? true : false )) ?> <?php echo __('address_book define default address') ?>
+ <?php echo tep_draw_radio_field('default_address_id_define', '', $row['address_book_id'], ((customers::$Info->customers_default_address_id == $row['address_book_id'])? true : false )) ?> <?php echo __('address_book define default address') ?>
</p>
<div class="ajax-replace">
Modified: trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab 2012-05-02 08:54:30 UTC (rev 4360)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab 2012-05-02 09:30:17 UTC (rev 4361)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/01/2012, 18:17
+ @date 02/05/2012, 19:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
@@ -27,7 +27,7 @@
<fieldset class="block_input button_nav">
- <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(customers::FILENAME, 'cID=' .customers::$cInfo->customers_id.'&action=edit'), IMAGE_CANCEL) ?>
+ <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(customers::FILENAME, 'cID=' .customers::$Id.'&action=edit'), IMAGE_CANCEL) ?>
</fieldset>
Modified: trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab 2012-05-02 08:54:30 UTC (rev 4360)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab 2012-05-02 09:30:17 UTC (rev 4361)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/01/2012, 18:17
+ @date 02/05/2012, 19:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
Modified: trunk/catalog/admin/includes/modules/account/address_book.php
===================================================================
--- trunk/catalog/admin/includes/modules/account/address_book.php 2012-05-02 08:54:30 UTC (rev 4360)
+++ trunk/catalog/admin/includes/modules/account/address_book.php 2012-05-02 09:30:17 UTC (rev 4361)
@@ -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.1
- @date 30/12/11, 19:31
+ @date 02/05/2012, 19:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
@@ -12,7 +12,6 @@
@brief Gestion Des adresses d'un clients
*/
-
class address_book
implements InterfaceModule{
@@ -356,13 +355,14 @@
$customers = $customers_query->fetchAllAssoc();
}else {
+
/// Specimen base
$customers=array(
array('address_book_id'=>'',
- 'customers_id'=>customers::$cInfo->customers_id,
- 'entry_gender'=>customers::$cInfo->customers_gender,
- 'entry_lastname'=>customers::$cInfo->customers_lastname,
- 'entry_firstname'=>customers::$cInfo->customers_firstname,
+ 'customers_id'=>customers::$Id,
+ 'entry_gender'=>'',
+ 'entry_lastname'=>'',
+ 'entry_firstname'=>'',
'entry_company'=>'',
'entry_company_tax_id'=>'',
@@ -377,7 +377,7 @@
);
}
- self::$cInfo->objectInfo($customers);
+ self::$cInfo= new objectInfo($customers);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 08:54:41
|
Revision: 4360
http://oscss.svn.sourceforge.net/oscss/?rev=4360&view=rev
Author: oscim
Date: 2012-05-02 08:54:30 +0000 (Wed, 02 May 2012)
Log Message:
-----------
FS#942
Modified Paths:
--------------
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl
trunk/catalog/admin/includes/modules/pages/customers.php
Added Paths:
-----------
trunk/catalog/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt
Modified: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl 2012-05-02 08:11:41 UTC (rev 4359)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl 2012-05-02 08:54:30 UTC (rev 4360)
@@ -1,36 +1,23 @@
{if $myarray.email_use_html}
- {include "header.inc"}
- <div id="content">
- <p>{$lg.ADMIN_EMAIL_TEXT_BONOUR} : {$myarray.admin_firstname}</p>
- <br />
-<p>{$lg.ADMIN_EMAIL_TEXT} </p>
-<br />
- <a href="{$myarray.links}">{$lg.ADMIN_EMAIL_TEXT_WWW}</a>
-<br />
-<br />
-<p>{$lg.ADMIN_EMAIL_TEXT_LOGIN} : {$myarray.admin_firstname}</p>
-<p>{$lg.ADMIN_EMAIL_TEXT_MDP} : {$myarray.hiddenPassword}</p>
-<p>{$lg.ADMIN_EMAIL_TEXT_EMAIL} : {$myarray.admin_email_address}</p>
- {$TPL_CONTENT}
+{include "header.inc"}
+ <div id="content" style="margin:0;padding:0;">
+ <p>{$lg.EMAIL_WELCOME} {$myarray.firstname} {$myarray.lastname}</p>
+<ul>
+ <li>{$lg.EMAIL_EMAIL} {$myarray.email}</li>
+ <li>{$lg.EMAIL_PASSWORD} {$myarray.password}</li>
+</ul>
+ <p>{$lg.EMAIL_TEXT}</p>
+ <p>{$lg.EMAIL_WARNING} </p>
</div>
{include "footer.inc"}
-
{else}
+ {$lg.EMAIL_WELCOME} {$myarray.firstname} {$myarray.lastname}
- {$lg.STORE_NAME}
+ {$lg.EMAIL_EMAIL} {$myarray.email}
+ {$lg.EMAIL_PASSWORD} {$myarray.password}
- {$lg.EMAIL_SEPARATOR}
- {$lg.ADMIN_EMAIL_TEXT_BONOUR} : {$myarray.admin_firstname}
+ {$lg.EMAIL_TEXT}
+ {$lg.$myarray._oLinks}
+ {$lg.EMAIL_WARNING}
+{/if}
-{$lg.ADMIN_EMAIL_TEXT}
-
- {$lg.ADMIN_EMAIL_TEXT_WWW} : {$myarray.links}
-
-
-{$lg.ADMIN_EMAIL_TEXT_LOGIN} : {$myarray.admin_firstname}
-{$lg.ADMIN_EMAIL_TEXT_MDP} : {$myarray.hiddenPassword}
-{$lg.ADMIN_EMAIL_TEXT_EMAIL} : {$myarray.admin_email_address}
- {$TPL_CONTENT}
- {$lg.EMAIL_SEPARATOR}
-
-{/if}
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-02 08:11:41 UTC (rev 4359)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-02 08:54:30 UTC (rev 4360)
@@ -124,139 +124,139 @@
Just for Edit listing
*/
self::$allfields = array(
- 'c.customers_id' => array(
- 'sort'=>true,
- 'alias'=>'id',
+ 'c.customers_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
'text'=>__('@customers table heading id'),
- 'width'=>'2%',
+ 'width'=>'2%',
'class'=>'tcenter',
'default'=>true,
- ),
- 'c.customers_type' => array(
- 'sort'=>true,
- 'alias'=>'type',
+ ),
+ 'c.customers_type' => array(
+ 'sort'=>true,
+ 'alias'=>'type',
'text'=>__('@customers table heading type'),
),
- "CONCAT(customers_firstname, ' ', customers_lastname)" => array(
- 'sort'=>true,
- 'alias'=>'master_name',
+ "CONCAT(customers_firstname, ' ', customers_lastname)" => array(
+ 'sort'=>true,
+ 'alias'=>'master_name',
'text'=>__('@customers table heading master_name'),
'default'=>true,
- 'width'=>'15%',
- ),
-// 'c.customers_lastname' => array(
-// 'sort'=>true,
-// 'alias'=>'lastname',
+ 'width'=>'15%',
+ ),
+// 'c.customers_lastname' => array(
+// 'sort'=>true,
+// 'alias'=>'lastname',
// 'text'=>__('@customers table heading lastname'),
-// ),
-// 'c.customers_firstname' => array(
-// 'sort'=>true,
-// 'alias'=>'firstname',
+// ),
+// 'c.customers_firstname' => array(
+// 'sort'=>true,
+// 'alias'=>'firstname',
// 'text'=>__('@customers table heading firstname'),
// // 'default'=>true,
-// // 'width'=>'18%',
-// ),
- 'c.customers_language' => array(
- 'sort'=>true,
- 'alias'=>'language',
+// // 'width'=>'18%',
+// ),
+ 'c.customers_language' => array(
+ 'sort'=>true,
+ 'alias'=>'language',
'text'=>__('@customers table heading language'),
- ),
- 'c.customers_dob' => array(
- 'sort'=>true,
- 'alias'=>'dob',
+ ),
+ 'c.customers_dob' => array(
+ 'sort'=>true,
+ 'alias'=>'dob',
'text'=>__('@customers table heading dob'),
- ),
- 'c.customers_email_address' => array(
- 'sort'=>true,
- 'alias'=>'email_address',
+ ),
+ 'c.customers_email_address' => array(
+ 'sort'=>true,
+ 'alias'=>'email_address',
'text'=>__('@customers table heading email address'),
- ),
- 'c.customers_telephone' => array(
- 'sort'=>true,
- 'alias'=>'telephone',
+ ),
+ 'c.customers_telephone' => array(
+ 'sort'=>true,
+ 'alias'=>'telephone',
'text'=>__('@customers table heading telephone'),
- ),
- 'c.customers_fax' => array(
- 'sort'=>true,
- 'alias'=>'fax',
+ ),
+ 'c.customers_fax' => array(
+ 'sort'=>true,
+ 'alias'=>'fax',
'text'=>__('@customers table heading fax'),
- ),
- 'c.customers_language' => array(
- 'sort'=>true,
- 'alias'=>'language',
+ ),
+ 'c.customers_language' => array(
+ 'sort'=>true,
+ 'alias'=>'language',
'text'=>__('@customers table heading language'),
- ),
+ ),
- 'c.customers_group_id' => array(
- 'sort'=>true,
- 'alias'=>'group_id',
+ 'c.customers_group_id' => array(
+ 'sort'=>true,
+ 'alias'=>'group_id',
'text'=>__('@customers table heading group id'),
- ),
- 'cg.customers_group_name' => array(
- 'sort'=>true,
- 'alias'=>'cat_title',
+ ),
+ 'cg.customers_group_name' => array(
+ 'sort'=>true,
+ 'alias'=>'cat_title',
'text'=>__('@customers table heading group name'),
'default'=>true,
- ),
+ ),
- 'c.customers_discount' => array(
- 'sort'=>true,
- 'alias'=>'discount',
+ 'c.customers_discount' => array(
+ 'sort'=>true,
+ 'alias'=>'discount',
'text'=>__('@customers table heading discount'),
- ),
- 'c.customers_balance_account' => array(
- 'sort'=>true,
- 'alias'=>'balance_account',
+ ),
+ 'c.customers_balance_account' => array(
+ 'sort'=>true,
+ 'alias'=>'balance_account',
'text'=>__('@customers table heading balance account'),
- ),
- 'c.customers_shopping_points' => array(
- 'sort'=>true,
- 'alias'=>'shopping_points',
+ ),
+ 'c.customers_shopping_points' => array(
+ 'sort'=>true,
+ 'alias'=>'shopping_points',
'text'=>__('@customers table heading shopping points'),
- ),
- 'ci.customers_info_date_account_created' => array(
- 'sort'=>true,
- 'alias'=>'added',
+ ),
+ 'ci.customers_info_date_account_created' => array(
+ 'sort'=>true,
+ 'alias'=>'added',
'text'=>__('@customers table heading date added'),
- 'width'=>'8%',
- ),
- 'ci.customers_info_date_account_last_modified' => array(
- 'sort'=>true,
- 'alias'=>'modified',
+ 'width'=>'8%',
+ ),
+ 'ci.customers_info_date_account_last_modified' => array(
+ 'sort'=>true,
+ 'alias'=>'modified',
'text'=>__('@customers table heading last modified'),
- 'width'=>'8%',
- ),
- 'ci.customers_info_date_of_last_logon' => array(
- 'sort'=>true,
- 'alias'=>'last_logon',
+ 'width'=>'8%',
+ ),
+ 'ci.customers_info_date_of_last_logon' => array(
+ 'sort'=>true,
+ 'alias'=>'last_logon',
'text'=>__('@customers table heading last logon'),
- ),
- 'ci.customers_info_number_of_logons' => array(
- 'sort'=>true,
- 'alias'=>'number_of_logons',
+ ),
+ 'ci.customers_info_number_of_logons' => array(
+ 'sort'=>true,
+ 'alias'=>'number_of_logons',
'text'=>__('@customers table heading number of logons'),
'default'=>true,
- ),
- 'c.customers_group_ra' => array(
- 'sort'=>true,
- 'alias'=>'group_ra',
+ ),
+ 'c.customers_group_ra' => array(
+ 'sort'=>true,
+ 'alias'=>'group_ra',
'text'=>__('@customers table heading group ra'),
- 'width'=>'5%',
+ 'width'=>'5%',
'default'=>true,
- ),
- 'c.customers_status' => array(
- 'sort'=>true,
- 'alias'=>'status',
+ ),
+ 'c.customers_status' => array(
+ 'sort'=>true,
+ 'alias'=>'status',
'text'=>__('@customers table heading status'),
- 'width'=>'5%',
+ 'width'=>'5%',
'default'=>true,
- ),
+ ),
);
/**
- @remarks Construct all list , fields , th/td
+ @remarks Construct all list , fields , th/td
*/
self::$InitInfo['theader']['listing']=array(
array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
@@ -272,7 +272,7 @@
// min fields and not view directly colonne fields
$listfield = " ";
$_SESSION['filters']['allfields'] = array();
- // put in
+ // put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
else
@@ -311,7 +311,7 @@
*/
self::$InitInfo['modele']['listing'][$alias]=true;
-
+
if($clean !=$alias)
$listfield .=$key.' as '.$alias.',';
else
@@ -336,7 +336,7 @@
);
/**
- @remarks Put detail for listing methode
+ @remarks Put detail for listing methode
*/
self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
@@ -411,7 +411,7 @@
/**
- @remarks specific save in session value filters
+ @remarks specific save in session value filters
*/
case 'filters':
$_SESSION['filters'] =array();
@@ -455,14 +455,14 @@
/**
- @remarks specific multi action
+ @remarks specific multi action
*/
case 'multi':
tep_redirect(tep_href_link(self::FILENAME) );
break;
/**
- @remarks normal page
+ @remarks normal page
*/
case 'insert':
case 'update':
@@ -535,21 +535,34 @@
*/
if(isset($_POST['new_customers_notif'])) {
-
-
$myarray = array(
'email_use_html'=>_cst_bool('EMAIL_USE_HTML'),
'links'=>HTTP_SERVER ,
'firstname'=>$result['customers_firstname'],
'lastname'=>$result['customers_lastname'],
- 'email_address'=>$result['customers_email_address'],
- 'Password'=>$result,
+ 'email'=>$result['customers_email_address'],
+ 'password'=>$mdp,
'message'=>''
);
$message_final=tep_post_prepare_email('add_customer.tpl',$language,$myarray);
- tep_mail($result['customers_firstname'] . ' ' . $result['customers_lastname'], $result['customers_email_address'],__('email text subject'), $message_final);
+
+
+ if( ! tep_mail($result['customers_firstname'] . ' ' . $result['customers_lastname'], $result['customers_email_address'],__('email text subject'), $message_final) )
+ $messageStack->add_session(sprintf(__('error in process send mail for %s'), $result['customers_firstname'] .' '. $result['customers_email_address'] ), 'error');
+ else
+ $messageStack->add_session(sprintf(__('send mail for %s ok'), $result['customers_firstname'] .' '. $result['customers_email_address']), 'success');
+
}
+
+ $myarray['from']=STORE_OWNER;
+ $myarray['email_use_html']=_cst_bool('EMAIL_USE_HTML');
+ $myarray['message']=$message_final;
+
+ if( ! notification::notifInMess('admin_new_customers',__('subject copy creat new compte for customers') ,$message_final, 'customers_id='.$_id) ){
+ $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
+ }
+
$messageStack->add_session(__('customers save success'), 'success');
if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME));
@@ -677,8 +690,8 @@
}
- $query_raw = "select ".$adjust->listfields.", c.customers_id as id from " . TABLE_CUSTOMERS . " c ".
- " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ".
+ $query_raw = "select ".$adjust->listfields.", c.customers_id as id from " . TABLE_CUSTOMERS . " c ".
+ " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ".
" LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ".
((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" GROUP BY c.customers_id ".
@@ -778,7 +791,7 @@
$res = self::GetDBValue();
- self::$list= $query_numrows ;
+ self::$list= $query_numrows ;
return $res;
Added: trunk/catalog/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt (rev 0)
+++ trunk/catalog/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt 2012-05-02 08:54:30 UTC (rev 4360)
@@ -0,0 +1,27 @@
+<?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 06/04/2012, 17:28
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['EMAIL_SEPARATOR']="------------------------------------------------------" ;
+$lang['EMAIL_TEXT_SUBJECT']="" ;
+$lang['EMAIL_TEXT_FOOTER_LG1']=" " ;
+$lang['EMAIL_WELCOME']="Nous vous accueillons sur <strong>". STORE_NAME . "</strong>\n" ;
+
+$lang['EMAIL_EMAIL']="Votre identifiant : " ;
+$lang['EMAIL_PASSWORD']="Votre mot de passe : " ;
+
+$lang['EMAIL_TEXT']="Vous pouvez maintenant participer aux divers services que nous devons vous offrir. Certains de ces services incluent :\n<li>Panier permanent - N'importe quels produits ajoutés à votre panier en ligne restent là jusqu'à ce que vous les supprimiez, ou les consultiez.</li>' \n <li><strong>Carnet d'adresses </strong> - Nous pouvons maintenant livrer vos produits à une adresse différente de la vôtre ! C'est parfait pour envoyer des cadeaux d'anniversaire adressés à l'intention d'autres personnes.</li>\n<li><strong>Historique de commande</strong> - Voir vos historiques d'achats que vous avez effectués chez nous.</li>\n\n" ;
+$lang['EMAIL_CONTACT']="Pour obtenir de l'aide sur n'importe lequel de nos services en ligne, envoyez s'il vous plaît un e-mail au propriétaire du magasin : " . STORE_OWNER_EMAIL_ADDRESS . " \n" ;
+$lang['EMAIL_WARNING']="<strong class=\"notice\">REMARQUE :</strong> Si cette adresse e-mail vous a été communiqué par un de nos clients. Si vous n'êtes pas un membre, envoyez s'il vous plaît un e-mail à " . STORE_OWNER_EMAIL_ADDRESS . "\n" ;
+$lang['EMAIL_SUBJECT']="Bienvenue sur " . STORE_NAME. " " ;
+$lang['EMAIL_GREET_MR']="Cher M. " ;
+$lang['EMAIL_GREET_MS']="Chère M<sup>me</sup> " ;
+$lang['EMAIL_GREET_ML']="Chère M<sup>lle</sup> " ;
+$lang['EMAIL_GREET_NONE']="Cher " ;
+?>
\ 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-02 08:11:51
|
Revision: 4359
http://oscss.svn.sourceforge.net/oscss/?rev=4359&view=rev
Author: oscim
Date: 2012-05-02 08:11:41 +0000 (Wed, 02 May 2012)
Log Message:
-----------
correction bug edition mdp
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/adminAccount.php
Modified: trunk/catalog/admin/includes/modules/pages/adminAccount.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/adminAccount.php 2012-05-02 07:46:38 UTC (rev 4358)
+++ trunk/catalog/admin/includes/modules/pages/adminAccount.php 2012-05-02 08:11:41 UTC (rev 4359)
@@ -88,7 +88,7 @@
} else {
//$confirm = 'confirm_account';
tep_session_register('confirm_account');
- tep_redirect(tep_href_link(self::FILENAME, 'action=edit_member'));
+ tep_redirect(tep_href_link(self::FILENAME, 'action=update_pass'));
}
break;
@@ -183,11 +183,12 @@
public static function get_right_bar(){
global $language;
+
switch(self::$action){
case 'check_account':
$heading[] = array('text' => __('text info heading default') );
$contents = array('form' => tep_draw_form('edit', self::FILENAME, 'action=check_password', 'post'));
- $contents[] = array('text' => '<label for="password_confirmation">' . __('text info intro confirm password') . '</label>' . tep_draw_password_field('password_confirmation') . tep_draw_hidden_field('id_info', '', self::$myAccount->admin_id) );
+ $contents[] = array('text' => '<label for="password_confirmation">' . __('text info intro confirm password') . '</label>' . tep_draw_password_field('password_confirmation') . tep_draw_hidden_field('id_info', '', self::$myAccount->id) );
$contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', __('image valider')) . ' <a class="button" href="' . tep_href_link(self::FILENAME) . '">' . IMAGE_CANCEL . '</a>');
break;
case 'update_pass':
@@ -196,7 +197,7 @@
$contents[] = array('text' => '<label for="password_confirmation">' . __('text info intro new password') . '</label>' .
tep_draw_password_field('password_') .
tep_draw_password_field('password_confirmation') .
- tep_draw_hidden_field('id_info', '', self::$myAccount->admin_id)
+ tep_draw_hidden_field('id_info', '', self::$myAccount->id)
);
$contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', __('image valider')) . ' <a class="button" href="' . tep_href_link(self::FILENAME) . '">' . IMAGE_CANCEL . '</a>');
break;
@@ -265,9 +266,9 @@
}
- /**
- @remarks implements InterfaceModule depend
- if module twin in backoffice, report all content install in the other module
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
public function check() {return true;}
public function install() {return true;}
public function remove() {return true;}
@@ -276,7 +277,7 @@
/**
@fn check()
- @brief test if count all var , and keys is equal
+ @brief test if count all var , and keys is equal
@return boolean true/false
*/
function check() { return false; }
@@ -284,19 +285,19 @@
/**
@fn keys()
- @return array all key configuration define by this module
+ @return array all key configuration define by this module
*/
function keys() { return false; }
/**
@fn install()
- @brief add all configuration
- @note
+ @brief add all configuration
+ @note
- Modules can emarquer sql installation instructions, however, in the case of transverse information, or dependent of an extension, preferring the implementation of an extension, file with sql independent
- please, pefix all var configuration by 'MODULE_OT__MODTYPENAME_MAJ_'
- if module twin in backoffice, report all content install in the other module
- - Not use language in DB , but function :__()
- for MODULE_TOTO_ST
+ - Not use language in DB , but function :__()
+ for MODULE_TOTO_ST
var title MODULE_TOTO_ST_S (small description)
var description MODULE_TOTO_ST_L (long description)
*/
@@ -305,9 +306,9 @@
/**
@fn remove()
@brief delete all configuration
- @note
+ @note
- please, pefix all var configuration by 'MODULE_PAYMENT__MODTYPENAME_MAJ_'
- - if module twin in backoffice, report all content remove in the other module
+ - if module twin in backoffice, report all content remove in the other module
*/
function remove() { return false; }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 07:46:47
|
Revision: 4358
http://oscss.svn.sourceforge.net/oscss/?rev=4358&view=rev
Author: oscim
Date: 2012-05-02 07:46:38 +0000 (Wed, 02 May 2012)
Log Message:
-----------
coquille lors upgarde version by svnupdate
Modified Paths:
--------------
trunk/catalog/install/includes/content/core.installdb.php
trunk/catalog/install/includes/content/core.modes.php
Modified: trunk/catalog/install/includes/content/core.installdb.php
===================================================================
--- trunk/catalog/install/includes/content/core.installdb.php 2012-05-02 07:00:44 UTC (rev 4357)
+++ trunk/catalog/install/includes/content/core.installdb.php 2012-05-02 07:46:38 UTC (rev 4358)
@@ -35,16 +35,20 @@
$driver = ( (strtolower( $this->db['DBMOTOR']) == 'mysqli')? 'mysql' : strtolower( $this->db['DBMOTOR']) );
-
+$i=0;
// creation des tables
foreach(core::browse_rep($this->fs_document_root . 'install/includes/sql/'.$driver.'/tables/') as $file){
if(strpos($file['file'] , '.key')===false){
osc_db_upgrade($this->db['DB_DATABASE'], $this->fs_document_root . 'install/includes/sql/'.$driver.'/tables/'.$file['file'] , $this->db['DB_TABLE_PREFIX']);
}
+
+ $i++;
+ if($i>200)
+ continue;
}
-
+$i=0;
// add key
if($this->db['DBMOTOR_TYPE'] =='InnoDB')
foreach(core::browse_rep($this->fs_document_root . 'install/includes/sql/'.$driver.'/tables/') as $file){
@@ -52,21 +56,29 @@
if(strpos($file['file'] , '.key') > 0){
osc_db_upgrade($this->db['DB_DATABASE'], $this->fs_document_root . 'install/includes/sql/'.$driver.'/tables/'.$file['file'] , $this->db['DB_TABLE_PREFIX']);
}
+
+ $i++;
+ if($i>200)
+ continue;
}
+$i=0;
// add data config
if ( ($db_error == false) ) {
// data insert in db
foreach(core::browse_rep($this->fs_document_root . 'install/includes/sql/'.$driver.'/data/') as $file){
osc_db_install($this->db['DB_DATABASE'], $this->fs_document_root . 'install/includes/sql/'.$driver.'/data/'.$file['file'] , $this->db['DB_TABLE_PREFIX']);
}
+
+ $i++;
+ if($i>200)
+ continue;
}
- // copy in document
- parent::recurse_copy($this->fs_document_root . 'install/includes/sql/'.$driver.'/', $this->fs_document_root. 'Documents/admin/origin/db/install/');
+
if ($db_error != false) $this->PileMessage('error', core::l10n("Un problème à eu lieu durant la phase d'installation de la base de données" ) ) ;
else $this->PileMessage('succes', core::l10n("L'installation de la base de données est ok" ) ) ;
}
@@ -111,6 +123,7 @@
Callback
*/
function exe_prev(){
+
// conf
$this->get_server_conf();
$this->get_db_conf();
@@ -128,6 +141,10 @@
osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->www_location."images/oscss_logo.jpg' where configuration_key='STORE_LOGO_PRINT'" );
osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->www_location."images/noscreenshot.png' where configuration_key='IMAGE_NONEXISTENT'" );
+ $driver = ( (strtolower( $this->db['DBMOTOR']) == 'mysqli')? 'mysql' : strtolower( $this->db['DBMOTOR']) );
+ // copy in document
+ parent::recurse_copy($this->fs_document_root . 'install/includes/sql/'.$driver.'/', $this->fs_document_root. 'Documents/admin/origin/db/install/');
+
$this->PileMessage('succes', core::l10n("La configuration est terminée" ) ) ;
}
@@ -190,7 +207,7 @@
echo osc_draw_hidden_field('up_upgrade['.$_POST['upgrade'].']', '', $version['name']);
echo $this->draw_button(true, false);
}
- else
+ else
echo $this->draw_button(false, true);
echo '</form>'."\n";
Modified: trunk/catalog/install/includes/content/core.modes.php
===================================================================
--- trunk/catalog/install/includes/content/core.modes.php 2012-05-02 07:00:44 UTC (rev 4357)
+++ trunk/catalog/install/includes/content/core.modes.php 2012-05-02 07:46:38 UTC (rev 4358)
@@ -15,7 +15,7 @@
/**
- TODO UTiliser le fichier de version pour les chemin
+ TODO UTiliser le fichier de version pour les chemin
*/
define('URL_OSCSS_ORG_TRAC', 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2Fcatalog&old_path=trunk%2Fcatalog');
define('URL_OSCSS_GET_REV', 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision');
@@ -33,7 +33,7 @@
public static function GetSort(){
- // sort in process
+ // sort in process
return 20;
}
@@ -144,7 +144,7 @@
.core::draw_help('modesConfig', core::l10n("Cette option vous permet de ré-écrire vos fichier de configuration (après déplacement), ou d'installer complètement votre boutique (effacement de la db).")/*, core::l10n("installer votre boutique, où juste mettre à jour les fichiers de configuration")*/)."\n"
.'</p>'."\n";
-// TODO A finaliser
+// TODO A finaliser
// echo '<p class="smallDesc">'."\n"
// .'<label>'.core::l10n("Type d'installation :").'</label>'."\n"
// .osc_draw_radio_field('install[type]', 'typeinstall', 'basic', ( (!isset($_POST['install']['type']) || (isset($_POST['install']['type'])&& $_POST['install']['type'] == 'basic'))? true : false) ).core::l10n("Install type basic").' '
@@ -424,7 +424,8 @@
@author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
private function get_info_core($file,$name='svn'){
- if(!file_exists($file)) return $this->PileMessage('alert', core::l10n("Erreur récupération fichier") );
+ if(!file_exists($file))
+ return $this->PileMessage('alert', core::l10n("Erreur récupération fichier") );
$SimpleParser = simplexml_load_file($file);
if(!isset($SimpleParser->$name)) $this->PileMessage('alert', core::l10n("Erreur récupération n° révision courant") );
else return $SimpleParser->$name;
@@ -484,10 +485,11 @@
// recup version svn core
$core_rev=$this->get_info_core($this->fs_document_root.FILEPATH_SVN_CORE);
+
// version current svn
- $c_v=$this->get_current_rev(URL_OSCSS_GET_REV);
- $curent_rev=((isset($_POST['CURENT_REV']) && $c_v != $_POST['CURENT_REV'])? $_POST['CURENT_REV']: $c_v);
+ $curent_rev=$this->get_current_rev(URL_OSCSS_GET_REV);
+
if((int)$core_rev>=(int)$curent_rev) {
$this->PileMessage('succes', core::l10n("Aucune mise à jour effectuée. pas de version plus récente") );
return;
@@ -496,7 +498,7 @@
$file=$this->fs_document_root.'install/old'.$core_rev.'new'.$curent_rev.'_patch.zip';
$oscss_zip = @fopen($file,'wb');
// recup zip
-
+// var_dump(__FILE__);
/**
Utiliser methode fetchRemote
*/
@@ -541,13 +543,13 @@
// Dump the internal XML tree back into a string
$saveXml = $doc->saveXML();
- $file_vers= @fopen($this->fs_document_root.FILEPATH_SVN_CORE,'w');
- fputs( $file_vers,$saveXml);
+ $r=unlink($this->fs_document_root.FILEPATH_SVN_CORE );
+ $file_vers= fopen($this->fs_document_root.FILEPATH_SVN_CORE,'w+');
+ $res = fputs( $file_vers,$saveXml);
fclose($file_vers);
-
/**
- TODO Chemin en dur , a revoir
+ TODO Chemin en dur , a revoir
*/
// report branche dans le core
if(file_exists($this->fs_document_root.PATH_SVN_BRANCHE)){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-02 07:00:55
|
Revision: 4357
http://oscss.svn.sourceforge.net/oscss/?rev=4357&view=rev
Author: oscim
Date: 2012-05-02 07:00:44 +0000 (Wed, 02 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-02 06:35:18 UTC (rev 4356)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-02 07:00:44 UTC (rev 4357)
@@ -56,4 +56,4 @@
INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'content', 1, 'OSC_CMS_CONTENT_SIMPLE','');
INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_SELECTION','');
\ No newline at end of file
+INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'featured', 1, 'OSC_FEATURED_SELECTION','');
\ 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-02 06:35:28
|
Revision: 4356
http://oscss.svn.sourceforge.net/oscss/?rev=4356&view=rev
Author: oscim
Date: 2012-05-02 06:35:18 +0000 (Wed, 02 May 2012)
Log Message:
-----------
ajustement colonne defaut
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/customers.php
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 21:59:18 UTC (rev 4355)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-02 06:35:18 UTC (rev 4356)
@@ -166,6 +166,7 @@
'alias'=>'modified',
'text'=>__('cms_content table heading last modified'),
'width'=>'10%',
+ 'default'=>true,
),
'c.content_status' => array(
'sort'=>true,
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-01 21:59:18 UTC (rev 4355)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-02 06:35:18 UTC (rev 4356)
@@ -197,6 +197,7 @@
'sort'=>true,
'alias'=>'cat_title',
'text'=>__('@customers table heading group name'),
+ 'default'=>true,
),
'c.customers_discount' => array(
@@ -235,6 +236,7 @@
'sort'=>true,
'alias'=>'number_of_logons',
'text'=>__('@customers table heading number of logons'),
+ 'default'=>true,
),
'c.customers_group_ra' => array(
'sort'=>true,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-01 21:59:25
|
Revision: 4355
http://oscss.svn.sourceforge.net/oscss/?rev=4355&view=rev
Author: oscim
Date: 2012-05-01 21:59:18 +0000 (Tue, 01 May 2012)
Log Message:
-----------
corretion commit avec erreur dans propagation
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
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/91_osc_configuration.sql
Removed Paths:
-------------
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
trunk/catalog/admin/includes/modules/pages/featured.php
Deleted: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-05-01 21:47:58 UTC (rev 4354)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-05-01 21:59:18 UTC (rev 4355)
@@ -1,36 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/04/2012 ,22:50:08
- @author genrated by GenerCode
- @encode UTF-8
- @class featured
-*/
-
-
-/* Listing */
-
- $lang['@featured table heading id'] = "Id" ;
- $lang['@featured table heading datatype id'] = "Id." ;
- $lang['@featured table heading min'] = "Min." ;
- $lang['@featured table heading max'] = "Max." ;
- $lang['@featured table heading status'] = "Etat" ;
- $lang['@featured table heading status type name'] = "Type" ;
- $lang['@featured table heading status type id'] = "Type id" ;
- $lang['@featured table heading date_added'] = "Ajouté" ;
- $lang['@featured table heading user_added'] = "Créer par" ;
- $lang['@featured table heading user_update'] = "Modifié par" ;
- $lang['@featured table heading date_update'] = "Modifié" ;
- $lang['table heading action'] = "Action" ;
-
-
-/* Edit / add */
- $lang['@featured tab specification'] = "Caractéristique" ;
- $lang['@featured text info type'] = "Choix du type" ;
- $lang['@featured text info featured min'] = "Nombre minimum d'entrée" ;
- $lang['@featured text info featured max'] = "Nombre maximum d'entrée" ;
-// $lang['table heading datatype'] = "Données" ;
-?>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-01 21:47:58 UTC (rev 4354)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-01 21:59:18 UTC (rev 4355)
@@ -4,40 +4,162 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/04/2012 ,22:50:08
- @author genrated by GenerCode
+ @date 30/03/2012, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class featureds
*/
-/* Listing */
- $lang['heading title featureds'] = "Mise en avant" ;
+$lang['heading title search']="Rechercher :" ;
+$lang['heading title goto']="Aller à :" ;
- $lang['@featureds table heading id'] = "Id" ;
- $lang['@featureds table heading datatype id'] = "Id." ;
- $lang['@featureds table heading min'] = "Min." ;
- $lang['@featureds table heading max'] = "Max." ;
- $lang['@featureds table heading status'] = "Etat" ;
- $lang['@featureds table heading status type name'] = "Type" ;
- $lang['@featureds table heading status type id'] = "Type id" ;
- $lang['@featureds table heading date_added'] = "Ajouté" ;
- $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['table heading action'] = "Action" ;
- /* bouton */
- $lang['@featureds image add featureds'] = "Ajouter une entrée" ;
+$lang['txt view image']="Voir" ;
+$lang['text new product']="Nouveau Produit " ;
+$lang['text last modified']="Dernière modification :" ;
+$lang['not dispo prev save']="Enregistrer votre produits pour accéder à ces options" ;
+$lang['text edit intro']="Merci de faire les changements nécessaires" ;
+// $lang['text info current categories']="Catégories courantes :" ;
+// $lang['empty category']="Catégorie vide" ;
-/* Edit / add */
- $lang['@featureds tab specification'] = "Caractéristique" ;
- $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" ;
+$lang['image preview public']="Prévisualiser la page public" ;
+$lang['image view public']="Voir la page public" ;
+$lang['image special']="Promotion" ;
+$lang['image expected on']="Produits en attente" ;
+$lang['image expected off']="Produits" ;
-/* rightto */
- $lang['@featureds txt link to'] = "Mise en avant" ;
-?>
+$lang['alert quit editeur']="Êtes-vous sûr de vouloir quitter ce produits " ;
+$lang['for manufactured']=" pour créer une nouveau fabricant" ;
+$lang['txt stock']=" Gérer le stock" ;
+$lang['txt all']=" Tout(s)" ;
+// $lang['txt categories']="Catégories" ;
+// $lang['txt cat all']=" Toute(s) catégorie(s)" ;
+
+
+
+
+/* listing */
+ /* Heading */
+ $lang['heading title products']="Produits" ;
+
+ /* Filtre */
+ $lang['@products filter tab clause']="Produits" ;
+
+ /* All fields used on listign and filters */
+ $lang['products table heading id']="id" ;
+ $lang['products table heading name']="Produits" ;
+ $lang['products table heading modele']="Modèle" ;
+ $lang['products table heading image']="Image" ;
+ $lang['products table heading status']="Etat" ;
+ $lang['products table heading stock']="Stock" ;
+ $lang['products table heading price']="Prix" ;
+ $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." ;
+ $lang['products table heading taxe id']="Tax.id" ;
+ $lang['products table heading track_stock']="Suivi stock" ;
+
+ $lang['products table heading categories']="Catégories" ;
+ $lang['products table heading categories id']="Cat.id" ;
+
+ $lang['table heading action']="Action" ;
+
+
+ /* Bouton */
+ $lang['@products add category datatype product']="Ajouter une catégorie" ;
+ $lang['@products image create new product']="Creer un nouveau produit" ;
+ $lang['@products link rss low stock']="Suivi alerte stock" ;
+
+
+
+
+/* new products */
+ $lang['heading title type']="Type :" ;
+ $lang['text info intro choose product type']="Vous devez définir le type du produit, ce type déterminera les fonctionnalités associées. Pour tous les produits qui ne sont pas virtuels, ou ayant des caractéristiques spéciales, le type de 'produit physique'. Pour les produits de type virtuel (logiciel, abonnement, etc, préciser alors son type. ) " ;
+
+/* inline */
+ $lang['product type :']="Type :" ;
+
+/* Fiche One products */
+ $lang['heading title edit']="Fiche produit - Edition d'un produit" ;
+ $lang['tab products data']="Caractéristiques" ;
+ $lang['tab products desc']="Descriptions " ;
+ $lang['tab products option']="Options" ;
+ $lang['tab products cross']="Produits complémentaires" ;
+
+ /* Edition products */
+ $lang['text edit sort order']="Ordre de tri :" ;
+ $lang['text edit product']="Édition Produit " ;
+// $lang['text categories']="Catégories :" ;
+ $lang['text products']="Produits :" ;
+ $lang['text products price info']="Prix :" ;
+ $lang['text products tax class']="Classe fiscale :" ;
+ $lang['text products price net']=" HT :" ;
+ $lang['text products price gross']=" TTC :" ;
+ $lang['text products final price']="Prix final : " ;
+ $lang['text products quantity info']="Quantité :" ;
+ $lang['text date added']="Date d'ajout :" ;
+ $lang['text date available']="Date de disponibilité :" ;
+ $lang['text products type']="Type de produit :" ;
+ $lang['text products ordered']="Ordre tri:" ;
+ $lang['text sort order']="Ordre de tri :" ;
+ $lang['text products status']="Statut :" ;
+ $lang['text products date available']="Date de disponibilité :" ;
+ $lang['text products date format']="<small>(jj/mm/aaaa)</small>" ;
+ $lang['text product available']="Actif " ;
+ $lang['text product not available']="Désactivé" ;
+ $lang['text products name']="Nom :" ;
+ $lang['text products description']="Description :" ;
+ $lang['text products quantity']="Quantité :" ;
+ $lang['text products model']="Modèle :" ;
+ $lang['text products image']="Image :" ;
+ $lang['text products weight']="Poids :" ;
+ $lang['text products weight help']="le poids du produit est nécessaire pour calculer les frais de livraison" ;
+ $lang['text product more information']="Pour plus d'information, merci de visiter cette <a href=\"http://%s\">page web</a> de produits." ;
+ $lang['text product date added']="Ce produit a été ajouté à notre catalogue le %s." ;
+ $lang['text product date available']="Ce produit sera en stock le %s." ;
+ $lang['text customers groups']="Groupe : " ;
+ $lang['text customers groups note']="Tarif Groupe" ;
+ $lang['text customers groups note detail']="Notez que si un champ est laissé vide, aucun prix pour ce groupe de clients sera inséré dans la base de données. Si un champ est rempli, mais la case n'est pas cochée, aucun prix ne sera inséré. Si un prix est déjà inséré dans la base de données, mais la case n'est pas cochée, celui-ci sera supprimé de la base de données." ;
+
+ $lang['text legend stock']="Stock" ;
+ $lang['text legend price']="Prix" ;
+ $lang['text legend image']="Image" ;
+
+
+ /* js alert */
+ $lang['js alert products name']="Le nom du produit est obligatoire" ;
+
+
+/* delete products */
+ $lang['text info heading delete product']="Supprimer le produit" ;
+ $lang['text delete product intro']="Êtes-vous sûr de vouloir supprimer définitivement ce produit ?" ;
+
+/* duplicate products */
+ $lang['text info copy to intro']="Veuillez choisir une nouvelle catégorie dans laquelle vous souhaitez copier ce produit" ;
+ $lang['text info heading copy to']="Copier vers" ;
+
+ $lang['create products in new link categorie for %s']="Copie réussie du produit" ;
+ $lang['error for create products in new link categorie for %s']="Erreur lors de la copie du produit" ;
+
+
+
+/* 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 " ;
+?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/modules/pages/featured.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featured.php 2012-05-01 21:47:58 UTC (rev 4354)
+++ trunk/catalog/admin/includes/modules/pages/featured.php 2012-05-01 21:59:18 UTC (rev 4355)
@@ -1,615 +0,0 @@
-<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/04/2012 ,22:50:08
- @author genrated by GenerCode
- @encode UTF-8
- @class featureds
-*/
-
-class featureds
- extends ModTwo /// new abstract class for nextgen module
- implements
- InterfaceModule,
- /*IntModTwo, */ /// new interface module for nextgen module
- ExtModConfig {
-
- const FILENAME = FILENAME_FEATURED;
-
- /**
- @var string file
- */
- public static $Id;
- /**
- @var array list code action module
- */
- public static $list=array();
- /**
- @var bool $dir_ok
- */
- public static $dir_ok;
- /**
- @var current object
- */
- public static $Info;
- /**
- @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::$datatype = 'featured';
-
- 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 = array(
- 'c.row_id' => array(
- 'sort'=>true,
- 'alias'=>'id',
- 'text'=>__('@featureds table heading id'),
- 'width'=>'2%',
- 'class'=>'tcenter',
- 'default'=>true,
- ),
- 'c.k_status_type' => array(
- 'sort'=>true,
- 'alias'=>'type',
- 'text'=>__('@featureds table heading status type id'),
- 'width'=>'8%',
- 'class'=>'tcenter',
- ),
- 's.status_name' => array(
- 'sort'=>true,
- 'alias'=>'type_name',
- 'text'=>__('@featureds table heading status type name'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'default'=>true,
- ),
- 'c.featureds_min' => array(
- 'sort'=>true,
- 'alias'=>'min',
- 'text'=>__('@featureds table heading min'),
- 'width'=>'2%',
- 'class'=>'tcenter',
- ),
- 'c.featureds_max' => array(
- 'sort'=>true,
- 'alias'=>'max',
- 'text'=>__('@featureds table heading max'),
- 'width'=>'2%',
- 'class'=>'tcenter',
- ),
- 'c.date_added' => array(
- 'sort'=>true,
- 'alias'=>'date_added',
- 'text'=>__('@featureds table heading date_added'),
- 'width'=>'10%',
- ),
- 'c.date_update' => array(
- 'sort'=>true,
- 'alias'=>'date_update',
- 'text'=>__('@featureds table heading date_update'),
- 'width'=>'10%',
- ),
- 'c.user_added' => array(
- 'sort'=>true,
- 'alias'=>'user_added',
- 'text'=>__('@featureds table heading user_added'),
- 'width'=>'10%',
- ),
- 'c.user_update' => array(
- 'sort'=>true,
- 'alias'=>'user_update',
- 'text'=>__('@featureds table heading user_update'),
- 'width'=>'10%',
- ),
- 'c.featureds_status' => array(
- 'sort'=>true,
- 'alias'=>'status',
- 'text'=>__('@featureds table heading status'),
- 'width'=>'2%',
- 'class'=>'tcenter',
- 'default'=>true,
- ),
- );
-
-// , k_status_type as type , featureds_status
-
- /**
- @remarks Construct all list , fields , th/td
- */
- self::$InitInfo['theader']['listing']=array(
-// array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- );
- self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
-
- self::$InitInfo['modele']['listing']=array(
-// false,
- );
-
- // min fields and not view directly colonne fields
- $listfield = 'k_status_type as type , featureds_status,';
- // put in
- if(isset($_SESSION['filters'][__CLASS__]['allfields']))
- $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
- else
- $_SESSION['filters']['allfields'] = array();
-
- $in_session = $_SESSION['filters']['allfields'];
- // check and appli
- foreach(self::$allfields as $key=>$row){
- $clean = substr($key, (strpos($key, '.')+1));
-
- if(is_array($row)){
- $txt = $row['text'];
- $alias = (isset($row['alias'])? $row['alias'] : $clean);
- $css = (isset($row['class'])? $row['class'] : 'tcenter');
- $width = (isset($row['width'])? $row['width'] : '5%');
- }
- else{
- $txt = $row;
- $alias = $clean;
- $css = 'tcenter';
- $width = '5%';
- }
-
-
-
- if(
- ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
- || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
- ) {
- $_SESSION['filters']['allfields'][$clean] = 'on';
- /**
- @remarks this define col theader title, and ajust html code
- */
- self::$InitInfo['theader']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt);
- self::$InitInfo['tfooter']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt );
- /**
- @remarks this define col in table, and if is possible sort
- */
- self::$InitInfo['modele']['listing'][$alias]=true;
-
- if($clean !=$alias)
- $listfield .=$key.' as '.$alias.',';
- else
- $listfield .=$key.',';
- }
- }
-
-
- self::$InitInfo['modele']['listing']['action']=false;
- self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
- self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
-
- self::$InitInfo['allfields']['listing'] = self::$allfields ;
-
- /**
- @remarks Active forms filter
- */
- self::$InitInfo['tfilter']['listing']=array(
- array(
- 'title'=>__('featureds filter tab fields'),
- 'type'=>'listfield'
- ),
- );
-
- /**
- @remarks Put detail for listing methode
- */
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
-
- /**
- @remarks this define menu master module in page
- */
- if(self::$action =='listing'){
- $i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'',
- 'title'=>__('image add featureds'),
- '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';
- else
- unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
- }
-
-
- tep_redirect(tep_href_link(self::FILENAME));
- break;
-
- case 'setflag':
- if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
- $c_id =(int) tep_db_prepare_input($_GET['cID']);
-
- if ($c_id > 0){
- $myarray = array('id'=>$c_id, 'status'=>$_GET['flag'] );
- sqlfeatureds::update($myarray);
- }
- }
-
- if(!isset($_GET['forceajax']))
- tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
- break;
-
- case 'insert':
- $myarray = array(
- 'type'=>tep_db_prepare_input($_POST['featureds_type']),
- 'min'=>tep_db_prepare_input($_POST['featureds_min']),
- 'max'=>tep_db_prepare_input($_POST['featureds_max']),
- );
-
- $res = sqlfeatureds::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,
- 'type'=>tep_db_prepare_input($_POST['featureds_type']),
- 'min'=>tep_db_prepare_input($_POST['featureds_min']),
- 'max'=>tep_db_prepare_input($_POST['featureds_max']),
- );
-
- sqlfeatureds::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=sqlfeatureds::delete($myarray);
- }
-
- tep_redirect(tep_href_link(self::FILENAME));
- break;
- }
-
- return self::$action;
- }
-
- public function get_header(){
- }
-
-
- /**
- @fn featureds::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 = sqlfeatureds::fetch(array('id'=>self::$Id ), true);
- }
- else{
- self::$Info = sqlfeatureds::Specimen(true);
- }
- break;
-
-
- case 'listing':
- default:
- /**
- @remarks retrun object load one inventaire
- */
- global $query_numrows, $languages_id;
- $adjust=new objectInfo(self::$InitInfo['adjust']);
-
-
- $query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
- " LEFT JOIN ".TABLE_STATUS." s ON(status_id = k_status_type AND s.language_id = '".$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 ');
-
- $_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('status'=>(int)$_GET['flag'], '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);
- elseif($k == 'date_added') $ord[$k]=tep_datetime_short($item[$k]);
- elseif($k == 'date_update') $ord[$k]=tep_datetime_short($item[$k]);
- else $ord[$k]=$item[$k];
-
- $res[]=$ord;
- }
- 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','flag','file','setflag','forceajax');
- $query_s='action=setflag&cID=' . $item['id'].'&flag=';
-
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, $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;
- }
-
-
- /**
- @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/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-01 21:47:58 UTC (rev 4354)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/20_osc_status.sql 2012-05-01 21:59:18 UTC (rev 4355)
@@ -15,9 +15,9 @@
UPDATE osc_status SET status_type = 'product' WHERE status_type = 'products_virtual_types';
-
--- if not exists (SELECT * FROM osc_status where status_type = 'geo_zone_type' AND status_name = 'VAT' )
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name ) VALUES (1, 'geo_zone_type', 1, 'VAT');
--- if not exists (SELECT * FROM osc_status WHERE status_type = 'geo_zone_type' AND status_name = 'SHIPPING' )
INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name ) VALUES (2, 'geo_zone_type', 1, 'SHIPPING');
+
+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','');
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-01 21:47:58 UTC (rev 4354)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-05-01 21:59:18 UTC (rev 4355)
@@ -309,6 +309,7 @@
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', 'true', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_FEATURED_S', 'DATATYPES_ROOTLISTING_FEATURED', 'product', 'DATATYPES_ROOTLISTING_FEATURED_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-01 21:48:05
|
Revision: 4354
http://oscss.svn.sourceforge.net/oscss/?rev=4354&view=rev
Author: oscim
Date: 2012-05-01 21:47:58 +0000 (Tue, 01 May 2012)
Log Message:
-----------
corretion commit avec erreur dans propagation
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/featured/
Modified: trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-01 21:37:11 UTC (rev 4353)
+++ trunk/catalog/admin/includes/gabarit/featureds/display_view.edit.gab 2012-05-01 21:47:58 UTC (rev 4354)
@@ -9,7 +9,7 @@
@encode UTF-8
*/
-// print_r(featured::$Info);
+// print_r(featureds::$Info);
?>
<h3><?php echo __('heading title edit'); ?></h3>
@@ -18,38 +18,38 @@
<div id="tabs">
<ul>
- <li><a href="#tabs-1"><?php echo __('featured tab specification'); ?></a></li>
+ <li><a href="#tabs-1"><?php echo __('@featureds tab specification'); ?></a></li>
</ul>
<div id="tabs-1" class="tabPage">
- <?php echo tep_draw_form('featured', featured::FILENAME, 'action='.((featured::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
+ <?php echo tep_draw_form('featureds', featureds::FILENAME, 'action='.((featureds::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
<p class="block_input">
- <label ><?php echo __('featured text info type'); ?></label>
- <?php echo tep_draw_pull_down_menu('featured_type', tep_get_status_array('featured_list',0,'status_name'),featured::$Info->type); ?>
+ <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); ?>
</p>
<p class="block_input">
- <Label><?php echo __('featured text info featured min') ?></label>
- <?php echo tep_draw_input_field('featured_min', '', featured::$Info->min) ?>
+ <Label><?php echo __('@featureds text info featureds min') ?></label>
+ <?php echo tep_draw_input_field('featureds_min', '', featureds::$Info->min) ?>
</p>
<p class="block_input">
- <Label><?php echo __('featured text info featured max') ?></label>
- <?php echo tep_draw_input_field('featured_max', '', featured::$Info->max) ?>
+ <Label><?php echo __('@featureds text info featureds max') ?></label>
+ <?php echo tep_draw_input_field('featureds_max', '', featureds::$Info->max) ?>
</p>
<!-- <p class="block_input">
- <Label><?php //echo __('text info featured visible') ?></label>
- <?php //echo tep_draw_radio_field('featured_visible', 'featured_visible_1', '1', $featured_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('featured_visible', 'featured_visible_0', '0', $featured_visible_N) . ' ' . VISIBLE_NO ?>
+ <Label><?php //echo __('text info featureds visible') ?></label>
+ <?php //echo tep_draw_radio_field('featureds_visible', 'featureds_visible_1', '1', $featureds_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('featureds_visible', 'featureds_visible_0', '0', $featureds_visible_N) . ' ' . VISIBLE_NO ?>
</p>-->
<p class="block_input button_nav">
<?php
echo tep_image_submit('', IMAGE_UPDATE) /*. tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' )*/;
- echo tep_js_back(tep_href_link(featured::FILENAME), IMAGE_CANCEL) ;
+ echo tep_js_back(tep_href_link(featureds::FILENAME), IMAGE_CANCEL) ;
?>
</p>
</form>
Added: trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/featureds/rightto.edit.gab 2012-05-01 21:47:58 UTC (rev 4354)
@@ -0,0 +1,50 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/05/2012, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $languages_id;
+
+$curr = MLinkTo::$currclass;
+
+$res = sqlfeatured::fetch(array('status'=>'1'), true);
+if(is_object($res))
+ $list[] = $res;
+else
+ $list = $res;
+
+?>
+<div class="LinkToView CategoryView">
+ <label>
+ <span class="text"><?php echo __('@featureds txt link to'); ?></span>
+
+ <span class="button_nav">
+<!-- <a
+ class="buttonimg fancy"
+ href="<?php //echo tep_href_link(FILENAME_CATEGORIES, '&datatype='.MLinkTo::$current.'&action=new_light&origin='. urlencode($curr::FILENAME.'?'.MLinkTo::$origin) ) ?>"
+ title="<?php //echo sprintf(__('add category datatype %s'), MLinkTo::$current )?>"
+ >-->
+ <?php //echo tep_image(DIR_WS_ICONS.'icon_add_new.png' ) ?>
+<!-- </a> -->
+ </span>
+ </label>
+ <ul class="LinkToView">
+ <?php foreach($list as $v): /*print_r($v); exit;*/?>
+
+ <?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); ?>
+ </li>
+ <?php else: ?>
+ <li class="<?php echo (isset($curr::$Info->categories[$v->id])? 'selected' : 'noselected') ?>">
+ <?php echo status_name('featured', $v->type ,$languages_id); ?>
+ </li>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </ul>
+</div>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-01 21:37:20
|
Revision: 4353
http://oscss.svn.sourceforge.net/oscss/?rev=4353&view=rev
Author: oscim
Date: 2012-05-01 21:37:11 +0000 (Tue, 01 May 2012)
Log Message:
-----------
correction coquille nomage featured , suite travail developpement gestion / coulplage childs datatype
normalisation comportement avec les liaison des categorie
ajout des fichier manquant , gabarit html , fr
ajustement des class sqlxx et report de l'usage du control de l'activation des liaisons Datatype::is_active()
noralisation de l'usage css et correction html des gabarit content et categorie
nouvelle nomenclature pour les fichier de langue , avec l'ajout d'@xxxx du nom du fichier pour simplifier maintenance et designation de la provenance
Ajout element sql d'install pour la gestion des featured
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/MLinkTo.php
trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
trunk/catalog/admin/includes/filenames.php
trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/featured.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
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/data/91_osc_configuration.sql
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/featureds/
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
trunk/catalog/admin/includes/modules/pages/featureds.php
trunk/catalog/common/classes/datatype_drivers/Data_featured.php
Modified: trunk/catalog/admin/includes/classes/MLinkTo.php
===================================================================
--- trunk/catalog/admin/includes/classes/MLinkTo.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/classes/MLinkTo.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -30,58 +30,75 @@
@var tableau des rootListing actif pour le datatype courant
*/
public static $RL = array();
+ /**
+ @var
+ */
+ public static $_instance;
-
-
- function __construct(){
- }
-
-
/**
@brief load all Rootlisting , and search link vs current datatype
+ @param $type string datatype name
*/
- public static function init($childs_datatype){
+ protected function __construct($type){
+ global $oscss,$language;
- self::$current = $childs_datatype;
+// var_dump('init');
+ self::$current = $type;
- $TYPE = strtoupper($childs_datatype);
-
$res = sqlconfiguration::fetch(array('like_key'=>'DATATYPES_ROOTLISTING_%'), true );
-
+// var_dump($res);
if(is_array($res)){
foreach($res as $row){
- $key = substr($row->key, strlen('DATATYPES_ROOTLISTING_') );
- if( ! DataTypes::is_active($key))
+ $key = strtolower(substr($row->key, strlen('DATATYPES_ROOTLISTING_') ) );
+ if( DataTypes::is_active($key))
// search current in type for rootlisting
if(in_array(self::$current, explode(',',$row->value))) {
+
+ //! @remarks Force load language centralised
+// $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/pages/'.$key.'s.txt');
+// var_dump($key);
self::$RL[$key] = $key;
}
}
}
}
+ public static function getInstance($type) {
+ if(self::$_instance == null)
+ self::$_instance = new self($type);
+ return self::$_instance;
+ }
+
+
+
+
/**
@brief load in html gabarit for construct link to Datatype rootListing
- @param $type string datatype name
+
@param $classname string name support class
@param $action string current action
@param string section param get for redirect after action
*/
- public static function LoadRightTo($type, $classname, $action, $origin){
+ public static function LoadRightTo( $classname, $action, $origin){
self::$currclass = $classname;
self::$origin = $origin;
- self::init($type, $classname);
+// self::getInstance(self::$current);
$result = array();
foreach(self::$RL as $key=>$row){
$mkey = strtolower($key);
+ global $language,$lang;
+// var_dump(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'modules/pages/'.$mkey.'s.txt');
+ $oscss = oscss_cstr::getInstance();
+ //! @remarks Force load language centralised
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/pages/'.$mkey.'s.txt');
$result[] = array(
- 'title'=> sprintf(__('link %s to %s') , $type , $mkey ),
+ 'title'=> sprintf(__('link %s to %s') , self::$current , $mkey ),
'text'=> tep_get_include_contents($mkey.'s/rightto.'.$action),
);
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -170,8 +170,6 @@
foreach($value as $key=>$row)
$sql_data_array[$key] = $row;
-// print_r($sql_data_array);
-// exit;
tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $id . "'");
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -118,44 +118,48 @@
$sql_data_array = $option['sqlarray'];
+ $update_sql_data = array('last_modified' => 'now()');
+ $sql_data_array = array_merge($sql_data_array, $update_sql_data);
-// if ($action == 'insert') {
-// $insert_sql_data = array('date_added' => 'now()');
-// $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
-//
-//
-// $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_content());
-//
-// $resobj=tep_db_perform(TABLE_CONTENT, $sql_data_array);
-//
-// $content_id =$resobj->__get('insertId');
-//
-// } elseif ($action == 'update') {
+ self::$modules->load_post_values($post);
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content());
- $update_sql_data = array('last_modified' => 'now()');
- $sql_data_array = array_merge($sql_data_array, $update_sql_data);
- self::$modules->load_post_values($post);
+ tep_db_perform(TABLE_CONTENT, $sql_data_array, 'update', "content_id = '" . (int)$content_id . "'");
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content());
+/**
+ TODO Couplage avec MLinkto + datatype actif
+*/
+ if(DataTypes::is_active('categorie')) {
+ /// Clean link posts to categorie and save new link
+ if(isset($option['cPath']) && count($post['categories']) == 0)
+ $post['categories'][] = $option['cPath'];
- tep_db_perform(TABLE_CONTENT, $sql_data_array, 'update', "content_id = '" . (int)$content_id . "'");
-// }
+ sqlcategorie::DataInCat('content', $content_id, $post['categories']);
+ }
+ if( DataTypes::is_active('featured')) {
+ if(count($post['linkto']['featured']) > 0)
+ sqlfeatured::AddLinkTo(
+ array(
+ 'datatype'=> 'content',
+ 'id'=> $products_id,
+ 'featured_array'=> $post['linkto']['featured']
+ )
+ );
+ else
+ sqlfeatured::AddLinkTo(
+ array(
+ 'datatype'=> 'content',
+ 'id'=> $products_id,
+ 'featured_array'=> array(),
+ )
+ );
+ }
-// var_dump($content_id);
- /// Clean link posts to categorie and save new link
- if(isset($option['cPath']) && count($post['categories']) == 0)
- $post['categories'][] = $option['cPath'];
-
- sqlcategorie::DataInCat('content', $content_id, $post['categories']);
-
-// print_r($post);
-// exit;
-
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
$language_id = $list_languages[$i]['id'];
@@ -163,29 +167,15 @@
$sql_data_array = array('content_text' => tep_db_prepare_input($post['content_text'][$language_id]) /*tep_db_prepare_input($content_text[$language_id])*/,
'content_title' => tep_db_prepare_input($post['content_title'][$language_id]) /*str_replace('&','&',tep_db_prepare_input($content_title[$language_id]))*/);
-// if ($action == 'insert') {
-//
-// $insert_sql_data = array(
-// 'content_id' => $content_id,
-// 'language_id' => $language_id
-// );
-//
-// $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
-//
-// $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_content_description ($language_id));
-//
-// tep_db_perform(TABLE_CONTENT_DESCRIPTION, $sql_data_array);
-//
-// } elseif ($action == 'update') {
$sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content_description ($language_id));
tep_db_perform(TABLE_CONTENT_DESCRIPTION, $sql_data_array, 'update', "content_id = '" . (int)$content_id . "' and language_id = '" . (int)$language_id . "'");
-// }
}
self::$modules->after_update ($content_id);
-// var_dump($content_id);
+
+
return $content_id;
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -130,6 +130,7 @@
if($num == 1){
$result=$res->fetchAssoc();
+// print_r(self::CleanKey($result));
return ((!$shortkey)? $result : self::CleanKey($result));
}
elseif($num > 1){
@@ -194,7 +195,9 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'featured_') ===0)
+ if( strpos($key,'row_') ===0)
+ $key=substr($key,strlen('row_'));
+ elseif( strpos($key,'featured_') ===0)
$key=substr($key,strlen('featured_'));
elseif( strpos($key,'k_status_') ===0)
$key=substr($key,strlen('k_status_'));
@@ -205,6 +208,71 @@
return $object;
}
+ /**
+ @brief Function link to for contruct link featued vs datatype
+ @note normlised methode used in childs datatype
+ */
+ public static function ListLinkTo($opt){
+
+ if(!isset($opt['id']))
+ return false;
+ else
+ $id = (int)$opt['id'];
+
+ if(!isset($opt['datatype']))
+ $datatype = $opt['datatype'] ;
+ else
+ $datatype = DATATYPES_DEFAULT_NOSELECTED;
+
+ $list = sqlfeatureddata::fetch(
+ array(
+ 'datatype'=> $datatype,
+ 'datatype_id'=> $id,
+ ),
+ true
+ );
+
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+
+ return $liste;
+ }
+
+ /**
+ @brief Function link to for contruct link featued vs datatype
+ @note normlised methode used in childs datatype
+ */
+ public static function AddLinkTo($opt){
+ self::getInstance();
+
+ if(!isset($opt['id']))
+ return false;
+ else
+ $id = (int)$opt['id'];
+
+ if(!isset($opt['datatype']))
+ $datatype = $opt['datatype'] ;
+ else
+ $datatype = DATATYPES_DEFAULT_NOSELECTED;
+
+
+ $data_array_link = $opt['featured_array'];
+
+ sqlfeatureddata::delete(array('datatype'=> $datatype , 'datatype_id'=>$id ));
+
+ foreach($data_array_link as $value)
+ $res = sqlfeatureddata::create(
+ array(
+ 'featured_id'=> $value,
+ 'datatype'=> $datatype,
+ 'datatype_id'=> $id,
+ )
+ );
+ return $res;
+ }
+
}
@@ -238,10 +306,10 @@
// $sql_data_array['row_id'] = tep_db_prepare_input($option['id']);
$sql_data_array['featured_id'] = tep_db_prepare_input($option['featured_id']);
$sql_data_array['datatype'] = tep_db_prepare_input($option['datatype']);
- $sql_data_array['datatype_id '] = tep_db_prepare_input($option['datatype_id']);
+ $sql_data_array['datatype_id'] = tep_db_prepare_input($option['datatype_id']);
- $sql_data_array['date_start'] = (isset($option['date_start'])) ? tep_db_prepare_input($option['date_start']) :'0';
- $sql_data_array['date_end'] = (isset($option['date_end'])) ? tep_db_prepare_input($option['date_end']) :'0';
+ $sql_data_array['date_start'] = (isset($option['date_start'])) ? tep_db_prepare_input($option['date_start']) :'1000-01-01 00:00:00';
+ $sql_data_array['date_end'] = (isset($option['date_end'])) ? tep_db_prepare_input($option['date_end']) :'1000-01-01 00:00:00';
$sql_data_array['date_added'] = 'NOW()';
$sql_data_array['user_added'] = $_SESSION['login_id'];
@@ -265,14 +333,14 @@
$where ='';
if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
- if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype'])) $where .="AND datatype = '".(string)$option['datatype']."' ";
if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
if(isset($option['featured_id'])) $where .="AND featured_id = '".(int)$option['featured_id']."' ";
- $sql_data_array['date_start'] = (isset($option['date_start'])) ? tep_db_prepare_input($option['date_start']) :'0';
- $sql_data_array['date_end'] = (isset($option['date_end'])) ? tep_db_prepare_input($option['date_end']) :'0';
+ $sql_data_array['date_start'] = (isset($option['date_start'])) ? tep_db_prepare_input($option['date_start']) :'1000-01-01 00:00:00';
+ $sql_data_array['date_end'] = (isset($option['date_end'])) ? tep_db_prepare_input($option['date_end']) :'1000-01-01 00:00:00';
$sql_data_array['last_modified'] = 'NOW()';
$sql_data_array['user_modified'] = $_SESSION['login_id'];
@@ -309,11 +377,10 @@
$where ="";
if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
- if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype'])) $where .="AND datatype = '".(string)$option['datatype']."' ";
if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
if(isset($option['featured_id'])) $where .="AND featured_id = '".(int)$option['featured_id']."' ";
-
if($where=='')
return false;
@@ -350,7 +417,7 @@
$where ="";
if(isset($option['id'])) $where .="AND featured_id = '".(int)$option['id']."' ";
- if(isset($option['datatype'])) $where .="AND datatype = '".(int)$option['datatype']."' ";
+ if(isset($option['datatype'])) $where .="AND datatype = '".(string)$option['datatype']."' ";
if(isset($option['datatype_id'])) $where .="AND datatype_id = '".(int)$option['datatype_id']."' ";
if(isset($option['featured_id'])) $where .="AND featured_id = '".(int)$option['featured_id']."' ";
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -121,14 +121,42 @@
tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
}
- /// Clean link product to categorie and save new link
- if(isset($option['cPath']) && count($post['categories']) == 0){
- $post['categories'][] = $option['cPath'];
- sqlcategorie::DataInCat('products', $products_id, $post['categories']);
- }
- elseif(count($post['categories']) > 0)
- sqlcategorie::DataInCat('products', $products_id, $post['categories']);
+/**
+ TODO Couplage avec MLinkto + datatype actif
+*/
+ if(DataTypes::is_active('categorie')) {
+ /// Clean link product to categorie and save new link
+ if(isset($option['cPath']) && count($post['categories']) == 0){
+ $post['categories'][] = $option['cPath'];
+ sqlcategorie::DataInCat('products', $products_id, $post['categories']);
+ }
+ elseif(count($post['categories']) > 0)
+ sqlcategorie::DataInCat('products', $products_id, $post['categories']);
+ }
+ if( DataTypes::is_active('featured')) {
+ if(count($post['linkto']['featured']) > 0)
+ sqlfeatured::AddLinkTo(
+ array(
+ 'datatype'=> 'product',
+ 'id'=> $products_id,
+ 'featured_array'=> $post['linkto']['featured']
+ )
+ );
+ else
+ sqlfeatured::AddLinkTo(
+ array(
+ 'datatype'=> 'product',
+ 'id'=> $products_id,
+ 'featured_array'=> array(),
+ )
+ );
+
+ }
+
+
+
+
/// Separate Pricing Per Customer
$customers_group_query = $DB->query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id != '0' order by customers_group_id");
// Gets all of the customers groups
@@ -138,16 +166,16 @@
$attributes = tep_db_fetch_array($attributes_query);
if (tep_db_num_rows($attributes_query) > 0) {
- if (isset($post['sppcoption'][$customers_group['customers_group_id']]) && isset($post['sppcprice'][$customers_group['customers_group_id']]) && $post['sppcprice'][$customers_group['customers_group_id']]!= '') {
- // this is checking if the check box is checked and the price is not null
- if ( $_POST['sppcprice'][$customers_group['customers_group_id']] != $attributes['customers_group_price'])
- $DB->query("update " . TABLE_PRODUCTS_GROUPS . " set customers_group_price = '" . $post['sppcprice'][$customers_group['customers_group_id']] . "' where customers_group_id = '" . $customers_group['customers_group_id'] . "' and products_id = '" . $products_id . "'");
- }
- else
- $DB->query("delete from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '" . $customers_group['customers_group_id'] . "' and products_id = '" . $products_id . "'");
+ if (isset($post['sppcoption'][$customers_group['customers_group_id']]) && isset($post['sppcprice'][$customers_group['customers_group_id']]) && $post['sppcprice'][$customers_group['customers_group_id']]!= '') {
+ // this is checking if the check box is checked and the price is not null
+ if ( $_POST['sppcprice'][$customers_group['customers_group_id']] != $attributes['customers_group_price'])
+ $DB->query("update " . TABLE_PRODUCTS_GROUPS . " set customers_group_price = '" . $post['sppcprice'][$customers_group['customers_group_id']] . "' where customers_group_id = '" . $customers_group['customers_group_id'] . "' and products_id = '" . $products_id . "'");
+ }
+ else
+ $DB->query("delete from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '" . $customers_group['customers_group_id'] . "' and products_id = '" . $products_id . "'");
}
elseif (isset($_POST['sppcoption'][$customers_group['customers_group_id']]) && isset($post['sppcprice'][$customers_group['customers_group_id']]) && $post['sppcprice'][$customers_group['customers_group_id']] != '')
- $DB->query("insert into " . TABLE_PRODUCTS_GROUPS . " (products_id, customers_group_id, customers_group_price) values ('" . $products_id . "', '" . $customers_group['customers_group_id'] . "', '" . $post['sppcprice'][$customers_group['customers_group_id']] . "')");
+ $DB->query("insert into " . TABLE_PRODUCTS_GROUPS . " (products_id, customers_group_id, customers_group_price) values ('" . $products_id . "', '" . $customers_group['customers_group_id'] . "', '" . $post['sppcprice'][$customers_group['customers_group_id']] . "')");
}
@@ -159,20 +187,20 @@
$sql_data_array = array('products_name' => tep_db_prepare_input($post['products_name'][$language_id]) );
if ($action == 'insert_product') {
- $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id);
+ $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id);
- $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
- // ACA START INSERT IN PRODUCT_DESCRIPTION TABLE
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products_description ($language_id));
+ $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
+ // ACA START INSERT IN PRODUCT_DESCRIPTION TABLE
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products_description ($language_id));
- tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
+ tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
}
elseif ($action == 'update_product') {
- // ACA START UPDATE PRODUCT_DESCRIPTION TABLE
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products_description ($language_id));
+ // ACA START UPDATE PRODUCT_DESCRIPTION TABLE
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products_description ($language_id));
- tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', " products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "' ");
+ tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', " products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "' ");
}
}
@@ -234,13 +262,29 @@
$product = tep_db_fetch_array($product_query);
tep_db_free_result($product_query);
- $cat_query = $DB->query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id='" . (int)tep_db_input($ID) . "' ");
- while($cat_l = tep_db_fetch_array($cat_query)){
- $cat_list[$cat_l['categories_id']]=$cat_l;
- }
- $product['categories']=$cat_list;
- tep_db_free_result($cat_query);
+/**
+ TODO Couplage avec MLinkto + datatype actif
+*/
+ if(DataTypes::is_active('categorie')) {
+ $cat_query = $DB->query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id='" . (int)tep_db_input($ID) . "' ");
+ while($cat_l = tep_db_fetch_array($cat_query)){
+ $cat_list[$cat_l['categories_id']]=$cat_l;
+ }
+ $product['categories']=$cat_list;
+ tep_db_free_result($cat_query);
+ }
+ if( DataTypes::is_active('featured')) {
+ $res= sqlfeatured::ListLinkTo(
+ array(
+ 'datatype'=> 'product',
+ 'id'=> $ID,
+ ), true
+ );
+ foreach($res as $row)
+ $product['featureds'][$row->featured_id]=$row;
+ }
+
$product['products_date_available']=(isset($product['products_date_available'])? tep_date_short($product['products_date_available']) : '');
// <!-- BOF Separate Pricing Per Customer -->
Modified: trunk/catalog/admin/includes/filenames.php
===================================================================
--- trunk/catalog/admin/includes/filenames.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/filenames.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -34,7 +34,7 @@
define('FILENAME_DEFAULT', 'index.php');
define('FILENAME_FULL_TAG', 'header_tags.php');
define('FILENAME_FEEDS', 'rss.php');
-define('FILENAME_FEATURED', 'featured.php');
+define('FILENAME_FEATURED', 'featureds.php');
define('FILENAME_FORBIDEN', 'forbiden.php');
define('FILENAME_GEO_ZONES', 'geo_zones.php');
define('FILENAME_GOOGLE_SITEMAP', 'ggsitemap.php');
Modified: trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab 2012-05-01 21:37:11 UTC (rev 4353)
@@ -100,6 +100,8 @@
</div>
<div class="edit box_right fright w_30">
+
+ <fieldset class="block_field">
<dl>
<dt class="block_input tcenter" style=" text-align:center;">
<?php echo tep_info_image( categories::$cInfo->categories_image, 'image', TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT) ?>
@@ -120,7 +122,7 @@
<dd class="block_input w_90 CategoryView ">
<label for="products_date_available"><?php echo __('txt categories'); ?></label>
- <ul id="cat_list_in_edit" class="ChooseSelect">
+ <ul class="LinkToView ChooseSelect">
<li class="<?php echo (((int)categories::$cInfo->parent_id == '0')? 'selected' : 'noselected') ?>"><?php echo tep_draw_radio_field('cPath','cat_0', '0', ((int)categories::$cInfo->parent_id == '0') ).' '.__('text categorie racine') ?></li>
<?php foreach(get_cat_list(0) as $v)
if(categories::$cInfo->categories_id != $v['categories_id']){
@@ -141,6 +143,7 @@
?>
</dt>
</dl>
+ </fieldset>
</div>
</form>
Modified: trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab 2012-05-01 21:37:11 UTC (rev 4353)
@@ -12,9 +12,9 @@
$curr = MLinkTo::$currclass;
?>
-<div class="CategoryView">
+<div class="LinkToView CategoryView">
<label>
- <span class="text"><?php echo __('txt categories'); ?></span>
+ <span class="text"><?php echo __('@categories txt link to'); ?></span>
<span class="button_nav">
<a
@@ -28,7 +28,7 @@
</label>
- <ul id="cat_list_in_edit">
+ <ul class="LinkToView">
<?php foreach($curr::$Info->categories as $v): $k=$v['categories_id']; ?>
<li class="selected">
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-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-05-01 21:37:11 UTC (rev 4353)
@@ -55,6 +55,8 @@
</div>
<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>
@@ -68,7 +70,7 @@
<!-- All LinkTo -->
- <?php foreach(MLinkTo::LoadRightTo(cms_content::$datatype, 'cms_content', 'edit' , 'action='.cms_content::$action.'&cID='.@$_GET['cID'] ) as $row): ?>
+ <?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>
@@ -80,6 +82,7 @@
<?php echo tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$Info->id), IMAGE_CANCEL); ?>
</dt>
</dl>
+ </fieldset>
</div>
</div>
<?php
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-05-01 21:37:11 UTC (rev 4353)
@@ -224,12 +224,12 @@
</dd>
- <!-- All LinkTo -->
- <?php foreach(MLinkTo::LoadRightTo(products::$datatype, 'products', 'edit' , 'action='.products::$action.'&pID='.@$_GET['pID'] ) as $row): ?>
- <dt class="block_input w_90">
- <?php echo $row['text'] ;?>
- </dt>
- <?php endforeach;?>
+ <!-- All LinkTo -->
+ <?php foreach(MLinkTo::LoadRightTo( 'products', 'edit' , 'action='.products::$action.'&pID='.@$_GET['pID'] ) as $row): ?>
+ <dt class="block_input w_90">
+ <?php echo $row['text'] ;?>
+ </dt>
+ <?php endforeach;?>
<dd class="block_input button_nav" style="width:95%;">
<?php
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2012-05-01 21:37:11 UTC (rev 4353)
@@ -31,4 +31,8 @@
$lang['DATATYPES_ROOTLISTING_MANUFACTURER_S']="les datatypes pris en charge par le datatype manufacturer" ;
$lang['DATATYPES_ROOTLISTING_MANUFACTURER_L']="la liste des datatypes couplé aux les fabricants" ;
+
+$lang['DATATYPES_ROOTLISTING_FEATURED_S']="les datatypes pris en charge par le datatype featured" ;
+$lang['DATATYPES_ROOTLISTING_FEATURED_L']="la liste des datatypes couplé aux les featured" ;
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt 2012-05-01 21:37:11 UTC (rev 4353)
@@ -43,8 +43,11 @@
$lang['text delete warning datatypes %1$s number %2$s']="<strong>ATTENTION :</strong> Il y a x %2\$s contenu de donnée de type (%1\$s) liées à cette catégorie !" ;
$lang['text delete datatype %s exe']="supprimer les contenu de donnée de type (%s) de la catégories ? " ;
+/* rightto */
+ $lang['@categories txt link to'] = "Catégories" ;
+
/* other */
$lang['text categories']="Catégories :" ;
$lang['text subcategories']="Sous-catégories :" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featured.txt 2012-05-01 21:37:11 UTC (rev 4353)
@@ -12,29 +12,25 @@
/* Listing */
- $lang['image add featured'] = "Creer une liste" ;
- $lang['view filtres for listing'] = "Filtres" ;
- $lang['featured filter tab fields'] = "Colonnes" ;
- $lang['filter legend choose fields'] = "Listes des colonnes visibles" ;
- $lang['featured table heading id'] = "Id" ;
- $lang['featured table heading datatype id'] = "Id." ;
- $lang['featured table heading min'] = "Min." ;
- $lang['featured table heading max'] = "Max." ;
- $lang['featured table heading status'] = "Etat" ;
- $lang['featured table heading status type name'] = "Type" ;
- $lang['featured table heading status type id'] = "Type id" ;
- $lang['featured table heading date_added'] = "Ajouté" ;
- $lang['featured table heading user_added'] = "Créer par" ;
- $lang['featured table heading user_update'] = "Modifié par" ;
- $lang['featured table heading date_update'] = "Modifié" ;
+ $lang['@featured table heading id'] = "Id" ;
+ $lang['@featured table heading datatype id'] = "Id." ;
+ $lang['@featured table heading min'] = "Min." ;
+ $lang['@featured table heading max'] = "Max." ;
+ $lang['@featured table heading status'] = "Etat" ;
+ $lang['@featured table heading status type name'] = "Type" ;
+ $lang['@featured table heading status type id'] = "Type id" ;
+ $lang['@featured table heading date_added'] = "Ajouté" ;
+ $lang['@featured table heading user_added'] = "Créer par" ;
+ $lang['@featured table heading user_update'] = "Modifié par" ;
+ $lang['@featured table heading date_update'] = "Modifié" ;
$lang['table heading action'] = "Action" ;
/* Edit / add */
- $lang['featured tab specification'] = "Caractéristique" ;
- $lang['featured text info type'] = "Choix du type" ;
- $lang['featured text info featured min'] = "Nombre minimum d'entrée" ;
- $lang['featured text info featured max'] = "Nombre maximum d'entrée" ;
+ $lang['@featured tab specification'] = "Caractéristique" ;
+ $lang['@featured text info type'] = "Choix du type" ;
+ $lang['@featured text info featured min'] = "Nombre minimum d'entrée" ;
+ $lang['@featured text info featured max'] = "Nombre maximum d'entrée" ;
// $lang['table heading datatype'] = "Données" ;
?>
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-05-01 21:37:11 UTC (rev 4353)
@@ -0,0 +1,43 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class featureds
+*/
+
+/* Listing */
+ $lang['heading title featureds'] = "Mise en avant" ;
+
+ $lang['@featureds table heading id'] = "Id" ;
+ $lang['@featureds table heading datatype id'] = "Id." ;
+ $lang['@featureds table heading min'] = "Min." ;
+ $lang['@featureds table heading max'] = "Max." ;
+ $lang['@featureds table heading status'] = "Etat" ;
+ $lang['@featureds table heading status type name'] = "Type" ;
+ $lang['@featureds table heading status type id'] = "Type id" ;
+ $lang['@featureds table heading date_added'] = "Ajouté" ;
+ $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['table heading action'] = "Action" ;
+
+ /* bouton */
+ $lang['@featureds image add featureds'] = "Ajouter une entrée" ;
+
+
+/* Edit / add */
+ $lang['@featureds tab specification'] = "Caractéristique" ;
+ $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" ;
+
+
+/* rightto */
+ $lang['@featureds txt link to'] = "Mise en avant" ;
+?>
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-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-01 21:37:11 UTC (rev 4353)
@@ -19,8 +19,8 @@
$lang['text last modified']="Dernière modification :" ;
$lang['not dispo prev save']="Enregistrer votre produits pour accéder à ces options" ;
$lang['text edit intro']="Merci de faire les changements nécessaires" ;
-$lang['text info current categories']="Catégories courantes :" ;
-$lang['empty category']="Catégorie vide" ;
+// $lang['text info current categories']="Catégories courantes :" ;
+// $lang['empty category']="Catégorie vide" ;
$lang['image preview public']="Prévisualiser la page public" ;
@@ -33,8 +33,8 @@
$lang['for manufactured']=" pour créer une nouveau fabricant" ;
$lang['txt stock']=" Gérer le stock" ;
$lang['txt all']=" Tout(s)" ;
-$lang['txt categories']="Catégories" ;
-$lang['txt cat all']=" Toute(s) catégorie(s)" ;
+// $lang['txt categories']="Catégories" ;
+// $lang['txt cat all']=" Toute(s) catégorie(s)" ;
@@ -57,14 +57,16 @@
$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." ;
- $lang['products table heading taxe id']="Tax. id" ;
+ $lang['products table heading taxe id']="Tax.id" ;
$lang['products table heading track_stock']="Suivi stock" ;
$lang['products table heading categories']="Catégories" ;
- $lang['products table heading categories id']="Cat. id" ;
+ $lang['products table heading categories id']="Cat.id" ;
$lang['table heading action']="Action" ;
@@ -94,7 +96,7 @@
/* Edition products */
$lang['text edit sort order']="Ordre de tri :" ;
$lang['text edit product']="Édition Produit " ;
- $lang['text categories']="Catégories :" ;
+// $lang['text categories']="Catégories :" ;
$lang['text products']="Produits :" ;
$lang['text products price info']="Prix :" ;
$lang['text products tax class']="Classe fiscale :" ;
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -91,8 +91,11 @@
if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+ // instancie MLinkTo
+ MLinkTo::getInstance(self::$datatype);
+
// Use factory class aca
- self::$modules=new AcaFactory('content'/*,'MODULE_CONTENT_INSTALLED_BO'*/);
+ self::$modules=new AcaFactory(self::$datatype/*,'MODULE_CONTENT_INSTALLED_BO'*/);
self::$modules->set_image_handler();
self::$languages = tep_get_languages();
Modified: trunk/catalog/admin/includes/modules/pages/featured.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featured.php 2012-05-01 16:52:06 UTC (rev 4352)
+++ trunk/catalog/admin/includes/modules/pages/featured.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -7,10 +7,10 @@
@date 22/04/2012 ,22:50:08
@author genrated by GenerCode
@encode UTF-8
- @class featured
+ @class featureds
*/
-class featured
+class featureds
extends ModTwo /// new abstract class for nextgen module
implements
InterfaceModule,
@@ -57,6 +57,7 @@
global $languages_id;
self::$code=__CLASS__;
+ self::$datatype = 'featured';
self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
@@ -97,7 +98,7 @@
'c.row_id' => array(
'sort'=>true,
'alias'=>'id',
- 'text'=>__('featured table heading id'),
+ 'text'=>__('@featureds table heading id'),
'width'=>'2%',
'class'=>'tcenter',
'default'=>true,
@@ -105,67 +106,67 @@
'c.k_status_type' => array(
'sort'=>true,
'alias'=>'type',
- 'text'=>__('featured table heading status type id'),
+ 'text'=>__('@featureds table heading status type id'),
'width'=>'8%',
'class'=>'tcenter',
),
's.status_name' => array(
'sort'=>true,
'alias'=>'type_name',
- 'text'=>__('featured table heading status type name'),
+ 'text'=>__('@featureds table heading status type name'),
'width'=>'10%',
'class'=>'tcenter',
'default'=>true,
),
- 'c.featured_min' => array(
+ 'c.featureds_min' => array(
'sort'=>true,
'alias'=>'min',
- 'text'=>__('featured table heading min'),
+ 'text'=>__('@featureds table heading min'),
'width'=>'2%',
'class'=>'tcenter',
),
- 'c.featured_max' => array(
+ 'c.featureds_max' => array(
'sort'=>true,
'alias'=>'max',
- 'text'=>__('featured table heading max'),
+ 'text'=>__('@featureds table heading max'),
'width'=>'2%',
'class'=>'tcenter',
),
'c.date_added' => array(
'sort'=>true,
'alias'=>'date_added',
- 'text'=>__('featured table heading date_added'),
+ 'text'=>__('@featureds table heading date_added'),
'width'=>'10%',
),
'c.date_update' => array(
'sort'=>true,
'alias'=>'date_update',
- 'text'=>__('featured table heading date_update'),
+ 'text'=>__('@featureds table heading date_update'),
'width'=>'10%',
),
'c.user_added' => array(
'sort'=>true,
'alias'=>'user_added',
- 'text'=>__('featured table heading user_added'),
+ 'text'=>__('@featureds table heading user_added'),
'width'=>'10%',
),
'c.user_update' => array(
'sort'=>true,
'alias'=>'user_update',
- 'text'=>__('featured table heading user_update'),
+ 'text'=>__('@featureds table heading user_update'),
'width'=>'10%',
),
- 'c.featured_status' => array(
+ 'c.featureds_status' => array(
'sort'=>true,
'alias'=>'status',
- 'text'=>__('featured table heading status'),
+ 'text'=>__('@featureds table heading status'),
'width'=>'2%',
'class'=>'tcenter',
'default'=>true,
),
);
-// , k_status_type as type , featured_status
+// , k_status_type as type , featureds_status
/**
@remarks Construct all list , fields , th/td
@@ -180,10 +181,10 @@
);
// min fields and not view directly colonne fields
- $listfield = 'k_status_type as type , featured_status,';
+ $listfield = 'k_status_type as type , featureds_status,';
// put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
- $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
else
$_SESSION['filters']['allfields'] = array();
@@ -241,7 +242,7 @@
*/
self::$InitInfo['tfilter']['listing']=array(
array(
- 'title'=>__('featured filter tab fields'),
+ 'title'=>__('featureds filter tab fields'),
'type'=>'listfield'
),
);
@@ -261,7 +262,7 @@
'format'=>'button_nav',
'image'=>'',
'cssclass'=>'',
- 'title'=>__('image add featured'),
+ 'title'=>__('image add featureds'),
'url'=>tep_href_link(self::FILENAME, 'action=new'),
);
@@ -288,8 +289,8 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'][__CLASS__]['allfields'] =array();
- foreach($_POST['allfields'] as $key=>$row){
+ $_SESSION['filters'] =array();
+ foreach($_POST['filters']['listfield'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
else
@@ -306,7 +307,7 @@
if ($c_id > 0){
$myarray = array('id'=>$c_id, 'status'=>$_GET['flag'] );
- sqlfeatured::update($myarray);
+ sqlfeatureds::update($myarray);
}
}
@@ -316,12 +317,12 @@
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']),
);
- $res = sqlfeatured::create($myarray);
+ $res = sqlfeatureds::create($myarray);
tep_redirect(tep_href_link(self::FILENAME ));
break;
@@ -332,12 +333,12 @@
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);
+ sqlfeatureds::update($myarray);
}
tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . $c_id ));
@@ -349,7 +350,7 @@
$myarray = array(
'id'=>$c_id,
);
- $res=sqlfeatured::delete($myarray);
+ $res=sqlfeatureds::delete($myarray);
}
tep_redirect(tep_href_link(self::FILENAME));
@@ -364,7 +365,7 @@
/**
- @fn featured::GetDBValue();
+ @fn featureds::GetDBValue();
@brief return DB value adapted for current action
Use self::action for determine switch
@return
@@ -379,10 +380,10 @@
case 'edit':
case 'new':
if( (int)self::$Id > 0) {
- self::$Info = sqlfeatured::fetch(array('id'=>self::$Id ), true);
+ self::$Info = sqlfeatureds::fetch(array('id'=>self::$Id ), true);
}
else{
- self::$Info = sqlfeatured::Specimen(true);
+ self::$Info = sqlfeatureds::Specimen(true);
}
break;
@@ -397,7 +398,7 @@
$query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
- " LEFT JOIN ".TABLE_STATUS." s ON(status_id = k_status_type AND s.language_id = '".$languages_id."' AND status_type='featured_list') " .
+ " 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 ');
Added: trunk/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/featureds.php (rev 0)
+++ trunk/catalog/admin/includes/modules/pages/featureds.php 2012-05-01 21:37:11 UTC (rev 4353)
@@ -0,0 +1,615 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class featureds
+*/
+
+class featureds
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ /*IntModTwo, */ /// new interface module for nextgen module
+ ExtModConfig {
+
+ const FILENAME = FILENAME_FEATURED;
+
+ /**
+ @var string file
+ */
+ public static $Id;
+ /**
+ @var array list code action module
+ */
+ public static $list=array();
+ /**
+ @var bool $dir_ok
+ */
+ public static $dir_ok;
+ /**
+ @var current object
+ */
+ public static $Info;
+ /**
+ @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::$datatype = 'featured';
+
+ 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 = array(
+ 'c.row_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('@featureds table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'c.k_status_type' => array(
+ 'sort'=>true,
+ 'alias'=>'type',
+ 'text'=>__('@featureds table heading status type id'),
+ 'width'=>'8%',
+ 'class'=>'tcenter',
+ ),
+ 's.status_name' => array(
+ 'sort'=>true,
+ 'alias'=>'type_name',
+ 'text'=>__('@featureds table heading status type name'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'c.featured_min' => array(
+ 'sort'=>true,
+ 'alias'=>'min',
+ 'text'=>__('@featureds table heading min'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ ),
+ 'c.featured_max' => array(
+ 'sort'=>true,
+ 'alias'=>'max',
+ 'text'=>__('@featureds table heading max'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ ),
+ 'c.date_added' => array(
+ 'sort'=>true,
+ 'alias'=>'date_added',
+ 'text'=>__('@featureds table heading date_added'),
+ 'width'=>'10%',
+ ),
+ 'c.date_update' => array(
+ 'sort'=>true,
+ 'alias'=>'date_update',
+ 'text'=>__('@featureds table heading date_update'),
+ 'width'=>'10%',
+ ),
+ 'c.user_added' => array(
+ 'sort'=>true,
+ 'alias'=>'user_added',
+ 'text'=>__('@featureds table heading user_added'),
+ 'width'=>'10%',
+ ),
+ 'c.user_update' => array(
+ 'sort'=>true,
+ 'alias'=>'user_update',
+ 'text'=>__('@featureds table heading user_update'),
+ 'width'=>'10%',
+ ),
+ 'c.featured_status' => array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('@featureds table heading status'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ );
+
+// , k_status_type as type , featured_status
+
+ /**
+ @remarks Construct all list , fields , th/td
+ */
+ self::$InitInfo['theader']['listing']=array(
+// array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
+ );
+ self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
+
+ self::$InitInfo['modele']['listing']=array(
+// false,
+ );
+
+ // min fields and not view directly colonne fields
+ $listfield = 'k_status_type as type , featured_status,';
+ // put in
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+ // check and appli
+ foreach(self::$allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(is_array($row)){
+ $txt = $row['text'];
+ $alias = (isset($row['alias'])? $row['alias'] : $clean);
+ $css = (isset($row['class'])? $row['class'] : 'tcenter');
+ $width = (isset($row['width'])? $row['width'] : '5%');
+ }
+ else{
+ $txt = $row;
+ $alias = $clean;
+ $css = 'tcenter';
+ $width = '5%';
+ }
+
+
+
+ if(
+ ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+ $_SESSION['filters']['allfields'][$clean] = 'on';
+ /**
+ @remarks this define col theader title, and ajust html code
+ */
+ self::$InitInfo['theader']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt);
+ self::$InitInfo['tfooter']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt );
+ /**
+ @remarks this define col in table, and if is possible sort
+ */
+ self::$InitInfo['modele']['listing'][$alias]=true;
+
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+ }
+ }
+
+
+ self::$InitInfo['modele']['listing']['action']=false;
+ self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+ self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;
+
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'title'=>__('featureds filter tab fields'),
+ 'type'=>'listfield'
+ ),
+ );
+
+ /**
+ @remarks Put detail for listing methode
+ */
+ self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+
+ /**
+ @remarks this define menu master module in page
+ */
+ if(self::$action =='listing'){
+ $i = 0;
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'',
+ 'title'=>__('@featureds image add featureds'),
+ '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';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+ case 'setflag':
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ $c_id =(int) tep_db_prepare_input($_GET['cID']);
+
+ if ($c_id > 0){
+ $myarray = array('id'=>$c_id, 'status'=>$_GET['flag'] );
+ sqlfeatured::update($myarray);
+ }
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
+ break;
+
+ 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']),
+ );
+
+ $res = sqlfeatured::create($myarray);
+
+ tep_redirect(tep_href_link(self::FILENAME ));
+ break;
+
+ case 'update':
+ $c_id =(int) tep_db_prepare_input($_GET['cID']);
+
+ if ($c_id > 0){
+ $myarray = array(
+ 'id'=>$c_id,
+ 'type'=>tep_db_prepare_input($_POST['featured_type']),
+ 'min'=>tep_db_prepare_input($_POST['featured_min']),
+ 'max'=>tep_db_prepare_input($_POST['featured_max']),
+ );
+
+ sqlfeatured::update($myarray);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . $c_id ));
+ break;
+
+ case 'delete_confirm':
+ $c_id =(int) tep_db_prepare_input($_POST['cID']);
+ if ($c_id > 0){
+ $myarray = array(
+ 'id'=>$c_id,
+ );
+ $res=sqlfeatured::delete($myarray);
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+ }
+
+ return self::$action;
+ }
+
+ public function get_header(){
+ }
+
+
+ /**
+ @fn featureds::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
+
+ $DB= Database::getInstance();
+
+ switch (self::$action) {
+
+ case 'delete':
+ case 'edit':
+ case 'new':
+ if( (int)self::$Id > 0) {
+ self::$Info = sqlfeatured::fetch(array('id'=>self::$Id ), true);
+ }
+ else{
+ self::$Info = sqlfeatured::Specimen(true);
+ }
+ break;
+
+
+ case 'listing':
+ default:
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows, $languages_id;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+
+ $query_raw = "select ".$adjust->listfields.", row_id as id from " . TABLE_FEATURED . " c ".
+ " LEFT JOIN ".TABLE_STATUS." s ON(status_id = k_status_type AND s.language_id = '".$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 ');
+
+ $_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('status'=>(int)$_GET['flag'], '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 ...
[truncated message content] |
|
From: <os...@us...> - 2012-05-01 16:52:14
|
Revision: 4352
http://oscss.svn.sourceforge.net/oscss/?rev=4352&view=rev
Author: oscim
Date: 2012-05-01 16:52:06 +0000 (Tue, 01 May 2012)
Log Message:
-----------
Report de l'implementation de ModTwo et des filtre dans le module de pages customers
correction coquille et nettoyage code
report element manquant
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
trunk/catalog/admin/includes/gabarit/customers/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/customers/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/modules/rapport/products_purchased.php
trunk/catalog/admin/includes/modules/rapport/products_viewed.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-05-01 16:52:06 UTC (rev 4352)
@@ -16,7 +16,7 @@
<?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item):
$clean = substr($k, (strpos($k, '.')+1)); ?>
<li>
- <?php echo tep_draw_checkbox_field('allfields['.$clean.']', 'allfields['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?>
+ <?php echo tep_draw_checkbox_field('filters[listfield]['.$clean.']', 'filters[listfield]['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?>
<?php echo (is_array($item)? $item['text'] : $item ) ?>
</li>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/gabarit/customers/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/display_view.delete.gab 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.delete.gab 2012-05-01 16:52:06 UTC (rev 4352)
@@ -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.0
- @date 07/02/11, 19:31
+ @version 2.1.1
+ @date 01/05/2012, 09:32
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,12 +12,12 @@
?>
<h3><?php echo __('text info heading delete customer') ?></h3>
-<?php echo tep_draw_form('customers', customers::FILENAME, 'cID=' . customers::$cInfo->customers_id . '&action=deleteconfirm') ?>
+<?php echo tep_draw_form('customers', customers::FILENAME, 'cID=' . customers::$Info->customers_id . '&action=deleteconfirm') ?>
<fieldset class="block_input button_nav">
- <p><?php echo __('text delete intro') . '<strong>' . customers::$cInfo->customers_firstname . ' ' . customers::$cInfo->customers_lastname . '</strong>'?></p>
+ <p><?php echo __('text delete intro') . '<strong>' . customers::$Info->customers_firstname . ' ' . customers::$Info->customers_lastname . '</strong>'?></p>
</fieldset>
<fieldset class="block_input button_nav">
- <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(customers::FILENAME, 'cID=' .customers::$cInfo->customers_id), IMAGE_CANCEL) ?>
+ <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(customers::FILENAME, 'cID=' .customers::$Info->customers_id), IMAGE_CANCEL) ?>
</fieldset>
</form>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/customers/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-05-01 16:52:06 UTC (rev 4352)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 16/11/11, 23:38
+ @date 01/05/2012, 09:32
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,7 +12,7 @@
?>
<h3><?php echo __('heading title'); ?></h3>
- <?php echo tep_draw_form('customers', FILENAME_CUSTOMERS, 'action='.((in_array(customers::$action,array('edit','update')))?'update':'insert'), 'post', 'onsubmit="return check_form();"'); ?>
+ <?php echo tep_draw_form('customers', customers::FILENAME, 'action='.((in_array(customers::$action,array('edit','update')))?'update':'insert'), 'post', 'onsubmit="return check_form();"'); ?>
<!-- box_uniq -->
<div class="box_uniq block_form">
@@ -23,7 +23,7 @@
<li><a href="#tabs-1"><?php echo __('tab customers data'); ?></a></li>
<?php
$g=6; $contents=array();
- customers::$modules->display_edit($contents,customers::$cID);
+ customers::$modules->display_edit($contents,customers::$Id);
if(is_array($contents))
foreach ($contents as $value) {
if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
@@ -43,12 +43,12 @@
<?php if (_cst_bool('ACCOUNT_GENDER')) { ?>
<div class="block_input input-mutli">
<label><?php echo __('entry gender'); ?></label>
- <?php if(customers::$processed) echo tep_result_up_field(customers::$cInfo,'customers_gender','tep_view_gender_human','', true, true);
+ <?php if(customers::$processed) echo tep_result_up_field(customers::$Info,'customers_gender','tep_view_gender_human','', true, true);
else {
echo '<ul class="inline">' . "\n" .
- '<li class="inline">' . tep_draw_radio_field('customers_gender', 'm', 'm', true, customers::$cInfo->customers_gender) . ' ' . MALE . '' . '</li>' . "\n ".
- '<li class="inline">' . tep_draw_radio_field('customers_gender', 'f', 'f', false, customers::$cInfo->customers_gender) . ' ' . FEMALE . '' . '</li>' . "\n" .
- '<li class="inline">' . tep_draw_radio_field('customers_gender', 'l', 'l', false, customers::$cInfo->customers_gender) . ' ' . MLLE . '' . '</li>' . "\n" .
+ '<li class="inline">' . tep_draw_radio_field('customers_gender', 'm', 'm', true, customers::$Info->customers_gender) . ' ' . MALE . '' . '</li>' . "\n ".
+ '<li class="inline">' . tep_draw_radio_field('customers_gender', 'f', 'f', false, customers::$Info->customers_gender) . ' ' . FEMALE . '' . '</li>' . "\n" .
+ '<li class="inline">' . tep_draw_radio_field('customers_gender', 'l', 'l', false, customers::$Info->customers_gender) . ' ' . MLLE . '' . '</li>' . "\n" .
'</ul>' . "\n";
} ?>
</div>
@@ -56,24 +56,24 @@
<p class="block_input input-one">
<label for="customers_firstname"><?php echo __('entry first name'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_firstname','','', true); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_firstname','','', true); ?>
</p>
<p class="block_input input-one">
<label for="customers_lastname"><?php echo __('entry last name'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_lastname','','', true); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_lastname','','', true); ?>
</p>
<?php if (_cst_bool('ACCOUNT_DOB')) { ?>
<p class="block_input input-one">
<label for="customers_dob"><?php echo __('entry date of birth'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_dob','tep_date_short','', true); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_dob','tep_date_short','', true); ?>
</p>
<?php } ?>
<p class="block_input input-one">
<label for="customers_email_address"><?php echo __('entry email address'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_email_address','','96', true); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_email_address','','96', true); ?>
</p>
@@ -84,11 +84,11 @@
<p class="block_input input-one">
<label for="customers_telephone"><?php echo __('entry telephone number'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_telephone','','', true); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_telephone','','', true); ?>
</p>
<p class="block_input input-one">
<label for="customers_fax"><?php echo __('entry fax number'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_fax'); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_fax'); ?>
</p>
</fieldset>
@@ -96,11 +96,11 @@
<legend><?php echo __('category options'); ?></legend>
<p class="block_input input-one">
<label for="customers_newsletter"><?php echo __('entry newsletter'); ?></label>
- <?php echo (customers::$processed == true)? customers::tep_view_news_human(customers::$cInfo->customers_newsletter).tep_draw_hidden_field('customers_newsletter') : tep_draw_pull_down_menu('customers_newsletter', customers::$newsletter_array, ((customers::$cInfo->customers_newsletter == '1') ? '1' : '0')) ; ?>
+ <?php echo (customers::$processed == true)? customers::tep_view_news_human(customers::$Info->customers_newsletter).tep_draw_hidden_field('customers_newsletter') : tep_draw_pull_down_menu('customers_newsletter', customers::$newsletter_array, ((customers::$Info->customers_newsletter == '1') ? '1' : '0')) ; ?>
</p>
<p class="block_input input-one">
<label for="global_product_notifications"><?php echo __('entry product notification'); ?></label>
- <?php echo (customers::$processed == true)? customers::tep_view_news_human(customers::$cInfo->global_product_notifications).tep_draw_hidden_field('global_product_notifications') : tep_draw_pull_down_menu('global_product_notifications', customers::$newsletter_array, ((customers::$cInfo->global_product_notifications == '1') ? '1' : '0')) ; ?>
+ <?php echo (customers::$processed == true)? customers::tep_view_news_human(customers::$Info->global_product_notifications).tep_draw_hidden_field('global_product_notifications') : tep_draw_pull_down_menu('global_product_notifications', customers::$newsletter_array, ((customers::$Info->global_product_notifications == '1') ? '1' : '0')) ; ?>
</p>
</fieldset>
<div class="separator"></div>
@@ -126,17 +126,17 @@
<div class="box_right">
<p class="block_input input-multi">
<label for="customers_group_ra"><?php echo __('entry customers group request authentication'); ?></label>
- <?php if (customers::$processed == true) echo (customers::$cInfo->customers_group_ra)?__('entry customers group ra yes') : __('entry customers group ra no') ;
- else echo tep_draw_radio_field('customers_group_ra','customers_group_ra', '0', (((bool)customers::$cInfo->customers_group_ra)? false:true), customers::$cInfo->customers_group_ra) . ' ' . __('entry customers group ra no') . ' ' . tep_draw_radio_field('customers_group_ra','customers_group_ra1', '1',(((bool)customers::$cInfo->customers_group_ra)? true:false), customers::$cInfo->customers_group_ra) . ' ' . __('entry customers group ra yes'); ?>
+ <?php if (customers::$processed == true) echo (customers::$Info->customers_group_ra)?__('entry customers group ra yes') : __('entry customers group ra no') ;
+ else echo tep_draw_radio_field('customers_group_ra','customers_group_ra', '0', (((bool)customers::$Info->customers_group_ra)? false:true), customers::$Info->customers_group_ra) . ' ' . __('entry customers group ra no') . ' ' . tep_draw_radio_field('customers_group_ra','customers_group_ra1', '1',(((bool)customers::$Info->customers_group_ra)? true:false), customers::$Info->customers_group_ra) . ' ' . __('entry customers group ra yes'); ?>
</p>
<p class="block_input input-one">
<label for="customers_shopping_points"><?php echo __('entry customers points'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_shopping_points'); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_shopping_points'); ?>
</p>
<!-- BOF Separate Pricing per Customer -->
<p class="block_input input-one">
<label for="customers_group_id"><?php echo __('entry customers group name'); ?></label>
- <?php echo tep_result_up_field(customers::$cInfo,'customers_group_id','tep_get_grp_name','', false, true); ?>
+ <?php echo tep_result_up_field(customers::$Info,'customers_group_id','tep_get_grp_name','', false, true); ?>
</p>
@@ -154,8 +154,8 @@
if(isset($_GET['origin'])) echo tep_js_back(tep_href_link(basename($_GET['origin']), strchr('?',$_GET['origin'])), IMAGE_BACK) ;
else echo tep_js_back(tep_href_link(customers::FILENAME, tep_get_all_get_params(array('action'))), IMAGE_CANCEL);
?>
- <?php echo tep_draw_hidden_field('default_address_id', 'default_address_id', customers::$cInfo->customers_default_address_id);
- if(customers::$action !='new') echo tep_draw_hidden_field('customers_id', 'customers_id', customers::$cInfo->customers_id); ?>
+ <?php echo tep_draw_hidden_field('default_address_id', 'default_address_id', customers::$Info->customers_default_address_id);
+ if(customers::$action !='new') echo tep_draw_hidden_field('customers_id', 'customers_id', customers::$Info->customers_id); ?>
</div>
</div>
Modified: trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.inline.gab 2012-05-01 16:52:06 UTC (rev 4352)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/02/2012, 08:52
+ @date 01/05/2012, 09:32
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -18,28 +18,28 @@
<ul>
<li>
<span class="label text"><?php echo __('text date account created') ?> </span>
- <span class="input text"> <?php echo tep_date_short(customers::$cInfo->date_account_created) ?></span>
+ <span class="input text"> <?php echo tep_date_short(customers::$Info->date_account_created) ?></span>
</li>
<li>
<span class="label text"><?php echo __('text date account last modified') ?> </span>
- <span class="input text"> <?php echo tep_date_short(customers::$cInfo->date_account_last_modified) ?></span>
+ <span class="input text"> <?php echo tep_date_short(customers::$Info->date_account_last_modified) ?></span>
</li>
<li>
<span class="label text"><?php echo __('text info date last logon') ?> </span>
- <span class="input text"> <?php echo tep_date_short(customers::$cInfo->date_last_logon) ?></span>
+ <span class="input text"> <?php echo tep_date_short(customers::$Info->date_last_logon) ?></span>
</li>
<li>
<span class="label text"><?php echo __('text info number of logons') ?> </span>
- <span class="input text"> <?php echo customers::$cInfo->number_of_logons ?></span>
+ <span class="input text"> <?php echo customers::$Info->number_of_logons ?></span>
</li>
<li>
<span class="label text"><?php echo __('text info country') ?> </span>
- <span class="input text"> <?php echo customers::$cInfo->countries_name ?></span>
+ <span class="input text"> <?php echo customers::$Info->countries_name ?></span>
</li>
<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::$cInfo->customers_language == $row['id']) ?>
+ <?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 } ?>
</span>
@@ -50,35 +50,35 @@
<ul>
<li>
<span class="label text"><?php echo __('text email') ?> </span>
- <span class="input text"><a href="<?php echo tep_mailto(customers::$cInfo->customers_email_address ) ?>"> <?php echo customers::$cInfo->customers_email_address ?></a></span>
+ <span class="input text"><a href="<?php echo tep_mailto(customers::$Info->customers_email_address ) ?>"> <?php echo customers::$Info->customers_email_address ?></a></span>
</li>
<li>
<!-- <span class="label text"><?php echo __('text info number of logons') ?> </span> -->
-<!-- <span class="input text"> <?php echo customers::$cInfo->number_of_logons ?></span> -->
+<!-- <span class="input text"> <?php echo customers::$Info->number_of_logons ?></span> -->
</li>
<li>
<span class="label text"><?php echo __('text info number of orders') ?> </span>
- <span class="input text"> <?php echo customers::$cInfo->orders ?></span>
+ <span class="input text"> <?php echo customers::$Info->orders ?></span>
</li>
<li>
<span class="label text"><?php echo __('text montant total order') ?> </span>
- <span class="input text"> <?php echo $currencies->format(customers::$cInfo->orders_sum) ?></span>
+ <span class="input text"> <?php echo $currencies->format(customers::$Info->orders_sum) ?></span>
</li>
<li>
<span class="label text"><?php echo __('text moyenne order') ?> </span>
- <span class="input text"> <?php echo $currencies->format( (customers::$cInfo->orders_sum / customers::$cInfo->orders) ) ?></span>
+ <span class="input text"> <?php echo $currencies->format( (customers::$Info->orders_sum / customers::$Info->orders) ) ?></span>
</li>
<li>
<!-- <span class="label text"><?php echo __('text info country') ?> </span> -->
-<!-- <span class="input text"> <?php echo customers::$cInfo->countries_name ?></span> -->
+<!-- <span class="input text"> <?php echo customers::$Info->countries_name ?></span> -->
</li>
</ul>
</div>
<div class="fleft">
<ul>
- <?php foreach( customers::$modules->display_right_column($contents, customers::$cInfo->customers_id) as $item): ?>
+ <?php foreach( customers::$modules->display_right_column($contents, customers::$Info->customers_id) as $item): ?>
<li><?php echo $item['text'] ?></li>
<?php endforeach; ?>
</ul>
Added: trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/filter.clause.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2012-05-01 16:52:06 UTC (rev 4352)
@@ -0,0 +1,38 @@
+<?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
+
+ NOTE: in DEV Not used
+*/
+?>
+<!-- <fieldset> -->
+<!-- <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <ul class="inline">
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ </li>
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ </li>
+ </ul>-->
+<!-- </fieldset> -->
+
+<fieldset>
+ <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <ul class="inline">
+ <?php foreach(tep_get_status_array('product') as $item): ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('viewstatus['.$item['id'] .']', 'viewstatus['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['viewstatus']) <=1 || (string)@$_SESSION['filters']['viewstatus'][$item['id']] == 'on')); ?>
+ <?php echo $item['text'] ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+</fieldset>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2012-05-01 16:52:06 UTC (rev 4352)
@@ -8,91 +8,135 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['heading title']="Clients" ;
-$lang['heading title search']="Rechercher :" ;
-$lang['table heading id']="ID" ;
-$lang['table heading firstname']="Prénom" ;
-$lang['table heading name']="Nom" ;
-$lang['table heading groupe']="Groupe" ;
-$lang['table heading create']="Creer" ;
-$lang['table heading last logon']="Accès" ;
-$lang['table heading points']="points" ;
-$lang['table heading action']="Action" ;
-$lang['table heading status']="Etat" ;
-$lang['table heading da']="da" ;
-$lang['table heading request authentication']="DA" ;
-$lang['text date account created']="Compte créé : " ;
-$lang['text date account last modified']="Dernière modification : " ;
-$lang['text info date last logon']="Dernière connexion : " ;
-$lang['text info number of logons']="Nombre de connexions : " ;
-$lang['text info country']="Pays : " ;
-$lang['text info lang customers']="Langue utilisée: " ;
-$lang['text email']="Email: " ;
-$lang['text montant total order']="Total Achats: " ;
-$lang['text moyenne order']="Moyenne de commande : " ;
-$lang['text info number of orders']="Nombre de commande : " ;
-$lang['text info number of reviews']="Nombre de critiques : " ;
-$lang['text delete intro']="Êtes-vous sûr de vouloir supprimer ce client ?" ;
-$lang['text delete reviews']="Supprimer %s critique(s)" ;
-$lang['text info heading delete customer']="Supprimer client" ;
-$lang['type below']="Type ci-dessous" ;
-$lang['please select']="Choisissez en un" ;
-$lang['category extra fields']="Champs supplémentaires" ;
-$lang['heading title modules payment']="Modules de paiement" ;
-$lang['heading title modules shipping']="Modules d'expédition" ;
-$lang['heading title modules order total']="Modules Total Commande" ;
-$lang['category personal']="Données personnelles" ;
-$lang['category contact']="Contact" ;
-$lang['category options']="Options" ;
-$lang['entry email address']="Email" ;
-$lang['entry customers group name']="Groupe :" ;
-$lang['entry customers group request authentication']="Compte " ;
-$lang['entry gender']="Genre :" ;
-$lang['entry gender error']="<span class=\"errorText\">requis</span>" ;
-$lang['entry first name']="Prénom :" ;
-$lang['entry first name error']="<span class=\"errorText\">min. " . ENTRY_FIRST_NAME_MIN_LENGTH . " caractères.</span>" ;
-$lang['entry last name']="Nom :" ;
-$lang['entry last name error']="<span class=\"errorText\">min. " . ENTRY_LAST_NAME_MIN_LENGTH . " caractères.</span>" ;
-$lang['entry date of birth']="Date de naissance : " ;
-$lang['entry date of birth error']="<span class=\"errorText\">(ex. 21/05/1970)</span>" ;
-$lang['entry email address error']="<span class=\"errorText\">min. " . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . " caractères.</span>" ;
-$lang['entry email address check error']="<span class=\"errorText\">L'adresse électronique ne semble pas être valide!</span>" ;
-$lang['entry email address error exists']="<span class=\"errorText\">Cette adresse électronique existe déjà!</span>" ;
-$lang['entry telephone number']="Numéro de téléphone :" ;
-$lang['entry telephone error']="<span class=\"errorText\">min. " . ENTRY_TELEPHONE_MIN_LENGTH . " caractères.</span>" ;
-$lang['entry fax number']="Numéro de fax :" ;
-$lang['entry fax error']="" ;
-$lang['entry newsletter']="Bulletin d'informations :" ;
-$lang['entry newsletter yes']="Abonné" ;
-$lang['entry newsletter no']="Désabonné" ;
-$lang['entry newsletter error']="" ;
-$lang['entry product notification']="Bulletin d'informations produit:" ;
-$lang['entry product notification yes']="Abonné" ;
-$lang['entry product notification no']="Désabonné" ;
-$lang['entry product notification error']="" ;
-$lang['image send new password']="Envoyer un nouveau mdp" ;
-$lang['image new customer']="Flux nouveaux clients" ;
-$lang['image creat customer']="Ajouter un clients" ;
-$lang['entry dob error']="Erreur de format" ;
-$lang['tab customers data']="Contact" ;
-$lang['entry customers group ra no']="Inactif à confirmer" ;
-$lang['entry customers group ra yes']=" Actif confirmé " ;
-$lang['entry customers points']="Points : " ;
-$lang['entry customers notif created new account']="Notifier le nouveaux client :" ;
+/* listing */
+ /* Heading */
+ $lang['heading title customers']="Liste des clients (utilisateurs public)" ;
+ /* Filtre */
+
+
+ /* All fields used on listign and filters */
+ $lang['@customers table heading id']="ID" ;
+ $lang['@customers table heading firstname']="Prénom" ;
+ $lang['@customers table heading lastname']="Nom" ;
+ $lang['@customers table heading master_name']="Nom" ;
+ $lang['@customers table heading type']="Nom" ;
+ $lang['@customers table heading create']="Creer" ;
+ $lang['@customers table heading last logon']="Accès" ;
+ $lang['@customers table heading last modified']="Modifiés" ;
+ $lang['@customers table heading date added']="Créers" ;
+ $lang['@customers table heading points']="points" ;
+ $lang['@customers table heading action']="Action" ;
+ $lang['@customers table heading status']="Etat" ;
+ $lang['@customers table heading group ra']="da" ;
+ $lang['@customers table heading group id']="grp.id" ;
+ $lang['@customers table heading group name']="grp.nom" ;
+ $lang['@customers table heading shopping points']="points" ;
+ $lang['@customers table heading language']="Langue" ;
+ $lang['@customers table heading dob']="Né(e)" ;
+ $lang['@customers table heading email address']="Email" ;
+ $lang['@customers table heading telephone']="Tél." ;
+ $lang['@customers table heading fax']="Fax." ;
+ $lang['@customers table heading type']="Type" ;
+ $lang['@customers table heading discount']="Remise" ;
+ $lang['@customers table heading balance account']="Balance" ;
+ $lang['@customers table heading number of logons']="Connecté(s)" ;
+
+ $lang['table heading action']="Action" ;
+
+ $lang['@customers table heading name']="Nom" ;
+ $lang['@customers table heading groupe']="Groupe" ;
+
+
+ /* bouton */
+ $lang['@customers image create new customer']="Ajouter un clients" ;
+ $lang['@customers link rss new customer']="Suivi inscriptions" ;
+
+// $lang['@customers table heading status']="Etat" ;
+// $lang['@customers table heading status']="Etat" ;
+
+
+
+
/* Edit */
- $lang['customers save success']="Eenresgitrement du client reussie" ;
- $lang['error save in process']="Erreur lors de l'enregistrement du client" ;
+ /* Heading */
+ $lang['heading title']="Clients" ;
+ /* forms */
+ $lang['text date account created']="Compte créé : " ;
+ $lang['text date account last modified']="Dernière modification : " ;
+ $lang['text info date last logon']="Dernière connexion : " ;
+ $lang['text info number of logons']="Nombre de connexions : " ;
+ $lang['text info country']="Pays : " ;
+ $lang['text info lang customers']="Langue utilisée: " ;
+ $lang['text email']="Email: " ;
+ $lang['text montant total order']="Total Achats: " ;
+ $lang['text moyenne order']="Moyenne de commande : " ;
-/* js alert */
- $lang['js gender']="* La valeur de 'Genre' doit être choisie." ;
- $lang['js first_name']="* L'entrée 'Prénom' doit avoir au moins %s caractères." ;
- $lang['js last_name %s']="* L'entrée 'Nom' doit avoir au moins %s caractères." ;
- $lang['js dob']="* L'entrée 'Date de naissance' doit avoir la forme: jj/mm/aaaa (10/09/1975)." ;
- $lang['js email_address']="* L'entrée 'Adresse électronique' doit avoir au moins %s caractères." ;
- $lang['js address']="* L'entrée 'Adresse' doit avoir au moins %s caractères." ;
- $lang['js city']="* L'entrée 'Ville' doit avoir au moins %s caractères." ;
+ $lang['text info number of orders']="Nombre de commande : " ;
+ $lang['text info number of reviews']="Nombre de critiques : " ;
+ $lang['text delete intro']="Êtes-vous sûr de vouloir supprimer ce client ?" ;
+ $lang['text delete reviews']="Supprimer %s critique(s)" ;
+ $lang['text info heading delete customer']="Supprimer client" ;
+ $lang['type below']="Type ci-dessous" ;
+ $lang['please select']="Choisissez en un" ;
+ $lang['category extra fields']="Champs supplémentaires" ;
+ $lang['heading title modules payment']="Modules de paiement" ;
+ $lang['heading title modules shipping']="Modules d'expédition" ;
+ $lang['heading title modules order total']="Modules Total Commande" ;
+ $lang['category personal']="Données personnelles" ;
+ $lang['category contact']="Contact" ;
+ $lang['category options']="Options" ;
+ $lang['entry email address']="Email" ;
+ $lang['entry customers group name']="Groupe :" ;
+ $lang['entry customers group request authentication']="Compte " ;
+ $lang['entry gender']="Genre :" ;
+ $lang['entry gender error']="<span class=\"errorText\">requis</span>" ;
+ $lang['entry first name']="Prénom :" ;
+ $lang['entry first name error']="<span class=\"errorText\">min. " . ENTRY_FIRST_NAME_MIN_LENGTH . " caractères.</span>" ;
+ $lang['entry last name']="Nom :" ;
+ $lang['entry last name error']="<span class=\"errorText\">min. " . ENTRY_LAST_NAME_MIN_LENGTH . " caractères.</span>" ;
+ $lang['entry date of birth']="Date de naissance : " ;
+ $lang['entry date of birth error']="<span class=\"errorText\">(ex. 21/05/1970)</span>" ;
+ $lang['entry email address error']="<span class=\"errorText\">min. " . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . " caractères.</span>" ;
+ $lang['entry email address check error']="<span class=\"errorText\">L'adresse électronique ne semble pas être valide!</span>" ;
+ $lang['entry email address error exists']="<span class=\"errorText\">Cette adresse électronique existe déjà!</span>" ;
+ $lang['entry telephone number']="Numéro de téléphone :" ;
+ $lang['entry telephone error']="<span class=\"errorText\">min. " . ENTRY_TELEPHONE_MIN_LENGTH . " caractères.</span>" ;
+ $lang['entry fax number']="Numéro de fax :" ;
+ $lang['entry fax error']="" ;
+ $lang['entry newsletter']="Bulletin d'informations :" ;
+ $lang['entry newsletter yes']="Abonné" ;
+ $lang['entry newsletter no']="Désabonné" ;
+ $lang['entry newsletter error']="" ;
+ $lang['entry product notification']="Bulletin d'informations produit:" ;
+ $lang['entry product notification yes']="Abonné" ;
+ $lang['entry product notification no']="Désabonné" ;
+ $lang['entry product notification error']="" ;
+ $lang['image send new password']="Envoyer un nouveau mdp" ;
+ $lang['entry dob error']="Erreur de format" ;
+ $lang['tab customers data']="Contact" ;
+ $lang['entry customers group ra no']="Inactif à confirmer" ;
+ $lang['entry customers group ra yes']=" Actif confirmé " ;
+ $lang['entry customers points']="Points : " ;
+ $lang['entry customers notif created new account']="Notifier le nouveaux client :" ;
+
+
+ /* alert */
+ $lang['customers save success']="Enresgitrement du client reussie" ;
+ $lang['error save in process']="Erreur lors de l'enregistrement du client" ;
+
+
+ /* js alert */
+ $lang['js gender']="* La valeur de 'Genre' doit être choisie." ;
+ $lang['js first_name']="* L'entrée 'Prénom' doit avoir au moins %s caractères." ;
+ $lang['js last_name %s']="* L'entrée 'Nom' doit avoir au moins %s caractères." ;
+ $lang['js dob']="* L'entrée 'Date de naissance' doit avoir la forme: jj/mm/aaaa (10/09/1975)." ;
+ $lang['js email_address']="* L'entrée 'Adresse électronique' doit avoir au moins %s caractères." ;
+ $lang['js address']="* L'entrée 'Adresse' doit avoir au moins %s caractères." ;
+ $lang['js city']="* L'entrée 'Ville' doit avoir au moins %s caractères." ;
+
+
?>
\ 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-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-01 16:52:06 UTC (rev 4352)
@@ -49,10 +49,6 @@
/* All fields used on listign and filters */
$lang['products table heading id']="id" ;
$lang['products table heading name']="Produits" ;
-
- $lang['products table heading categories']="Catégories" ;
- $lang['products table heading categories id']="Cat. id" ;
- $lang['table heading action']="Action" ;
$lang['products table heading modele']="Modèle" ;
$lang['products table heading image']="Image" ;
$lang['products table heading status']="Etat" ;
@@ -67,14 +63,20 @@
$lang['products table heading taxe id']="Tax. id" ;
$lang['products table heading track_stock']="Suivi stock" ;
+ $lang['products table heading categories']="Catégories" ;
+ $lang['products table heading categories id']="Cat. id" ;
+
+ $lang['table heading action']="Action" ;
+
+
/* Bouton */
- $lang['add category datatype product']="Ajouter une catégorie" ;
- $lang['image create new product']="Creer un nouveau produit" ;
+ $lang['@products add category datatype product']="Ajouter une catégorie" ;
+ $lang['@products image create new product']="Creer un nouveau produit" ;
+ $lang['@products link rss low stock']="Suivi alerte stock" ;
-
/* new products */
$lang['heading title type']="Type :" ;
$lang['text info intro choose product type']="Vous devez définir le type du produit, ce type déterminera les fonctionnalités associées. Pour tous les produits qui ne sont pas virtuels, ou ayant des caractéristiques spéciales, le type de 'produit physique'. Pour les produits de type virtuel (logiciel, abonnement, etc, préciser alors son type. ) " ;
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 16:52:06 UTC (rev 4352)
@@ -349,7 +349,7 @@
$_SESSION['filters'] =array();
- foreach($_POST['allfields'] as $key=>$row){
+ foreach($_POST['filters']['listfield'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
else
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-01 16:45:36 UTC (rev 4351)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-01 16:52:06 UTC (rev 4352)
@@ -4,26 +4,25 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/01/2012, 18:17
+ @date 01/05/2012, 09:32
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class customers
-
*/
+
class customers
- implements ExtModPage, InterfaceModule, InterfacedTJsonS,InterfacedInnerHtml{
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ ExtModConfig,
+ InterfacedTJsonS,
+ InterfacedInnerHtml
+ {
const FILENAME = FILENAME_CUSTOMERS;
+
/**
- @var string $code
- */
- public static $code;
- /**
- @var string $action
- */
- public static $action;
- /**
@var array $actions
*/
public static $actions;
@@ -40,9 +39,9 @@
*/
public static $languages;
/**
- @var objet $cInfo
+ @var objet $Info
*/
- public static $cInfo;
+ public static $Info;
/**
@var array $newsletter_array
*/
@@ -55,7 +54,6 @@
@var array $DiversInfo transport var
*/
public static $DiversInfo;
-
/**
@var obj $box
*/
@@ -67,31 +65,307 @@
/**
@var int Id customers
*/
- public static $cID;
+ public static $Id;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
+
+
public function __construct(){
self::GetConf();
}
- private static function GetConf(){
+ public static function GetConf(){
self::$code=__CLASS__;
- //! active datatable in ajax, precise les GET necessaire
- if(!defined('JSONSTATMENT')) define('JSONSTATMENT', 'mod=page&type='.self::$code );
- //! detail item in ajax
- if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+ self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
- // Use factory class aca
- //self::$modules=new accountACA();
- self::$modules=new AcaFactory('account'/*,'MODULE_ACCOUNT_INSTALLED_BO'*/);
- self::$modules->set_image_handler();
+ /**
+ @remarks not load if not first init
+ */
+ if(!defined('JSONSTATMENT')){
- self::$languages = tep_get_languages();
+ //! active datatable in ajax, precise les GET necessaire
+ if(!defined('JSONSTATMENT')) define('JSONSTATMENT', 'mod=page&type='.self::$code );
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
- self::$newsletter_array=array(array('id' => '1', 'text' => __('entry newsletter yes')),
- array('id' => '0', 'text' => __('entry newsletter no'))
- );
+ // Use factory class aca
+ //self::$modules=new accountACA();
+ self::$modules=new AcaFactory('account'/*,'MODULE_ACCOUNT_INSTALLED_BO'*/);
+ self::$modules->set_image_handler();
+ self::$languages = tep_get_languages();
+
+ self::$newsletter_array=array(array('id' => '1', 'text' => __('entry newsletter yes')),
+ array('id' => '0', 'text' => __('entry newsletter no'))
+ );
+
+ }
+
+
+ global $languages_id;
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'c.customers_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('@customers table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'c.customers_type' => array(
+ 'sort'=>true,
+ 'alias'=>'type',
+ 'text'=>__('@customers table heading type'),
+
+ ),
+ "CONCAT(customers_firstname, ' ', customers_lastname)" => array(
+ 'sort'=>true,
+ 'alias'=>'master_name',
+ 'text'=>__('@customers table heading master_name'),
+ 'default'=>true,
+ 'width'=>'15%',
+ ),
+// 'c.customers_lastname' => array(
+// 'sort'=>true,
+// 'alias'=>'lastname',
+// 'text'=>__('@customers table heading lastname'),
+// ),
+// 'c.customers_firstname' => array(
+// 'sort'=>true,
+// 'alias'=>'firstname',
+// 'text'=>__('@customers table heading firstname'),
+// // 'default'=>true,
+// // 'width'=>'18%',
+// ),
+ 'c.customers_language' => array(
+ 'sort'=>true,
+ 'alias'=>'language',
+ 'text'=>__('@customers table heading language'),
+ ),
+ 'c.customers_dob' => array(
+ 'sort'=>true,
+ 'alias'=>'dob',
+ 'text'=>__('@customers table heading dob'),
+ ),
+ 'c.customers_email_address' => array(
+ 'sort'=>true,
+ 'alias'=>'email_address',
+ 'text'=>__('@customers table heading email address'),
+ ),
+ 'c.customers_telephone' => array(
+ 'sort'=>true,
+ 'alias'=>'telephone',
+ 'text'=>__('@customers table heading telephone'),
+ ),
+ 'c.customers_fax' => array(
+ 'sort'=>true,
+ 'alias'=>'fax',
+ 'text'=>__('@customers table heading fax'),
+ ),
+ 'c.customers_language' => array(
+ 'sort'=>true,
+ 'alias'=>'language',
+ 'text'=>__('@customers table heading language'),
+ ),
+
+ 'c.customers_group_id' => array(
+ 'sort'=>true,
+ 'alias'=>'group_id',
+ 'text'=>__('@customers table heading group id'),
+ ),
+ 'cg.customers_group_name' => array(
+ 'sort'=>true,
+ 'alias'=>'cat_title',
+ 'text'=>__('@customers table heading group name'),
+ ),
+
+ 'c.customers_discount' => array(
+ 'sort'=>true,
+ 'alias'=>'discount',
+ 'text'=>__('@customers table heading discount'),
+ ),
+ 'c.customers_balance_account' => array(
+ 'sort'=>true,
+ 'alias'=>'balance_account',
+ 'text'=>__('@customers table heading balance account'),
+ ),
+ 'c.customers_shopping_points' => array(
+ 'sort'=>true,
+ 'alias'=>'shopping_points',
+ 'text'=>__('@customers table heading shopping points'),
+ ),
+ 'ci.customers_info_date_account_created' => array(
+ 'sort'=>true,
+ 'alias'=>'added',
+ 'text'=>__('@customers table heading date added'),
+ 'width'=>'8%',
+ ),
+ 'ci.customers_info_date_account_last_modified' => array(
+ 'sort'=>true,
+ 'alias'=>'modified',
+ 'text'=>__('@customers table heading last modified'),
+ 'width'=>'8%',
+ ),
+ 'ci.customers_info_date_of_last_logon' => array(
+ 'sort'=>true,
+ 'alias'=>'last_logon',
+ 'text'=>__('@customers table heading last logon'),
+ ),
+ 'ci.customers_info_number_of_logons' => array(
+ 'sort'=>true,
+ 'alias'=>'number_of_logons',
+ 'text'=>__('@customers table heading number of logons'),
+ ),
+ 'c.customers_group_ra' => array(
+ 'sort'=>true,
+ 'alias'=>'group_ra',
+ 'text'=>__('@customers table heading group ra'),
+ 'width'=>'5%',
+ 'default'=>true,
+ ),
+ 'c.customers_status' => array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('@customers table heading status'),
+ 'width'=>'5%',
+ '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 = " ";
+ $_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'=>'button',
+ 'title'=>__('@customers image create new customer'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
+ $i++;
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button linkrss',
+ 'title'=>tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .__('@customers link rss new customer'),
+ 'url'=>tep_href_link(FILENAME_FEEDS,'box=new_customers'),
+ );
+ }
+
+
+
+
}
/** public ExtModPage */
@@ -112,11 +386,10 @@
$DB=Database::getInstance();
$_return=array();
-// var_dump(__CLASS__.'check_action');
- if(isset($_GET['cID'])) self::$cID= (int)$_GET['cID'];
- elseif(isset($_POST['customers_id'])) self::$cID= (int)$_POST['customers_id'];
-// self::load_db_values((int)self::$cID);
+// if(isset($_GET['cID'])) self::$Id= (int)$_GET['cID'];
+// else
+ if(isset($_POST['customers_id'])) self::$Id= (int)$_POST['customers_id'];
self::$actions['action'] = self::$action;
self::$actions['display_file']='';
@@ -134,6 +407,25 @@
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') ) {
$newsletter_id = tep_db_prepare_input($_GET['cID']);
@@ -160,6 +452,16 @@
+ /**
+ @remarks specific multi action
+ */
+ case 'multi':
+ tep_redirect(tep_href_link(self::FILENAME) );
+ break;
+
+ /**
+ @remarks normal page
+ */
case 'insert':
case 'update':
$array = array();
@@ -216,7 +518,7 @@
$result=sqlcustomer::fetch(array('id'=>$_id), false );
}
else{
- $array['id']=$_id=tep_db_prepare_input(self::$cID);
+ $array['id']=$_id=tep_db_prepare_input(self::$Id);
$result=sqlcustomer::update($array, false);
$result=sqlcustomer::fetch(array('id'=>$_id), false );
@@ -253,7 +555,7 @@
}
else /*if (self::$error == true) */{
$_POST['customers_gender']='m';
- $cInfo = new objectInfo($_POST);
+ $Info = new objectInfo($_POST);
if(self::$action =='insert')
$dest_form='insert';
else
@@ -264,7 +566,7 @@
break;
case 'deleteconfirm':
- $customers_id = tep_db_prepare_input(self::$cID);
+ $customers_id = tep_db_prepare_input(self::$Id);
$result=sqlcustomer::delete(array('id'=>$customers_id));
@@ -275,7 +577,7 @@
$dest_form='insert';
$array=sqlcustomer::Specimen(array(),false);
- self::$cInfo = new objectInfo($array);
+ self::$Info = new objectInfo($array);
break;
case 'noedit':
@@ -312,11 +614,88 @@
}
- public static function load_db_values($ID){
- $arry=sqlcustomer::fetch(array('id'=>(int)$ID),false);
- return self::$cInfo= new objectInfo($arry);
+ /**
+ @fn featured::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
+
+ $DB=Database::getInstance();
+
+
+ $action=self::$action;
+
+ switch ($action) {
+
+ case 'delete':
+ case 'view':
+ case 'noedit':
+ case 'edit':
+ case 'new':
+ if(self::$Id > 0)
+ $arry=sqlcustomer::fetch(array('id'=>(int)self::$Id),false);
+ else
+ $arry=sqlcustomer::Specimen();
+
+ return self::$Info= new objectInfo($arry);
+ break;
+
+ case 'listing':
+ default:
+
+
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows, $languages_id;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+
+ /**
+ @remarks replace id by name col
+ */
+ if(!empty($adjust->sWhere)) {
+
+ foreach(self::$allfields as $key=>$row){
+ if(is_array($row) && isset($row['alias']) ){
+ $k[] = '#[(]'.$row['alias'].'[)]#i';
+ $k[] = '# '.$row['alias'].' #i';
+ $k[] = '# \.'.$row['alias'].'#i';
+
+ $v[] = '('.$key.')';
+ $v[] = ' '.$key.' ';
+ $v[] = '.'.$key.' ';
+ }
+ }
+
+ if(isset($k))
+ $adjust->sWhere = preg_replace($k,$v, $adjust->sWhere);
+ }
+
+
+ $query_raw = "select ".$adjust->listfields.", c.customers_id as id from " . TABLE_CUSTOMERS . " c ".
+ " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ".
+ " LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ".
+ ((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " GROUP BY c.customers_id ".
+ " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+
+ }
+
+
}
+
+
/**
*/
public function display_view() {
@@ -327,189 +706,155 @@
@remarks Ajax View result
*/
case 'setflag':
- return self::get_status_c(array('customers_status'=>(int)$_GET['flag'], 'customers_id'=>(int)$_GET['cID']));
+ return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)$_GET['cID']));
break;
case 'setflagda':
- return self::get_status_da(array('customers_group_ra'=>(int)$_GET['flag'], 'customers_id'=>(int)$_GET['cID']));
+ return self::RowStatusDa(array('group_ra'=>(int)$_GET['flag'], 'id'=>(int)$_GET['cID']));
break;
/**
@remarks Normal View Page
*/
case 'delete':
- self::load_db_values(self::$cID);
+ self::load_db_values(self::$Id);
$action='delete';
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
break;
case 'update':
case 'noedit':
case 'edit':
- self::load_db_values(self::$cID);
+ self::load_db_values(self::$Id);
case 'insert':
case 'new':
$action='edit';
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
break;
default:
- if(!empty(self::$actions['action_method']) )
+ if(!empty(self::$actions['action_method']) ){
$action='aca_actions';
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+ }
else {
- $action='listing';
- self::tep_get_list();
+// $action='listing';
+// self::tep_get_list();
+ self::$list=self::tep_get_list();
+ /// use master gabarit
+ MGabCont::SetCurrentName(__CLASS__);
+ return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
}
}
- /// use master gabarit
- return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+
}
/** public static InterfacedTJsonS */
- /**
- @fn get_item_action($orders)
- @brief fonction qui construit l'affichage de la colonne action
- La mise en forme est contenu dans les ressource xml du template en cours
- @param $orders array
- @return string
- */
- private static function get_item_action($customers){
- global $SecuKey;
- return sprintf(
- CsrtAction::getFormat('row_action'),
- self::$modules->display_ColumnRowAction($customers['customers_id']) ,
- sprintf(CsrtAction::getLink('row_action_right', __('incarner'), 'incarner'), '', tep_catalog_href_link('login.php','osCAdminDirect='.md5($SecuKey.date('d')).'&id='.$customers['customers_id'],'SSL', false ) ,'').
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'noedit'), '', tep_href_link(self::FILENAME,'cID=' . $customers['customers_id'].'&action=noedit' ),'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,'cID=' . $customers['customers_id'].'&action=edit' ),'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $customers['customers_id'].'&action=delete' ) ,'' )
- );
+
+
+
+ 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 ;
+
+ return $res;
+
}
+
+ /** static InterfacedInnerHtml */
+
+ public static function detail_row_page($id){
+ self::GetConf();
+ self::load_db_values((int)$id);
+
+
+ $res=tep_db_query($customers_query_raw = "select sum(op.products_quantity * op.final_price) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and c.customers_id='".(int)$id."' and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC");
+ $r=tep_db_fetch_array($res);
+ self::$Info->orders_sum=$r['ordersum'];
+ return MGabCont::CallGab('inline','display_view',__CLASS__);
+ }
+
+
/**
- @brief return format html for row
+ @brief return format html for row status
@param $product array restuts row
@return string html
*/
- private static function get_status_da($customers){
-
+ public static function RowStatus($customers){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setflagda&cID=' . $customers['customers_id'].'&flag=';
+ $query_s='action=setflag&cID=' . $customers['id'].'&flag=';
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($customers['customers_group_ra'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($customers['status'] == '1')? '0' : '1') ) . '">'.
sprintf(
- CsrtAction::getFormat('row_etat'),
- (int)$customers['customers_group_ra'],
- ( ($customers['customers_group_ra'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ CsrtAction::getFormat('row_flag'),
+ (int)$customers['status'],
+ ( ($customers['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
).
'</a>';
}
/**
- @brief return format html for row status
+ @brief return format html for row
@param $product array restuts row
@return string html
*/
- private static function get_status_c($customers){
+ public static function RowStatusDa($customers){
+
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setflag&cID=' . $customers['customers_id'].'&flag=';
+ $query_s='action=setflagda&cID=' . $customers['id'].'&flag=';
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($customers['customers_status'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($customers['group_ra'] == '1')? '0' : '1') ) . '">'.
sprintf(
- CsrtAction::getFormat('row_flag'),
- (int)$customers['customers_status'],
- ( ($customers['customers_status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ CsrtAction::getFormat('row_etat'),
+ (int)$customers['group_ra'],
+ ( ($customers['group_ra'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
).
'</a>';
}
- private static function emptyResult(){
- return array( 'null',
- 'customers_id',
- 'customers_lastname',
- 'customers_firstname',
- 'customers_group_name',
- 'customers_shopping_points',
- 'customers_info_date_account_created',
- 'customers_info_date_account_last_modified',
- 'customers_group_ra',
- 'status',
- 'action'
- );
- }
-
-
- public ...
[truncated message content] |
|
From: <os...@us...> - 2012-05-01 16:45:43
|
Revision: 4351
http://oscss.svn.sourceforge.net/oscss/?rev=4351&view=rev
Author: oscim
Date: 2012-05-01 16:45:36 +0000 (Tue, 01 May 2012)
Log Message:
-----------
suppression element obsolete
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab
trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab
Deleted: trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab 2012-05-01 14:02:08 UTC (rev 4350)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab 2012-05-01 16:45:36 UTC (rev 4351)
@@ -1,54 +0,0 @@
-<?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 16/11/11, 22:12
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title') ?></h3>
-<div class="button_nav">
- <a class="button" href="<?php echo tep_href_link(customers::FILENAME, 'action=new') ?>" ><?php echo tep_image(DIR_WS_ICONS.'icon_add_new.png' , __('image creat customer')) . __('image creat customer') ?></a>
-</div>
-
-<div class="box_uniq">
- <table class="dataTable">
- <thead>
- <tr>
- <th> </th>
- <th><?php echo __('table heading id') ?></th>
- <th><?php echo __('table heading name') ?></th>
- <th><?php echo __('table heading firstname') ?></th>
- <th><?php echo __('table heading groupe') ?></th>
- <th><?php echo __('table heading points') ?></th>
- <th><?php echo __('table heading create') ?></th>
- <th><?php echo __('table heading last logon') ?></th>
- <th><?php echo __('table heading da') ?></th>
- <th><?php echo __('table heading status') ?></th>
- <th><?php echo __('table heading action') ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr class="dataTableRow">
- <td style="width:2%;"><?php echo tep_draw_hidden_field('xx','xxx','','class="search_init" '); ?></td>
- <td width="3%"><?php echo tep_draw_input_field('customers_id','customers_id',__('table heading id'),'style="width:100%" class="search_init"'); ?></td>
- <td width="10%"><?php echo tep_draw_input_field('customers_lastname','customers_lastname',__('nom'),'style="width:100%" class="search_init"'); ?></td>
- <td width="25%" class="tcenter"><?php echo tep_draw_input_field('customers_firstname','customers_firstname',__('table heading firstname'),'style="width:100%" class="search_init"'); ?></td>
- <td width="7%" class="tleft"><?php echo tep_draw_input_field('customers_group_name','customers_group_name',__('groupe'),'style="width:100%" class="search_init"'); ?></td>
- <td width="5%" class="tleft"><?php echo tep_draw_input_field('customers_shopping_points','customers_shopping_points',__('table heading points'),'style="width:100%" class="search_init"'); ?></td>
- <td width="7%" class="tcenter"><?php echo tep_draw_input_field('customers_info_date_account_created','customers_info_date_account_created',__('compte creer'),'style="width:100%" class="search_init"'); ?></td>
- <td width="7%" class="tcenter"><?php echo tep_draw_input_field('customers_info_date_account_last_modified','customers_info_date_account_last_modified',__('dernier acces'),'style="width:100%" class="search_init"'); ?></td>
- <td width="3%"><?php echo tep_draw_pull_down_menu('customers_group_ra', array(array('id'=>'all', 'text'=> __('txt all') ),array('id'=>'1', 'text'=> __('confirme')),array('id'=>'0', 'text'=> __('non confirme'))), ((isset($_GET['view_status']) && (is_numeric($_GET['view_status'])))?$_GET['view_status'] : 'all'),'style="width:100%" class="search_init" onchange="oTable.fnFilter( $(this).val(), 7 );
-"'); ?></td>
- <td width="4%" class="tcenter"> </td>
- <td> </td>
- </tr>
- </tfoot>
- <tbody>
- <!-- AJAX BLOCK -->
- </tbody>
- </table>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab 2012-05-01 14:02:08 UTC (rev 4350)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab 2012-05-01 16:45:36 UTC (rev 4351)
@@ -1,84 +0,0 @@
-<?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 30/03/2012, 09:32
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-global $languages_id;
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-<div>
-
-<div class="fleft smallText" style="width:25%">
- <?php echo tep_draw_form('goto2', products::FILENAME, '', 'get').'<p>'.__('heading title type') . ' ' . tep_draw_pull_down_menu('Vtype', tep_get_status_array('product'), products::$Vtype, 'onchange="this.form.submit();"').'</p></form>'; ?>
- </div>
- <div class="navButtons">
- <?php
- /// Uniquement si stock actif
- if(_cst_bool('STOCK_CHECK'))
- echo '<a class="button" href="' . tep_href_link(FILENAME_FEEDS,'box=low_stock') . '">' . tep_image(DIR_WS_ICONS.'icon_feed.png' , IMAGE_TRACKED_LOW_STOCK,16,16) .IMAGE_TRACKED_LOW_STOCK . '</a>';
-
- if(!isset($_GET['expected'])) echo '<a class="button" href="' . tep_href_link(FILENAME_PRODUCTS, 'expected=true') . '">' . __('image expected on') . '</a>';
- else echo '<a class="button" href="' . tep_href_link(FILENAME_PRODUCTS) . '">' . __('image expected off') . '</a>';
-
- echo '<a class="button" href="' . tep_href_link(FILENAME_PRODUCTS, tep_get_all_get_params(array('action','cPath','search')).'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) .IMAGE_NEW_PRODUCT . '</a>';
-
- echo '<a class="button fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=product&action=new_light&origin='. products::FILENAME) . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). __('add category datatype content') . '</a>';
- ?>
- </div>
-</div>
-<br style="clear:both;" />
-
-<div class="box_uniq">
-
- <div id="CurrentPathSelect" >
- <?php echo tep_draw_form('goto', products::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', categorieUtility::get_category_tree(array('datatype'=>'product','language_id'=>$languages_id )), products::$cPath, 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
- </div>
-
-
- <table class="dataTable">
- <thead>
- <tr>
- <th style="width:2%;"> </th>
- <th style="width:3%" class="tcenter"><?php echo __('table heading id'); ?></th>
-<!-- <th style="width:3%"><?php echo __('table heading image'); ?></th> -->
- <th style="width:10%" class="tcenter"><?php echo __('table heading type'); ?></th>
- <th style="width:10%" class="tcenter"><?php echo __('table heading model'); ?></th>
- <th style="width:25%" class="tleft"><?php echo __('table heading products'); ?></th>
- <th style="width:12%" class="tleft"><?php echo __('table heading categorie'); ?></th>
- <?php if(_cst_bool('STOCK_CHECK')): ?>
- <th style="width:4%" align="center"><?php echo __('table heading stock'); ?></th>
- <?php endif; ?>
- <th style="width:6%" align="center"><?php echo __('table heading price'); ?></th>
- <th style="width:4%" align="center"><?php echo __('table heading status'); ?></th>
- <th class="tcenter"><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr class="dataTableRow">
- <td style="width:2%;"><?php echo tep_draw_hidden_field('xx','xxx','','class="search_init" '); ?></td>
- <td style="width:3%"><?php echo tep_draw_input_field('product_id','product_id',__('table heading id'),'style="width:100%" class="search_init"'); ?></td>
-<!-- <td style="width:3%"><?php echo tep_draw_input_field('products_image','products_image',__('table heading image'),'style="width:100%" class="search_init"'); ?></td> -->
- <td style="width:3%" class="tcenter"><?php echo tep_draw_input_field('pv.typeID','pv.typeID',__('table heading type'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:10%" class="tcenter"><?php echo tep_draw_input_field('model','model',__('table heading model'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:25%" class="tleft"><?php echo tep_draw_input_field('p.product_id','pproduct_id',__('table heading products'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:12%" class="tleft"><?php echo tep_draw_input_field('categories_name','categories_name',__('table heading categorie'),'style="width:100%" class="search_init"'); ?></td>
- <?php if(_cst_bool('STOCK_CHECK')): ?>
- <td style="width:4%" class="tcenter"><?php echo tep_draw_input_field('stock','stock',__('table heading stock'),'style="width:100%" class="search_init"'); ?></td>
- <?php endif; ?>
- <td style="width:6%" class="tcenter"><?php echo tep_draw_input_field('p.products_price','price',__('table heading price'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:4%" class="tcenter"><?php echo tep_draw_pull_down_menu('view_status', array(array('id'=>'all', 'text'=> __('txt all') ),array('id'=>'1', 'text'=> 'on'),array('id'=>'0', 'text'=> 'off')), ((isset($_GET['view_status']) && (is_numeric($_GET['view_status'])))?$_GET['view_status'] : 'all'),'style="width:100%" class="search_init" onchange="oTable.fnFilter( $(this).val(), 7 );
-"'); ?></td>
- <td colspan="2"><?php //echo tep_image_submit('button_confirm.gif', IMAGE_SORT). '<a class="button" href="'.tep_href_link(FILENAME_PRODUCTS).'">'.IMAGE_RESET.'</a>'; ?></td>
- </tr>
- </tfoot>
- <tbody>
- <!-- AJAX LOAD -->
- </tbody>
- </table>
-</div>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-01 14:02:17
|
Revision: 4350
http://oscss.svn.sourceforge.net/oscss/?rev=4350&view=rev
Author: oscim
Date: 2012-05-01 14:02:08 +0000 (Tue, 01 May 2012)
Log Message:
-----------
Suite travail d'implementation des filtre et mise en oeuver sur la page products
Ajout de filtre normalis?\195?\169 , et fichier de langue centralis?\195?\169
Mise a niveau de pages/product en enfant de ModTwo et des gabarit html correspondant
nettoyage et normalisation du code
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/MLinkTo.php
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/products/display_view.copy_to.gab
trunk/catalog/admin/includes/gabarit/products/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab
trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/products.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab
trunk/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt
Modified: trunk/catalog/admin/includes/classes/MLinkTo.php
===================================================================
--- trunk/catalog/admin/includes/classes/MLinkTo.php 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/classes/MLinkTo.php 2012-05-01 14:02:08 UTC (rev 4350)
@@ -14,13 +14,6 @@
*/
class MLinkTo {
-
- function box() {
- $this->heading = array();
- $this->contents = array();
- }
-
-
/**
@var string le nom du datatype enfant courant
*/
@@ -57,14 +50,14 @@
if(is_array($res)){
- foreach($res as $row)
+ foreach($res as $row){
+ $key = substr($row->key, strlen('DATATYPES_ROOTLISTING_') );
+ if( ! DataTypes::is_active($key))
+ // search current in type for rootlisting
if(in_array(self::$current, explode(',',$row->value))) {
-
- $key = substr($row->key, strlen('DATATYPES_ROOTLISTING_') );
-
self::$RL[$key] = $key;
-
}
+ }
}
}
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2012-05-01 14:02:08 UTC (rev 4350)
@@ -187,14 +187,21 @@
$list = ((isset(self::$InitInfo['tfilter'][$action])) ? self::$InitInfo['tfilter'][$action] : array());
$return= array();
+ //! @remarks Force load language centralised
+ global $oscss,$language;
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/filters.txt');
+
foreach($list as $row){
$tp = new stdClass();
- $tp->title = $row['title'];
- if(isset($row['type']))
+ if(isset($row['type'])){
+ $tp->title = __('@filters filter tab '.$row['type']);
$tp->content = MGabCont::CallGab($row['type'],'filter',self::MASTER );
- else
+ }
+ else{
+ $tp->title = $row['title'];
$tp->content = $row['content'];
+ }
$return[] = $tp;
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -23,7 +23,7 @@
<?php if(count(MGabCont::CallSt('DFilterModule')) > 0): ?>
<!-- EOB - Section Filtre // Doit être prise en charge par le mode de page -->
<?php echo tep_draw_form('filters', MGabCont::CallSt('GetFILENAME'), 'action=filters', 'post') ?>
- <p class="Ctrtirroir"><?php echo __('view filtres for listing'); ?></p>
+ <p class="Ctrtirroir"><?php echo __('@filters view filtres for listing'); ?></p>
<div id="filtre" class="tirroir tabs">
<ul>
<?php $i=0; foreach(MGabCont::CallSt('DFilterModule') as $item): ?>
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -11,7 +11,7 @@
?>
<fieldset>
- <legend><?php echo __('filter legend choose categorie'); ?></legend>
+ <legend><?php echo __('@filters filter legend choose categorie'); ?></legend>
<ul >
<?php foreach(categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$languages_id , 'exclude'=>array('0'))) as $k=>$item): ?>
<li>
Added: trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -0,0 +1,30 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+ <fieldset>
+ <legend><?php echo __('@filters filter legend choose language'); ?></legend>
+ <ul >
+ <?php foreach(tep_get_languages() as $k=>$item): ?>
+ <li>
+ <?php echo tep_draw_radio_field('filters[language]['.$item['id'].']', 'filters[language]['.$item['id'].']', 'on', (bool)(count($_SESSION['filters']['language']) <=0 || (string)$_SESSION['filters']['language'][$item['id']] == 'on')); ?>
+ <span class="language image">
+ <?php echo tep_language_image($item['directory'] . '/images/' . $item['image'], $item['name']); ?>
+ </span>
+ <span class="language text">
+ <?php echo $item['name']; ?>
+ </span>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+ </fieldset>
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -11,7 +11,7 @@
?>
<fieldset>
- <legend><?php echo __('filter legend choose fields'); ?></legend>
+ <legend><?php echo __('@filters filter legend choose fields'); ?></legend>
<ul class="inline">
<?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item):
$clean = substr($k, (strpos($k, '.')+1)); ?>
Added: trunk/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.subtype.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -0,0 +1,23 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+<fieldset>
+ <legend><?php echo __('@filters filter legend choose subtype'); ?></legend>
+ <ul class="inline">
+ <?php foreach(tep_get_status_array(MGabCont::CallSt('GetClassDatatype')) as $item): ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('filters[subtype]['.$item['id'] .']', 'filters[subtype]['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['subtype']) <=1 || (string)@$_SESSION['filters']['subtype'][$item['id']] == 'on')); ?>
+ <?php echo $item['text'] ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+</fieldset>
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-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 09/01/12, 19:18
+ @date 04/04/2012, 09:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -75,27 +75,6 @@
<?php endforeach;?>
-
-<?php /*
- <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=content&action=new_light&origin='. urlencode(cms_content::FILENAME.'?action=edit&cID='. (int)@$_GET['cID']) ) . '" title="'. __('add category datatype content').'">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). '</a>'; ?> </span>
- </label>
- <ul id="cat_list_in_edit">
- <?php foreach(cms_content::$Info->categories as $v){ $k=$v['categories_id'];
- echo '<li class="selected">'. tep_draw_checkbox_field('categories['.$k.']','cat_'.$k, tep_get_generated_category_path_ids($k), true ).' '.tep_get_category_name($k).'</li>';
- }
- foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>'content')) as $v)
- if(!isset(cms_content::$Info->categories[$v['categories_id']])){
- echo '<li class="'.(isset(cms_content::$Info->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. tep_draw_checkbox_field('categories['.$v['categories_id'].']','cat_'.$v['categories_id'], tep_get_generated_category_path_ids($v['categories_id']), (isset(cms_content::$Info->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
- }
- else
- echo '<li class="'.(isset(cms_content::$Info->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. ' '.$v['categories_name'].'</li>';
- ?>
- </ul>
- </dt>
-*/ ?>
<dt class="block_input button_nav w_90" >
<?php echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );?>
<?php echo tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$Info->id), IMAGE_CANCEL); ?>
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.copy_to.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.copy_to.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.copy_to.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 21/02/2012, 16:35
+ @date 04/04/2012, 09:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,15 +12,15 @@
<h3><?php printf(__('text info heading copy to'),''); ?></h3>
<?php print tep_draw_form('copy_to', FILENAME_PRODUCTS, tep_get_all_get_params(array('action','cPath')).'action=copy_to_confirm')?>
- <p><?php print __('text info copy to intro') . tep_draw_hidden_field('products_id', '', products::$pInfo->products_id)?></p>
+ <p><?php print __('text info copy to intro') . tep_draw_hidden_field('products_id', '', products::$Info->products_id)?></p>
<p><?php print __('text info current categories'); ?></p>
- <p><?php print '<strong>' . tep_output_generated_category_path(products::$pInfo->products_id, 'product') . '</strong>'; ?></p>
+ <p><?php print '<strong>' . tep_output_generated_category_path(products::$Info->products_id, 'product') . '</strong>'; ?></p>
<p><?php print __('text categories') ; ?></p>
<p><?php print tep_draw_pull_down_menu('categories_id', tep_get_category_tree(0,'','0'), 0); ?></p>
<div class="button_nav">
<?php print tep_image_submit('button_copy.gif', IMAGE_COPY) .
- tep_js_back(tep_href_link(products::FILENAME, 'pID=' . products::$pInfo->products_id), IMAGE_CANCEL) ; ?>
+ tep_js_back(tep_href_link(products::FILENAME, 'pID=' . products::$Info->products_id), IMAGE_CANCEL) ; ?>
</div>
</form>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.delete.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.delete.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -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.0
- @date 07/02/11, 19:28
+ @version 2.1.1
+ @date 04/04/2012, 09:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,10 +12,10 @@
<h3><?php printf(__('text info heading delete product'),''); ?></h3>
<?php print tep_draw_form('products', products::FILENAME, 'action=delete_product_confirm') ; ?>
<fieldset class="block_input">
- <p><?php print __('text delete product intro'). tep_draw_hidden_field('products_id', '', products::$pInfo->products_id) ; ?></p>
- <p><?php print '<strong>' . products::$pInfo->products_name . '</strong>' ; ?></p>
+ <p><?php print __('text delete product intro'). tep_draw_hidden_field('products_id', '', products::$Info->products_id) ; ?></p>
+ <p><?php print '<strong>' . products::$Info->products_name . '</strong>' ; ?></p>
- <?php $product_categories = tep_generate_category_path(products::$pInfo->products_id, 'product');
+ <?php $product_categories = tep_generate_category_path(products::$Info->products_id, 'product');
$so='';
for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) {
$category_path = '';
@@ -30,13 +30,13 @@
</ul>
<?php
/* aca sortie */
- $contents=products::$modules->display_right_delete_confirm(array(), products::$pInfo->products_id);
+ $contents=products::$modules->display_right_delete_confirm(array(), products::$Info->products_id);
$box = new box;
echo $box->infoBox(array(), $contents);
?>
</fieldset>
<fieldset class="block_input button_nav">
- <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(products::FILENAME, 'pID=' . products::$pInfo->products_id), IMAGE_CANCEL) ; ?>
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(products::FILENAME, 'pID=' . products::$Info->products_id), IMAGE_CANCEL) ; ?>
</fieldset>
</form>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -10,7 +10,7 @@
*/
?>
-<h3><?php echo __('heading title'); ?></h3>
+<h3><?php echo __('heading title edit'); ?></h3>
<?php echo tep_draw_form('new_product', products::FILENAME, 'pID='.$_GET['pID'].'&action=update_product', 'post', 'enctype="multipart/form-data"'); ?>
@@ -41,7 +41,7 @@
<ul id="<?php echo 'products_name-'.($i+1) ?>">
<li class="block_input">
<label for="<?php echo 'products_name_' . products::$languages[$i]['id']; ?>"><?php echo __('text products name'); ?></label>
- <?php echo tep_draw_input_field('products_name[' . products::$languages[$i]['id'] . ']', 'products_name_' . products::$languages[$i]['id'], (isset($products_name[products::$languages[$i]['id']]) ? stripslashes($products_name[products::$languages[$i]['id']]) : tep_get_products_name(products::$pInfo->products_id, products::$languages[$i]['id']))).'<span class="required">*</span>'; ?>
+ <?php echo tep_draw_input_field('products_name[' . products::$languages[$i]['id'] . ']', 'products_name_' . products::$languages[$i]['id'], (isset($products_name[products::$languages[$i]['id']]) ? stripslashes($products_name[products::$languages[$i]['id']]) : tep_get_products_name(products::$Info->products_id, products::$languages[$i]['id']))).'<span class="required">*</span>'; ?>
</li>
</ul>
<?php } ?>
@@ -52,23 +52,23 @@
<?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?>
<li class="block_input">
<label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
- <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$pInfo->products_date_available) ? tep_date_short(products::$pInfo->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
</li>
<?php endif; ?>
<?php if(products::CheckClassProduct('CLASS_MODELE')): ?>
<li class="block_input">
<label class="inline" for="products_model"><?php echo __('text products model'); ?></label>
- <?php echo tep_draw_input_field('products_model','', products::$pInfo->products_model); ?>
+ <?php echo tep_draw_input_field('products_model','', products::$Info->products_model); ?>
</li>
<?php endif; ?>
<?php if(products::CheckClassProduct('CLASS_SORTORDER')): ?>
<li class="block_input">
<label class="inline" for="products_ordered"><?php echo __('text products ordered'); ?></label>
- <?php echo tep_draw_input_field('products_ordered','', products::$pInfo->products_ordered); ?>
+ <?php echo tep_draw_input_field('products_ordered','', products::$Info->products_ordered); ?>
</li>
<?php endif; ?>
- <?php foreach (products::$modules->__call('display_inline',array('flag'=>'general','pid'=> products::$pInfo->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
+ <?php foreach (products::$modules->__call('display_inline',array('flag'=>'general','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
<?php if(isset($title) && is_array($title)): ?>
<?php $i=0; foreach ($text as $item): ?>
<li><?php echo $item; ?></li>
@@ -78,7 +78,7 @@
<?php if(products::CheckClassProduct('CLASS_WEIGHT')): ?>
<li class="block_input">
<label class="inline" for="products_weight"><?php echo __('text products weight'); ?></label>
- <?php echo tep_draw_input_field('products_weight','', products::$pInfo->products_weight).' '.UNIT_WEIGHT_NAME; ?>
+ <?php echo tep_draw_input_field('products_weight','', products::$Info->products_weight).' '.UNIT_WEIGHT_NAME; ?>
</li>
<?php endif; ?>
</ul>
@@ -91,15 +91,15 @@
<li style="clear:both"></li>
<li class="block_input">
<label class="inline" for="products_tax_class_id"><?php echo __('text products tax class'); ?></label>
- <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$pInfo->products_tax_class_id, 'onchange="updateGross()"').'<span class="required">*</span>'; ?><br />
+ <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, 'onchange="updateGross()"').'<span class="required">*</span>'; ?><br />
</li>
<li class="block_input">
<label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>
- <?php echo tep_draw_input_field('products_price','', products::$pInfo->products_price, 'onkeyup="updateGross()"').'<span class="required">*</span>'; ?>
+ <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, 'onkeyup="updateGross()"').'<span class="required">*</span>'; ?>
</li>
<li class="block_input">
<label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
- <?php echo tep_draw_input_field('products_price_gross','', products::$pInfo->products_price, 'onkeyup="updateNet()"'); ?>
+ <?php echo tep_draw_input_field('products_price_gross','', products::$Info->products_price, 'onkeyup="updateNet()"'); ?>
</li>
@@ -108,7 +108,7 @@
@brief Call variation price for products
*/
?>
- <?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$pInfo->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
+ <?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
<li>
<h4 class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></h4>
@@ -120,7 +120,7 @@
<li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
<?php endforeach ; ?>
<?php endif; ?>
- <?php if (isset(products::$pInfo->products_sppc)): ?>
+ <?php if (isset(products::$Info->products_sppc)): ?>
<li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
<?php endif; ?>
</ul>
@@ -132,10 +132,10 @@
<li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
<?php endforeach ; ?>
<?php endif; ?>
- <?php if (isset(products::$pInfo->products_sppc)): ?>
+ <?php if (isset(products::$Info->products_sppc)): ?>
<li id="products_price-<?php echo $i++; ?>" class="block_input">
<ul>
- <?php foreach (products::$pInfo->products_sppc as $sppcGpId => $sppcInfos): ?>
+ <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
<li class="block_input">
<label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>"><?php
echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) . ' ' . $sppcInfos['sppcname']; ?>
@@ -153,7 +153,7 @@
<li class="block_input">
<label class="inline" for="products_price_gross"><?php echo __('text products final price'); ?></label>
- <?php echo tep_draw_input_field('products_price_final','', products::$pInfo->products_price, 'disabled="disabled"'); ?>
+ <?php echo tep_draw_input_field('products_price_final','', products::$Info->products_price, 'disabled="disabled"'); ?>
</li>
</ul>
@@ -169,13 +169,13 @@
<legend><?php echo __('text legend stock'); ?></legend>
<div class="block_input">
<label class="inline"><?php echo __('table heading stock'); ?></label>
- <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$pInfo->track_stock); ?>
+ <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?>
<br style="clear:both;" />
<?php if(products::$product_investigation['has_tracked_options'] or products::$product_investigation['stock_entries_count'] > 0) :?>
- <a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$pInfo->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a>
- <?php elseif(products::$pInfo->track_stock==1): ?>
+ <a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$Info->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a>
+ <?php elseif(products::$Info->track_stock==1): ?>
<label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label>
- <?php echo tep_draw_input_field('products_quantity','', products::$pInfo->products_quantity) ; ?><br />
+ <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity) ; ?><br />
<?php endif; ?>
</div>
</fieldset>
@@ -206,11 +206,11 @@
<legend><?php echo __('text legend image'); ?></legend>
<dl>
<dt class="block_input">
- <p class="new_product_img" ><?php echo tep_info_image(products::$pInfo->products_image, products::$pInfo->products_image, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="new_product_img" id="products_imageimg"'); ?></p>
+ <p class="new_product_img" ><?php echo tep_info_image(products::$Info->products_image, products::$Info->products_image, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="new_product_img" id="products_imageimg"'); ?></p>
</dt>
<?php if(products::CheckClassProduct('CLASS_IMAGE')): /** Si image de prix defini, les prix sont pris en charge par un onglet */ ?>
<dt class="block_input">
- <?php echo '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur("products_image", "image", '').'return false;">'.tep_draw_input_field('products_image','', products::$pInfo->products_image ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>'; ?>
+ <?php echo '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur("products_image", "image", '').'return false;">'.tep_draw_input_field('products_image','', products::$Info->products_image ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>'; ?>
</dt>
<?php endif; ?>
</dl>
@@ -222,26 +222,15 @@
<label><?php echo __('text products status'); ?></label>
<?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __('text product available') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('text product not available'); ?>
</dd>
- <dd 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=product&action=new_light&origin='. urlencode(products::FILENAME.'?action=edit&pID='. (int)@$_GET['cID']) ) . '" title="'. __('add category datatype content').'">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). '</a>'; ?> </span>
- </label>
- <ul id="cat_list_in_edit" class="ChooseSelect">
- <?php foreach(products::$pInfo->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>';
- }
+ <!-- All LinkTo -->
+ <?php foreach(MLinkTo::LoadRightTo(products::$datatype, 'products', 'edit' , 'action='.products::$action.'&pID='.@$_GET['pID'] ) as $row): ?>
+ <dt class="block_input w_90">
+ <?php echo $row['text'] ;?>
+ </dt>
+ <?php endforeach;?>
- foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>'product')) as $v)
- if(!isset(products::$pInfo->categories[$v['categories_id']]))
- echo '<li class="'.(isset(products::$pInfo->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(products::$pInfo->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
- else
- echo '<li class="'.(isset(products::$pInfo->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. ' '.$v['categories_name'].'</li>';
- ?>
- </ul>
- </dd>
<dd class="block_input button_nav" style="width:95%;">
<?php
echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab 2012-05-01 14:02:08 UTC (rev 4350)
@@ -16,15 +16,15 @@
<td style="width:70%">
<div>
<ul>
- <li><?php echo __('product type :').products::NameVirtualID(products::$pInfo->products_virtual_typeID) ?></li>
+ <li><?php echo __('product type :').products::NameVirtualID(products::$Info->products_virtual_typeID) ?></li>
</ul>
</div>
</td>
<td style="width:30%; text-align:center;">
<?php
- echo (!empty(products::$pInfo->products_image))
- ? tep_info_image(products::$pInfo->products_image, products::$pInfo->products_name, TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT)
- : tep_info_image(IMAGE_NONEXISTENT, products::$pInfo->products_name, TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT) ;
+ echo (!empty(products::$Info->products_image))
+ ? tep_info_image(products::$Info->products_image, products::$Info->products_name, TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT)
+ : tep_info_image(IMAGE_NONEXISTENT, products::$Info->products_name, TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT) ;
?>
</td>
</tr>
@@ -32,7 +32,7 @@
</table>
<div>
<ul>
- <li><?php //echo __('product type :').products::NameVirtualID(products::$pInfo->products_virtual_typeID) ?></li>
+ <li><?php //echo __('product type :').products::NameVirtualID(products::$Info->products_virtual_typeID) ?></li>
</ul>
</div>
</td>
Modified: trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- trunk/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-05-01 14:02:08 UTC (rev 4350)
@@ -77,19 +77,19 @@
$("a.fancyajax.manufacturers").fancybox({
'overlayOpacity': 0.6,
'callbackOnClose': function() {
- get_ajax('manufacturers_id','forceajax=true&exe=in_manufacturers¶m=<?php echo products::$pInfo->manufacturers_id ?>&lib=lib.categories','ajax.php');
+ get_ajax('manufacturers_id','forceajax=true&exe=in_manufacturers¶m=<?php echo products::$Info->manufacturers_id ?>&lib=lib.categories','ajax.php');
}
});
$("a.fancyajax.stock").fancybox({
'overlayOpacity': 0.6,
'callbackOnClose': function() {
- get_ajax('manufacturers_id','forceajax=true&exe=in_manufacturers¶m=<?php echo products::$pInfo->manufacturers_id ?>&lib=lib.categories','ajax.php');
+ get_ajax('manufacturers_id','forceajax=true&exe=in_manufacturers¶m=<?php echo products::$Info->manufacturers_id ?>&lib=lib.categories','ajax.php');
}
});
$("a.fancyajax").fancybox({
'overlayOpacity': 0.6,
'callbackOnClose': function() {
- get_ajax('manufacturers_id','forceajax=true&exe=in_manufacturers¶m=<?php echo products::$pInfo->manufacturers_id ?>&lib=lib.categories','ajax.php');
+ get_ajax('manufacturers_id','forceajax=true&exe=in_manufacturers¶m=<?php echo products::$Info->manufacturers_id ?>&lib=lib.categories','ajax.php');
}
});
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt 2012-05-01 14:02:08 UTC (rev 4350)
@@ -0,0 +1,25 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 20/04/2012, 22:14
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$lang['@filters view filtres for listing'] = "Filtres" ;
+
+$lang['@filters filter tab listfield'] = "Colonnes" ;
+$lang['@filters filter tab categorie'] = "Catégories" ;
+$lang['@filters filter tab language'] = "Langues" ;
+$lang['@filters filter tab subtype'] = "Sous-types" ;
+
+$lang['@filters filter legend choose fields'] = "Listes des colonnes visibles" ;
+$lang['@filters filter legend choose categorie'] = "Catégories" ;
+$lang['@filters filter legend choose language'] = "La langue utilisée" ;
+$lang['@filters filter legend choose subtype'] = "Listes des types visibles" ;
+
+$lang['image filters'] = "Filtrer" ;
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-05-01 14:02:08 UTC (rev 4350)
@@ -8,33 +8,38 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['heading title cms_content']="Gestion du contenu" ;
-$lang['heading title edit']="Édition d'une page" ;
+
+
+
+
/* listing */
- $lang['view filtres for listing'] = "Filtres" ;
- $lang['featured filter tab fields'] = "Colonnes" ;
- $lang['filter legend choose fields'] = "Listes des colonnes visibles" ;
- $lang['featured filter tab categorie'] = "Catégories" ;
- $lang['filter legend choose categorie'] = "Catégories" ;
+ /* Heading */
+ $lang['heading title cms_content']="Gestion du contenu" ;
+ /* Filtre */
- $lang['image filters'] = "Filtrer" ;
- $lang['cms_content table heading id']="ID" ;
- $lang['cms_content table heading key']="Clef" ;
- $lang['cms_content table heading categories']="Catégorie" ;
- $lang['cms_content table heading categories id']="Cat. id" ;
- $lang['cms_content table heading title']="Titre" ;
- $lang['cms_content table heading date_added']="Crée(s)" ;
- $lang['cms_content table heading last modified']="Modifié(s)" ;
- $lang['cms_content table heading status']="État" ;
- $lang['cms_content table heading hidden']="Menu" ;
- $lang['table heading action']="Action" ;
+ /* All fields used on listign and filters */
+ $lang['cms_content table heading id']="ID" ;
+ $lang['cms_content table heading key']="Clef" ;
+ $lang['cms_content table heading categories']="Catégorie" ;
+ $lang['cms_content table heading categories id']="Cat. id" ;
+ $lang['cms_content table heading title']="Titre" ;
+ $lang['cms_content table heading date_added']="Crée(s)" ;
+ $lang['cms_content table heading last modified']="Modifié(s)" ;
+ $lang['cms_content table heading status']="État" ;
+ $lang['cms_content table heading hidden']="Menu" ;
+ $lang['table heading action']="Action" ;
- $lang['add category datatype content']="Ajouter une catégorie" ;
- $lang['image create new content']="Créer une page" ;
+ /* Bouton */
+ $lang['add category datatype content']="Ajouter une catégorie" ;
+ $lang['image create new content']="Créer une page" ;
+
+
/* Edit */
+ /* Heading */
+ $lang['heading title edit']="Édition d'une page" ;
/* other */
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-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-01 14:02:08 UTC (rev 4350)
@@ -8,7 +8,7 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['heading title']="Produits" ;
+
$lang['heading title search']="Rechercher :" ;
$lang['heading title goto']="Aller à :" ;
@@ -39,20 +39,42 @@
-/* Listing */
- $lang['table heading id']="ID" ;
- $lang['table heading products']="Produits" ;
- $lang['table heading categorie']="Catégories" ;
- $lang['table heading action']="Action" ;
- $lang['table heading model']="Modèle" ;
- $lang['table heading image']="Image" ;
- $lang['table heading status']="Statut" ;
- $lang['table heading stock']="Stock" ;
- $lang['table heading price']="Prix" ;
- $lang['table heading type']="Type" ;
+/* listing */
+ /* Heading */
+ $lang['heading title products']="Produits" ;
- $lang['add category datatype content']="Ajouter une catégorie" ;
+ /* Filtre */
+ $lang['@products filter tab clause']="Produits" ;
+ /* All fields used on listign and filters */
+ $lang['products table heading id']="id" ;
+ $lang['products table heading name']="Produits" ;
+
+ $lang['products table heading categories']="Catégories" ;
+ $lang['products table heading categories id']="Cat. id" ;
+ $lang['table heading action']="Action" ;
+ $lang['products table heading modele']="Modèle" ;
+ $lang['products table heading image']="Image" ;
+ $lang['products table heading status']="Etat" ;
+ $lang['products table heading stock']="Stock" ;
+ $lang['products table heading price']="Prix" ;
+ $lang['products table heading price ttx']="Prix TTC" ;
+ $lang['products table heading type']="Type" ;
+ $lang['products table heading weight']="Poids" ;
+ $lang['products table heading date_added']="Créer" ;
+ $lang['products table heading last modified']="Modifiés" ;
+ $lang['products table heading available']="Dispo." ;
+ $lang['products table heading taxe id']="Tax. id" ;
+ $lang['products table heading track_stock']="Suivi stock" ;
+
+ /* Bouton */
+ $lang['add category datatype product']="Ajouter une catégorie" ;
+ $lang['image create new product']="Creer un nouveau produit" ;
+
+
+
+
+
/* new products */
$lang['heading title type']="Type :" ;
$lang['text info intro choose product type']="Vous devez définir le type du produit, ce type déterminera les fonctionnalités associées. Pour tous les produits qui ne sont pas virtuels, ou ayant des caractéristiques spéciales, le type de 'produit physique'. Pour les produits de type virtuel (logiciel, abonnement, etc, préciser alors son type. ) " ;
@@ -61,7 +83,7 @@
$lang['product type :']="Type :" ;
/* Fiche One products */
-
+ $lang['heading title edit']="Fiche produit - Edition d'un produit" ;
$lang['tab products data']="Caractéristiques" ;
$lang['tab products desc']="Descriptions " ;
$lang['tab products option']="Options" ;
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-01 14:02:08 UTC (rev 4350)
@@ -26,7 +26,7 @@
*/
const FILENAME = FILENAME_CMS_CONTENT;
/**
- @var string file
+ @var int current id
*/
public static $Id;
/**
@@ -275,11 +275,9 @@
*/
self::$InitInfo['tfilter']['listing']=array(
array(
- 'title'=>__('featured filter tab categorie'),
'type'=>'categorie'
),
array(
- 'title'=>__('featured filter tab fields'),
'type'=>'listfield'
),
);
@@ -577,7 +575,7 @@
" LEFT JOIN " . TABLE_CONTENT_DESCRIPTION . " cd ON(c.content_id =cd.content_id AND cd.language_id='".(int)$languages_id."') ".
" LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " p2c ON(c.content_id=p2c.content_id ) ".
" LEFT JOIN " . TABLE_CATEGORIES . " cat ON( cat.categories_id =p2c.categories_id ) ".
- " LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " catd ON( catd.categories_id =p2c.categories_id AND cd.language_id='".(int)$languages_id."' ) ".
+ " LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " catd ON( catd.categories_id =p2c.categories_id AND catd.language_id='".(int)$languages_id."' ) ".
((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" GROUP BY c.content_id ".
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' c.date_added DESC ');
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-01 10:19:36 UTC (rev 4349)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-01 14:02:08 UTC (rev 4350)
@@ -9,26 +9,30 @@
@encode UTF-8
*/
+
/**
@class products
@brief master class for manage and edit products
*/
class products
- implements ExtModPage, InterfacedTJsonS, InterfacedInnerHtml{
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ ExtModConfig,
+ InterfacedTJsonS,
+ InterfacedInnerHtml
+ {
/**
@def FILENAME current page
*/
const FILENAME = FILENAME_PRODUCTS;
/**
- @var string $code
+ @var int current id
*/
- public static $code;
+ public static $Id;
+
/**
- @var string $action
- */
- public static $action;
- /**
@var array $modules
*/
public static $list=array();
@@ -41,9 +45,9 @@
*/
public static $languages;
/**
- @var objet $pInfo
+ @var objet $Info
*/
- public static $pInfo;
+ public static $Info;
/**
@var array $tax_class_array
*/
@@ -84,8 +88,11 @@
@var int type product
*/
public static $Vtype;
+ /**
+ @var array info all tabs for filter listings
+ */
+ public static $allfields = array();
-
/**
@brief constructor
*/
@@ -101,12 +108,13 @@
global $languages_id;
self::$code=__CLASS__;
+ self::$datatype = 'product';
self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
self::$cPath=(isset($_GET['cPath'])? (int)$_GET['cPath'] : 0);
self::$Vtype=(isset($_GET['Vtype'])? (int)$_GET['Vtype'] : '');
+ self::$Id=(isset($_REQUEST['pID'])? (int)$_REQUEST['pID'] : 0 );
-
/**
@remarks not load if not first init
*/
@@ -120,8 +128,8 @@
/**
@remarks Specific product, force load current id for adjust module
*/
- if (isset ($_GET['pID']))
- self::$modules=new productsACA($_GET['pID']);
+ if (isset (self::$Id))
+ self::$modules=new productsACA(self::$Id);
elseif (isset ($_POST['pID']))
self::$modules=new productsACA($_POST['pID']);
else
@@ -137,6 +145,323 @@
else $messageStack->add(__(sprintf('error catalog image directory does not exist %s'), DIR_FS_CATALOG_IMAGES ), 'error');
self::$languages = tep_get_languages();
+
+
+ MGabCont::SetCurrentName(__CLASS__);
+
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
+
+
+
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'p.products_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('products table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ 'p.products_image' => array(
+ 'sort'=>true,
+ 'alias'=>'image',
+ 'text'=>__('products table heading image'),
+ ),
+ 'pd.products_name' => array(
+ 'sort'=>true,
+ 'alias'=>'title',
+ 'text'=>__('products table heading name'),
+ 'default'=>true,
+ 'width'=>'18%',
+ ),
+ 'p.products_model' => array(
+ 'sort'=>true,
+ 'alias'=>'model',
+ 'text'=>__('products table heading modele'),
+ ),
+ );
+ /* DEB Datatype RootListing categorie */
+ self::$allfields['cat.categories_id']= array(
+ 'sort'=>true,
+ 'alias'=>'categories_id',
+ 'text'=>__('products table heading categories id'),
+ 'width'=>'6%',
+ 'default'=>true,
+ );
+ self::$allfields['catd.categories_name']= array(
+ 'sort'=>true,
+ 'alias'=>'cat_title',
+ 'text'=>__('products table heading categories'),
+ 'width'=>'12%',
+ 'default'=>true,
+ );
+ /* END Datatype RootListing categorie */
+
+ /* DEB Datatype RootListing categorie */
+ if( ! DataTypes::is_active('manufacturer')) {
+ self::$allfields['p.manufacturers_id']= array(
+ 'sort'=>true,
+ 'alias'=>'manufacturers_id',
+ 'text'=>__('products table heading categories id'),
+ 'width'=>'5%',
+ 'default'=>true,
+ );
+// 'm.manufacturers_name']= array(
+// 'sort'=>true,
+// 'alias'=>'cat_title',
+// 'text'=>__('products table heading categories'),
+// 'width'=>'12%',
+// 'default'=>true,
+// ),
+ }
+ /* END Datatype RootListing categorie */
+
+ self::$allfields['p.products_weight']= array(
+ 'sort'=>true,
+ 'alias'=>'weight',
+ 'text'=>__('products table heading weight'),
+ 'default'=>true,
+ );
+
+ self::$allfields['p.products_price']= array(
+ 'sort'=>true,
+ 'alias'=>'price',
+ 'text'=>__('products table heading price'),
+ );
+/*
+ self::$allfields['p.products_price']= array(
+ 'sort'=>false,
+ 'alias'=>'price_ttx',
+ 'text'=>__('products table heading price taxe'),
+ ); */
+
+ self::$allfields['p.products_tax_class_id']= array(
+ 'sort'=>true,
+ 'alias'=>'taxe_id',
+ 'text'=>__('products table heading taxe id'),
+ );
+
+ self::$allfields['p.track_stock']= array(
+ 'sort'=>true,
+ 'alias'=>'track_stock',
+ 'text'=>__('products table heading track_stock'),
+ );
+
+ self::$allfields['p.products_date_added']= array(
+ 'sort'=>true,
+ 'alias'=>'added',
+ 'text'=>__('products table heading date_added'),
+ );
+ self::$allfields['p.products_last_modified']= array(
+ 'sort'=>true,
+ 'alias'=>'modified',
+ 'text'=>__('products table heading last modified'),
+ );
+ self::$allfields['p.products_date_available']= array(
+ 'sort'=>true,
+ 'alias'=>'available',
+ 'text'=>__('products table heading available'),
+ );
+ self::$allfields['p.products_status']= array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('products table heading status'),
+ 'width'=>'5%',
+ '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 = ' cat.categories_id, ';
+
+ // put in
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+ // check and appli
+ foreach(self::$allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(is_array($row)){
+ $txt = $row['text'];
+ $alias = (isset($row['alias'])? $row['alias'] : $clean);
+ $css = (isset($row['class'])? $row['class'] : 'tcenter');
+ $width = (isset($row['width'])? $row['width'] : '5%');
+ }
+ else{
+ $txt = $row;
+ $alias = $clean;
+ $css = 'tcenter';
+ $width = '5%';
+ }
+
+ if(
+ ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+ $_SESSION['filters']['allfields'][$clean] = 'on';
+ /**
+ @remarks this define col theader title, and ajust html code
+ */
+ self::$InitInfo['theader']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt);
+ self::$InitInfo['tfooter']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt );
+ /**
+ @remarks this define col in table, and if is possible sort
+ */
+ self::$InitInfo['modele']['listing'][$alias]=true;
+
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+ }
+ }
+
+
+ self::$InitInfo['modele']['listing']['action']=false;
+ self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+ self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
+
+ self::$InitInfo['allfields']['listing'] = self::$allfields ;
+
+ /**
+ @remarks filter based on categorie
+ */
+ if(isset($_SESSION['filters'][__CLASS__]['language_id']))
+ $new_languages_id = $_SESSION['filters'] [__CLASS__]['language_id'];
+ else
+ $new_languages_id =$languages_id;
+
+
+ /**
+ @remarks filter based on 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'].',';
+ }
+ self::$InitInfo['adjust']['sWhere'] .=" AND categories_id IN (".substr($list, 0,-1).") ";
+
+ /**
+ @remarks filter based on categorie
+ */
+ if(isset($_SESSION['filters'][__CLASS__]['subtype']))
+ $_SESSION['filters']['subtype'] = $_SESSION['filters'] [__CLASS__]['subtype'];
+ else
+ $_SESSION['filters']['subtype'] =array();
+
+ $list_type = '';
+ if(count($_SESSION['filters']['subtype']) > 0)
+ foreach($_SESSION['filters']['subtype'] as $key=>$row)
+ $list_type .=$key.',';
+ else{
+ $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0')));
+ foreach($allcats as $row)
+ $list_type .=$row['id'].',';
+ }
+ self::$InitInfo['adjust']['sWhere'] .=" AND products_type IN (".substr($list_type, 0,-1).") ";
+
+ /**
+ @remarks Put detail for listing methode
+ */
+ self::$InitInfo['adjust']['languages_id'] = $new_languages_id;
+ self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+
+
+
+
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'type'=>'categorie'
+ ),
+ array(
+ 'type'=>'language'
+ ),
+ array(
+ 'type'=>'listfield'
+ ),
+ array(
+ 'type'=>'subtype'
+ ),
+ array(
+ 'title'=>__('@products filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ ),
+ );
+
+ /**
+ @remarks this define menu master module in page
+ */
+ if(self::$action =='listing'){
+ $i = 0;
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new product'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
+
+ $i++;
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button fancy',
+ 'title'=> __('add category datatype product'),
+ 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype='.self::$datatype.'&action=new_light&origin='. self::FILENAME),
+ );
+ }
+
+
+
+
}
@@ -162,7 +487,7 @@
self::$DiversInfo['current_category_id']=((isset($_GET['cPath'])&& !empty($_GET['cPath'])) ? tep_db_prepare_input($_GET['cPath']) : 0);
// added qtpro
- self::$product_investigation = qtpro_doctor_investigate_product(@$_GET['pID']);
+ self::$product_investigation = qtpro_doctor_investigate_product(self::$Id);
if ( empty(self::$actions['action_class']) ) {
@@ -171,9 +496,45 @@
switch (self::$action) {
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'] =array();
+
+
+ foreach($_POST['allfields'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+
+ foreach($_POST['filters']['categorie'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['categorie'][$key] = 'on';
+ }
+
+ foreach($_POST['filters']['language'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['language'][$key] = 'on';
+ }
+
+ foreach($_POST['filters']['subtype'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['subtype'][$key] = 'on';
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+
+ /**
+ @remarks specific Ajax call
+ */
case 'setflag':
if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
- if (isset($_GET['pID'])) tep_set_product_status($_GET['pID'], $_GET['flag']);
+ if (isset(self::$Id)) tep_set_product_status(self::$Id, $_GET['flag']);
osCSS_Cache::clear('also_purchased');
}
@@ -182,7 +543,14 @@
break;
+ /**
+ @remarks specific multi action
+ */
+ case 'multi':
+ tep_redirect(tep_href_link(self::FILENAME) );
+ break;
+
case 'delete_product_confirm':
if (isset($_POST['products_id']) && isset($_POST['product_categories']) && is_array($_POST['product_categories'])) {
$product_id = tep_db_prepare_input($_POST['products_id']);
@@ -211,7 +579,7 @@
case 'insert_product':
case 'update_product':
$params = array();
- if (isset($_GET['pID'])) $products_id = tep_db_prepare_input($_GET['pID']);
+ if (isset(self::$Id)) $products_id = tep_db_prepare_input(self::$Id);
$products_date_available = (isset($_POST['products_date_available'])) ? tep_db_prepare_input($_POST['products_date_available']) : '';
$products_date_available = (date('Y-m-d') < tep_date_raw($products_date_available)) ? tep_date_raw($products_date_available) : 'null';
@@ -301,10 +669,10 @@
case 'edit':
// case 'new_product':
- self::$pInfo = new objectInfo(sqlproduct::Specimen());
+ self::$Info = new objectInfo(sqlproduct::Specimen());
// ACA START LOAD VALUES FROM DB
- if (isset ($_GET['pID']) && (!$_POST) ) self::load_db_values($_GET['pID']);
+ if (isset (self::$Id) && (!$_POST) ) self::load_db_values(self::$Id);
self::$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class_query = $DB->query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
@@ -314,8 +682,8 @@
- if (!isset(self::$pInfo->products_status)) self::$pInfo->products_status = '1';
- switch (self::$pInfo->products_status) {
+ if (!isset(self::$Info->products_status)) self::$Info->products_status = '1';
+ switch (self::$Info->products_status) {
case '0': self::$in_status = false; self::$out_status = true; break;
case '1':
default: self::$in_status = true; self::$out_status = false;
@@ -345,7 +713,7 @@
if (!empty(self::$actions['action_method']) && method_exists(self::$modules->modules[self::$actions['action_class']],self::$actions['action_method'] )){
$metho=self::$actions['action_method'];
self::$box = new box;
- self::$box=self::$modules->modules[self::$actions['action_class']]->$metho(self::$box,(int)$_GET['pID']);
+ self::$box=self::$modules->modules[self::$actions['action_class']]->$metho(self::$box,(int)self::$Id);
}
}
@@ -372,17 +740,88 @@
/**
@fn load_db_values($ID)
*/
- public static function load_db_values($ID){
- global $languages_id;
+// public static function load_db_values($ID){
+
+ /**
+ @fn featured::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
$DB=Database::getInstance();
- $res=sqlproduct::fetch(array('id'=> (int)$ID, 'language_id'=>$languages_id ));
- self::$pInfo= new objectInfo($res); //new objectInfo($product);
+ $action=self::$action;
- //! descative gestion de stock, si stock composé avec attributes
- $attributes_stock_query = $DB->query("SELECT products_stock_quantity FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id = '" . (int)$ID . "'");
- if($attributes_stock_query->__get('numRows')>0 && !defined('CLASS_STOCK')) define('CLASS_STOCK',true);
+ switch ($action) {
+ case 'detail':
+ case 'new':
+ case 'delete':
+ case 'edit':
+ global $languages_id;
+
+ if(self::$Id > 0)
+ $res=sqlproduct::fetch(array('id'=> (int)self::$Id, 'language_id'=>$languages_id ));
+ else
+ $res=sqlproduct::Specimen();
+
+ self::$Info= new objectInfo($res);
+
+ //! descative gestion de stock, si stock composé avec attributes
+ $attributes_stock_query = $DB->query("SELECT products_stock_quantity FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id = '" . (int)self::$Id . "'");
+ if($attributes_stock_query->__ge...
[truncated message content] |
|
From: <os...@us...> - 2012-05-01 10:19:43
|
Revision: 4349
http://oscss.svn.sourceforge.net/oscss/?rev=4349&view=rev
Author: oscim
Date: 2012-05-01 10:19:36 +0000 (Tue, 01 May 2012)
Log Message:
-----------
Construction d'une class de liaison lors de l'edition de contenu
Ajout des elements necessaire ?\195?\160 la liaison vers les categories
Ajout gabarit html specifique de liaison
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
Added Paths:
-----------
trunk/catalog/admin/includes/classes/MLinkTo.php
trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab
Added: trunk/catalog/admin/includes/classes/MLinkTo.php
===================================================================
--- trunk/catalog/admin/includes/classes/MLinkTo.php (rev 0)
+++ trunk/catalog/admin/includes/classes/MLinkTo.php 2012-05-01 10:19:36 UTC (rev 4349)
@@ -0,0 +1,100 @@
+<?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 21/02/2012, 23:13
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class MLinkTo
+ @brief Cette classe assure les liaison entre les datyape enfants les les datyape RootListing.
+ Elle fournit les gabarit htmls de liaison destiné à être inséré dans les form d'edition
+ @note elle n'est compatible qu'avaec les module de type ModTwo
+*/
+
+class MLinkTo {
+
+ function box() {
+ $this->heading = array();
+ $this->contents = array();
+ }
+
+
+ /**
+ @var string le nom du datatype enfant courant
+ */
+ public static $current = '';
+ /**
+ @var string le nom du datatype enfant courant
+ */
+ public static $currclass = '';
+ /**
+ @var string params GET for redirect after action .
+ */
+ public static $origin = '';
+ /**
+ @var tableau des rootListing actif pour le datatype courant
+ */
+ public static $RL = array();
+
+
+
+ function __construct(){
+ }
+
+
+ /**
+ @brief load all Rootlisting , and search link vs current datatype
+ */
+ public static function init($childs_datatype){
+
+ self::$current = $childs_datatype;
+
+ $TYPE = strtoupper($childs_datatype);
+
+ $res = sqlconfiguration::fetch(array('like_key'=>'DATATYPES_ROOTLISTING_%'), true );
+
+ if(is_array($res)){
+
+ foreach($res as $row)
+ if(in_array(self::$current, explode(',',$row->value))) {
+
+ $key = substr($row->key, strlen('DATATYPES_ROOTLISTING_') );
+
+ self::$RL[$key] = $key;
+
+ }
+ }
+ }
+
+
+ /**
+ @brief load in html gabarit for construct link to Datatype rootListing
+ @param $type string datatype name
+ @param $classname string name support class
+ @param $action string current action
+ @param string section param get for redirect after action
+ */
+ public static function LoadRightTo($type, $classname, $action, $origin){
+
+ self::$currclass = $classname;
+ self::$origin = $origin;
+
+ self::init($type, $classname);
+
+ $result = array();
+ foreach(self::$RL as $key=>$row){
+ $mkey = strtolower($key);
+
+ $result[] = array(
+ 'title'=> sprintf(__('link %s to %s') , $type , $mkey ),
+ 'text'=> tep_get_include_contents($mkey.'s/rightto.'.$action),
+ );
+ }
+
+ return $result;
+ }
+
+}
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php 2012-04-30 22:44:15 UTC (rev 4348)
+++ trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php 2012-05-01 10:19:36 UTC (rev 4349)
@@ -106,9 +106,11 @@
$sql ="";
if(isset($option['id'])) $sql .="AND configuration_id = '".(int)tep_db_input($option['id'])."' ";
- if(isset($option['key'])) $sql .="AND configuration_key = '".(string)tep_db_input($option['key'])."' ";
if(isset($option['group_id'])) $sql .="AND configuration_group_id = '".(int)tep_db_input($option['group_id'])."' ";
+ if(isset($option['key'])) $sql .="AND configuration_key = '".(string)tep_db_input($option['key'])."' ";
+ elseif(isset($option['like_key'])) $sql .="AND configuration_key LIKE '".(string)tep_db_input($option['like_key'])."' ";
+
$sql ="SELECT * FROM ".TABLE_CONFIGURATION." WHERE ".substr($sql,3);
$res=$DB->query($sql);
@@ -123,7 +125,7 @@
$array=array();
foreach($res->fetchAllAssoc() as $result)
- $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
return $array;
}
Added: trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/categories/rightto.edit.gab 2012-05-01 10:19:36 UTC (rev 4349)
@@ -0,0 +1,54 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/05/2012, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $oscss;
+
+$curr = MLinkTo::$currclass;
+?>
+<div class="CategoryView">
+ <label>
+ <span class="text"><?php echo __('txt categories'); ?></span>
+
+ <span class="button_nav">
+ <a
+ class="buttonimg fancy"
+ href="<?php echo tep_href_link(FILENAME_CATEGORIES, '&datatype='.MLinkTo::$current.'&action=new_light&origin='. urlencode($curr::FILENAME.'?'.MLinkTo::$origin) ) ?>"
+ title="<?php echo sprintf(__('add category datatype %s'), MLinkTo::$current )?>"
+ >
+ <?php echo tep_image(DIR_WS_ICONS.'icon_add_new.png' ) ?>
+ </a>
+ </span>
+ </label>
+
+
+ <ul id="cat_list_in_edit">
+ <?php foreach($curr::$Info->categories as $v): $k=$v['categories_id']; ?>
+
+ <li class="selected">
+ <?php echo tep_draw_checkbox_field('categories['.$k.']','cat_'.$k, tep_get_generated_category_path_ids($k), true ).' '.tep_get_category_name($k) ?>
+ </li>
+
+ <?php endforeach; ?>
+
+
+ <?php foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>MLinkTo::$current)) as $v): ?>
+
+ <?php if(!isset($curr::$Info->categories[$v['categories_id']])): ?>
+ <li class="<?php echo (isset($curr::$Info->categories[$v['categories_id']])? 'selected' : 'noselected') ?>">
+ <?php echo 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($curr::$Info->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'] ?>
+ </li>
+ <?php else: ?>
+ <li class="<?php echo (isset($curr::$Info->categories[$v['categories_id']])? 'selected' : 'noselected') ?>">
+ <?php echo tep_decal($v['niveau']).' '. ' '.$v['categories_name'] ?>
+ </li>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </ul>
+</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-04-30 22:44:15 UTC (rev 4348)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-05-01 10:19:36 UTC (rev 4349)
@@ -65,6 +65,18 @@
<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::$datatype, '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;?>
+
+
+
+<?php /*
<dt class="block_input w_90 CategoryView">
<label>
<span class="text"><?php echo __('txt categories'); ?></span>
@@ -74,7 +86,7 @@
<?php foreach(cms_content::$Info->categories as $v){ $k=$v['categories_id'];
echo '<li class="selected">'. tep_draw_checkbox_field('categories['.$k.']','cat_'.$k, tep_get_generated_category_path_ids($k), true ).' '.tep_get_category_name($k).'</li>';
}
- foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>'content'))/*get_cat_list(0)*/ as $v)
+ foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>'content')) as $v)
if(!isset(cms_content::$Info->categories[$v['categories_id']])){
echo '<li class="'.(isset(cms_content::$Info->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. tep_draw_checkbox_field('categories['.$v['categories_id'].']','cat_'.$v['categories_id'], tep_get_generated_category_path_ids($v['categories_id']), (isset(cms_content::$Info->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
}
@@ -83,6 +95,7 @@
?>
</ul>
</dt>
+*/ ?>
<dt class="block_input button_nav w_90" >
<?php echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );?>
<?php echo tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$Info->id), IMAGE_CANCEL); ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-30 22:44:22
|
Revision: 4348
http://oscss.svn.sourceforge.net/oscss/?rev=4348&view=rev
Author: oscim
Date: 2012-04-30 22:44:15 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
Ajout d'un gabarit de filtre centralsi?\195?\169 pour le choix des categories dans les listings
integratio dans les page cms
correction coquille diverse
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab
trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-30 20:18:58 UTC (rev 4347)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-30 22:44:15 UTC (rev 4348)
@@ -61,6 +61,10 @@
*/
public static $code;
/**
+ @var current datatype used (string)
+ */
+ public static $datatype;
+ /**
@var current action by GET var
*/
public static $action;
@@ -264,6 +268,13 @@
}
/**
+ @brief return classs name
+ */
+ public static function GetClassDatatype(){
+ return self::$datatype;
+ }
+
+ /**
@brief Check result or return array (' ',...)
*/
public static function CheckResult($result){
Added: trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-04-30 22:44:15 UTC (rev 4348)
@@ -0,0 +1,25 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+ <fieldset>
+ <legend><?php echo __('filter legend choose categorie'); ?></legend>
+ <ul >
+ <?php foreach(categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$languages_id , 'exclude'=>array('0'))) as $k=>$item): ?>
+ <li>
+ <?php echo tep_draw_checkbox_field('filters[categorie]['.$item['id'].']', 'filters[categorie]['.$item['id'].']', 'on', (bool)(count($_SESSION['filters']['categorie']) <=0 || (string)$_SESSION['filters']['categorie'][$item['id']] == 'on')); ?>
+ <?php echo (is_array($item)? $item['text'] : $item ) ?>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+ </fieldset>
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab 2012-04-30 20:18:58 UTC (rev 4347)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab 2012-04-30 22:44:15 UTC (rev 4348)
@@ -9,23 +9,24 @@
@encode UTF-8
*/
$contents=array();
+
?>
<tr>
<td>
<div>
<ul>
- <li><strong><?php echo __('txt info permalink'); ?> </strong><?php echo tep_catalog_href_link('content.php','content=' . cms_content::$cInfo->content_id, 'NONSSL' , false) ?></li>
- <li><strong><?php echo __('text info date added'); ?> </strong><?php echo tep_date_short( cms_content::$cInfo->date_added) ?></li>
- <li><strong><?php echo __('text info last modified'); ?> </strong><?php echo tep_date_short( cms_content::$cInfo->last_modified) ?></li>
+ <li><strong><?php echo __('txt info permalink'); ?> </strong><?php echo tep_catalog_href_link('content.php','content=' . cms_content::$Info->id, 'NONSSL' , false) ?></li>
+ <li><strong><?php echo __('text info date added'); ?> </strong><?php echo tep_date_short( cms_content::$Info->added) ?></li>
+ <li><strong><?php echo __('text info last modified'); ?> </strong><?php echo tep_date_short( cms_content::$Info->last_modified) ?></li>
<?php foreach(cms_content::$languages as $lg ): ?>
<li><?php echo tep_language_image( $lg['directory'] . '/images/' . $lg['image'], $lg['name']) .' '. __('text info content size') . ' ' . (isset(
-cms_content::$cInfo->content_text_size[$lg['id']])? cms_content::$cInfo->content_text_size[$i]:0) . ' '.__('bytes') ?></li>
+cms_content::$Info->content_text_size[$lg['id']])? cms_content::$Info->content_text_size[$i]:0) . ' '.__('bytes') ?></li>
<?php endforeach; ?>
</ul>
</div>
<div>
<ul>
- <?php foreach( cms_content::$modules->display_right_column($contents, cms_content::$cInfo->content_id) as $item): ?>
+ <?php foreach( cms_content::$modules->display_right_column($contents, cms_content::$Info->content_id) as $item): ?>
<li><?php echo $item['text'] ?></li>
<?php endforeach; ?>
</ul>
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab 2012-04-30 20:18:58 UTC (rev 4347)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.listing.gab 2012-04-30 22:44:15 UTC (rev 4348)
@@ -37,7 +37,7 @@
<div class="box_uniq">
<div id="CurrentPathSelect" >
- <?php echo tep_draw_form('goto', products::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', categorieUtility::get_category_tree(array('language_id'=>$languages_id )), products::$cPath, 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
+ <?php echo tep_draw_form('goto', products::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', categorieUtility::get_category_tree(array('datatype'=>'product','language_id'=>$languages_id )), products::$cPath, 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-04-30 20:18:58 UTC (rev 4347)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-04-30 22:44:15 UTC (rev 4348)
@@ -15,11 +15,16 @@
$lang['view filtres for listing'] = "Filtres" ;
$lang['featured filter tab fields'] = "Colonnes" ;
$lang['filter legend choose fields'] = "Listes des colonnes visibles" ;
+ $lang['featured filter tab categorie'] = "Catégories" ;
+ $lang['filter legend choose categorie'] = "Catégories" ;
+
+
$lang['image filters'] = "Filtrer" ;
$lang['cms_content table heading id']="ID" ;
$lang['cms_content table heading key']="Clef" ;
$lang['cms_content table heading categories']="Catégorie" ;
+ $lang['cms_content table heading categories id']="Cat. id" ;
$lang['cms_content table heading title']="Titre" ;
$lang['cms_content table heading date_added']="Crée(s)" ;
$lang['cms_content table heading last modified']="Modifié(s)" ;
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-04-30 20:18:58 UTC (rev 4347)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-04-30 22:44:15 UTC (rev 4348)
@@ -75,6 +75,7 @@
global $languages_id;
self::$code=__CLASS__;
+ self::$datatype='content';
self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
@@ -137,6 +138,13 @@
'default'=>true,
'width'=>'18%',
),
+ 'cat.categories_id' => array(
+ 'sort'=>true,
+ 'alias'=>'categories_id',
+ 'text'=>__('cms_content table heading categories id'),
+ 'width'=>'12%',
+ 'default'=>true,
+ ),
'catd.categories_name' => array(
'sort'=>true,
'alias'=>'cat_title',
@@ -172,7 +180,6 @@
),
);
-// , k_status_type as type , featured_status
/**
@remarks Construct all list , fields , th/td
@@ -184,12 +191,13 @@
self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
self::$InitInfo['modele']['listing']=array(
- false,
- false,
+ 0=>false,
+ 1=>false,
);
// min fields and not view directly colonne fields
$listfield = ' c.content_id as id, cat.categories_id, ';
+
// put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
@@ -214,8 +222,6 @@
$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) )
@@ -235,7 +241,7 @@
$listfield .=$key.' as '.$alias.',';
else
$listfield .=$key.',';
- }
+ }
}
@@ -246,10 +252,33 @@
self::$InitInfo['allfields']['listing'] = self::$allfields ;
/**
+ @remarks filter based on status orders
+ */
+ 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'=>$languages_id , 'exclude'=>array('0')));
+ foreach($allcats as $row)
+ $list .=$row['id'].',';
+ }
+
+
+ /**
@remarks Active forms filter
*/
self::$InitInfo['tfilter']['listing']=array(
array(
+ 'title'=>__('featured filter tab categorie'),
+ 'type'=>'categorie'
+ ),
+ array(
'title'=>__('featured filter tab fields'),
'type'=>'listfield'
),
@@ -259,33 +288,35 @@
@remarks Put detail for listing methode
*/
self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+ self::$InitInfo['adjust']['sWhere'] =" AND categories_id IN (".substr($list, 0,-1).") ";
-
- /**
- @remarks this define menu master module in page
- */
- if(self::$action =='listing'){
+ /**
+ @remarks this define menu master module in page
+ */
+ if(self::$action =='listing'){
$i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'button',
- 'title'=>__('image create new content'),
- 'url'=>tep_href_link(self::FILENAME, 'action=new'),
- );
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ );
$i++;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'button fancy',
- 'title'=> __('add category datatype content'),
- 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype=content&action=new_light&origin='. self::FILENAME),
- );
- }
+ self::$InitInfo['MenuModule'][$i]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button fancy',
+ 'title'=> __('add category datatype content'),
+ 'url'=>tep_href_link(FILENAME_CATEGORIES, '&datatype=content&action=new_light&origin='. self::FILENAME),
+ );
+ }
+
+
}
@@ -317,7 +348,9 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'][__CLASS__]['allfields'] =array();
+ $_SESSION['filters'] =array();
+
+
foreach($_POST['allfields'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
@@ -325,7 +358,12 @@
unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
}
+ foreach($_POST['filters']['categorie'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['categorie'][$key] = 'on';
+ }
+
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -459,14 +497,6 @@
/**
- @fn load_db_values($ID)
- @brief this load db value function
- This method construct static var $Info
- @param $ID integer id content | 0
- @return $Info
- */
-// public static function load_db_values($ID){
- /**
@fn featured::GetDBValue();
@brief return DB value adapted for current action
Use self::action for determine switch
@@ -529,13 +559,18 @@
foreach(self::$allfields as $key=>$row){
if(is_array($row) && isset($row['alias']) ){
- $k[] = '('.$row['alias'].')';
+ $k[] = '#[(]'.$row['alias'].'[)]#i';
+ $k[] = '# '.$row['alias'].' #i';
+ $k[] = '# \.'.$row['alias'].'#i';
+
$v[] = '('.$key.')';
+ $v[] = ' '.$key.' ';
+ $v[] = '.'.$key.' ';
}
}
if(isset($k))
- $adjust->sWhere = str_replace($k,$v, $adjust->sWhere);
+ $adjust->sWhere = preg_replace($k,$v, $adjust->sWhere);
}
$query_raw = "select ".$adjust->listfields.", c.content_id as id from " . TABLE_CONTENT . " c ".
@@ -634,8 +669,8 @@
*/
self::$InitInfo['adjust']['page']=$page;
self::$InitInfo['adjust']['rowbyp']=$rowbyp;
- self::$InitInfo['adjust']['sOrder']=$sOrder;
- self::$InitInfo['adjust']['sWhere']=$sWhere;
+ self::$InitInfo['adjust']['sOrder'].=$sOrder;
+ self::$InitInfo['adjust']['sWhere'].=$sWhere;
self::$InitInfo['adjust']['options']=$options;
$res = self::GetDBValue();
@@ -655,9 +690,15 @@
*/
public static function detail_row_page($id){
self::$action ='detail';
+
self::GetConf();
- self::load_db_values((int)$id);
+
+ self::$Id= (int)$id;
+
+ self::GetDBValue();
+
return MGabCont::CallGab('inline','display_view',__CLASS__);
+
}
/**
@@ -747,7 +788,7 @@
global $query_numrows,$languages_id;
while ($item = $_query->fetchAssoc()) {
-
+ $ord =array();
/// complete cats list
$objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_CONTENT_TO_CATEGORIES . " p2c WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and content_id='".$item['id']."' AND c.categories_id <> '".$item['categories_id']."' ");
$rescat=$objres->fetchAllAssoc();
@@ -757,18 +798,20 @@
if(strlen($item['cat_title'])>25)$item['cat_title']= substr($item['cat_title'],0 ,20).'...';
-
- $item[0]=$item['id'];
$item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
- foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
+ foreach(self::$InitInfo['modele']['listing'] as $k=>$row){
if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
elseif($k == 'status') $ord[$k]=self::RowStatus($item);
elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);
elseif($k == 'added') $ord[$k]=tep_date_short($item[$k]);
elseif($k == 'modified') $ord[$k]=tep_date_short($item[$k]);
else $ord[$k]=$item[$k];
+ }
+ $ord[0]=$item['id'];
+
+
$res[]=$ord;
}
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-30 20:19:05
|
Revision: 4347
http://oscss.svn.sourceforge.net/oscss/?rev=4347&view=rev
Author: oscim
Date: 2012-04-30 20:18:58 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
Suite et fin de l'integeration des filtre avance pour les page content
nettoyage
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/classes/dataTableJsonStatment.php
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/rapport.php
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2012-04-30 20:18:58 UTC (rev 4347)
@@ -1,10 +1,9 @@
<?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
+ @date 30/04/2012, 09:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
Modified: trunk/catalog/admin/includes/classes/dataTableJsonStatment.php
===================================================================
--- trunk/catalog/admin/includes/classes/dataTableJsonStatment.php 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/classes/dataTableJsonStatment.php 2012-04-30 20:18:58 UTC (rev 4347)
@@ -1,9 +1,9 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 01/05/11, 09:17
+ @version 2.1.1
+ @date 30/04/2012, 09:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class dataTableJsonStatment
@@ -75,7 +75,7 @@
foreach(self::$modele as $col=>$v) $mod[]=$col;
for ( $i=0 ; $i< $_REQUEST['iSortingCols'] ; $i++ ) {
- if(!is_numeric($mod[$_REQUEST['iSortCol_'.$i]]) && (bool)self::$modele[$mod[$_REQUEST['iSortCol_'.$i]]]) self::$sOrder .= $mod[$_REQUEST['iSortCol_'.$i]]." ".tep_db_input($_REQUEST['sSortDir_'.$i] ) .", ";
+ if(!is_numeric($mod[$_REQUEST['iSortCol_'.$i]]) && (bool)self::$modele[$mod[$_REQUEST['iSortCol_'.$i]]]) self::$sOrder .= $mod[$_REQUEST['iSortCol_'.$i]]." ".tep_db_input($_REQUEST['sSortDir_'.$i] ) .", ";
}
self::$sOrder = substr_replace( self::$sOrder, "", -2 );
}
@@ -84,7 +84,7 @@
if ( $_REQUEST['sSearch'] != "" ) {
self::$sWhere.= " AND (";
foreach(self::$modele as $col=>$v)
- if(!is_numeric($col) && (bool)$v) self::$sWhere .=" UPPER(".$col.") LIKE '%".strtoupper(tep_db_input( $_REQUEST['sSearch'] ))."%' OR ";
+ if(!is_numeric($col) && (bool)$v) self::$sWhere .=" UPPER(".$col.") LIKE '%".strtoupper(tep_db_input( $_REQUEST['sSearch'] ))."%' OR ";
self::$sWhere = substr(self::$sWhere,0,strlen(self::$sWhere)-3). " ) ";
}
@@ -93,8 +93,8 @@
$i=0;
reset(self::$modele);
foreach(self::$modele as $col=>$v){
- if(tep_not_null($_REQUEST['sSearch_'.$i])) self::$sWhere .=" AND UPPER(".$col.") LIKE '%".strtoupper(tep_db_input( $_REQUEST['sSearch_'.$i] ))."%' ";
- $i++;
+ if(tep_not_null($_REQUEST['sSearch_'.$i])) self::$sWhere .=" AND UPPER(".$col.") LIKE '%".strtoupper(tep_db_input( $_REQUEST['sSearch_'.$i] ))."%' ";
+ $i++;
}
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-04-30 20:18:58 UTC (rev 4347)
@@ -242,9 +242,8 @@
if(strlen($sql)<4)
return false;
- $res = $DB->query($sql="select c.content_id, content_name, date_added, last_modified, content_status from " . TABLE_CONTENT . " c LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " c2c on(c.content_id=c2c.content_id) WHERE ".$sql);
+ $res = $DB->query($sql="select c.content_id, content_name, date_added, last_modified, content_status from " . TABLE_CONTENT . " c LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " c2c on(c.content_id=c2c.content_id) WHERE ".$sql." GROUP BY c.content_id");
-// var_dump($sql);
$num = $res->__get('numRows');
@@ -288,10 +287,6 @@
$result[] = $row;
}
-
-
-// return ((!$shortkey)? $cInfo_array : self::CleanKey($cInfo_array)) ;
-
if($num == 1){
return ((!$shortkey)? $result[0] : self::CleanKey($result[0])) ;
}
@@ -299,7 +294,7 @@
$array=array();
foreach($result as $lg)
- $array[]= ((!$shortkey)? $lg : self::CleanKey($lg));
+ $array[]= ((!$shortkey)? $lg : self::CleanKey($lg));
return $array;
}
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.listing.gab 2012-04-30 20:18:58 UTC (rev 4347)
@@ -1,14 +1,12 @@
<?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
+ @date 30/04/2012, 09:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-
?>
<h3><?php echo __('heading title '.MGabCont::CallSt('GetClassName')); ?></h3>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-04-30 20:18:58 UTC (rev 4347)
@@ -8,13 +8,14 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['heading title']="Gestion du contenu" ;
+$lang['heading title cms_content']="Gestion du contenu" ;
$lang['heading title edit']="Édition d'une page" ;
/* listing */
$lang['view filtres for listing'] = "Filtres" ;
$lang['featured filter tab fields'] = "Colonnes" ;
$lang['filter legend choose fields'] = "Listes des colonnes visibles" ;
+ $lang['image filters'] = "Filtrer" ;
$lang['cms_content table heading id']="ID" ;
$lang['cms_content table heading key']="Clef" ;
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-04-30 20:18:58 UTC (rev 4347)
@@ -1,41 +1,31 @@
<?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 02/02/2012, 09:40
+ @date 30/04/2012, 09:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief multiple class for content
*/
-// error_reporting(E_ALL);
+
/**
@class cms_content
*/
class cms_content
extends ModTwo /// new abstract class for nextgen module
implements
- /// Use module BO V2
-// ExtModPage,
- /// Bacic module
InterfaceModule,
- ExtModConfig
+ ExtModConfig,
+ InterfacedTJsonS,
+ InterfacedInnerHtml
{
/**
@def FILENAME
*/
const FILENAME = FILENAME_CMS_CONTENT;
/**
- @var object
- */
- public static $code;
- /**
- @var object
- */
-// public static $action;
- /**
@var string file
*/
public static $Id;
@@ -86,7 +76,7 @@
self::$code=__CLASS__;
- parent::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+ self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
/**
@@ -98,17 +88,30 @@
if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'mod=page&type='.self::$code .(isset($_GET['cPath'])?'&cPath='.(int)$_GET['cPath']:'') );
//! detail item in ajax
if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+
+
+ // Use factory class aca
+ self::$modules=new AcaFactory('content'/*,'MODULE_CONTENT_INSTALLED_BO'*/);
+ self::$modules->set_image_handler();
+
+ self::$languages = tep_get_languages();
}
-// self::$modules=new ACAcontent;
- // Use factory class aca
- //self::$modules=new ACAcontent();
- self::$modules=new AcaFactory('content'/*,'MODULE_CONTENT_INSTALLED_BO'*/);
- self::$modules->set_image_handler();
- self::$languages = tep_get_languages();
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
+
+
/**
@remarks this define col theader title, and ajust html code
Just for Edit listing
@@ -158,6 +161,7 @@
'alias'=>'status',
'text'=>__('cms_content table heading status'),
'width'=>'5%',
+ 'default'=>true,
),
'c.content_hidden' => array(
'sort'=>true,
@@ -185,7 +189,7 @@
);
// min fields and not view directly colonne fields
- $listfield = ' c.content_id as id,';
+ $listfield = ' c.content_id as id, cat.categories_id, ';
// put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
@@ -289,7 +293,7 @@
global $messageStack,$oscss;
$DB=Database::getInstance();
- parent::$action=$actions;
+ self::$action=$actions;
$cID=(isset($_GET['cID'])? $_GET['cID'] :'' );
@@ -297,7 +301,7 @@
self::$modules-> set_image_handler();
self::$languages = tep_get_languages();
- $actions['action'] = parent::$action;
+ $actions['action'] = self::$action;
$actions['display_file']='';
$actions['action_class']=(isset($_GET['action_class']))? $_GET['action_class'] : '';
$actions['action_method']=(isset($_GET['action_method']))? $_GET['action_method'] : '';
@@ -307,7 +311,7 @@
$action = $actions['action'];
- switch (parent::$action) {
+ switch (self::$action) {
/**
@remarks specific save in session value filters
@@ -326,9 +330,9 @@
break;
- /**
- OPERATION SQL
- */
+ /**
+ @remarks specific Ajax call
+ */
case 'setflag':
if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
if (isset($_GET['cID'])) {
@@ -349,6 +353,18 @@
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
break;
+
+
+ /**
+ @remarks specific multi action
+ */
+ case 'multi':
+ tep_redirect(tep_href_link(self::FILENAME) );
+ break;
+
+ /**
+ @remarks normal page
+ */
case 'insert':
$type = ( isset($_POST['content_name']) ? tep_db_prepare_input($_POST['content_name']) : 1 );
@@ -377,7 +393,7 @@
if (isset($content_id))
$params['id']=$content_id;
- $params['action']=parent::$action;
+ $params['action']=self::$action;
$params['post']=$_POST;
$params['language_id']= $languages_id;
$params['cPath']=(isset($_POST['cPath'])) ? tep_db_prepare_input($_POST['cPath']) : 0;
@@ -432,13 +448,13 @@
sqlcontent::Maintenance();
}
- return parent::$action;
+ return self::$action;
}
/**
*/
public function get_header(){
- self::$modules->get_header_js(parent::$action);
+ self::$modules->get_header_js(self::$action);
}
@@ -457,11 +473,11 @@
@return
*/
public static function GetDBValue(){
- global $language_id;
+
$DB=Database::getInstance();
- $action=parent::$action;
+ $action=self::$action;
switch ($action) {
@@ -480,6 +496,7 @@
case 'detail':
case 'edit':
case 'new':
+ global $language_id;
if( (int)self::$Id > 0) {
self::$Info = sqlcontent::fetch(array('id'=>self::$Id,'language_id'=>$language_id), true);
}
@@ -504,13 +521,29 @@
global $query_numrows, $languages_id;
$adjust=new objectInfo(self::$InitInfo['adjust']);
+
+ /**
+ @remarks replace id by name col
+ */
+ if(!empty($adjust->sWhere)) {
+
+ foreach(self::$allfields as $key=>$row){
+ if(is_array($row) && isset($row['alias']) ){
+ $k[] = '('.$row['alias'].')';
+ $v[] = '('.$key.')';
+ }
+ }
+
+ if(isset($k))
+ $adjust->sWhere = str_replace($k,$v, $adjust->sWhere);
+ }
+
$query_raw = "select ".$adjust->listfields.", c.content_id as id from " . TABLE_CONTENT . " c ".
" LEFT JOIN " . TABLE_CONTENT_DESCRIPTION . " cd ON(c.content_id =cd.content_id AND cd.language_id='".(int)$languages_id."') ".
" LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " p2c ON(c.content_id=p2c.content_id ) ".
" LEFT JOIN " . TABLE_CATEGORIES . " cat ON( cat.categories_id =p2c.categories_id ) ".
" LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " catd ON( catd.categories_id =p2c.categories_id AND cd.language_id='".(int)$languages_id."' ) ".
- " WHERE 1 " .
- ((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ ((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
" GROUP BY c.content_id ".
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' c.date_added DESC ');
@@ -530,7 +563,7 @@
@brief this methode is switch for call gabarit action
*/
public function display_view(){
- $action=parent::$action;
+ $action=self::$action;
switch ($action) {
@@ -538,10 +571,10 @@
@remarks Ajax View result
*/
case 'setflag':
- return self::get_item_status(array('content_status'=>(int)$_GET['flag'], 'content_id'=>(int)self::$Id));
+ return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
break;
case 'viewflag':
- return self::get_item_content_hidden(array('content_hidden'=>(int)$_GET['flag'], 'content_id'=>(int)self::$Id));
+ return self::RowHidden(array('hidden'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
break;
/**
@@ -549,16 +582,16 @@
*/
case 'delete':
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
break;
case 'edit':
self::GetDBValue(self::$Id);
/// use master gabarit
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
break;
case 'new':
self::load_db_values(-1);
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
break;
default:
self::$list=self::tep_get_list();
@@ -621,7 +654,7 @@
@param $id int content_id
*/
public static function detail_row_page($id){
- parent::$action ='detail';
+ self::$action ='detail';
self::GetConf();
self::load_db_values((int)$id);
return MGabCont::CallGab('inline','display_view',__CLASS__);
@@ -685,8 +718,17 @@
return self::FILENAME;
}
- /** public static InterfacedTJsonS */
+ /**
+ @brief redefine model
+ */
+ public static function tep_get_modele(){
+ self::GetConf();
+ return self::$InitInfo['modele']['listing'];
+ }
+
+
+
/**
@brief format db value for display page
@param $_query ressource db sql
@@ -696,7 +738,7 @@
$DB=Database::getInstance();
$res=array();
- switch (parent::$action) {
+ switch (self::$action) {
case 'edit';
global $query_numrows,$languages_id;
@@ -706,18 +748,18 @@
while ($item = $_query->fetchAssoc()) {
- $item['categories_name']='';
- $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_CONTENT_TO_CATEGORIES . " p2c WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and content_id='".$item['id']."' ");
+ /// complete cats list
+ $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_CONTENT_TO_CATEGORIES . " p2c WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and content_id='".$item['id']."' AND c.categories_id <> '".$item['categories_id']."' ");
$rescat=$objres->fetchAllAssoc();
foreach($rescat as $cat)
- $item['categories_name'] .=','.$cat['categories_name'];
+ $item['cat_title'] .=','.$cat['categories_name'];
- if(strlen($item['categories_name'])>25)$item['categories_name']= substr($item['categories_name'],0 ,20).'...';
+ if(strlen($item['cat_title'])>25)$item['cat_title']= substr($item['cat_title'],0 ,20).'...';
$item[0]=$item['id'];
- $item[1]=$item['id'];
+ $item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
foreach(self::$InitInfo['modele']['listing'] as $k=>$row)
if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
@@ -736,6 +778,8 @@
}
+
+
/** Interface module */
function check() { return false; }
Modified: trunk/catalog/admin/includes/modules/pages/rapport.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/rapport.php 2012-04-30 12:58:24 UTC (rev 4346)
+++ trunk/catalog/admin/includes/modules/pages/rapport.php 2012-04-30 20:18:58 UTC (rev 4347)
@@ -264,6 +264,7 @@
$adjust=new objectInfo(self::$InitInfo['adjust']);
+
/* Calcul des module de stats et rapport*/
foreach(scan(DIR_FS_ADMIN .DIR_WS_MODULES.'rapport/') as $file)
if (substr("$file", -4) == '.php'){
@@ -358,10 +359,6 @@
$res = self::GetDBValue();
-// var_dump($_GET['action']);
-// print_r(self::$InitInfo['adjust']);
-// exit;
-
self::$list= count($res);
return $res;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-30 12:58:31
|
Revision: 4346
http://oscss.svn.sourceforge.net/oscss/?rev=4346&view=rev
Author: oscim
Date: 2012-04-30 12:58:24 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
obsolete
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/cms_content/display_view.listing.gab
Deleted: trunk/catalog/admin/includes/gabarit/cms_content/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.listing.gab 2012-04-30 12:57:55 UTC (rev 4345)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.listing.gab 2012-04-30 12:58:24 UTC (rev 4346)
@@ -1,58 +0,0 @@
-<?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 30/03/2012, 09:32
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-global $languages_id;
-?>
- <h3 class="pageHeading"><?php echo __('heading title'); ?></h3>
-
- <div class="button_nav ">
- <?php echo '<a class="button" href="' . tep_href_link(cms_content::FILENAME, 'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). __('image create new content') . '</a>'; ?>
- <?php echo '<a class="button fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=content&action=new_light&origin='. cms_content::FILENAME) . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). __('add category datatype content') . '</a>'; ?>
- </div>
- <br style="clear:both"/>
-
- <div class="box_uniq">
-
- <div id="CurrentPathSelect" >
- <?php echo tep_draw_form('goto', cms_content::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', categorieUtility::get_category_tree(array('datatype'=>'content', 'language_id'=>$languages_id )), (isset($_GET['cPath'])?(int)$_GET['cPath']: 0) , 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
- </div>
-
- <table class="dataTable">
- <thead>
- <tr>
- <th style="width:1%"> </th>
- <th style="width:2%"><?php print __('table heading id'); ?></th>
- <th><?php print __('table heading listings'); ?></th>
- <th><?php print __('table heading c title'); ?></th>
- <th><?php print __('table heading categories'); ?></th>
- <th><?php print __('table heading date added'); ?></th>
- <th class="tcenter row_status"><?php print __('table heading status'); ?></th>
- <th class="tcenter row_status"><?php print __('table heading view status'); ?></th>
- <th class="tcenter row_action"><?php print __('table heading action'); ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td style="width:1%"> </td>
- <td style="width:2%"><?php echo tep_draw_input_field('content_id','content_id',__('table heading id'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:10%"><?php echo tep_draw_input_field('content_name','content_name',__('table heading listings'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:25%" class="tcenter"><?php echo tep_draw_input_field('content_title','content_title',__('table heading c title'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:12%" class="tcenter w_50"><?php echo tep_draw_input_field('categories_name','categories_name',__('table heading categories'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:3%" class="tleft"><?php echo tep_draw_input_field('date_added','date_added',__('table heading date added'),'style="width:100%" class="search_init"'); ?></td>
- <td class="tcenter row_status" style="width:2%"><?php echo tep_draw_input_field('content_status','content_status',__('table heading status'),'style="width:100%" class="search_init"'); ?></td>
- <td class="tcenter row_status" style="width:2%"><?php echo tep_draw_input_field('content_hidden','content_hidden',__('table heading view status'),'style="width:100%" class="search_init"'); ?></td>
- <td class="tcenter row_action"> </td>
- </tr>
- </tfoot>
- <tbody>
- <!-- AJAX LOAD -->
- </tbody>
- </table>
- </div>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|