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...> - 2011-11-20 22:08:59
|
Revision: 3894
http://oscss.svn.sourceforge.net/oscss/?rev=3894&view=rev
Author: oscim
Date: 2011-11-20 22:08:51 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
reecriture du process de commande, et basculement des etape en module
Modified Paths:
--------------
trunk/catalog/includes/classes/core_page/checkout.php
trunk/catalog/includes/classes/order_total.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/classes/payment.php
trunk/catalog/includes/content/checkout_confirmation.php
trunk/catalog/includes/content/checkout_payment.php
trunk/catalog/includes/content/shopping_cart.php
trunk/catalog/includes/js/checkout.js.php
trunk/catalog/includes/languages/fr_FR/modules/payment/moneyorder.txt
trunk/catalog/includes/modules/checkout/PrCgu.php
trunk/catalog/includes/modules/payment/moneyorder.php
trunk/catalog/includes/modules/shipping/item.php
trunk/catalog/includes/modules/shipping/spu.php
Added Paths:
-----------
trunk/catalog/includes/content/checkout_cgu.php
trunk/catalog/includes/modules/checkout/PrConfirmation.php
trunk/catalog/includes/modules/checkout/PrPayment.php
trunk/catalog/includes/modules/checkout/PrShipping.php
Modified: trunk/catalog/includes/classes/core_page/checkout.php
===================================================================
--- trunk/catalog/includes/classes/core_page/checkout.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/classes/core_page/checkout.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -1,12 +1,12 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- \licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- \portion code Copyright (c) 2002 osCommerce
- \package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 29/11/10, 11:33
- \author oscim <mail aur...@os...> <www http://www.oscim.fr>
- \encode UTF-8
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 20/11/11, 22:46
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
\class home
\brief prend en charge les modules de types home.
@@ -22,7 +22,7 @@
/**
Charge les module aca specifique au porduits
*/
- function __construct() {
+ function __construct($step=false) {
global $language, $page;
$this->name='checkout';
@@ -33,30 +33,54 @@
foreach(parent::initialise_type('MODULE_CHECKOUT_PROCESS_INSTALLED','checkout') as $class){
$cl[$class]=new $class ();
$list_mod[$class] = $cl[$class]->sort_order;
- asort($list_mod);
- foreach($list_mod as $class=>$s){
- $this->modules[$class] =$cl[$class];
+
+
+ }
+
+ asort($list_mod);
+ foreach($list_mod as $class=>$s){
+ $this->modules[$class] =$cl[$class];
+ }
+ unset($cl);unset($list_mod);
+
+
+ if($step !=false) {
+ if($step == 'init'){
+ var_dump($step);
+ $this->ResetProcess();
}
- unset($cl);unset($list_mod);
+ elseif(isset($this->modules['Pr'.$step])){
+// var_dump('Pr'.$step);
+ $this->modules['Pr'.$step]->ResetProcess();
+// exit;
+ }
}
+// var_dump( $this->etape);
+// var_dump( $this->process);
+ $etape = $this->ChkBeforeProcess();
- /**
- Preparation des etape disponible
- */
-// $BeforeProcess=$this->ChkBeforeProcess();
-// if(in_array(false,array_values($BeforeProcess)) )
-// $this->etape[1] = 'before' ;
-//
-// if(tep_count_shipping_modules() > 0)
-// $this->etape[2] = 'shipping' ;
-//
-// $this->etape[3] = 'payment' ;
-//
-// $this->etape[4] = 'confirmation' ;
-//
-// $this->etape[5] = 'process' ;
+ /// force add etape confirmation and success
+// $etape['PrConfirmation'] = true ;
+// $etape['PrSuccess'] = true ;
+
+// var_dump($etape);
+
+ $i = 0;
+ foreach($etape as $key=>$row)
+ $this->etape[$i++] = $key;
+
+ $i = 0;
+ foreach($etape as $key=>$row)
+ if($this->modules[$key]->step)
+ $this->process[$i++] = false;
+ else
+ $this->process[$i++] = $row;
+
+// var_dump( $this->etape);
+// var_dump( $this->process);
+
}
public static function getInstance($full=false) {
@@ -71,8 +95,24 @@
+ /**
+ @brief retrun id current etape
+ @param $key string name etape current
+ */
+ public function GetCurrentEtape($key=''){
+ foreach($this->process as $k=>$row)
+ if($row)
+ return $this->etape[$k];
+// var_dump( $this->etape);
+// var_dump( $this->process);
+ // if not found force reload step 0
+// return $this->etape[0];
+ tep_redirect(tep_href_link('checkout.php'/*FILENAME_CHECKOUT_PAYMENT*/, 'step=init', 'SSL'));
+ }
+
+
/** Obligatoire depend AbstractAcaModule */
/**
Modified: trunk/catalog/includes/classes/order_total.php
===================================================================
--- trunk/catalog/includes/classes/order_total.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/classes/order_total.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -21,7 +21,7 @@
/**
Constructor
*/
- function order_total() {
+ function __construct() {
global $language,$customer_id, $page, $cart;
$this->modules=array();
$this->list_mod=array();
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/classes/page.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -119,7 +119,7 @@
Page necessitant une identifcation obligatoire
*/
/* Noyau */
- $this->file_registered=$ContentRegistered;
+ $this->file_registered=$FileRegistered;
/**
Page de devant pas être indéxe dans le fils d'arianne (breadcrumb)
*/
Modified: trunk/catalog/includes/classes/payment.php
===================================================================
--- trunk/catalog/includes/classes/payment.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/classes/payment.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -1,39 +1,56 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- \licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- \portion code Copyright (c) 2002 osCommerce
- \package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 29/11/10, 11:33
- \author oscim <mail aur...@os...> <www http://www.oscim.fr>
- \encode UTF-8
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 20/11/11, 22:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
\class payment
- \file
+ \file
\dir includes/classes/
-
- \brief appel et init des modules de paiement
+
+ \brief appel et init des modules de paiement
*/
-class payment extends AbstractAcaModule{
- var $modules=array();
- var $selected_module;
+class payment
+ extends AbstractAcaModule{
+ /**
+ @var
+ */
+ public $mod=array();
+ /**
+ @var
+ */
+ public $modules=array();
+ /**
+ @var
+ */
+ public static $selected_module = '';
+ /**
+ @var
+ */
protected static $_instance;
+
+ /**
+ @brief constructor
+ @param $module specific load module
+ */
function __construct($module='') {
self::initialise($module);
}
- public static function getInstance($module='')
- {
- if(self::$_instance == null) {
- self::$_instance = new self($module);
- }
- return self::$_instance;
+ public static function getInstance($module=''){
+ if(self::$_instance == null || ( !empty($module) && empty(self::$selected_module) )) {
+ self::$_instance = new self($module);
+ }
+ return self::$_instance;
}
- public static function resetInstance()
- {
+ public static function resetInstance(){
self::$_instance = null;
return self::getInstance();
}
@@ -48,7 +65,7 @@
$include_modules = array();
if (tep_not_null($module)) {
- $this->selected_module = $module;
+ self::$selected_module = $module;
foreach(parent::initialise_type('MODULE_PAYMENT_INSTALLED','payment') as $class){
if($class == $module) $include_modules[] = array('class' => $class, 'file' => $class . '.php');
}
@@ -68,8 +85,8 @@
foreach($include_modules as $imod){
if( ( count($temp_payment_array)==0 || in_array($imod['file'], $temp_payment_array ) ) ){
if(!class_exists($imod['class'])) break;
- $GLOBALS[$imod['class']] = new $imod['class'];
- $this->modules[]=$imod['class'];
+ $this->modules[$imod['class']]=$GLOBALS[$imod['class']] = new $imod['class'];
+ $this->mod[]=$imod['class'];
}
}
@@ -77,10 +94,10 @@
// checkout_confirmation.php the $payment variable is being assigned the
// $_POST['payment'] value which will be empty (no radio button selection possible)
if ( (tep_count_payment_modules() == 1) && (!isset($GLOBALS[$payment]) || (isset($GLOBALS[$payment]) && !is_object($GLOBALS[$payment]))) ) {
- /*$this->selected_module=*/$payment = $include_modules[0]['class'];
+ /*self::$selected_module=*/$payment = $include_modules[0]['class'];
}
- if ( (tep_not_null($module)) && (in_array($module, $this->modules)) && (isset($GLOBALS[$module]->form_action_url)) ) {
+ if ( (tep_not_null($module)) && (in_array($module, $this->mod)) && (isset($GLOBALS[$module]->form_action_url)) ) {
$this->form_action_url = $GLOBALS[$module]->form_action_url;
}
@@ -88,7 +105,7 @@
/**
\ref catalog/checkout_confirmation.php
- \brief
+ \brief
The following method is needed in the checkout_confirmation.php page
due to a chicken and egg problem with the payment class and order class.
The payment modules needs the order destination data for the dynamic status
@@ -98,10 +115,10 @@
section. This should be looked into again post 2.2.
*/
public function update_status() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module])) {
- if (method_exists($GLOBALS[$this->selected_module], 'update_status')) {
- $GLOBALS[$this->selected_module]->update_status();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module])) {
+ if (method_exists($GLOBALS[self::$selected_module], 'update_status')) {
+ $GLOBALS[self::$selected_module]->update_status();
}
}
}
@@ -110,7 +127,7 @@
public function javascript_validation() {
global $page;
$js = '';
- if (is_array($this->modules)) {
+ if (is_array($this->mod)) {
$js = '<script type="text/javascript"><!-- ' . "\n" .
'function check_form() {' . "\n" .
' var error = 0;' . "\n" .
@@ -128,8 +145,8 @@
' payment_value = document.getElementById("checkout_payment").payment.value;' . "\n" .
' }' . "\n\n";
- reset($this->modules);
- foreach($this->modules as $class){
+ reset($this->mod);
+ foreach($this->mod as $class){
if (isset($GLOBALS[$class]) &&$GLOBALS[$class]->enabled) $js .= $GLOBALS[$class]->javascript_validation();
}
@@ -158,16 +175,18 @@
/**
\ref catalog/checkout_payment.php
+ @return array
*/
public function selection() {
$selection_array = array();
- if (is_array($this->modules)) {
- reset($this->modules);
- foreach($this->modules as $class){
+ if (is_array($this->mod)) {
+ reset($this->mod);
+ foreach($this->mod as $class){
if (isset($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
$selection = $GLOBALS[$class]->selection();
- if (is_array($selection)) $selection_array[] = $selection;
+ if (is_array($selection))
+ $selection_array[] = $selection;
}
}
}
@@ -178,54 +197,54 @@
\ref catalog/checkout_payment.php
*/
public function pre_confirmation_check() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) && method_exists($GLOBALS[$this->selected_module], 'pre_confirmation_check') ) {
- $GLOBALS[$this->selected_module]->pre_confirmation_check();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled) && method_exists($GLOBALS[self::$selected_module], 'pre_confirmation_check') ) {
+ $GLOBALS[self::$selected_module]->pre_confirmation_check();
}
}
}
-
+
/**
\ref catalog/checkout_confirmation.php
*/
public function confirmation() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) && method_exists($GLOBALS[$this->selected_module], 'confirmation') ) {
- return $GLOBALS[$this->selected_module]->confirmation();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled) && method_exists($GLOBALS[self::$selected_module], 'confirmation') ) {
+ return $GLOBALS[self::$selected_module]->confirmation();
}
}
}
-
+
/**
\ref catalog/checkout_confirmation.php
*/
public function process_button() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled)&& method_exists($GLOBALS[$this->selected_module], 'process_button') ) {
- return $GLOBALS[$this->selected_module]->process_button();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled)&& method_exists($GLOBALS[self::$selected_module], 'process_button') ) {
+ return $GLOBALS[self::$selected_module]->process_button();
}
}
}
-
+
/**
\ref catalog/checkout_process.php
*/
function before_process() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled)&& method_exists($GLOBALS[$this->selected_module], 'before_process') ) {
- return $GLOBALS[$this->selected_module]->before_process();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled)&& method_exists($GLOBALS[self::$selected_module], 'before_process') ) {
+ return $GLOBALS[self::$selected_module]->before_process();
}
}
}
-
+
/**
\ref catalog/checkout_process.php
*/
public function after_process() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled)&& method_exists($GLOBALS[$this->selected_module], 'after_process') ) {
- return $GLOBALS[$this->selected_module]->after_process();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled)&& method_exists($GLOBALS[self::$selected_module], 'after_process') ) {
+ return $GLOBALS[self::$selected_module]->after_process();
}
}
}
@@ -234,17 +253,17 @@
\ref catalog/checkout_success.php
*/
function payment_succes() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled)&& method_exists($GLOBALS[$this->selected_module], 'payment_succes') ) {
- return $GLOBALS[$this->selected_module]->payment_succes();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled)&& method_exists($GLOBALS[self::$selected_module], 'payment_succes') ) {
+ return $GLOBALS[self::$selected_module]->payment_succes();
}
}
}
public function get_error() {
- if (is_array($this->modules)) {
- if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled)&& method_exists($GLOBALS[$this->selected_module], 'pre_confirmation_check') ) {
- return $GLOBALS[$this->selected_module]->get_error();
+ if (is_array($this->mod)) {
+ if (is_object($GLOBALS[self::$selected_module]) && ($GLOBALS[self::$selected_module]->enabled)&& method_exists($GLOBALS[self::$selected_module], 'pre_confirmation_check') ) {
+ return $GLOBALS[self::$selected_module]->get_error();
}
}
}
Added: trunk/catalog/includes/content/checkout_cgu.php
===================================================================
--- trunk/catalog/includes/content/checkout_cgu.php (rev 0)
+++ trunk/catalog/includes/content/checkout_cgu.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -0,0 +1,46 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 09/09/11, 22:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<div id="checkout">
+
+ <?php /** call and draw boxes */ ?>
+ <?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
+ <?php echo unhtmlentities($boxe->content) ?>
+
+ <?php echo tep_draw_form('checkout_before', tep_href_link('checkout.php' /*FILENAME_CHECKOUT*/, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>
+
+ <?php foreach($display_view as $row): ?>
+
+ <h3><?php echo unhtmlentities($row->title) ?></h3>
+
+
+ <div>
+ <?php echo unhtmlentities($row->content) ?>
+ </div>
+
+ <?php endforeach; ?>
+
+ <fieldset>
+ <legend><?php echo CHECKOUT_CGV ;?></legend>
+
+ <label for="conditions"><?php printf(TEXT_CONDITIONS , tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') );?></label>
+ <input name="conditions" id="conditions" type="checkbox" <?php echo isset($_GET['consult_conditions']) ? 'checked="checked"' : '' ;?> />
+ </fieldset>
+
+ <p class="formBt ieExtractFieldset">
+ <?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE ;?>
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>" />
+ </p>
+
+ </form>
+
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/includes/content/checkout_confirmation.php
===================================================================
--- trunk/catalog/includes/content/checkout_confirmation.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/content/checkout_confirmation.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -1,14 +1,24 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 18/11/10, 21:53
+ @version 2.1.1
+ @date 20/11/11, 22:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+/**
+ @var object order total
+*/
+$ACA_ot=$page->return_object('order_total_modules');
+/**
+ @var array result order totals
+*/
$order_totals=$page->the_var('order_totals');
+
+// var_dump($ACA_ot);
?>
<div id="checkoutConfirmation">
<?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
@@ -65,7 +75,7 @@
<table class="invoice invoiceTotal" cellspacing="0">
<tbody>
- <?php print $order_total_modules->output("<tr>%s</tr>", '<td class="otTtitle">%s</td><td class="otText totht">%s</td><td class="otText totttc">%s</td>'); ?>
+ <?php print $ACA_ot->output("<tr>%s</tr>", '<td class="otTtitle">%s</td><td class="otText totht">%s</td><td class="otText totttc">%s</td>'); ?>
</tbody>
</table>
Modified: trunk/catalog/includes/content/checkout_payment.php
===================================================================
--- trunk/catalog/includes/content/checkout_payment.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/content/checkout_payment.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -17,7 +17,7 @@
<h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h2>
- <?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>
+ <?php echo tep_draw_form('checkout_payment', tep_href_link('checkout.php'/*FILENAME_CHECKOUT_CONFIRMATION*/, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>
<?php /** Retour des erreurs */
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) { ?>
@@ -104,12 +104,12 @@
<p id="checkoutcouponerror" class="warning"><?php if(isset($_GET['error_message'])) echo $_GET['error_message'] ?></p>
<?php } ?>
- <fieldset>
- <legend><?php echo CHECKOUT_CGV ;?></legend>
+<!-- <fieldset>
+ <legend><?php //echo CHECKOUT_CGV ;?></legend>
- <label for="conditions"><?php printf(TEXT_CONDITIONS , tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') );?></label>
- <input name="conditions" id="conditions" type="checkbox" <?php echo isset($_GET['consult_conditions']) ? 'checked="checked"' : '' ;?> />
- </fieldset>
+ <label for="conditions"><?php //printf(TEXT_CONDITIONS , tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') );?></label>
+ <input name="conditions" id="conditions" type="checkbox" <?php //echo isset($_GET['consult_conditions']) ? 'checked="checked"' : '' ;?> />
+ </fieldset>-->
<p class="formBt ieExtractFieldset">
<?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE ;?>
Modified: trunk/catalog/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/includes/content/shopping_cart.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/content/shopping_cart.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -77,12 +77,16 @@
<div class="SubTotal">
<ul id="TotCart">
- <?php foreach($cart->show_list_total() as $i=>$tot): ?>
- <li><?php printf('<span>%s </span> %s' ,$tot->text, $currencies->format($tot->value)); ?></li>
- <?php endforeach; ?>
- <li id="ajaxcartWeight" class="cartWeight">
- <?php echo '<span>' . SUB_TITLE_WEIGHT_TOTAL .'</span>' . $cart->show_weight().' '.UNIT_WEIGHT_NAME; ?>
- </li>
+ <?php foreach($cart->show_list_total() as $i=>$tot): ?>
+ <li><?php printf('<span>%s </span> %s' ,$tot->text, $currencies->format($tot->value)); ?></li>
+ <?php endforeach; ?>
+
+ <?php if($cart->get_content_type() !='virtual'): ?>
+ <li id="ajaxcartWeight" class="cartWeight">
+ <?php echo '<span>' . SUB_TITLE_WEIGHT_TOTAL .'</span>' . $cart->show_weight().' '.UNIT_WEIGHT_NAME; ?>
+ </li>
+ <?php endif; ?>
+
</ul>
</div>
@@ -106,7 +110,7 @@
$back = sizeof($navigation->path)-2;
if (isset($navigation->path[$back])) echo '<a class="Bt navBt link" href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>';
else echo '<a class="Bt navBt link" href="javascript:history.go(-1)">' . IMAGE_BUTTON_BACK . '</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="' . tep_href_link('checkout.php'/*FILENAME_CHECKOUT_SHIPPING*/, 'step=init', 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
</div>
Modified: trunk/catalog/includes/js/checkout.js.php
===================================================================
--- trunk/catalog/includes/js/checkout.js.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/js/checkout.js.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -1,4 +1,4 @@
-<?php error_reporting(E_ALL);;?>
+
<script language="javascript"><!--
function CVVPopUpWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=233,screenX=150,screenY=150,top=150,left=150')
@@ -8,333 +8,5 @@
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=510,screenX=150,screenY=150,top=150,left=150')
}
-// function init_go (){
- var onePage = checkout;//document.getElementById('checkout');
- onePage.initializing = true;
- onePage.ajaxCharset = '<?php echo CHARSET;?>';
- onePage.loggedIn = <?php echo (isset($customer_id) ? 'true' : 'false');?>;
- onePage.ccgvInstalled = <?php echo (_cst_bool('MODULE_ORDER_TOTAL_COUPON_STATUS') ? 'true' : 'false');?>;
- //BOF KGT
- onePage.kgtInstalled = <?php echo (_cst_bool('MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS') ? 'true' : 'false');?>;
- //EOF KGT
- onePage.shippingEnabled = <?php echo (@$onepage['shippingEnabled'] === true ? 'true' : 'false');?>;
- onePage.pageLinks = {
- checkout: '<?php echo fixSeoLink(tep_href_link(FILENAME_CHECKOUT, session_name() . '=' . session_id() . '&rType=ajax', (_cst_bool('ENABLE_SSL')? 'SSL':'NONSSL') ));?>',
- shoppingCart: '<?php echo fixSeoLink(tep_href_link(FILENAME_SHOPPING_CART));?>'
- }
-// }
- function getFieldErrorCheck($element){
- var rObj = {};
- switch($element.attr('name')){
- case 'billing_firstname':
- case 'shipping_firstname':
- rObj.minLength = <?php echo addslashes(ENTRY_FIRST_NAME_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_FIRST_NAME_ERROR);?>';
- break;
- case 'billing_lastname':
- case 'shipping_lastname':
- rObj.minLength = <?php echo addslashes(ENTRY_LAST_NAME_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_LAST_NAME_ERROR);?>';
- break;
- case 'billing_email_address':
- rObj.minLength = <?php echo addslashes(ENTRY_EMAIL_ADDRESS_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_EMAIL_ADDRESS_ERROR);?>';
- break;
- case 'billing_street_address':
- case 'shipping_street_address':
- rObj.minLength = <?php echo addslashes(ENTRY_STREET_ADDRESS_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_STREET_ADDRESS_ERROR);?>';
- break;
- case 'billing_zipcode':
- case 'shipping_zipcode':
- rObj.minLength = <?php echo addslashes(ENTRY_POSTCODE_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_POST_CODE_ERROR);?>';
- break;
- case 'billing_city':
- case 'shipping_city':
- rObj.minLength = <?php echo addslashes(ENTRY_CITY_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_CITY_ERROR);?>';
- break;
- case 'billing_dob':
- rObj.minLength = <?php echo addslashes(ENTRY_DOB_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_DATE_OF_BIRTH_ERROR);?>';
- break;
- case 'billing_telephone':
- rObj.minLength = <?php echo addslashes(ENTRY_TELEPHONE_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_TELEPHONE_NUMBER_ERROR);?>';
- break;
- case 'billing_country':
- case 'shipping_country':
- rObj.errMsg = '<?php echo addslashes(ENTRY_COUNTRY_ERROR);?>';
- break;
- case 'billing_state':
- case 'shipping_state':
- rObj.minLength = <?php echo addslashes(ENTRY_STATE_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_STATE_ERROR);?>';
- break;
- case 'password':
- case 'confirmation':
- rObj.minLength = <?php echo addslashes(ENTRY_PASSWORD_MIN_LENGTH);?>;
- rObj.errMsg = '<?php echo addslashes(ENTRY_PASSWORD_ERROR);?>';
- break;
- }
- return rObj;
- }
-
-$(document).ready(function (){
- $('#pageContentContainer').show();
- var loginBoxOpened = false;
- $('#loginButton').click(function (){
- if (loginBoxOpened){
- $('#loginBox').dialog('open');
- return false;
- }
- $('#loginBox').dialog({
- resizable: false,
- shadow: false,
- open: function (){
- var $dialog = this;
- $('input', $dialog).keypress(function (e){
- if (e.which == 13){
- $('#loginWindowSubmit', $dialog).click();
- }
- });
-
- $('#loginWindowSubmit', $dialog).hover(function (){
- this.style.cursor = 'pointer';
- }, function (){
- this.style.cursor = 'default';
- }).click(function (){
- var $this = $(this);
- $this.hide();
- var email = $('input[name="email_address"]', $dialog).val();
- var pass = $('input[name="password"]', $dialog).val();
- onePage.queueAjaxRequest({
- url: onePage.pageLinks.checkout,
- data: 'action=processLogin&email=' + email + '&pass=' + pass,
- dataType: 'json',
- type: 'post',
- beforeSend: function (){
- onePage.showAjaxMessage('Refreshing Shopping Cart');
- if ($('#loginStatus', $this.parent()).size() <= 0){
- $('<div>')
- .attr('id', 'loginStatus')
- .html('Processing Login')
- .attr('align', 'center')
- .insertAfter($this);
- }
- },
- success: function (data){
- if (data.success == true){
- $('#loginStatus', $dialog).html(data.msg);
- $('#logInRow').hide();
-
- $('#changeBillingAddressTable').show();
- $('#changeShippingAddressTable').show();
- $('#newAccountEmail').remove();
- $('#diffShipping').parent().parent().parent().remove();
-
- onePage.updateAddressHTML('billing');
- onePage.updateAddressHTML('shipping');
-
- $('#shippingAddress').show();
-
- var updateTotals = true;
- onePage.updateCartView();
- onePage.updateFinalProductListing();
- onePage.updatePaymentMethods();
- if ($(':radio[name="payment"]:checked').size() > 0){
- onePage.setPaymentMethod($(':radio[name="payment"]:checked'));
- updateTotals = false;
- }
- onePage.updateShippingMethods();
- if ($(':radio[name="shipping"]:checked').size() > 0){
- //onePage.setShippingMethod($(':radio[name="shipping"]:checked').val());
- onePage.setShippingMethod($(':radio[name="shipping"]:checked'));
- updateTotals = false;
- }
-
- if (updateTotals == true){
- onePage.updateOrderTotals();
- }
-
- $('#loginBox').dialog('destroy');
- }else{
- $('#logInRow').show();
- $('#loggedInRow').hide();
-
- $('#loginStatus', $dialog).html(data.msg);
- setTimeout(function (){
- $('#loginStatus').remove();
- $('#loginWindowSubmit').show();
- }, 6000);
- setTimeout(function (){
- $('#loginStatus').html('Try again in 3');
- }, 3000);
- setTimeout(function (){
- $('#loginStatus').html('Try again in 2');
- }, 4000);
- setTimeout(function (){
- $('#loginStatus').html('Try again in 1');
- }, 5000);
- }
- },
- errorMsg: 'There was an error logging in, please inform IT Web Experts about this error.'
- });
- });
- }
- });
- loginBoxOpened = true;
- return false;
- });
-
- $('#changeBillingAddress, #changeShippingAddress').click(function (){
- var addressType = 'billing';
- if ($(this).attr('id') == 'changeShippingAddress'){
- addressType = 'shipping';
- }
- $('#addressBook').clone().show().appendTo(document.body).dialog({
- shadow: false,
- width: 550,
- // height: 450,
- minWidth: 550,
- //minHeight: 500,
- open: function (){
- onePage.loadAddressBook($(this), addressType);
- },
- buttons: {
- '<?php echo addslashes(WINDOW_BUTTON_CANCEL);?>': function (){
- var $this = $(this);
- var action = $('input[name="action"]', $this).val();
- //alert($(':input, :select, :radio, :checkbox', this).serialize());
- if (action == 'selectAddress'){
- $this.dialog('close');
- }else if (action == 'addNewAddress' || action == 'saveAddress'){
- onePage.loadAddressBook($this, addressType);
- }
- },
- '<?php echo addslashes(WINDOW_BUTTON_CONTINUE);?>': function (){
- var $this = $(this);
- var action = $('input[name="action"]', $this).val();
- //alert($(':input, :select, :radio, :checkbox', this).serialize());
- if (action == 'selectAddress'){
- onePage.queueAjaxRequest({
- url: onePage.pageLinks.checkout,
- beforeSendMsg: 'Setting Address',
- dataType: 'json',
- data: $(':input, :radio', this).serialize(),
- type: 'post',
- success: function (data){
- $this.dialog('close');
- if (addressType == 'shipping'){
- onePage.updateAddressHTML('shipping');
- onePage.updateShippingMethods();
- }else{
- onePage.updateAddressHTML('billing');
- onePage.updatePaymentMethods();
- }
- },
- errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
- });
- }else if (action == 'addNewAddress'){
- onePage.queueAjaxRequest({
- url: onePage.pageLinks.checkout,
- beforeSendMsg: 'Saving New Address',
- dataType: 'json',
- data: $(':input, :select, :radio, :checkbox', this).serialize(),
- type: 'post',
- success: function (data){
- onePage.loadAddressBook($this, addressType);
- },
- errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
- });
- }else if (action == 'saveAddress'){
- onePage.queueAjaxRequest({
- url: onePage.pageLinks.checkout,
- beforeSendMsg: 'Updating Address',
- dataType: 'json',
- data: $(':input, :select, :radio, :checkbox', this).serialize(),
- type: 'post',
- success: function (data){
- onePage.loadAddressBook($this, addressType);
- },
- errorMsg: 'There was an error saving your address, please inform IT Web Experts about this error.'
- });
- }
- },
- '<?php echo addslashes(WINDOW_BUTTON_NEW_ADDRESS);?>': function (){
- var $this = $(this);
- onePage.queueAjaxRequest({
- url: onePage.pageLinks.checkout,
- data: 'action=getNewAddressForm',
- type: 'post',
- beforeSendMsg: 'Loading New Address Form',
- success: function (data){
- $this.html(data);
- onePage.addCountryAjax($('select[name="country"]', $this), 'state', 'stateCol')
- },
- errorMsg: 'There was an error loading new address form, please inform IT Web Experts about this error.'
- });
- },
- '<?php echo addslashes(WINDOW_BUTTON_EDIT_ADDRESS);?>': function (){
- var $this = $(this);
- onePage.queueAjaxRequest({
- url: onePage.pageLinks.checkout,
- data: 'action=getEditAddressForm&addressID=' + $(':radio[name="address"]:checked', $this).val(),
- type: 'post',
- beforeSendMsg: 'Loading Edit Address Form',
- success: function (data){
- $this.html(data);
- },
- errorMsg: 'There was an error loading edit address form, please inform IT Web Experts about this error.'
- });
- }
- }
-
- });
- return false;
- });
-
- onePage.initCheckout();
-// init_go();
-});
-
-<?php
-// Start - CREDIT CLASS Gift Voucher Contribution
-if (_cst_bool('MODULE_ORDER_TOTAL_COUPON_STATUS')){
-if (_cst_bool('MODULE_ORDER_TOTAL_INSTALLED'))
- $temp=$order_total_modules->process();
- $temp=$temp[count($temp)-1];
- $temp=$temp['value'];
-
- $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
- $gv_result = tep_db_fetch_array($gv_query);
-
-if ($gv_result['amount']>=$temp){ $coversAll=true;
-
-?>
- function clearRadeos(){
- document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
- for (counter = 0; counter < document.checkout.payment.length; counter++) {
- // If a radio button has been selected it will return true
- // (If not it will return false)
- if (document.checkout.cot_gv.checked){
- document.checkout.payment[counter].checked = false;
- document.checkout.payment[counter].disabled=true;
- } else {
- document.checkout.payment[counter].disabled=false;
- }
- }
- }
-<?php
-} else {
- $coversAll=false;?>
-
- function clearRadeos(){
- document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
- }
-<?php }
-}
-?>
//-->
</script>
\ No newline at end of file
Modified: trunk/catalog/includes/languages/fr_FR/modules/payment/moneyorder.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/payment/moneyorder.txt 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/languages/fr_FR/modules/payment/moneyorder.txt 2011-11-20 22:08:51 UTC (rev 3894)
@@ -1,23 +1,13 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 14/06/10, 09:40
+ @version 2.1.1
+ @date 20/11/11, 00:04
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-/* Necessaire a l'installion */
- $lang['MODULE_PAYMENT_MONEYORDER_STATUS_TITLE']="Paiement par chèque" ;
- $lang['MODULE_PAYMENT_MONEYORDER_STATUS']="Voulez-vous accepter le paiement par chèque ?" ;
- $lang['MODULE_PAYMENT_MONEYORDER_SORT_ORDER_TITLE']="ordre de tri" ;
- $lang['MODULE_PAYMENT_MONEYORDER_PAYTO_TITLE']="Payable à:" ;
-// $lang['MODULE_PAYMENT_MONEYORDER_PAYTO']= 'À qu'elle ordre doit être établi le règlement ?';
- $lang['MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID_TITLE']="État de la commande" ;
-// $lang['MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID']= 'Sélectionner l'état de la commande que vous voulez par défaut.';
- $lang['MODULE_PAYMENT_MONEYORDER_ZONE_TITLE']="Zone de paiement" ;
-// $lang['MODULE_PAYMENT_MONEYORDER_ZONE']= 'Permettre seulement cette méthode de paiement pour la zone choisie.';
/* FO */
Modified: trunk/catalog/includes/modules/checkout/PrCgu.php
===================================================================
--- trunk/catalog/includes/modules/checkout/PrCgu.php 2011-11-20 22:04:33 UTC (rev 3893)
+++ trunk/catalog/includes/modules/checkout/PrCgu.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -29,22 +29,55 @@
/**
@var sort
*/
- $this->sort_order = (defined('MODULE_ACA_CGU_SORT_ORDER')) ? MODULE_ACA_CGU_SORT_ORDER : 0;
+ $this->sort_order = (defined('MODULE_ACA_CGU_SORT_ORDER')) ? MODULE_ACA_CGU_SORT_ORDER : 3;
/**
@var Active mode module
*/
$this->enabled = true;
+ /**
+ @var Current step ok
+ */
+ $this->step = false;
+
}
+
+ public function ResetProcess($array=array()){
+ tep_session_unregister('conditions');
+ }
+
+
+
/**
@brief Check module for passed etape control
@note this methode use cart customers for control cgu
*/
public function ChkBeforeProcess($array=array()){
- return false;
+
+ // put step ok
+ if (tep_session_is_registered('conditions'))
+ $this->step = true;
+
+ return true;
}
/**
+ @brief Check module for passed etape control
+ @note this methode use cart customers for control cgu
+ */
+ public function BeforeProcess($array=array()){
+// var_dump('BeforeProcess');
+// exit;
+ if(isset($_POST['conditions'])){
+ tep_session_register('conditions');
+ $conditions = tep_db_prepare_input($_POST['conditions']);
+
+ tep_redirect(tep_href_link('checkout.php'/*FILENAME_CHECKOUT_SHIPPING*/, '', 'SSL'));
+ }
+ return true;
+ }
+
+ /**
@brief Call before beginning
@note this methode use cart customers for draw form cgu
*/
Added: trunk/catalog/includes/modules/checkout/PrConfirmation.php
===================================================================
--- trunk/catalog/includes/modules/checkout/PrConfirmation.php (rev 0)
+++ trunk/catalog/includes/modules/checkout/PrConfirmation.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -0,0 +1,211 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/11/11, 21:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+class PrConfirmation
+ implements InterfaceModule {
+
+ /**
+ @brief constructor
+ */
+ function __construct($page){
+ global $page;
+
+ $language = $page->the_var('language');
+ $this->cID= $page->the_var('customer_id');
+
+ /**
+ @var
+ */
+ $this->code = __CLASS__;
+ /**
+ @var sort
+ */
+ $this->sort_order = (defined('MODULE_ACA_CGU_SORT_ORDER')) ? MODULE_ACA_CGU_SORT_ORDER : 6;
+ /**
+ @var Active mode module
+ */
+ $this->enabled = true;
+ /**
+ @var Current step ok
+ */
+ $this->step = false;
+
+ }
+
+
+ public function ResetProcess($array=array()){
+ tep_session_unregister('pre_order_id');
+ }
+
+
+
+ /**
+ @brief Check module for passed etape control
+ @note this methode use cart customers for control cgu
+ */
+ public function ChkBeforeProcess($array=array()){
+ global $cart, $DB, $order, $payment, $payment_modules, $page;
+ // put step ok
+
+// if (tep_session_is_registered('conditions'))
+// $this->step = true;
+
+ //! chargement payment
+ $payment_modules = payment::getInstance($payment);
+
+ //! chargement order
+ $order = new order;
+ $page->add_object('order',$order);
+
+ //! mise a jour status payment
+ $tt=$payment_modules->update_status();
+
+// var_dump($payment_modules->modules);
+
+ if ( is_array($payment_modules->modules)
+ && (sizeof($payment_modules->modules) == 1)
+ && isset($payment_modules->modules[$payment] )
+ ) {
+ $current = $payment_modules->modules[$payment];
+
+ if(is_object($current) )
+ return true;
+
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ @brief Check module for passed etape control
+ @note this methode use cart customers for control cgu
+ */
+ public function BeforeProcess($array=array()){
+ global $cart, $DB, $order, $coupon_sav, $shipping, $sendto , $payment, $page, $order_total_modules, $order_totals, $payment_modules;
+// var_dump($_SESSION);
+// exit;
+// var_dump('BeforeProcess');
+
+// if ( (
+// is_array($payment_modules->modules)
+// && (sizeof($payment_modules->modules) > 1)
+// && !is_object($$payment)
+// )
+// || (is_object($payment) && ($payment->enabled == false))
+// ) {
+// // tep_redirect(tep_href_link('checkout.php'/*FILENAME_CHECKOUT_PAYMENT*/, 'step=Payment&error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
+// // var_dump('rate');
+// // exit;
+// // return false;
+// }
+
+// $current = $payment_modules->modules[$payment];
+
+
+ if (is_array($payment_modules->modules)) {
+ $payment_modules->pre_confirmation_check();
+ }
+
+ //! chargement payment
+ $shipping_modules = shipping::getInstance();
+
+ //kgt - discount coupons
+ if( isset( $coupon_sav ) && is_object( $order->coupon ) ) {
+ $order->coupon->verify_code();
+ if( $order->coupon->is_errors() ) {
+ if( tep_session_is_registered('coupon_sav') ) tep_session_unregister('coupon_sav');
+ //!remove the coupon from the session
+ tep_redirect( tep_href_link( FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode( implode( ' ', $order->coupon->get_messages() ) ), 'SSL' ) );
+ } else {
+
+ //!if the coupon field is empty, unregister the coupon from the session
+ if( tep_session_is_registered('coupon_sav') ) {
+
+ //!we had a coupon entered before, so we need to unregister it
+ // tep_session_unregister('coupon');
+ //!now check to see if we need to recalculate shipping:
+ require_once( DIR_WS_CLASSES.'discount_coupon.php' );
+ //! redirect to the shipping page to reselect the shipping method
+ if( discount_coupon::is_recalc_shipping() ) tep_redirect( tep_href_link( FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode( ENTRY_DISCOUNT_COUPON_SHIPPING_CALC_ERROR ), 'SSL' ) );
+ }
+ else tep_session_register('coupon_sav');
+ }
+ }
+
+// var_dump($page->return_object('order_total'));
+// exit;
+ //! Search or load order total modules
+ if( ($order_total_modules=$page->return_object('order_total')) ==false){
+// var_dump('order_total');
+// if(!class_exists('order_total')) require(DIR_WS_CLASSES . 'order_total.php');
+ $order_total_modules = new order_total();
+ $page->add_object('order_total_modules',$order_total_modules);
+ }
+
+
+ $page->breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
+ $page->post_init();
+
+ $order_totals = $order_total_modules->process();
+
+ $page->add_var_page('order_totals',$order_totals);
+
+ /**
+ Held_process_order
+ Enregsitrement pre-commande
+ */
+ $aca_modules = new checkout_process('', 'holding');
+
+ $res=$aca_modules->process_exe($order_totals);
+ // print_r($res);
+ // Array ( [the_order_id] => 37 [customer_notification] => 1 [total_weight] => 0 [total_tax] => 0 [total_cost] => 187.1 )
+ $pre_order_id=$res['the_order_id'];
+ tep_session_register('pre_order_id');
+
+ return true;
+ }
+
+ /**
+ @brief Call before beginning
+ @note this methode use cart customers for draw form cgu
+ */
+ public function display_view(){
+ global $cart;
+ $v['title']=__("PrCgu tab");
+ $v['content']=tep_output_string_protected(tep_get_cms_content('informationBox_conditions',true, '<article><h5 class="CguView">%s</h5><div class="CguView">%s</textarea></article>' ),false,true);
+ return new objectInfo($v);
+ }
+
+
+ /**
+ Chargement des db
+ */
+ public function load_db_values($cid){
+ }
+
+ /**
+ Chargement dans le fin du process
+ */
+ public function after_process(){
+ tep_session_unregister('producteur');
+ }
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+
+?>
\ No newline at end of file
Added: trunk/catalog/includes/modules/checkout/PrPayment.php
===================================================================
--- trunk/catalog/includes/modules/checkout/PrPayment.php (rev 0)
+++ trunk/catalog/includes/modules/checkout/PrPayment.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -0,0 +1,228 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/11/11, 21:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+class PrPayment
+ implements InterfaceModule {
+
+ /**
+ @brief constructor
+ */
+ function __construct(){
+ global $page;
+
+ $language = $page->the_var('language');
+ $this->cID= $page->the_var('customer_id');
+
+ /**
+ @var
+ */
+ $this->code = __CLASS__;
+ /**
+ @var sort
+ */
+ $this->sort_order = (defined('MODULE_ACA_CGU_SORT_ORDER')) ? MODULE_ACA_CGU_SORT_ORDER : 2;
+ /**
+ @var Active mode module
+ */
+ $this->enabled = true;
+ /**
+ @var Current step ok
+ */
+ $this->step = false;
+ }
+
+
+ public function ResetProcess($array=array()){
+ tep_session_unregister('payment');
+ tep_session_unregister('billto');
+ tep_session_register('comments');
+ }
+
+ /**
+ @brief Check module for passed etape control
+ Up $this->step=true if ok for next step
+ @note this methode use cart customers for control cgu
+ @return true for passed and false if not passed
+ */
+ public function ChkBeforeProcess($array=array()){
+ global $cart, $DB, $order, $page, $customer_id, $customer_default_address_id, $cartID, $billto, $payment_modules, $payment;
+
+// tep_session_unregister('payment');
+// unset($payment);
+
+// var_dump($cartID);
+
+ //! if there is nothing in the customers cart, redirect them to the shopping cart page
+ if (!tep_session_is_registered('cart') || $cart->count_contents() < 1)
+ tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
+
+ /// Stock Check
+ if (! Stock::check_cart() )
+ tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
+
+ //! avoid hack attempts during the checkout procedure by checking the internal cartID
+ if (isset($cart->cartID) && tep_session_is_registered('cartID')) {
+ if ($cart->cartID != $cartID)
+ return false;
+// var_dump('cartID');
+// // tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
+ }
+ elseif(isset($cart->cartID) && !tep_session_is_registered('cartID')) {
+ $cartID=$cart->cartID;
+ tep_session_register('cartID');
+ }
+
+
+ // if no shipping method has been selected, redirect the customer to the shipping method selection page
+ if (!tep_session_is_registered('shipping') && (tep_count_shipping_modules() > 0)){
+// var_dump('shipping');
+ return false;
+ }
+// tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
+
+
+
+
+
+
+
+
+ // if no billing destination address was selected, use the customers own address as default
+ if (!tep_session_is_registered('billto')) {
+ tep_session_register('billto');
+ $billto = $customer_default_address_id;
+
+// var_dump($billto);
+ }
+ else {
+
+ // verify the selected billing address
+ $check_address_query = tep_db_query($sql="select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
+ $check_address = tep_db_fetch_array($check_address_query);
+
+// var_dump($sql);
+ if ($check_address['total'] != '1') {
+ $billto = $customer_default_address_id;
+ if (tep_session_is_registered('payment'))
+ tep_session_unregister('payment');
+ }
+
+ }
+
+
+ if (!tep_session_is_registered('comments'))
+ tep_session_register('comments');
+
+// var_dump(tep_session_is_registered('payment') , tep_session_is_registered('billto'));
+ if (tep_session_is_registered('payment') && tep_session_is_registered('billto')){
+// var_dump($_SESSION);
+ $this->step = true;
+ }
+
+// var_dump($payment, $this->step);
+
+ return true;
+ }
+
+
+ public function BeforeProcess(){
+ global $cart, $DB, $order, $sendto, $shipping, $sendto , $module, $page, $payment;
+ global $total_weight,$total_count, $payment_modules, $selection, $radio_buttons;
+
+
+ $total_weight = $cart->show_weight();
+ $total_count = $cart->count_contents();
+
+ // load all enabled payment modules
+ $payment_modules = payment::getInstance();
+
+
+ if (isset($_POST['payment'])){
+
+ $payment = (string)$_POST['payment'];
+ // force reload payment for selected modules
+ $payment_modules = payment::getInstance($payment);
+
+ tep_session_register('payment');
+ }
+
+ if (isset($_POST['comments']) && tep_not_null($_POST['comments'])){
+
+ $comments = tep_db_prepare_input($_POST['comments']);
+ tep_session_register('comments');
+ }
+
+
+
+
+//! mise a jour status payment
+ $tt=$payment_modules->update_status();
+
+// var_dump($payment_modules);
+ $page->add_var_page('payment_modules',$payment_modules);
+
+
+
+
+
+ $page->breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
+ $page->post_init();
+
+
+ $page->javascript->add_framework("ext/jquery/jquery.min.js");
+ $page->javascript->add_script("ext/jquery/jquery.validate.min.js", array('sort'=>30));
+
+ $selection = $payment_modules->selection();
+ $radio_buttons = 0;
+// if (isset($_POST['payment']))
+// var_dump($_SESSION);
+
+ }
+
+
+ public function AfterProcess(){
+ }
+
+
+ /**
+ @brief Call before beginning
+ @note this methode use cart customers for draw form cgu
+ */
+ public function display_view(){
+ global $cart;
+ $v['title']=__("PrPayment tab");
+ $v['content']=tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__), false, true); //tep_output_string_protected(tep_get_cms_content('informationBox_conditions',true, '<article><h5 class="CguView">%s</h5><div class="CguView">%s</textarea></article>' ),false,true);
+ return new objectInfo($v);
+ }
+
+
+ /**
+ Chargement des db
+ */
+ public function load_db_values($cid){
+ }
+
+ /**
+ Chargement dans le fin du process
+ */
+ public function after_process(){
+ tep_session_unregister('producteur');
+ }
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+
+?>
\ No newline at end of file
Added: trunk/catalog/includes/modules/checkout/PrShipping.php
===================================================================
--- trunk/catalog/includes/modules/checkout/PrShipping.php (rev 0)
+++ trunk/catalog/includes/modules/checkout/PrShipping.php 2011-11-20 22:08:51 UTC (rev 3894)
@@ -0,0 +1,264 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/11/11, 21:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+class PrShipping
+ implements InterfaceModule {
+
+ /**
+ @brief constructor
+ */
+ function __construct(){
+ global $page;
+
+ $language = $page->the_var('language');
+ $this->cID= $page->the_var('customer_id');
+
+ /**
+ @var
+ */
+ $this->code = __CLASS__;
+ /**
+ @var sort
+ */
+ $this->sort_order = (defined('MODULE_ACA_CGU_SORT_ORDER')) ? MODULE_ACA_CGU_SORT_ORDER : 1;
+ /**
+ @var Active mode module
+ */
+ $this->enabled = true;
+ /**
+ @var Current step ok
+ */
+ $this->step = false;
+ }
+
+
+ public function ResetProcess($array=array()){
+ tep_session_unregister('sendto');
+ tep_session_unregister('shipping');
+ }
+
+ /**
+ @brief Check module for passed etape control
+ @note this methode use cart customers for control cgu
+ */
+ public function ChkBeforeProcess($array=array()){
+ global $cart, $DB, $sendto, $order, $shipping, $customer_id;
+
+ // if there is nothing in the customers cart, redirect them to the shopping cart page
+ if ($cart->count_contents() < 1)
+ return false; /*tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));*/
+
+ /// Stock Check
+ if (! Stock::check_cart() )
+ return false; /*tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));*/
+
+
+ //! if no shipping destination address was selected, use the customers own address as default
+ if (!tep_session_is_registered('sendto')) {
+
+
+ $sendto = $_SESSION['customer_default_address_id']; //$customer_default_address_id;
+ tep_session_register('sendto');
+ }
+ else {
+
+
+ //! verify the selected shipping address
+ $check_address_query = $DB->query($sql ="select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
+ $check_address = $check_address_query->fetchAssoc();
+
+ if ($check_address['total'] != '1') {
+ if (tep_session_is_registered('shipping'))
+ tep_session_unregister('shipping');
+
+ }
+ elseif (tep_session_is_registered('shipping'))
+ $this->step = true;
+ }
+
+ //! register a random ID in the session to check throughout the checkout procedure against alterations in the shopping cart contents
+ if (!tep_session_is_registered('cartID')) {
+ tep_session_register('cartID');
+ $cartID = $cart->cartID;
+ $_SESSION['cartID'] = $cartID;
+ }
+
+ //! if the order contains only virtual products, forward the customer to the billing page as a shipping address is not needed
+ if ($order->content_type == 'virtual') {
+ if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
+ global $shipping, $sendto;
+ $shipping = false;
+ $sendto = false;
+
+ return false;
+ }
+
+ if (tep_session_is_registered('shipping'))
+ $this->step = true;
+
+ return true;
+ }
+
+
+ public function BeforeProcess(){
+ global $cart, $DB, $order, $sendto, $shipping, $sendto , $page;
+
+
+ global $total_weight,$total_count, $shipping_modules;
+ //! tot cart
+ $total_weight = $cart->show_weight();
+ $total_count = $cart->count_contents();
+
+ //! load all enabled shipping modules
+ $shipping_modules = new shipping;
+
+ //! livraison gratuite
+ if (_cst_bool('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING')) {
+ $pass = false;
+ switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
+ case 'national': if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
+ case 'international': if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
+ case 'both': $pass = true; break;
+ }
+ $free_shipping = false;
+ if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
+ $free_shipping = true;
+ include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
+ }
+ }
+ else $free_shipping = false;
+
+ // process the selected shipping method free
+ if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
+
+ if (!tep_session_is_registered('comments'))
+ tep_session_register('comments');
+ if (tep_not_null($_POST['comments']))
+ $comments = tep_db_prepare_input($_POST['comments']);
+ if (!tep_session_is_registered('shipping'))
+ tep_session_register('shipping');
+
+
+
+
+ if ( (tep_count_shipping_modules() > 0) || ($free_shipping) ) {
+
+ if ( (isset($_POST['shipping'])) && (strpos($_POST['shipping'], '_')) ) {
+
+ $shipping = $_POST['shipping'];
+
+ list($module, $method) = explode('_', $shipping);
+
+
+ if ( (isset($module)&& is_object( $shipping_modules->modules[$module] )) || ($shipping == 'free_free') ) {
+
+
+ if ($shipping == 'free_free') {
+ $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
+ $quote[0]['methods'][0]['cost'] = '0';
+ }
+ else {
+
+ $quote = $shipping_modules->quote($method, $module);
+ }
+
+ if (isset($quote['error']))
+ tep_session_unregister('shipping');
+
+ else {
+ if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
+ $shipping = array('id' => $shipping,
+ 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
+ 'cost_ht' => $quote[0]['methods'][0]['cost_ht'],
+ 'cost' => $quote[0]['methods'][0]['cost']);
+
+ tep_session_register('shipping');
+
+ $page->tep_session_close();
+ tep_redirect(tep_href_link('checkout.php', 'success=ok1', 'SSL'));
+// tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
+ }
+ }
+ tep_redirect(tep_href_link('checkout.php', 'success=ok2', 'SSL'));
+ }
+ else{
+ tep_session_unregister('shipping');
+ unset($shipping);
+ }
+ }
+
+ }
+ else {
+ tep_redirect(tep_href_link('checkout.php', 'success=ok3', 'SSL'));
+// tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
+ }
+ }
+
+ global $quotes;
+ // get all available shipping quotes
+ $quotes = $shipping_modules->quote();
+
+// var_dump($quotes);
+
+ // if no shipping method has been selected, automatically select the cheapest method. if the modules status was changed when none were available, to save on implementing a javascript force-selection method, also automatically select the cheapest shipping method if more than one module is now enabled
+ if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shippin...
[truncated message content] |
|
From: <os...@us...> - 2011-11-20 22:04:39
|
Revision: 3893
http://oscss.svn.sourceforge.net/oscss/?rev=3893&view=rev
Author: oscim
Date: 2011-11-20 22:04:33 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Added Paths:
-----------
trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/
trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/item.txt 2011-11-20 22:04:33 UTC (rev 3893)
@@ -0,0 +1,15 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 09/01/11, 12:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['module shipping text item title']="transporteur" ;
+$lang['module shipping text item description']="livraison classique :" ;
+$lang['module shipping item text way']="soit :" ;
+$lang['module shipping item text title in shipping']="transporteur :" ;
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/shipping/spu.txt 2011-11-20 22:04:33 UTC (rev 3893)
@@ -0,0 +1,17 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 19:20
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['module shipping text spu title']="Récupération des articles au magasin";
+$lang['module shipping spu text description']="Récupération des articles au magasin durant les heures ouvrées.";
+
+// $lang['module payment cod sort order']="tri";
+// $lang['module payment cod status']="etat";
+// $lang['module payment cod order status id']="Le statut des commande apres choix de ce type de paiment";
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-19 19:23:49
|
Revision: 3892
http://oscss.svn.sourceforge.net/oscss/?rev=3892&view=rev
Author: oscim
Date: 2011-11-19 19:23:40 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
AJout prise en charge des modules de type payment / shipping / order_total dans l'admin ,avec des modules indendants de l'espace public.
Prise en charge de l'affichage est de la modification des information specifique au module
Ajout de la capacit?\195?\169 d'edition des commandes deja existante , sur les adrresse de livraison, de facturation module de livraison et paiement
Gestion du format des addresse et de leur editions
Develoopement et amelioration des aca et ajax pour le traitement ajax des appels de modification
Mise a niveau du module cod dans le core
Report et mise a jour du module cc dans les extensions
Amelioration de methode dans worldutility pour la lecture du pays bas?\195?\169 sur le son nom
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/classes/worldUtility.php
trunk/catalog/admin/includes/content/aca.top.inc
trunk/catalog/admin/includes/content/ajax.top.inc
trunk/catalog/admin/includes/content/modules.top.inc
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/common/classes/order.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/orders/payment/
trunk/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab
trunk/catalog/admin/includes/gabarit/orders/payment/cod.view.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/payment/
trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt
trunk/catalog/admin/includes/modules/payment/
trunk/catalog/admin/includes/modules/payment/cod.php
trunk/catalog/admin/includes/modules/shipping/
trunk/extensions/CC_stable/
trunk/extensions/CC_stable/catalog/admin/
trunk/extensions/CC_stable/catalog/admin/includes/
trunk/extensions/CC_stable/catalog/admin/includes/gabarit/
trunk/extensions/CC_stable/catalog/admin/includes/gabarit/orders/
trunk/extensions/CC_stable/catalog/admin/includes/gabarit/orders/payment/
trunk/extensions/CC_stable/catalog/admin/includes/gabarit/orders/payment/cc.edit.gab
trunk/extensions/CC_stable/catalog/admin/includes/gabarit/orders/payment/cc.view.gab
trunk/extensions/CC_stable/catalog/admin/includes/language/
trunk/extensions/CC_stable/catalog/admin/includes/language/fr_FR/
trunk/extensions/CC_stable/catalog/admin/includes/language/fr_FR/modules/
trunk/extensions/CC_stable/catalog/admin/includes/language/fr_FR/modules/payment/
trunk/extensions/CC_stable/catalog/admin/includes/language/fr_FR/modules/payment/cc/
trunk/extensions/CC_stable/catalog/admin/includes/language/fr_FR/modules/payment/cc/cc.txt
trunk/extensions/CC_stable/catalog/admin/includes/modules/
trunk/extensions/CC_stable/catalog/admin/includes/modules/payment/
trunk/extensions/CC_stable/catalog/admin/includes/modules/payment/cc/
trunk/extensions/CC_stable/catalog/admin/includes/modules/payment/cc/cc.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php 2011-11-19 19:23:40 UTC (rev 3892)
@@ -198,32 +198,41 @@
return false;
// base customers
- $sql = "SELECT c.customers_id, c.customers_lastname, c.customers_gender, c.customers_dob, c.customers_newsletter,c.customers_firstname,c.customers_default_address_id, c.customers_email_address,c.customers_group_ra, c.customers_telephone, c.customers_fax, a.entry_country_id,c.customers_group_id,c.customers_language , cg.customers_group_name, c.customers_shopping_points, c.customers_discount, customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons , global_product_notifications , COUNT(o.customers_id) as orders ".
+ $sql = "SELECT c.customers_id, c.customers_lastname, c.customers_gender, c.customers_dob, c.customers_newsletter,c.customers_firstname,c.customers_default_address_id, c.customers_email_address,c.customers_group_ra, c.customers_telephone, c.customers_fax, a.entry_country_id,c.customers_group_id,c.customers_language , cg.customers_group_name, c.customers_shopping_points, c.customers_discount, customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons , global_product_notifications , COUNT(o.customers_id) as orders, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id ".
" FROM " . TABLE_CUSTOMERS . " c ".
" LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ON( customers_info_id = c.customers_id ) ".
" LEFT JOIN " . TABLE_ADDRESS_BOOK . " a ON ( c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id ) ".
+ " LEFT JOIN " . TABLE_ZONES . " z ON (a.entry_zone_id = z.zone_id) ".
+ " LEFT JOIN " . TABLE_COUNTRIES . " co ON (a.entry_country_id = co.countries_id) ".
" LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON ( c.customers_group_id = cg.customers_group_id ) ".
" LEFT JOIN " . TABLE_ORDERS . " o ON( o.customers_id = c.customers_id ) ".
" WHERE ".substr($sql,3).
" GROUP BY o.customers_id ";
+// left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id)
+
$res=$DB->query($sql);
$num = $res->__get('numRows');
if($num == 1){
$result=$res->fetchAssoc();
- $result['countries_name']=tep_get_country_name($result['entry_country_id']);
+// $result['countries_name']=tep_get_country_name($result['entry_country_id']);
+
+ $result['mod'] = self::$modules->fetch(array('customers_id'=>$result['customers_id'], 'shortkey'=>$shortkey));
+
return ((!$shortkey)? $result : self::CleanKey($result));
}
elseif($num > 1){
$array=array();
foreach($res->fetchAllAssoc() as $result){
- $result['countries_name']=tep_get_country_name($result['entry_country_id']);
+// $result['countries_name']=tep_get_country_name($result['entry_country_id']);
+ $result['mod'] = self::$modules->fetch(array('customers_id'=>$result['customers_id'], 'shortkey'=>$shortkey));
+
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-19 19:23:40 UTC (rev 3892)
@@ -17,7 +17,13 @@
@var object childs module class
*/
public static $modules;
+
/**
+ @var object childs type module class
+ */
+ public static $modules_type;
+
+ /**
@var current ressource class
*/
protected static $_instance;
@@ -36,9 +42,19 @@
TODO : remplacer le nom de constante par un MODULE_CATEGORIES_INSTALLED_BO
*/
self::$modules=new AcaFactory('orders','MODULE_ORDERS_INSTALLED_BO');
-// self::$modules->set_image_handler();
+
+
+ self::$modules_type = new stdClass();
+ self::$modules_type->payment=new AcaFactory('payment','MODULE_PAYMENT_INSTALLED_BO');
+
+ self::$modules_type->shipping=new AcaFactory('shipping','MODULE_SHIPPING_INSTALLED_BO');
+
+ self::$modules_type->order_total=new AcaFactory('order_total','MODULE_ORDER_TOTAL_INSTALLED_BO');
+
}
+
+
/**
@brief for call construct class in singletown
@return current instance
@@ -69,56 +85,10 @@
else
$post = $option['post'];
-// $list_languages=tep_get_languages();
-//
-// $sql_data_array['date_added'] = 'now()';
-// $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
-// $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
-//
-// $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
-// $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
-//
-// // Put post value
-// self::$modules->load_post_values($post);
-//
-// self::$modules->get_insert_table_categories($sql_data_array,'');
-//
-// $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
-//
-//
-//
-// if(!$res)
-// return $res;
-// else
-// $categories_id = $res->__get('insertId');
-//
-// // cpath adjust
-// $sql_data_array=array();
-// $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($categories_id);
-// $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $categories_id . "'");
-//
-//
-// // table language adjust
-// $categories_name_array = $_POST['categories_name'];
-// $categories_desc_array = $_POST['categories_description'];
-//
-//
-// for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
-// $language_id = $list_languages[$i]['id'];
-// $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
-// 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
-//
-// $insert_sql_data = array('categories_id' => $categories_id,
-// 'language_id' => $list_languages[$i]['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_categories_description (array(),$list_languages[$i]['id']));
-//
-// tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
-// }
/// Child module, Call After Update process
- self::$modules->after_update($id);
+// self::$modules->after_update($id);
if(!$res)
@@ -130,11 +100,14 @@
/**
@brief update record
+ @note le tableau fournis ($option) Doit correspondre a la forme des orders !!! idem Specimen
*/
public static function update($option){
self::getInstance();
+ $error = false;
+
if( ! isset($option['id']) )
self::$error = __('no id');
else
@@ -145,6 +118,83 @@
else
$post = $option['post'];
+
+
+
+ /// update shipping address
+ if(isset($option['delivery'])) {
+ $row = new objectInfo($option['delivery']);
+
+ $sql_data_array['delivery_name'] = (string)(!empty($row->name)) ? tep_db_prepare_input($row->name) : '' ;
+ $sql_data_array['delivery_company'] = (string)(!empty($row->company)) ? tep_db_prepare_input($row->company) : '' ;
+ $sql_data_array['delivery_street_address'] = (string)(!empty($row->street_address)) ? tep_db_prepare_input($row->street_address) : '' ;
+ $sql_data_array['delivery_suburb'] = (string)(!empty($row->suburb)) ? tep_db_prepare_input($row->suburb) : '' ;
+ $sql_data_array['delivery_city'] = (string)(!empty($row->city)) ? tep_db_prepare_input($row->city) : '' ;
+ $sql_data_array['delivery_postcode'] = (string)(!empty($row->postcode)) ? tep_db_prepare_input($row->postcode) : '' ;
+ $sql_data_array['delivery_state'] = (string)(!empty($row->state)) ? tep_db_prepare_input($row->state) : '' ;
+ $sql_data_array['delivery_country'] = (string)(!empty($row->country)) ? worldUtility::get_country_name($row->country) : '' ;
+ $sql_data_array['delivery_address_format_id'] = (int)(!empty($row->format_id)) ? tep_db_prepare_input($row->format_id) : worldUtility::GetCountryFormatAddress($row->country) ;
+
+ }
+
+ /// update billing address
+ if(isset($option['billing'])) {
+ $row = new objectInfo($option['billing']);
+
+ $sql_data_array['billing_name'] = (string)(!empty($row->name)) ? tep_db_prepare_input($row->name) : '' ;
+ $sql_data_array['billing_company'] = (string)(!empty($row->company)) ? tep_db_prepare_input($row->company) : '' ;
+ $sql_data_array['billing_street_address'] = (string)(!empty($row->street_address)) ? tep_db_prepare_input($row->street_address) : '' ;
+ $sql_data_array['billing_suburb'] = (string)(!empty($row->suburb)) ? tep_db_prepare_input($row->suburb) : '' ;
+ $sql_data_array['billing_city'] = (string)(!empty($row->city)) ? tep_db_prepare_input($row->city) : '' ;
+ $sql_data_array['billing_postcode'] = (string)(!empty($row->postcode)) ? tep_db_prepare_input($row->postcode) : '' ;
+ $sql_data_array['billing_state'] = (string)(!empty($row->state)) ? tep_db_prepare_input($row->state) : '' ;
+ $sql_data_array['billing_country'] = (string)(!empty($row->country)) ? worldUtility::get_country_name($row->country) : '' ;
+ $sql_data_array['billing_address_format_id'] = (int)(!empty($row->format_id)) ? tep_db_prepare_input($row->format_id) : worldUtility::GetCountryFormatAddress($row->country) ;
+
+ }
+
+
+ if(isset($option['mod'])) {
+
+ foreach($option['mod'] as $key=>$row)
+ switch($key){
+ case 'payment':
+ $sql_data_array['class_payment'] = (string)$row ;
+// $sql_data_array['payment_method'] = (string)(!empty($row->name)) ? tep_db_prepare_input($row->name) : '' ;
+
+ /// force check and save module payment selected
+ self::$modules_type->payment->modules[$row]->load_post_values($post);
+
+ self::$modules_type->payment->modules[$row]->after_update($id);
+ break;
+ case 'shipping':
+ $sql_data_array['class_shipping'] = (string)$row ;
+
+ /// force check and save module payment selected
+ self::$modules_type->shipping->modules[$row]->load_post_values($post);
+
+ self::$modules_type->shipping->modules[$row]->after_update($id);
+ break;
+ }
+
+ }
+
+
+ if(count($sql_data_array) > 0){
+
+ $sql_data_array['last_modified'] = 'NOW()';
+
+ $error = tep_db_perform(TABLE_ORDERS, $sql_data_array, 'update', "orders_id = '" . $id . "'");
+ }
+
+
+ // Put post value
+ self::$modules->load_post_values($post);
+
+ /// Child module, Call After Update process
+ self::$modules->after_update($id);
+
+
// $list_languages=tep_get_languages();
//
// $sql_data_array = $option['sqlarray'];
@@ -158,12 +208,12 @@
// Put post value
- self::$modules->load_post_values($post);
+// self::$modules->load_post_values($post);
// $sql_data_array=array_merge($sql_data_array, (array) self::$modules->get_update_table_categories($sql_data_array) );
//
//
-// tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $id . "'");
+
//
// $categories_name_array = $post['categories_name'];
// $categories_desc_array = $post['categories_description'];
@@ -188,11 +238,10 @@
// // }
- /// Child module, Call After Update process
- self::$modules->after_update($id);
- if(self::$error !=false)
+
+ if($error !=false)
return false;
else
return true;
@@ -244,17 +293,6 @@
if($num == 1){
$resarray = $res->fetchAssoc();
-// $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
-//
-// foreach($check_q->fetchAllAssoc() as $catlg){
-// $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
-// $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
-// }
-// $result['products_count'] = categorieUtility::products_in_category_count($ID);
-// $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
-// $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
-// $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
-//
// /// Childs module load
// self::$modules->load_db_values($ID);
@@ -267,20 +305,6 @@
foreach($res->fetchAllAssoc() as $resarray){
-// $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
-//
-// foreach($check_q->fetchAllAssoc() as $catlg){
-// $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
-// $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
-// }
-// $result['products_count'] = categorieUtility::products_in_category_count($ID);
-// $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
-// $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
-// $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
-//
-// /// Childs module load
-// self::$modules->load_db_values($ID);
-
$result = new order((int)tep_db_input($resarray['id']));
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
Modified: trunk/catalog/admin/includes/classes/worldUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/worldUtility.php 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/classes/worldUtility.php 2011-11-19 19:23:40 UTC (rev 3892)
@@ -1,9 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 18/12/10, 09:26
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 19:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class worldUtility
@@ -12,6 +13,21 @@
/**
+ @brief retrun format_id addess for country
+ @param $_id int country id
+ @return int address_format_id
+ */
+ public static function GetCountryFormatAddress($_id){
+
+ $address_format_query = tep_db_query("select address_format_id from " . TABLE_COUNTRIES . " c where countries_id = '" . (int)$_id . "' ");
+ $address_format = tep_db_fetch_array($address_format_query);
+
+ return (int)$address_format['address_format_id'];
+ }
+
+
+
+ /**
@package oscss
@author OscssTeam
@note Function to retrieve the state/province code (as in FL for Florida etc)
@@ -95,8 +111,9 @@
}
/**
- @package oscss
- @author OscssTeam
+ @brief return name country search by id
+ @param $country_id int
+ @return string name
*/
public static function get_country_name($country_id) {
$country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$country_id . "'");
@@ -108,6 +125,22 @@
}
/**
+ @brief return id country by local name search
+ @param $country_name string local name country
+ @return int id country
+ */
+ public static function GetCountryIdByName($country_name) {
+ $country_query = tep_db_query("select countries_id from " . TABLE_COUNTRIES . " where countries_localname = '" . (string)$country_name . "'");
+ if (!tep_db_num_rows($country_query)) return $country_name;
+ else {
+ $country = tep_db_fetch_array($country_query);
+ return $country['countries_id'];
+ }
+ }
+
+
+
+ /**
@fn geo_zones_pull_down($parameters, $selected = '',$fisc=1)
@param $parameters html for input select string
@param $selected string/int
Modified: trunk/catalog/admin/includes/content/aca.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/aca.top.inc 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/content/aca.top.inc 2011-11-19 19:23:40 UTC (rev 3892)
@@ -47,7 +47,10 @@
include (DIR_WS_MODULES.'pages/'.$actions['action_class'].'.php');
$class=$actions['action_class'];
$modules = new $class;
- $modules->$actions['action_method']();
+
+ echo $modules->$actions['action_method']();
+
+ exit;
}
/**
@@ -88,6 +91,11 @@
$box = new box;
$box=$aca_modules->modules[$actions['action_class']]->$actions['action_method']($box,(int)$ID);
}
+ if ($post_exe && (isset($aca_modules->modules[$actions['action_class']])) )
+ if (!empty($actions['action_method']) && method_exists($aca_modules->modules[$actions['action_class']],$actions['action_method'] )){
+ echo $aca_modules->modules[$actions['action_class']]->$actions['action_method']($box,(int)$ID);
+ exit;
+ }
else $box='';
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/content/ajax.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/ajax.top.inc 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/content/ajax.top.inc 2011-11-19 19:23:40 UTC (rev 3892)
@@ -7,7 +7,63 @@
@date 22/06/10, 18:13
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+*/
+
+ /**
+ @brief New Call Ajax for use SqlDriver
+ */
+
+ if(isset($_REQUEST['SqlDriver'])){
+
+ $filepath = preg_replace('#(\.|\/|\<|\>)*#i','',$_REQUEST['SqlDriver']);
+ $class = preg_replace('#(\.|\/|\<|\>)*#i','',$_REQUEST['class']);
+ $function = preg_replace('#(\.|\/|\<|\>)*#i','',$_REQUEST['funct']);
+
+ if(class_exists('sql'.$filepath.'php')) {
+
+ if(empty($class)){
+
+ $sqlmod=new $filepath();
+
+ $result=$sqlmod->$function();
+ }
+
+
+
+ }
+ else {
+
+ $AcaFactory=new AcaFactory($filepath/*,'MODULE_ACACAT_INSTALLED_BO'*/);
+ var_dump($AcaFactory->modules[$class],$function);
+
+ if (method_exists($AcaFactory->modules[$class],$function)) {
+ $result=$AcaFactory->modules[$class]->$function();
+
+ var_dump($AcaFactory->modules[$class]);
+
+
+ }
+
+ }
+
+
+ if(is_array($result)){
+ }
+ elseif(is_object($result)){
+ }
+ elseif(is_string($result)){
+ print $result;
+ }
+ else{
+ }
+
+ exit;
+ }
+
+
+
+/*
Traitement des appel ajax sur class
@param
@a string $GET[class] la lib a chargée pour l'appel function
Modified: trunk/catalog/admin/includes/content/modules.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/modules.top.inc 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/content/modules.top.inc 2011-11-19 19:23:40 UTC (rev 3892)
@@ -31,7 +31,7 @@
case 'process':
$code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout/','key_BO'=>'MODULE_CHECKOUT_PROCESS_INSTALLED_BO', 'value_BO'=>MODULE_CHECKOUT_PROCESS_INSTALLED_BO, 'prefix'=>'Pr');
$code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/', 'prefix'=>'');
- $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/', 'prefix'=>'');
+ $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'key_BO'=>'MODULE_PAYMENT_INSTALLED_BO', 'value_BO'=>MODULE_PAYMENT_INSTALLED_BO,'module_directory'=> 'payment/', 'prefix'=>'');
$code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/', 'prefix'=>'');
$code_inistalletd_array['orders']=array('key_BO'=>'MODULE_ORDERS_INSTALLED_BO', 'value_BO'=>MODULE_ORDERS_INSTALLED_BO, 'module_directory'=> 'orders/', 'prefix'=>'');
break;
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2011-11-19 19:23:40 UTC (rev 3892)
@@ -8,7 +8,7 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-global $price;
+global $price, $current_theme;
?>
<div class="box_uniq block_form main-orders">
@@ -48,41 +48,171 @@
<!-- DRAW ADRESS SHIPING / BILLING -->
<div class="box_uniq">
- <fieldset class="block_field fleft w_50" >
- <legend><?php echo __('entry shipping address'); ?></legend>
- <p class="block_input">
- <?php echo tep_address_format(orders::$order->delivery['format_id'], orders::$order->delivery, 1, '', '<br />'); ?></p>
- </p>
- </fieldset>
<fieldset class="block_field fleft w_50" >
- <legend><?php echo __('entry billing address'); ?></legend>
+
+ <legend>
+ <?php echo __('entry billing address'); ?>
+ <span class="row_action">
+ <?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(orders::FILENAME, 'action=edit&oID='.orders::$oID. '&address=billing') ,'' ) ?>
+ </span>
+ </legend>
+
<p class="block_input">
- <?php echo tep_address_format(orders::$order->billing['format_id'], orders::$order->billing, 1, '', '<br />'); ?>
+ <?php if(!isset($_REQUEST['address']) || ( isset($_REQUEST['address']) && $_REQUEST['address'] !='billing' ) ): ?>
+ <?php echo tep_address_format(orders::$order->billing['format_id'], orders::$order->billing, 1, '', '<br />'); ?>
+ <?php else: ?>
+
+
+ <?php echo tep_draw_form('add_deliv', orders::FILENAME,'oID='.orders::$oID.'&action=address&address=billing', 'post', ' class="block_form"'); ?>
+
+ <?php if(_cst_bool('ACCOUNT_COMPANY')): ?>
+ <?php echo tep_draw_input_field('address[company]','company', orders::$order->billing['company']) ; ?>
+ <?php endif; ?>
+
+ <?php echo tep_draw_input_field('address[name]','name', orders::$order->billing['name'] ); ?>
+
+ <?php echo tep_draw_input_field('address[street_address]','street_address', orders::$order->billing['street_address']) ; ?>
+
+ <?php echo tep_draw_input_field('address[suburb]','suburb', orders::$order->billing['suburb']) ; ?>
+
+ <?php echo tep_draw_input_field('address[postcode]','postcode', orders::$order->billing['postcode']) ; ?>
+
+ <?php echo tep_draw_input_field('address[city]','city', orders::$order->billing['city']) ; ?>
+
+ <?php echo tep_draw_pull_down_menu('address[country]', worldUtility::get_countries(), worldUtility::GetCountryIdByName(orders::$order->billing['country']) ) ; ?>
+
+ <?php if(_cst_bool('ACCOUNT_STATE')): ?>
+ <?php echo tep_draw_input_field('address[state]','state', orders::$order->billing['state']) ; ?>
+ <?php endif; ?>
+
+
+ <div class="button_nav">
+ <?php echo tep_js_back(tep_href_link(orders::FILENAME, tep_get_all_get_params(array('address')) ), IMAGE_CANCEL);?>
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
+ </div>
+
+ </form>
+ <?php endif; ?>
</p>
</fieldset>
+
+ <fieldset class="block_field fleft w_50" >
+ <legend>
+ <?php echo __('entry shipping address'); ?>
+ <span class="row_action">
+ <?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(orders::FILENAME, 'action=edit&oID='.orders::$oID . '&address=delivery') ,'' ) ?>
+ </span>
+ </legend>
+
+ <?php if(isset(orders::$order->delivery['street_address'])): ?>
+ <p class="block_input">
+ <?php if(!isset($_REQUEST['address']) || ( isset($_REQUEST['address']) && $_REQUEST['address'] !='delivery' ) ): ?>
+ <?php echo tep_address_format(orders::$order->delivery['format_id'], orders::$order->delivery, 1, '', '<br />'); ?></p>
+ <?php else: ?>
+
+
+ <?php echo tep_draw_form('add_ship', orders::FILENAME,'oID='.orders::$oID.'&action=address&address=delivery', 'post', ' class="block_form"'); ?>
+
+ <?php if(_cst_bool('ACCOUNT_COMPANY')): ?>
+ <?php echo tep_draw_input_field('address[company]','company', orders::$order->delivery['company']) ; ?>
+ <?php endif; ?>
+
+ <?php echo tep_draw_input_field('address[name]','name', orders::$order->delivery['name'] ); ?>
+
+ <?php echo tep_draw_input_field('address[street_address]','street_address', orders::$order->delivery['street_address']) ; ?>
+
+ <?php echo tep_draw_input_field('address[suburb]','suburb', orders::$order->delivery['suburb']) ; ?>
+
+ <?php echo tep_draw_input_field('address[postcode]','postcode', orders::$order->delivery['postcode']) ; ?>
+
+ <?php echo tep_draw_input_field('address[city]','city', orders::$order->delivery['city']) ; ?>
+
+ <?php echo tep_draw_pull_down_menu('address[country]', worldUtility::get_countries(), worldUtility::GetCountryIdByName(orders::$order->delivery['country']) ) ; ?>
+
+ <?php if(_cst_bool('ACCOUNT_STATE')): ?>
+ <?php echo tep_draw_input_field('address[state]','state', orders::$order->delivery['state']) ; ?>
+ <?php endif; ?>
+
+
+ <div class="button_nav">
+ <?php echo tep_js_back(tep_href_link(orders::FILENAME, tep_get_all_get_params(array('address')) ), IMAGE_CANCEL);?>
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
+ </div>
+
+ </form>
+ <?php endif; ?>
+ </p>
+ <?php endif; ?>
+
+ </fieldset>
</div>
<!-- DRAW METHOD SHIPING / BILLING -->
<div class="box_uniq">
<fieldset class="block_field fleft w_50">
- <legend><?php echo __('entry payment method'); ?></legend>
+ <legend><?php echo __('entry payment method'); ?>
+ <span class="row_action">
+ <?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(orders::FILENAME, 'action=edit&oID='.orders::$oID . '&mod=payment') ,'' ) ?>
+ </span>
+ </legend>
<p class="block_input">
- <?php echo orders::$order->info['payment_method'] ; ?>
+
+ <?php if(!isset($_REQUEST['mod']) || ( isset($_REQUEST['mod']) && $_REQUEST['mod'] !='payment' ) ): ?>
+ <?php echo orders::$order->info['payment_method'] ; ?>
+ <?php /*echo orders::$order->mod['class_payment'] ;*/ ?>
+
+ <div id="modPay">
+ <?php echo orders::ViewMod('payment', orders::$order->mod['class_payment']) ?>
+ </div>
+
+ <?php else: ?>
+ <?php echo tep_draw_form('mod_pay', orders::FILENAME,'oID='.orders::$oID.'&action=mod&mod=payment', 'post', ' class="block_form"'); ?>
+
+ <?php echo tep_draw_pull_down_menu('mod[payment]', orders::PrepaPullDownType('payment'), orders::$order->mod['class_payment'] , '') ; ?>
+
+ <div id="modPay">
+ <?php echo orders::EditMod('payment', orders::$order->mod['class_payment']) ?>
+ </div>
+
+ <div class="button_nav">
+ <?php echo tep_js_back(tep_href_link(orders::FILENAME, tep_get_all_get_params(array('mod')) ), IMAGE_CANCEL);?>
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
+ </div>
+ </form>
+ <?php endif; ?>
</p>
- <?php if (tep_not_null(orders::$order->info['cc_type']) || tep_not_null(orders::$order->info['cc_owner']) || tep_not_null(orders::$order->info['cc_number'])) { ?>
+
+
+ </fieldset>
+
+ <?php /** Shipping Methode */ ?>
+ <?php if(isset(orders::$order->delivery['street_address'])): ?>
+ <fieldset class="block_field fleft w_50">
+ <legend><?php echo __('entry shipping method'); ?>
+ <span class="row_action">
+ <?php echo sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(orders::FILENAME, 'action=edit&oID='.orders::$oID . '&mod=shipping') ,'' ) ?>
+ </span>
+ </legend>
<p class="block_input">
- <strong><?php echo __('entry credit card type'); ?></strong><?php echo orders::$order->info['cc_type']; ?>
- <br />
- <strong><?php echo __('entry credit card owner'); ?></strong><?php echo orders::$order->info['cc_owner']; ?>
- <br />
- <strong><?php echo __('entry credit card number'); ?></strong><?php echo orders::$order->info['cc_number']; ?>
- <br />
- <strong><?php echo __('entry credit card expires'); ?></strong><?php echo orders::$order->info['cc_expires']; ?>
+ <?php if(!isset($_REQUEST['mod']) || ( isset($_REQUEST['mod']) && $_REQUEST['mod'] !='shipping' ) ): ?>
+ <?php echo orders::$order->mod['class_shipping'] ; ?>
+ <?php else: ?>
+ <?php echo tep_draw_form('mod_pay', orders::FILENAME,'oID='.orders::$oID.'&action=mod&mod=shipping', 'post', ' class="block_form"'); ?>
+
+ <div id="modShip">
+ <?php echo orders::EditMod('shipping', orders::$order->mod['class_shipping']) ?>
+ </div>
+
+ <div class="button_nav">
+ <?php echo tep_js_back(tep_href_link(orders::FILENAME, tep_get_all_get_params(array('mod')) ), IMAGE_CANCEL);?>
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
+ </div>
+ </form>
+ <?php endif; ?>
</p>
- <?php } ?>
-
- </fieldset>
+ </fieldset>
+ <?php endif; ?>
</div>
@@ -90,9 +220,9 @@
<table class="main-orders history padd_w">
<thead>
<tr>
- <th><?php echo __('table heading date added'); ?></th>
- <th class="tcenter"><?php echo __('table heading customer notified'); ?></th>
- <th class="tcenter"><?php echo __('table heading status'); ?></th>
+ <th width="15%"><?php echo __('table heading date added'); ?></th>
+ <th class="tcenter" width="10%"><?php echo __('table heading customer notified'); ?></th>
+ <th class="tcenter" width="10%"><?php echo __('table heading status'); ?></th>
<th><?php echo __('table heading comments'); ?></th>
</tr>
</thead>
@@ -101,9 +231,9 @@
if( !is_array(orders::$order->lasthistory)): echo '<tr>' . "\n" . '<td colspan="5">' . __('text no order history') . '</td>' . "\n" . '</tr>' . "\n";
else : ?>
<tr>
- <td><?php echo orders::$order->lasthistory['date_added']; ?></td>
+ <td class="tcenter"><?php echo orders::$order->lasthistory['date_added']; ?></td>
<td class="tcenter"><?php echo orders::$order->lasthistory['customer_notified']; ?></td>
- <td class="tcenter"><?php echo orders::$order->lasthistory['orders_status']; ?></td>
+ <td class="tcenter" style="width:40px; background:<?php echo orders::$order->lasthistory['color'] ?> url('includes/template/<?php echo $current_theme ?>/img/<?php echo $_SESSION['login_groups_id'] ?>/bg_graph.png') bottom left repeat-y;"><?php echo orders::$order->lasthistory['orders_status']; ?></td>
<td><?php echo orders::$order->lasthistory['comments']; ?></td>
</tr>
<?php endif; ?>
@@ -247,9 +377,9 @@
<table class="main-orders history">
<thead>
<tr>
- <th><?php echo __('table heading date added'); ?></th>
- <th class="tcenter"><?php echo __('table heading customer notified'); ?></th>
- <th class="tcenter"><?php echo __('table heading status'); ?></th>
+ <th width="15%"><?php echo __('table heading date added'); ?></th>
+ <th class="tcenter" width="10%"><?php echo __('table heading customer notified'); ?></th>
+ <th class="tcenter" width="10%"><?php echo __('table heading status'); ?></th>
<th><?php echo __('table heading comments'); ?></th>
</tr>
</thead>
@@ -261,7 +391,7 @@
<tr>
<td><?php echo $item['date_added']; ?></td>
<td class="tcenter"><?php echo $item['customer_notified']; ?></td>
- <td class="tcenter"><?php echo $item['orders_status']; ?></td>
+ <td class="tcenter" style="width:40px; background:<?php echo orders::$order->lasthistory['color'] ?> url('includes/template/<?php echo $current_theme ?>/img/<?php echo $_SESSION['login_groups_id'] ?>/bg_graph.png') bottom left repeat-y;"><?php echo $item['orders_status']; ?></td>
<td><?php echo $item['comments']; ?></td>
</tr>
<?php endforeach; ?>
@@ -271,16 +401,20 @@
</div>
-<!-- DRAW BLOCK DOCS EXISTS OR LINK PDF CREATE -->
+<?php
+ /**
+ DRAW BLOCK DOCS EXISTS OR LINK PDF CREATE
+ */
+?>
<div class="main-orders block fleft w_50 padd_w">
<h4><?php echo __('heading documents') ?></h4>
<table class="main-orders docs">
<thead>
<tr>
- <th>Fichier</th>
- <th>poids</th>
- <th>Date</th>
+ <th><?php echo __('order table pdf heading file') ?></th>
+ <th><?php echo __('order table pdf heading weight') ?></th>
+ <th><?php echo __('order table pdf heading date') ?></th>
</tr>
</thead>
Added: trunk/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/orders/payment/cod.edit.gab 2011-11-19 19:23:40 UTC (rev 3892)
@@ -0,0 +1,14 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 19:36
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+ <p class="block_input">
+ </p>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/orders/payment/cod.view.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/payment/cod.view.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/orders/payment/cod.view.gab 2011-11-19 19:23:40 UTC (rev 3892)
@@ -0,0 +1,14 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 19:36
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+ <p class="block_input">
+ </p>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/payment/cod.txt 2011-11-19 19:23:40 UTC (rev 3892)
@@ -0,0 +1,17 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 19:20
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['module payment cod text title']="Paiement à la livraison";
+$lang['module payment cod text description']="(module cod) Paiement à la livraison";
+
+$lang['module payment cod sort order']="tri";
+$lang['module payment cod status']="etat";
+$lang['module payment cod order status id']="Le statut des commande apres choix de ce type de paiment";
+?>
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2011-11-19 09:41:18 UTC (rev 3891)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2011-11-19 19:23:40 UTC (rev 3892)
@@ -21,50 +21,54 @@
InterfacedInnerHtml {
/**
- @param const
+ @var const
*/
const FILENAME = FILENAME_ORDERS;
/**
- @param array list, utilisé dans les gabarits, list des orders
+ @var array list, utilisé dans les gabarits, list des orders
*/
public static $list=array();
/**
- @param object $order
+ @var object $order
*/
public static $order;
/**
- @param int Id order
+ @var int Id order
*/
public static $oID;
/**
- @param bool $update autorise mise a jour status
+ @var bool $update autorise mise a jour status
*/
public static $update;
/**
- @param array $orders_status_array
+ @var array $orders_status_array
*/
public static $orders_status_array=array();
/**
- @param array $orders_statuses
+ @var array $orders_statuses
*/
public static $orders_statuses=array();
/**
- @param object $oInfo
+ @var object $oInfo
*/
public static $oInfo;
/**
- @param object $export
+ @var object $cInfo detail du client
*/
+ public static $cInfo;
+ /**
+ @var object $export
+ */
public static $export;
/**
- @param string $view for select filter view
+ @var string $view for select filter view
*/
public static $view;
/**
- class constructor
+ @brief class constructor
*/
public function __construct() {
self::GetConf();
@@ -84,7 +88,6 @@
self::$oID=(isset($_REQUEST['oID'])? $_REQUEST['oID'] : '' );
-// var_dump(self::$action);
self::$export= new export(__CLASS__);
/**
@@ -161,23 +164,6 @@
);
-
- /**
- @remarks this define menu master module in page
- */
-// if(self::$action =='' || self::$action =='listing')
-// self::$InitInfo['MenuModule'][]=array(
-// 'type'=>'getLink',
-// 'format'=>'button_nav',
-// 'image'=>'',
-// 'cssclass'=>'',
-// 'title'=>__('image inventaire add'),
-// 'url'=>tep_href_link(self::FILENAME, 'action=new'),
-// );
-
-
-
-
$DB=Database::getInstance();
self::$orders_statuses=array();
$orders_status_query = $DB->query("select status_id, status_name from " . TABLE_STATUS . " where status_type='orders' and language_id = '" . (int)$languages_id . "'");
@@ -195,17 +181,15 @@
global $messageStack,$page_module;
self::$action=$actions;
+// var_dump(self::$action);
+ switch (self::$action) {
- switch (self::$action) {
- case 'multiconfirm':
+ /**
+ @remarks Action mutliple
+ */
+ case 'multiconfirm':
$res=array();
- /**
- @remarks Action mutliple
- */
-
-
-
$status = tep_db_prepare_input(@$_POST['status_multi']);
// $modeexport = tep_db_prepare_input(@$_POST['modeexport']);
$notify_comments = (isset($_POST['notify_comments'])) ? tep_db_prepare_input($_POST['notify_comments']) : '';
@@ -259,6 +243,11 @@
tep_redirect(tep_href_link(self::FILENAME));
break;
+
+
+ /**
+ @remarks Update status Orders
+ */
case 'update_order':
$oID=(int)$_GET['oID'];
if (up_status_order($oID, $_POST) ) $messageStack->add_session(__('success order updated'), 'success');
@@ -267,9 +256,11 @@
tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
break;
- /**
- @remarks Delete Orders
- */
+
+
+ /**
+ @remarks Delete Orders
+ */
case 'deleteconfirm':
if(!sqlorder::delete(array('id'=>(int)$_GET['oID'])))
@@ -280,6 +271,60 @@
tep_redirect(tep_href_link(self::FILENAME));
break;
+
+ /**
+ @remarks Update Address Orders
+ */
+ case 'address':
+
+ if(!isset($_POST['address']) || !is_array($_POST['address']))
+ return false;
+
+ $oID=(int)$_GET['oID'];
+ $type=(string)tep_db_input($_GET['address']);
+
+ $opt['id'] = $oID;
+ $opt['post'] = $_POST;
+ $opt[$type] = $_POST['address'] ;
+
+ if(!sqlorder::update($opt))
+ $messageStack->add_session(__('error order not update address'), 'warning');
+ else
+ $messageStack->add_session(__('success order update address'), 'success');
+
+/**
+ TODO Force refresh pdf
+*/
+
+ tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+ break;
+
+ /**
+ @remarks Update Address Orders
+ */
+ case 'mod':
+
+ if(!isset($_POST['mod']) || !is_array($_POST['mod']))
+ return false;
+
+ $oID=(int)$_GET['oID'];
+ $type=(string)tep_db_input($_GET['mod']);
+
+ $opt['id'] = $oID;
+ $opt['post'] = $_POST;
+ $opt['mod'][$type] = $_POST['mod'][$type] ;
+
+ if(!sqlorder::update($opt))
+ $messageStack->add_session(__('error order not update address'), 'warning');
+ else
+ $messageStack->add_session(__('success order update address'), 'success');
+
+/**
+ TODO Force refresh pdf
+*/
+
+ tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit'));
+ break;
}
return self::$action;
@@ -291,6 +336,8 @@
function disabled(inputs){$(inputs).css.display='none';}
function activ(inputs){$(inputs).css.display='inline';}
+
+ /// ScreenShot product in hover link products
this.screenshotPreview = function(){
/* CONFIG */
@@ -301,25 +348,25 @@
// you might want to adjust to get the right result
/* END CONFIG */
- $("a.screenshot").hover(function(e){
- this.t = this.title;
- this.title = "";
- var c = (this.t != "") ? "<br/>" + this.t : "";
- $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px")
- .fadeIn("fast");
+ $("a.screenshot").hover(function(e){
+ this.t = this.title;
+ this.title = "";
+ var c = (this.t != "") ? "<br/>" + this.t : "";
+ $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px")
+ .fadeIn("fast");
},
- function(){
- this.title = this.t;
- $("#screenshot").remove();
+ function(){
+ this.title = this.t;
+ $("#screenshot").remove();
});
- $("a.screenshot").mousemove(function(e){
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px");
- });
+ $("a.screenshot").mousemove(function(e){
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px");
+ });
};
@@ -327,25 +374,41 @@
$(document).ready(function(){
screenshotPreview();
disabled('#cont_comments');
+
+ /// Edit and info payment
+ $("#modpayment").change( function () {
+ $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "orders", 'action_method' : "display_view" , 'modtype' : "payment", 'oID': "<?php echo (int)self::$oID ?>", 'mod': this.value },
+ function success(data) {
+ $("#modPay").html(data);
+ });
+ });
+
+ /// Edit and change info block shipping
+ $("#modshipping").change( function () {
+ $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "orders", 'action_method' : "display_view" , 'modtype' : "shipping", 'oID': "<?php echo (int)self::$oID ?>", 'mod': this.value },
+ function success(data) {
+ $("#modShip").html(data);
+ });
+ });
});
//--></script>
-<style type="text/css">
-/* */
+ <style type="text/css">
+ /* */
-#screenshot{
- position:absolute;
- border:1px solid #ccc;
- background:#333;
- padding:5px;
- display:none;
- color:#fff;
- }
+ #screenshot{
+ position:absolute;
+ border:1px solid #ccc;
+ background:#333;
+ padding:5px;
+ display:none;
+ color:#fff;
+ }
-/* */
-</style>
-
+ /* */
+ </style>
+ <?php elseif (self::$action == 'new'): ?>
<?php endif;
}
@@ -368,6 +431,50 @@
break;
+ case 'new':
+ $select_adress = array();
+
+ $cID = (int)tep_db_prepare_input($_REQUEST['cID']);
+ $res=sqlcustomer::fetch(array('id'=>$cID), true);
+
+ /**
+ @remarks hoose address book if active module adress book
+ */
+ if(isset($res->mod['address_book'])) {
+ foreach($res->mod['address_book'] as $row)
+ $select_adress[] = array('id'=>$row->book_id , 'text'=> tep_address_format($row->format_id, $row, false, '', " - ") );
+ }
+ else{
+ $adrr = new stdClass();
+ $adrr->book_id = $res->default_address_id;
+ $adrr->gender = $res->gender;
+ $adrr->company = $res->company;
+ $adrr->company_tax_id = $res->company_tax_id;
+ $adrr->firstname = $res->firstname;
+ $adrr->lastname = $res->lastname;
+ $adrr->street_address = $res->street_address;
+ $adrr->suburb = $res->suburb;
+ $adrr->postcode = $res->postcode;
+ $adrr->city = $res->city;
+ $adrr->state = $res->state;
+ $adrr->country_id = $res->country_id;
+ $adrr->zone_id = $res->zone_id;
+ $adrr->zone_name = $res->zone_name;
+ $adrr->countries_id = $res->countries_id;
+ $adrr->countries_name = $res->countries_name;
+ $adrr->countries_iso_code_2 = $res->countries_iso_code_2;
+ $adrr->format_id = $res->address_format_id;
+
+ $select_adress[] = array('id'=>$adrr->book_id , 'text'=> tep_address_format($adrr->format_id, $adrr, false, '', "\n") );
+ }
+
+
+ $res->select_adress = $select_adress;
+
+ return $res;
+ break;
+
+
case 'listing';
/**
@remarks retrun object load one inventaire
@@ -381,11 +488,11 @@
'order_total',
'customers_id',
'orders_status_name'),
- array('o.orders_id',
- ' ot.text',
- 'o.customers_name',
- 's.status_name'),
- $adjust->sWhere);
+ array('o.orders_id',
+ ' ot.text',
+ 'o.customers_name',
+ 's.status_name'),
+ $adjust->sWhere);
}
@@ -414,7 +521,6 @@
case 'delete';
default:
-// $ID = tep_db_prepare_input($ID);
$orders_query_raw = "select distinct o.orders_id,o.orders_prefix, o.customers_id,o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.status_name as orders_status_name, s.status_color as orders_status_color,ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_STATUS . " s where o.orders_status = s.status_id and s.status_type='orders' and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.orders_id='".self::$oID."' ";
$currency_query = $DB->query($orders_query_raw);
@@ -428,23 +534,39 @@
public function display_view(){
+
switch (self::$action) {
case 'delete':
if(self::test_oID((int)self::$oID)) {
self::$oInfo=self::GetDBValue();
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__); //tep_get_include_contents(self::$code.'.delete');
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
}
break;
case 'multi':
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__); //tep_get_include_contents(self::$code.'.multi');
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
+
+ case 'editmod':
+ if(self::test_oID((int)self::$oID)) {
+ self::$order= sqlorder::fetch(array('id'=>self::$oID));
+
+ return self::EditMod($_GET['modtype'], $_GET['mod']);
+ }
+ break;
+
+ case 'new':
+ self::$cInfo=self::GetDBValue();
+
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ break;
+
case 'edit':
if(self::test_oID((int)self::$oID)) {
self::$order= sqlorder::fetch(array('id'=>self::$oID));
self::$order->history=self::load_status_history((int)self::$oID);
self::$order->lasthistory=self::$order->history[(count(self::$order->history)-1)];
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__); //tep_get_include_contents(self::$code.'.edit');
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
}
break;
default:
@@ -457,19 +579,67 @@
-/** Iterne public module */
+/** Interne public module */
+ /**
+ @brief Construct array list type module for pull down menu
+ @param $type string type
+ @return array (array(id=>'', value=>''))
+ */
+ public static function PrepaPullDownType($type){
+ if(isset(sqlorder::$modules_type->$type)) {
+ $r = array();
+ foreach(sqlorder::$modules_type->$type->modules as $key => $row){
+ $r[] = array('id'=>$key,'text'=>$row->title);
+ }
+ }
+ return $r;
+ }
+
+ /**
+ @brief View childs module (shipping/ payment)
+ @param $type string
+ @param $mod string
+ @return string html
+ */
+ public static function ViewMod($type, $mod){
+ if(isset(sqlorder::$modules_type->$type)
+ && isset(sqlorder::$modules_type->$type->modules[$mod])
+ && method_exists(sqlorder::$modules_type->$type->modules[$mod], 'display_view')
+ )
+ return sqlorder::$modules_type->$type->modules[$mod]->display_view();
+ }
+
+ /**
+ @brief View childs module (shipping/ payment)
+ @param $type string
+ @param $mod string
+ @return string html
+ */
+ public static function EditMod($type, $mod){
+ if(isset(sqlorder::$modules_type->$type)
+ && isset(sqlorder::$modules_type->$type->modules[$mod])
+ && method_exists(sqlorder::$modules_type->$type->modules[$mod], 'display_edit')
+ )
+ return sqlorder::$modules_type->$type->modules[$mod]->display_edit();
+ }
+
+ /**
+ @brief load array list history status
+ @param $oID int id order
+ */
public static function load_status_history($oID){
$list=array();
$DB=Database::getInstance();
- $orders_history_query = $DB->query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added");
+ $orders_history_query = $DB->query("select orders_status_id, date_added, customer_notified, comments, status_color from " . TABLE_ORDERS_STATUS_HISTORY . " oh, ".TABLE_STATUS." WHERE orders_id = '" . tep_db_input($oID) . "' and status_type='orders' AND orders_status_id=status_id ORDER BY date_added");
if ($orders_history_query->__get('numRows')) {
while ($orders_history = $orders_history_query->fetchAssoc()) {
self::$update=(DEFAULT_ORDERS_STATUS_COMPLETED== $orders_history['orders_status_id'])? false : true;
+ $li['color']=$orders_history['status_color'];
$li['date_added']=tep_datetime_short($orders_history['date_added']);
$li['customer_notified']=(($orders_history['customer_notified'] == '1')? tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) :tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) ) ;
$li['orders_status']=self::$orders_status_array[$orders_history['orders_status_id']];
Added: trunk/catalog/admin/includes/modules/payment/cod.php
===================================================================
--- trunk/catalog/admin/includes/modules/payment/cod.php (rev 0)
+++ trunk/catalog/admin/includes/modules/payment/cod.php 2011-11-19 19:23:40 UTC (rev 3892)
@@ -0,0 +1,135 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 19:33
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+class cod {
+ public $code;
+ public $title;
+ public $description;
+ public $enabled;
+
+// class constructor
+ public function __construct() {
+ global $order;
+
+ $this->code = 'cod';
+ $this->title = __('module payment cod text title');
+ $this->description = __('module payment cod text description');
+ $this->sort_order = (defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : 0 );
+ $this->enabled = true ;
+
+ if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
+ $this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
+ }
+
+ if (is_object($order))
+ $this->update_status();
+ }
+
+// class methods
+ public function update_status() {
+ global $order;
+
+ if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
+ $check_flag = false;
+ $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and (zone_country_id = '" . $order->delivery['country']['id'] . "' OR zone_country_id ='0') order by zone_id");
+ while ($check = tep_db_fetch_array($check_query)) {
+ if ($check['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ }
+
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+
+// disable the module if the order only contains virtual products
+ if ($this->enabled == true) {
+ if ($order->content_type == 'virtual') {
+ $this->enabled = false;
+ }
+ }
+ }
+
+
+ /**
+ @brief after save table order, adjust modules data save
+ @param $id int order id
+ */
+ public function after_update($id){
+
+ if(empty($id) || (int)$id >0 ){
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ @brief load specific data modules
+ */
+ public function load_post_values(){
+ }
+
+ /**
+ @brief load specific data modules
+ */
+ public function load_db_value(){
+ }
+
+ /**
+ @brief retrun html view data modules
+ */
+ public function display_view(){
+ return MGabCont::CallGab('view','payment/'.__CLASS__,'orders');
+ }
+
+ /**
+ @brief retrun html view form data modules
+ */
+ public function display_edit(){
+ return MGabCont::CallGab('edit','payment/'.__CLASS__,'orders');
+ }
+
+
+ public function get_error() {
+ return false;
+ }
+
+ public function check() {
+ if (!isset($this->_check)) {
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_COD_STATUS'");
+ $this->_check = tep_db_num_rows($check_query);
+ }
+ return $this->_check;
+ }
+
+ public function install() {
+// tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Paiement à la livraison', 'MODULE_PAYMENT_COD_STATUS', 'True', 'Voulez-vous accepter le paiement à la livraison ?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Zone de paiement', 'MODULE_PAYMENT_COD_ZONE', '0', 'Permettre seulement cette méthode de paiement pour la zone choisie.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_PAYMENT_COD_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Etat de la commande', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'Sélectionner l\'état de la commande que vous voulez par défault.', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
+ }
+
+ public function remove() {
+ tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+
+
+ public function keys() {
+ return array(/*'MODULE_PAYMENT_COD_STATUS',*/ 'MODULE_PAYMENT_COD_ZONE', 'MODULE_PAYME...
[truncated message content] |
|
From: <os...@us...> - 2011-11-19 09:41:24
|
Revision: 3891
http://oscss.svn.sourceforge.net/oscss/?rev=3891&view=rev
Author: oscim
Date: 2011-11-19 09:41:18 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
AJout dans la table format d'une colonne exemple contenant un apercu de la mise en forme
Ajout dans les page countrie de l'affichage de cette mise en forme
Ajustement element installation
Correction et amelioration class customerUtility et ajout commentaire dans le code
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/customerUtility.php
trunk/catalog/admin/includes/content/configuration.central.inc
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_address_format.sql
Modified: trunk/catalog/admin/includes/classes/customerUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/customerUtility.php 2011-11-19 08:47:50 UTC (rev 3890)
+++ trunk/catalog/admin/includes/classes/customerUtility.php 2011-11-19 09:41:18 UTC (rev 3891)
@@ -1,9 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 22/08/10, 09:26
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 18/11/11, 13:41
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class customerUtility
@@ -13,8 +14,8 @@
/**
- @author OscssTeam
- @version 1.6
+ @fn customers_name($customers_id)
+ @brief retrun name customers
@note Utilisé par des contrib !!!
*/
public static function customers_name($customers_id) {
@@ -26,9 +27,9 @@
/**
- Get list of address_format_id's
- @package oscss
- @author OscssTeam
+ @brief Get list of address_format_id's
+ @note specific for coutry chosse format adresse
+ @return array(array('id'=>'','value'=>''))
*/
public static function get_address_formats() {
$address_format_query = tep_db_query("select address_format_id from " . TABLE_ADDRESS_FORMAT . " order by address_format_id");
@@ -41,44 +42,78 @@
}
/**
- @package oscss
- @author OscssTeam
- @note Constructeur l'adrresse (facturation, livrairson)
+ @fn address_format($address_format_id, $address, $html, $boln, $eoln)
+ @brief Constructeur l'adrresse (facturation, livrairson)
+ @param $address_format_id int id format
+ @param $address array content adresse book detail
+ array(
+ [company]
+ firstname
+ lastname
+ // or
+ [name]
+ street_address
+ suburb
+ city
+ state
+
+ country_id
+ zone_id
+
+ // or
+ [country]
+
+ postcode
+ )
+ @param $html (bool)
+ @param $boln
+ @param $eoln
*/
public static function address_format($address_format_id, $address, $html, $boln, $eoln) {
+
+ if(!is_array($address) && !is_object($address) )
+ return false;
+
+ /// get format adresse modele
$address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address_format_id . "'");
$address_format = tep_db_fetch_array($address_format_query);
- $company = tep_output_string_protected($address['company']);
- if (isset($address['firstname']) && tep_not_null($address['firstname'])) {
- $firstname = tep_output_string_protected($address['firstname']);
- $lastname = tep_output_string_protected($address['lastname']);
- } elseif (isset($address['name']) && tep_not_null($address['name'])) {
- $firstname = tep_output_string_protected($address['name']);
+ if(is_array($address) && count($address)>0 )
+ $objad = new objectInfo($address);
+ elseif(is_object($address))
+ $objad = $address;
+
+ $company = ( (_cst_bool('ACCOUNT_COMPANY')) ? tep_output_string_protected($objad->company) : '' );
+
+ if (isset($objad->firstname) && tep_not_null($objad->firstname)) {
+ $firstname = tep_output_string_protected($objad->firstname);
+ $lastname = tep_output_string_protected($objad->lastname);
+ } elseif (isset($objad->name) && tep_not_null($objad->name)) {
+ $firstname = tep_output_string_protected($objad->name);
$lastname = '';
} else {
$firstname = '';
$lastname = '';
}
- $street = tep_output_string_protected($address['street_address']);
- $suburb = tep_output_string_protected($address['suburb']);
- $city = tep_output_string_protected($address['city']);
- $state = tep_output_string_protected($address['state']);
- if (isset($address['country_id']) && tep_not_null($address['country_id'])) {
- $country = tep_get_country_name($address['country_id']);
+ $street = tep_output_string_protected($objad->street_address);
+ $suburb = tep_output_string_protected($objad->suburb);
+ $city = tep_output_string_protected($objad->city);
+ $state = tep_output_string_protected($objad->state);
+ if (isset($objad->country_id) && tep_not_null($objad->country_id)) {
+ $country = tep_get_country_name($objad->country_id);
- if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) {
- $state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state);
+ if (isset($objad->zone_id) && tep_not_null($objad->zone_id)) {
+ $state = tep_get_zone_code($objad->country_id, $objad->zone_id, $state);
}
- } elseif (isset($address['country']) && tep_not_null($address['country'])) {
- $country = tep_output_string_protected($address['country']);
+ } elseif (isset($objad->country) && tep_not_null($objad->country)) {
+ $country = tep_output_string_protected($objad->country);
} else {
$country = '';
}
- $postcode = tep_output_string_protected($address['postcode']);
+ $postcode = tep_output_string_protected($objad->postcode);
$zip = $postcode;
- if ($html) {
+ if ($html==1) {
// HTML Mode
$HR = '<hr>';
$hr = '<hr>';
@@ -90,7 +125,8 @@
$CR = $eoln . $boln;
$cr = $CR;
}
- } else {
+ }
+ else {
// Text Mode
$CR = $eoln;
$cr = $CR;
@@ -101,13 +137,13 @@
$statecomma = '';
$streets = $street;
if ($suburb != '') $streets = $street . $cr . $suburb;
- if ($country == '') $country = tep_output_string_protected($address['country']);
+ if ($country == '') $country = tep_output_string_protected($objad->country);
if ($state != '') $statecomma = $state . ', ';
$fmt = $address_format['format'];
eval("\$address = \"$fmt\";");
- if ( (_cst_bool('ACCOUNT_COMPANY')) && (tep_not_null($company)) ) {
+ if ( (tep_not_null($company)) ) {
$address = $company . $cr . $address;
}
@@ -117,8 +153,8 @@
/**
@author oscim <mail os...@os...> <www http://www.oscim.fr>
- @version 1.2
- @note Fournis un standard d'action pour la colonne client
+ @brief Fournis un standard d'action pour la colonne client
+ @param $customers_id
@param array $opt
origin string :: href de la page appelante
format string for printf :: format de sortie
Modified: trunk/catalog/admin/includes/content/configuration.central.inc
===================================================================
--- trunk/catalog/admin/includes/content/configuration.central.inc 2011-11-19 08:47:50 UTC (rev 3890)
+++ trunk/catalog/admin/includes/content/configuration.central.inc 2011-11-19 09:41:18 UTC (rev 3891)
@@ -1,11 +1,12 @@
<?php
/**
- @licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version Rc-3
- @date 07/04/10, 22:11
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 19/11/11, 10:38
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
+ @encode UTF-8
*/
?>
<!-- body //-->
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-19 08:47:50 UTC (rev 3890)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-19 09:41:18 UTC (rev 3891)
@@ -448,6 +448,10 @@
#salesStats .BarGraph li.p0{margin:0 0 -3px 16px;color:#FFF;}
+ /* Adress */
+ .ViewAddress {padding:5px; }
+
+
/* Widget */
#customerStats ul{min-height:70px; background:transparent url(img/1/header_stats.png) no-repeat bottom right;}
#orderStats ul{min-height:70px;background:transparent url(img/1/header_orders.png) no-repeat bottom right;}
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql 2011-11-19 08:47:50 UTC (rev 3890)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql 2011-11-19 09:41:18 UTC (rev 3891)
@@ -11,11 +11,9 @@
--| http://www.oscss.org/ |
--+######################################################################--+
-insert into osc_address_format (address_format_id, address_format, address_summary) values ('1', '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country', '$city / $country');
-insert into osc_address_format (address_format_id, address_format, address_summary) values ('2', '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country', '$city, $state / $country');
-insert into osc_address_format (address_format_id, address_format, address_summary) values ('3', '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country', '$state / $country');
-insert into osc_address_format (address_format_id, address_format, address_summary) values ('4', '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country');
-insert into osc_address_format (address_format_id, address_format, address_summary) values ('5', '$firstname $lastname$cr$streets$cr$postcode $city$cr$country', '$city / $country');
-
-
+INSERT INTO osc_address_format (address_format_id, address_format, address_summary, address_example) VALUES(1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country', '$city / $country', 'Jean-Claude Duce \\n Rue des Bronzés \\n Paris, 75000 FR, \\n France');
+INSERT INTO osc_address_format (address_format_id, address_format, address_summary, address_example) VALUES(2, '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country', '$city, $state / $country', 'Jean-Claude Duce Rue des Bronzés Paris, FR 75000 France');
+INSERT INTO osc_address_format (address_format_id, address_format, address_summary, address_example) VALUES(3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country', '$state / $country', 'Jean-Claude Duce Rue des Bronzés Paris 75000 - FR, France');
+INSERT INTO osc_address_format (address_format_id, address_format, address_summary, address_example) VALUES(4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country', 'Jean-Claude Duce Rue des Bronzés Paris (75000) France');
+INSERT INTO osc_address_format (address_format_id, address_format, address_summary, address_example) VALUES(5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country', '$city / $country', 'Jean-Claude Duce \\n Rue des Bronzés \\n 75000 Paris \\n France');
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_address_format.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_address_format.sql 2011-11-19 08:47:50 UTC (rev 3890)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_address_format.sql 2011-11-19 09:41:18 UTC (rev 3891)
@@ -16,6 +16,7 @@
address_format_id int(11) NOT NULL auto_increment,
address_format varchar(128) NOT NULL default '',
address_summary varchar(48) NOT NULL default '',
+ address_example varchar(250) NOT NULL,
PRIMARY KEY (address_format_id)
) DEFAULT CHARSET=utf8;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-19 08:47:57
|
Revision: 3890
http://oscss.svn.sourceforge.net/oscss/?rev=3890&view=rev
Author: oscim
Date: 2011-11-19 08:47:50 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
correction erreur
modification format adresse pour la france
Modified Paths:
--------------
trunk/catalog/admin/includes/content/configuration.central.inc
trunk/catalog/admin/includes/content/configuration.top.inc
trunk/catalog/admin/includes/functions/general.php
trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql
Modified: trunk/catalog/admin/includes/content/configuration.central.inc
===================================================================
--- trunk/catalog/admin/includes/content/configuration.central.inc 2011-11-18 14:53:33 UTC (rev 3889)
+++ trunk/catalog/admin/includes/content/configuration.central.inc 2011-11-19 08:47:50 UTC (rev 3890)
@@ -1,59 +1,227 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/09/11, 22:00
+ @licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
+ @package oscss-2 <www http://www.oscss.org>
+ @version Rc-3
+ @date 07/04/10, 22:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- @brief content for pages configuration
+ @encode UTF-8
*/
?>
<!-- body //-->
+<?php if($action=='list') { ?>
+<h3><?php echo HEADING_TITLE; ?></h3>
+<h4><?php echo HEADING_TITLE_COUNTRY_ZONE; ?></h4>
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page_admin')) . 'saction=new') . '">' . tep_image(DIR_WS_ICONS . 'icon_add_new.png',IMAGE_INSERT) . IMAGE_NEW_ZONE . '</a>'; ?>
+ <?php echo '<a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('rID','action','saction'))) . '">' . IMAGE_BACK . '</a>'; ?>
+ </div>
-<br style="clear:both" />
-<!-- body_text //-->
-<?php if( isset($mID) ): ?>
+<div class="box_left">
+ <table width="100%" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo TABLE_HEADING_COUNTRY_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'c.countries_name'); ?></th>
+ <th><?php echo TABLE_HEADING_ZONE_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'z.zone_name'); ?></th>
+ <th class="tcenter"><?php echo TABLE_HEADING_ZONE_CODE.tep_link_sort_by(FILENAME_COUNTRIES,'z.zone_code'); ?></th>
+ <th class="tright" style="width:100px"><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td><?php echo $zones_split->display_count($zones_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $page, TEXT_DISPLAY_NUMBER_OF_ZONES); ?></td>
+ <td><?php echo row_by_page(FILENAME_COUNTRIES, $row_bypage_array, $row_by_page, "fleft"); ?></td>
+ <td colspan="2"><?php echo $zones_split->display_links($zones_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS, $page,tep_get_all_get_params(array('page', 'oID'))); ?></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php foreach($list_z as $zones) { ?>
+ <tr class="view parent dataTableRow <?php if(( $rID ==$zones['zone_id'])) echo 'Selected' ?>" >
+ <td><?php echo $zones['countries_name']; ?></td>
+ <td><?php echo $zones['zone_name']; ?></td>
+ <td class="tcenter"><?php echo $zones['zone_code']; ?></td>
+ <td>
+ <span class="view fils fleft">
+ <?php echo '<a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page','rID')) .'rID=' . $zones['zone_id']. '&saction=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ) . '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page','rID')). 'rID=' . $zones['zone_id'] . '&saction=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ) . '</a>';
+ ?>
+ </span>
+ <span class="fright">
+ <?php if (isset($cInfo) && is_object($cInfo) && ($zones['zone_id'] == $cInfo->zone_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_COUNTRIES,tep_get_all_get_params(array('page','rID')). 'rID=' . $zones['zone_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
+ </span>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+</div>
- <?php echo $cfg->draw(); ?>
+<?php } else { ?>
+<h3><?php echo HEADING_TITLE; ?></h3>
+<h4><?php echo HEADING_TITLE_COUNTRY; ?></h4>
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(FILENAME_COUNTRIES,tep_get_all_get_params(array('page_admin')). 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_COUNTRY) . IMAGE_NEW_COUNTRY . '</a>'; ?>
+ </div>
+<div class="box_uniq">
+ <div class="box_left">
+ <table width="100%" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo TABLE_HEADING_COUNTRY_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'countries_name'); ?></th>
+ <th><?php echo TABLE_HEADING_COUNTRY_LOCALNAME.tep_link_sort_by(FILENAME_COUNTRIES,'countries_localname' ); ?></th>
+ <th style="width:40px"><?php echo TABLE_HEADING_COUNTRY_CODE_2.tep_link_sort_by(FILENAME_COUNTRIES,'countries_iso_code_2'); ?></th>
+ <th style="width:40px"><?php echo TABLE_HEADING_COUNTRY_CODE_3.tep_link_sort_by(FILENAME_COUNTRIES,'countries_iso_code_3'); ?></th>
+ <th><?php echo TABLE_HEADING_COUNTRY_VISIBLE.tep_link_sort_by(FILENAME_COUNTRIES,'country_visible'); ?></th>
+ <th class="tright" style="width:100px"><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="1"><?php echo $countries_split->display_count($countries_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $page, TEXT_DISPLAY_NUMBER_OF_COUNTRIES); ?></td>
+ <td colspan="3"><?php echo row_by_page(FILENAME_COUNTRIES, $row_bypage_array, $row_by_page, "fleft"); ?></td>
+ <td colspan="2"><?php echo $countries_split->display_links($countries_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS,$page, tep_get_all_get_params(array('page_admin','page','cID'))); ?></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php foreach($list_c as $countries) { ?>
+ <tr class="view parent dataTableRow <?php if(isset($cID) && $cID==$countries['countries_id']) echo 'Selected' ?>">
+ <td class="tleft"><?php echo $countries['countries_name']; ?></td>
+ <td class="tleft"><?php echo $countries['countries_localname']; ?></td>
+ <td class="tcenter"><?php echo $countries['countries_iso_code_2']; ?></td>
+ <td class="tcenter"><?php echo $countries['countries_iso_code_3']; ?></td>
+ <td class="tcenter">
+ <?php if ($countries['country_visible'] == '1') echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(FILENAME_COUNTRIES, 'action=update&country_visible=0&cID=' . $countries['countries_id'] . '&page=' . $page) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
+ else echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, 'action=update&country_visible=1&cID=' . $countries['countries_id'] . '&page=' . $page) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a> ' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED); ?>
+ </td>
+ <td class="row_action">
+ <span class="view fils fleft">
+ <?php
+ echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('action','cID')).'cID=' .$countries['countries_id'] . '&action=list') . '">' . tep_image(DIR_WS_ICONS . 'icon_plus.gif', ICON_FOLDER) . '</a>';
+ echo '<a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $countries['countries_id'] . '&row_by_page='.$row_by_page.'&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ) . '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $countries['countries_id'] .'&row_by_page='.$row_by_page. '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ) . '</a> ';
+ ?>
+ </span>
+ <span class="fright">
+ <?php if (isset($cInfo) && is_object($cInfo) && ($countries['countries_id'] == $cInfo->countries_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); }
+ else { echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $countries['countries_id'].'&row_by_page='.$row_by_page) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
+ </span>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+ </div>
+<?php } ?>
+<?php
+ $heading = array();
+ $contents = array();
-<?php elseif($action=='' && tep_not_null($gID) && is_numeric($gID) ): ?>
+if($action=='list'){
+ switch ($saction) {
+ case 'new':
+ $heading[] = array('text' => TEXT_INFO_HEADING_NEW_ZONE );
+ $contents = array('form' => tep_draw_form('zones', FILENAME_COUNTRIES, tep_get_all_get_params(array('saction')).'saction=insert'));
+ $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
+ $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_NAME . tep_draw_input_field('zone_name'));
+ $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_CODE . tep_draw_input_field('zone_code'));
+ $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_COUNTRY_NAME . tep_draw_pull_down_menu('zone_country_id', tep_get_countries(), $cID));
+ $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page_admin','saction')) ) . '">' . IMAGE_CANCEL . '</a>');
+ break;
+ case 'edit':
+ $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_ZONE );
+ $contents = array('form' => tep_draw_form('zones', FILENAME_COUNTRIES, tep_get_all_get_params(array('saction','rID')).'rID=' . $cInfo->zone_id.'&saction=save'));
+ $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
+ $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_NAME . tep_draw_input_field('zone_name','', $cInfo->zone_name));
+ $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_CODE . tep_draw_input_field('zone_code','', $cInfo->zone_code));
+ $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_COUNTRY_NAME . tep_draw_pull_down_menu('zone_country_id', tep_get_countries(), $cInfo->countries_id));
+ $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('saction')).'rID=' . $cInfo->zone_id) . '">' . IMAGE_CANCEL . '</a>');
+ break;
+ case 'delete':
+ $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_ZONE );
+ $contents = array('form' => tep_draw_form('zones', FILENAME_COUNTRIES, tep_get_all_get_params(array('saction','rID')).'rID=' . $cInfo->zone_id.'&action=deleteconfirm'));
+ $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
+ $contents[] = array('text' => '<strong>' . $cInfo->zone_name . '</strong>');
+ $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('saction','rID')).'rID=' . $cInfo->zone_id) . '">' . IMAGE_CANCEL . '</a>');
+ break;
+ default:
+ if (isset($cInfo) && is_object($cInfo)) {
+ $heading[] = array('text' => $cInfo->zone_name);
+ $contents[] = array('text' => TEXT_INFO_ZONES_NAME . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
+ $contents[] = array('text' => TEXT_INFO_COUNTRY_NAME . $cInfo->countries_name);
+ }
+// break;
+ }
+}else {
+ if (isset($cInfo) && is_object($cInfo) && ($countries['countries_id'] == $cInfo->countries_id) ){
+ $country_visible = ($cInfo->country_visible == '1') ? VISIBLE_YES : VISIBLE_NO;
+ $country_visible_Y = ($cInfo->country_visible == '1') ? true : false;
+ $country_visible_N = ($cInfo->country_visible == '0') ? true : false;
+ } else {
+ $country_visible = VISIBLE_YES ;
+ $country_visible_Y = true ;
+ $country_visible_N = false;
+ }
-<div id="ssmenu">
- <?php echo tep_ssmenu_configuration($gparentID); ?>
-</div>
-<h3 class="main-title"><?php echo tep_cst_menu_conf($cfg_group['configuration_group_title']); ?></h3>
-<h4><?php echo tep_cst_menu_conf('TITLE_'.$cfg_group['configuration_group_title']); ?></h4>
+ switch ($action) {
+ case 'new':
+ $heading[] = array('text' => TEXT_INFO_HEADING_NEW_COUNTRY );
+ $contents = array('form' => tep_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $page .'&row_by_page='.$row_by_page. '&action=insert'));
+ $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_NAME . tep_draw_input_field('countries_name'));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_LOCALNAME . tep_draw_input_field('countries_localname'));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_2 . tep_draw_input_field('countries_iso_code_2'));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_3 . tep_draw_input_field('countries_iso_code_3'));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_ADDRESS_FORMAT . tep_draw_pull_down_menu('address_format_id', tep_get_address_formats()));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_VISIBLE . tep_draw_radio_field('country_visible', 'country_visible_1', '1', $country_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('country_visible', 'country_visible_0', '0', $country_visible_N) . ' ' . VISIBLE_NO);
+ $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page_admin', 'action'))) . '">' . IMAGE_CANCEL . '</a>');
+ break;
+ case 'edit':
+ $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_COUNTRY );
+ $contents = array('form' => tep_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id .'&row_by_page='.$row_by_page. '&action=save'));
+ $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_NAME . tep_draw_input_field('countries_name', '', $cInfo->countries_name));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_LOCALNAME . tep_draw_input_field('countries_localname', '', $cInfo->countries_localname));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_2 . tep_draw_input_field('countries_iso_code_2', '', $cInfo->countries_iso_code_2));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_3 . tep_draw_input_field('countries_iso_code_3', '', $cInfo->countries_iso_code_3));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_ADDRESS_FORMAT . tep_draw_pull_down_menu('address_format_id', tep_get_address_formats(), $cInfo->address_format_id));
+ $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_VISIBLE . tep_draw_radio_field('country_visible', 'country_visible_1', '1', $country_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('country_visible', 'country_visible_0', '0', $country_visible_N) . ' ' . VISIBLE_NO);
+ $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id .'&row_by_page='.$row_by_page) . '">' . IMAGE_CANCEL . '</a>');
+ break;
+ case 'delete':
+ $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_COUNTRY );
+ $contents = array('form' => tep_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id .'&row_by_page='.$row_by_page. '&action=deleteconfirm'));
+ $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
+ $contents[] = array('text' => '<strong>' . $cInfo->countries_name . '</strong>');
+ $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_delete.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id) . '">' . IMAGE_CANCEL . '</a>');
+ break;
- <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $gID . '&action=save_mutli') ?>
- <div class="box_left">
- <ul class="block_form">
- <?php foreach($list_edit as $row) { ?>
- <li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
+ default:
+ if (isset($cInfo) && is_object($cInfo)) {
+ $heading[] = array('text' => $cInfo->countries_name );
+ $contents[] = array('text' => TEXT_INFO_COUNTRY_NAME . $cInfo->countries_name);
+ $contents[] = array('text' => TEXT_INFO_COUNTRY_LOCALNAME . $cInfo->countries_localname);
+ $contents[] = array('text' => TEXT_INFO_COUNTRY_CODE_2 . $cInfo->countries_iso_code_2);
+ $contents[] = array('text' => TEXT_INFO_COUNTRY_CODE_3 . $cInfo->countries_iso_code_3);
+ $contents[] = array('text' => TEXT_INFO_ADDRESS_FORMAT . $cInfo->address_format_id .
+'<br />'.
+'<div class="ViewAddress ViewAddress-format">'.
+str_replace('\n','<br />',$address_format_array[$cInfo->address_format_id]).
+'</div>'
+);
- <div class="block_input tirroir">
- <label><?php if (tep_not_null(__($row->description)))echo __($row->description); ?></label>
- <p>
- <?php echo $row->value_field ; ?>
- </p>
- </div>
- </li>
- <?php } ?>
- </ul>
- </div>
- <div class="box_right">
- <ul>
- <div class="button_nav">
- <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $gID )) ; ?>
- </div>
- </li>
- </ul>
- </div>
- </form>
-<?php endif; ?>
-<!-- body_text_eof //-->
-<!-- body_eof //-->
\ No newline at end of file
+ $contents[] = array('text' => TEXT_INFO_COUNTRY_VISIBLE . $country_visible);
+ }
+ break;
+ }
+ }
+?>
+<div class="box_right">
+<?php
+ if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
+ $box = new box;
+ echo $box->infoBox($heading, $contents);
+ }
+?>
+</div>
+</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/content/configuration.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/configuration.top.inc 2011-11-18 14:53:33 UTC (rev 3889)
+++ trunk/catalog/admin/includes/content/configuration.top.inc 2011-11-19 08:47:50 UTC (rev 3890)
@@ -1,169 +1,125 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/09/11, 22:00
+ @licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
+ @package oscss-2 <www http://www.oscss.org>
+ @version Rc-3
+ @date 08/04/10, 22:41
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- @brief generic page for configuration in confuguration_table
- This page is replaced by module type configuration if exists
- For replace this page by module configurtaion type, name new module cfg_xx, and xx is gID (configuration_group_id)
+ @encode UTF-8
*/
+ $rID=(isset($_GET['rID'])) ? $_GET['rID'] : '';
+ $cID=(isset($_GET['cID'])) ? $_GET['cID'] : '';
- // clef de groupe (configuration_group_id)
- $gID = (isset($_GET['gID'])) ? $_GET['gID'] : 1;
- // groupe parent
- $gparentID = (isset($_GET['gparentID'])) ? $_GET['gparentID'] : 0;
+ $saction=(isset($_GET['saction'])) ? $_GET['saction'] : '';
- /**
- @remarks Adjust name child module
- Old : cfg_21 >> 21 == configuration_group_id
- New : template >> [cg_]template == configuration_group_key
- */
+ switch ($action) {
+ case 'insert':
+ $countries_name = tep_db_prepare_input($_POST['countries_name']);
+ $countries_localname = tep_db_prepare_input($_POST['countries_localname']);
+ $countries_iso_code_2 = tep_db_prepare_input($_POST['countries_iso_code_2']);
+ $countries_iso_code_3 = tep_db_prepare_input($_POST['countries_iso_code_3']);
+ $address_format_id = tep_db_prepare_input($_POST['address_format_id']);
+ $country_visible = tep_db_prepare_input($_POST['country_visible']);
- if(file_exists(DIR_WS_MODULES.'configuration/cfg_'.$gID.'.php'))
- $class='cfg_'.$gID;
- else {
- $_query = tep_db_query("SELECT configuration_group_key AS childmodule FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_id = '" . (int)$gID . "' ORDER BY sort_order");
- $conf = tep_db_fetch_array($_query);
+ tep_db_query("insert into " . TABLE_COUNTRIES . " (countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('" . tep_db_input($countries_name) . "', '" . tep_db_input($countries_localname) . "', '" . tep_db_input($countries_iso_code_2) . "', '" . tep_db_input($countries_iso_code_3) . "', '" . (int)$address_format_id . "', '" . (int)$country_visible . "')");
- $class= trim(strtolower($conf['childmodule']));
+ tep_redirect(tep_href_link(FILENAME_COUNTRIES));
+ break;
- if(substr($class,0,3) =='cg_') $class = substr($class,3);
- }
+ case 'update':
+ $countries_id = tep_db_prepare_input($_GET['cID']);
+ $country_visible = tep_db_prepare_input($_GET['country_visible']);
- /**
- @remarks Call child modules configuration in /modules/configuration folder
- */
+ tep_db_query("update " . TABLE_COUNTRIES . " set country_visible = '" . (int)$country_visible . "' where countries_id = '" . (int)$countries_id . "'");
- if(file_exists(DIR_WS_MODULES.'configuration/'.$class.'.php') && !class_exists($class)) {
- require(DIR_WS_MODULES.'configuration/'.$class.'.php');
- // module key precis
- $mID=$gID;
+ tep_redirect(tep_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $countries_id.'&row_by_page='.$row_by_page));
+ break;
- $cfg =new $class();
- }
- else {
- $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/cfg_'.$gID.'.txt');
- }
+ case 'save':
+ $countries_id = tep_db_prepare_input($_GET['cID']);
+ $countries_name = tep_db_prepare_input($_POST['countries_name']);
+ $countries_localname = tep_db_prepare_input($_POST['countries_localname']);
+ $countries_iso_code_2 = tep_db_prepare_input($_POST['countries_iso_code_2']);
+ $countries_iso_code_3 = tep_db_prepare_input($_POST['countries_iso_code_3']);
+ $address_format_id = tep_db_prepare_input($_POST['address_format_id']);
+ $country_visible = tep_db_prepare_input($_POST['country_visible']);
+ tep_db_query("update " . TABLE_COUNTRIES . " set countries_name = '" . tep_db_input($countries_name) . "', countries_localname = '" . tep_db_input($countries_localname) . "', countries_iso_code_2 = '" . tep_db_input($countries_iso_code_2) . "', countries_iso_code_3 = '" . tep_db_input($countries_iso_code_3) . "', address_format_id = '" . (int)$address_format_id . "', country_visible = '" . (int)$country_visible . "' where countries_id = '" . (int)$countries_id . "'");
- if(isset($mID) && class_exists($class)) $cfg->draw_action();
- else
- switch ($action) {
+ tep_redirect(tep_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $countries_id.'&row_by_page='.$row_by_page));
+ break;
+ case 'deleteconfirm':
+ $countries_id = tep_db_prepare_input($_GET['cID']);
- /**
- @brief save unique ligne
- */
- case 'save':
- $configuration_value = tep_db_prepare_input($_POST['configuration_value']);
- $cID = tep_db_prepare_input($_GET['cID']);
+ tep_db_query("delete from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "'");
- if( ($res=sqlconfiguration::update(array('key'=>(int)$cID , 'value'=>tep_db_input($configuration_value) ))) == false)
- $messageStack->add(SAVE_CONFIG_OK, 'success');
- else
- $messageStack->add(SAVE_CONFIG_NOT_OK, 'error');
-
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&cID=' . $cID));
+ tep_redirect(tep_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'].'&row_by_page='.$row_by_page));
break;
+ case 'list':
+ break;
+ default:
- /**
- @brief save page groupe
- */
- case 'save_mutli':
- if(tep_not_null($gID) ){
+ $address_format_query = tep_db_query("select address_format_id, address_example from " . TABLE_ADDRESS_FORMAT . " order by address_format_id");
+ $address_format_array = array();
+ while ($address_format_values = tep_db_fetch_array($address_format_query)) {
+ $address_format_array[$address_format_values['address_format_id']] = $address_format_values['address_example'] ;
+ }
+// return $address_format_array;
- $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- if(is_object($list))
- $liste[]=$list;
- else
- $liste=$list;
- foreach($liste as $row) {
-
- if(isset($_POST['configuration'][$row->key])) {
- $configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
-
- if( ($res=sqlconfiguration::update(array('key'=>$row->key , 'value'=>tep_db_input($configuration_value) ))) == false)$erreur[]=false;
- else $erreur[]=true;
-
- }
-
- }
-
- if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
- else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
-
+ $countries_query_raw = "select countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible from " . TABLE_COUNTRIES . " order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'countries_name ASC, country_visible DESC');
+ $countries_split = new splitPageResults($page, MAX_DISPLAY_ROW_BY_PAGE, $countries_query_raw, $countries_query_numrows);
+ $countries_query = tep_db_query($countries_query_raw);
+ $list_c=array();
+ while ($countries = tep_db_fetch_array($countries_query)) {
+ if ($cID == $countries['countries_id']) $cInfo = new objectInfo($countries);
+ $list_c[]=$countries;
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&cID=' . $cID));
- break;
+}
+ switch ($saction) {
+ case 'insert':
+ $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
+ $zone_code = tep_db_prepare_input($_POST['zone_code']);
+ $zone_name = tep_db_prepare_input($_POST['zone_name']);
- case 'save_grp':
- $new_grp_id = tep_db_prepare_input($_POST['new_grp_id']);
- $cID = tep_db_prepare_input($_GET['cID']);
+ tep_db_query("insert into " . TABLE_ZONES . " (zone_country_id, zone_code, zone_name) values ('" . (int)$zone_country_id . "', '" . tep_db_input($zone_code) . "', '" . tep_db_input($zone_name) . "')");
- if( ($res=sqlconfiguration::update(array('id'=>(int)$cID , 'group_id'=>tep_db_input($new_grp_id) ))) == false)
- $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
- else
- $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ tep_redirect(tep_href_link(FILENAME_ZONES, 'page=' . $_GET['page'].'&row_by_page='.$row_by_page));
+ break;
+ case 'save':
+ $zone_id = tep_db_prepare_input($_GET['cID']);
+ $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
+ $zone_code = tep_db_prepare_input($_POST['zone_code']);
+ $zone_name = tep_db_prepare_input($_POST['zone_name']);
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $new_grp_id . '&cID=' . $cID));
- break;
+ tep_db_query("update " . TABLE_ZONES . " set zone_country_id = '" . (int)$zone_country_id . "', zone_code = '" . tep_db_input($zone_code) . "', zone_name = '" . tep_db_input($zone_name) . "' where zone_id = '" . (int)$zone_id . "'");
+ tep_redirect(tep_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $zone_id.'&row_by_page='.$row_by_page));
+ break;
+ case 'deleteconfirm':
+ $zone_id = tep_db_prepare_input($_GET['cID']);
- case 'delete_confirm':
+ tep_db_query("delete from " . TABLE_ZONES . " where zone_id = '" . (int)$zone_id . "'");
- if( ($res=sqlconfiguration::delete(array('id'=>(int)$cID ))) == false)
- $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
- else
- $messageStack->add_session(SAVE_CONFIG_OK, 'success');
-
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $gparentID ));
+ tep_redirect(tep_href_link(FILENAME_ZONES, 'page=' . $_GET['page'].'&row_by_page='.$row_by_page));
break;
-
-
default:
-
- $list_edit=array();
- if(isset($mID) ){
- $cfg->load_db_values();
- }
- elseif(tep_not_null($gID) && is_numeric($gID) ){
- $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
-
- if(is_object($list))
- $liste[]=$list;
- else
- $liste=$list;
-
- foreach($liste as $row) {
-
- $cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
-
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
- else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
-
- $conf = $row;
- $row->cfgValue=$cfgValue;
- $row->value_field=$value_field;
-
- $list_edit[]=$conf;
- }
- }
-
+ $wh=(tep_not_null($cID)? " and z.zone_country_id = '".$cID."' ":'');
+ $zones_query_raw = "select z.zone_id, c.countries_id, c.countries_name, z.zone_name, z.zone_code, z.zone_country_id from " . TABLE_ZONES . " z, " . TABLE_COUNTRIES . " c where z.zone_country_id = c.countries_id ".$wh." order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'c.countries_name, z.zone_name ASC');
+ $zones_split = new splitPageResults($page, MAX_DISPLAY_ROW_BY_PAGE, $zones_query_raw, $zones_query_numrows);
+ $zones_query = tep_db_query($zones_query_raw);
+ $list_z=array();
+ while ($zones = tep_db_fetch_array($zones_query)) {
+ if ($rID == $zones['zone_id']) $cInfo = new objectInfo($zones);
+ $list_z[]=$zones;
+ }
+// break;
}
-// exit;
-
-
- $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'");
- $cfg_group = tep_db_fetch_array($cfg_group_query);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/functions/general.php
===================================================================
--- trunk/catalog/admin/includes/functions/general.php 2011-11-18 14:53:33 UTC (rev 3889)
+++ trunk/catalog/admin/includes/functions/general.php 2011-11-19 08:47:50 UTC (rev 3890)
@@ -736,7 +736,7 @@
function tep_customers_name($customers_id) { return customerUtility::customers_name($customers_id); }
-function tep_get_address_formats() { return customerUtility::address_format(); }
+function tep_get_address_formats() { return customerUtility::get_address_formats(); }
function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { return customerUtility::address_format($address_format_id, $address, $html, $boln, $eoln); }
function tep_get_zone_code($country, $zone, $def_state) { return worldUtility::get_zone_code($country, $zone, $def_state); }
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql 2011-11-18 14:53:33 UTC (rev 3889)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql 2011-11-19 08:47:50 UTC (rev 3890)
@@ -83,8 +83,8 @@
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('70', 'Faroe Islands', 'Foroyar', 'FO', 'FRO', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('71', 'Fiji', 'Fiji', 'FJ', 'FJI', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('72', 'Finland', 'Suomi', 'FI', 'FIN', '1', '1');
-insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('73', 'France', 'France', 'FR', 'FRA', '1', '1');
-insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('74', 'France, Metropolitan', 'France Metropolitaine', 'FX', 'FXX', '1', '0');
+insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('73', 'France', 'France', 'FR', 'FRA', '5', '1');
+insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('74', 'France, Metropolitan', 'France Metropolitaine', 'FX', 'FXX', '5', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('75', 'French Guiana', 'Guyane', 'GF', 'GUF', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('76', 'French Polynesia', 'Polynesie Francaise', 'PF', 'PYF', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('77', 'French Southern Territories', 'Terres Australes et Antarctiques Françaises', 'TF', 'ATF', '1', '0');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-18 14:53:40
|
Revision: 3889
http://oscss.svn.sourceforge.net/oscss/?rev=3889&view=rev
Author: oscim
Date: 2011-11-18 14:53:33 +0000 (Fri, 18 Nov 2011)
Log Message:
-----------
correction lien et module SvnUpdate
Modified Paths:
--------------
branches/2.1.0/catalog/admin/includes/content/aca.top.inc
branches/2.1.0/catalog/admin/includes/modules/generic/SvnUpdate.php
branches/2.1.0/catalog/admin/includes/widget/homeStats.php
Modified: branches/2.1.0/catalog/admin/includes/content/aca.top.inc
===================================================================
--- branches/2.1.0/catalog/admin/includes/content/aca.top.inc 2011-11-17 23:10:12 UTC (rev 3888)
+++ branches/2.1.0/catalog/admin/includes/content/aca.top.inc 2011-11-18 14:53:33 UTC (rev 3889)
@@ -35,7 +35,10 @@
@remarks
generic init in appli top
*/
- if($actions['action_type']=='generic') $aca_modules=$generic_modules;
+ if($actions['action_type']=='generic'){
+ $aca_modules=$generic_modules;
+ $post_exe=true;
+ }
/**
@remarks Init class type pages for call methode no static
Modified: branches/2.1.0/catalog/admin/includes/modules/generic/SvnUpdate.php
===================================================================
--- branches/2.1.0/catalog/admin/includes/modules/generic/SvnUpdate.php 2011-11-17 23:10:12 UTC (rev 3888)
+++ branches/2.1.0/catalog/admin/includes/modules/generic/SvnUpdate.php 2011-11-18 14:53:33 UTC (rev 3889)
@@ -70,7 +70,7 @@
else $svnupdate=(int)$_SESSION['svnupdate'];
if($svnupdate==1) {
- $messageStack->add( __("mise a jour disponible ").'<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form').'">'.__('detail').'</a>', 'info' ) ;
+ $messageStack->add( __("mise a jour disponible ").'<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('detail').'</a>', 'info' ) ;
}
}
@@ -89,7 +89,7 @@
@author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
public function _add_menu() {
- return('<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form').'">'.__('Svn synchro').'</a>');
+ return('<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('Svn synchro').'</a>');
}
/**
@@ -244,6 +244,7 @@
'<comments>'.sprintf(__("installation automatisé patch mise à jour, generer par le module SvnUpdate; Vou permet de reappliquer ou recuprer les elements de mise à jour entre ces version : avant patch %s, revision patch %s"), $corre_rev,$curent_rev) .'</comments>'."\n".
'<credits>'.self::$code.'</credits>'."\n".
'<version>'.$this->version.'</version>'."\n".
+ '<template_admin>oscss</template_admin>'."\n".
'<post_install_notes><![CDATA['."\n".
__("fichier creer dynamiquement. les mises à jour ne concerne que les fichier, la base de donnée n'est pas modifié")."\n".
']]></post_install_notes>'."\n".
Modified: branches/2.1.0/catalog/admin/includes/widget/homeStats.php
===================================================================
--- branches/2.1.0/catalog/admin/includes/widget/homeStats.php 2011-11-17 23:10:12 UTC (rev 3888)
+++ branches/2.1.0/catalog/admin/includes/widget/homeStats.php 2011-11-18 14:53:33 UTC (rev 3889)
@@ -41,7 +41,7 @@
<h3><?php echo __('main info') ;?></h3>
<dl>
<dt><?php echo __('text oscss version') ;?></dt>
- <dd><?php echo PROJECT_VERSION ;?> - <a href="<?php echo tep_href_link(FILENAME_ACA,'action_type=generic&action_class=SvnUpdate&action_method=draw_form') ?>"><?php echo __('Check for upgrade') ?></a></dd>
+ <dd><?php echo PROJECT_VERSION ;?> - <a href="<?php echo tep_href_link(FILENAME_ACA,'action_type=generic&action_class=SvnUpdate&action_method=draw_form&action_type=generic') ?>"><?php echo __('Check for upgrade') ?></a></dd>
<dt><?php echo __('environment') ;?></dt>
<dd>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-17 23:10:18
|
Revision: 3888
http://oscss.svn.sourceforge.net/oscss/?rev=3888&view=rev
Author: oscim
Date: 2011-11-17 23:10:12 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
correction chemin et utilisation des modele email du frontoffice
ajustement des chemin dans le template, sur /includes/modeles/email
Corretion liens vers upgrade
Correction template
Modified Paths:
--------------
trunk/catalog/admin/includes/widget/homeStats.php
trunk/catalog/includes/functions/general.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php
Modified: trunk/catalog/admin/includes/widget/homeStats.php
===================================================================
--- trunk/catalog/admin/includes/widget/homeStats.php 2011-11-17 15:37:26 UTC (rev 3887)
+++ trunk/catalog/admin/includes/widget/homeStats.php 2011-11-17 23:10:12 UTC (rev 3888)
@@ -1,9 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9h
- @date 06/06/10, 15:45
+ @version 2.1.1
+ @date 17/11/11, 23:57
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -41,7 +42,7 @@
<h3><?php echo __('main info') ;?></h3>
<dl>
<dt><?php echo __('text oscss version') ;?></dt>
- <dd><?php echo PROJECT_VERSION ;?> - <a href="<?php echo tep_href_link(FILENAME_ACA,'action_type=generic&action_class=SvnUpdate&action_method=draw_form') ?>"><?php echo __('Check for upgrade') ?></a></dd>
+ <dd><?php echo PROJECT_VERSION ;?> - <a href="<?php echo tep_href_link(FILENAME_ACA,'aca.php?action_type=generic&action_class=SvnUpdate&action_method=draw_form&action_type=generic') ?>"><?php echo __('Check for upgrade') ?></a></dd>
<dt><?php echo __('environment') ;?></dt>
<dd>
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2011-11-17 15:37:26 UTC (rev 3887)
+++ trunk/catalog/includes/functions/general.php 2011-11-17 23:10:12 UTC (rev 3888)
@@ -899,66 +899,67 @@
$from_email_adress The eMail address of the sender,
e.g. in...@my...
*/
-function tep_mail($to_name, $to_email_address, $email_subject, $email_array, $from_email_name, $from_email_address) {
+function tep_post_prepare_email($gabarit_template,$language,$myarray,$print=false){
+ global $title_email,$messageStack,$page;
- if (!_cst_bool('SEND_EMAILS')) return false;
- // Instantiate a new mail object
- $message = new PHPMailer();
+ $gabarit_template=(tep_not_null($gabarit_template))? $gabarit_template : 'defaut.tpl' ;
- if (EMAIL_TRANSPORT == 'smtp'){
- $message->IsSMTP(); // telling the class to use SMTP
+ if ( ($template=page::TestFile(DIR_FS_ROOT_DOCS.DIR_MODELES . 'email/'.USE_MODELE_EMAIL.'/publicCustomers/'.$gabarit_template)) !=false)
+ $new_file=DIR_FS_ROOT_DOCS.DIR_MODELES . 'email/'.USE_MODELE_EMAIL.'/publicCustomers/'.$gabarit_template;
+ elseif ( ($template=page::TestFile(DIR_FS_CATALOG.$page->getPathTemplate().DIR_MODELES . 'email/'.$gabarit_template)) !=false)
+ $new_file=$page->getPathTemplate().DIR_MODELES . 'email/'.$gabarit_template;
+ elseif ( ($template=page::TestFile(DIR_FS_ROOT_DOCS.DIR_MODELES . 'email/'.USE_MODELE_EMAIL.'/publicCustomers/'.'defaut.tpl')) !=false)
+ $new_file=DIR_FS_ROOT_DOCS.DIR_MODELES . 'email/'.USE_MODELE_EMAIL.'/publicCustomers/'.'defaut.tpl';
+ elseif ( ($template=page::TestFile(DIR_FS_CATALOG.$page->getPathTemplate().DIR_MODELES . 'email/'.'defaut.tpl')) !=false)
+ $new_file=$page->getPathTemplate().DIR_MODELES . 'email/'.'defaut.tpl';
+ else
+ trigger_error(sprintf(__FUNCTION__.'Mailer template error no found : %s', $gabarit_template), E_USER_ERROR);
- if( !tep_not_null($from_email_address) ) $from_email_address = SMTP_SENDMAIL_FROM;
- if( !tep_not_null($from_email_name) ) $from_email_name = SMTP_FROMEMAIL_NAME;
- // Config
- $message->Host = SMTP_MAIL_SERVER; // SMTP server
- }else{
- $message->IsSendmail();
-// $mail->Sendmail ='/usr/sbin/sendmail';
- //////(EMAIL_TRANSPORT == 'sendmail')
- //////You need to implement here if you are using sendmail
- if(empty($from_email_address))$from_email_address=EMAIL_FROM;
- if(empty($from_email_name))$from_email_name=STORE_OWNER;
- }
+ $file = basename($new_file);
+ if ( ($fileLang=page::fix_file(DIR_FS_CATALOG.DIR_WS_LANGUAGES . $language .'/modeles/email/'.USE_MODELE_EMAIL.'/'.substr($file, 0, strlen($file)-4) .'.txt')) !=false)
+ include($fileLang);
+ elseif ( ($fileLang=page::fix_file(DIR_FS_CATALOG.$page->getPathTemplate().DIR_MODELES . 'email/'.substr($file, 0, strlen($file)-4) .'.txt')) !=false)
+ include($fileLang);
+ $title_email=$lang['EMAIL_TEXT_SUBJECT'];
+ if(!defined('EMAIL_TEXT_SUBJECT'))define('EMAIL_TEXT_SUBJECT',$lang['EMAIL_TEXT_SUBJECT']);
- $message->From = $from_email_address;
- $message->FromName = $from_email_name;
+ $tpl = &Template::singleton();
- $message->CharSet = strtoupper(CHARSET );
+ $myarray['br']="\n";
+ if (!empty($tpl->error)) {
+ trigger_error(sprintf(__FUNCTION__.'Mailer template error: %s', $message->ErrorInfo), E_USER_ERROR);
+ return false;
+ }
+ $tpl->template_dir = dirname($new_file).'/';
+ $tpl->assign("STORE_LOGO_PRINT",STORE_LOGO_PRINT);
+ $tpl->assign("DIR_WS_CATALOG", DIR_WS_CATALOG);
+ $tpl->assign("HTTP_SERVER", HTTP_SERVER);
+ $tpl->assign("DIR_WS_IMAGES", DIR_WS_IMAGES.'mail/');
+ $tpl->assign("DIR_WS_LANGUAGES", DIR_WS_LANGUAGES);
+ $tpl->assign("CHARSET", CHARSET);
+ $tpl->assign("STORE_NAME", STORE_NAME);
+ $tpl->assign("myarray", $myarray);
+ $tpl->assign("TPL_CONTENT", addslashes($myarray['message']));
+ if (isset($lang) && is_array($lang))$tpl->assign("lg", $lang);
- if( !tep_not_null($to_name) ) $to_name = '';
+ if (!empty($tpl->error)) {
+ trigger_error(sprintf(__FUNCTION__.'Mailer template error: %s', $message->ErrorInfo), E_USER_ERROR);
+ return false;
+ }
- if( !tep_not_null($to_email_address) ) return false;
+ if(!$print) {
+ $mess['html']=$tpl->get($file);
+ // force calcul txt
+ $myarray['email_use_html']=false;
+ $tpl->assign("myarray", $myarray);
- $message->AddAddress($to_email_address, $to_name);
- $message->Subject = $email_subject;
+ $mess['text']=$tpl->get($file);
- ///retro compatibilité
- if(!is_array($email_array)) $email_array=array('text'=>$email_array, 'html'=>$email_array);
-
- // Build the text version
- $text = str_replace( array('<br>','<br />','<br/>', ' ','€'), array("\n","\n",' ','euro'),$email_array['text']);
- $text = strip_tags(html_entity_decode($text ,ENT_QUOTES ));
-// $text = iconv ( 'ISO-8859-1',strtoupper(CHARSET ), strip_tags(html_entity_decode($text ,ENT_QUOTES, strtoupper(CHARSET ) ) ,"\n\r"));
-
- if (EMAIL_USE_HTML == 'true') {
- $message->Body = $email_array['html'];// tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $email_text);
- $message->AltBody = $text;
- $message->IsHTML(true);
- } else {
- $message->Body = $text;
- $message->IsHTML(false);
- }
-
- // Send message
- if(!$message->Send()){
- trigger_error(sprintf(__FUNCTION__.'Mailer error: %s', $message->ErrorInfo), E_USER_ERROR);
- return false;
- }
- else return true;
-
+ return $mess;
+ }
+ else return $tpl->display($file);
}
/**
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php 2011-11-17 15:37:26 UTC (rev 3887)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php 2011-11-17 23:10:12 UTC (rev 3888)
@@ -28,7 +28,7 @@
?>
-<!-- <h3><?php echo HEADING_RETURNING_CUSTOMER; ?></h3> -->
+<!-- <h3><?php //echo HEADING_RETURNING_CUSTOMER; ?></h3> -->
<?php echo tep_draw_form('login_form', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php 2011-11-17 15:37:26 UTC (rev 3887)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php 2011-11-17 23:10:12 UTC (rev 3888)
@@ -104,7 +104,7 @@
<?php endwhile; ?>
</article>
<?php endif; ?>
- <hr class="clear" />
+ <br class="clear" />
</div>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-17 15:37:32
|
Revision: 3887
http://oscss.svn.sourceforge.net/oscss/?rev=3887&view=rev
Author: oscim
Date: 2011-11-17 15:37:26 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Report et ajustement var conf use_modele_pdf
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/emailUtility.php
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
trunk/catalog/install/includes/content/core.update.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
Added Paths:
-----------
trunk/catalog/admin/includes/languages/fr_FR/modeles/pdf/
trunk/catalog/admin/includes/languages/fr_FR/modeles/pdf/harry/
Removed Paths:
-------------
trunk/catalog/admin/includes/languages/fr_FR/modules/template_pdf/
Modified: trunk/catalog/admin/includes/classes/emailUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/emailUtility.php 2011-11-17 15:08:16 UTC (rev 3886)
+++ trunk/catalog/admin/includes/classes/emailUtility.php 2011-11-17 15:37:26 UTC (rev 3887)
@@ -10,6 +10,7 @@
@class emailUtility
*/
+
class emailUtility {
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 2011-11-17 15:08:16 UTC (rev 3886)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2011-11-17 15:37:26 UTC (rev 3887)
@@ -11,6 +11,7 @@
$lang['USE_LOCAL_GENERAT_PDF_S']="Generation des pdf(commande/BL..)" ;
$lang['USE_LOCAL_GENERAT_PDF_L']="Utiliser un outils externe pour la generation des document pdf, disponible coté public et privé" ;
+$lang['USE_MODELE_PDF_S']="Choix du modele de gabarit a utiliser" ;
+$lang['USE_MODELE_PDF_L']="Vous Pouver ajouter et modifier les modeles dans Documents" ;
-
?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/content/core.update.php
===================================================================
--- trunk/catalog/install/includes/content/core.update.php 2011-11-17 15:08:16 UTC (rev 3886)
+++ trunk/catalog/install/includes/content/core.update.php 2011-11-17 15:37:26 UTC (rev 3887)
@@ -12,7 +12,7 @@
Utilise l'exporte n zip de trac
*/
-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_ORG_TRAC', 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=branches%2F2.1.0%2Fcatalog&old_path=branches%2F2.1.0%2Fcatalog');
define('URL_OSCSS_GET_REV', 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision');
define('PATH_SVN_BRANCHE', 'trunk/catalog/');
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-17 15:08:16 UTC (rev 3886)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-17 15:37:26 UTC (rev 3887)
@@ -341,10 +341,10 @@
-- 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', '10', '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');
-
-- 129 option orders
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-17 15:08:31
|
Revision: 3886
http://oscss.svn.sourceforge.net/oscss/?rev=3886&view=rev
Author: oscim
Date: 2011-11-17 15:08:16 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Evolution structurel sur la position hierarchique du nouveau dossier modeles, qui rassemble les modeles de document / pdf / emails
Ajout d'un choix de modele dans la configuration des emails
Deport des fichiers ex template_email et template_pdf vers leur nouveau dossier
Ajustement structurel de la class emailUtility de l'admin pour la prise en charge de cette nouvelle forme
Ajout variable de configuration supplementaire et ajustement modconfiguration
Ajout d'un DIR_MODELES dans les configures
Ajout d'un modele "mouton" modele par defaut des emails
Deplacement des fichiers de langue dans un dossier modeles , dans les dossiers de langues principaux (admin et public) et report de "mouton" et "harry"
Ajout d'un modele pour les pdf "harry" modele par default des pdf
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/emailUtility.php
trunk/catalog/admin/includes/functions/lib.configuration.php
trunk/catalog/admin/includes/gabarit/configuration/modmail.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modmail.txt
trunk/catalog/admin/includes/modules/configuration/modmail.php
trunk/catalog/install/includes/modele/admin_configure.txt
trunk/catalog/install/includes/modele/configure.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
Added Paths:
-----------
trunk/catalog/Documents/modeles/
trunk/catalog/Documents/modeles/email/
trunk/catalog/Documents/modeles/email/mouton/
trunk/catalog/Documents/modeles/email/mouton/adminUser/
trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_account.tpl
trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members.tpl
trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members_new.tpl
trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_relance_order.tpl
trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_update_order.tpl
trunk/catalog/Documents/modeles/email/mouton/adminUser/footer.inc
trunk/catalog/Documents/modeles/email/mouton/adminUser/header.inc
trunk/catalog/Documents/modeles/email/mouton/adminUser/headernologo.inc
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/checkout_process.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account_confirm.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/defaut.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/header.inc
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/held_orders.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/mail.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/newsletter.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/orders.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/password_forgotten.tpl
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/recover_cart_sales.tpl
trunk/catalog/Documents/modeles/pdf/
trunk/catalog/Documents/modeles/pdf/harry/
trunk/catalog/Documents/modeles/pdf/harry/adminUser/
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/.htaccess
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/index.html
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/invoice.php
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/packingslip.php
trunk/catalog/admin/includes/languages/fr_FR/modeles/
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/admin_account.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/admin_members.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/admin_members_new.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/defaut.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/held_orders.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/index.html
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/mail.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/newsletter.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/orders.txt
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/recover_cart_sales.txt
trunk/catalog/includes/languages/fr_FR/modeles/
trunk/catalog/includes/languages/fr_FR/modeles/email/
trunk/catalog/includes/languages/fr_FR/modeles/email/mouton/
trunk/catalog/includes/languages/fr_FR/modeles/pdf/
trunk/catalog/includes/languages/fr_FR/modeles/pdf/harry/
Removed Paths:
-------------
trunk/catalog/admin/includes/languages/fr_FR/modules/template_email/
trunk/catalog/admin/includes/modules/template_email/add_customer.tpl
trunk/catalog/admin/includes/modules/template_email/admin_account.tpl
trunk/catalog/admin/includes/modules/template_email/admin_members.tpl
trunk/catalog/admin/includes/modules/template_email/admin_members_new.tpl
trunk/catalog/admin/includes/modules/template_email/cron_relance_order.tpl
trunk/catalog/admin/includes/modules/template_email/cron_update_order.tpl
trunk/catalog/admin/includes/modules/template_email/footer.inc
trunk/catalog/admin/includes/modules/template_email/header.inc
trunk/catalog/admin/includes/modules/template_email/headernologo.inc
trunk/catalog/admin/includes/modules/template_email/held_orders.tpl
trunk/catalog/admin/includes/modules/template_email/mail.tpl
trunk/catalog/admin/includes/modules/template_email/newsletter.tpl
trunk/catalog/admin/includes/modules/template_email/recover_cart_sales.tpl
trunk/catalog/includes/languages/fr_FR/modules/template_email/
trunk/catalog/includes/languages/fr_FR/modules/template_pdf/
trunk/catalog/includes/modules/template_email/checkout_process.tpl
trunk/catalog/includes/modules/template_email/create_account.tpl
trunk/catalog/includes/modules/template_email/create_account_confirm.tpl
trunk/catalog/includes/modules/template_email/defaut.tpl
trunk/catalog/includes/modules/template_email/footer.inc
trunk/catalog/includes/modules/template_email/header.inc
trunk/catalog/includes/modules/template_email/orders.tpl
trunk/catalog/includes/modules/template_email/password_forgotten.tpl
trunk/catalog/includes/modules/template_pdf/
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_account.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_account.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_account.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,36 @@
+{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}
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.ADMIN_EMAIL_TEXT_BONOUR} : {$myarray.admin_firstname}
+
+{$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
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,39 @@
+{if $myarray.email_use_html}
+ {include "header.inc"}
+
+ <div id="content">
+ <p>{$lg.ADMIN_EMAIL_TEXT_BONJOUR} : {$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>
+ <p>{$lg.ADMIN_EMAIL_URL_OPENID} : {$myarray.url_openid}</p>
+ {$TPL_CONTENT}
+ </div>
+
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.ADMIN_EMAIL_TEXT_BONJOUR} : {$myarray.admin_firstname}
+
+ {$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
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members_new.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members_new.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/admin_members_new.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,36 @@
+{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}
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.ADMIN_EMAIL_TEXT_BONOUR} : {$myarray.admin_firstname}
+
+{$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
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_relance_order.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_relance_order.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_relance_order.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,16 @@
+{if $myarray.email_use_html}
+
+ {include "header.inc"}
+ <div id="content">
+ {$TPL_CONTENT}
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$TPL_CONTENT}
+{/if}
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_update_order.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_update_order.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/cron_update_order.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,16 @@
+{if $myarray.email_use_html}
+
+ {include "header.inc"}
+ <div id="content">
+ {$TPL_CONTENT}
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$TPL_CONTENT}
+{/if}
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/footer.inc
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/footer.inc (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/footer.inc 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,14 @@
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p style="text-align:center;">{$lg.EMAIL_TEXT_FOOTER_LG1}</p>
+ <div id="usage"></div>
+ <div id="lience"></div>
+ </td>
+ </tr>
+</table>
+</div>
\ No newline at end of file
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/header.inc
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/header.inc (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/header.inc 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,13 @@
+<div style="color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;margin:0;padding:0;">
+<table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
+ <tr>
+ <td align="center" valign="top"><!-- [ header starts here] -->
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
+ <tr>
+ <td valign="top"><a href="{$HTTP_CATALOG_SERVER}{$DIR_WS_CATALOG}" ><img src="{$HTTP_CATALOG_SERVER}{$DIR_WS_CATALOG}{$STORE_LOGO_PRINT}" alt="{$STORE_NAME}" /></a> </td>
+ </tr>
+ </table>
+<!-- [ middle starts here] -->
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
+ <tr>
+ <td valign="top">
\ No newline at end of file
Added: trunk/catalog/Documents/modeles/email/mouton/adminUser/headernologo.inc
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/adminUser/headernologo.inc (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/adminUser/headernologo.inc 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,8 @@
+<div style="color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;margin:0;padding:0;">
+<table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
+ <tr>
+ <td align="center" valign="top"><!-- [ header starts here] -->
+<!-- [ middle starts here] -->
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
+ <tr>
+ <td valign="top">
\ No newline at end of file
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/add_customer.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,36 @@
+{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}
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.ADMIN_EMAIL_TEXT_BONOUR} : {$myarray.admin_firstname}
+
+{$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
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/checkout_process.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/checkout_process.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/checkout_process.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,116 @@
+{if $myarray.email_use_html}
+{include "header.inc"}
+ <p> <strong>{$lg.EMAIL_TEXT_HELLO}</strong>,<br/>
+ {$lg.EMAIL_TEXT_INTRO}
+ {$lg.EMAIL_TEXT_INTRO_2} <a href="{$HTTP_SERVER}{$DIR_WS_CATALOG}/login.php"> {$lg.EMAIL_TEXT_ACCOUNT}</a> <br />
+ <a href="mailto:{$STORE_OWNER}" style="color:#1E7EC8;">{$STORE_OWNER}</a>
+ </p>
+ <h3 style="border-bottom:2px solid #eee; font-size:1.05em; padding-bottom:1px; ">{$lg.EMAIL_TEXT_ORDER_NUMBER} {$myarray._oID} </h3><small> {$myarray.date_purchased}</small>
+
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <thead>
+ <tr>
+ <th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;"> {$lg.EMAIL_TEXT_BILLING_ADDRESS}</th>
+ <th width="3%"></th>
+ <th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;">{$lg.EMAIL_TEXT_DELIVERY_ADDRESS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;"> {$myarray.billToFormatted} </td>
+ <td> </td>
+ <td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;">{$myarray.sendToFormatted}</td>
+ </tr>
+ </tbody>
+ </table>
+ <br/>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <thead>
+ <tr>
+ <th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;"> {$lg.EMAIL_TEXT_PAYMENT_METHOD}</th>
+ <th width="3%"></th>
+ <th align="left" width="48.5%" bgcolor="#d9e5ee" style="padding:5px 9px 6px 9px; border:1px solid #bebcb7; border-bottom:none; line-height:1em;">{$lg.EMAIL_TEXT_SHIPPING_METHOD}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;"> {$myarray.payment_} </td>
+ <td> </td>
+ <td valign="top" style="padding:7px 9px 9px 9px; border:1px solid #bebcb7; border-top:0; background:#f8f7f5;">{$myarray.shipping_}</td>
+ </tr>
+ </tbody>
+ </table>
+ <br/>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #bebcb7; background:#f8f7f5;">
+ <thead>
+ <tr>
+ <th align="left" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_PRODUCTS}</th>
+ <th align="left" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_MODEL}</th>
+ <th align="center" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_QTY}</th>
+ <th align="right" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_PRICE}</th>
+ <th align="right" bgcolor="#d9e5ee" style="padding:3px 9px">{$lg.EMAIL_TEXT_SUBTOTAL}</th>
+ </tr>
+ </thead>
+ <tbody bgcolor="#eeeded">
+ {loop $iterator=$myarray.order_products}
+ <tr>
+ <td align="left" valign="top" style="padding:3px 9px"> <strong>{$iterator.name}</strong> </td>
+ <td align="left" valign="top" style="padding:3px 9px">{$iterator.model}</td>
+ <td align="center" valign="top" style="padding:3px 9px">{$iterator.qty}</td>
+ <td align="right" valign="top" style="padding:3px 9px"><span class="price">{$iterator.final_price_ttc}</span></td>
+ <td align="right" valign="top" style="padding:3px 9px"><span class="price">{$iterator.total_line_ttc}</span></td>
+ </tr>
+ {/loop}
+ </tbody>
+ <tfoot>
+ {loop $iterator=$myarray.order_totals}
+ <tr>
+ <td colspan="4" align="right" style="padding:3px 9px">{$iterator.title}</td>
+ <td align="right" style="padding:3px 9px"><span class="price">{$iterator.text}</span></td>
+ </tr>
+ {/loop}
+ </tfoot>
+ </table>
+ {include "footer.inc"}
+{else}
+
+ {$lg.STORE_NAME}
+ {$lg.EMAIL_SEPARATOR}{$myarray.br}{$myarray.br}
+
+ {$lg.EMAIL_TEXT_ORDER_NUMBER} : {$myarray._oID} {$myarray.br}
+ {$lg.EMAIL_TEXT_INVOICE_URL} {$myarray._oLinks} {$myarray.br}
+ {$lg.EMAIL_TEXT_DATE_ORDERED} {$myarray.date_purchased} {$myarray.br}
+
+
+ {$lg.EMAIL_SEPARATOR}{$myarray.br}{$myarray.br}
+
+ {$lg.EMAIL_TEXT_DELIVERY_ADDRESS} {$myarray.billToFormatted} {$myarray.br}
+ {$lg.EMAIL_TEXT_PAYMENT_METHOD} {$myarray.payment_} {$myarray.br}
+
+ {$lg.EMAIL_SEPARATOR} {$myarray.br}{$myarray.br}
+
+ {loop $iterator=$myarray.order_products}
+ {$lg.EMAIL_TEXT_PRODUCTS} : {$iterator.name} {$myarray.br}
+ {$lg.EMAIL_TEXT_MODEL} : {$iterator.model}{$myarray.br}
+ {$lg.EMAIL_TEXT_QTY} : {$iterator.qty}{$myarray.br}
+ {$lg.EMAIL_TEXT_SUBTOTAL} : {$iterator.final_price}{$myarray.br}
+ {/loop}
+
+{$myarray.br}
+ {$lg.EMAIL_SEPARATOR}{$myarray.br}{$myarray.br}
+
+ {loop $iterator=$myarray.order_totals}
+ {$iterator.title} {$iterator.text} {$myarray.br}
+ </tr>
+ {/loop}
+
+ {$lg.EMAIL_SEPARATOR}{$myarray.br}
+
+ {$myarray._comments} {$myarray.br}
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.EMAIL_TEXT_INVOICE_FOOTER_LG1}
+{/if}
+
+
+
+
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,15 @@
+{if $myarray.email_use_html}
+{include "header.inc"}
+ <div id="content" style="margin:0;padding:0;">
+ <p>{$lg.EMAIL_WELCOME} {$myarray.db.entry_firstname} {$myarray.db.entry_lastname}</p>
+ <p>{$lg.EMAIL_TEXT}</p>
+ <p>{$lg.EMAIL_WARNING} </p>
+ </div>
+ {include "footer.inc"}
+{else}
+ {$lg.EMAIL_WELCOME} {$myarray.db.entry_firstname} {$myarray.db.entry_lastname}
+ {$lg.EMAIL_TEXT}
+ {$lg.$myarray._oLinks}
+ {$lg.EMAIL_WARNING}
+{/if}
+
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account_confirm.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account_confirm.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/create_account_confirm.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,19 @@
+{if $myarray.email_use_html}
+{include "header.inc"}
+ <div id="content" style="margin:0;padding:0;">
+
+ <p>{$lg.EMAIL_WELCOME} {$myarray.db.entry_firstname} {$myarray.db.entry_lastname}</p>
+ <p><a href="{$myarray._oLinks}">{$lg.EMAIL_TEXT_LINK_CONFIRM} {$myarray._oLinks}</a>
+ <p>{$lg.EMAIL_TEXT}</p>
+ <p>{$lg.EMAIL_WARNING} </p>
+ </div>
+ {include "footer.inc"}
+{else}
+
+ {$lg.EMAIL_WELCOME} {$myarray.db.entry_firstname} {$myarray.db.entry_lastname}
+ {$myarray._oLinks}
+ {$lg.EMAIL_TEXT}
+ {$lg.$myarray._oLinks}
+ {$lg.EMAIL_WARNING}
+{/if}
+
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/defaut.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/defaut.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/defaut.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,11 @@
+{if $myarray.email_use_html}
+
+{include "header.inc"}
+<div id="content">
+{$myarray.message}
+</div>
+{include "footer.inc"}
+
+{else}
+{$myarray.message}
+{/if}
\ No newline at end of file
Property changes on: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/defaut.tpl
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,11 @@
+ <br/>
+ <p><a href="http://www.oscss.org">Get your <strong>osCSS team</strong></a><br>
+ By <a href="http://www.oscim.fr">Oscim</a> for <strong>osCSS team</strong>
+ <p>Thank you again,<br/> Supporté par <strong><a href="http://www.oscss.org">osCSS-2</a></strong></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</div>
\ No newline at end of file
Property changes on: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/header.inc
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/header.inc (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/header.inc 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,15 @@
+<style type="text/css">body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }</style>
+<div style="font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;">
+ <table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
+ <tr>
+ <td align="center" valign="top">
+ <!-- [ header starts here] -->
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
+ <tr>
+ <td valign="top"><a href="{$HTTP_SERVER}{$DIR_WS_CATALOG}" ><img src="{$HTTP_SERVER}{$DIR_WS_CATALOG}{$STORE_LOGO_PRINT}" alt="{$STORE_NAME}" style="margin-bottom:10px;" border="0" /></a></td>
+ </tr>
+ </table>
+ <!-- [ middle starts here] -->
+ <table cellspacing="0" cell="0" padding="0" border="0" width="650">
+ <tr>
+ <td valign="top">
\ No newline at end of file
Property changes on: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/header.inc
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/held_orders.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/held_orders.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/held_orders.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,32 @@
+{if $myarray.email_use_html}
+
+ {include "header.inc"}
+ <div id="content">
+ <p>{$lg.EMAIL_TEXT_ORDER_NUMBER} {$myarray._oID}</p>
+ <p>{$lg.EMAIL_TEXT_INVOICE_URL_VIEW} <a href="{$myarray._oLinks}"> {$lg.EMAIL_TEXT_INVOICE}</a></p>
+ <br />
+ <p>{$lg.EMAIL_TEXT_ORDER_NUMBER} {$myarray._oID}</p>
+ <p>{$lg.EMAIL_TEXT_DATE_ORDERED} {$myarray.date_purchased}</p>
+ <p>{$myarray.notify_comments}</p>
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$lg.EMAIL_TEXT_ORDER_NUMBER}{$myarray._oID}
+
+ {$lg.EMAIL_TEXT_INVOICE_URL} {$myarray._oLinks}
+
+ {$lg.EMAIL_TEXT_DATE_ORDERED} {$myarray.date_purchased}
+
+ {$lg.EMAIL_TEXT_STATUS_UPDATE} {$myarray._ostatus}
+
+ {$myarray.notify_comments}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.EMAIL_TEXT_INVOICE_FOOTER_LG1}
+{/if}
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/mail.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/mail.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/mail.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,18 @@
+{if $myarray.email_use_html}
+ {include "header.inc"}
+ <div id="content">
+ <p> {$lg.STORE_NAME}</p>
+ <div> {$myarray.message}</div>
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$myarray.message}
+
+ {$lg.EMAIL_SEPARATOR}
+
+{/if}
\ No newline at end of file
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/newsletter.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/newsletter.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/newsletter.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,21 @@
+{if $myarray.email_use_html}
+ {$myarray.tpl_link_trace}
+ {$myarray.email_use_link_online}
+ {include "headernologo.inc"}
+
+ <div id="content">
+ {$TPL_CONTENT}
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$TPL_CONTENT}
+
+ {$lg.EMAIL_SEPARATOR}
+
+{/if}
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/orders.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/orders.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/orders.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,33 @@
+{if $myarray.email_use_html}
+
+ {include "header.inc"}
+ <div id="content">
+ <p>{$lg.EMAIL_TEXT_ORDER_NUMBER} {$myarray._oID}</p>
+ <p>{$lg.EMAIL_TEXT_INVOICE_URL_VIEW} <a href="{$myarray._oLinks}"> {$lg.EMAIL_TEXT_INVOICE}</a></p>
+ <br />
+ <p>{$lg.EMAIL_TEXT_ORDER_NUMBER} {$myarray._oID}</p>
+ <p>{$lg.EMAIL_TEXT_DATE_ORDERED} {$myarray.date_purchased}</p>
+ <p> {$lg.EMAIL_TEXT_STATUS_UPDATE} {$myarray._ostatus}</p>
+ <p>{$myarray.notify_comments}</p>
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$lg.EMAIL_TEXT_ORDER_NUMBER}{$myarray._oID}
+
+ {$lg.EMAIL_TEXT_INVOICE_URL} {$myarray._oLinks}
+
+ {$lg.EMAIL_TEXT_DATE_ORDERED} {$myarray.date_purchased}
+
+ {$lg.EMAIL_TEXT_STATUS_UPDATE} {$myarray._ostatus}
+
+ {$myarray.notify_comments}
+
+ {$lg.EMAIL_SEPARATOR}
+ {$lg.EMAIL_TEXT_INVOICE_FOOTER_LG1}
+{/if}
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/password_forgotten.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/password_forgotten.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/password_forgotten.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,33 @@
+{if $myarray.email_use_html}
+{include "header.inc"}
+ <div id="content" style="margin:0;padding:0;">
+ <p>{$lg.EMAIL_WELCOME} {$myarray.db.entry_firstname}</p>
+ <p>{$lg.EMAIL_WELCOME_TEXT}</p>
+ <p><a href="{$myarray._oLinks}">{$lg.EMAIL_TEXT_LINK_CONFIRM} {$myarray._oLinks}</a>
+ <p>{$lg.EMAIL_TEXT}</p>
+ <ul>
+ <li>{$lg.EMAIL_TEXT_LOGIN} {$myarray.db.customers_email_address}</li>
+ <li>{$lg.EMAIL_TEXT_PASS} {$myarray.db.password}</li>
+ </ul>
+ <p>{$lg.EMAIL_WARNING} </p>
+ </div>
+ {include "footer.inc"}
+{else}
+
+ {$lg.EMAIL_WELCOME} {$myarray.db.entry_firstname}
+
+ {$lg.EMAIL_WELCOME_TEXT}
+
+ {$lg.EMAIL_TEXT_LINK_CONFIRM} {$myarray._oLinks}
+
+ {$lg.EMAIL_TEXT}
+
+ {$lg.EMAIL_TEXT_LOGIN} {$myarray.db.customers_email_address}
+
+ {$lg.EMAIL_TEXT_PASS} {$myarray.db.password}
+
+ {$lg.$myarray._oLinks}
+
+ {$lg.EMAIL_WARNING}
+{/if}
+
Added: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/recover_cart_sales.tpl
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/recover_cart_sales.tpl (rev 0)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/recover_cart_sales.tpl 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,31 @@
+{if $myarray.email_use_html}
+
+ {include "header.inc"}
+ <div id="content">
+ <p>{$lg.EMAIL_TEXT_1} </p>
+ <p>{$lg.EMAIL_TEXT_2} </p>
+ <p>{$lg.EMAIL_TEXT_ACCOUNT} <a href="{$myarray.links_account}"> {$lg.EMAIL_TEXT_MY_ACCOUNT}</a></p>
+ <p>{$lg.EMAIL_TEXT_3} {$myarray.mline}</p>
+ <br />
+ <p>{$lg.EMAIL_TEXT_4} </p>
+ </div>
+ {include "footer.inc"}
+
+{else}
+
+ {$lg.STORE_NAME}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$lg.EMAIL_TEXT_1}
+
+ {$lg.EMAIL_TEXT_2}
+
+ {$lg.EMAIL_TEXT_ACCOUNT} {$myarray.links_account}
+
+ {$lg.EMAIL_TEXT_3} {$myarray.mline}
+
+ {$lg.EMAIL_SEPARATOR}
+
+ {$lg.EMAIL_TEXT_4}
+{/if}
Copied: trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/.htaccess (from rev 3877, trunk/catalog/includes/modules/template_pdf/.htaccess)
===================================================================
--- trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/.htaccess (rev 0)
+++ trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/.htaccess 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,2 @@
+order deny,allow
+deny from all
\ No newline at end of file
Copied: trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/index.html (from rev 3877, trunk/catalog/includes/modules/template_pdf/index.html)
===================================================================
--- trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/index.html (rev 0)
+++ trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/index.html 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>.</title>
+</head>
+<body>
+.
+</body>
+</html>
\ No newline at end of file
Copied: trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/invoice.php (from rev 3877, trunk/catalog/includes/modules/template_pdf/invoice.php)
===================================================================
--- trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/invoice.php (rev 0)
+++ trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/invoice.php 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,213 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.0.9
+ @date 16/06/10, 10:54
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$le_Y=0;
+$marge_block=3;
+$padding_block=5;
+// Add the first page
+$pdf->AddPage();
+
+/**
+Ligne + titre doc
+*/
+$pdf->Cell(50);
+$pdf->SetY(60);
+$pdf->SetDrawColor(153,153,153);
+$pdf->Cell(15,.1,'',1,1,'L',1);
+$pdf->SetFont('Arial','BI',15);
+$pdf->SetTextColor(153,153,153);
+$pdf->Text(22,61.5,tep_correct_entitie_put_pdf(PRINT_INVOICE_HEADING));
+$pdf->SetY(60);
+$pdf->SetDrawColor(153,153,153);
+$pdf->Cell(38);
+$pdf->Cell(160,.1,'',1,1,'L',1);
+
+/**
+Block des Adresse client
+*/
+$le_Y=67;
+$hauteur_block=35;
+
+//Draw Box for Invoice Address
+$pdf->SetDrawColor(0);
+$pdf->SetLineWidth(0.2);
+$pdf->SetFillColor(245);
+$pdf->RoundedRect(6, $le_Y, 90, $hauteur_block, 2, 'DF');
+
+//Draw the invoice address text
+$pdf->SetFont('Arial','B',10);
+$pdf->SetTextColor(0);
+$pdf->Text(11,77, tep_correct_entitie_put_pdf(ENTRY_SOLD_TO) );
+$pdf->SetX(0);
+$pdf->SetY(80);
+$pdf->Cell(9);
+$pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->customer, '', '', "\n")),0,'L');
+
+//Draw Box for Delivery Address
+$pdf->SetDrawColor(0);
+$pdf->SetLineWidth(0.2);
+$pdf->SetFillColor(255);
+$pdf->RoundedRect(108, $le_Y, 90, $hauteur_block, 2, 'DF');
+
+//Draw the invoice delivery address text
+$pdf->SetFont('Arial','B',10);
+$pdf->SetTextColor(0);
+$pdf->Text(113,77,tep_correct_entitie_put_pdf(ENTRY_SHIP_TO));
+$pdf->SetX(0);
+$pdf->SetY(80);
+$pdf->Cell(111);
+$pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->delivery, '', '', "\n")),0,'L');
+
+
+/**
+Block order id et date
+*/
+$le_Y=($le_Y+$hauteur_block+$marge_block);
+$hauteur_block=11;
+//Draw Box for Order Number, Date & Payment method
+$pdf->SetDrawColor(0);
+$pdf->SetLineWidth(0.2);
+$pdf->SetFillColor(245);
+$pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF');
+
+//Draw Order Number Text
+$temp = tep_correct_entitie_put_pdf(PRINT_INVOICE_ORDERNR);
+$pdf->Text(10,113, $temp . $order->info['orders_prefix'].$orders['orders_id']);
+//Draw Date of Order Text
+$temp = tep_correct_entitie_put_pdf (PRINT_INVOICE_DATE);
+$pdf->Text(130,113,$temp . tep_correct_entitie_put_pdf(tep_date_short($order->info['date_purchased'])));
+
+/**
+Method payement
+*/
+if (isset($_POST) && isset($_POST['show_pay_method'])){
+$le_Y=($le_Y+$hauteur_block+$marge_block);
+$hauteur_block=11;
+
+$pdf->SetDrawColor(0);
+$pdf->SetLineWidth(0.2);
+$pdf->SetFillColor(245);
+$pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF');
+$pdf->Text(10,127,tep_correct_entitie_put_pdf(ENTRY_PAYMENT_METHOD . ' ' . $order->info['payment_method']), 0, 0, 'R');
+}
+
+/**
+Block detail commande
+*/
+//Fields Name position
+$Y_Fields_Name_position = ($le_Y+$hauteur_block+$marge_block);
+$item_count=0;
+//Table position, under Fields Name
+$Y_Table_Position = ($Y_Fields_Name_position+6);
+
+output_table_heading($Y_Fields_Name_position);
+//Show the products information line by line
+for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
+ $hauteur_block=$hauteur_block_r=6;
+ $nbr_l=1;
+//. cesure general name produits
+ if (strlen($order->products[$i]['name']) > 40 ) {
+ $r=tep_wordwrap($order->products[$i]['name'], 40);
+ $order->products[$i]['name'] =$r['txt'];
+ $nbr_l +=$r['nbr'];
+ }
+// concat des attribut de produits sur les nom, avec saut de ligne
+ if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
+ for ($j = 0; $j < $k; $j++) {
+ $ligne="\n - ".$order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
+ if (strlen($ligne) > 40 ) {
+ $r=tep_wordwrap($ligne, 40);
+ $order->products[$i]['name'] .=$r['txt'];
+ $nbr_l +=$r['nbr'];
+ } else {
+ $order->products[$i]['name'] .=$ligne;
+ $nbr_l +=1;
+ }
+ }
+ }
+ $hauteur_block_r=($nbr_l*$hauteur_block_r);
+// qty
+ $pdf->SetFont('Arial','',10);
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(6);
+ $pdf->MultiCell(9,$hauteur_block_r,$order->products[$i]['qty'],1,'C');
+// modele
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(15);
+ $pdf->SetFont('Arial','',8);
+ $pdf->MultiCell(25,$hauteur_block_r,tep_correct_entitie_put_pdf($order->products[$i]['model']),1,'C');
+// name
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(40);
+ $pdf->SetFont('Arial','',8);
+ $pdf->MultiCell(78,$hauteur_block,tep_correct_entitie_put_pdf($order->products[$i]['name']),1,'L');
+// totaux / prix
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(118);
+ $pdf->SetFont('Arial','',10);
+ $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value'])),1,'C');
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(138);
+ $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value'])),1,'C');
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(158);
+ $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value'])),1,'C');
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(178);
+ $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value'])),1,'C');
+
+ /* Check for product line overflow*/
+ $item_count++;
+ if ((is_long($item_count / 32) && $i >= 20) || ($i == 20)){
+ $pdf->AddPage();
+ //Fields Name position
+ $Y_Fields_Name_position = 125;
+ //Table position, under Fields Name
+ $Y_Table_Position = 70;
+ output_table_heading($Y_Table_Position-$hauteur_block_r);
+ if ($i == 20) $item_count = 1;
+ }
+ $Y_Table_Position=$Y_Table_Position+$hauteur_block_r;
+}
+
+
+// Order Totals
+for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
+ $Y_Table_Position +=5;
+ $pdf->SetY($Y_Table_Position );
+ $pdf->SetX(36);
+ $temp = substr ($order->totals[$i]['text'],0 ,3);
+ $pdf->MultiCell(130,6,tep_correct_entitie_put_pdf($order->totals[$i]['title'],true) ,0,'R');
+ $pdf->SetY($Y_Table_Position );
+ $pdf->SetX(146);
+ $pdf->MultiCell(50,6, tep_correct_entitie_put_pdf($order->totals[$i]['text'],false),0,'R');
+}
+
+if (isset($_POST) && isset($_POST['show_pay_method'])){
+ $DB=Database::getInstance();
+ $innum = $orders['orders_prefix'].$orders['orders_id'];
+ $orders_comments_query = $DB->query("select comments,date_added from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '$innum' order by date_added");
+ if ($orders_comments_query->__get('NumRows')>0) {
+ $Y_Table_Position=($Y_Table_Position+$marge_block);
+ while ($orders_comments = $orders_comments_query->fectAssoc()) {
+ if(tep_not_null($orders_comments['comments'])){
+ $pdf->SetFont('Arial','',10);
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(6);
+ $pdf->MultiCell(35,6,date(TEXT_ORDER_FORMAT, strtotime($orders_comments['date_added'])),0,'C');
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(41);
+ $pdf->MultiCell(100,6,tep_correct_entitie_put_pdf("Comments: " . $orders_comments['comments']),0,'C');
+ $Y_Table_Position += 5;
+ }
+ }
+ }
+}
+?>
\ No newline at end of file
Copied: trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/packingslip.php (from rev 3877, trunk/catalog/includes/modules/template_pdf/packingslip.php)
===================================================================
--- trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/packingslip.php (rev 0)
+++ trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/packingslip.php 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,166 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.0.9
+ @date 16/06/10, 10:55
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$le_Y=0;
+$marge_block=3;
+$padding_block=5;
+
+// Add the first page
+$pdf->AddPage();
+
+/**
+ Ligne + titre doc
+*/
+ $pdf->Cell(50);
+ $pdf->SetY(60);
+ $pdf->SetDrawColor(153,153,153);
+ $pdf->Cell(15,.1,'',1,1,'L',1);
+ $pdf->SetFont('Arial','BI',15);
+ $pdf->SetTextColor(153,153,153);
+ $pdf->Text(22,61.5,tep_correct_entitie_put_pdf(PRINT_PACKINGSLIP_HEADING));
+ $pdf->SetY(60);
+ $pdf->SetDrawColor(153,153,153);
+ $pdf->Cell(65);
+ $pdf->Cell(126.6,.1,'',1,1,'L',1);
+
+/**
+ Block des Adresse client
+*/
+ $le_Y=67;
+ $hauteur_block=35;
+ //Draw Box for Invoice Address
+ $pdf->SetDrawColor(0);
+ $pdf->SetLineWidth(0.2);
+ $pdf->SetFillColor(245);
+ $pdf->RoundedRect(6, $le_Y, 90, 35, 2, 'DF');
+
+ //Draw the invoice address text
+ $pdf->SetFont('Arial','B',10);
+ $pdf->SetTextColor(0);
+ $pdf->Text(11,77, tep_correct_entitie_put_pdf(ENTRY_SOLD_TO));
+ $pdf->SetX(0);
+ $pdf->SetY(80);
+ $pdf->Cell(9);
+ $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->customer, '', '', "\n")),0,'L');
+
+ //Draw Box for Delivery Address
+ $pdf->SetDrawColor(0);
+ $pdf->SetLineWidth(0.2);
+ $pdf->SetFillColor(255);
+ $pdf->RoundedRect(108, $le_Y, 90, 35, 2, 'DF');
+
+ //Draw the invoice delivery address text
+ $pdf->SetFont('Arial','B',10);
+ $pdf->SetTextColor(0);
+ $pdf->Text(113,77,tep_correct_entitie_put_pdf(ENTRY_SHIP_TO));
+ $pdf->SetX(0);
+ $pdf->SetY(80);
+ $pdf->Cell(111);
+ $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->delivery, '', '', "\n")),0,'L');
+
+
+/**
+ Block id commande et date
+*/
+ $le_Y=($le_Y+$hauteur_block+$marge_block);
+ $hauteur_block=11;
+ //Draw Box for Order Number, Date & Payment method
+ $pdf->SetDrawColor(0);
+ $pdf->SetLineWidth(0.2);
+ $pdf->SetFillColor(245);
+ $pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF');
+
+ //Draw Order Number Text
+ $temp = tep_correct_entitie_put_pdf(PRINT_PACKINGSLIP_ORDERNR);
+ $pdf->Text(10,113, $temp . $order->info['orders_prefix'].$orders['orders_id']);
+ //Draw Date of Order Text
+ $temp = tep_correct_entitie_put_pdf(PRINT_INVOICE_DATE);
+ $pdf->Text(130,113,$temp . tep_date_short($order->info['date_purchased']));
+
+/**
+ Method payement
+*/
+ $le_Y=($le_Y+$hauteur_block+$marge_block);
+ $hauteur_block=11;
+ $pdf->SetDrawColor(0);
+ $pdf->SetLineWidth(0.2);
+ $pdf->SetFillColor(245);
+ $pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF');
+ $pdf->Text(10,127,tep_correct_entitie_put_pdf(ENTRY_PAYMENT_METHOD . ' ' . $order->info['payment_method']), 0, 0, 'R');
+
+
+/**
+ Block detail commande
+*/
+//Fields Name position
+$Y_Fields_Name_position = ($le_Y+$hauteur_block+$marge_block);
+$item_count=0;
+//Table position, under Fields Name
+$Y_Table_Position = ($Y_Fields_Name_position+6);
+
+output_table_heading_packingslip($Y_Fields_Name_position);
+//Show the products information line by line
+for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
+ $hauteur_block=$hauteur_block_r=6;
+ $nbr_l=1;
+ //. cesure general name produits
+ if (strlen($order->products[$i]['name']) > 40 ) {
+ $r=tep_wordwrap($order->products[$i]['name'], 40);
+ $order->products[$i]['name'] =$r['txt'];
+ $nbr_l +=$r['nbr'];
+ }
+ // concat des attribut de produits sur les nom, avec saut de ligne
+ if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
+ for ($j = 0; $j < $k; $j++) {
+ $ligne="\n - ".$order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
+ if (strlen($ligne) > 40 ) {
+ $r=tep_wordwrap($ligne, 40);
+ $order->products[$i]['name'] .=$r['txt'];
+ $nbr_l +=$r['nbr'];
+ } else {
+ $order->products[$i]['name'] .=$ligne;
+ $nbr_l +=1;
+ }
+ }
+ }
+ $hauteur_block_r=($nbr_l*$hauteur_block_r);
+// quantite
+ $pdf->SetFont('Arial','',10);
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(6);
+ $pdf->MultiCell(9,$hauteur_block_r,$order->products[$i]['qty'],1,'C');
+// modele
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(15);
+ $pdf->SetFont('Arial','',8);
+ $pdf->MultiCell(25,$hauteur_block_r,tep_correct_entitie_put_pdf($order->products[$i]['model']),1,'C');
+
+// nom product
+ $pdf->SetY($Y_Table_Position);
+ $pdf->SetX(40);
+ $pdf->SetFont('Arial','',8);
+ $pdf->MultiCell(158,$hauteur_block,tep_correct_entitie_put_pdf($order->products[$i]['name']),1,'L');
+
+ $Y_Table_Position += $hauteur_block_r;
+
+ /* Check for product line overflow*/
+ $item_count++;
+ if ((is_long($item_count / 32) && $i >= 20) || ($i == 20)){
+ $pdf->AddPage();
+ //Fields Name position
+ $Y_Fields_Name_position = 125;
+ //Table position, under Fields Name
+ $Y_Table_Position = 70;
+ output_table_heading($Y_Table_Position-$hauteur_block_r);
+ if ($i == 20) $item_count = 1;
+ }
+}
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/emailUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/emailUtility.php 2011-11-17 12:43:38 UTC (rev 3885)
+++ trunk/catalog/admin/includes/classes/emailUtility.php 2011-11-17 15:08:16 UTC (rev 3886)
@@ -3,8 +3,8 @@
@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 22/03/11, 16:16
+ @version 2.1.1
+ @date 17/11/11, 15:27
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class emailUtility
@@ -13,21 +13,43 @@
class emailUtility {
+ /**
+ @var WS type emails docs path
+ */
+ const TYPE_EMAIL = 'email/';
+ /**
+ @var WS adminuser docs
+ */
+ const DOCS_ADMINUSER = 'adminUser/';
+ /**
+ @var WS publicCustomers docs
+ */
+ const PATH_PUBLICCUSTOMERS = 'publicCustomers/';
/**
- Send email (text/html) using MIME
- This is the central mail function. The SMTP Server should be configured correct in php.ini
- @Param
- $to_name The name of the recipient, e.g. "Jan Wildeboer"
- $to_email_address The eMail address of the recipient,
- e.g. jan...@gm...
- $email_subject The subject of the eMail
- $email The text of the eMail, may contain HTML entities
- $from_email_name The name of the sender, e.g. Shop Administration
- $from_email_adress The eMail address of the sender,
- e.g. in...@my...
+ @var Path WS docs modele emails
+ */
+ public static $PATH_DOCS_EMAIL = '';
- @return boolean true /false
+
+ protected function __construct(){
+
+ self::$PATH_DOCS_EMAIL = DIR_MODELES.self::TYPE_EMAIL.USE_MODELE_EMAIL.'/';
+
+
+ }
+
+
+ /**
+ @brief Send email (text/html) using MIME
+ This is the central mail function. The SMTP Server should be configured correct in php.ini
+ @param $to_name The name of the recipient, e.g. "Jan Wildeboer"
+ @param $to_email_address The eMail address of the recipient,
+ @param $email_subject The subject of the eMail
+ @param $email The text of the eMail, may contain HTML entities
+ @param $from_email_name The name of the sender, e.g. Shop Administration
+ @param $from_email_adress The eMail address of the sender,
+ @return boolean true /false
*/
public static function tep_mail($to_name, $to_email_address, $email_subject, $email_array, $from_email_name='', $from_email_address='') {
@@ -91,10 +113,14 @@
/**
- @package oscss-Rv
- @author oscim - OscssTeam
- @version 1.0
- Construteur de mise en forme des email avant envoi; remplace les code raccouris et ajoute si necessaire l'entete html
+ @fn replace_for_mail($txt_mail,$subject,$html_reg,$text_reg,$mode)
+ @brief Construteur de mise en forme des email avant envoi; remplace les code raccouris et ajoute si necessaire l'entete html
+ @param $txt_mail
+ @param $subject
+ @param $html_reg
+ @param $text_reg
+ @param $mode
+ @return string full content text email
*/
public static function replace_for_mail($txt_mail,$subject,$html_reg,$text_reg,$mode='HTML'){
/* Code raccourcis autorisé */
@@ -112,26 +138,51 @@
/**
- Construteur de mise en forme des email avant envoi; remplace les code raccouris et ajoute si necessaire l'entete html
- @param
- @a string nom du template
- @a string path du language utilis pour le mail
- @a array $myarray key/value des var perso
- @a boolean return / print
+ @fn post_prepare_email($template,$language,$myarray,$print)
+ @brief Construteur de mise en forme des email avant envoi;
+ remplace les code raccouris et ajoute si necessaire l'entete html
+ @param $template string nom du template
+ @param $language string path du language utilise pour le mail
+ @param $myarray array $myarray key/value des var perso
+ @param $print boolean return / print
*/
public static function post_prepare_email($template,$language,$myarray,$print=false){
global $title_email,$messageStack;
- $template=(tep_not_null($template) && file_exists(DIR_FS_ADMIN.DIR_WS_MODULES.'template_email/'.$template))? $template : 'defaut.tpl' ;
- @include(DIR_WS_LANGUAGES . $language .'/modules/template_email/'.substr($template, 0, strlen($template)-4) .'.txt');
+ if(empty(self::$PATH_DOCS_EMAIL))
+ new self();
+ if(empty($template)) {
+ $template = 'defaut.tpl';
+ }
+
+ if( !file_exists( DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL ) || !is_dir(DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL))
+ self::$PATH_DOCS_EMAIL = DIR_MODELES.self::TYPE_EMAIL . 'mouton/';
+
+ /// fix path
+ if( file_exists( DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL. self::PATH_PUBLICCUSTOMERS.$template) ){
+ @include(DIR_FS_CATALOG.DIR_WS_LANGUAGES . $language .'/'.DIR_MODELES . self::TYPE_EMAIL . USE_MODELE_EMAIL.'/' .substr($template, 0, strlen($template)-4) .'.txt');
+ $dir = DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL . self::PATH_PUBLICCUSTOMERS ;
+ }
+ elseif( file_exists( DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL . DOCS_ADMINUSER . $template) ){
+ @include(DIR_FS_ADMIN.DIR_WS_LANGUAGES . $language .'/'.DIR_MODELES . self::TYPE_EMAIL . USE_MODELE_EMAIL.'/'.substr($template, 0, strlen($template)-4) .'.txt');
+ $dir = DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL .self:: DOCS_ADMINUSER ;
+ }
+ else{
+ $template = 'defaut.tpl';
+ @include(DIR_FS_CATALOG.DIR_WS_LANGUAGES . $language .'/'.DIR_MODELES . self::TYPE_EMAIL . USE_MODELE_EMAIL.'/'.substr($template, 0, strlen($template)-4) .'.txt');
+ $dir = DIR_FS_ROOT_DOCS . self::$PATH_DOCS_EMAIL . self::PATH_PUBLICCUSTOMERS ;
+ }
+
+
+
$tpl = &Template::singleton();
if (!empty($tpl->error)) {
$messageStack->add_session($tpl->error, 'error');
return false;
}
- $tpl->template_dir = DIR_WS_MODULES . 'template_email/';
+ $tpl->template_dir = $dir;
$tpl->assign("STORE_LOGO_PRINT",STORE_LOGO_PRINT);
$tpl->assign("DIR_WS_CATALOG", DIR_WS_CATALOG);
$tpl->assign("DIR_WS_ADMIN", DIR_WS_ADMIN);
@@ -165,14 +216,17 @@
}
/**
- Recup element dirs
- @package oscss-Rv
- @author oscim
- @version 1.0
+ @fn recup_template_mail()
+ @brief Recup element dirs
+ @return array(array (id, text),[] )
*/
public static function recup_template_mail(){
- $dirs = dir( DIR_WS_MODULES . 'template_email/');
- $t[]=array('id'=>'', 'text'=>TEXT_TPL_AUCUN );
+
+ if(empty(self::$PATH_DOCS_EMAIL))
+ new self();
+
+ $dirs = dir( self::$PATH_DOCS_EMAIL . self::PATH_PUBLICCUSTOMERS );
+ $t[]=array('id'=>'', 'text'=>'--' );
while ($file = $dirs->read()) {
if (substr("$file", -4) == '.tpl') {
$name=substr("$file",0,strlen($file)-4);
@@ -183,5 +237,28 @@
return $t;
}
+
+ /**
+ @fn GetModeleEmails()
+ @brief Recup element dirs
+ @return array(array (id, text),[] )
+ */
+ public static function GetModeleEmails(){
+
+ if(empty(self::$PATH_DOCS_EMAIL))
+ new self();
+
+ $dirs = dir(DIR_FS_ROOT_DOCS. DIR_MODELES.self::TYPE_EMAIL );
+ $t[]=array('id'=>'', 'text'=>'--' );
+ while ($file = $dirs->read()) {
+ if ($file !='.' && $file !='..' && is_dir( DIR_FS_ROOT_DOCS. DIR_MODELES.self::TYPE_EMAIL .$file ) ) {
+
+ $t[]=array('id'=>$file, 'text'=>$file );
+ }
+ }
+ $dirs->close();
+ return $t;
+ }
+
}
?>
Modified: trunk/catalog/admin/includes/functions/lib.configuration.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.configuration.php 2011-11-17 12:43:38 UTC (rev 3885)
+++ trunk/catalog/admin/includes/functions/lib.configuration.php 2011-11-17 15:08:16 UTC (rev 3886)
@@ -80,7 +80,7 @@
/**
@fn tep_cfg_select_pull_down($select_array, $key_value, $key = '')
@brief Alias tep_cfg_select_option_bis en Select
- @param $select_array array array(key=value => value=text)
+ @param $select_array array array(key=value => value=text) || array(array(id, value),)
@param $key_value current value status
@param $key key input name configuration[' . $key . '] Or configuration_value
@return string
@@ -89,7 +89,10 @@
$name = (tep_not_null($key) ? 'configuration[' . $key . ']' : 'configuration_value');
foreach ($select_array as $k=>$v)
- $list_array[] = array('id' => $k, 'text' => $v);
+ if(is_array($v))
+ $list_array[] =$v;
+ else
+ $list_array[] = array('id' => $k, 'text' => $v);
return tep_draw_pull_down_menu($name, $list_array, $key_value);
}
Modified: trunk/catalog/admin/includes/gabarit/configuration/modmail.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modmail.listing.gab 2011-11-17 12:43:38 UTC (rev 3885)
+++ trunk/catalog/admin/includes/gabarit/configuration/modmail.listing.gab 2011-11-17 15:08:16 UTC (rev 3886)
@@ -120,16 +120,29 @@
</p>
</div>
</p>
- </fieldset>
+ </fieldset>
+ <fieldset class="block_field">
+ <?php /** */ $row = modmail::$list['USE_MODELE_EMAIL']; ?>
+ <legend title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></legend>
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </p>
+ </fieldset>
+
+
<?php /** Attribut produit / option stock associé */ ?>
<fieldset class="block_field">
<legend class="block_field-title"><?php echo __('modmail legend other') ?></legend>
<ul class="block_input">
<?php foreach(modmail::$list as $row)
- if(!in_array($row->key,array('SEND_EMAILS','EMAIL_TRANSPORT','EMAIL_USE_HTML','EMAIL_LINEFEED','ENTRY_EMAIL_ADDRESS_CHECK')) && substr($row->key,0,4) !='SMTP' ) { ?>
+ if(!in_array($row->key,array('SEND_EMAILS','EMAIL_TRANSPORT','EMAIL_USE_HTML','EMAIL_LINEFEED','ENTRY_EMAIL_ADDRESS_CHECK', 'USE_MODELE_EMAIL')) && substr($row->key,0,4) !='SMTP' ) { ?>
<li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
<div class="block_input tirroir">
Copied: trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt (from rev 3877, trunk/catalog/admin/includes/languages/fr_FR/modules/template_email/add_customer.txt)
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt 2011-11-17 15:08:16 UTC (rev 3886)
@@ -0,0 +1,20 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 23/03/11, 16:27
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['EMAIL_SEPARATOR']="------------------------------------------------------" ;
+$lang['EMAIL_TEXT_SUBJECT']="Changement des informations personnelles" ;
+$lang['EMAIL_TEXT_FOOTER_LG1']="Ceci est un message automatisé, veuillez ne pas répondre ! " ;
+
+$lang['ADMIN_EMAIL_TEXT_BONOUR']="Bonjour " ;
+$lang['ADMIN_EMAIL_TEXT_LOGIN']="Nom d'utilisateur " ;
+$lang['ADMIN_EMAIL_TEXT_MDP']="Mot de passe " ;
+$lang['ADMIN_EMAIL_TEXT_WWW']="Connectez vous " ;
+$lang['ADMIN_EMAIL_TEXT_EMAIL']="Email " ;
+$lang['ADMIN_EMAIL_TEXT']="vos informations personnelles sur l'administration ont été changés. Si ceci a été fait sans votre connaissance ou consentement contactez l'administrateur de toute urgence ! " ;
+?>
\ No newline at end of file
Copied: trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/admin_account.txt (from rev 3877...
[truncated message content] |
|
From: <os...@us...> - 2011-11-17 12:43:44
|
Revision: 3885
http://oscss.svn.sourceforge.net/oscss/?rev=3885&view=rev
Author: oscim
Date: 2011-11-17 12:43:38 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
correction gestion des url de tract via le fichier oscss.version
Modified Paths:
--------------
trunk/catalog/admin/includes/functions/general.php
trunk/catalog/admin/includes/modules/generic/SvnUpdate.php
trunk/catalog/common/oscss.version.xml
Modified: trunk/catalog/admin/includes/functions/general.php
===================================================================
--- trunk/catalog/admin/includes/functions/general.php 2011-11-17 09:40:09 UTC (rev 3884)
+++ trunk/catalog/admin/includes/functions/general.php 2011-11-17 12:43:38 UTC (rev 3885)
@@ -559,13 +559,18 @@
@fn get_info_core($file,$name='svn')
@brief Recuperation des element de svn basé sur le fichier oscss.version.xml
@param $file path acces file
- @param $name string le tag qui doit être retourné
+ @param $name string le tag qui doit être retourné (all for return all tags)
*/
function get_info_core($file,$name='svn'){
if(!file_exists($file)) return die(__('Erreur récuperation fichier'));
$SimpleParser = simplexml_load_file($file);
- if(!isset($SimpleParser->$name)) die(__('Erreur récuperation tag '.$name)) ;
- else return (string)$SimpleParser->$name;
+
+ if($name=='all')
+ return (string)$SimpleParser;
+ elseif(!isset($SimpleParser->$name))
+ die(__('Erreur récuperation tag '.$name)) ;
+ else
+ return (string)$SimpleParser->$name;
}
/**
Modified: trunk/catalog/admin/includes/modules/generic/SvnUpdate.php
===================================================================
--- trunk/catalog/admin/includes/modules/generic/SvnUpdate.php 2011-11-17 09:40:09 UTC (rev 3884)
+++ trunk/catalog/admin/includes/modules/generic/SvnUpdate.php 2011-11-17 12:43:38 UTC (rev 3885)
@@ -22,9 +22,7 @@
/// Configuration
/// -> Settings you *must* adjust
-// const $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=branches%2F2.1.0%2Fcatalog&old_path=branches%2F2.1.0%2Fcatalog';
-
- public static $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2F2.1.0%2Fcatalog&old_path=trunk%2F2.1.0%2Fcatalog';
+ public static $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';
public static $URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
public static $PATH_SVN_BRANCHE = 'trunk/catalog/';
public static $FILEPATH_SVN_CORE = 'common/oscss.version.xml';
@@ -33,7 +31,7 @@
const REDIRECT = FILENAME_PACKAGE;
/// version module
- var $version='2.0.1';
+ var $version='2.1.0';
public static $code;
var $title;
@@ -65,7 +63,14 @@
$svnupdate=0;
if(!tep_session_is_registered('svnupdate')) {
- self::$actu_rev=$this->get_info_core(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE);
+
+ $info = $this->get_info_core(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE, 'all');
+
+ self::$actu_rev= (int)$info->svn;
+ self::$URL_OSCSS_ORG_TRAC = $info->urloscssorgtrac;
+ self::$URL_OSCSS_GET_REV = $info->urloscssgetrev;
+ self::$PATH_SVN_BRANCHE = (string)$info->pathsvnbranche;
+
self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
if(self::$actu_rev!=self::$current_rev)$svnupdate=1;
$_SESSION['svnupdate']=$svnupdate;
@@ -208,7 +213,7 @@
private function new_version_xml($curent_rev, $corre_rev){
- $SimpleParser = @simplexml_load_file(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE);
+ $SimpleParser = $this->get_info_core(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE, 'all');
$SimpleParser->svn = (int)$curent_rev;
Modified: trunk/catalog/common/oscss.version.xml
===================================================================
--- trunk/catalog/common/oscss.version.xml 2011-11-17 09:40:09 UTC (rev 3884)
+++ trunk/catalog/common/oscss.version.xml 2011-11-17 12:43:38 UTC (rev 3885)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<core>
- <version>2.1.0 RC</version>
- <svn>3845</svn>
+ <version>2.1.1 (dev)</version>
+ <svn>3885</svn>
<level>stable</level>
<template_admin>oscss</template_admin>
- <urloscssorgtrac>http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=branches%2F2.1.0%2Fcatalog&old_path=branches%2F2.1.0%2Fcatalog</urloscssorgtrac>
+ <urloscssorgtrac>http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2Fcatalog&old_path=trunk%2Fcatalog</urloscssorgtrac>
<urloscssgetrev>http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision</urloscssgetrev>
- <pathsvnbranche>branches/2.1.0/catalog/</pathsvnbranche>
+ <pathsvnbranche>trunk/catalog/</pathsvnbranche>
</core>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-17 09:40:16
|
Revision: 3884
http://oscss.svn.sourceforge.net/oscss/?rev=3884&view=rev
Author: oscim
Date: 2011-11-17 09:40:09 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
correction suite modification anterieur et dysfonctionnement des appels de type genric
Modified Paths:
--------------
trunk/catalog/admin/includes/content/aca.top.inc
Modified: trunk/catalog/admin/includes/content/aca.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/aca.top.inc 2011-11-17 09:36:09 UTC (rev 3883)
+++ trunk/catalog/admin/includes/content/aca.top.inc 2011-11-17 09:40:09 UTC (rev 3884)
@@ -18,7 +18,7 @@
$ID=false;
if(isset($_GET['pID']))$ID=(int)tep_sanitize_string($_GET['pID']);
-
+// action_class=SvnUpdate&action_method=draw_form
$actions['action'] = $action;
$actions['display_file']='';
/* Le type products/categories/account/home */
@@ -35,8 +35,10 @@
@remarks
generic init in appli top
*/
- if($actions['action_type']=='generic') $aca_modules=$generic_modules;
-
+ if($actions['action_type']=='generic'){
+ $aca_modules=$generic_modules;
+ $post_exe=true;
+ }
/**
@remarks Init class type pages for call methode no static
@@ -66,6 +68,7 @@
name: xxx
*/
else{
+
// use specific class , or class by factory
if(file_exists(DIR_WS_CLASSES.'aca.'.$actions['action_type'].'.php')){
include (DIR_WS_CLASSES.'aca.'.$actions['action_type'].'.php');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-17 09:36:15
|
Revision: 3883
http://oscss.svn.sourceforge.net/oscss/?rev=3883&view=rev
Author: oscim
Date: 2011-11-17 09:36:09 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
correction ext svnupdate
Mise en oeuvre mise a jour du fichier oscss.version , sans supprim?\195?\169 le reste du contenu.
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/generic/SvnUpdate.php
trunk/catalog/install/includes/content/core.update.php
Modified: trunk/catalog/admin/includes/modules/generic/SvnUpdate.php
===================================================================
--- trunk/catalog/admin/includes/modules/generic/SvnUpdate.php 2011-11-16 23:20:45 UTC (rev 3882)
+++ trunk/catalog/admin/includes/modules/generic/SvnUpdate.php 2011-11-17 09:36:09 UTC (rev 3883)
@@ -1,9 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.1
- @date 14/01/11, 18:06
+ @version 2.1.1
+ @date 17/11/11, 10:06
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class SvnUpdate
@@ -21,11 +22,13 @@
/// Configuration
/// -> Settings you *must* adjust
- const URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=branches%2F2.1.0%2Fcatalog&old_path=branches%2F2.1.0%2Fcatalog';
- const URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
- const PATH_SVN_BRANCHE = 'branches/2.1.0/catalog/';
- const FILEPATH_SVN_CORE = 'common/oscss.version.xml';
+// const $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=branches%2F2.1.0%2Fcatalog&old_path=branches%2F2.1.0%2Fcatalog';
+ public static $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2F2.1.0%2Fcatalog&old_path=trunk%2F2.1.0%2Fcatalog';
+ public static $URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
+ public static $PATH_SVN_BRANCHE = 'trunk/catalog/';
+ public static $FILEPATH_SVN_CORE = 'common/oscss.version.xml';
+
//! page de redirection apres exec
const REDIRECT = FILENAME_PACKAGE;
@@ -62,15 +65,15 @@
$svnupdate=0;
if(!tep_session_is_registered('svnupdate')) {
- self::$actu_rev=$this->get_info_core(DIR_FS_CATALOG.self::FILEPATH_SVN_CORE);
- self::$current_rev=$this->get_current_rev(self::URL_OSCSS_GET_REV);
+ self::$actu_rev=$this->get_info_core(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE);
+ self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
if(self::$actu_rev!=self::$current_rev)$svnupdate=1;
$_SESSION['svnupdate']=$svnupdate;
}
else $svnupdate=(int)$_SESSION['svnupdate'];
if($svnupdate==1) {
- $messageStack->add( __("mise a jour disponible ").'<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form').'">'.__('detail').'</a>', 'info' ) ;
+ $messageStack->add( __("mise a jour disponible ").'<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('detail').'</a>', 'info' ) ;
}
}
@@ -89,15 +92,15 @@
@author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
public function _add_menu() {
- return('<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form').'">'.__('Svn synchro').'</a>');
+ return('<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('Svn synchro').'</a>');
}
/**
@author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
public function draw_form(){
- if((int)self::$actu_rev==0) self::$actu_rev=$this->get_info_core(DIR_FS_CATALOG.self::FILEPATH_SVN_CORE);
- if((int)self::$current_rev==0) self::$current_rev=$this->get_current_rev(self::URL_OSCSS_GET_REV);
+ if((int)self::$actu_rev==0) self::$actu_rev=$this->get_info_core(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE);
+ if((int)self::$current_rev==0) self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
if(isset($_POST['ACTU_REV']))$S=$this->exe_update($_POST['ACTU_REV'],$_POST['CURENT_REV']);
else {
@@ -155,12 +158,12 @@
@set_time_limit(0);
$folder_admin=substr(DIR_WS_ADMIN, strlen(DIR_WS_CATALOG) );
$name='old'.$corre_rev.'new'.$curent_rev.'_patch.zip';
- $file=DIR_FS_ADMIN.'contributions/'.$name;
+ $file=DIR_FS_ROOT_DOCS.'admin/contributions/'.$name;
//! recup zip fournis par trac SF
$oscss_zip = @fopen($file,'wb');
// recup zip
- $tp=@file_get_contents/*fileUtility::url_fopen*/(str_replace( array('SVN_REV_MAX', 'SVN_REV'), array($curent_rev, $corre_rev), self::URL_OSCSS_ORG_TRAC));
+ $tp=@file_get_contents/*fileUtility::url_fopen*/(str_replace( array('SVN_REV_MAX', 'SVN_REV'), array($curent_rev, $corre_rev), self::$URL_OSCSS_ORG_TRAC));
fputs( $oscss_zip,$tp);
fclose($oscss_zip);
if ($file!=false) $messageStack->add( __("Le fichier à été enregistré"),'succes' ) ;
@@ -170,8 +173,8 @@
tep_zip_extractto( $file,DIR_FS_CATALOG);
//! mode admin folder
// report branche dans le core
- if(file_exists(DIR_FS_CATALOG.self::PATH_SVN_BRANCHE)){
- $this->recurse_copy(DIR_FS_CATALOG.self::PATH_SVN_BRANCHE,DIR_FS_CATALOG);
+ if(file_exists(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE)){
+ $this->recurse_copy(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE,DIR_FS_CATALOG);
$this->recurse_delete(DIR_FS_CATALOG.'branches/');
}
// deplacement admin
@@ -203,13 +206,35 @@
@a int $corre_rev n° revision patch
*/
private function new_version_xml($curent_rev, $corre_rev){
- $tmp='<?xml version="1.0" encoding="utf-8"?>'."\n".
- '<core>'."\n".
- '<version>'.get_info_core(DIR_FS_CATALOG. DIR_WS_COMMON.'oscss.version.xml','version').'</version>'."\n".
- '<svn>'.$curent_rev.'</svn>'."\n".
- '</core>'."\n";
- $file_vers= @fopen(DIR_FS_CATALOG.self::FILEPATH_SVN_CORE,'w');
- fputs( $file_vers,$tmp);
+
+
+ $SimpleParser = @simplexml_load_file(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE);
+
+ $SimpleParser->svn = (int)$curent_rev;
+
+
+ // Create a new DOMDocument object
+ $doc = new DOMDocument('1.0');
+
+ // add spaces, new lines and make the XML more readable format
+ $doc->formatOutput = true;
+
+ // Get a DOMElement object from a SimpleXMLElement object
+ $domnode = dom_import_simplexml($SimpleParser);
+
+ $domnode->preserveWhiteSpace = false;
+
+ // Import node into current document
+ $domnode = $doc->importNode($domnode, true);
+
+ // Add new child at the end of the children
+ $domnode = $doc->appendChild($domnode);
+
+ // Dump the internal XML tree back into a string
+ $saveXml = $doc->saveXML();
+
+ $file_vers= @fopen(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE,'w');
+ fputs( $file_vers,$saveXml);
fclose($file_vers);
}
@@ -254,13 +279,16 @@
'</extractzip>'."\n".
'</contrib>'."\n";
- mkdir(DIR_FS_ADMIN.'contributions/'.$folder.'/');
- copy(DIR_FS_ADMIN.'contributions/'.$name_zip,DIR_FS_ADMIN.'contributions/'.$folder.'/'.$name_zip);
+
+ mkdir(DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/');
+ copy(DIR_FS_ROOT_DOCS.'admin/contributions/'.$name_zip,DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/'.$name_zip);
+
+
//! ne pas supp le zip, sert a être traité par cip
// unlink(DIR_FS_ADMIN.'contributions/'.$name_zip);
$this->insert_db_cip($folder);
- $file_vers= @fopen(DIR_FS_ADMIN.'contributions/'.$folder.'/install.xml','w');
+ $file_vers= @fopen(DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/install.xml','w');
fputs( $file_vers,$file);
fclose($file_vers);
}
Modified: trunk/catalog/install/includes/content/core.update.php
===================================================================
--- trunk/catalog/install/includes/content/core.update.php 2011-11-16 23:20:45 UTC (rev 3882)
+++ trunk/catalog/install/includes/content/core.update.php 2011-11-17 09:36:09 UTC (rev 3883)
@@ -12,7 +12,7 @@
Utilise l'exporte n zip de trac
*/
-define('URL_OSCSS_ORG_TRAC', 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=branches%2F2.1.0%2Fcatalog&old_path=branches%2F2.1.0%2Fcatalog');
+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');
define('PATH_SVN_BRANCHE', 'trunk/catalog/');
@@ -189,16 +189,43 @@
sleep(1);
tep_zip_extractto( $file,'../');
+
+
+
// remplacement fichier de version
- $tmp='<?xml version="1.0" encoding="utf-8"?>'."\n".
- '<core>'."\n".
- '<version>'.$this->get_info_core($this->fs_document_root.FILEPATH_SVN_CORE, 'version').'(dev)</version>'."\n".
- '<svn>'.$curent_rev.'</svn>'."\n".
- '</core>'."\n";
- $file_vers= @fopen($this->fs_document_root.FILEPATH_SVN_CORE,'w');
- fputs( $file_vers,$tmp); //$this->write_dest($tmp, $file_vers);
+
+ $SimpleParser = @simplexml_load_file($this->fs_document_root.FILEPATH_SVN_CORE);
+
+ $SimpleParser->svn = (int)$curent_rev;
+
+
+ // Create a new DOMDocument object
+ $doc = new DOMDocument('1.0');
+
+ // add spaces, new lines and make the XML more readable format
+ $doc->formatOutput = true;
+
+ // Get a DOMElement object from a SimpleXMLElement object
+ $domnode = dom_import_simplexml($SimpleParser);
+
+ $domnode->preserveWhiteSpace = false;
+
+ // Import node into current document
+ $domnode = $doc->importNode($domnode, true);
+
+ // Add new child at the end of the children
+ $domnode = $doc->appendChild($domnode);
+
+ // Dump the internal XML tree back into a string
+ $saveXml = $doc->saveXML();
+
+ $file_vers= @fopen(DIR_FS_CATALOG.self::$FILEPATH_SVN_CORE,'w');
+ fputs( $file_vers,$saveXml);
fclose($file_vers);
+
+
+
// report branche dans le core
if(file_exists($this->fs_document_root.PATH_SVN_BRANCHE)){
$this->recurse_copy($this->fs_document_root.PATH_SVN_BRANCHE,$this->fs_document_root);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-16 23:20:51
|
Revision: 3882
http://oscss.svn.sourceforge.net/oscss/?rev=3882&view=rev
Author: oscim
Date: 2011-11-16 23:20:45 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
report modification template bo oscss, suppression des images au profit de texte dans les listing (remplacement par image non intrusif).
normalisation du focntionnement et integration au icon_set du theme
ajout des class css necessaire
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/template/oscss/data/icon_set.xml
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-16 22:41:28 UTC (rev 3881)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-16 23:20:45 UTC (rev 3882)
@@ -408,22 +408,24 @@
}
private static function get_status_da($customers){
- if ($customers['customers_group_ra'] == '1')
- return tep_image(DIR_WS_ICONS . 'icon_view_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10);
- else
- return tep_image(DIR_WS_ICONS . 'icon_view_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);;
-
+ return sprintf(
+ CsrtAction::getFormat('row_etat'),
+ (int)$customers['customers_group_ra'],
+ ( ($customers['customers_group_ra'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ );
}
private static function get_status_c($customers){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
$query_s='action=setflag&cID=' . $customers['customers_id'].'&flag=';
- if ($customers['customers_status'] == '1')
- return tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.'0' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
- else
- return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.'1') . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a> ' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED);
-
+ return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($customers['customers_status'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$customers['customers_status'],
+ ( ($customers['customers_status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
}
private static function emptyResult(){
Modified: trunk/catalog/admin/includes/template/oscss/data/icon_set.xml
===================================================================
--- trunk/catalog/admin/includes/template/oscss/data/icon_set.xml 2011-11-16 22:41:28 UTC (rev 3881)
+++ trunk/catalog/admin/includes/template/oscss/data/icon_set.xml 2011-11-16 23:20:45 UTC (rev 3882)
@@ -112,5 +112,21 @@
<span class="view fils fright "> %s </span>
</div>]]>
</row_status>
+ <row_etat>
+ <![CDATA[
+ <span class="edit-input-value">
+ <span class="Val Val-%1$s txt">%2$s</span>
+ <span class="Val Val-%1$s img"></span>
+ </span>
+ ]]>
+ </row_etat>
+ <row_flag>
+ <![CDATA[
+ <span class="edit-input-value">
+ <span class="Val Flag-%1$s txt">%2$s</span>
+ <span class="Val Flag-%1$s img"></span>
+ </span>
+ ]]>
+ </row_flag>
</format>
</root>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-16 22:41:28 UTC (rev 3881)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-16 23:20:45 UTC (rev 3882)
@@ -279,13 +279,38 @@
#central .block_form .block_input span.value_edit span.edit-input{float:left; display:inline-block; padding:0 12px;}
#central .block_form .block_input span.edit-input .edit-input-value-alternate {float:left; display:inline-block; padding:0 12px;width:25px; height: 25px;}
- /* remplacement true /false par icone */
- #central .block_form .block_input span.edit-input .edit-input-value .Val-true ,
- #central .block_form .block_input span.edit-input .edit-input-value .Val-false {font-size:0;}
- #central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-true {background:transparent url(img/1/check.png) left top no-repeat; }
- #central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {background:transparent url(img/1/busy.png) left top no-repeat;}
+ /* DEB Non intrusif */
+ /* remplacement true /false par icone */
+ #central .block_form .block_input span.edit-input .edit-input-value .Val-true ,
+ #central .block_form .block_input span.edit-input .edit-input-value .Val-false {font-size:0;}
+ #central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-true {background:transparent url(img/1/check.png) left top no-repeat; }
+ #central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {background:transparent url(img/1/busy.png) left top no-repeat;}
+ /** Col status in tables - Replace status number by img */
+ .dataTable tr td .edit-input-value .Val.img,
+ .dataTableBase tr td .edit-input-value .Val.img { display: block; height: 16px; margin: auto; width: 16px;}
+ .dataTable tr td .edit-input-value .Flag-0.txt,
+ .dataTableBase tr td .edit-input-value .Flag-0.txt,
+ .dataTable tr td .edit-input-value .Val-0.txt,
+ .dataTableBase tr td .edit-input-value .Val-0.txt { display:none}
+
+ .dataTable tr td .edit-input-value .Flag-0.img,
+ .dataTableBase tr td .edit-input-value .Flag-0.img{background:transparent url("../../../images/icons/icon_status_red.gif") left top no-repeat}
+ .dataTable tr td .edit-input-value .Val-0.img,
+ .dataTableBase tr td .edit-input-value .Val-0.img { width: 10px; background:transparent url("../../../images/icons/icon_view_red.gif") left top no-repeat}
+
+ .dataTable tr td .edit-input-value .Flag-1.txt,
+ .dataTableBase tr td .edit-input-value .Flag-1.txt,
+ .dataTable tr td .edit-input-value .Val-1.txt,
+ .dataTableBase tr td .edit-input-value .Val-1.txt { display:none}
+
+ .dataTable tr td .edit-input-value .Flag-1.img,
+ .dataTableBase tr td .edit-input-value .Flag-1.img{background:transparent url("../../../images/icons/icon_status_green.gif") left top no-repeat}
+ .dataTable tr td .edit-input-value .Val-1.img,
+ .dataTableBase tr td .edit-input-value .Val-1.img {width: 10px; background:transparent url("../../../images/icons/icon_view_green.gif") left top no-repeat}
+ /* FIN Non intrusif */
+
/* Ajsutement Page Orders*/
#central .box_uniq.block_form.main-orders fieldset{margin:10px 0 0 0;padding:0 5px;}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-16 22:41:36
|
Revision: 3881
http://oscss.svn.sourceforge.net/oscss/?rev=3881&view=rev
Author: oscim
Date: 2011-11-16 22:41:28 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
[BO] Ajout du sqlcustomer et adaptation du modules de pages/customers.php
AJout option d'envoi de mail lors de la creation d'un client dans le BO
correction css
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/customers/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php
Added: trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php 2011-11-16 22:41:28 UTC (rev 3881)
@@ -0,0 +1,332 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 16/11/11, 23:36
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlcustomer
+*/
+
+
+
+class sqlcustomer
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ self::$modules=new AcaFactory('account'/*,'MODULE_ACACAT_INSTALLED_BO'*/);
+// self::$modules->set_image_handler();
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['password']))
+ return 'password';
+ if(!isset($option['email']))
+ return 'email';
+
+ $_post = $option['post'];
+ $sqlarray = $option['sqlarray'];
+
+
+ $sql_data_array = array();
+ $sql_data_array['customers_firstname'] = $sqlarray['customers_firstname'];
+ $sql_data_array['customers_lastname'] = $sqlarray['customers_lastname'];
+ $sql_data_array['email'] = $sqlarray['email'];
+ $sql_data_array['customers_telephone'] = $sqlarray['customers_telephone'];
+ $sql_data_array['customers_fax'] = $sqlarray['customers_fax'];
+ if(isset($sqlarray['password']))$sql_data_array['customers_password'] = $sqlarray['password'];
+ $sql_data_array['customers_newsletter'] = $sqlarray['customers_newsletter'];
+ $sql_data_array['customers_group_ra'] = $sqlarray['customers_group_ra'];
+
+
+ if (_cst_bool('ACCOUNT_GENDER'))
+ $sql_data_array['customers_gender'] = $sqlarray['customers_gender'];
+
+ if (_cst_bool('ACCOUNT_DOB'))
+ $sql_data_array['customers_dob'] = tep_date_raw($sqlarray['customers_dob']);
+
+
+ self::$modules->load_post_values($_post);
+ $sql_data_array = array_merge($sql_data_array, self::$modules->insert_table_prim () );
+
+ $_return= $sql_data_array;
+
+ $resobj=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
+
+ $lastid=$resobj->__get('insertId');
+
+ $sql_data_array = array(
+ 'customers_info_id' => $lastid,
+ 'customers_info_date_account_created' => 'now()',
+ 'global_product_notifications' => $sqlarray['global_product_notifications']
+ );
+
+
+ tep_db_perform(TABLE_CUSTOMERS_INFO, $sql_data_array);
+
+ self::$modules->load_post_values(array_merge(array('customers_id'=>$lastid),$_post) );
+ $sql_data_array = array_merge($sql_data_array, self::$modules->insert_table_second() );
+
+// $_return=array_merge($_return,$sql_data_array,array('customers_id'=>$lastid));
+
+ return $lastid;
+// }
+// else
+// return false;
+
+
+// if(!$res)
+// return $res;
+// else
+// return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']) ) return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND customers_id = '".(int)$option['id']."' ";
+ if(isset($option['email'])) $where .="AND customers_email_address = '".(int)$option['email']."' ";
+
+
+ $_post = $option['post'];
+ $sqlarray = $option['sqlarray'];
+
+
+ $sql_data_array = array();
+ if(isset($sqlarray['customers_firstname']))$sql_data_array['customers_firstname'] = $sqlarray['customers_firstname'];
+ if(isset($sqlarray['customers_lastname']))$sql_data_array['customers_lastname'] = $sqlarray['customers_lastname'];
+ if(isset($sqlarray['customers_email_address']))$sql_data_array['customers_email_address'] = $sqlarray['customers_email_address'];
+ if(isset($sqlarray['customers_telephone']))$sql_data_array['customers_telephone'] = $sqlarray['customers_telephone'];
+ if(isset($sqlarray['customers_fax']))$sql_data_array['customers_fax'] = $sqlarray['customers_fax'];
+ if(isset($sqlarray['password']))$sql_data_array['customers_password'] = $sqlarray['password'];
+ if(isset($sqlarray['customers_newsletter']))$sql_data_array['customers_newsletter'] = $sqlarray['customers_newsletter'];
+ if(isset($sqlarray['customers_group_ra']))$sql_data_array['customers_group_ra'] = $sqlarray['customers_group_ra'];
+ if(isset($sqlarray['customers_group_id']))$sql_data_array['customers_group_id'] = $sqlarray['customers_group_id'];
+ if(isset($sqlarray['customers_shopping_points']))$sql_data_array['customers_shopping_points'] = $sqlarray['customers_shopping_points'];
+
+ if (_cst_bool('ACCOUNT_GENDER'))
+ $sql_data_array['customers_gender'] = $sqlarray['customers_gender'];
+
+ if (_cst_bool('ACCOUNT_DOB'))
+ $sql_data_array['customers_dob'] = tep_date_raw($sqlarray['customers_dob']);
+
+
+ self::$modules->load_post_values($_post);
+
+ $sql_data_array = array_merge($sql_data_array, self::$modules->update_table_prim());
+
+ $_return= $sql_data_array;
+
+ $resobj=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update' , substr($where,3));
+
+
+ $sql_data_array = array(
+ 'global_product_notifications' => $sqlarray['global_product_notifications']
+ );
+
+
+ $res=tep_db_perform(TABLE_CUSTOMERS_INFO, $sql_data_array, 'update' , " customers_info_id = '".(int)$option['id']."' " );
+
+
+ self::$modules->load_post_values($_post);
+ $sql_data_array = array_merge($sql_data_array, self::$modules->update_table_second());
+
+
+ self::$modules->after_update((int)$customers_id);
+
+ return $res;
+
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+ @param $shortkey use cleankey for return short key
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND c.customers_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['address_book_id'])) $sql .="AND a.address_book_id = '".(int)tep_db_input($option['address_book_id'])."' ";
+ if(isset($option['group_id'])) $sql .="AND c.customers_group_id = '".(int)tep_db_input($option['group_id'])."' ";
+ if(isset($option['lg_id'])) $sql .="AND c.customers_language = '".(int)tep_db_input($option['lg_id'])."' ";
+ if(isset($option['email'])) $sql .="AND c.customers_email_address = '".(string)tep_db_input($option['email'])."' ";
+
+ if(strlen($sql) < 1 )
+ return false;
+
+ // base customers
+ $sql = "SELECT c.customers_id, c.customers_lastname, c.customers_gender, c.customers_dob, c.customers_newsletter,c.customers_firstname,c.customers_default_address_id, c.customers_email_address,c.customers_group_ra, c.customers_telephone, c.customers_fax, a.entry_country_id,c.customers_group_id,c.customers_language , cg.customers_group_name, c.customers_shopping_points, c.customers_discount, customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons , global_product_notifications , COUNT(o.customers_id) as orders ".
+ " FROM " . TABLE_CUSTOMERS . " c ".
+ " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ON( customers_info_id = c.customers_id ) ".
+ " LEFT JOIN " . TABLE_ADDRESS_BOOK . " a ON ( c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id ) ".
+ " LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON ( c.customers_group_id = cg.customers_group_id ) ".
+ " LEFT JOIN " . TABLE_ORDERS . " o ON( o.customers_id = c.customers_id ) ".
+ " WHERE ".substr($sql,3).
+ " GROUP BY o.customers_id ";
+
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ $result['countries_name']=tep_get_country_name($result['entry_country_id']);
+
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result){
+ $result['countries_name']=tep_get_country_name($result['entry_country_id']);
+
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+ }
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ if(isset($option['id']))
+ $_id = (int)tep_db_input($option['id']) ;
+ else
+ return false;
+
+
+
+
+ $DB->query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$_id . "'");
+ $DB->query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$_id . "'");
+ $DB->query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$_id . "'");
+
+ self::$modules->deleteconfirm_account($_id);
+// self::$modules->delete($_id);
+
+
+ $DB->query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_id . "'");
+
+
+ return true;
+ }
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($option,$shortkey=false){
+ $par = array( 'customers_id' => '',
+
+ 'customers_gender' => '',
+ 'customers_firstname' => '',
+ 'customers_lastname' => '',
+ 'customers_email_address' => '',
+ 'customers_telephone' => '',
+ 'customers_fax' => '',
+ 'customers_language' => '',
+ 'entry_country_id' => '',
+
+ 'customers_group_id' => '',
+ 'customers_group_name' => '',
+
+ 'customers_discount' => '',
+ 'customers_shopping_points' => '',
+
+ 'customers_default_address_id' => '',
+
+ 'customers_group_ra' => '',
+
+ 'date_account_created' => '',
+ 'date_account_last_modified' => '',
+ 'date_last_logon' => '',
+ 'number_of_logons' => '',
+
+ 'customers_newsletter' => '',
+ 'global_product_notifications' => '',
+
+ 'orders' => '',
+ );
+
+ if (_cst_bool('ACCOUNT_DOB'))
+ $par['customers_dob']='';
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'customers_') ===0)
+ $key=substr($key,10);
+
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ 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 2011-11-16 18:22:01 UTC (rev 3880)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2011-11-16 22:41:28 UTC (rev 3881)
@@ -3,11 +3,10 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/04/11, 16:28
+ @version 2.1.1
+ @date 16/11/11, 23:38
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
-
*/
$contents=array();
?>
@@ -42,7 +41,7 @@
<?php if (_cst_bool('ACCOUNT_GENDER')) { ?>
- <div class="block_input">
+ <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);
else {
@@ -55,24 +54,24 @@
</div>
<?php } ?>
- <p class="block_input">
+ <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); ?>
</p>
- <p class="block_input">
+ <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); ?>
</p>
<?php if (_cst_bool('ACCOUNT_DOB')) { ?>
- <p class="block_input">
+ <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); ?>
</p>
<?php } ?>
- <p class="block_input">
+ <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); ?>
</p>
@@ -80,14 +79,14 @@
</fieldset>
- <fieldset class="block_field">
+ <fieldset class="block_field ">
<legend><?php echo __('category contact'); ?></legend>
- <p class="block_input">
+ <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); ?>
</p>
- <p class="block_input">
+ <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'); ?>
</p>
@@ -95,11 +94,11 @@
<fieldset class="block_field">
<legend><?php echo __('category options'); ?></legend>
- <p class="block_input">
+ <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')) ; ?>
</p>
- <p class="block_input">
+ <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')) ; ?>
</p>
@@ -125,22 +124,30 @@
</div>
<div class="box_right">
- <p class="block_input">
+ <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'); ?>
</p>
- <p class="block_input">
+ <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'); ?>
</p>
<!-- BOF Separate Pricing per Customer -->
- <p class="block_input">
+ <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); ?>
</p>
+ <?php if (in_array(customers::$action,array('new','insert'))) : ?>
+<!-- Mode de creation / Notification Client -->
+ <p class="block_input input-one">
+ <label for="new_customers_notif"><?php echo __('entry customers notif created new account'); ?></label>
+ <?php echo tep_draw_checkbox_field('new_customers_notif', 'new_customers_notif', 'on', false); ?>
+ </p>
+ <?php endif; ?>
+
<div class="button_nav">
<?php if (customers::$processed != true) echo tep_image_submit('button_update.gif', IMAGE_UPDATE). tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' ); ;
Modified: trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab 2011-11-16 18:22:01 UTC (rev 3880)
+++ trunk/catalog/admin/includes/gabarit/customers/display_view.listing.gab 2011-11-16 22:41:28 UTC (rev 3881)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 02/11/10, 14:46
+ @version 2.1.1
+ @date 16/11/11, 22:12
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -20,15 +20,15 @@
<tr>
<th> </th>
<th><?php echo __('table heading id') ?></th>
- <th><?php echo __('nom') ?></th>
+ <th><?php echo __('table heading name') ?></th>
<th><?php echo __('table heading firstname') ?></th>
- <th><?php echo __('groupe') ?></th>
+ <th><?php echo __('table heading groupe') ?></th>
<th><?php echo __('table heading points') ?></th>
- <th><?php echo __('compte creer') ?></th>
- <th><?php echo __('dernier acces') ?></th>
- <th><?php echo __('da') ?></th>
- <th><?php echo __('etat') ?></th>
- <th><?php echo __('action') ?></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>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2011-11-16 18:22:01 UTC (rev 3880)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2011-11-16 22:41:28 UTC (rev 3881)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 23/03/11, 15:33
+ @version 2.1.1
+ @date 16/11/11, 22:00
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,12 +12,14 @@
$lang['heading title search']="Rechercher :" ;
$lang['table heading id']="ID" ;
$lang['table heading firstname']="Prénom" ;
-$lang['table heading lastname']="Nom" ;
-$lang['table heading customers groups']="Groupe" ;
-$lang['table heading account created']="Créé" ;
-$lang['table heading account logon']="Accès" ;
+$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 : " ;
@@ -77,8 +79,8 @@
$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 :" ;
-
$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." ;
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-16 18:22:01 UTC (rev 3880)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-16 22:41:28 UTC (rev 3881)
@@ -146,128 +146,122 @@
break;
case 'insert':
+ case 'update':
+ $array = array();
+ $array['post'] = $_POST;
+ $array['sqlarray'] = array();
- if( ($result=$this->userCreate($_POST)) !=false ){
- $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['customers_password'],
- '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);
+ global $languages_id,$messageStack;
+ foreach(sqlcustomer::Specimen(array(),false) as $key=>$row){
+ if(in_array($key, array('customers_group_id','customers_newsletter','global_product_notifications','customers_shopping_points')))
+ $array['sqlarray'][$key]=(isset($_POST[$key])) ? (int)tep_db_prepare_input($_POST[$key]) : 0;
+ else
+ $array['sqlarray'][$key]=(isset($_POST[$key])) ? tep_db_prepare_input($_POST[$key]) : '';
+ }
- if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME));
- else tep_redirect(tep_href_link(self::FILENAME, 'cID=' .$result['customers_id'].'&action=edit'));
+ if(!is_array($array['sqlarray']) || count($array['sqlarray']) < 1)
+ return false;
- } else /*if (self::$error == true) */{
- $_POST['customers_gender']='m';
- $cInfo = new objectInfo($_POST);
- $dest_form='insert';
- }
+ $testobj = new objectInfo($array['sqlarray']);
- break;
- case 'update':
- $customers_id = tep_db_prepare_input(self::$cID);
- $customers_firstname = tep_db_prepare_input($_POST['customers_firstname']);
- $customers_lastname = tep_db_prepare_input($_POST['customers_lastname']);
- $customers_email_address = tep_db_prepare_input($_POST['customers_email_address']);
- $customers_telephone = tep_db_prepare_input($_POST['customers_telephone']);
- $customers_fax = tep_db_prepare_input($_POST['customers_fax']);
- $customers_newsletter = tep_db_prepare_input($_POST['customers_newsletter']);
- $customers_group_ra = (int)tep_db_prepare_input($_POST['customers_group_ra']);
- $customers_gender = (isset($_POST['customers_gender'])) ? tep_db_prepare_input($_POST['customers_gender']) : 1 ;
- if (_cst_bool('ACCOUNT_DOB')) $customers_dob = tep_db_prepare_input($_POST['customers_dob']);
- $customers_group_id = (isset($_POST['customers_group_id'])) ? tep_db_prepare_input($_POST['customers_group_id']) : 0 ;
+ try{
+ /*
+ * \brief test user is exists email address in db
+ */
+ if ( strlen($testobj->customers_email_address) < 3)
+ throw new Exception(__('entry email address error please add email'));
- $global_product_notifications = tep_db_prepare_input($_POST['global_product_notifications']);
+ if ( self::$action =='insert' && sqlcustomer::fetch(array('email'=>$testobj->customers_email_address) ) != false )
+ throw new Exception(__('entry email address error exists'));
- try{
- if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_FIRST_NAME_MIN_LENGTH);
- if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_LAST_NAME_MIN_LENGTH);
+ if (strlen($testobj->customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH)
+ throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_FIRST_NAME_MIN_LENGTH);
+ if (strlen($testobj->customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH)
+ throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_LAST_NAME_MIN_LENGTH);
if (_cst_bool('ACCOUNT_DOB'))
- if (!checkdate(substr(tep_date_raw($customers_dob), 5, 2), substr(tep_date_raw($customers_dob), 8, 2), substr(tep_date_raw($customers_dob), 0, 4))) throw new Exception(__("Le format de la date de naissance n'est pas correct"));
- if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) throw new Exception(__("L'adresse email es trop courte, min:").ENTRY_EMAIL_ADDRESS_MIN_LENGTH);
- if (!self::tep_validate_email($customers_email_address))throw new Exception(__("L'adresse email n'est pas correct"));
- if (strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH)throw new Exception(__("Le numero de téléphone est trop court"));
+ if (!checkdate(substr(tep_date_raw($testobj->customers_dob), 5, 2), substr(tep_date_raw($testobj->customers_dob), 8, 2), substr(tep_date_raw($testobj->customers_dob), 0, 4)))
+ throw new Exception(__("Le format de la date de naissance n'est pas correct"));
+ if (strlen($testobj->customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) throw new Exception(__("L'adresse email est trop courte, min:").ENTRY_EMAIL_ADDRESS_MIN_LENGTH);
+ if (!self::tep_validate_email($testobj->customers_email_address))throw new Exception(ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
+ if (strlen($testobj->customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH)throw new Exception(__("Le numero de téléphone est trop court"));
+ $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
+ while($extra_fields = tep_db_fetch_array($extra_fields_query)){
+ if(strlen($_post['fields_' . $extra_fields['fields_id']]) < $extra_fields['fields_size'])throw new Exception(sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']) );
+ }
+
}catch(Exception $e){
$messageStack->add($e->getMessage(), 'error');
- self::$error=true;
+ $error=true;
}
- if (self::$error == false) {
+ if(self::$action =='insert'){
+ $array['password']=$mdp=self::randomize();
+ $array['email']=$array['sqlarray']['customers_email_address'];
+ $_id=sqlcustomer::create($array);
+ $result=sqlcustomer::fetch(array('id'=>$_id), false );
+ }
+ else{
+ $array['id']=$_id=tep_db_prepare_input(self::$cID);
+ $result=sqlcustomer::update($array, false);
+ }
- $sql_data_array = array('customers_firstname' => $customers_firstname,
- 'customers_lastname' => $customers_lastname,
- 'customers_email_address' => $customers_email_address,
- 'customers_telephone' => $customers_telephone,
- 'customers_fax' => $customers_fax,
- 'customers_newsletter' => $customers_newsletter,
- 'customers_group_ra' => $customers_group_ra,
- 'customers_group_id' => $customers_group_id,
- 'customers_shopping_points' => ((isset($_POST['customers_shopping_points'])) ? (int)tep_db_prepare_input($_POST['customers_shopping_points']) : 0) );
+ if( is_array($result) ){
- if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['customers_gender'] = $customers_gender;
- if (_cst_bool('ACCOUNT_DOB')) $sql_data_array['customers_dob'] = tep_date_raw($customers_dob);
+ /**
+ @remarks Notify customer by email
+ TODO: Deport le template email dans dossier documents
+ */
+ if(isset($_POST['new_customers_notif'])) {
- self::$modules->load_post_values($_POST);
- $sql_data_array = array_merge($sql_data_array, self::$modules->update_table_prim());
- tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "'");
+ $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,
+ '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);
+ }
- self::$modules->load_post_values($_POST);
- $sql_data_array = array_merge($sql_data_array, self::$modules->update_table_second());
- $DB->query("update " . TABLE_CUSTOMERS_INFO . " set global_product_notifications = '".$global_product_notifications."' where customers_info_id = '" . (int)$customers_id . "'");
+ if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME));
+ else tep_redirect(tep_href_link(self::FILENAME, 'cID=' .$_id.'&action=edit'));
- self::$modules->after_update((int)$customers_id);
-
- if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME));
- else tep_redirect(tep_href_link(self::FILENAME, 'cID=' .$customers_id.'&action=edit'));
-
-
- } else if (self::$error == true) {
+ } else /*if (self::$error == true) */{
+ $_POST['customers_gender']='m';
$cInfo = new objectInfo($_POST);
- self::$processed = true;
- $dest_form='update';
+ if(self::$action =='insert')
+ $dest_form='insert';
+ else
+ $dest_form='update';
}
break;
case 'deleteconfirm':
$customers_id = tep_db_prepare_input(self::$cID);
- $this->userDelete($customers_id);
+ $result=sqlcustomer::delete(array('id'=>$customers_id));
tep_redirect(tep_href_link(self::FILENAME));
break;
case 'new':
$dest_form='insert';
- $array=array(
- 'customers_gender'=>'',
- 'customers_firstname'=>'',
- 'customers_lastname'=>'',
- 'customers_email_address'=>'',
- 'customers_telephone'=>'',
- 'customers_fax'=>'',
- 'customers_newsletter'=>'',
- 'global_product_notifications'=>'',
- 'customers_group_ra'=> '',
- 'customers_default_address_id'=>'',
- 'customers_dob'=>'',
- 'customers_group_id'=>0,
- 'customers_shopping_points'=>0);
+ $array=sqlcustomer::Specimen(array(),false);
+
self::$cInfo = new objectInfo($array);
+
break;
case 'noedit':
self::$processed=true;
@@ -278,11 +272,11 @@
/*
A module has asked to privately take care of this action, check if class and method exist and run it.
*/
- 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']);
- }
+ 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']);
+ }
}
return $_return;
@@ -352,33 +346,13 @@
- /** aca */ self::$modules->get_header_js(self::$action);
+ /** aca */ self::$modules->get_header_js(self::$action);
}
public static function load_db_values($ID){
- global $languages_id;
-
- $DB=Database::getInstance();
-
- // base customers
- $query_raw = "select c.customers_id, c.customers_lastname, c.customers_gender, c.customers_dob, c.customers_newsletter,c.customers_firstname,c.customers_default_address_id, c.customers_email_address,c.customers_group_ra, c.customers_telephone, c.customers_fax, a.entry_country_id,c.customers_group_id,c.customers_language , cg.customers_group_name, c.customers_shopping_points, c.customers_discount from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join " . TABLE_CUSTOMERS_GROUPS . " cg on c.customers_group_id = cg.customers_group_id WHERE c.customers_id='".$ID."'" ;
- $pq=$DB->query($query_raw);
- if(!$pq->__get('numRows')) return false;
- $customers = $pq->fetchAssoc();
- $pq->__destruct();
-
- // info detal customers
- $customers['countries_name']=tep_get_country_name($customers['entry_country_id']);
- $info_query = $DB->query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons , global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customers['customers_id'] . "'");
- $class_s='';
- $info = $info_query->fetchAssoc();
- // nbre commande
- $info_query = $DB->query("select orders_id from " . TABLE_ORDERS. " where customers_id = '" . $customers['customers_id'] . "'");
- $det=$info_query->fetchAllAssoc();
- $info['orders'] =count($det);
- $info['orders_detail']=$det;
- self::$cInfo=new objectInfo(array_merge((array)$customers,(array)$info));
+ $arry=sqlcustomer::fetch(array('id'=>(int)$ID),false);
+ return self::$cInfo= new objectInfo($arry);
}
/**
@@ -467,6 +441,8 @@
);
}
+
+
public static function tep_get_modele(){
return array( 0 =>false,
'customers_id' =>true,
@@ -588,111 +564,7 @@
}
- /**
- * \fn userCreate($_post)
- * \brief creat user
- * @param unknown_type $_post
- */
- public function userCreate($_post){
- global $languages_id,$messageStack;
- $customers_firstname = tep_db_prepare_input($_post['customers_firstname']);
- $customers_lastname = tep_db_prepare_input($_post['customers_lastname']);
- $customers_email_address = tep_db_prepare_input($_post['customers_email_address']);
- $customers_telephone = tep_db_prepare_input($_post['customers_telephone']);
- $customers_fax = tep_db_prepare_input($_post['customers_fax']);
- $customers_newsletter = tep_db_prepare_input($_post['customers_newsletter']);
- $customers_group_ra = (int)tep_db_prepare_input($_post['customers_group_ra']);
- $customers_gender = tep_db_prepare_input($_post['customers_gender']);
- if (_cst_bool('ACCOUNT_DOB')) $customers_dob = tep_db_prepare_input($_post['customers_dob']);
- //$default_address_id = tep_db_prepare_input($_POST['default_address_id']);
- $global_product_notifications = tep_db_prepare_input($_post['global_product_notifications']);
-
- try{
- /*
- * \brief test user is exists email address in db
- */
- if (!self::userTestNotExists($customers_email_address))throw new Exception(__('entry email address error exists'));
-
- if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_FIRST_NAME_MIN_LENGTH);
- if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) throw new Exception(__("Le nombre de caractéres ne suffit pour le nom, min:").ENTRY_LAST_NAME_MIN_LENGTH);
- if (_cst_bool('ACCOUNT_DOB'))
- if (!checkdate(substr(tep_date_raw($customers_dob), 5, 2), substr(tep_date_raw($customers_dob), 8, 2), substr(tep_date_raw($customers_dob), 0, 4))) throw new Exception(__("Le format de la date de naissance n'est pas correct"));
-
- if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) throw new Exception(__("L'adresse email est trop courte, min:").ENTRY_EMAIL_ADDRESS_MIN_LENGTH);
- if (!self::tep_validate_email($customers_email_address))throw new Exception(ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
- if (strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH)throw new Exception(__("Le numero de téléphone est trop court"));
-
- $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
- while($extra_fields = tep_db_fetch_array($extra_fields_query)){
- if(strlen($_post['fields_' . $extra_fields['fields_id']]) < $extra_fields['fields_size'])throw new Exception(sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']) );
- }
-
- }catch(Exception $e){
- $messageStack->add($e->getMessage(), 'error');
- self::$error=true;
- }
-
- if (self::$error == false) {
-
- $mdp=self::randomize();
-
- $sql_data_array = array('customers_firstname' => $customers_firstname,
- 'customers_lastname' => $customers_lastname,
- 'customers_email_address' => $customers_email_address,
- 'customers_telephone' => $customers_telephone,
- 'customers_fax' => $customers_fax,
- 'customers_password'=>$mdp,
- 'customers_newsletter' => $customers_newsletter,
- 'customers_group_ra' => $customers_group_ra );
-
- if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['customers_gender'] = $customers_gender;
- if (_cst_bool('ACCOUNT_DOB')) $sql_data_array['customers_dob'] = tep_date_raw($customers_dob);
-
- self::$modules->load_post_values($_post);
- $sql_data_array = array_merge($sql_data_array, self::$modules->insert_table_prim () );
-
- $_return= $sql_data_array;
-
- $resobj=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
-
- $lastid=tep_db_insert_id($resobj);
-
- $sql_data_array = array('customers_info_id' => $lastid,
- 'customers_info_date_account_created' => 'now()',
- 'global_product_notifications' => $global_product_notifications);
-
- $_return=array_merge($_return,$sql_data_array);
-
- tep_db_perform(TABLE_CUSTOMERS_INFO, $sql_data_array);
-
- self::$modules->load_post_values(array_merge(array('customers_id'=>$lastid),$_post) );
- $sql_data_array = array_merge($sql_data_array, self::$modules->insert_table_second() );
-
- $_return=array_merge($_return,$sql_data_array,array('customers_id'=>$lastid));
-
- return $_return;
- }
- else
- return false;
-
- }
-
- /**
- * \fn userDelete($customers_id)
- * \brief delete user
- * @param unknown_type $customers_id
- */
- public function userDelete($customers_id){
- tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'");
- tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customers_id . "'");
- tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customers_id . "'");
- tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customers_id . "'");
- tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$customers_id . "'");
-
- self::$modules->deleteconfirm_account ($customers_id);
- }
-
/** Private specific module */
private static function randomize() {
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2011-11-16 18:22:01 UTC (rev 3880)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2011-11-16 22:41:28 UTC (rev 3881)
@@ -57,9 +57,12 @@
@param object $export
*/
public static $export;
+ /**
+ @param string $view for select filter view
+ */
+ public static $view;
-
/**
class constructor
*/
@@ -76,7 +79,8 @@
self::$code=__CLASS__;
- self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$view=(isset($_REQUEST['view'])? (string)$_REQUEST['view'] : 'opened' );
self::$oID=(isset($_REQUEST['oID'])? $_REQUEST['oID'] : '' );
@@ -104,7 +108,8 @@
//! active datatable in ajax, precise les GET necessaire
define('JSONSTATMENT', 'mod=page&type='.self::$code.
(isset(parent::$action)?'&action='.parent::$action : '' ).
- (isset(self::$oID)?'&oID='.self::$oID : '' )
+ (isset(self::$oID)?'&oID='.self::$oID : '' ).
+ (isset(self::$view)?'&view='.self::$view : '' )
);
//! detail item in ajax
@@ -383,8 +388,21 @@
$adjust->sWhere);
}
- $query_raw = "select distinct o.orders_id,o.orders_prefix, o.customers_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.status_name as orders_status_name, s.status_color as orders_status_color, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_STATUS . " s where o.orders_status = s.status_id and s.status_type='orders' and s.language_id = '" . (int)$adjust->languages_id . "' and ot.class = 'ot_total' ".$adjust->sWhere." order by ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 'o.orders_id DESC');
+ $wh='';
+ if(self::$view =='opened')
+ $wh .=" AND SUBSTRING(o.orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(o.orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_COMPLETED."' ";
+ elseif(self::$view =='nopayed')
+ $wh .=" AND o.orders_status >=0 AND SUBSTRING(o.orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(o.orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_PAYED."' ";
+ elseif(self::$view =='allnoclosed')
+ $wh .=" AND o.orders_status >=0 ";
+ elseif(self::$view =='all')
+ $wh .='';
+ elseif(self::$view =='thisday')
+ $wh .=' AND SUBSTRING(o.date_purchased,1,10) =\''.date('Y-m-d').'\' ';
+
+ $query_raw = "select distinct o.orders_id,o.orders_prefix, o.customers_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.status_name as orders_status_name, s.status_color as orders_status_color, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_STATUS . " s where o.orders_status = s.status_id and s.status_type='orders' ".$wh." and s.language_id = '" . (int)$adjust->languages_id . "' and ot.class = 'ot_total' ".$adjust->sWhere." order by ".((!empty($adjust->sOrder)) ? $adjust->sOrder : 'o.orders_id DESC');
+
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-16 18:22:01 UTC (rev 3880)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-16 22:41:28 UTC (rev 3881)
@@ -315,7 +315,13 @@
#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 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; }
+ #central form p input[type="radio"],
+ #central form p input[type="checkbox"] { float:right; margin:5px 15px; width:20px; }
+
+ #central form .input-multi input[type="radio"]{float:none;}
+
#central form#configuration p input[type="text"] { margin:5px 15px;width:60%; }
#central form label { white-space:nowrap; display: inline-block; font-weight: bold; line-height: 18px; margin: 5px 5px 5px 0; padding: 0 0 2px; text-align: left; width: 20%;}
#central form textarea{ vertical-align:baseline;}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-16 18:22:11
|
Revision: 3880
http://oscss.svn.sourceforge.net/oscss/?rev=3880&view=rev
Author: oscim
Date: 2011-11-16 18:22:01 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
suite travail template public 2cShopHtml5
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/ssheader.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
Added Paths:
-----------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
Removed Paths:
-------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Top.css
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2011-11-16 14:25:27 UTC (rev 3879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2011-11-16 18:22:01 UTC (rev 3880)
@@ -49,14 +49,9 @@
<meta name="generator" content="osCSS-2" />
<base href="<?php echo tep_get_httpdir() ; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.$template.'/'; ?>sample.css" media="all"/>
- <!--[if IE 6]>
+ <!--[if IE ]>
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.$template.'/'; ?>iecss.css" />
<![endif]-->
- <!--<if LT IE8>
- <script type="text/css">
- .checkoutBar li { display:inline!important; }
- </script>
- <endif>-->
<script type="text/javascript" src="<?php echo 'templates/'.$template.'/'; ?>js/boxOver.js"></script>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/ssheader.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/ssheader.php 2011-11-16 14:25:27 UTC (rev 3879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/ssheader.php 2011-11-16 18:22:01 UTC (rev 3880)
@@ -29,7 +29,9 @@
*/
$boxe =$page->oscss_boxes->_return('Widget_search_suggest'); ?>
<div id="<?php echo $boxe->name_clean; ?>Box" class="<?php echo $boxe->name_clean; ?>">
- <?php include('boxe.php'); ?>
+ <section id="Box-<?php echo $boxe->name_clean; ?>" class="boxe">
+ <?php echo unhtmlentities($boxe->content) ?>
+ </section>
</div>
<div class="languages">
@@ -38,7 +40,9 @@
@remarks Call widget boxe serach suggest
*/
$boxe =$page->oscss_boxes->_return('languages'); ?>
- <?php include('boxe.php'); ?>
+ <section id="Box-<?php echo $boxe->name_clean; ?>" class="boxe">
+ <?php echo unhtmlentities($boxe->content) ?>
+ </section>
</div>
</div>
Copied: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css (from rev 3877, trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Top.css)
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css (rev 0)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2011-11-16 18:22:01 UTC (rev 3880)
@@ -0,0 +1,151 @@
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @subpackage Template 2cShopHtml5Oscim
+ @package osCSS-2 <www http://www.oscss.org>
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+
+/* Hx tags */
+
+/* ------------ Structure ------------ */
+
+ header#top {
+ height:130px;
+ }
+
+ #logo {
+ width:250px;
+ float:left;
+ }
+
+ #logo p,
+ #logo h1 {
+ padding: 20px 0;
+ }
+
+
+
+
+ #top_bar {
+ float:left;
+ position:relative;
+ left:260px
+ }
+
+
+
+ nav {
+ position: absolute;
+ width: inherit;
+ height:45px;
+ }
+
+
+
+ section#intro {
+ margin-top: 57px;
+ width: inherit;
+ }
+
+ #intro .intro.content {padding: 12px;}
+
+
+ nl#breadcrumbs {
+ margin-top: 12px;
+ margin-bottom: 12px;
+ clear: both;
+ float: left;
+ height: 25px;
+ padding: 5px 12px;
+ position: relative;
+ top: 22px;
+ width: inherit;
+}
+
+
+/* ------------ Habillage ------------ */
+/* voir fichier Habillage.css */
+
+ /*header {
+ }*/
+
+ #logo p,
+ #logo h1 {
+ padding: 20px 0;
+ }
+
+
+ /* #top_bar {
+ }*/
+
+
+
+ nav ul {
+ margin: 0 auto;
+ width: inherit;
+ }
+
+ nav ul li {
+ float: left;
+ }
+
+ nav ul li a {
+ display: block;
+ margin-right: 20px;
+ width: 100px;
+ line-height: 44px;
+ }
+
+
+
+ div#top_bar {
+ width: 450px;
+ padding:0;
+ height:45px;
+ }
+ div#top_bar div{float:left; padding:12px;}
+
+
+
+
+ #intro h1,
+ #intro h2,
+ #intro p {
+ position: relative;
+ z-index: 9999;
+ width: 800px;
+ }
+
+ #intro h1,
+ #intro h2 {
+ padding: 0 0 20px 0;
+ }
+
+
+
+
+
+
+
+/* Bottom */
+
+ /* footer */
+ footer {
+ clear: both;
+ width: 960px;
+ height:80px;
+ margin-bottom: 10px;
+
+ }
+
+ footer p {
+ padding-right: 20px;
+ }
+
+
+
+
+ footer div {margin:0; padding:0; width:33%; float:left; display:block; height:100%; }
\ No newline at end of file
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Top.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Top.css 2011-11-16 14:25:27 UTC (rev 3879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Top.css 2011-11-16 18:22:01 UTC (rev 3880)
@@ -1,164 +0,0 @@
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @subpackage Template 2cShopHtml5Oscim
- @package osCSS-2 <www http://www.oscss.org>
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-
-/* Hx tags */
-
-/* ------------ Structure ------------ */
-
- header#top {
- height:130px;
- }
-
- #logo {
- width:250px;
- float:left;
- }
-
- #logo p,
- #logo h1 {
- padding: 20px 0;
- }
-
-
-
-
- #top_bar {
- float:left;
- position:relative;
- left:260px
- }
-
-
-
- nav {
- position: absolute;
- width: inherit;
- height:45px;
- }
-
-
-
- section#intro {
- margin-top: 57px;
- width: inherit;
- }
-
- #intro .intro.content {padding: 12px;}
-
-
- nl#breadcrumbs {
- margin-top: 12px;
- margin-bottom: 12px;
- clear: both;
- float: left;
- height: 25px;
- padding: 5px 12px;
- position: relative;
- top: 22px;
- width: inherit;
-}
-/* ------------ Habillage ------------ */
-
- /*header {
- }*/
-
- #logo p,
- #logo h1 {
- padding: 20px 0;
- color: #FFF;
- font-size: 28px;
- }
-
-
- /* #top_bar {
- }*/
-
-
- nav {
- background: url("../images/navbg.png");
- /* curved border radius */
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
- }
-
- nav ul {
- margin: 0 auto;
- width: inherit;
- list-style: none;
- }
-
- nav ul li {
- float: left;
- }
-
- nav ul li a {
- display: block;
- margin-right: 20px;
- width: 100px;
- font-size: 16px;
- font-weight: bold;
- line-height: 44px;
- text-align: center;
- text-decoration: none;
- color: #b4e3ec;
- }
-
- nav ul li a:hover {
- color: #fff;
- }
-
- nav ul li.selected a {
- color: #fff;
- }
-
-
-
-
- section#intro {
- background: #778899 url("../images/introbkg.png") repeat-x;
-
- /* background size */
- -webkit-background-size: 100%;
- -o-background-size: 100%;
- -khtml-background-size: 100%;
-
-
- /* curved border radius */
- -moz-border-radius: 20px;
- -webkit-border-radius: 20px;
- }
-
- #intro h1,
- #intro h2,
- #intro p {
- position: relative;
- z-index: 9999;
- width: 800px;
- }
-
- #intro h1,
- #intro h2 {
- padding: 0 0 20px 0;
- font-weight: normal;
- color: #333;
- }
-
- #intro p {
- color: #5D4A3D;
- }
-
-
-
-/* nav */
-
-
-/* intro */
-
-
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css 2011-11-16 14:25:27 UTC (rev 3879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css 2011-11-16 18:22:01 UTC (rev 3880)
@@ -43,6 +43,11 @@
}
+ div.CguView {
+ text-align: justify;
+ border:1px solid black;
+ background:white;
+ }
@@ -193,3 +198,121 @@
article.product.single figure ul{
list-style:none;
}
+
+
+
+
+
+/* Section habillage Top.css */
+
+
+ /*header {
+ }*/
+
+ #logo p,
+ #logo h1 {
+ color: #FFF;
+ font-size: 28px;
+ }
+
+
+ /* #top_bar {
+ }*/
+
+
+ nav {
+ background: url("../images/navbg.png");
+ /* curved border radius */
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ }
+
+ nav ul {
+ list-style: none;
+ }
+
+
+ nav ul li a {
+ font-size: 16px;
+ font-weight: bold;
+ line-height: 44px;
+ text-align: center;
+ text-decoration: none;
+ color: #b4e3ec;
+ }
+
+ nav ul li a:hover {
+ color: #fff;
+ }
+
+ nav ul li.selected a {
+ color: #fff;
+ }
+
+
+ div#top_bar {
+ -moz-border-radius: 10px 10px 10px 10px;
+ background: url("../images/navbg.png") repeat scroll 0 0 transparent;
+ }
+
+
+ section#intro {
+ background: #778899 url("../images/introbkg.png") repeat-x;
+
+ /* background size */
+ -webkit-background-size: 100%;
+ -o-background-size: 100%;
+ -khtml-background-size: 100%;
+
+
+ /* curved border radius */
+ -moz-border-radius: 20px;
+ -webkit-border-radius: 20px;
+ }
+
+
+
+ #intro h1,
+ #intro h2 {
+ font-weight: normal;
+ color: #333;
+ }
+
+ #intro p {
+ color: #5D4A3D;
+ }
+
+
+
+
+
+/* Footer habillage section*/
+/* footer */
+footer {
+ background: #222;
+ color: #fff;
+
+ /* curved border radius */
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ }
+
+footer p {
+ text-align: right;
+ font-size: 11px;
+ }
+
+footer a {
+ color: #999;
+ }
+
+footer a:hover {
+ color: #FFF;
+ text-decoration: none;
+ }
+
+footer div { text-align:left;}
+
+footer div.center_footer{
+text-align:center;
+}
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml 2011-11-16 14:25:27 UTC (rev 3879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/desc.xml 2011-11-16 18:22:01 UTC (rev 3880)
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
<name>2cShopHtml5Oscim</name>
- <version>1</version>
+ <version>1.0.0</version>
<author>oscim</author>
- <desc>Thème generic, 2 colonnes, classique ecommerce. Html5 </desc>
+ <desc>Thème generic, 2 colonnes, classique ecommerce. <br />
+ Ce template exploite jquery et des plugins pour jquery.<br />
+ Html5 </desc>
<thumb>thumb.jpg</thumb>
</template>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-11-16 14:25:27 UTC (rev 3879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-11-16 18:22:01 UTC (rev 3880)
@@ -6,8 +6,7 @@
@encode UTF-8
*/
-@import url("Css/Top.css");
-@import url("Css/Bottom.css");
+@import url("Css/BottomTop.css");
@import url("Css/Sitemap.css");
@import url("Css/habillage.css");
@@ -34,7 +33,20 @@
.tright {text-align:right}
-/* Block debugg template */
+
+/* Generalite*/
+
+html:lang(fr-ca) { quotes: '« ' ' »' }
+html:lang(de) { quotes: '»' '«' '\2039' '\203A' }
+:lang(fr) > Q { quotes: '« ' ' »' }
+:lang(de) > Q { quotes: '»' '«' '\2039' '\203A' }
+
+
+
+
+
+
+/* Block debugg public template */
#develop{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
@@ -54,14 +66,6 @@
-div.CguView {
- width:100%;
- overflow:auto;
- height:150px;
- text-align: justify;
- border:1px solid black;
- background:white;
-}
@@ -74,6 +78,7 @@
+
/* --------------------- Css theme ---------------------*/
@@ -101,6 +106,7 @@
table { width:100%}
+ ul{padding-left:20px;}
/* standard alignments */
.alignleft { float: left; }
@@ -117,9 +123,13 @@
.messageStack {margin:5px 0; padding:0;}
.messageStack li{padding:5px 12px;}
+ div.CguView {
+ width:100%;
+ overflow:auto;
+ height:150px;
+ }
-
/* Hx tags */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-16 14:25:34
|
Revision: 3879
http://oscss.svn.sourceforge.net/oscss/?rev=3879&view=rev
Author: oscim
Date: 2011-11-16 14:25:27 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
coquille sur appel des drivers de db
Modified Paths:
--------------
trunk/catalog/install/includes/functions/database.php
Modified: trunk/catalog/install/includes/functions/database.php
===================================================================
--- trunk/catalog/install/includes/functions/database.php 2011-11-16 12:58:51 UTC (rev 3878)
+++ trunk/catalog/install/includes/functions/database.php 2011-11-16 14:25:27 UTC (rev 3879)
@@ -12,7 +12,7 @@
function osc_db_connect($motor, $port, $charset, $server, $username, $password, $database/*,$type*/) {
- if(!defined('DB_CONNECTOR'))
+ if(defined('DB_CONNECTOR'))
return false;
define('HTTP_SERVER',true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-16 12:58:58
|
Revision: 3878
http://oscss.svn.sourceforge.net/oscss/?rev=3878&view=rev
Author: oscim
Date: 2011-11-16 12:58:51 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
correction coquille
Ajout code pays
Correction template public in install
Correction lien SEO
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/functions/general.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/footer.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Bottom.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
trunk/catalog/install/includes/functions/database.php
trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql
Modified: trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab 2011-11-16 12:58:51 UTC (rev 3878)
@@ -12,7 +12,7 @@
<div class="main-customers history noedit">
- <table class="dataTableBase">
+ <table class="dataTableBase Sort">
<thead>
<tr>
<th><?php echo __('history table heading type') ?></th>
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/common/classes/seo_url.php 2011-11-16 12:58:51 UTC (rev 3878)
@@ -173,7 +173,7 @@
FILENAME_POPUP_IMAGE,
FILENAME_PRODUCT_INFO,
FILENAME_CONTENT,
- FILENAME_CREATE_ACCOUNT,
+// FILENAME_CREATE_ACCOUNT,
FILENAME_ADVANCED_SEARCH,
FILENAME_PRODUCTS_NEW,
FILENAME_SMALL_PRICE,
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/includes/functions/general.php 2011-11-16 12:58:51 UTC (rev 3878)
@@ -252,61 +252,73 @@
*/
function tep_word_count($string, $needle) { return sizeof(preg_split('/'.$needle.'/', $string)); }
- function tep_count_modules($modules = '') {
- $count = 0;
+/**
+ @fn tep_count_modules($modules = '', $active=true)
+ @brief Count module active for payement or shipping
+ Explode string separated by ; in array
+ @note the class master shipping/payment/order_total is required
+ @param $modules string result constant MODULE_PAYMENT_INSTALLED
+ @param $active boolean for test active module or just count
+ @return int
+*/
+function tep_count_modules($modules = '', $active=true) {
+ $count = 0;
- if (empty($modules)) return $count;
+ if (empty($modules)) return $count;
- $modules_array = preg_split('/;/', $modules);
-
- for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
- $class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.'));
-
- if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) {
- if ($GLOBALS[$class]->enabled) {
- $count++;
- }
+ $modules_array = preg_split('/;/', $modules);
+ for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
+ $class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.'));
+ if ($active && isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) {
+ if ($GLOBALS[$class]->enabled) {
+ $count++;
}
}
-
- return $count;
}
- /**
- * \brief enresgitrement cookies
- * @param $name
- * @param $value
- * @param $expire
- * @param $path
- * @param $domain
- * @param $secure
- */
+ return $count;
+}
+
+/**
+ * \brief enresgitrement cookies
+ * @param $name
+ * @param $value
+ * @param $expire
+ * @param $path
+ * @param $domain
+ * @param $secure
+ */
function tep_setcookie($name, $value = '', $expire = 0, $path = '/', $domain = '', $secure = 0) {
setcookie($name, $value, $expire, $path, (tep_not_null($domain) ? $domain : ''), $secure);
}
- function tep_get_ip_address() {
- if (isset($_SERVER)) {
- if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
- $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
- } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
- $ip = $_SERVER['HTTP_CLIENT_IP'];
- } else {
- $ip = $_SERVER['REMOTE_ADDR'];
- }
+/**
+ @fn tep_get_ip_address()
+ @brief retrun ip client
+ @return ip (string)
+*/
+function tep_get_ip_address() {
+ if (isset($_SERVER)) {
+ if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
+ $ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
- if (getenv('HTTP_X_FORWARDED_FOR')) {
- $ip = getenv('HTTP_X_FORWARDED_FOR');
- } elseif (getenv('HTTP_CLIENT_IP')) {
- $ip = getenv('HTTP_CLIENT_IP');
- } else {
- $ip = getenv('REMOTE_ADDR');
- }
+ $ip = $_SERVER['REMOTE_ADDR'];
}
-
- return $ip;
+ } else {
+ if (getenv('HTTP_X_FORWARDED_FOR')) {
+ $ip = getenv('HTTP_X_FORWARDED_FOR');
+ } elseif (getenv('HTTP_CLIENT_IP')) {
+ $ip = getenv('HTTP_CLIENT_IP');
+ } else {
+ $ip = getenv('REMOTE_ADDR');
+ }
}
+ return $ip;
+}
+
/** nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n) */
function tep_convert_linefeeds($from, $to, $string) { return str_replace($from, $to, $string); }
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/footer.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/footer.php 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/footer.php 2011-11-16 12:58:51 UTC (rev 3878)
@@ -5,19 +5,24 @@
@package osCSS-2 <www http://www.oscss.org>
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+
+ @note La Licence OpenSource d'osCSS, vous impose de conserver le liens vers le site de la communauté. C'est la seul contrepartie imposé part l'utilisation de cette solution , qui est diffusé gratuitement, dans le cadre de ca licence.
+ Si vous supprimer la référence à osCSS, la commuanté se reserve le droit de faire valoir ces droits aupres des organisme dedié à la protection de cette licence.
+
+ CE template est livré gratuitement pour donner un aperçu des disponibilités du moteur de templates.
+ Veuillez respecter les termes et conditions générales d'utilisation.
+ Vous pouvez employer nos templates sous n'importe quel site Web publiquement accessible selon les termes et conditions générales du contrat Creative Commons
*/
global $template;
?>
<footer id="main-tpl-footer">
- <p class="left_footer"></p>
- <p class="center_footer">
- ~ Realisation <a href="http://www.oscim.fr">oscim</a> 2010-2011 ~<br />
+ <div class="left_footer"></div>
+ <div class="center_footer">
+ ~ Realisation <a href="http://www.oscim.fr">oscim</a> 2010-<?php echo date('Y') ?> ~<br />
~ Propulsé par <a href="http://www.oscss.org/" title=" osCSS ">osCSS</a> ~<br />
~ Valid <a href="http://validator.w3.org/check?uri=referer" title=" validate XHTML ">XHTML</a>
· <a href="http://jigsaw.w3.org/css-validator/check/referer" title=" validate CSS ">CSS</a> ~
- <br />
- <a href="http://csscreme.com" rel="nofollow" ><img alt="csscreme" src="<?php echo tep_get_httpdir().'templates/'.$template.'/' ?>images/csscreme.jpg" /></a>
- </p>
+ </div>
<div class="right_footer">
<a href="<?php echo tep_href_link() ?>"><?php echo __('home') ?></a>
<a href="<?php echo tep_href_link(FILENAME_TEMPLATE) ?>"><?php echo __('about') ?></a>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Bottom.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Bottom.css 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Bottom.css 2011-11-16 12:58:51 UTC (rev 3878)
@@ -12,6 +12,7 @@
clear: both;
background: #222;
width: 960px;
+ height:80px;
color: #fff;
margin-bottom: 10px;
@@ -34,3 +35,9 @@
color: #FFF;
text-decoration: none;
}
+
+footer div {margin:0; padding:0; width:33%; float:left; display:block; height:100%; text-align:left;}
+
+footer div.center_footer{
+text-align:center;
+}
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-11-16 12:58:51 UTC (rev 3878)
@@ -35,15 +35,45 @@
/* Block debugg template */
- #develop{background:white none repeat scroll 0 0; border:1px solid black; padding:1em; position:fixed; right:0; top:0;}
+ #develop{
+ opacity:0.4;
+ filter:alpha(opacity=40); /* For IE8 and earlier */
+ color:black;
+ line-height:17px;
+ background:white none repeat scroll 0 0
+ ; border:1px solid black;
+ padding:1em;
+ position:fixed;
+ right:0;
+ top:0;
+ }
+ #develop p {padding:0; margin:0;}
+div.CguView {
+ width:100%;
+ overflow:auto;
+ height:150px;
+ text-align: justify;
+ border:1px solid black;
+ background:white;
+}
+
+
+
+
+
+
+
+
+
+
/* --------------------- Css theme ---------------------*/
@@ -69,6 +99,8 @@
background: #ff8300;
}
+ table { width:100%}
+
/* standard alignments */
.alignleft { float: left; }
@@ -261,3 +293,8 @@
float:left;
margin:5px 5px;
}
+
+
+
+
+.CartQty{ width:15px;}
\ No newline at end of file
Modified: trunk/catalog/install/includes/functions/database.php
===================================================================
--- trunk/catalog/install/includes/functions/database.php 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/install/includes/functions/database.php 2011-11-16 12:58:51 UTC (rev 3878)
@@ -11,8 +11,11 @@
function osc_db_connect($motor, $port, $charset, $server, $username, $password, $database/*,$type*/) {
+
+ if(!defined('DB_CONNECTOR'))
+ return false;
+
define('HTTP_SERVER',true);
-
define('DIR_WS_COMMON','');
define('DIR_FS_CATALOG',substr(dirname(__FILE__),0,strpos(dirname(__FILE__),'install/includes/functions') ).'/common/');
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql 2011-11-14 22:56:08 UTC (rev 3877)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql 2011-11-16 12:58:51 UTC (rev 3878)
@@ -249,7 +249,7 @@
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('236', 'Yugoslavia', 'Yugoslavia', 'YU', 'YUG', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('237', 'Zaire', 'Zaire', 'ZR', 'ZAR', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('238', 'Zambia', 'Zambia', 'ZM', 'ZMB', '1', '0');
-insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('239', 'Zimbabwe', 'Zimbabwe', 'ZW', 'ZWE', '1', '0');
+insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('239', 'Roumanie', 'Zimbabwe', 'ZW', 'ZWE', '1', '0');
+insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('240', 'Romania', 'Romania', 'RO', 'ROU', '1', '0');
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-14 22:56:16
|
Revision: 3877
http://oscss.svn.sourceforge.net/oscss/?rev=3877&view=rev
Author: oscim
Date: 2011-11-14 22:56:08 +0000 (Mon, 14 Nov 2011)
Log Message:
-----------
suite correction
Externalisation dans le configure du tableau de fichier utilise par le contructeur file_registered
Normalisation des modules de checkout
Ajout d'une class au constructor page : checkout
Report des conditions cgu dans une etape prealable, qui fonctionne en parallele avec les module aca type checkout
Ajout des cgu en module
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/classes/productUtility.php
trunk/catalog/admin/includes/content/modules.top.inc
trunk/catalog/admin/includes/exts/package/packageUtility.php
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
trunk/catalog/admin/includes/modules/configuration/modseourl.php
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/appli_top_Test.php
trunk/catalog/includes/application_top.php
trunk/catalog/includes/classes/AbstractAcaModule.php
trunk/catalog/includes/classes/page.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
trunk/catalog/install/includes/modele/configure.txt
Added Paths:
-----------
trunk/catalog/includes/classes/core_page/checkout.php
trunk/catalog/includes/modules/checkout/
trunk/catalog/includes/modules/checkout/PrCgu.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/checkout_before_process.php
Removed Paths:
-------------
trunk/catalog/includes/modules/checkout_process/
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -169,15 +169,16 @@
self::getInstance();
$DB=Database::getInstance();
+ $result=array();
// $languages_id = $option['language_id'];
$cat_list =array();
$list_languages=tep_get_languages();
- $sql ="AND ";
+ $sql ="";
if(isset($option['id'])){
$ID = (int) $option['id'];
- $sql .="AND p.content_id = '".(int)tep_db_input($option['id'])."' ";
+ $sql .="AND c.content_id = '".(int)tep_db_input($option['id'])."' ";
}
// if(isset($option['language_id'])){
@@ -185,54 +186,76 @@
// $sql .="AND pd.language_id = '".(int)tep_db_input($option['language_id'])."' ";
// }
-// $sql =substr($sql,3);
+ if(isset($option['catid'])){
+ $languages_id = (int)$option['catid'];
+ $sql .="AND c2c.categories_id = '".(int)tep_db_input($option['catid'])."' ";
+ }
+ $sql =substr($sql,3);
- $content_query = $DB->query("select c.content_id, content_name, date_added, last_modified, content_status from " . TABLE_CONTENT . " c where c.content_id = '" . (int)$ID . "' ");
- $cInfo_array = tep_db_fetch_array($content_query);
- tep_db_free_result($content_query);
- // call all langue for this post
- for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
- $language_id = $list_languages[$i]['id'];
- $content_query = $DB->query("select cd.content_text, cd.content_title from " . TABLE_CONTENT . " c, " . TABLE_CONTENT_DESCRIPTION . " cd where c.content_id = '" . (int)$ID . "' and c.content_id = cd.content_id and language_id='" . $language_id . "'");
- $content = tep_db_fetch_array($content_query);
- $cInfo_array['text'][$language_id] = $content['content_text'];
- $cInfo_array['title'][$language_id] = $content['content_title'];
- tep_db_free_result($content_query);
- }
+ $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); //c.content_id = '" . (int)$ID . "' ");
- $cat_query = $DB->query("select categories_id from " . TABLE_CONTENT_TO_CATEGORIES . " where content_id='" . (int)$ID . "' ");
+ $num = $res->__get('numRows');
+ if($num == 1)
+ $cInfo_array[] = $res->fetchAssoc();
+ else
+ foreach($res->fetchAllAssoc() as $row)
+ $cInfo_array[] = $row;
- while($cat_l = tep_db_fetch_array($cat_query)){ $cat_list[$cat_l['categories_id']]=$cat_l; }
- $cInfo_array['categories']=$cat_list;
+ tep_db_free_result($res);
- tep_db_free_result($cat_query);
+ foreach($cInfo_array as $row) {
- self::$modules->load_db_values($ID);
+ // call all langue for this post
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+ $language_id = $list_languages[$i]['id'];
+ $content_query = $DB->query("select cd.content_text, cd.content_title from " . TABLE_CONTENT . " c, " . TABLE_CONTENT_DESCRIPTION . " cd where c.content_id = '" . (int)$row['content_id'] . "' and c.content_id = cd.content_id and language_id='" . $language_id . "'");
+ $content = tep_db_fetch_array($content_query);
+ $row['text'][$language_id] = $content['content_text'];
+ $row['title'][$language_id] = $content['content_title'];
+ 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'] . "' ");
- return ((!$shortkey)? $cInfo_array : self::CleanKey($cInfo_array)) ;
-// if($num == 1){
-// $result=$res->fetchAssoc();
-// return self::CleanKey($result);
-// }
-// elseif($num > 1){
-// $array=array();
-//
-// foreach($res->fetchAllAssoc() as $lg)
-// $array[]= self::CleanKey($lg);
-//
-// return $array;
-// }
-// return false;
+ 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);
+
+
+ self::$modules->load_db_values((int)$row['content_id']);
+
+
+ $result[] = $row;
+ }
+
+
+
+// return ((!$shortkey)? $cInfo_array : self::CleanKey($cInfo_array)) ;
+
+ if($num == 1){
+ return ((!$shortkey)? $result[0] : self::CleanKey($result[0])) ;
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($result as $lg)
+ $array[]= ((!$shortkey)? $lg : self::CleanKey($lg));
+
+ return $array;
+ }
+
+ return false;
}
/**
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -35,8 +35,8 @@
/**
TODO : remplacer le nom de constante par un MODULE_CATEGORIES_INSTALLED_BO
*/
- self::$modules=new AcaFactory('categories','MODULE_ACACAT_INSTALLED_BO');
- self::$modules->set_image_handler();
+ self::$modules=new AcaFactory('orders','MODULE_ORDERS_INSTALLED_BO');
+// self::$modules->set_image_handler();
}
/**
@@ -69,54 +69,54 @@
else
$post = $option['post'];
- $list_languages=tep_get_languages();
+// $list_languages=tep_get_languages();
+//
+// $sql_data_array['date_added'] = 'now()';
+// $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
+// $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
+//
+// $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
+// $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
+//
+// // Put post value
+// self::$modules->load_post_values($post);
+//
+// self::$modules->get_insert_table_categories($sql_data_array,'');
+//
+// $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
+//
+//
+//
+// if(!$res)
+// return $res;
+// else
+// $categories_id = $res->__get('insertId');
+//
+// // cpath adjust
+// $sql_data_array=array();
+// $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($categories_id);
+// $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $categories_id . "'");
+//
+//
+// // table language adjust
+// $categories_name_array = $_POST['categories_name'];
+// $categories_desc_array = $_POST['categories_description'];
+//
+//
+// for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+// $language_id = $list_languages[$i]['id'];
+// $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
+// 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
+//
+// $insert_sql_data = array('categories_id' => $categories_id,
+// 'language_id' => $list_languages[$i]['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_categories_description (array(),$list_languages[$i]['id']));
+//
+// tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
+// }
- $sql_data_array['date_added'] = 'now()';
- $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
- $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
- $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
- $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
-
- // Put post value
- self::$modules->load_post_values($post);
-
- self::$modules->get_insert_table_categories($sql_data_array,'');
-
- $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
-
-
-
- if(!$res)
- return $res;
- else
- $categories_id = $res->__get('insertId');
-
- // cpath adjust
- $sql_data_array=array();
- $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($categories_id);
- $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $categories_id . "'");
-
-
- // table language adjust
- $categories_name_array = $_POST['categories_name'];
- $categories_desc_array = $_POST['categories_description'];
-
-
- for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
- $language_id = $list_languages[$i]['id'];
- $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
- 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
-
- $insert_sql_data = array('categories_id' => $categories_id,
- 'language_id' => $list_languages[$i]['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_categories_description (array(),$list_languages[$i]['id']));
-
- tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
- }
-
-
/// Child module, Call After Update process
self::$modules->after_update($id);
@@ -145,49 +145,49 @@
else
$post = $option['post'];
- $list_languages=tep_get_languages();
+// $list_languages=tep_get_languages();
+//
+// $sql_data_array = $option['sqlarray'];
+//
+// $sql_data_array['last_modified'] = 'now()';
+// $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
+// $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
+// $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($id,'category');
+// $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
+// $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
- $sql_data_array = $option['sqlarray'];
- $sql_data_array['last_modified'] = 'now()';
- $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
- $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
- $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($id,'category');
- $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
- $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
-
-
// Put post value
self::$modules->load_post_values($post);
- $sql_data_array=array_merge($sql_data_array, (array) self::$modules->get_update_table_categories($sql_data_array) );
+// $sql_data_array=array_merge($sql_data_array, (array) self::$modules->get_update_table_categories($sql_data_array) );
+//
+//
+// tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $id . "'");
+//
+// $categories_name_array = $post['categories_name'];
+// $categories_desc_array = $post['categories_description'];
+//
+//
+// for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+//
+// $language_id = (int)$list_languages[$i]['id'];
+// $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
+// 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
+//
+// $tabl=self::$modules->get_update_table_categories_description ($list_languages[$i]['id']);
+// $sql_data_array = array_merge($sql_data_array, $tabl);
+//
+// tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . $id . "' and language_id = '" . $language_id . "'");
+//
+// }
+//
+// // if ( !empty($_FILES['categories_image']['tmp_name']) ) {
+// // $categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES);
+// // tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");
+// // }
- tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $id . "'");
-
- $categories_name_array = $post['categories_name'];
- $categories_desc_array = $post['categories_description'];
-
-
- for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
-
- $language_id = (int)$list_languages[$i]['id'];
- $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
- 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
-
- $tabl=self::$modules->get_update_table_categories_description ($list_languages[$i]['id']);
- $sql_data_array = array_merge($sql_data_array, $tabl);
-
- tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . $id . "' and language_id = '" . $language_id . "'");
-
- }
-
-// if ( !empty($_FILES['categories_image']['tmp_name']) ) {
-// $categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES);
-// tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");
-// }
-
-
/// Child module, Call After Update process
self::$modules->after_update($id);
@@ -230,55 +230,59 @@
$ID = $option['id'];
}
- if( ! isset($option['language_id']) )
- self::$error = __('no language_id');
- else
- $languages_id = $option['language_id'];
+// if( ! isset($option['language_id']) )
+// self::$error = __('no language_id');
+// else
+// $languages_id = $option['language_id'];
- $sql ="SELECT * FROM " . TABLE_CATEGORIES . " c WHERE c.categories_id = '" . (int)$ID . "' "; //.substr($sql,3);
+ $sql ="SELECT orders_id as id FROM " . TABLE_ORDERS . " c WHERE c.orders_id = '" . (int)$ID . "' "; //.substr($sql,3);
$res=$DB->query($sql);
$num = $res->__get('numRows');
if($num == 1){
- $result = $res->fetchAssoc();
+ $resarray = $res->fetchAssoc();
- $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
+// $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
+//
+// foreach($check_q->fetchAllAssoc() as $catlg){
+// $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
+// $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
+// }
+// $result['products_count'] = categorieUtility::products_in_category_count($ID);
+// $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
+// $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
+// $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
+//
+// /// Childs module load
+// self::$modules->load_db_values($ID);
- foreach($check_q->fetchAllAssoc() as $catlg){
- $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
- $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
- }
- $result['products_count'] = categorieUtility::products_in_category_count($ID);
- $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
- $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
- $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
+ $result = new order((int)tep_db_input($resarray['id']));
- /// Childs module load
- self::$modules->load_db_values($ID);
-
return ((!$shortkey)? $result : self::CleanKey($result));
}
elseif($num > 1){
$array=array();
- foreach($res->fetchAllAssoc() as $result){
+ foreach($res->fetchAllAssoc() as $resarray){
- $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
+// $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
+//
+// foreach($check_q->fetchAllAssoc() as $catlg){
+// $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
+// $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
+// }
+// $result['products_count'] = categorieUtility::products_in_category_count($ID);
+// $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
+// $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
+// $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
+//
+// /// Childs module load
+// self::$modules->load_db_values($ID);
- foreach($check_q->fetchAllAssoc() as $catlg){
- $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
- $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
- }
- $result['products_count'] = categorieUtility::products_in_category_count($ID);
- $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
- $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
- $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
+ $result = new order((int)tep_db_input($resarray['id']));
- /// Childs module load
- self::$modules->load_db_values($ID);
-
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
}
@@ -373,7 +377,7 @@
public static function Specimen(){
$par = array(
- 'orders_id',
+ 'orders_id'=>'',
// 'configuration_key',
// 'configuration_title',
// 'configuration_value',
@@ -384,7 +388,157 @@
// 'last_modified',
// 'use',
// 'set',
+'info' => Array
+ (
+ 'orders_id' => '',
+ 'orders_prefix' => '',
+ 'currency' => '',
+ 'currency_value' =>'',
+ 'payment_method' => '',
+ 'cc_type' =>'',
+ 'cc_owner' =>'',
+ 'cc_number' => '',
+ 'cc_expires' =>'',
+ 'date_purchased' => '',
+ 'orders_status' => '',
+ 'orders_status_id' => '',
+ 'last_modified' =>'',
+ 'total' =>'',
+ 'shipping_method' =>'',
+ 'ip_address' => '',
+ 'total_weight' => '',
+ 'date_finish' =>'',
+ 'facture_id' =>'',
+ 'holding_origin_id' => '',
+ 'tax_groups' => Array
+ (
+ '19.6000' => '',
+ ),
+ ),
+
+ 'totals' => Array
+ (
+// '0' => Array
+// (
+// 'title' => Sous-Total:
+// 'text' => 7.18€
+// )
+//
+// '1' => Array
+// (
+// 'title' => dont TVA normal:
+// 'text' => 1.18€
+// )
+//
+// '2' => Array
+// (
+// 'title' => Total:
+// 'text' => <strong>7.18€</strong>
+// )
+
+ ),
+
+ 'products' => Array
+ (
+ '0' => Array
+ (
+ 'qty' => '',
+ 'id' => '',
+ 'type' => '',
+ 'name' =>'',
+ 'model' =>'',
+ 'tax' =>'',
+ 'price' =>'',
+ 'final_price' => '',
+ 'return' =>'',
+ 'exchange' => '',
+ 'exchange_id' => '',
+ 'attributes' => Array
+ (
+ '0' => Array
+ (
+// 'option' => Durée
+// 'value' => 3 mois
+// 'prefix' => x
+// 'price' => 3.0000
+ ),
+
+ ),
+
+ 'final_price_ttc' => '',
+ 'total_line' => '',
+ 'total_line_taxe' => '',
+ 'total_line_ttc' => '',
+ ),
+
+ ),
+
+ 'customer' => Array
+ (
+ 'id' => '',
+ 'name' => '',
+ 'company' =>'',
+ 'street_address' => '',
+ 'suburb' =>'',
+ 'city' => '',
+ 'postcode' =>'',
+ 'state' => '',
+ 'country' => '',
+ 'format_id' =>'',
+ 'customers_group_name' => '',
+ 'telephone' => '',
+ 'email_address' => '',
+ ),
+
+ 'delivery' => Array
+ (
+ 'name' =>'',
+ 'company' =>'',
+ 'street_address' =>'',
+ 'suburb' =>'',
+ 'city' =>'',
+ 'postcode' =>'',
+ 'state' =>'',
+ 'country' =>'',
+ 'format_id' => '',
+ ),
+
+ 'content_type' =>'',
+ 'coupon' =>'',
+ 'billing' => Array
+ (
+ 'name' =>'',
+ 'company' =>'',
+ 'street_address' =>'',
+ 'suburb' =>'',
+ 'city' =>'',
+ 'postcode' =>'',
+ 'state' => '',
+ 'country' =>'',
+ 'format_id' => '',
+ ),
+
+ 'history' => Array
+ (
+// '0' => Array
+// (
+// // 'date_added' => 10/11/2011 16:05:05
+// // 'customer_notified' => <img src="images/icons/tick.gif" alt="Vrai" width="16" height="16" title="Vrai" />
+// // 'orders_status' => En attente
+// // 'comments' =>
+// ),
+
+ ),
+
+ 'lasthistory' => Array
+ (
+// 'date_added' => 10/11/2011 16:05:05
+// 'customer_notified' => <img src="images/icons/tick.gif" alt="Vrai" width="16" height="16" title="Vrai" />
+// 'orders_status' => En attente
+// 'comments' =>
+ ),
+
);
return self::CleanKey($par);
Modified: trunk/catalog/admin/includes/classes/productUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/productUtility.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/classes/productUtility.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -218,11 +218,11 @@
$language_id=$languages_id;
- $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$pID . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $language_id. "'");
- $products_attributes = tep_db_fetch_array($products_attributes_query);
- $products_attributes= ($products_attributes['total'] > 0)? $products_attributes['total'] : 0 ;
+ $products_attributes_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$pID . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $language_id. "'");
+// $products_attributes = tep_db_fetch_array($products_attributes_query);
+// $products_attributes= ($products_attributes['total'] > 0)? $products_attributes['total'] : 0 ;
- return $products_attributes;
+ return $products_attributes_query->fetchAllAssoc();
}
/**
Modified: trunk/catalog/admin/includes/content/modules.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/modules.top.inc 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/content/modules.top.inc 2011-11-14 22:56:08 UTC (rev 3877)
@@ -1,12 +1,19 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 28/05/10, 17:03
+ @version 2.1.1
+ @date 13/11/11, 16:03
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+
+ TODO Transforme this page on general map activ/inactive module
+ Report update/modif in package exe
+
+
+
@param GET
@a string $_GET['set']
@a string $_GET['manager'] le type de prise en charge, (general|process|plugin)
@@ -22,20 +29,21 @@
switch ($manager){
case 'process':
- $code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'process/');
- $code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/');
- $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/');
- $code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/');
+ $code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout/','key_BO'=>'MODULE_CHECKOUT_PROCESS_INSTALLED_BO', 'value_BO'=>MODULE_CHECKOUT_PROCESS_INSTALLED_BO, 'prefix'=>'Pr');
+ $code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/', 'prefix'=>'');
+ $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/', 'prefix'=>'');
+ $code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/', 'prefix'=>'');
+ $code_inistalletd_array['orders']=array('key_BO'=>'MODULE_ORDERS_INSTALLED_BO', 'value_BO'=>MODULE_ORDERS_INSTALLED_BO, 'module_directory'=> 'orders/', 'prefix'=>'');
break;
case 'general':
default:
- $code_inistalletd_array['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
- $code_inistalletd_array['products']=array('key'=>'MODULE_ACAPRO_INSTALLED', 'value'=>MODULE_ACAPRO_INSTALLED,'key_BO'=>'MODULE_ACAPRO_INSTALLED_BO', 'value_BO'=>MODULE_ACAPRO_INSTALLED_BO,'module_directory'=> 'products/','module_language'=>DIR_FS_ADMIN.'includes/languages/' );
- $code_inistalletd_array['content']=array('key'=>'MODULE_CONTENT_INSTALLED', 'value'=>MODULE_CONTENT_INSTALLED, 'key_BO'=>'MODULE_CONTENT_INSTALLED_BO', 'value_BO'=>MODULE_CONTENT_INSTALLED_BO,'module_directory'=>'content/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
- $code_inistalletd_array['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
- $code_inistalletd_array['account']=array('key'=>'MODULE_ACCOUNT_INSTALLED', 'value'=>MODULE_ACCOUNT_INSTALLED,'key_BO'=>'MODULE_ACCOUNT_INSTALLED_BO', 'value_BO'=>MODULE_ACCOUNT_INSTALLED_BO,'module_directory'=> 'account/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
- $code_inistalletd_array['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
- $code_inistalletd_array['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
+ $code_inistalletd_array['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'');
+ $code_inistalletd_array['products']=array('key'=>'MODULE_ACAPRO_INSTALLED', 'value'=>MODULE_ACAPRO_INSTALLED,'key_BO'=>'MODULE_ACAPRO_INSTALLED_BO', 'value_BO'=>MODULE_ACAPRO_INSTALLED_BO,'module_directory'=> 'products/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'' );
+ $code_inistalletd_array['content']=array('key'=>'MODULE_CONTENT_INSTALLED', 'value'=>MODULE_CONTENT_INSTALLED, 'key_BO'=>'MODULE_CONTENT_INSTALLED_BO', 'value_BO'=>MODULE_CONTENT_INSTALLED_BO,'module_directory'=>'content/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'');
+ $code_inistalletd_array['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
+ $code_inistalletd_array['account']=array('key'=>'MODULE_ACCOUNT_INSTALLED', 'value'=>MODULE_ACCOUNT_INSTALLED,'key_BO'=>'MODULE_ACCOUNT_INSTALLED_BO', 'value_BO'=>MODULE_ACCOUNT_INSTALLED_BO,'module_directory'=> 'account/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
+ $code_inistalletd_array['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
+ $code_inistalletd_array['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
}
Modified: trunk/catalog/admin/includes/exts/package/packageUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageUtility.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/exts/package/packageUtility.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -21,7 +21,8 @@
parent::$set = (isset($_GET['set']) ? $_GET['set'] : '');
parent::$class = (isset($_GET['class']) ? $_GET['class'] : '');
- parent::$code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout_process/');
+ parent::$code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout/');
+ parent::$code_inistalletd_array['orders']=array('key_BO'=>'MODULE_ORDERS_INSTALLED_BO', 'value_BO'=>MODULE_ORDERS_INSTALLED_BO, 'module_directory'=> 'orders/', 'prefix'=>'');
parent::$code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/');
parent::$code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/');
parent::$code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/');
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -74,8 +74,13 @@
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- foreach($list as $row) {
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+ foreach($liste as $row) {
+
if(isset($_POST['configuration'][$row->key])) {
$configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
Modified: trunk/catalog/admin/includes/modules/configuration/modseourl.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modseourl.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/modules/configuration/modseourl.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -58,8 +58,14 @@
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- foreach($list as $row) {
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+ foreach($liste as $row) {
+
+
if(isset($_POST['configuration'][$row->key])) {
$configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -350,6 +350,9 @@
</script>
<?php }
+
+
+ /** aca */ self::$modules->get_header_js(self::$action);
}
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/common/classes/seo_url.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -482,11 +482,12 @@
$Rkey=$this->reg_anchors[$key];
$function = 'GetName_'.$Rkey;
- $url = $this->make_url($page, $this->$function($value), $key, $value, $separator);
+ if(method_exists($this,$function)) {
+ $url = $this->make_url($page, $this->$function($value), $key, $value, $separator);
-// $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, $Rkey, $value, $connection, $separator);
-
+ // $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
+ $this->ValidateName($url, $Rkey, $value, $connection, $separator);
+ }
break;
Modified: trunk/catalog/includes/appli_top_Test.php
===================================================================
--- trunk/catalog/includes/appli_top_Test.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/includes/appli_top_Test.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -119,7 +119,7 @@
/// Constructeur de page
require_once(DIR_WS_CLASSES . 'page.php');
- $page= page::getInstance();
+ $page= page::getInstance($FileRegistered);
$page->add_var_page('request_type',$request_type);
/// include osc Price
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/includes/application_top.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -113,7 +113,7 @@
foreach($_GET as $k=>$v) $_GET[$k]=tep_sanitize_string($v);
/// Constructeur de page
- $page= page::getInstance();
+ $page= page::getInstance($FileRegistered);
$page->add_var_page('request_type',$request_type);
/// include osc Price
Modified: trunk/catalog/includes/classes/AbstractAcaModule.php
===================================================================
--- trunk/catalog/includes/classes/AbstractAcaModule.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/includes/classes/AbstractAcaModule.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -61,7 +61,7 @@
$r=array();
foreach ($this->modules as $key=>$module) {
if (method_exists($module, $method )) /// control presence method
- $r[]=$this->modules[$key]->$method($attrs);
+ $r[$key]=$this->modules[$key]->$method($attrs);
}
return $r;
@@ -336,8 +336,6 @@
}
}
-
-
/**
* \fn display_view_min($cID,$class='')
* \brief Affiche module display_view mini
Added: trunk/catalog/includes/classes/core_page/checkout.php
===================================================================
--- trunk/catalog/includes/classes/core_page/checkout.php (rev 0)
+++ trunk/catalog/includes/classes/core_page/checkout.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -0,0 +1,157 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ \licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ \portion code Copyright (c) 2002 osCommerce
+ \package osCSS-2 <www http://www.oscss.org>
+ \version 2.1.0
+ \date 29/11/10, 11:33
+ \author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ \encode UTF-8
+
+ \class home
+ \brief prend en charge les modules de types home.
+*/
+
+class checkout
+ extends AbstractAcaModule
+ implements InterfaceAcaGene{
+
+ //! @p object
+ protected static $_instance;
+
+ /**
+ Charge les module aca specifique au porduits
+ */
+ function __construct() {
+
+ global $language, $page;
+ $this->name='checkout';
+ $this->homes_id='';
+ $this->image_handler='';
+ $this->modules=array();
+
+ foreach(parent::initialise_type('MODULE_CHECKOUT_PROCESS_INSTALLED','checkout') as $class){
+ $cl[$class]=new $class ();
+ $list_mod[$class] = $cl[$class]->sort_order;
+ asort($list_mod);
+ foreach($list_mod as $class=>$s){
+ $this->modules[$class] =$cl[$class];
+ }
+ unset($cl);unset($list_mod);
+ }
+
+
+
+ /**
+ Preparation des etape disponible
+ */
+// $BeforeProcess=$this->ChkBeforeProcess();
+// if(in_array(false,array_values($BeforeProcess)) )
+// $this->etape[1] = 'before' ;
+//
+// if(tep_count_shipping_modules() > 0)
+// $this->etape[2] = 'shipping' ;
+//
+// $this->etape[3] = 'payment' ;
+//
+// $this->etape[4] = 'confirmation' ;
+//
+// $this->etape[5] = 'process' ;
+ }
+
+ public static function getInstance($full=false) {
+ if(self::$_instance == null) self::$_instance = new self($full);
+ return self::$_instance;
+ }
+
+ public static function resetInstance(){
+ self::$_instance = null;
+ return self::getInstance();
+ }
+
+
+
+
+
+/** Obligatoire depend AbstractAcaModule */
+
+ /**
+ * \brief Affiche module elemennt html
+ Block principal d'affichage, liste ou vue des élément. Block principal de page
+ * @param $pID int le Id du produits
+ * @param $class string le nom de la class appelé, ou vide pour toutes les class enfants
+ */
+ public function display_view($pID,$class=''){
+ global $page;
+ $fct = __FUNCTION__;
+
+ if (!empty($class)) {
+ if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($class, $fct ))){
+ $this->modules[$class]->load_db_values($pID);
+ return $this->modules[$class]->$fct($pID);
+ }
+ } else {
+ $c=array();
+ if(isset($this->modules) && is_array($this->modules))
+ foreach ($this->modules as $key=>$module) {
+ if (($module->enabled) and (method_exists($module, $fct ))) {
+ $this->modules[$key]->load_db_values($pID);
+ $result=$this->modules[$key]->$fct($pID);
+ if(!empty($result))
+ $c[$key]=$result;
+ }
+ }
+ return $c;
+ }
+ }
+
+
+ /**
+ * \fn display_view_min($cID,$class='')
+ * \brief Affiche module display_view mini
+ * @param $cID int le Id du customers
+ * @param $class string le nom de la class appelé, ou vide pour toutes les class enfants
+ */
+ public function display_view_min($cID,$class=''){
+ global $page;
+ if (!empty($class)) {
+ if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($class, 'display_view_min' ))){
+ $this->modules[$class]->load_db_values($cID);
+ return $this->modules[$class]->display_view_min($cID);
+ }
+ } else {
+ $c=array();
+ foreach ($this->modules as $key=>$module) {
+ if (($module->enabled) and (method_exists($module, 'display_view_min' ))) {
+ $this->modules[$key]->load_db_values($cID);
+ $c .=$this->modules[$key]->display_view_min($cID);
+ }
+ }
+ return $c;
+ }
+ }
+
+ /**
+ * \fn display_titre($cID,$format='$s')
+ * \brief Affiche bock titre client notifié
+ * @param $cID int
+ * @param $format string format for sprintf
+ */
+ public function display_titre($cID,$format='$s'){
+ $c='';
+ foreach ($this->modules as $key=>$module) {
+ if (($module->enabled) and (method_exists($module, 'display_view_min' ))) {
+ $this->modules[$key]->load_db_values($cID);
+ $result=$this->modules[$key]->display_titre($format);
+ if(!empty($result))
+ $c[$key]=$result;
+ }
+ }
+ return $c;
+ }
+
+
+
+
+}
+?>
\ No newline at end of file
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/includes/classes/page.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -85,7 +85,7 @@
- private function __construct(){
+ private function __construct($FileRegistered=array()){
$this->ext='.php';
$this->page['var']['develop'] ='false';
$this->page['header']['file']=array();
@@ -119,14 +119,7 @@
Page necessitant une identifcation obligatoire
*/
/* Noyau */
- $this->file_registered=array(
- FILENAME_ACCOUNT,FILENAME_ADDRESS_BOOK,FILENAME_ADDRESS_BOOK_PROCESS,FILENAME_CHECKOUT_PAYMENT_ADDRESS,FILENAME_CHECKOUT_PAYMENT,FILENAME_CHECKOUT_SHIPPING,FILENAME_CHECKOUT_CONFIRMATION,FILENAME_CHECKOUT_SHIPPING_ADDRESS,FILENAME_LOGIN,FILENAME_PASSWORD_FORGOTTEN
- );
- /* module, hack */
- if(defined('FILENAME_RETURN')) {
- $this->file_registered[]=FILENAME_RETURN;
- $this->file_registered[]=FILENAME_RETURNS_TRACK;
- }
+ $this->file_registered=$ContentRegistered;
/**
Page de devant pas être indéxe dans le fils d'arianne (breadcrumb)
*/
@@ -144,9 +137,9 @@
// require_once(self::PATH_DRIVERS_PAGE.PUBLIC_DRIVERS_PAGE.'.php');
}
- public static function getInstance() {
+ public static function getInstance($FileRegistered=array()) {
if(self::$_instance == null) {
- self::$_instance = new self();
+ self::$_instance = new self($FileRegistered);
}
return self::$_instance;
}
@@ -400,6 +393,9 @@
/**
* \fn CurrentPageInit()
+ * \brief Methode for detremine tag html page and title
+ * \param $path string pathname or null
+ * \return none
*/
protected function CurrentPageInit($path=''){
global $languages_id;
@@ -490,6 +486,7 @@
$this->new_class('oscss_plugins');
$this->new_class('categorie');
//! Class specifique type de page
+
if (in_array($this->the_type(),explode(',',PUBLIC_PAGE_TYPE))){
global $ACA;
if($this->new_class($this->the_type(),true) !=false) {
@@ -506,6 +503,11 @@
if (isset($_REQUEST['action']))
$ACA->check_action('',$_REQUEST['action']);
}
+ elseif ($this->the_type()=='checkout'){
+
+ $ACA =$this->new_class('checkout');
+ }
+
//! Init du theme
$this->oscss_get_gabarit_template();
///! recup elements des plugins
Added: trunk/catalog/includes/modules/checkout/PrCgu.php
===================================================================
--- trunk/catalog/includes/modules/checkout/PrCgu.php (rev 0)
+++ trunk/catalog/includes/modules/checkout/PrCgu.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -0,0 +1,79 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/11/11, 21:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+class PrCgu
+ implements InterfaceModule {
+
+ /**
+ @brief constructor
+ */
+ function __construct($page){
+ global $page;
+
+ $language = $page->the_var('language');
+ $this->cID= $page->the_var('customer_id');
+
+ /**
+ @var
+ */
+ $this->code = __CLASS__;
+ /**
+ @var sort
+ */
+ $this->sort_order = (defined('MODULE_ACA_CGU_SORT_ORDER')) ? MODULE_ACA_CGU_SORT_ORDER : 0;
+ /**
+ @var Active mode module
+ */
+ $this->enabled = true;
+ }
+
+ /**
+ @brief Check module for passed etape control
+ @note this methode use cart customers for control cgu
+ */
+ public function ChkBeforeProcess($array=array()){
+ return false;
+ }
+
+ /**
+ @brief Call before beginning
+ @note this methode use cart customers for draw form cgu
+ */
+ public function display_view(){
+ global $cart;
+ $v['title']=__("PrCgu tab");
+ $v['content']=tep_output_string_protected(tep_get_cms_content('informationBox_conditions',true, '<article><h5 class="CguView">%s</h5><div class="CguView">%s</textarea></article>' ),false,true);
+ return new objectInfo($v);
+ }
+
+
+ /**
+ Chargement des db
+ */
+ public function load_db_values($cid){
+ }
+
+ /**
+ Chargement dans le fin du process
+ */
+ public function after_process(){
+ tep_session_unregister('producteur');
+ }
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+
+?>
\ No newline at end of file
Added: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/checkout_before_process.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/checkout_before_process.php (rev 0)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/checkout_before_process.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -0,0 +1,46 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 09/09/11, 22:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<div id="checkout">
+
+ <?php /** call and draw boxes */ ?>
+ <?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
+ <?php echo unhtmlentities($boxe->content) ?>
+
+ <?php echo tep_draw_form('checkout_before', tep_href_link('checkout.php' /*FILENAME_CHECKOUT*/, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>
+
+ <?php foreach($display_view as $row): ?>
+
+ <h3><?php echo unhtmlentities($row->title) ?></h3>
+
+
+ <div>
+ <?php echo unhtmlentities($row->content) ?>
+ </div>
+
+ <?php endforeach; ?>
+
+ <fieldset>
+ <legend><?php echo CHECKOUT_CGV ;?></legend>
+
+ <label for="conditions"><?php printf(TEXT_CONDITIONS , tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') );?></label>
+ <input name="conditions" id="conditions" type="checkbox" <?php echo isset($_GET['consult_conditions']) ? 'checked="checked"' : '' ;?> />
+ </fieldset>
+
+ <p class="formBt ieExtractFieldset">
+ <?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE ;?>
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>" />
+ </p>
+
+ </form>
+
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-11-14 22:56:08 UTC (rev 3877)
@@ -77,12 +77,16 @@
<div class="SubTotal">
<ul id="TotCart">
- <?php foreach($cart->show_list_total() as $i=>$tot): ?>
- <li><?php printf('<span>%s </span> %s' ,$tot->text, $currencies->format($tot->value)); ?></li>
- <?php endforeach; ?>
- <li id="ajaxcartWeight" class="cartWeight">
- <?php echo '<span>' . SUB_TITLE_WEIGHT_TOTAL .'</span>' . $cart->show_weight().' '.UNIT_WEIGHT_NAME; ?>
- </li>
+ <?php foreach($cart->show_list_total() as $i=>$tot): ?>
+ <li><?php printf('<span>%s </span> %s' ,$tot->text, $currencies->format($tot->value)); ?></li>
+ <?php endforeach; ?>
+
+ <?php if($cart->get_content_type() !='virtual'): ?>
+ <li id="ajaxcartWeight" class="cartWeight">
+ <?php echo '<span>' . SUB_TITLE_WEIGHT_TOTAL .'</span>' . $cart->show_weight().' '.UNIT_WEIGHT_NAME; ?>
+ </li>
+ <?php endif; ?>
+
</ul>
</div>
Modified: trunk/catalog/install/includes/modele/configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/configure.txt 2011-11-13 21:53:14 UTC (rev 3876)
+++ trunk/catalog/install/includes/modele/configure.txt 2011-11-14 22:56:08 UTC (rev 3877)
@@ -98,4 +98,22 @@
@var Security key
@brief use by offline mode
*/
- $SecuKey='%SECURE_KEY%';
\ No newline at end of file
+ $SecuKey='%SECURE_KEY%';
+
+
+ /**
+ @var File for register user
+ Add name for contraint login in table_file_modules.php
+ */
+ $ContentRegistered=array(
+ FILENAME_ACCOUNT,
+ FILENAME_ADDRESS_BOOK,
+ FILENAME_ADDRESS_BOOK_PROCESS,
+ FILENAME_CHECKOUT_PAYMENT_ADDRESS,
+ FILENAME_CHECKOUT_PAYMENT,
+ FILENAME_CHECKOUT_SHIPPING,
+ FILENAME_CHECKOUT_CONFIRMATION,
+ FILENAME_CHECKOUT_SHIPPING_ADDRESS,
+ FILENAME_LOGIN,
+ FILENAME_PASSWORD_FORGOTTEN
+ );
\ 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...> - 2011-11-13 21:53:23
|
Revision: 3876
http://oscss.svn.sourceforge.net/oscss/?rev=3876&view=rev
Author: oscim
Date: 2011-11-13 21:53:14 +0000 (Sun, 13 Nov 2011)
Log Message:
-----------
correction coquille
normalisation des datadrivers
correction coquille seo + page account
amelioration calcul type du panier
Mise a niveau test recursif phpunit datadrivers
Amelioration status et gestion des status avec une notion de status primaire et secondaire
Ajout d'une var de configuration pour definir le status paye
ajout colonne products_type dans les commandes
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/10_orders.php
trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab
trunk/catalog/admin/includes/gabarit/configuration/modstatus.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstatus.txt
trunk/catalog/admin/includes/modules/configuration/modadminconfig.php
trunk/catalog/admin/includes/modules/configuration/moddownloads.php
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
trunk/catalog/admin/includes/modules/configuration/modmail.php
trunk/catalog/admin/includes/modules/configuration/modmembres.php
trunk/catalog/admin/includes/modules/configuration/modorder.php
trunk/catalog/admin/includes/modules/configuration/modseourl.php
trunk/catalog/admin/includes/modules/configuration/modstatus.php
trunk/catalog/admin/includes/modules/configuration/modstock.php
trunk/catalog/admin/includes/modules/configuration/my_boutique.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/common/classes/order.php
trunk/catalog/common/classes/seo_url.php
trunk/catalog/common/classes/shoppingCart.php
trunk/catalog/includes/classes/checkout_process.php
trunk/catalog/includes/functions/general.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php
trunk/catalog/install/includes/language/fr_FR/osc_status.txt
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products.sql
trunk/test/phpunit/Back/sqldataTest.php
Modified: trunk/catalog/admin/includes/boxes/10_orders.php
===================================================================
--- trunk/catalog/admin/includes/boxes/10_orders.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/boxes/10_orders.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -2,12 +2,18 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 08/06/10, 14:17
+ @version 2.1.1
+ @date 13/11/11, 15:59
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
- $tabl_link[]= array(FILENAME_ORDERS, 'BOX_CUSTOMERS_ORDERS', 'orders',@$img['orders']);
+
+ $tabl_link[]= array(FILENAME_ORDERS.'?view=thisday', 'BOX_CUSTOMERS_ORDERS_THISDAY', 'orders',@$img['orders']);
+ $tabl_link[]= array(FILENAME_ORDERS.'?view=opened', 'BOX_CUSTOMERS_ORDERS_OPENED', 'orders',@$img['orders']);
+ $tabl_link[]= array(FILENAME_ORDERS.'?view=nopayed', 'BOX_CUSTOMERS_ORDERS_NOPAYED', 'orders',@$img['orders']);
+ $tabl_link[]= array(FILENAME_ORDERS.'?view=allnoclosed', 'BOX_CUSTOMERS_ORDERS_ALLNOCLOSED', 'orders',@$img['orders']);
+ $tabl_link[]= array(FILENAME_ORDERS, 'BOX_CUSTOMERS_ORDERS_ALL', 'orders',@$img['orders']);
+
if(_cst_bool('RMA_RETURN_PRODUCTS_STATUS')) $tabl_link[]= array(FILENAME_RETURNS, 'BOX_RETURNS_HEADING', 'return',@$img['return']);
$tabl_link[]= array(FILENAME_HELD_ORDERS, 'BOX_CUSTOMERS_HELD_ORDERS', 'held_orders',@$img['held_orders']);
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -121,12 +121,13 @@
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']);
/// Separate Pricing Per Customer
$customers_group_query = $DB->query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id != '0' order by customers_group_id");
Modified: trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab 2011-11-13 21:53:14 UTC (rev 3876)
@@ -37,6 +37,16 @@
</p>
</div>
+ <?php /** */ $row = modorder::$list['DEFAULT_ORDERS_STATUS_PAYED']; ?>
+ <h4 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h4>
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+
+
<?php /** */ $row = modorder::$list['DEFAULT_ORDERS_STATUS_COMPLETED']; ?>
<h4 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h4>
<div class="block_input">
@@ -89,7 +99,7 @@
<ul class="block_input">
<?php foreach(modorder::$list as $row)
- if(!in_array($row->key,array('DEFAULT_ORDERS_STATUS_ID', 'DEFAULT_ORDERS_STATUS_ANNULATE', 'DEFAULT_ORDERS_STATUS_COMPLETED', 'ORDERS_NUMBER_PREFIX', 'USE_LOCAL_GENERAT_ORDER_REF')) ) { ?>
+ if(!in_array($row->key,array('DEFAULT_ORDERS_STATUS_PAYED','DEFAULT_ORDERS_STATUS_ID', 'DEFAULT_ORDERS_STATUS_ANNULATE', 'DEFAULT_ORDERS_STATUS_COMPLETED', 'ORDERS_NUMBER_PREFIX', 'USE_LOCAL_GENERAT_ORDER_REF')) ) { ?>
<li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
<div class="block_input tirroir">
Modified: trunk/catalog/admin/includes/gabarit/configuration/modstatus.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modstatus.listing.gab 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/gabarit/configuration/modstatus.listing.gab 2011-11-13 21:53:14 UTC (rev 3876)
@@ -10,6 +10,7 @@
@brief gabarit html in page configuration for status listing
*/
global $current_theme;
+
?>
<div id="ssmenu">
<?php echo tep_ssmenu_configuration($_GET['gparentID']) ?>
@@ -25,6 +26,8 @@
<table class="dataTable">
<thead>
<tr>
+ <th class="tcenter" style="width:5%"><?php echo __('table heading position') ?></th>
+ <th class="tcenter" style="width:5%"><?php echo __('table heading id') ?></th>
<th class="tcenter"><?php echo __('table heading status / type') ?></th>
<th class="tcenter"><?php echo __('table heading couleurs') ?></th>
<th class="tcenter"><?php echo __('table heading action') ?></th>
@@ -32,8 +35,10 @@
</thead>
<tbody>
- <?php foreach (modstatus::$list as $item): ?>
+ <?php foreach (modstatus::$list as $k=>$item): ?>
<tr>
+ <td class="tcenter"><?php echo $k ?></td>
+ <td class="tcenter"><?php echo $item->status_id ?></td>
<td class="tleft"><?php echo $item->status_name ?></td>
<td class="tcenter" style="width:40px; background:<?php echo $item->status_color ?> url('includes/template/<?php echo $current_theme ?>/img/<?php echo $_SESSION['login_groups_id'] ?>/bg_graph.png') bottom left repeat-y;"><?php echo $item->status_color ?></td>
<td class="row_action">
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -2,13 +2,17 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/12/10, 17:23
+ @version 2.1.1
+ @date 13/11/11, 15:59
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file languages for boxes menu
*/
define('BOX_HEADING_CONF_ORDERS',"Commandes" );
-define('BOX_CUSTOMERS_ORDERS',"Suivi commandes" );
+define('BOX_CUSTOMERS_ORDERS_THISDAY',"Commande du jour" );
+define('BOX_CUSTOMERS_ORDERS_ALLNOCLOSED',"Commandes ouvertes" );
+define('BOX_CUSTOMERS_ORDERS_ALL',"Toutes les commandes" );
+define('BOX_CUSTOMERS_ORDERS_OPENED',"Commandes en traitement" );
+define('BOX_CUSTOMERS_ORDERS_NOPAYED',"Commandes en attente" );
define('BOX_CUSTOMERS_HELD_ORDERS',"Commandes abandonnées" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2011-11-13 21:53:14 UTC (rev 3876)
@@ -12,7 +12,7 @@
$lang['modorder heading']="Configuration gestion de commande" ;
-$lang['modorder legend status orders']="Gestion des status" ;
+$lang['modorder legend status orders']="Gestion des statut" ;
$lang['modorder legend other']="Autres" ;
@@ -25,13 +25,14 @@
XXXX_S : desciption courte
XXXX_L description longue
*/
-
+$lang['DEFAULT_ORDERS_STATUS_ID_S']="Commande Payée" ;
+$lang['DEFAULT_ORDERS_STATUS_ID_L']="definir le statut d'une commande payés." ;
$lang['DEFAULT_ORDERS_STATUS_ID_S']="État par défaut pour une nouvelle commande" ;
$lang['DEFAULT_ORDERS_STATUS_ID_L']="Quand une nouvelle commande est créée, ce statut de commande lui sera assigné." ;
$lang['DEFAULT_ORDERS_STATUS_COMPLETED_S']="Commande Cloturé" ;
-$lang['DEFAULT_ORDERS_STATUS_COMPLETED_L']="definir le status final d'une commande livre" ;
+$lang['DEFAULT_ORDERS_STATUS_COMPLETED_L']="definir le statut final d'une commande livre" ;
$lang['DEFAULT_ORDERS_STATUS_ID_S']="Commande annulée" ;
-$lang['DEFAULT_ORDERS_STATUS_ID_L']="definir le status d'une commande annule." ;
+$lang['DEFAULT_ORDERS_STATUS_ID_L']="definir le statut d'une commande annule." ;
$lang['ORDERS_NUMBER_PREFIX_S']="Préfixe numéro commande" ;
$lang['ORDERS_NUMBER_PREFIX_L']="Indiquer le préfixe des numéros de commande le chiffre precise le nombre de chiffre du numéro; ex: 'ym-5'(1005-00001); Laissez vide si vous ne voulez pas de préfixe." ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstatus.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstatus.txt 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstatus.txt 2011-11-13 21:53:14 UTC (rev 3876)
@@ -9,9 +9,13 @@
@encode UTF-8
*/
$lang['heading title']="Édition de status" ;
+
+$lang['table heading position']="Pos" ;
+$lang['table heading id']="Id" ;
$lang['table heading status / type']="Statut" ;
$lang['table heading couleurs']="Couleur" ;
$lang['table heading action']="Action" ;
+
$lang['text info orders status color']="Couleur du statut : " ;
$lang['text info orders status name']="Statut des commandes :" ;
$lang['text set default created']="Statut d'une commande créee" ;
@@ -27,6 +31,7 @@
$lang['error remove default order status']="Erreur : Le statut par défaut ne peut pas être supprimé. Merci de choisir un autre statut par défaut et de réessayer" ;
$lang['error status used in orders']="Erreur : Ce statut de commande est actuellement utilisé." ;
$lang['error status used in history']="Erreur : Ce statut de commande est déjà utilisé dans l'historique de commande." ;
+$lang['is childs status. not use default value for process']="Vous editez un statut enfant. Ces statut ne peuvent être defini pas default (pour les actions annulé, cloture, etc..). Ces statut vous fournissent un moyen de preciser le type de module qui peut avoir affecté le statut, sans pour autant modifier l'état en cours de la commande" ;
$lang['ajoute un status']="ajoute un status" ;
$lang['utiliser comme status par default']="utiliser comme status par défaut" ;
@@ -38,6 +43,7 @@
$lang['add status']="Ajouter type" ;
+
$lang['liste return_reasons']="SAV Motif" ;
$lang['liste returns']="SAV" ;
$lang['liste refund_method']="SAV Methode" ;
Modified: trunk/catalog/admin/includes/modules/configuration/modadminconfig.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modadminconfig.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modadminconfig.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -93,7 +93,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/moddownloads.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/moddownloads.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/moddownloads.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -95,7 +95,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -220,7 +220,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/modmail.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modmail.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modmail.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -95,7 +95,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/modmembres.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modmembres.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modmembres.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -95,7 +95,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/modorder.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modorder.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modorder.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -100,7 +100,12 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+
+
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/modseourl.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modseourl.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modseourl.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -95,7 +95,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/modstatus.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modstatus.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modstatus.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -298,7 +298,7 @@
public function load_db_values($id){
global $action,$languages_id;
- $list_status_query_raw = "select distinct status_id, status_name, status_color from " . TABLE_STATUS . " where status_type='".self::$config['type']."' and language_id = '" . (int)$languages_id . "' order by status_id";
+ $list_status_query_raw = "select distinct status_id, status_name, status_color from " . TABLE_STATUS . " where status_type='".self::$config['type']."' and language_id = '" . (int)$languages_id . "' order by status_id ASC";
$list_status_query = tep_db_query($list_status_query_raw);
$list_s=$lg=array();
while ($list_status = tep_db_fetch_array($list_status_query)) {
@@ -315,8 +315,27 @@
elseif(self::$config['default_completed'] == (int) $list_status['status_id']) $list_status['status_name'] .= ' (' . __('text default completed') . ')';
elseif(self::$config['default_annulate'] == (int) $list_status['status_id']) $list_status['status_name'].= ' (' . __('text default annulate') . ')';
- $list_s[]=new objectInfo($list_status);
+
+ /**
+ @remarks Force sort by id master
+ id master is Unique number value : [(-9)-(9)]
+ Childs id for detail status in multi-number value (11 : For childs 1, 31 for child 3...)
+ */
+ if( substr($list_status['status_id'],0,1) =='-'){
+ $sign = '-';
+ $value=substr($list_status['status_id'],1);
+ }
+ else{
+ $sign = '';
+ $value=$list_status['status_id'];
+ }
+ $sort = $sign.((strlen($value)>1)? substr($value,0,1).'.'.substr($value,1) : $value );
+
+ $list_s[$sort]=new objectInfo($list_status);
}
+
+ ksort($list_s);
+
return $list_s;
}
@@ -445,7 +464,10 @@
$contents[] = array('class' => 'block_input','text' => __('utiliser une couleur', __CLASS__) . tep_draw_input_field('status_hexacolor','colorpicker',$oInfo->status_color));
- if(in_array(self::$config['type'],self::$type_advanced ))$contents=array_merge($contents,self::form_advanced($action));
+ if(strlen(abs($oInfo->status_id )) > 1 )
+ $contents[] = array('class' => 'block_input','text' => __('is childs status. not use default value for process'));
+ elseif(in_array(self::$config['type'],self::$type_advanced ))
+ $contents=array_merge($contents,self::form_advanced($action));
$contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','sID')). '&sID=' . $oInfo->status_id) . '">' . IMAGE_CANCEL . '</a>');
break;
Modified: trunk/catalog/admin/includes/modules/configuration/modstock.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modstock.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/modstock.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -95,7 +95,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/modules/configuration/my_boutique.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/my_boutique.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/modules/configuration/my_boutique.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -95,7 +95,10 @@
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
- if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
$conf = $row;
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-13 21:53:14 UTC (rev 3876)
@@ -270,6 +270,7 @@
+ #central .block_input span.value_edit {display:block; width:100%; clear:both;}
#central .block_form .block_input span.value_edit {display:inline-block; width:100%;}
#central .block_form .block_input br,
Modified: trunk/catalog/common/classes/order.php
===================================================================
--- trunk/catalog/common/classes/order.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/common/classes/order.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -8,18 +8,69 @@
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class order
+ @brief This history class manage and create orders in oscommerce.
+ This class is very modified, but is compatibility old version
+
+ In public
+ Create object orders
+ Format data and retrun obect order in account page
+
+ In Backoffice
+ Format Data and return object order
+
+
+ @example BySupportCart [Frontoffice]
+ Create object orders by data current customers cart
+
+ $objectorder=new order();
+
+ @example ByDbDataTableOrders [Frontoffice | Backoffice]
+ Load Orders data in object based on id
+
+ $objectorder=new order(1);
+
+ @example ByDbDataTableHoldingOrders [Frontoffice | Backoffice]
+ Load Orders data in object based on id in holding_orders
+ holding table is tmp orders
+
+ $objectorder=new order(1);
*/
class order {
- var $info, $totals, $products, $customer, $delivery, $content_type,$coupon;
-
/**
- @a array tableau de table
+ @var General info for current orders
*/
+ public $info;
+ /**
+ @var
+ */
+ public $totals;
+ /**
+ @var General info for current orders
+ */
+ public $products;
+ /**
+ @var General info for current orders
+ */
+ public $customer;
+ /**
+ @var General info for current orders
+ */
+ public $delivery;
+ /**
+ @var General info for current orders
+ */
+ public $content_type;
+ /**
+ @var General info for current orders
+ */
+ public $coupon;
+ /**
+ @var array tableau de table
+ */
private static $tables;
-
/**
- @a bool Mode (orders=true | holding_order=false)
+ @var bool Mode (orders=true | holding_order=false)
*/
private static $mode;
@@ -152,11 +203,12 @@
'format_id' => $order['billing_address_format_id']);
$index = 0;
- $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_returned,products_exchanged,products_exchanged_id from " .self::$tables['PRODUCTS'] . " where orders_id = '" . (int)$order_id . "'");
+ $orders_products_query = tep_db_query("select orders_products_id, products_id,products_type, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_returned,products_exchanged,products_exchanged_id from " .self::$tables['PRODUCTS'] . " where orders_id = '" . (int)$order_id . "'");
while ($orders_products = tep_db_fetch_array($orders_products_query)) {
$this->products[$index] = array('qty' => $orders_products['products_quantity'],
'id' => $orders_products['products_id'],
+ 'type' => $orders_products['products_type'],
'name' => $orders_products['products_name'],
'model' => $orders_products['products_model'],
'tax' => $orders_products['products_tax'],
@@ -193,7 +245,12 @@
}
}
- function cart() {
+
+ /**
+ @fn cart()
+ @brief Call Public specific Environement for Generate checkout page
+ */
+ public function cart() {
global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment,$tax_address,$coupon_sav;
$this->content_type = $cart->get_content_type();
@@ -203,7 +260,7 @@
$shipping_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$sendto . "'");
$shipping_address = tep_db_fetch_array($shipping_address_query);
-// print_r($shipping_address);
+
$billing_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'");
$billing_address = tep_db_fetch_array($billing_address_query);
@@ -238,7 +295,8 @@
}
}
- $this->customer = array('firstname' => $customer_address['customers_firstname'],
+ $this->customer = array('id' => (int)$customer_id,
+ 'firstname' => $customer_address['customers_firstname'],
'lastname' => $customer_address['customers_lastname'],
'company' => $customer_address['entry_company'],
'street_address' => $customer_address['entry_street_address'],
@@ -294,6 +352,7 @@
$this->products[$index] = array('qty' => $prdct['quantity'],
'name' => $prdct['name'],
'model' => $prdct['model'],
+ 'type' => $prdct['type'],
'tax' =>tep_get_tax_rate($prdct['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
'tax_description' => tep_get_tax_description($prdct['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
@@ -357,29 +416,11 @@
$this->products[$index]['total_line'] =tep_round($this->products[$index]['total_line'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
$this->products[$index]['total_line_ttc'] =tep_round($this->products[$index]['total_line_ttc'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
-// $products_tax = $this->products[$index]['tax'];
-// $products_tax_description = $this->products[$index]['tax_description'];
-//
-// // $ttax= $shown_taxe;
-// $ttax = $this->products[$index]['total_line_taxe'];
-// $this->info['tax'] += $ttax;
-//
-// if (isset($this->info['tax_groups']["$products_tax_description"])) $this->info['tax_groups']["$products_tax_description"] +=$ttax;
-// else $this->info['tax_groups']["$products_tax_description"] =$ttax;
-//
-// $this->info['total_weight'] += $this->products[$index]['weight'];
-// $this->info['subtotal_ht'] += $this->products[$index]['total_line'];
-// $this->info['subtotal_taxe'] += $this->products[$index]['total_line_taxe'];
-// $this->info['subtotal'] += $this->products[$index]['total_line_ttc'];
-
$this->AdjustTotLine($this->products[$index]);
$index++;
}
-// $this->info['total'] = $this->info['subtotal'] ;
-// $this->info['total_ht'] = $this->info['subtotal_ht'] + $this->info['shipping_cost_ht'];
-
if( is_object( $this->coupon ) ) $this->info = $this->coupon->finalize_discount($this->info);
}
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/common/classes/seo_url.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -169,7 +169,7 @@
//ojp FILENAME_LINKS
$seo_pages=array(
FILENAME_DEFAULT,
- FILENAME_ACCOUNT,
+// FILENAME_ACCOUNT,
FILENAME_POPUP_IMAGE,
FILENAME_PRODUCT_INFO,
FILENAME_CONTENT,
@@ -388,8 +388,8 @@
* @param $search_engine_safe
*/
private function stock_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = false, $search_engine_safe = true) {
- global $request_type, $session_started, $SID, $kill_sid; ///// SID-KILLER ( change) /// added $kill_sid.
-// if (!$this->not_null($page)) die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!</strong><br /><br />');
+ global $request_type, $session_started, $SID, $kill_sid;
+
if ($page == '/') $page = '';
if ($connection == 'NONSSL') $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
@@ -436,6 +436,8 @@
$time = 0;
$this->stop($this->timestamp, $time);
$this->performance['TOTAL_TIME'] += $time;
+
+
switch(true){
case (_test_bool($this->attributes['SEO_URLS_USE_W3C_VALID']) && !$page_cache):
return htmlentities(str_replace('&','&',$return));
Modified: trunk/catalog/common/classes/shoppingCart.php
===================================================================
--- trunk/catalog/common/classes/shoppingCart.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/common/classes/shoppingCart.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -14,28 +14,28 @@
class shoppingCart {
/**
+ @var
*/
- var $contents;
+ public $contents;
/**
- Total panier
- @a numeric
+ @var Total panier numeric
*/
- var $total;
+ public $total;
/**
- Poids du panier
- @a numeric
+ @var Poids du panier numeric
*/
- var $weight;
+ public $weight;
/**
- ID du panier, unique
- @a int
+ @var ID du panier, unique int
*/
- var $cartID;
+ public $cartID;
/**
+ @var
*/
- var $content_type;
+ public $content_type;
- function shoppingCart() {
+
+ function __construct() {
$this->reset();
}
@@ -69,6 +69,7 @@
}
/**
+ @brief Reset cart for current customers
*/
public function cleanup() {
reset($this->contents);
@@ -84,16 +85,31 @@
}
$this->contents=array();
}
-
/**
+ @brief Reset cart for current customers
*/
- private function generate_cart_id($length = 5) {
- return tep_create_random_value($length, 'digits');
+ function reset($reset_database = false) {
+ global $customer_id;
+
+ $this->contents = array();
+ $this->total = 0;
+ $this->weight = 0;
+ $this->content_type = false;
+
+ if (tep_session_is_registered('customer_id') && ($reset_database == true)) {
+ tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
+ tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "'");
+ }
+
+ unset($this->cartID);
+ if (tep_session_is_registered('cartID')) tep_session_unregister('cartID');
}
+
/**
+ @brief restore cart after login for current customers
*/
public function restore_contents() {
global $customer_id;
@@ -140,31 +156,15 @@
}
- function reset($reset_database = false) {
- global $customer_id;
- $this->contents = array();
- $this->total = 0;
- $this->weight = 0;
- $this->content_type = false;
-
- if (tep_session_is_registered('customer_id') && ($reset_database == true)) {
- tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
- tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "'");
- }
-
- unset($this->cartID);
- if (tep_session_is_registered('cartID')) tep_session_unregister('cartID');
- }
-
/**
Add item
- @param $products_id \a string/int 19 || product Id vace option 19{1}1{3}10
- @param $qty \a int
- @param $attributes \a string
- @param $notify \a boolean
- @param $special_class \a string , permet d'ajouter element supplementaire , class de promo,
+ @param $products_id string/int 19 || product Id vace option 19{1}1{3}10
+ @param $qty int
+ @param $attributes string
+ @param $notify boolean
+ @param $special_class string , permet d'ajouter element supplementaire , class de promo,
*/
public function add_cart($products_id, $qty = '1', $attributes = '', $notify = true,$special_class='') {
global $new_products_id_in_cart, $customer_id;
@@ -188,7 +188,8 @@
$this->contents[$products_id_string] = array('qty' => $qty);
if(!empty($special_class)) $this->contents[$products_id_string]['special_class'] = $special_class;
// insert into database
- if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $qty . "', '" . date('Ymd') . "')");
+ if (tep_session_is_registered('customer_id'))
+ tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $qty . "', '" . date('Ymd') . "')");
if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
@@ -208,7 +209,8 @@
if (!$blank_value) {
$this->contents[$products_id_string]['attributes'][$option] = $value;
// insert into database
- if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id,products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')");
+ if (tep_session_is_registered('customer_id'))
+ tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id,products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')");
}
}
}
@@ -588,5 +590,13 @@
}
+
+
+ /**
+ */
+ private function generate_cart_id($length = 5) {
+ return tep_create_random_value($length, 'digits');
+ }
+
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/classes/checkout_process.php
===================================================================
--- trunk/catalog/includes/classes/checkout_process.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/includes/classes/checkout_process.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -48,7 +48,7 @@
*/
function __construct($order_id='',$table='') {
global $language, $page;
- $this-> name='checkout_process';
+ $this-> name=__CLASS__;
$this->modules=array();
$this->list_mod=array();
@@ -67,13 +67,15 @@
'HISTORY'=>constant('TABLE'.$table.'_ORDERS_STATUS_HISTORY'),
);
- /*
- * Load module type process
- */
- foreach(parent::initialise_type('MODULE_CHECKOUT_PROCESS_INSTALLED','checkout_process') as $class){
- $cl[$class]=new $class ();
+ /**
+ * Load module type process
+ */
+ foreach(parent::initialise_type('MODULE_CHECKOUT_PROCESS_INSTALLED','checkout') as $class){
+ $classe = $class;
+ $cl[$class]= new $classe();
$list_mod[$class] = $cl[$class]->sort_order;
asort($list_mod);
+
foreach($list_mod as $class=>$s){
$GLOBALS[$class] =$this->modules[$class] =$cl[$class];
}
@@ -83,7 +85,17 @@
/*if(tep_not_null($order_id))*/ $this->the_order_id=(int)$order_id;
}
+
/**
+ * \fn GetMode()
+ * \brief retrun current mode based on table used in process
+ * \return boolean true (classique tabel orders) false (temp classes holding orders)
+ */
+ public static function GetMode(){
+ return self::$mode;
+ }
+
+ /**
* \fn ret_modules($class='')
* \brief retourne la liste des modules actifs ou l'object de l'un d'eux
*/
@@ -138,17 +150,23 @@
/**
- * \fn in_process_finish()
- * \brief Chargement dans le fin du process
+ @fn in_process_finish()
+ @brief Chargement dans le fin du process
+ This function call in pre-process and process
*/
public function in_process_finish(){
- global $page;
- foreach ($this->modules as $key=>$module) {
- if (($module->enabled) and (method_exists($module, 'in_process_finish'))) {
- $funct='in_process_finish';
- return $this->modules[$key]->$funct();
- }
+ global $page, $checkout_process,$mode;
+ // transport var for childs loop modules
+ $checkout_process = $this;
+ $mode=self::$mode;
+
+ // loop childs
+ foreach ($this->modules as $key=>$module) {
+ if (($module->enabled) and (method_exists($key, 'in_process_finish'))) {
+ $funct='in_process_finish';
+ return $this->modules[$key]->$funct();
}
+ }
}
@@ -460,11 +478,12 @@
//! product / products_attributes / products_download
- $orders_products_query = tep_db_query("select orders_products_id, products_id,products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_HOLDING_ORDERS_PRODUCTS . " where orders_id = '" . (int)$pre_order_id . "'");
+ $orders_products_query = tep_db_query("select orders_products_id, products_id,products_type,products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_HOLDING_ORDERS_PRODUCTS . " where orders_id = '" . (int)$pre_order_id . "'");
while ($orders_products = tep_db_fetch_array($orders_products_query)) {
$sql_data_array2 = array('orders_id' => (int)$order_id,
'products_id' => (int)$orders_products['products_id'],
+ 'products_type' => (int)$orders_products['products_type'],
'products_quantity' => tep_db_input($orders_products['products_quantity']),
'products_name' => tep_db_input($orders_products['products_name']),
'products_model' => tep_db_input($orders_products['products_model']),
@@ -508,6 +527,12 @@
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$order['customers_id'] . "'");
+ /**
+ Before process module ACA
+ */
+ $this->in_process_finish();
+
+
$this->email_confirm_order($order_id);
//! RETURN
return array ( 'the_order_id'=>$order_id,
@@ -705,6 +730,7 @@
private function insert_order_product($i,$products_stock_attributes, $order){
$sql_data_array = array('orders_id' => $this->the_order_id,
'products_id' => tep_get_prid($order->products[$i]['id']),
+ 'products_type' => (int)tep_db_input($order->products[$i]['type']),
'products_model' => tep_db_input($order->products[$i]['model']),
'products_name' => tep_db_input($order->products[$i]['name']),
'products_price' => tep_db_input($order->products[$i]['price']),
@@ -756,7 +782,7 @@
private function load_db_attribut_product($i,$j,$order){
global $languages_id;
if (_cst_bool('DOWNLOAD_ENABLED')) {
- $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename
+ $attributes_query = "select popt.products_options_id, poval.products_options_values_id, popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
on pa.products_attributes_id=pad.products_attributes_id
@@ -769,7 +795,7 @@
and poval.language_id = '" .(int) $languages_id . "'";
$attributes = tep_db_query($attributes_query);
} else {
- $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" .(int) $order->products[$i]['id'] . "' and pa.options_id = '" . (int)$order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" .(int) $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" .(int) $languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");
+ $attributes = tep_db_query("select popt.products_options_id, poval.products_options_values_id, popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" .(int) $order->products[$i]['id'] . "' and pa.options_id = '" . (int)$order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" .(int) $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" .(int) $languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");
}
$attributes_values = tep_db_fetch_array($attributes);
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/includes/functions/general.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -570,15 +570,19 @@
return $uprid;
}
+
/**
- Return a product ID from a product ID with attributes
+ @brief Clean id product and Return
+ remove product with attributes information
+ @param $uprid string (14{1}1)
+ @return int product id Or false
*/
function tep_get_prid($uprid) {
$pieces = explode('{', $uprid);
-
if (is_numeric($pieces[0])) return $pieces[0];
else return false;
}
+
/**
Converti un $uprid en array des attributs
*/
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2011-11-13 21:53:14 UTC (rev 3876)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 15/12/10, 21:14
+ @version 2.1.1
+ @date 12/11/11, 19:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -63,26 +63,24 @@
<div class="innerblock-more">
<?php if ( $page->_draw_in_page('PRODUCT_LIST_BUY_NOW')) { ?>
- <?php if (_test_bool($ele->action['buy'] )) : ?>
- <?php echo tep_draw_form($themodule->id.'cart_quantity'.$ele->products_id, tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
- <p>
- <?php echo tep_draw_hidden_field('products_id', $ele->products_id). tep_draw_hidden_field('products_quantity', '1'); ?>
- <input title="header=[<?php echo __('add to cart') ?>] body=[ ] fade=[on]" type="image" src="<?php echo $page->getPathTemplate() ?>images/carticon.png" onclick="this.form.submit()"/>
- </p>
- </form>
- <?php elseif (count(product_attribut_info($ele->products_id)) != 0): ?>
+
+ <?php /** @remarks If buy possible and attribute , force choose attribute */ ?>
+
+ <?php if (_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->products_id)) != 0): ?>
<p><a class="submitBt" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$ele->products_id)?>" ><img border="0" class="left_bt" title="" alt="" src="<?php echo $page->getPathTemplate() ?>images/carticon.png"></a></p>
+
+ <?php /** @remarks If buy possible and attribute */ ?>
+
+ <?php elseif (_test_bool($ele->action['buy'] )) : ?>
+ <?php echo tep_draw_form($themodule->id.'cart_quantity'.$ele->products_id, tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
+ <p>
+ <?php echo tep_draw_hidden_field('products_id', $ele->products_id). tep_draw_hidden_field('products_quantity', '1'); ?>
+ <input title="header=[<?php echo __('add to cart') ?>] body=[ ] fade=[on]" type="image" src="<?php echo $page->getPathTemplate() ?>images/carticon.png" onclick="this.form.submit()"/>
+ </p>
+ </form>
<?php endif; ?>
<?php } ?>
- <?php /* if ( $page->_draw_in_page('PRODUCT_LIST_BUY_NOW')) { ?>
- <?php echo tep_draw_form($themodule->id.'wishlist_quantity'.$ele->products_id, tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_wishlist'), 'post', ' class="left_bt" '); ?>
- <p>
- <?php echo tep_draw_hidden_field('products_id', $ele->products_id). tep_draw_hidden_field('products_quantity', '1'); ?>
- <input title="header=[<?php echo __('add to wishlist') ?>] body=[ ] fade=[on]" type="image" src="<?php echo $page->getPathTemplate() ?>images/favs.gif" onclick="this.form.submit()"/>
- </p>
- </form>
- <?php }*/ ?>
<a class="details prod" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $ele->products_id) ?>" title="header=[<?php echo __('view more') ?>] body=[ ] fade=[on]"><?php echo __('more') ?></a>
</div>
Modified: trunk/catalog/install/includes/language/fr_FR/osc_status.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2011-11-13 21:53:14 UTC (rev 3876)
@@ -10,12 +10,16 @@
/* osc_orders_status */
+$lg['OSC_ORDERS_STATUS_CANCELED']="Annulé" ;
$lg['OSC_ORDERS_STATUS_PENDING']="En attente" ;
+$lg['OSC_ORDERS_STATUS_PENDING_MONEY_ORDER']="chêque" ;
+$lg['OSC_ORDERS_STATUS_PAYED']="Payé" ;
+$lg['OSC_ORDERS_STATUS_PAYED_MONEY_ORDER']="chêque" ;
$lg['OSC_ORDERS_STATUS_PROCESSING']="Traitement en cours" ;
+$lg['OSC_ORDERS_STATUS_EXPEDIED']="Expedié" ;
$lg['OSC_ORDERS_STATUS_DELIVERED']="Livré" ;
-$lg['OSC_ORDERS_STATUS_CANCELED']="Annulé" ;
+$lg['OSC_ORDERS_STATUS_CLOSED']="Cloturé" ;
-
/* osc_products_virtual_types */
$lg['OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL']="Physique" ;
$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION']="Abonnement" ;
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2011-11-13 21:53:14 UTC (rev 3876)
@@ -12,12 +12,23 @@
--+######################################################################--+
+INSERT INTO osc_status VALUES (-1, 'orders', 1, 'OSC_ORDERS_STATUS_CANCELED', '#666');
INSERT INTO osc_status VALUES (1, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING', '#FF1A00');
-INSERT INTO osc_status VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#3393D9');
-INSERT INTO osc_status VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
-INSERT INTO osc_status VALUES (4, 'orders', 1, 'OSC_ORDERS_STATUS_CANCELED', '#666');
+INSERT INTO osc_status VALUES (11, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING_MONEY_ORDER', '#3393D9');
+INSERT INTO osc_status VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED', '#3393D9');
+INSERT INTO osc_status VALUES (21, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED_MONEY_ORDER', '#3393D9');
+
+INSERT INTO osc_status VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#66FF00');
+
+INSERT INTO osc_status VALUES (4, 'orders', 1, 'OSC_ORDERS_STATUS_EXPEDIED', '#66FF00');
+
+INSERT INTO osc_status VALUES (5, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
+
+INSERT INTO osc_status VALUES (6, 'orders', 1, 'OSC_ORDERS_STATUS_CLOSED', '#66FF00');
+
+
INSERT INTO osc_status VALUES (1, 'returns', 1, 'OSC_RETURNS_STATUS_PENDING','#FF1A00');
INSERT INTO osc_status VALUES (2, 'returns',1, 'OSC_RETURNS_STATUS_AWAITING_RETURN', '#3393D9');
INSERT INTO osc_status VALUES (3, 'returns',1, 'OSC_RETURNS_STATUS_CANCELLED', '#66FF00');
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-13 21:53:14 UTC (rev 3876)
@@ -344,12 +344,14 @@
-- 129 option orders
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '6', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '-1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(),'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_PAYED_S', 'DEFAULT_ORDERS_STATUS_PAYED', '2', 'DEFAULT_ORDERS_STATUS_PAYED_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '2');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', '10', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '3', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '4', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(),'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
+
-- 130 option data types
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '130', '0', NOW(), NOW(),NULL, NULL, 2);
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products.sql 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products.sql 2011-11-13 21:53:14 UTC (rev 3876)
@@ -17,6 +17,7 @@
orders_products_id int(11) not null auto_increment,
orders_id int(11) default '0' not null ,
products_id int(11) default '0' not null ,
+ products_type int(1) NOT NULL DEFAULT '1',
products_model varchar(12) ,
products_name varchar(64) not null ,
products_price decimal(15,4) default '0.0000' not null ,
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products.sql 2011-11-12 11:27:18 UTC (rev 3875)
+++ trunk/catalog/install...
[truncated message content] |
|
From: <os...@us...> - 2011-11-12 11:27:27
|
Revision: 3875
http://oscss.svn.sourceforge.net/oscss/?rev=3875&view=rev
Author: oscim
Date: 2011-11-12 11:27:18 +0000 (Sat, 12 Nov 2011)
Log Message:
-----------
Normalisation des sqldatadrivers du backoffice
Ajout d'un test phpunit sur les drivers , qui charge tous les drivers est efefctue une serie de test de base sur ces classes
Correction shoppingcart pour la prise en chareg correct de la gestion des produit virtuel bas?\195?\169 sur les var de config
[BO] Ajustement mecanisme de suppresion d'un produits , dans la gestion de l'ordre de suppression des info dans les tables
Ajsutement extensions pour la 2.1.1
Correction espace public, dans la gestion des attributs de produits
[FO] REport oublis categorie hidden dans methode get_categories
[all] Debut report ajout prefix dans gestion prix des attribut (x & /) bas?\195?\169 sur le prix produits
[FO] force call jquery for all view based on index.php
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/productsACA.php
trunk/catalog/admin/includes/classes/drivers/sqladminuser.php
trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php
trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php
trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php
trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php
trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php
trunk/catalog/admin/includes/classes/productUtility.php
trunk/catalog/admin/includes/modules/products/desc_base.php
trunk/catalog/common/classes/shoppingCart.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/includes/classes/drivers/data/product.php
trunk/catalog/includes/classes/pad_base.php
trunk/catalog/includes/functions/html_output.php
trunk/catalog/index.php
trunk/catalog/install/includes/modele/admin_configure.txt
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/includes/attributeManagerGeneralFunctions.inc.php
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab
trunk/test/phpunit/Back/sqldataTest.php
Modified: trunk/catalog/admin/includes/classes/drivers/productsACA.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/productsACA.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/productsACA.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -36,18 +36,26 @@
$this->type_flag=1;
$this->modules=array();
+ $list_mod = array();
+
foreach(parent::initialise_type('MODULE_ACAPRO_INSTALLED_BO','products') as $class){
- $cl[$class]=new $class ();
- // test flag type module, si aucun, produist base
- if(!isset($cl[$class]->flag_type_virtual)) $cl[$class]->flag_type_virtual=0;
- // incremente tableau module unqiuement si flag ok
- if($this->control_type_mod($cl[$class]->flag_type_virtual)) $list_mod[$class] = $cl[$class]->sort_order;
- asort($list_mod);
- foreach($list_mod as $class=>$s){
- $this->modules[$class] =$cl[$class];
- }
- unset($cl);unset($list_mod);
+ $cl[$class]=new $class ();
+ // test flag type module, si aucun, produist base
+ if(!isset($cl[$class]->flag_type_virtual)) $cl[$class]->flag_type_virtual=0;
+ // incremente tableau module unqiuement si flag ok
+ if($this->control_type_mod($cl[$class]->flag_type_virtual)) $list_mod[$class] = $cl[$class]->sort_order;
}
+
+
+ if(count($list_mod)>1) {
+ asort($list_mod);
+ foreach($list_mod as $class=>$s){
+ $this->modules[$class] =$cl[$class];
+ }
+ unset($list_mod);
+ }
+ unset($cl);
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqladminuser.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqladminuser.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqladminuser.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -173,6 +173,7 @@
'admin_lastname' => '',
'admin_email_address' => '',
'admin_modified' => '',
+ 'admin_password' => '',
'url_openid' => '',
);
Modified: trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -23,6 +23,7 @@
*/
public static function create($option){
+
if(!isset($option['id'])) return 'id';
if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
@@ -38,7 +39,7 @@
if(!$res)
return $res;
else
- return $res->__get('insertId');
+ return $option['id'];
}
/**
@@ -48,9 +49,13 @@
if(!isset($option['id'])) return 'id';
+ $where='';
if(isset($option['id'])) $where .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
if(isset($option['options_id'])) $where .="AND options_id = '".(int)tep_db_input($option['options_id'])."' ";
+ if(strlen($where)==0)
+ return false;
+
if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
if(isset($option['options_id'])) $sql_data_array['options_id'] = $option['options_id'];
if(isset($option['values_id'])) $sql_data_array['option_values_id'] = $option['values_id'];
@@ -146,6 +151,12 @@
foreach($array as $key=>$value){
if( strpos($key,'template_') ===0)
$key=substr($key,9);
+ elseif( strpos($key,'products_options_') ===0)
+ $key=substr($key,strlen('products_options_'));
+ elseif($key =='option_values_id')
+ $key=substr($key,strlen('option_'));
+ elseif($key =='options_values_price')
+ $key=substr($key,strlen('options_'));
$object->$key = $value;
}
@@ -153,6 +164,24 @@
return $object;
}
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+ $par = array(
+ 'template_id'=>'',
+ 'options_id'=>'',
+ 'option_values_id'=>'',
+ 'price_prefix'=>'+',
+ 'options_values_price'=>'0.0',
+ 'products_options_sort_order'=>'0',
+ );
+
+ return self::CleanKey($par);
+ }
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -25,10 +25,9 @@
// if(!isset($option['id'])) return 'id';
- if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
+// if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
if(isset($option['name'])) $sql_data_array['template_name'] = $option['name'];
-
$res=tep_db_perform(TABLE_PRODUCTS_AM_TEMPLATES, $sql_data_array);
if(!$res)
@@ -44,8 +43,10 @@
if(!isset($option['id'])) return 'id';
+ $where='';
if(isset($option['id'])) $where .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+
if(isset($option['name'])) $sql_data_array['template_name'] = $option['name'];
$res=tep_db_perform(TABLE_PRODUCTS_AM_TEMPLATES, $sql_data_array, 'update' , substr($where,3) );
@@ -114,6 +115,8 @@
if(strlen($sql)==0)
return false;
+ sqlamattribute2template::delete($option);
+
$sql ="DELETE FROM ".TABLE_PRODUCTS_AM_TEMPLATES." WHERE ".substr($sql,3);
$res=$DB->query($sql);
@@ -129,8 +132,9 @@
$object= new stdclass();
+
foreach($array as $key=>$value){
- if( strpos($key,'template_') ===0)
+ if( substr($key,0,9) =='template_')
$key=substr($key,9);
$object->$key = $value;
@@ -139,6 +143,21 @@
return $object;
}
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'template_id'=>'',
+ 'template_name'=>'',
+ );
+
+ return self::CleanKey($par);
+ }
+
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -59,10 +59,10 @@
self::getInstance();
- if( ! isset($option['id']) )
- self::$error = __('no id');
- else
- $id = (int)$option['id'];
+// if( ! isset($option['id']) )
+// self::$error = __('no id');
+// else
+// $id = (int)$option['id'];
if( ! isset($option['post']) )
self::$error = __('no post');
@@ -92,6 +92,8 @@
else
$categories_id = $res->__get('insertId');
+
+
// cpath adjust
$sql_data_array=array();
$sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($categories_id);
@@ -99,8 +101,8 @@
// table language adjust
- $categories_name_array = $_POST['categories_name'];
- $categories_desc_array = $_POST['categories_description'];
+ $categories_name_array = $post['categories_name'];
+ $categories_desc_array = $post['categories_description'];
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
@@ -113,18 +115,18 @@
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
$sql_data_array = array_merge($sql_data_array,self::$modules->get_insert_table_categories_description (array(),$list_languages[$i]['id']));
- tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
+ $res=tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
}
-
+// var_dump($res);
/// Child module, Call After Update process
- self::$modules->after_update($id);
+ self::$modules->after_update($categories_id);
-
+/*
if(!$res)
return $res;
- else
- return $res->__get('insertId');
+ else*/
+ return $categories_id;
}
@@ -315,7 +317,7 @@
}
// ACA START DELETE CATEGORY
- self::$modules->delete($categories[$i]['id']);
+ self::$modules->delete($_id);
// child tables cats
$DB->query("delete from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$_id . "'");
Modified: trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlconfiguration.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -45,6 +45,8 @@
return $res->__get('insertId');
}
+
+
/**
@brief update ligne in table configuration
*/
@@ -172,6 +174,30 @@
return $object;
}
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'configuration_id',
+ 'configuration_key',
+ 'configuration_title',
+ 'configuration_value',
+ 'configuration_description',
+ 'configuration_group_id',
+ 'sort_order',
+ 'date_added',
+ 'last_modified',
+ 'use',
+ 'set',
+
+ );
+
+ return self::CleanKey($par);
+ }
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -39,8 +39,7 @@
self::getInstance();
$DB=Database::getInstance();
- $languages_id = $option['language_id'];
- return true;
+ return self::update($option);
}
/**
@@ -51,7 +50,7 @@
self::getInstance();
$DB=Database::getInstance();
- if(!isset($option['action']) && !isset($option['id'])) return 'action or id';
+ if( !isset($option['id'])) return 'id';
$list_languages=tep_get_languages();
$where ='';
@@ -62,8 +61,13 @@
$post['content_id'] = $content_id;
}
- if(isset($option['action'])) $action=$option['action'];
+// if(isset($option['action'])) $action=$option['action'];
+ if(! self::fetch($option))
+ $action = 'insert';
+ else
+ $action = 'update';
+
// Put post value
if(isset($option['post'])){
$post=$option['post'];
@@ -165,17 +169,25 @@
self::getInstance();
$DB=Database::getInstance();
- $languages_id = $option['language_id'];
+
+// $languages_id = $option['language_id'];
$cat_list =array();
$list_languages=tep_get_languages();
$sql ="AND ";
if(isset($option['id'])){
$ID = (int) $option['id'];
-// $sql .="AND p.products_id = '".(int)tep_db_input($option['id'])."' ";
+ $sql .="AND p.content_id = '".(int)tep_db_input($option['id'])."' ";
}
+// if(isset($option['language_id'])){
+// $languages_id = (int)$option['language_id'];
+// $sql .="AND pd.language_id = '".(int)tep_db_input($option['language_id'])."' ";
+// }
+// $sql =substr($sql,3);
+
+
$content_query = $DB->query("select c.content_id, content_name, date_added, last_modified, content_status from " . TABLE_CONTENT . " c where c.content_id = '" . (int)$ID . "' ");
$cInfo_array = tep_db_fetch_array($content_query);
@@ -248,9 +260,8 @@
$DB->query("DELETE FROM " . TABLE_CONTENT_TO_CATEGORIES . " WHERE content_id = '" . (int)$cms_id . "' AND categories_id = '" . (int)$product_categories[$i] . "'");
}
}
- else {
+ else
$DB->query("delete from " . TABLE_CONTENT_TO_CATEGORIES . " where content_id = '" . (int)$cms_id . "'");
- }
$product_categories_query = $DB->query("SELECT COUNT(*) AS total FROM " . TABLE_CONTENT_TO_CATEGORIES . " WHERE content_id = '" . (int)$cms_id . "'");
@@ -258,7 +269,7 @@
if ($product_categories['total'] == '0') {
- self::$modules->delete($ID);
+ self::$modules->delete($cms_id);
// childs tables
$DB->query("delete from " . TABLE_CONTENT_DESCRIPTION . " where content_id = '" . (int)$cms_id . "'");
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -7,72 +7,195 @@
@date 22/09/11, 20:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class manage link table configuration
+ @class sqlorder
*/
-
-
class sqlorder
implements ModSqlDataDriver{
+ /**
+ @var object childs module class
+ */
+ public static $modules;
+ /**
+ @var current ressource class
+ */
+ protected static $_instance;
+ /**
+ @var string error detail
+ */
+ public static $error = false;
+ /**
+ @brief constructor
+ no direct call, but is auto call by static public method
+ This method init Childs modules class
+ */
+ protected function __construct(){
+ /**
+ TODO : remplacer le nom de constante par un MODULE_CATEGORIES_INSTALLED_BO
+ */
+ self::$modules=new AcaFactory('categories','MODULE_ACACAT_INSTALLED_BO');
+ self::$modules->set_image_handler();
+ }
/**
- @brief create new ligne in table configuration
+ @brief for call construct class in singletown
+ @return current instance
*/
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+
+ /**
+ @brief create new record
+ @param $option array
+ @return (bool)false Or (Int) id create
+ */
public static function create($option){
-// if(!isset($option['key'])) return 'key';
-//
-// if(isset($option['id'])) $sql_data_array['configuration_id'] = $option['id'];
-// if(isset($option['title'])) $sql_data_array['configuration_title'] = $option['title'];
-// $sql_data_array['configuration_key'] = $option['key'];
-// if(isset($option['value'])) $sql_data_array['configuration_value'] = $option['value'];
-// if(isset($option['description'])) $sql_data_array['configuration_description'] = $option['description'];
-// if(isset($option['group_id'])) $sql_data_array['configuration_group_id'] = $option['group_id'];
-// if(isset($option['sort_order'])) $sql_data_array['sort_order'] = $option['sort_order'];
-// if(isset($option['modified'])) $sql_data_array['last_modified'] = $option['modified'];
-// $sql_data_array['date_added'] = (isset($option['added'])) ? $option['added'] : date('Y-m-d H:i:s');
-// if(isset($option['use'])) $sql_data_array['use'] = $option['use'];
-// if(isset($option['set'])) $sql_data_array['set'] = $option['set'];
-// $sql_data_array['configuration_type'] = (isset($option['type'])) ? $option['type'] : 2;
-//
-// $res=tep_db_perform(TABLE_CONFIGURATION, $sql_data_array);
-//
-// if(!$res)
-// return $res;
-// else
-// return $res->__get('insertId');
+ self::getInstance();
+
+ if( ! isset($option['id']) )
+ self::$error = __('no id');
+ else
+ $id = (int)$option['id'];
+
+ if( ! isset($option['post']) )
+ self::$error = __('no post');
+ else
+ $post = $option['post'];
+
+ $list_languages=tep_get_languages();
+
+ $sql_data_array['date_added'] = 'now()';
+ $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
+ $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
+
+ $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
+ $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
+
+ // Put post value
+ self::$modules->load_post_values($post);
+
+ self::$modules->get_insert_table_categories($sql_data_array,'');
+
+ $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
+
+
+
+ if(!$res)
+ return $res;
+ else
+ $categories_id = $res->__get('insertId');
+
+ // cpath adjust
+ $sql_data_array=array();
+ $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($categories_id);
+ $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $categories_id . "'");
+
+
+ // table language adjust
+ $categories_name_array = $_POST['categories_name'];
+ $categories_desc_array = $_POST['categories_description'];
+
+
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+ $language_id = $list_languages[$i]['id'];
+ $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
+ 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
+
+ $insert_sql_data = array('categories_id' => $categories_id,
+ 'language_id' => $list_languages[$i]['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_categories_description (array(),$list_languages[$i]['id']));
+
+ tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
+ }
+
+
+ /// Child module, Call After Update process
+ self::$modules->after_update($id);
+
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
}
+
/**
- @brief update ligne in table configuration
+ @brief update record
*/
public static function update($option){
-// if(!isset($option['key']) && !isset($option['id'])) return 'key or id';
-//
-// $where ='';
-// if(isset($option['id'])) $where .="AND configuration_id = '".(int)$option['id']."' ";
-// if(isset($option['key'])) $where .="AND configuration_key = '".$option['key']."' ";
-//
-// if(isset($option['title'])) $sql_data_array['configuration_title'] = $option['title'];
-// if(isset($option['value'])) $sql_data_array['configuration_value'] = $option['value'];
-// if(isset($option['description'])) $sql_data_array['configuration_description'] = $option['description'];
-// if(isset($option['group_id'])) $sql_data_array['configuration_group_id'] = $option['group_id'];
-// if(isset($option['sort_order'])) $sql_data_array['sort_order'] = $option['sort_order'];
-// $sql_data_array['last_modified'] = (isset($option['modified'])) ? $option['modified'] : date('Y-m-d H:i:s');
-// if(isset($option['use'])) $sql_data_array['use'] = $option['use'];
-// if(isset($option['set'])) $sql_data_array['set'] = $option['set'];
-// $sql_data_array['configuration_type'] = (isset($option['type'])) ? $option['type'] : 2;
-//
-//
-//
-//
-//
-// $res=tep_db_perform(TABLE_CONFIGURATION, $sql_data_array, 'update' , substr($where,3) );
+ self::getInstance();
- return $res;
+ if( ! isset($option['id']) )
+ self::$error = __('no id');
+ else
+ $id = (int)$option['id'];
+
+ if( ! isset($option['post']) )
+ self::$error = __('no post');
+ else
+ $post = $option['post'];
+
+ $list_languages=tep_get_languages();
+
+ $sql_data_array = $option['sqlarray'];
+
+ $sql_data_array['last_modified'] = 'now()';
+ $sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
+ $sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
+ $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($id,'category');
+ $sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
+ $sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
+
+
+ // Put post value
+ self::$modules->load_post_values($post);
+
+ $sql_data_array=array_merge($sql_data_array, (array) self::$modules->get_update_table_categories($sql_data_array) );
+
+
+ tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $id . "'");
+
+ $categories_name_array = $post['categories_name'];
+ $categories_desc_array = $post['categories_description'];
+
+
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+
+ $language_id = (int)$list_languages[$i]['id'];
+ $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
+ 'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id]));
+
+ $tabl=self::$modules->get_update_table_categories_description ($list_languages[$i]['id']);
+ $sql_data_array = array_merge($sql_data_array, $tabl);
+
+ tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . $id . "' and language_id = '" . $language_id . "'");
+
+ }
+
+// if ( !empty($_FILES['categories_image']['tmp_name']) ) {
+// $categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES);
+// tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");
+// }
+
+
+ /// Child module, Call After Update process
+ self::$modules->after_update($id);
+
+
+ if(self::$error !=false)
+ return false;
+ else
+ return true;
}
/**
@@ -97,40 +220,79 @@
*/
public static function fetch($option,$shortkey=false){
+ self::getInstance();
$DB=Database::getInstance();
-// $sql ="";
- if(!isset($option['id']))
- return '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)(string)tep_db_input($option['group_id'])."' ";
-//
-// $sql ="SELECT * FROM ".TABLE_ORDERS." WHERE ".substr($sql,3);
-//
-// $res=$DB->query($sql);
-//
-// $num = $res->__get('numRows');
-//
-// if($num == 1){
-// $result=$res->fetchAssoc();
-// return ((!$shortkey)? $result : self::CleanKey($result));
-// }
-// elseif($num > 1){
-// $array=array();
-//
-// foreach($res->fetchAllAssoc() as $result)
-// $array[]= ((!$shortkey)? $result : self::CleanKey($result));
-//
-// return $array;
-// }
+ $sql ="";
+ if( ! isset($option['id']) )
+ self::$error = __('no id');
+ else{
+ $ID = $option['id'];
+ }
- return new order((int)tep_db_input($option['id']));
+ if( ! isset($option['language_id']) )
+ self::$error = __('no language_id');
+ else
+ $languages_id = $option['language_id'];
-// return false;
+ $sql ="SELECT * FROM " . TABLE_CATEGORIES . " c WHERE c.categories_id = '" . (int)$ID . "' "; //.substr($sql,3);
+
+ $res=$DB->query($sql);
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result = $res->fetchAssoc();
+
+ $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
+
+ foreach($check_q->fetchAllAssoc() as $catlg){
+ $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
+ $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
+ }
+ $result['products_count'] = categorieUtility::products_in_category_count($ID);
+ $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
+ $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
+ $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
+
+ /// Childs module load
+ self::$modules->load_db_values($ID);
+
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result){
+
+ $check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
+
+ foreach($check_q->fetchAllAssoc() as $catlg){
+ $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
+ $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
+ }
+ $result['products_count'] = categorieUtility::products_in_category_count($ID);
+ $result['cms_count'] =categorieUtility::cms_in_category_count($ID);
+ $result['childs_count'] =categorieUtility::childs_in_category_count($ID);
+ $result['cPath'] = categorieUtility::get_generated_category_path_ids($ID);
+
+ /// Childs module load
+ self::$modules->load_db_values($ID);
+
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+ }
+
+ return $array;
+ }
+
+
+ return false;
}
+
+
+
+
/**
@brief delete row
*/
@@ -194,22 +356,40 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'configuration_') ===0)
- $key=substr($key,14);
- elseif(strpos($key,'_function') >0)
- $key=str_replace('_function','',$key);
- elseif(strpos($key,'date_') ===0)
- $key=str_replace('date_','',$key);
- elseif(strpos($key,'last_') ===0)
- $key=str_replace('last_','',$key);
+ if( strpos($key,'orders_') ===0)
+ $key=substr($key,7);
-
$object->$key = $value;
}
return $object;
}
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'orders_id',
+// 'configuration_key',
+// 'configuration_title',
+// 'configuration_value',
+// 'configuration_description',
+// 'configuration_group_id',
+// 'sort_order',
+// 'date_added',
+// 'last_modified',
+// 'use',
+// 'set',
+
+ );
+
+ return self::CleanKey($par);
+ }
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproduct.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproduct.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -45,7 +45,7 @@
// if(!isset($option['key'])) return 'key';
$languages_id = $option['language_id'];
- $type = (isset($option['type']))? $option['type'] : 0;
+ $type = (isset($option['type']))? $option['type'] : 1;
$sql_data_array = array(
'products_type' => $type,
@@ -53,7 +53,7 @@
'products_price' => 0,
'products_date_added' => 'now()',
'manufacturers_id' => '',
- 'track_stock' => ( ($option['type'] == 1) ? 1 : 0 )
+ 'track_stock' => ( ($type == 1) ? 1 : 0 )
);
$resobj=tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
@@ -85,14 +85,14 @@
self::getInstance();
$DB=Database::getInstance();
- if(!isset($option['action']) && !isset($option['id'])) return 'action or id';
+ if(/*!isset($option['action']) &&*/ !isset($option['id'])) return ' id';
$list_languages=tep_get_languages();
$where ='';
// $languages_id = $option['language_id'];
if(isset($option['id'])) $products_id = (int)$option['id'];
- if(isset($option['action'])) $action=$option['action'];
+// if(isset($option['action'])) $action=$option['action'];
if(isset($option['post'])) $post=$option['post'];
@@ -100,8 +100,11 @@
$post['products_id'] = $products_id;
$sql_data_array = $option['sqlarray'];
+ if(! self::fetch($option))
+ $action = 'insert_product';
+ else
+ $action = 'update_product';
-
/// Call ACA module put post var
self::$modules->load_post_values($post);
@@ -120,12 +123,11 @@
/// Clean link product to categorie and save new link
- if(isset($option['cPath']) && count($post['categories']) == 0)
+ if(isset($option['cPath']) && count($post['categories']) == 0){
$post['categories'][] = $option['cPath'];
+ sqlcategorie::DataInCat('products', $products_id, $post['categories']);
+ }
- sqlcategorie::DataInCat('products', $products_id, $post['categories']);
-
-
/// 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
@@ -205,7 +207,7 @@
self::getInstance();
$DB=Database::getInstance();
- $languages_id = $option['language_id'];
+
$cat_list =array();
$sql ="AND ";
@@ -214,6 +216,11 @@
$sql .="AND p.products_id = '".(int)tep_db_input($option['id'])."' ";
}
+ if(isset($option['language_id'])){
+ $languages_id = (int)$option['language_id'];
+ $sql .="AND pd.language_id = '".(int)tep_db_input($option['language_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)(string)tep_db_input($option['group_id'])."' ";
@@ -222,7 +229,7 @@
// $DB=Database::getInstance();
- $product_query = $DB->query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity,p.products_type as products_virtual_typeID, p.products_model, p.products_image, p.products_price, p.products_weight, p.track_stock, p.products_date_added, p.products_last_modified, products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id,p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'". $sql );
+ $product_query = $DB->query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity,p.products_type as products_virtual_typeID, p.products_model, p.products_image, p.products_price, p.products_weight, p.track_stock, p.products_date_added, p.products_last_modified, products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id,p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id ". $sql );
$product = tep_db_fetch_array($product_query);
tep_db_free_result($product_query);
@@ -282,25 +289,32 @@
else
return false;
+
if(isset($option['catarray'])){
foreach($option['catarray'] as $k=>$v)
$product_categories[$k]=(int)tep_db_input($v) ;
- }
+ for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {
+ $DB->query($s="DELETE FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " WHERE products_id = '" . (int)$product_id . "' AND categories_id = '" . (int)$product_categories[$i] . "' LIMIT 1 ");
- for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {
- $DB->query("DELETE FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " WHERE products_id = '" . (int)$product_id . "' AND categories_id = '" . (int)$product_categories[$i] . "'");
+ }
}
+ else
+ $DB->query($s="DELETE FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " WHERE products_id = '" . (int)$product_id . "' ");
+
+
$product_categories_query = $DB->query("SELECT COUNT(*) AS total FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " WHERE products_id = '" . (int)$product_id . "'");
$product_categories = tep_db_fetch_array($product_categories_query);
if ($product_categories['total'] == '0') {
- self::$modules->delete($ID);
+ self::$modules->delete($product_id);
$res=tep_remove_product($product_id);
}
+ else
+ return false;
return $res;
}
Added: trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductattribute.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -0,0 +1,194 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class manage link table configuration
+*/
+
+
+
+
+class sqlproductattribute
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table options
+ @note id (products_options_id) is not auto incremente
+ */
+ public static function create($option){
+
+// if(!isset($option['id'])) return 'id';
+
+// if(isset($option['products_attributes_id'])) $sql_data_array['products_attributes_id'] = $option['products_attributes_id'];
+ if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
+ if(isset($option['options_id'])) $sql_data_array['options_id'] = $option['options_id'];
+ if(isset($option['options_values_id'])) $sql_data_array['options_values_id'] = $option['options_values_id'];
+ if(isset($option['options_values_price'])) $sql_data_array['options_values_price'] = $option['options_values_price'];
+ if(isset($option['price_prefix'])) $sql_data_array['price_prefix'] = $option['price_prefix'];
+ if(isset($option['products_options_sort_order'])) $sql_data_array['products_options_sort_order'] = $option['products_options_sort_order'];
+ if(isset($option['products_options_values_url'])) $sql_data_array['products_options_values_url'] = $option['products_options_values_url'];
+ if(isset($option['options_values_weight'])) $sql_data_array['options_values_weight'] = $option['options_values_weight'];
+
+
+ $res=tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ $where='';
+ if(isset($option['id'])) $where .="AND products_attributes_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['products_id'])) $where .="AND products_id = '".(string)tep_db_input($option['products_id'])."' ";
+ if(isset($option['options_id'])) $where .="AND options_id = '".(string)tep_db_input($option['options_id'])."' ";
+ if(isset($option['options_values_id'])) $where .="AND options_values_id = '".(string)tep_db_input($option['options_values_id'])."' ";
+
+ if($where =='')
+ return false;
+
+// if(isset($option['products_attributes_id'])) $sql_data_array['products_attributes_id'] = $option['products_attributes_id'];
+ if(isset($option['products_id'])) $sql_data_array['products_id'] = $option['products_id'];
+ if(isset($option['options_id'])) $sql_data_array['options_id'] = $option['options_id'];
+ if(isset($option['options_values_id'])) $sql_data_array['options_values_id'] = $option['options_values_id'];
+ if(isset($option['options_values_price'])) $sql_data_array['options_values_price'] = $option['options_values_price'];
+ if(isset($option['price_prefix'])) $sql_data_array['price_prefix'] = $option['price_prefix'];
+ if(isset($option['products_options_sort_order'])) $sql_data_array['products_options_sort_order'] = $option['products_options_sort_order'];
+ if(isset($option['products_options_values_url'])) $sql_data_array['products_options_values_url'] = $option['products_options_values_url'];
+ if(isset($option['options_values_weight'])) $sql_data_array['options_values_weight'] = $option['options_values_weight'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $where ="";
+ if(isset($option['id'])) $where .="AND products_attributes_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['products_id'])) $where .="AND products_id = '".(string)tep_db_input($option['products_id'])."' ";
+ if(isset($option['options_id'])) $where .="AND options_id = '".(string)tep_db_input($option['options_id'])."' ";
+ if(isset($option['options_values_id'])) $where .="AND options_values_id = '".(string)tep_db_input($option['options_values_id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE ".substr($where,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_attributes_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'products_options_') ===0)
+ $key=substr($key,17);
+
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'products_attributes_id'=>'',
+ 'products_id'=>'',
+ 'options_id'=>'',
+ 'options_values_id'=>'',
+ 'options_values_price'=>'',
+ 'images_enabled'=>'',
+ 'products_options_sort_order'=>'',
+ 'products_options_values_url'=>'',
+ 'options_values_weight'=>'',
+
+ );
+
+ return self::CleanKey($par);
+ }
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -23,7 +23,9 @@
*/
public static function create($option){
- if(!isset($option['id'])) return 'id';
+ /// if not id, use autoValue
+ if(!isset($option['id']) || empty($option['id']))
+ $option['id']=self::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id') ;
if(isset($option['id'])) $sql_data_array['products_options_id'] = $option['id'];
if(isset($option['language_id'])) $sql_data_array['language_id'] = $option['language_id'];
@@ -44,12 +46,15 @@
return $option['id'];
}
+
+
/**
@brief update ligne in table configuration
*/
public static function update($option){
if(!isset($option['id'])) return 'id';
+ $where='';
if(isset($option['id'])) $where .="AND products_options_id = '".(int)tep_db_input($option['id'])."' ";
if(isset($option['language_id'])) $where .="AND language_id = '".(string)tep_db_input($option['language_id'])."' ";
@@ -161,6 +166,41 @@
return $object;
}
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+ global $languages_id;
+ $par = array(
+ 'products_options_id'=>'',
+ 'language_id'=>$languages_id,
+ 'products_options_name'=>'',
+ 'products_options_track_stock'=>'',
+ 'products_options_sort_order'=>'',
+ 'products_options_images_enabled'=>'',
+ 'products_options_type'=>'',
+ 'products_options_length'=>'',
+ 'products_options_comment'=>'',
+ 'products_options_condition'=>'',
+ );
+
+ return self::CleanKey($par);
+ }
+
+ /**
+ * Returns placebo autoincrement value
+ * @access public
+ * @param $strTable string table name
+ * @param $strField string field name
+ * @return mixed
+ */
+ private static function getNextAutoValue($strTable,$strField) {
+ $db=Database::getInstance();
+ $objres=$db->query("select max($strField) + 1 as next from $strTable limit 1");
+ $res=$objres->fetchAssoc();
+ return (int)$res['next'];
+ }
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -22,7 +22,7 @@
*/
public static function create($option){
- if(!isset($option['id'])) return 'id';
+ if(!isset($option['id'])) return 'id ';
if(isset($option['id'])) $sql_data_array['products_options_values_id'] = $option['id'];
if(isset($option['language_id'])) $sql_data_array['language_id'] = $option['language_id'];
@@ -38,6 +38,8 @@
return $option['id'];
}
+
+
/**
@brief update ligne in table configuration
*/
@@ -45,10 +47,11 @@
if(!isset($option['id'])) return 'id';
+ $where = '';
if(isset($option['id'])) $where .="AND products_options_values_id = '".(int)tep_db_input($option['id'])."' ";
if(isset($option['language_id'])) $where .="AND language_id = '".(string)tep_db_input($option['language_id'])."' ";
- if($where =='')
+ if(strlen($where)==0)
return false;
if(isset($option['name'])) $sql_data_array['products_options_values_name'] = $option['name'];
@@ -140,10 +143,12 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'products_options_') ===0)
+ if( strpos($key,'products_options_values_') ===0)
+ $key=substr($key,strlen('products_options_values_'));
+ elseif( strpos($key,'products_options_values_id') ===0)
+ $key='id';
+ elseif( strpos($key,'products_options_') ===0)
$key=substr($key,17);
- if( strpos($key,'products_options_values_id') ===0)
- $key='id';
$object->$key = $value;
}
@@ -151,6 +156,36 @@
return $object;
}
+
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'products_options_values_id'=>'',
+ 'language_id'=>'',
+ 'products_options_values_name'=>'',
+ 'products_options_values_thumbnail'=>'',
+ );
+
+ return self::CleanKey($par);
+ }
+
+ /**
+ * Returns placebo autoincrement value
+ * @access public
+ * @param $strTable string table name
+ * @param $strField string field name
+ * @return mixed
+ */
+ private static function getNextAutoValue($strTable,$strField) {
+ $db=Database::getInstance();
+ $objres=$db->query("select max($strField) + 1 as next from $strTable limit 1");
+ $res=$objres->fetchAssoc();
+ return (int)$res['next'];
+ }
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -42,16 +42,18 @@
return $res->__get('insertId');
}
+
+
/**
@brief update ligne in table configuration
*/
public static function update($option){
if(!isset($option['id'])) return 'id';
-
+ $where='';
if(isset($option['id'])) $where .="AND products_options_values_to_products_options_id = '".(int)tep_db_input($option['id'])."' ";
- if($where =='')
+ if(strlen($where)==0)
return false;
if(isset($option['options_id'])) $sql_data_array['products_options_id'] = $option['options_id'];
@@ -159,6 +161,21 @@
return $object;
}
+ /**
+ @brief
+ @return array empty
+ */
+ public static function Specimen(){
+
+ $par = array(
+ 'products_options_values_to_products_options_id'=>'',
+ 'products_options_id'=>'',
+ 'products_options_values_id'=>'',
+ );
+
+ return self::CleanKey($par);
+ }
+
}
Modified: trunk/catalog/admin/includes/classes/productUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/productUtility.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/classes/productUtility.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -3,8 +3,8 @@
@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 11/05/11, 18:03
+ @version 2.1.1
+ @date 12/11/11, 10:49
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class productUtility
@@ -297,29 +297,39 @@
}
tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "'");
- tep_db_query("delete from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$product_id . "'");
tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'");
- tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "'");
- tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int)$product_id . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'");
+
+/**
+ TODO REvoir comportement vis a vis des commandes
+ Suppression de l'id dans les commandes, pour autoriser la reatribution de l'id du produits
+*/
+
+
/* Element modulaire aca */
if (!is_object($products_modules)) {
-
require_once (DIR_WS_MODULES.'pages/products.php');
$products_modules = new productsACA();
}
// ACA START DELETE PRODUCT
$products_modules->delete_product($product_id);
+ tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'");
+ tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "'");
+ tep_db_query("delete from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
+
osCSS_Cache::clear('categoriesBox');
osCSS_Cache::clear('category_tree');
osCSS_Cache::clear('also_purchased');
qtpro_doctor_amputate_all_from_product($product_id);
+
+
+ return true;
}
/**
Modified: trunk/catalog/admin/includes/modules/products/desc_base.php
===================================================================
--- trunk/catalog/admin/includes/modules/products/desc_base.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/admin/includes/modules/products/desc_base.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 17/10/10, 17:37
+ @version 2.1.1
+ @date 11/11/11, 23:47
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class desc_base
@@ -18,11 +18,18 @@
public $title;
public $description;
public $sort_order;
+ /**
+ @var object info current data
+ */
public static $pInfo;
+ /**
+ @var array info post data
+ */
+ public static $pArray;
public $enabled;
/**
- class constructor
+ @brief class constructor
*/
function desc_base() {
$this->code = 'desc_base';
@@ -54,19 +61,19 @@
}
/**
- Edition produit
+ @brief Edition produit
UP db
*/
function insert_table_products_description ($language_id) {
- $myarray=array( 'products_description' => self::$pInfo['products_description'][$language_id],
- 'products_chapo' => self::$pInfo['products_chapo'][$language_id],
- 'products_url' => self::$pInfo['products_url'][$language_id]
+ $myarray=array( 'products_description' => self::$pArray['products_description'][$language_id],
+ 'products_chapo' => self::$pArray['products_chapo'][$language_id],
+ 'products_url' => self::$pArray['products_url'][$language_id]
);
return $myarray;
}
/**
- Edition produit
+ @brief Edition produit
UP db
*/
function update_table_products_description ($language_id) {
@@ -75,7 +82,7 @@
}
/**
- Edition/affichage produit
+ @brief Edition/affichage produit
UP db
*/
function load_db_values ($products_id) {
@@ -95,10 +102,10 @@
}
/**
- The $post contains only post values for this module pInfo is an array: [field name][language id]=value
+ @brief The $post contains only post values for this module pInfo is an array: [field name][language id]=value
*/
function load_post_values ($post) {
- self::$pInfo=$post;
+ self::$pArray=$post;
}
@@ -119,7 +126,7 @@
/** Fonction complementaire utilisé dans la page produits */
/**
- Fournit tableau pour construire la rechchere en utilisant les option de ce modules
+ @brief Fournit tableau pour construire la rechchere en utilisant les option de ce modules
*/
public function shearch_in_product(){
Modified: trunk/catalog/common/classes/shoppingCart.php
===================================================================
--- trunk/catalog/common/classes/shoppingCart.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/common/classes/shoppingCart.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -356,6 +356,7 @@
$products_array[] = array('id' => $products_id,
'name' => $product_obj->products_name,
+ 'type' => $product_obj->type,
'model' => $product_obj->products_model,
'image' => $product_obj->products_image,
'track_stock' => $product_obj->track_stock,
@@ -402,15 +403,23 @@
if ($this->count_contents() > 0) {
reset($this->contents);
- while (list($products_id, ) = each($this->contents)) {
- $virtual_products_result = tep_db_query("select products_type from ".TABLE_PRODUCTS." where products_id=".(int)$products_id);
- if (tep_db_num_rows($virtual_products_result) > 0) {
- $res=tep_db_fetch_array($virtual_products_result);
- $array_content_type[] = (in_array($res['products_type'], explode(';',TYPE_VIRTUAL_PRODUCTS)))? 'virtual' : 'physical';
+ if(strpos(TYPE_VIRTUAL_PRODUCTS,',')>0)
+ $virt=explode(',',TYPE_VIRTUAL_PRODUCTS);
+ elseif(strpos(TYPE_VIRTUAL_PRODUCTS,';')>0)
+ $virt=explode(';',TYPE_VIRTUAL_PRODUCTS);
+ else
+ $virt = array();
+
+
+ foreach($this->get_products() as $row){
+ if(in_array($row['type'],$virt ) )
+ $array_content_type[] = 'virtual';
+ else
+ $array_content_type[] = 'physical';
+
+
}
- else $array_content_type[] = 'physical';
- }
}
if(in_array('virtual',$array_content_type) && in_array('physical',$array_content_type)) $this->content_type = 'mixed';
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -402,12 +402,16 @@
}
/**
- * \brief Construction d'un select sur les catégories actives
+ * \brief Construction d'un select sur les catégories actives et not hidden
+ * \param $categories_array
+ * \param $parent_id
+ * \param $indent
+ * \return array result
*/
public static function get_categories($categories_array = '', $parent_id = '0', $indent = '') {
global $languages_id;
if (!is_array($categories_array)) $categories_array = array();
- $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_status='1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
+ $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_status='1' and c.categories_hidden='1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']);
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2011-11-08 23:14:54 UTC (rev 3874)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2011-11-12 11:27:18 UTC (rev 3875)
@@ -490,28 +490,56 @@
Recuperation price pour attribute
*/
public static function get_product_attribut_price($products_id, $attributes=array()){
- $attributes_price = 0;
-
+ $attrib_price = 0;
+ $products_id = (int)$products_id;
$uprid=tep_get_uprid($products_id, $attributes);
- if(!isset(self::$array_data[$products_id]) || !is_object(self::$array_data[$products_id])) self::$array_data[$products_id]=new objectInfo(array());
+ if(!isset(self::$array_data[$uprid]) || !is_object(self::$array_data[$products_id]))
+ self::$array_data[$products_id]=self::get_item($products_id); //new objectInfo(array());
- if(isset(self::$array_data[$products_id]->product_attribut_price) && isset(self::$array_data[$products_id]->product_attribut_price[$uprid]) ) return self::$array_data[$products_id]->product_attribut_price[$uprid] ;
+ if(isset(self::$array_data[$products_id]->product_attribut_price) && isset(self::$array_data[$products_id]->product_attribut_price[$uprid]) )
+ return self::$array_data[$products_id]->product_attribut_price[$uprid] ;
+
+
+ $price_prod = self::$array_data[$products_id]->products_price;
+
if (is_array($attributes) && count($attributes)>0) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
$attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
+
$attribute_price = tep_db_fetch_array($attribute_price_query);
- if ($attribute_price['price_prefix'] == '+') {
- $attributes_price += $attribute_price['options_values_price'];
- } else {
- $attributes_price -= $attribute_price['options_values_price'];
- }
+
+
+ switch($attribute_price['price_prefix']){
+ case 'x':
+ $show_price = 0.0 + ( $price_prod * (float)$attribute_price['options_values_price']) - $price_prod ;
+ break;
+ case '/':
+ if($attribute_price['options_values_price']<=0) $attribute_price['options_values_price'] = 1;
+ $show_price = 0.0 + $price_prod - ($price_prod / $attribute_price['options_values_price']);
+ break;
+ case '+':
+ $show_price = 0.0 + $attribute_price['options_values_price'];
+ break;
+ case '-':
+ $show_price = 0.0 - $attribute_price['options_values_price'];
+ break;
+// case '=':
+// $show_price = 0.0 + $attribute_price['options_values_price'];
+// break;
+ default:
+ $show_price = 0.0 ;
+ }
+
+ if ($show_price > 0)
+ $attrib_price += $show_price;
+ else
+ $attrib_price -= $show_price;
}
}
-
- return self::$array_data[$products_id]->product_attribut_price[$uprid] =$attributes_price;
+ return self::$array_data[$products_id]->product_attribut_price[$uprid] =$attrib_price;
}
/**
@@ -684,7 +712,7 @@
// $product_array = $product_array_master;
if(isset($this->modules) && is_array($this->modules))
foreach ($this->modules as $ke...
[truncated message content] |
|
From: <os...@us...> - 2011-11-08 23:15:01
|
Revision: 3874
http://oscss.svn.sourceforge.net/oscss/?rev=3874&view=rev
Author: oscim
Date: 2011-11-08 23:14:54 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
suite correction et amelioration seo / rewrite htaccess et acces au images public
Ajustement class page pour normaliser l'appel au tags de la page courante
Amelioration Class seo , gestion dynamique des format de reecriture, synthetisation de la methode parse_parameters
Modified Paths:
--------------
trunk/catalog/common/classes/image_ratio.php
trunk/catalog/common/classes/seo_url.php
trunk/catalog/document.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/functions/general.php
trunk/catalog/index.php
trunk/catalog/install/includes/modele/htaccess.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
Modified: trunk/catalog/common/classes/image_ratio.php
===================================================================
--- trunk/catalog/common/classes/image_ratio.php 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/common/classes/image_ratio.php 2011-11-08 23:14:54 UTC (rev 3874)
@@ -150,7 +150,7 @@
if(is_bool($mode) && $mode){
self::$Modele=null;
if (self::$env->inadmin)return tep_output_string($src);
- return tep_output_string(tep_get_httpdir().$src);
+ return tep_output_string(tep_get_httpdir().$theImg['src_origin']."?w=" . $width . "&h=" . $height);
}
else {
/// if cache return
@@ -159,7 +159,7 @@
return self::$CacheImage[self::$key][self::$keydim]['img'];
}
else {
- $image = '<img src="' . (!self::$env->inadmin ? tep_output_string(tep_get_httpdir().$src) : tep_output_string($src)) . '" alt="' . tep_output_string($alt) . '" ';
+ $image = '<img src="' . (!self::$env->inadmin ? tep_output_string(tep_get_httpdir().$theImg['src_origin']."?w=" . $width . "&h=" . $height ) : tep_output_string($src)) . '" alt="' . tep_output_string($alt) . '" ';
if($mode !='simple') $image .= 'width="' . $theImg['width'] . '" height="' . $theImg['height'] . '"';
if (tep_not_null($theImg['alt'])) $image .= ' title="' . tep_output_string($theImg['alt']) . '"';
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
@@ -401,6 +401,8 @@
if(isset(self::$CacheImage[self::$key][self::$keydim]) ) return self::$CacheImage[self::$key][self::$keydim];
+ $origin = $src;
+
$imgd = self::$CacheImage[self::$key]['conf']['getimagesize'];
if(self::$Modele !=null && method_exists(self::$Modele,'aspectratio' ))
@@ -424,6 +426,7 @@
$src=self::CleanPathReturn($src);
self::$CacheImage[self::$key][self::$keydim]['src']=$src;
+ self::$CacheImage[self::$key][self::$keydim]['src_origin']=$origin;
self::$CacheImage[self::$key][self::$keydim]['alt']=$alt;
self::$CacheImage[self::$key][self::$keydim]['width']=$width;
self::$CacheImage[self::$key][self::$keydim]['height']=$height;
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/common/classes/seo_url.php 2011-11-08 23:14:54 UTC (rev 3874)
@@ -118,8 +118,12 @@
@var object
*/
var $header_tag;
+ /**
+ * $header_tag activ
+ @var bool
+ */
+ public static $htexe = false;
-
/**
Interne static function
*/
@@ -163,7 +167,23 @@
$this->header_tag=array();
//ojp FILENAME_LINKS
- $seo_pages=array(FILENAME_DEFAULT,FILENAME_ACCOUNT,FILENAME_POPUP_IMAGE,FILENAME_PRODUCT_INFO,FILENAME_CONTENT,FILENAME_CREATE_ACCOUNT,FILENAME_ADVANCED_SEARCH,FILENAME_PRODUCTS_NEW,FILENAME_SMALL_PRICE,FILENAME_SPECIALS,FILENAME_BEST_SELLERS,FILENAME_SITEMAP,FILENAME_TEMPLATE,FILENAME_CONTACT_US, FILENAME_SHOPPING_CART);
+ $seo_pages=array(
+ FILENAME_DEFAULT,
+ FILENAME_ACCOUNT,
+ FILENAME_POPUP_IMAGE,
+ FILENAME_PRODUCT_INFO,
+ FILENAME_CONTENT,
+ FILENAME_CREATE_ACCOUNT,
+ FILENAME_ADVANCED_SEARCH,
+ FILENAME_PRODUCTS_NEW,
+ FILENAME_SMALL_PRICE,
+ FILENAME_SPECIALS,
+ FILENAME_BEST_SELLERS,
+ FILENAME_SITEMAP,
+ FILENAME_TEMPLATE,
+ FILENAME_CONTACT_US,
+ FILENAME_SHOPPING_CART
+ );
if ( defined('FILENAME_LINKS') ) $seo_pages[] = FILENAME_LINKS;
@@ -187,7 +207,7 @@
Conf
*/
self::$SEO_REWRITE_TYPE=defined('SEO_REWRITE_TYPE') ? SEO_REWRITE_TYPE : 'false';
- self::$USE_SEO_REDIRECT= defined('USE_SEO_REDIRECT') ? USE_SEO_REDIRECT : 'false';
+ self::$USE_SEO_REDIRECT= 'true'; //defined('USE_SEO_REDIRECT') ? USE_SEO_REDIRECT : 'false';
self::$USE_SEO_CACHE_GLOBAL=defined('USE_SEO_CACHE_GLOBAL') ? USE_SEO_CACHE_GLOBAL : 'false';
self::$USE_SEO_CACHE_LINKS=defined('USE_SEO_CACHE_LINKS') ? USE_SEO_CACHE_LINKS : 'false';
@@ -199,34 +219,34 @@
$this->cache = array();
$this->timestamp = 0;
- $this->reg_anchors['no-rewrite'] = array('products_id' => 'products_id=',
- 'cPath' => 'cPath=',
- 'manufacturers_id' => 'manufacturers_id=',
- 'pID' => 'pID=',
- 'content' => 'content=',
- 'divers' => 'divers=',
- 'lID' => 'lID=',
- 'customers_id' => 'customers_id=',
+
+ // respecter l'ordre
+ $this->reg_anchors= array(
+ 'pID' => 'pi',
+ 'products_id' => 'p',
+ 'cPath' => 'c',
+ 'manufacturers_id' => 'm',
+ 'content' => 't',
+ 'divers' => 'd',
+ 'lID' => 'l',
+ 'customers_id' => 'u',
+ 'type_object' => 'to',
);
- $this->reg_anchors['Rewrite'] = array('products_id' => '-p-',
- 'cPath' => '-c-',
- 'manufacturers_id' => '-m-',
- 'pID' => '-pi-',
- 'content' => '-t-',
- 'divers' => '-d-',
- 'lID' => '-l-',
- 'customers_id' => '-u-',
- );
- $this->reg_anchors['Rewrite-mode2'] = array('products_id' => 'p/',
- 'cPath' => 'c/',
- 'manufacturers_id' => 'm/',
- 'pID' => 'pi/',
- 'content' => 't/',
- 'divers' => 'd/',
- 'lID' => 'l/',
- 'customers_id' => 'u/',
- );
+
+
+ /**
+ @remarks mask pour reecriture
+ %1$s => key
+ %2$s => id
+ %3$s => title
+ %4$s => ext
+ */
+ $this->reg_mask['no-rewrite'] = '%1$s=%2$s';
+ $this->reg_mask['Rewrite'] = '%2$s-%1$s-%3$s.%4$s';
+ $this->reg_mask['Rewrite-mode2'] = '%1$s/%2$s/%3$s.%4$s';
+
+ /// ext apres reecriture
$this->reg_ext['no-rewrite']='html';
$this->reg_ext['Rewrite']='html';
$this->reg_ext['Rewrite-mode2']='html';
@@ -256,6 +276,7 @@
if ( _test_bool(self::$USE_SEO_CACHE_LINKS) ) $this->generate_links_cache();
}
+
if (_test_bool( self::$USE_SEO_REDIRECT)) $this->check_redirect();
@@ -264,7 +285,7 @@
/**
* \brief Prepa static var
*/
- self::$extention= (!empty($this->reg_ext[self::$SEO_REWRITE_TYPE]))? '.'.$this->reg_ext[self::$SEO_REWRITE_TYPE] : '';
+ self::$extention= (!empty($this->reg_ext[self::$SEO_REWRITE_TYPE]))? $this->reg_ext[self::$SEO_REWRITE_TYPE] : '';
self::$base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
self::$base_url_ssl = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
@@ -307,10 +328,14 @@
$this->start($this->timestamp);
$this->performance['NUMBER_URLS_GENERATED']++;
- if ( !in_array($page, $this->attributes['SEO_PAGES']) ) return $this->stock_href_link($page, $parameters, $connection, $add_session_id);
+ if ( !in_array($page, $this->attributes['SEO_PAGES']) )
+ return $this->stock_href_link($page, $parameters, $connection, $add_session_id);
+
$link = ($connection == 'NONSSL' || !(getenv('HTTPS') == 'on') )? self::$base_url : self::$base_url_ssl;
$separator = '?';
+
+
if ($this->not_null($parameters)) $link .= $this->parse_parameters($page, $parameters ,$connection , $separator);
else $link .= $this->parse_parameters($page, (!empty($parameters)?$parameters.'&':'') .'divers='.substr($page,0,strlen($page)-4) ,$connection , $separator); //$page;
@@ -339,8 +364,9 @@
public function header_tags($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = false){
$link = $connection == 'NONSSL' ? self::$base_url : self::$base_url_ssl;
$separator = '?';
+ self::$htexe = true;
$this->parse_parameters($page, $parameters ,$connection , $separator, true);
- if(!isset($this->header_tag['title'])) $this->transph_header_tag(array());
+ self::$htexe = false;
}
/**
@@ -354,7 +380,7 @@
}
/**
- * \brief Stock function, fallback use
+ * \brief Stock function, callback use
* @param $page
* @param $parameters
* @param $connection
@@ -420,38 +446,7 @@
}
}
- /**
- * \brief Function to append session ID if needed
- * @author Bobby Easland
- * @param $link string
- * @param $add_session_id boolean
- * @param $connection string
- * @param $separator string
- * @return string
- */
- private function add_sid( $link, $add_session_id, $connection, $separator ){
- global $request_type, $kill_sid;
- if ( ($add_session_id) && ($this->attributes['SESSION_STARTED']) && !_cst_bool('SESSION_FORCE_COOKIE_USE') ) {
- if ($this->not_null($this->attributes['SID'])) $_sid = $this->attributes['SID'];
- elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
- if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) $_sid = $this->SessionName() . '=' . $this->SessionID();
- }
- else $_sid=tep_session_name().'='.tep_session_id();
- } else $_sid=tep_session_name().'='.tep_session_id();
- switch(true){
- case (!isset($_SESSION['customer_id']) && _cst_bool('ENABLE_PAGE_CACHE') && class_exists('page_cache')):
- $return = $link . $separator . '<osCsid>';
- break;
- case (isset($_sid) && $this->not_null($_sid) && ( !$kill_sid )):
- $return = $link . $separator . tep_output_string($_sid);
- break;
- default:
- $return = $link;
- break;
- }
- return $return;
- }
/**
* \brief Function to parse the parameters into an SEO URL
@@ -468,100 +463,158 @@
krsort($p);
$container = array();
- foreach ($p as $index => $valuepair){
- $p2 = @explode('=', $valuepair);
+ // preparation array key/value
+ foreach ($p as $index => $valuepair)
+ if(!empty($valuepair) || $index !=0) {
+ $p2 = @explode('=', $valuepair);
- switch ($p2[0]){
- case 'products_id':
- switch(true){
- default:
- case ( !$this->is_attribute_string($p2[1]) && in_array($page,array(FILENAME_PRODUCT_INFO, FILENAME_DEFAULT) ) ):
- $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "p", $p2[1], $connection, $separator);
- break;
- default:
- $container[$p2[0]] = $p2[1];
- break;
- }
+ $p3[$p2[0]]=$p2[1];
+ }
+
+ $check=array_keys($this->reg_anchors);
+
+ foreach ($p3 as $key => $value){
+ $url='';
+ switch ($key){
+ case (in_array($key, $check)):
+
+ $Rkey=$this->reg_anchors[$key];
+ $function = 'GetName_'.$Rkey;
+ $url = $this->make_url($page, $this->$function($value), $key, $value, $separator);
+
+// $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
+ $this->ValidateName($url, $Rkey, $value, $connection, $separator);
+
break;
- case 'cPath':
- switch(true){
- case ($page == FILENAME_DEFAULT):
- default:
- $url = $this->make_url($page, $this->get_category_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "c", $p2[1], $connection, $separator);
- break;
-// case ( !$this->is_product_string($params) ):
-// if ( _test_bool($this->attributes['SEO_ADD_CPATH_TO_PRODUCT_URLS'])){
-// $container[$p2[0]] = $p2[1];
-// }
+
+
+// switch(true){
+// default:
+// case ( !$this->is_attribute_string($p2[1]) && in_array($page,array(FILENAME_PRODUCT_INFO, FILENAME_DEFAULT) ) ):
+// $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "p", $p2[1], $connection, $separator);
// break;
// default:
// $container[$p2[0]] = $p2[1];
// break;
- }
- break;
- case 'manufacturers_id':
- switch(true){
- case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) ):
- $url = $this->make_url($page, $this->get_manufacturer_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "m", $p2[1], $connection, $separator);
- break;
- case ($page == FILENAME_PRODUCT_INFO):
- break;
- default:
- $container[$p2[0]] = $p2[1];
- break;
- }
- break;
- case 'pID':
- switch(true){
- case ($page == FILENAME_POPUP_IMAGE):
- $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "pID", $p2[1], $connection, $separator);
- break;
- default:
- $container[$p2[0]] = $p2[1];
- break;
- }
- break;
- case 'lID':
- switch(true){
- default:
- $url = $this->make_url($page, $this->get_links_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "lID", $p2[1], $connection, $separator);
- break;
- }
- break;
- case 'content':
- switch(true){
- case ($page == FILENAME_CONTENT):
- $url = $this->make_url($page, $this->get_topic_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "t", $p2[1], $connection, $separator);
- break;
- default:
- $container[$p2[0]] = $p2[1];
- break;
- }
- break;
- case 'divers':
- switch(true){
- default:
- $url = $this->make_url($page, $this->get_divers_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "d", $p2[1], $connection, $separator);
- break;
- }
- break;
- case 'customers_id':
- switch(true){
- default:
- $url = $this->make_url($page, $this->get_divers_name($p2[1]), $p2[0], $p2[1], $separator);
- $this->ValidateName($url, "u", $p2[1], $connection, $separator);
- break;
- }
- break;
+// }
+// break;
+// case 'cPath':
+// switch(true){
+// case ($page == FILENAME_DEFAULT):
+// default:
+// $url = $this->make_url($page, $this->get_category_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "c", $p2[1], $connection, $separator);
+// break;
+// }
+// break;
+// case 'manufacturers_id':
+//
+//
+// switch(true){
+// case (/*$page == FILENAME_DEFAULT &&*/ !$this->is_cPath_string($params) && !$this->is_product_string($params) ):
+// $url = $this->make_url($page, $this->get_manufacturer_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "m", $p2[1], $connection, $separator);
+//
+//
+// break;
+// case ($page == FILENAME_PRODUCT_INFO):
+// break;
+// default:
+// $container[$p2[0]] = $p2[1];
+// break;
+// }
+// break;
+// case 'pID':
+// switch(true){
+// case ($page == FILENAME_POPUP_IMAGE):
+// $url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "pID", $p2[1], $connection, $separator);
+// break;
+// default:
+// $container[$p2[0]] = $p2[1];
+// break;
+// }
+// break;
+// case 'lID':
+// switch(true){
+// default:
+// $url = $this->make_url($page, $this->get_links_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "lID", $p2[1], $connection, $separator);
+// break;
+// }
+// break;
+// case 'content':
+// switch(true){
+// case ($page == FILENAME_CONTENT):
+// $url = $this->make_url($page, $this->get_topic_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "t", $p2[1], $connection, $separator);
+// break;
+// default:
+// $container[$p2[0]] = $p2[1];
+// break;
+// }
+// break;
+// case 'divers':
+// switch(true){
+// case ($page == '' || $page ==FILENAME_DEFAULT):
+// $id=AbstractHeader_tags::get_prio_cms('home');
+// //! home by cms
+// if(is_int($id)) {
+// $url = $this->make_url($page, $this->get_topic_name($id), "content", $id, $separator);
+// $this->ValidateName($url, "t", $id, $connection, $separator);
+// }
+// //! home by page content
+// else {
+// $url = $this->make_url('home', $this->get_divers_name('home'), 'divers', 'home', $separator);
+// $this->ValidateName($url, "d", 'home', $connection, $separator);
+// }
+// var_dump($url);
+// break;
+// default:
+// $url = $this->make_url($page, $this->get_divers_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "d", $p2[1], $connection, $separator);
+// break;
+// }
+// break;
+// case 'customers_id':
+// switch(true){
+// default:
+// $url = $this->make_url($page, $this->get_divers_name($p2[1]), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "u", $p2[1], $connection, $separator);
+// break;
+// }
+// break;
+//
+//
+// case 'type_object':
+// switch(true){
+//
+// /**
+// Listing fabricant
+// */
+// case 'manufacturers':
+// default:
+//
+//
+// $url = $this->make_url($page, $this->get_divers_name(substr($page,0,-4)), $p2[0], $p2[1], $separator);
+// $this->ValidateName($url, "d", $p2[1], $connection, $separator);
+// break;
+// }
+// break;
+//
+//
+//
+//
+
+// case (in_array($key, array('categories_id'))):
+// $this->do_redirect();
+// break
+
default:
- $container[$p2[0]] = @$p2[1];
+// $key => $value
+ $container[$key] = @$value;
+// var_dump($page,$key);
switch(true){
case ($page == '' || $page ==FILENAME_DEFAULT):
$id=AbstractHeader_tags::get_prio_cms('home');
@@ -577,18 +630,22 @@
}
break;
default:
- if(is_array($p2)) $container[$p2[0]] = @$p2[1];
+ if(is_array($p2)) $container[$key] = $value;
break;
}
}
+// if($url !='') continue;
}
+
$url = isset($url) ? $url : $page;
+
if ( sizeof($container) > 0 ){
if ( $imploded_params = $this->implode_assoc($container) ){
$url .= $separator . $this->output_string( $imploded_params );
$separator = '&';
}
}
+
return $url;
}
@@ -604,14 +661,20 @@
@return string
*/
private function make_url($page, $string, $anchor_type, $id, &$separator){
- switch ( self::$SEO_REWRITE_TYPE ){
- case 'Rewrite':
- return $string . $this->reg_anchors['Rewrite'][$anchor_type] . $id .self::$extention;
- break;
- case 'Rewrite-mode2':
- return $this->reg_anchors['Rewrite-mode2'][$anchor_type] . $id .'/'.$string. self::$extention;
- break;
- }
+
+ if(self::$SEO_REWRITE_TYPE =='no-rewrite')
+ $key = $anchor_type;
+ else
+ $key = $this->reg_anchors[$anchor_type];
+
+ return sprintf(
+ $this->reg_mask[self::$SEO_REWRITE_TYPE],
+ $key,
+ $id,
+ $string,
+ self::$extention
+ );
+
}
@@ -660,23 +723,29 @@
* @param $pID integer
* @return string Stripped anchor text
*/
- private function get_divers_name($pID){
+ private function GetName_d($pID){
+// private function get_divers_name($pID){
+
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['DIVERS'][$pID])):
$this->performance['CACHE_QUERY_SAVINGS']++;
$result = $this->get_cache_id($pID,'','DIVERS');
+// var_dump(self::$htexe,$result);
$return = (isset($result['tName'])? $this->strip($result['tName']): $this->strip($pID));
- $this->transph_header_tag($result);
+ if(self::$htexe)
+ $this->transph_header_tag($result);
break;
default:
$this->performance['NUMBER_QUERIES']++;
- $sql = "select head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='page' and ft.page_id = '" . $pID. "' and ftd.language_id = '" . (int)$this->languages_id. "' Limit 1";
+ $sql = "select head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='page' and ft.page_id = '" . basename($pID). "' and ftd.language_id = '" . (int)$this->languages_id. "' Limit 1";
$query=$this->DB->query( $sql );
if ($query->__get('numRows')>0) $result =$query->fetchAssoc();
else $result['tName'] = $this->strip($pID);
$this->get_cache_id($pID,'','DIVERS');
$this->performance['QUERIES']['DIVERS'][] = $sql;
- $this->transph_header_tag($result);
+
+ if(self::$htexe)
+ $this->transph_header_tag($result);
$return = $result['tName'];
break;
}
@@ -701,13 +770,14 @@
* @param $pID integer
* @return string Stripped anchor text
*/
- private function get_links_name($pID){
+ private function GetName_l($pID){
+// private function get_links_name($pID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['LINKS'][$pID]) ):
$this->performance['CACHE_QUERY_SAVINGS']++;
$result = $this->get_cache_id($pID,'','LINKS');
$return = (isset($result['tName'])? $this->strip($result['tName']): $this->strip($pID));
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
break;
default:
$this->performance['NUMBER_QUERIES']++;
@@ -716,7 +786,7 @@
else $result['tName'] = $this->strip($pID);
$this->get_cache_id($pID,'','LINKS');
$this->performance['QUERIES']['LINKS'][] = $query;
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
$return = $result['tName'];
break;
}
@@ -736,19 +806,28 @@
}
/**
+ * \brief Alias GetName_p();
+ */
+ private function GetName_pi($pID){
+ return $this->GetName_p($pID);
+ }
+
+
+ /**
* \brief Function to get the product name. Use evaluated cache, per page cache, or database query in that order of precedent
* @author Bobby Easland
* @version 1.1
* @param $pID integer
* @return string Stripped anchor text
*/
- private function get_product_name($pID){
+ private function GetName_p($pID){
+// private function get_product_name($pID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['PRODUCTS'][$pID]) ):
$this->performance['CACHE_QUERY_SAVINGS']++;
$result = $this->get_cache_id($pID,'','PRODUCTS');
$return = (isset($result['tName'])? $this->strip($result['tName']): '');
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
break;
default:
$this->performance['NUMBER_QUERIES']++;
@@ -771,7 +850,7 @@
// $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
$this->get_cache_id($pID,$result,'PRODUCTS');
$this->performance['QUERIES']['PRODUCTS'][] = $rsql;
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
$return = $this->strip( $result['tName'] );
break;
}
@@ -796,7 +875,8 @@
* @param $cID integer NOTE: passed by reference
* @return string Stripped anchor text
*/
- private function get_category_name(&$cID){
+// private function get_category_name(&$cID){
+ private function GetName_c($cID){
$ID=substr(strrchr($cID, '_'),1);
$ID=(is_numeric($ID) ?$ID : $this->get_full_cPath($cID, $single_cID));
switch(true){
@@ -804,7 +884,7 @@
$this->performance['CACHE_QUERY_SAVINGS']++;
$result = $this->get_cache_id($ID,'','CATEGORIES');;
$return = (isset($result['tName'])? $this->strip($result['tName']): '');
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
break;
default:
$this->performance['NUMBER_QUERIES']++;
@@ -830,7 +910,7 @@
}
$cName = $this->strip($cName);
$this->get_cache_id($ID,$result,'CATEGORIES');
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
$return = $cName;
break;
}
@@ -857,13 +937,14 @@
* @param $mID integer
* @return string
*/
- private function get_manufacturer_name($mID){
+// private function get_manufacturer_name($mID){
+ private function GetName_m($mID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['MANUFACTURERS'][$mID])):
$this->performance['CACHE_QUERY_SAVINGS']++;
$result = $this->cache['MANUFACTURERS'][$mID];
$return = (isset($result['tName'])? $result['tName']: '');
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
break;
default:
$this->performance['NUMBER_QUERIES']++;
@@ -872,7 +953,7 @@
$mName = $this->strip( $result['tName'] );
$this->cache['MANUFACTURERS'][$mID] = $result;
$this->performance['QUERIES']['MANUFACTURERS'][] = $rsql;
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
$return = $mName;
break;
}
@@ -887,13 +968,14 @@
* @param $tID integer
* @return string
*/
- private function get_topic_name($tID){
+ private function GetName_t($tID){
+// private function get_topic_name($tID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['TOPICS'][$tID]) ):
$this->performance['CACHE_QUERY_SAVINGS']++;
$result = $this->cache['TOPICS'][$tID];
$return = (isset($result['tName'])? $this->strip($result['tName']): '');
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
break;
default:
$this->performance['NUMBER_QUERIES']++;
@@ -904,7 +986,7 @@
$tName = $this->strip( $result['tName'] );
$this->cache['ARTICLES'][$tID] = $result;
$this->performance['QUERIES']['TOPICS'][] = $sql;
- $this->transph_header_tag($result);
+ if(self::$htexe) $this->transph_header_tag($result);
$return = $tName;
break;
}
@@ -1398,6 +1480,7 @@
@author Bobby Easland
*/
private function check_redirect(){
+
$this->need_redirect = false;
$this->path_info = is_numeric(strpos(ltrim(getenv('PATH_INFO'), '/') , '/')) ? ltrim(getenv('PATH_INFO'), '/') : NULL;
$this->uri = ltrim( basename($_SERVER['REQUEST_URI']), '/' );
@@ -1437,6 +1520,7 @@
@author Bobby Easland
*/
private function check_seo_page(){
+
switch (true){
case (isset($this->uri_parsed['path']) && in_array($this->uri_parsed['path'], $this->attributes['SEO_PAGES'])): $this->is_seopage = true; break;
default: $this->is_seopage = false; break;
@@ -1469,6 +1553,8 @@
@author Bobby Easland
*/
private function do_redirect(){
+var_dump(__FUNCTION__);
+
$rs=str_replace('&','&',$this->uri_parsed['query']);
$p = @explode('&', $rs);
foreach( $p as $index => $value ){
@@ -1511,5 +1597,39 @@
break;
}
}
+
+
+ /**
+ * \brief Function to append session ID if needed
+ * @author Bobby Easland
+ * @param $link string
+ * @param $add_session_id boolean
+ * @param $connection string
+ * @param $separator string
+ * @return string
+ */
+ private function add_sid( $link, $add_session_id, $connection, $separator ){
+ global $request_type, $kill_sid;
+ if ( ($add_session_id) && ($this->attributes['SESSION_STARTED']) && !_cst_bool('SESSION_FORCE_COOKIE_USE') ) {
+ if ($this->not_null($this->attributes['SID'])) $_sid = $this->attributes['SID'];
+ elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
+ if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) $_sid = $this->SessionName() . '=' . $this->SessionID();
+ }
+ else $_sid=tep_session_name().'='.tep_session_id();
+ } else $_sid=tep_session_name().'='.tep_session_id();
+
+ switch(true){
+ case (!isset($_SESSION['customer_id']) && _cst_bool('ENABLE_PAGE_CACHE') && class_exists('page_cache')):
+ $return = $link . $separator . '<osCsid>';
+ break;
+ case (isset($_sid) && $this->not_null($_sid) && ( !$kill_sid )):
+ $return = $link . $separator . tep_output_string($_sid);
+ break;
+ default:
+ $return = $link;
+ break;
+ }
+ return $return;
+ }
}
?>
\ No newline at end of file
Modified: trunk/catalog/document.php
===================================================================
--- trunk/catalog/document.php 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/document.php 2011-11-08 23:14:54 UTC (rev 3874)
@@ -12,10 +12,39 @@
$page->init(basename(__FILE__),$language);
+// die('toto');
-
switch($_REQUEST['mod']){
+
+ /**
+ @brief Traitement des images
+ Prise en charge des images
+ */
+ case 'images':
+ case 'image':
+ case 'img':
+
+ $width=((isset($_REQUEST['w']) && (int)$_REQUEST['w'] > 0)? (int)$_REQUEST['w'] : '');
+ $height=((isset($_REQUEST['h']) && (int)$_REQUEST['h'] > 0)? (int)$_REQUEST['h'] : '');
+ $img=((isset($_REQUEST['i']) && strlen((string)$_REQUEST['i']) > 0)? tep_sanitize_request($_REQUEST['i']) : '');
+
+
+ $get=image_ratio::get_image(DIR_WS_IMAGES.$img,'',$width,$height);
+
+ if($ext='jpg')$ext='jpeg';
+
+ $img=$get['src'];
+
+ header('Content-type: image/'.$ext);
+
+ readfile(DIR_FS_CATALOG.$img);
+ exit;
+
+
+ break;
+
+
case 'invoice':
case 'packingslip':
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/includes/classes/page.php 2011-11-08 23:14:54 UTC (rev 3874)
@@ -397,12 +397,44 @@
}
}
+
/**
+ * \fn CurrentPageInit()
+ */
+ protected function CurrentPageInit($path=''){
+ global $languages_id;
+
+ $here = (!empty($path)? $path : substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ) ) ;
+
+ /**
+ Gestion des tag, title et key
+ */
+ if (_cst_bool('SEO_ENABLED')){
+ $seo_urls=seo_url::getInstance($languages_id);
+ $seo_urls->header_tags($here, $_SERVER['QUERY_STRING']);
+ $the_title= $seo_urls->header_tag['title'];
+ $the_desc= $seo_urls->header_tag['desc'];
+ $the_key_words= $seo_urls->header_tag['keywords'];
+
+ }else {
+ $the_desc= HEAD_DESC_TAG_ALL;
+ $the_key_words= HEAD_KEY_TAG_ALL;
+ $the_title='';
+ }
+ $this->page['the_title']=(tep_not_null($the_title)? $the_title : (tep_not_null($this->title)? $this->title: STORE_NAME));
+ }
+
+
+
+
+ /**
* \fn pre_init()
* \brief
* \note fonction qui doit être appelé dans le application_top
*/
public function pre_init(){
+ $this->CurrentPageInit();
+
$this->breadcrumb->add(HEADER_TITLE_TOP, tep_get_httpdir() );
$this->breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));
@@ -426,6 +458,8 @@
$this->type_content();
$page=$this;
+ $this->CurrentPageInit($p_content);
+
/* Init class gestion js */
$this->new_class('javascript');
@@ -440,6 +474,9 @@
$aca=$this->new_class('generic');
$aca=generic::getInstance();
$res=$aca->check_action('',@$_GET['action']);
+
+
+
}
@@ -521,6 +558,7 @@
public function force_content($p_content){
$this->page['content']=trim($p_content);
$this->type_content();
+ $this->CurrentPageInit($p_content);
}
/**
@@ -907,25 +945,6 @@
}
}
- /**
- Gestion des tag, title et key
- */
- if (_cst_bool('SEO_ENABLED')){
- $seo_urls=seo_url::getInstance($languages_id);
- $seo_urls->header_tags(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), $_SERVER['QUERY_STRING']);
- $the_title= $seo_urls->header_tag['title'];
- $the_desc= $seo_urls->header_tag['desc'];
- $the_key_words= $seo_urls->header_tag['keywords'];
- }else {
- $the_desc= HEAD_DESC_TAG_ALL;
- $the_key_words= HEAD_KEY_TAG_ALL;
- $the_title='';
- }
- $this->page['the_title']=(tep_not_null($the_title)? $the_title : (tep_not_null($this->title)? $this->title: STORE_NAME));
-
-
-
-
$file=call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetHeader'),$bar);
if(self::TestFile($file)) include($file);
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/includes/functions/general.php 2011-11-08 23:14:54 UTC (rev 3874)
@@ -82,6 +82,15 @@
}
/**
+ *\fn tep_sanitize_request($string)
+ *\brief suppression et nettoyage request value (sécu)
+ \param string la chaîne à nettoyer
+*/
+function tep_sanitize_request($string) {
+ return preg_replace("#(\./|\.\./|<|>|(\<|%3C).*script.*(\>|%3E))*#i",'',$string);
+}
+
+/**
*\fn tep_random_select($query)
*\brief Return a random row from a database query
\return one result
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/index.php 2011-11-08 23:14:54 UTC (rev 3874)
@@ -66,7 +66,7 @@
}
elseif ($category_depth == 'top') {
-
+// var_dump($page_content);
/**
* \section Page Customer public
*/
@@ -94,7 +94,7 @@
Or form
OR module aca action and exec
*/
- elseif(isset($_GET['_ID']) || isset($_GET['content']) || isset($_GET['aca_mod']) ){
+ elseif( (isset($_GET['_ID']) && $_GET['_ID'] !='home.php') || isset($_GET['content']) || isset($_GET['aca_mod']) ){
$p=(string)tep_db_prepare_input(basename($_GET['_ID']));
@@ -144,7 +144,7 @@
else {
$page->init('home.php',$language);
- $page_content = $page->force_content('home.php');
+ $page->force_content('home.php');
}
unset($category_cfils,$category_pfils,$category_parent);
@@ -278,7 +278,7 @@
$manuf= $man->fetchAssoc();
tep_db_free_result($man);
$image = $manuf['manufacturers_image'];
- $page->breadcrumb->add($manuf['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' .(int) $_GET['manufacturers_id']));
+ $page->breadcrumb->add($manuf['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id']));
$page->add_var_page('manufacturers',$manuf);
}
Modified: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2011-11-08 23:14:54 UTC (rev 3874)
@@ -142,14 +142,16 @@
## Mode SEO
# RewriteRule ^([a-zA-Z_]*)\.(php)$ $1d-$1.html?&%{QUERY_STRING} [R=301]
+ ## Move images/ Or images/imagecache/ in document.php?..
+ RewriteRule ^images/imagecache/([0-9]*)x([0-9]*)[_](.*)\.([a-z]{3,4})[_](.*)$ document.php?mod=img&i=$3.$4&w=$1&h=$2 [R=301]
+ RewriteRule ^images/(.*)$ document.php?mod=img&i=$1&%{QUERY_STRING} [R=301]
-
# SEO
# MODE SEO Rewrite-mode2 (Default)
+ ## POPUP page image produit
RewriteRule ^pi/(.*)/(.*).html$ popup_image.php?pID=$1&%{QUERY_STRING} [L]
-
## Product page
RewriteRule ^p/([0-9]*)/(.*).html$ index.php?products_id=$1&%{QUERY_STRING} [L]
## Categroy page
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-08 16:39:34 UTC (rev 3873)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-08 23:14:54 UTC (rev 3874)
@@ -226,7 +226,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 ( 'USE_SEO_CACHE_CATEGORIES_S', 'USE_SEO_CACHE_CATEGORIES', 'true', 'USE_SEO_CACHE_CATEGORIES_L', 16, 7, NOW(), NOW(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),', 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 ( 'USE_SEO_CACHE_TOPICS_S', 'USE_SEO_CACHE_TOPICS', 'true', 'USE_SEO_CACHE_TOPICS_L', 16, 8, NOW(), NOW(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),', 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 ( 'USE_SEO_CACHE_LINKS_S', 'USE_SEO_CACHE_LINKS', 'true', 'USE_SEO_CACHE_LINKS_L', 16, 9, NOW(), NOW(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),', 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 ( 'SEO_REWRITE_TYPE_S', 'SEO_REWRITE_TYPE', 'Rewrite', 'SEO_REWRITE_TYPE_L', 16, 10, NOW(), NOW(), NULL, 'tep_cfg_select_option_bis(array(''no-rewrite''=>''Pas de rewriting, le htaccess n est pas necessaire'',''Rewrite''=>'' URL: titre-p-12.html'',''Rewrite-mode2''=>'' URL: p/12/titre.html''),', 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 ( 'SEO_REWRITE_TYPE_S', 'SEO_REWRITE_TYPE', 'Rewrite-mode2', 'SEO_REWRITE_TYPE_L', 16, 10, NOW(), NOW(), NULL, 'tep_cfg_select_option_bis(array(''no-rewrite''=>''Pas de rewriting, le htaccess n est pas necessaire'',''Rewrite''=>'' URL: titre-p-12.html'',''Rewrite-mode2''=>'' URL: p/12/titre.html''),', 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 ( 'SEO_CHAR_CONVERT_SET_S', 'SEO_CHAR_CONVERT_SET', 'é=>e,è=>e,à=>a,ù=>u,ë=>e,ï=>i,ê=>e,ô=>o,ö=>o,û=>u,â=>a,ñ=>n,ä=>ae,Ä=>Ae,ü=>ue,Ü=>Ue,ö=>oe,Ö=>Oe,ß=>ss', 'SEO_CHAR_CONVERT_SET_L', 16, 11, 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 ( 'SEO_REMOVE_ALL_SPEC_CHARS_S', 'SEO_REMOVE_ALL_SPEC_CHARS', 'true', 'SEO_REMOVE_ALL_SPEC_CHARS_L', 16, 12, '2010-06-14 14:15:38', '2010-06-14 14:15:38', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),', 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 ( 'SEO_URLS_CACHE_RESET_S', 'SEO_URLS_CACHE_RESET', 'false', 'SEO_URLS_CACHE_RESET_L', 16, 13, NOW(), NOW(), 'tep_reset_cache_data_seo_urls', 'tep_cfg_select_option(array(\'reset\', \'false\'),', 2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-08 16:39:40
|
Revision: 3873
http://oscss.svn.sourceforge.net/oscss/?rev=3873&view=rev
Author: oscim
Date: 2011-11-08 16:39:34 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/catalog/index.php
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-11-08 16:33:35 UTC (rev 3872)
+++ trunk/catalog/index.php 2011-11-08 16:39:34 UTC (rev 3873)
@@ -130,7 +130,7 @@
$action=(string)tep_db_prepare_input($_GET['action']);
if ($aca_module[$module]->check_action($action) ) {
/** Exe == true */
- $aca_module[$module]->after_check_action($action));
+ $aca_module[$module]->after_check_action($action);
// tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))));
}
}
@@ -278,7 +278,7 @@
$manuf= $man->fetchAssoc();
tep_db_free_result($man);
$image = $manuf['manufacturers_image'];
- $page->breadcrumb->add($manuf['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id']));
+ $page->breadcrumb->add($manuf['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' .(int) $_GET['manufacturers_id']));
$page->add_var_page('manufacturers',$manuf);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-08 16:33:41
|
Revision: 3872
http://oscss.svn.sourceforge.net/oscss/?rev=3872&view=rev
Author: oscim
Date: 2011-11-08 16:33:35 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
correction securit?\195?\169 faille http://dev.oscss.org/task/892
Modified Paths:
--------------
branches/2.1.0/catalog/content.php
trunk/catalog/index.php
Modified: branches/2.1.0/catalog/content.php
===================================================================
--- branches/2.1.0/catalog/content.php 2011-11-08 15:38:37 UTC (rev 3871)
+++ branches/2.1.0/catalog/content.php 2011-11-08 16:33:35 UTC (rev 3872)
@@ -7,10 +7,10 @@
*\date 31/10/10, 22:59
*\author oscim <mail aur...@os...> <www http://www.oscim.fr>
*\encode UTF-8
- *\file
+ *\file
*\brief
Page de gestion des contenus . prend en charge les elements modulaires
- *\details
+ *\details
Si un _ID est pésent, charge alors les block de cet id, et force le contenu de la page vers cet _ID.
cherche une class, nommé page._ID.php
@@ -33,6 +33,7 @@
require('includes/application_top.php');
$p=(isset($_ID)) ? $_ID : (isset($_GET['_ID']) ? $_GET['_ID'] : basename(__FILE__));
+ $p=(string)tep_db_prepare_input(basename($p));
switch ($p){
case 'template.php':
require('templates/'.$template.'/includes/languages/' . $language . '/'.FILENAME_TEMPLATE);
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-11-08 15:38:37 UTC (rev 3871)
+++ trunk/catalog/index.php 2011-11-08 16:33:35 UTC (rev 3872)
@@ -97,11 +97,10 @@
elseif(isset($_GET['_ID']) || isset($_GET['content']) || isset($_GET['aca_mod']) ){
- $p=(string)tep_db_prepare_input($_GET['_ID']);
+ $p=(string)tep_db_prepare_input(basename($_GET['_ID']));
$page->init($p,$language);
-
switch ($p){
case 'form.php':
case 'contact.php':
@@ -112,7 +111,7 @@
break;
default:
if (isset($_GET['content']) && !is_numeric($_GET['content'])){
- $pp=$_GET['content'];
+ $pp=(int)tep_db_prepare_input($_GET['content']);
$page->new_class($pp);
$page->force_content('page'.$page->ext);
$page->force_gabarit('content');
@@ -120,19 +119,20 @@
}
/** Module aca */
elseif (isset($_GET['aca_mod']) && !is_numeric($_GET['aca_mod']) && isset($_GET['aca_type']) && isset($_GET['aca_action'])){
- $module=$_GET['aca_mod'];
- $type=$_GET['aca_type'];
+ $module=(string)tep_db_prepare_input($_GET['aca_mod']);
+ $type=(string)tep_db_prepare_input($_GET['aca_type']);
$aca=$page->new_class($type);
$aca_module=$page->_call($type,'ret_modules');
/* cf content/page.php */
$page->force_content('page'.$page->ext);
if (isset($_GET['action']) ) {
- if ($aca_module[$module]->check_action($_GET['action']) ) {
- /** Exe == true */
- $aca_module[$module]->after_check_action($_GET['action']);
- // tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))));
- }
+ $action=(string)tep_db_prepare_input($_GET['action']);
+ if ($aca_module[$module]->check_action($action) ) {
+ /** Exe == true */
+ $aca_module[$module]->after_check_action($action));
+// tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))));
+ }
}
}
@@ -203,8 +203,9 @@
$aca_product=$page->new_class('product',true);
if (isset($_GET['action'])) {
- if ($aca_product->check_action('',$_GET['action']) ) {
- $aca_product->after_check_action('',$_GET['action']);
+ $action=(string)tep_db_prepare_input($_GET['action']);
+ if ($aca_product->check_action('',$action) ) {
+ $aca_product->after_check_action('',$action);
tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))));
}
}
@@ -215,7 +216,7 @@
$page->add_var_page('product_info',$product_info);
$page->title=$product_info['title'];
- $breadcrumb->add($product_info['title'], tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id'].'&cPath=' . $cPath . ''));
+ $breadcrumb->add($product_info['title'], tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id'].'&cPath=' . $cPath . ''));
/**
Incremente nbr de vus du produits
@@ -228,12 +229,12 @@
if($page->_conf_value('OSCSS__B_RECENTLY_VIEWED')) {
if (!tep_session_is_registered('recently_viewed')){
tep_session_register('recently_viewed');
- $recently_viewed = $_GET['products_id'] . ';';
+ $recently_viewed = (int)$_GET['products_id'] . ';';
}
- $check_not_duplicate = $_GET['products_id'];
+ $check_not_duplicate = (int)$_GET['products_id'];
$temp_recent = $recently_viewed;
if (preg_match('/'.$check_not_duplicate.'/', $temp_recent ) ) $recently_viewed = preg_replace('/'.$check_not_duplicate.'/',"",$temp_recent);
- $recently_viewed = $_GET['products_id'] . ';' . $recently_viewed ;
+ $recently_viewed = (int)$_GET['products_id'] . ';' . $recently_viewed ;
}
$page->product->pile_img[]=$product_info['products_image'];
$page_content = $page->force_content(FILENAME_PRODUCT_INFO);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-08 15:38:48
|
Revision: 3871
http://oscss.svn.sourceforge.net/oscss/?rev=3871&view=rev
Author: oscim
Date: 2011-11-08 15:38:37 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
correction nommage module coquille.
Mise a niveau gestion rewrite, mode2 par default
Refonte du fichier htaccess , amelioration et suppression duplicata content entre index.php / home et racine
Ajout choix fonctionnement et commentaire dans le htaccess
ajout regle protection
Modified Paths:
--------------
trunk/catalog/index.php
trunk/catalog/install/includes/modele/htaccess.txt
trunk/catalog/install/includes/modele/robot.txt
Added Paths:
-----------
trunk/catalog/includes/gabarit/history.display_view.gab
trunk/catalog/includes/languages/fr_FR/modules/account/history.txt
trunk/catalog/includes/modules/account/history.php
Removed Paths:
-------------
trunk/catalog/includes/gabarit/orders_history.display_view.gab
trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt
trunk/catalog/includes/modules/account/orders_history.php
Copied: trunk/catalog/includes/gabarit/history.display_view.gab (from rev 3863, trunk/catalog/includes/gabarit/orders_history.display_view.gab)
===================================================================
--- trunk/catalog/includes/gabarit/history.display_view.gab (rev 0)
+++ trunk/catalog/includes/gabarit/history.display_view.gab 2011-11-08 15:38:37 UTC (rev 3871)
@@ -0,0 +1,68 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 21:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief This listing orders for module account/history
+*/
+global $language,$customer_id;
+?>
+<div class="main-history">
+
+ <?php if (count(history::$current) > 0): ?>
+
+ <?php foreach(history::$current as $row): ?>
+ <dl class="orderHistory">
+ <dt>
+ <?php echo __('history text order number') . $row->orders_prefix.$row->orders_id; ?>
+
+ </dt>
+ <dd>
+ <?php echo __('history text order status') . $row->orders_status_name; ?>
+ </dd>
+ <dd>
+ <?php echo __('history text order date') . $row->date_purchased ;?>
+ </dd>
+ <dd>
+ <?php echo $order_type . tep_output_string_protected($order_name); ?>
+ </dd>
+ <dd>
+ <?php echo __('history text order products') . $row->count_products ;?>
+ </dd>
+ <dd>
+ <?php echo __('history text order cost') . strip_tags($row->order_total); ?>
+ </dd>
+ <dd>
+ <span class="linkView">
+ <a class="navBtMini" href="<?php echo $row->linkView ?>" >
+ <?php echo __('history small image button view'); ?>
+ </a>
+ </span>
+ <span class="linkPdf">
+ <a class="linkPdf" href="<?php echo $row->linkPdf ?>">
+ <?php echo __('history pdf link') ?>
+ </a>
+ </span>
+ </dd>
+ </dl>
+ <?php endforeach; ?>
+
+ <div id="splitPageBottom" class="split">
+ <p class="sP1"><?php echo history::$history_split->display_count(__('history text display number of orders %s')); ?></p>
+ <p class="sP2"><?php echo __('history text result page') . ' ' . history::$history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
+ </div>
+
+ <?php else : ?>
+ <p class="infoText"><?php echo TEXT_NO_PURCHASES; ?></p>
+ <?php endif; ?>
+
+
+ <div class="navBt">
+ <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ </div>
+
+</div>
\ No newline at end of file
Deleted: trunk/catalog/includes/gabarit/orders_history.display_view.gab
===================================================================
--- trunk/catalog/includes/gabarit/orders_history.display_view.gab 2011-11-08 09:58:15 UTC (rev 3870)
+++ trunk/catalog/includes/gabarit/orders_history.display_view.gab 2011-11-08 15:38:37 UTC (rev 3871)
@@ -1,68 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 01/11/11, 21:42
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- @brief This listing orders for module account/orders_history
-*/
-global $language,$customer_id;
-?>
-<div class="main-orders_history">
-
- <?php if (count(orders_history::$current) > 0): ?>
-
- <?php foreach(orders_history::$current as $row): ?>
- <dl class="orderHistory">
- <dt>
- <?php echo __('orders_history text order number') . $row->orders_prefix.$row->orders_id; ?>
-
- </dt>
- <dd>
- <?php echo __('orders_history text order status') . $row->orders_status_name; ?>
- </dd>
- <dd>
- <?php echo __('orders_history text order date') . $row->date_purchased ;?>
- </dd>
- <dd>
- <?php echo $order_type . tep_output_string_protected($order_name); ?>
- </dd>
- <dd>
- <?php echo __('orders_history text order products') . $row->count_products ;?>
- </dd>
- <dd>
- <?php echo __('orders_history text order cost') . strip_tags($row->order_total); ?>
- </dd>
- <dd>
- <span class="linkView">
- <a class="navBtMini" href="<?php echo $row->linkView ?>" >
- <?php echo __('orders_history small image button view'); ?>
- </a>
- </span>
- <span class="linkPdf">
- <a class="linkPdf" href="<?php echo $row->linkPdf ?>">
- <?php echo __('orders_history pdf link') ?>
- </a>
- </span>
- </dd>
- </dl>
- <?php endforeach; ?>
-
- <div id="splitPageBottom" class="split">
- <p class="sP1"><?php echo orders_history::$history_split->display_count(__('orders_history text display number of orders %s')); ?></p>
- <p class="sP2"><?php echo __('orders_history text result page') . ' ' . orders_history::$history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
- </div>
-
- <?php else : ?>
- <p class="infoText"><?php echo TEXT_NO_PURCHASES; ?></p>
- <?php endif; ?>
-
-
- <div class="navBt">
- <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
- </div>
-
-</div>
\ No newline at end of file
Copied: trunk/catalog/includes/languages/fr_FR/modules/account/history.txt (from rev 3863, trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt)
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/account/history.txt (rev 0)
+++ trunk/catalog/includes/languages/fr_FR/modules/account/history.txt 2011-11-08 15:38:37 UTC (rev 3871)
@@ -0,0 +1,29 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 21:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$lang['history tab']="Voir mes anciennes commandes" ;
+
+$lang['history heading listing']="Historique des Commandes" ;
+$lang['history text order number']="Numéro de commande : " ;
+$lang['history text order status']="Statut de la commande : " ;
+$lang['history text order date']="Date de la commande : " ;
+$lang['history text order products']="Produit(s) : " ;
+$lang['history text order cost']="Coût de la commande : " ;
+
+
+$lang['history small image button view']="Afficher" ;
+$lang['history pdf link']="Pdf" ;
+
+
+$lang['history text result %s']="result %s" ;
+
+
+?>
\ No newline at end of file
Deleted: trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt 2011-11-08 09:58:15 UTC (rev 3870)
+++ trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt 2011-11-08 15:38:37 UTC (rev 3871)
@@ -1,29 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 01/11/11, 21:42
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-$lang['orders_history tab']="Voir mes anciennes commandes" ;
-
-$lang['orders_history heading listing']="Historique des Commandes" ;
-$lang['orders_history text order number']="Numéro de commande : " ;
-$lang['orders_history text order status']="Statut de la commande : " ;
-$lang['orders_history text order date']="Date de la commande : " ;
-$lang['orders_history text order products']="Produit(s) : " ;
-$lang['orders_history text order cost']="Coût de la commande : " ;
-
-
-$lang['orders_history small image button view']="Afficher" ;
-$lang['orders_history pdf link']="Pdf" ;
-
-
-$lang['orders_history text result %s']="result %s" ;
-
-
-?>
\ No newline at end of file
Copied: trunk/catalog/includes/modules/account/history.php (from rev 3863, trunk/catalog/includes/modules/account/orders_history.php)
===================================================================
--- trunk/catalog/includes/modules/account/history.php (rev 0)
+++ trunk/catalog/includes/modules/account/history.php 2011-11-08 15:38:37 UTC (rev 3871)
@@ -0,0 +1,171 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 21:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ *\class history
+ *\group modules
+ *\brief Address book for customers
+*/
+
+class history
+ extends AbstractAccount
+ implements InterfaceModule{
+
+ /**
+ @var array
+ */
+ public static $current;
+ /**
+ @var array
+ */
+ public static $history_split;
+
+ /**
+ */
+ function __construct(){
+ $this->code =__CLASS__;
+ $this->type ='account';
+ $this->title = __('module history text title');
+ $this->description = __('module history text description') ;
+ $this->sort_order = (defined('MODULE_ACA_HISTORY_SORT_ORDER')) ? MODULE_ACA_HISTORY_SORT_ORDER : 0;
+ $this->enabled = true;
+
+
+ $this->sql_data_array=array();
+ $this->cInfo = new objectInfo(array());
+
+ }
+
+ public function get_header($action=''){}
+
+ /**
+ * \fn check_action($action)
+ * \brief Action exe
+ * @param $action string la var d'action
+ * @p $cID int recupere le Session[]
+ */
+ public function check_action($action) {
+
+ if (!tep_session_is_registered('customer_id')) return false;
+
+ global $page;
+ $customer_id=$page->the_var('customer_id');
+
+
+// switch ($action) {
+// }
+
+ return true;
+ }
+
+ /**
+ */
+ 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'));
+ }
+
+
+
+ /**
+ */
+ public function load_db_values($cID) {
+ global $languages_id;
+
+ $DB=Database::getInstance();
+
+ $sql="SELECT o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC";
+
+ self::$history_split = new splitPageResults($sql, MAX_DISPLAY_ORDER_HISTORY);
+ $_query = $DB->query(self::$history_split->sql_query);
+
+ foreach($_query->fetchAllAssoc() as $row){
+
+ $products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$row['orders_id'] . "'");
+ $products = tep_db_fetch_array($products_query);
+
+ if (tep_not_null($row['delivery_name'])) {
+ $order_type = TEXT_ORDER_SHIPPED_TO;
+ $order_name = $row['delivery_name'];
+ } else {
+ $order_type = TEXT_ORDER_BILLED_TO;
+ $order_name = $row['billing_name'];
+ }
+
+
+ $n = new objectInfo($row);
+ $n->date_purchased = tep_date_short($row['date_purchased']);
+ $n->type = 'order';
+ $n->count_products = $products['count'];
+ $n->destinataire = $order_type.' '.$order_name;
+// $n->linkView = tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_info&oID='. (int)$row['orders_id'], 'SSL');
+ $n->linkView = tep_href_link(FILENAME_ACCOUNT, 'action=history_info&order_id=' . (int)$row['orders_id'], 'SSL');
+ $n->linkPdf = tep_href_link(FILENAME_ACCOUNT, 'action=pdf&order_id=' . (int)$row['orders_id'], 'SSL');
+
+ $result[strtotime($row['date_purchased'])]=$n;
+ }
+
+
+ krsort($result);
+
+ return ($result);
+ }
+
+
+
+
+ /**
+ List des element du block my account
+ */
+ public function display_view_min_listMyOrders($cID){
+ global $page;
+
+ $v['title']=__("history tab");
+ $v['href_link']= tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL');
+ return array(new objectInfo($v));
+ }
+
+ /**
+ * \fn display_view($pID='')
+ * \brief Affiche Block edit/modif reviews
+ * @param $pID int id products
+ * @p $customer_id int current
+ */
+ public function display_view($pID=''){
+ global $page;
+
+ $customer_id=$page->the_var('customer_id');
+
+ self::$current = $this->load_db_values($customer_id);
+
+ return new objectInfo(array('title'=>__("history heading listing"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
+ }
+
+
+ /**
+ * \brief select function for display
+ */
+// public function display_info(){
+// global $page;
+//
+// $customer_id=$page->the_var('customer_id');
+//
+// self::$current = $this->load_db_values($customer_id);
+//
+// return new objectInfo(array('title'=>__("history heading listing"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
+// }
+
+
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+
+?>
\ No newline at end of file
Deleted: trunk/catalog/includes/modules/account/orders_history.php
===================================================================
--- trunk/catalog/includes/modules/account/orders_history.php 2011-11-08 09:58:15 UTC (rev 3870)
+++ trunk/catalog/includes/modules/account/orders_history.php 2011-11-08 15:38:37 UTC (rev 3871)
@@ -1,171 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 01/11/11, 21:42
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- *\class orders_history
- *\group modules
- *\brief Address book for customers
-*/
-
-class orders_history
- extends AbstractAccount
- implements InterfaceModule{
-
- /**
- @var array
- */
- public static $current;
- /**
- @var array
- */
- public static $history_split;
-
- /**
- */
- function __construct(){
- $this->code =__CLASS__;
- $this->type ='account';
- $this->title = __('module orders_history text title');
- $this->description = __('module orders_history text description') ;
- $this->sort_order = (defined('MODULE_ACA_HISTORY_SORT_ORDER')) ? MODULE_ACA_HISTORY_SORT_ORDER : 0;
- $this->enabled = true;
-
-
- $this->sql_data_array=array();
- $this->cInfo = new objectInfo(array());
-
- }
-
- public function get_header($action=''){}
-
- /**
- * \fn check_action($action)
- * \brief Action exe
- * @param $action string la var d'action
- * @p $cID int recupere le Session[]
- */
- public function check_action($action) {
-
- if (!tep_session_is_registered('customer_id')) return false;
-
- global $page;
- $customer_id=$page->the_var('customer_id');
-
-
-// switch ($action) {
-// }
-
- return true;
- }
-
- /**
- */
- 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'));
- }
-
-
-
- /**
- */
- public function load_db_values($cID) {
- global $languages_id;
-
- $DB=Database::getInstance();
-
- $sql="SELECT o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC";
-
- self::$history_split = new splitPageResults($sql, MAX_DISPLAY_ORDER_HISTORY);
- $_query = $DB->query(self::$history_split->sql_query);
-
- foreach($_query->fetchAllAssoc() as $row){
-
- $products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$row['orders_id'] . "'");
- $products = tep_db_fetch_array($products_query);
-
- if (tep_not_null($row['delivery_name'])) {
- $order_type = TEXT_ORDER_SHIPPED_TO;
- $order_name = $row['delivery_name'];
- } else {
- $order_type = TEXT_ORDER_BILLED_TO;
- $order_name = $row['billing_name'];
- }
-
-
- $n = new objectInfo($row);
- $n->date_purchased = tep_date_short($row['date_purchased']);
- $n->type = 'order';
- $n->count_products = $products['count'];
- $n->destinataire = $order_type.' '.$order_name;
-// $n->linkView = tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_info&oID='. (int)$row['orders_id'], 'SSL');
- $n->linkView = tep_href_link(FILENAME_ACCOUNT, 'action=history_info&order_id=' . (int)$row['orders_id'], 'SSL');
- $n->linkPdf = tep_href_link(FILENAME_ACCOUNT, 'action=pdf&order_id=' . (int)$row['orders_id'], 'SSL');
-
- $result[strtotime($row['date_purchased'])]=$n;
- }
-
-
- krsort($result);
-
- return ($result);
- }
-
-
-
-
- /**
- List des element du block my account
- */
- public function display_view_min_listMyOrders($cID){
- global $page;
-
- $v['title']=__("orders_history tab");
- $v['href_link']= tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL');
- return array(new objectInfo($v));
- }
-
- /**
- * \fn display_view($pID='')
- * \brief Affiche Block edit/modif reviews
- * @param $pID int id products
- * @p $customer_id int current
- */
- public function display_view($pID=''){
- global $page;
-
- $customer_id=$page->the_var('customer_id');
-
- self::$current = $this->load_db_values($customer_id);
-
- return new objectInfo(array('title'=>__("orders_history heading listing"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
- }
-
-
- /**
- * \brief select function for display
- */
-// public function display_info(){
-// global $page;
-//
-// $customer_id=$page->the_var('customer_id');
-//
-// self::$current = $this->load_db_values($customer_id);
-//
-// return new objectInfo(array('title'=>__("orders_history heading listing"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
-// }
-
-
-
-/** implements InterfaceModule depend */
- public function check() {}
- public function install() {}
- public function remove() {}
- public function keys() {}
-}
-
-?>
\ No newline at end of file
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-11-08 09:58:15 UTC (rev 3870)
+++ trunk/catalog/index.php 2011-11-08 15:38:37 UTC (rev 3871)
@@ -17,6 +17,7 @@
*
* Pour Ajouter un fichier à la racine simplement, utiliser la base example
*/
+
require_once('includes/application_top.php');
//! Choix du mode affichage des listign et priorité
@@ -38,10 +39,34 @@
$page->add_var_page('category_depth',$category_depth);
-// var_dump($cPath);
-if ($category_depth == 'top') {
+/**
+ * \section Page Error
+ */
+if(isset($_GET['ServerError'])){
+ switch((int)$_GET['ServerError']){
+ case 404:
+ $page->init('404.php',$language);
+ $page_content = $page->force_content('404.php');
+ break;
+ default:
+ /**
+ @remarks Alert and log
+ */
+ //! gestionnaire d'erreur
+ $errorHandler = osC_ErrorHandler::start();
+ // fichier de log d'erreur http
+ $errorHandler->attachFileWriter(DIR_FS_ROOT_DOCS.'public/logs/server-http.log');
+ trigger_error(sprintf(__FILE__.'::'.__LINE__.' Error type %s : SERVER: %s', (int)$_GET['ServerError'], print_r($_SERVER, true) ) , E_USER_ERROR);
+
+ header("HTTP/1.0 301 Moved Permanently");
+ tep_redirect(tep_href_link(''));
+ }
+
+}
+elseif ($category_depth == 'top') {
+
/**
* \section Page Customer public
*/
@@ -53,12 +78,14 @@
$page_content = $page->force_content('customers.php');
}
- elseif (isset($_GET['products_id']) ) {
- $page->init('404.php',$language);
- $page_content = $page->force_content('404.php');
-
-
+ /**
+ * \section 404 Error not Cpath and xid !!
+ */
+ elseif (isset($_GET['products_id']) || isset($_GET['content'])) {
+ header("Status: 404 Not Found");
+ header("HTTP/1.0 301 Moved Permanently");
+ tep_redirect(tep_href_link('error/404.html'));
}
@@ -227,9 +254,9 @@
use /content/404.php
*/
elseif ( $category_depth == 'nofound') {
- $page->init('404.php',$language);
-
- $page_content = $page->force_content('404.php');
+ header("Status: 404 Not Found");
+ header("HTTP/1.0 301 Moved Permanently");
+ tep_redirect(tep_href_link('error/404.html'));
}
/**
Modified: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt 2011-11-08 09:58:15 UTC (rev 3870)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2011-11-08 15:38:37 UTC (rev 3871)
@@ -24,7 +24,7 @@
# Fix certain PHP values
-## element pur hebergement mutulalise, a commenter si inutile
+## element pour hebergement mutulalise, a commenter si inutile
SetEnv REGISTER_GLOBALS 0
SetEnv MAGIC_QUOTES 1
SetEnv PHP_VER 5
@@ -32,6 +32,16 @@
# force default charset
AddDefaultCharset UTF-8
+# Turns off directory browsing
+# not absolutely essential, but keeps people from snooping around without
+# needing empty index.html files everywhere
+Options -Indexes
+
+
+# Etre discret ne coûte rien
+ServerSignature Off
+
+
# FIX
<IfModule mod_php5.c>
php_flag register_long_arrays Off
@@ -46,80 +56,133 @@
RewriteEngine on
RewriteBase %WS_DOCUMENT_ROOT%
+
+
+
+
+
+ ## Error Document
+ ## Authorization htaccess & htpassword
+ ErrorDocument 401 %WS_DOCUMENT_ROOT%error/401.html
+ ## no found
+ ErrorDocument 404 %WS_DOCUMENT_ROOT%error/404.html
+ ## error in process payment
+ ErrorDocument 402 %WS_DOCUMENT_ROOT%checkout_confirmation.php
+ ## Bad request
+ ErrorDocument 400 %WS_DOCUMENT_ROOT%error/400.html
+ ## forbidden Intrustion error
+ ErrorDocument 403 %WS_DOCUMENT_ROOT%error/403.html
+ ## méthode non autorisée.
+ ErrorDocument 405 %WS_DOCUMENT_ROOT%error/405.html
+ ## technical error
+ ErrorDocument 500 %WS_DOCUMENT_ROOT%error/500.html
+ ## le serveur ne supporte pas le service demandé.
+ ErrorDocument 501 %WS_DOCUMENT_ROOT%error/501.html
+ ## mauvaise passerelle.
+ ErrorDocument 502 %WS_DOCUMENT_ROOT%error/502.html
+ ## service indisponible.
+ ErrorDocument 503 %WS_DOCUMENT_ROOT%error/503.html
+ ## trop de temps à la réponse.
+ ErrorDocument 504 %WS_DOCUMENT_ROOT%error/504.html
+ ## version HTTP non supportée.
+ ErrorDocument 505 %WS_DOCUMENT_ROOT%error/505.html
+
+
+ # rule for error page
+ RewriteRule ^error/([0-9]*).html$ index.php?ServerError=$1 [L]
+
+
+
+## Protection
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
-# rule for 404 page
- RewriteRule ^404.php$ index.php?_ID=404.php&%{QUERY_STRING}
+# Block loop redirect
+ RewriteCond %{REQUEST_URI} ^/(stats/|missing\.html|failed_auth\.html|error/).* [NC]
+ RewriteRule .* - [L]
+
+ RewriteCond %{ENV:REDIRECT_STATUS} 200
+ RewriteRule .* - [L]
+
+
+
+
##newsletter trace opened email
RewriteRule n-([0-9]+)-([0-9]+).jpg newsletters.php?mode=opened&newsID=$1&cID=$2 [L,QSA]
-# DEB Sans rewrite, placer des fichier du même nom a la racine
-# DEB Retrocompatibiliter
- RewriteRule ^conditions.php$ index.php?content=3&%{QUERY_STRING}
- RewriteRule ^contact.php$ index.php?_ID=contact.php&%{QUERY_STRING}
- RewriteRule ^cookie_usage.php$ index.php?_ID=cookie_usage.php&%{QUERY_STRING}
- RewriteRule ^info_shopping_cart.php$ index.php?_ID=info_shopping_cart.php&%{QUERY_STRING}
- RewriteRule ^tell_a_friend.php$ index.php?_ID=tell_a_friend.php&%{QUERY_STRING}
- RewriteRule ^featured_products.php$ index.php?_ID=featured_products.php&%{QUERY_STRING}
- RewriteRule ^template.php$ index.php?_ID=template.php&%{QUERY_STRING}
- RewriteRule ^privacy.php$ index.php?_ID=privacy.php&%{QUERY_STRING}
- RewriteRule ^listing_best_sellers.php$ index.php?_ID=listing_best_sellers.php&%{QUERY_STRING}
- RewriteRule ^listing_products_new.php$ index.php?_ID=listing_products_new.php&%{QUERY_STRING}
- RewriteRule ^listing_small_price.php$ index.php?_ID=listing_small_price.php&%{QUERY_STRING}
- RewriteRule ^listing_specials.php$ index.php?_ID=listing_specials.php&%{QUERY_STRING}
- RewriteRule ^search_help.php$ index.php?_ID=search_help.php&%{QUERY_STRING}
- RewriteRule ^ssl_check.php$ index.php?_ID=ssl_check.php&%{QUERY_STRING}
- RewriteRule ^shopping_cart.php(.{0,})$ index.php?_ID=shopping_cart.php&%{QUERY_STRING}
- RewriteRule ^shipping.php(.{0,})$ index.php?_ID=shipping.php&%{QUERY_STRING}
- RewriteRule ^sitemap.php$ index.php?_ID=sitemap.php&%{QUERY_STRING}
- RewriteRule ^remove_cart.php$ index.php?_ID=remove_cart.php&%{QUERY_STRING}
- RewriteRule ^product_reviews.php$ index.php?_ID=listing_reviews.php&%{QUERY_STRING}
- RewriteRule ^product_info.php$ index.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^home.php?(.*)$ index.php?content=$1&%{QUERY_STRING}
- RewriteRule ^account_([a-z_]*).php$ account.php?action=$1&%{QUERY_STRING}
- RewriteRule ^address_([a-z_]*).php$ account.php?aca_mod=address_book&aca_type=account&aca_action=display_view&%{QUERY_STRING}
-# FIN Sans rewrite, placer des fichier du même nom a la racine
-# Prise en charge des appels vers les vidéo
-# RewriteRule ^playlist:([0-9]*)::type:([a-z]*)::pID:([0-9]*)::ext:.flv$ counter.php?action_type=$2&action_class=portfolio&method=counter_media&ppID=$1&products_id=$3 [L]
-# RewriteRule ^playlist:([0-9]*)::type:([a-z]*)::pID:([0-9]*)::ext:.mp3 counter.php?action_type=$2&action_class=portfolio&method=counter_media&ppID=$1&products_id=$3 [L]
+
+ ## Home Et index Ou Home = index
+ ## Force Unique Home page
+ RewriteRule ^(home.php)(.*)$ %WS_DOCUMENT_ROOT%?%{QUERY_STRING} [R=301]
+ RewriteRule ^(.*)(index.html)$ %WS_DOCUMENT_ROOT%?%{QUERY_STRING} [R=301]
+ ## Home page & index page; two distinct page
+# RewriteRule ^(home.(php|html)) %WS_DOCUMENT_ROOT%index.php?_ID=home.php [L,QSA]
+# RewriteRule ^()$ %WS_DOCUMENT_ROOT%index.php?_ID=home.php [L,QSA]
+# RewriteRule ^(.*)(index.html)$ %WS_DOCUMENT_ROOT%index.php?%{QUERY_STRING} [R=301]
+
+
+ ## Retro-compatibilité
+ ## Account specific pages
+ RewriteRule ^(.*)account.(php|html)$ account.php?%{QUERY_STRING} [L,QSA]
+ RewriteRule ^(.*)account(_([a-z_]*)).(php|html)$ account.php?action=$3&%{QUERY_STRING} [L,QSA]
+ RewriteRule ^address_([a-z_]*).php$ account.php?aca_mod=address_book&aca_type=account&aca_action=display_view&%{QUERY_STRING}
+
+
+ ## Move xxxx.php >> xxx.html
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ #Mode SEO2 default
+ RewriteRule ^([a-zA-Z_]*)\.(php)$ d/$1/$1.html?&%{QUERY_STRING} [R=301]
+ ## Mode SEO
+ # RewriteRule ^([a-zA-Z_]*)\.(php)$ $1d-$1.html?&%{QUERY_STRING} [R=301]
+
+
+
# SEO
- # MODE SEO Rewrite
- RewriteRule ^(.*)-p-(.*).html$ index.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-b-(.*).html$ index.php?content=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-t-(.*).html$ index.php?content=$2&%{QUERY_STRING}
- # RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-pr-(.*).html$ index.php?_ID=listing_reviews.php&products_id=$2&%{QUERY_STRING}
- # RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-d-(.*).html$ $2.php?divers=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-l-(.*).html$ $2.php?lID=$2&%{QUERY_STRING} [L]
- RewriteRule ^(.*)-u-(.*).html$ index.php?customers_id=$2&%{QUERY_STRING} [L]
- # MODE SEO Rewrite-mode2
+ # MODE SEO Rewrite-mode2 (Default)
+
+ RewriteRule ^pi/(.*)/(.*).html$ popup_image.php?pID=$1&%{QUERY_STRING} [L]
+
+ ## Product page
RewriteRule ^p/([0-9]*)/(.*).html$ index.php?products_id=$1&%{QUERY_STRING} [L]
+ ## Categroy page
RewriteRule ^c/(.*)/(.*).html$ index.php?cPath=$1&%{QUERY_STRING} [L]
- RewriteRule ^b/(.*)/(.*).html$ index.php?content=$1&%{QUERY_STRING} [L]
+ ## Manufacturer page
RewriteRule ^m/(.*)/(.*).html$ index.php?manufacturers_id=$1&%{QUERY_STRING} [L]
- RewriteRule ^pi/(.*)/(.*).html$ popup_image.php?pID=$1&%{QUERY_STRING} [L]
+ ## CMS content page
RewriteRule ^t/(.*)/(.*).html$ index.php?content=$1%{QUERY_STRING} [L]
- RewriteRule ^pr/(.*)/(.*).html$ index.php?_ID=listing_reviews.php&products_id=$1&%{QUERY_STRING} [L]
- RewriteRule ^i/(.*)/(.*).html$ information.php?info_id=$1&%{QUERY_STRING} [L]
- RewriteRule ^d/(.*)/(.*).html$ $1.php?divers=$1.php&%{QUERY_STRING} [L]
- RewriteRule ^l/(.*)/(.*).html$ $1.php?lID=$1&%{QUERY_STRING} [L]
+ ## Divers page
+ RewriteRule ^d/(.*)/(.*).html$ index.php?_ID=$1.php&%{QUERY_STRING} [L]
+ ## Public members page
RewriteRule ^u/(.*)/(.*).html$ index.php?customers_id=$1&%{QUERY_STRING} [L]
- ErrorDocument 401 /
- ErrorDocument 402 /
- ErrorDocument 403 /
- ErrorDocument 404 /
- ErrorDocument 500 /
+
+# RewriteRule ^b/(.*)/(.*).html$ index.php?content=$1&%{QUERY_STRING} [L]
+# RewriteRule ^pr/(.*)/(.*).html$ index.php?_ID=listing_reviews.php&products_id=$1&%{QUERY_STRING} [L]
+# RewriteRule ^i/(.*)/(.*).html$ information.php?info_id=$1&%{QUERY_STRING} [L]
+# RewriteRule ^l/(.*)/(.*).html$ $1.php?lID=$1&%{QUERY_STRING} [L]
+
+
+ # MODE SEO Rewrite
+# RewriteRule ^(.*)-p-(.*).html$ index.php?products_id=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-b-(.*).html$ index.php?content=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-t-(.*).html$ index.php?content=$2&%{QUERY_STRING}
+# # RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-pr-(.*).html$ index.php?_ID=listing_reviews.php&products_id=$2&%{QUERY_STRING}
+# # RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-d-(.*).html$ $2.php?divers=$2&%{QUERY_STRING}
+# RewriteRule ^(.*)-l-(.*).html$ $2.php?lID=$2&%{QUERY_STRING} [L]
+# RewriteRule ^(.*)-u-(.*).html$ index.php?customers_id=$2&%{QUERY_STRING} [L]
+
+
</IfModule>
Modified: trunk/catalog/install/includes/modele/robot.txt
===================================================================
--- trunk/catalog/install/includes/modele/robot.txt 2011-11-08 09:58:15 UTC (rev 3870)
+++ trunk/catalog/install/includes/modele/robot.txt 2011-11-08 15:38:37 UTC (rev 3871)
@@ -20,6 +20,7 @@
Disallow: /sessions/
Disallow: /templates/
Disallow: /pub/
+Disallow: /error/
# For sitemaps.xml autodiscovery.
Sitemap: %HTTP_SERVER%%HTTP_CATALOG%sitemapindex.xml
\ 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...> - 2011-11-08 09:58:22
|
Revision: 3870
http://oscss.svn.sourceforge.net/oscss/?rev=3870&view=rev
Author: oscim
Date: 2011-11-08 09:58:15 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
coquille sur install dans la gestion des traduction avant insertion en db
Sur le chemin des docs en mode vhost
Modified Paths:
--------------
trunk/catalog/install/includes/functions/database.php
trunk/catalog/install/includes/modele/configure.txt
Modified: trunk/catalog/install/includes/functions/database.php
===================================================================
--- trunk/catalog/install/includes/functions/database.php 2011-11-07 09:13:07 UTC (rev 3869)
+++ trunk/catalog/install/includes/functions/database.php 2011-11-08 09:58:15 UTC (rev 3870)
@@ -254,6 +254,7 @@
if( $file_lg_sample !='')include($file_lg_sample);
else{
$file_lg= dirname($_SERVER['SCRIPT_FILENAME']).'/'.WS_LANGUAGE.DC_LOADER_LANG.'/'.preg_replace(array('#(.sql)#i','#^([0-9]*_)#i'),array('.txt','') ,basename($sql_file));
+
if(file_exists($file_lg))include($file_lg);
}
@@ -279,15 +280,14 @@
if($repl) {
$lg_k = array_keys($lg);
- $lg_v = array_map('addslashes',$lg);
+ $lg_v = array_map('addslashes',array_values($lg));
}
+
foreach($query as $row){
$row = trim($row);
- if(strlen($row) > 3){
+ if(strlen($row) > 1){
$sql=($repl)? str_replace($lg_k,$lg_v,$row) : $row ;
-
- $DB->query($row);
-
+ $DB->query($sql);
}
}
} else {
Modified: trunk/catalog/install/includes/modele/configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/configure.txt 2011-11-07 09:13:07 UTC (rev 3869)
+++ trunk/catalog/install/includes/modele/configure.txt 2011-11-08 09:58:15 UTC (rev 3870)
@@ -54,7 +54,7 @@
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '%FS_DOCUMENT_ROOT%');
- define('DIR_FS_ROOT_DOCS', '%FS_DOCUMENT_ROOT%Documents/');
+ define('DIR_FS_ROOT_DOCS', '%FS_ROOT_DOCS%');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|