PDA

View Full Version : Shipping module problems oscmax 2.5



Mark Brandon
08-09-2011, 11:41 PM
Hello

I am having problems with ashipping module "transports joyau"

When a customer is on theshipping method page the calculations region, weight (in France) works fine. Whenthe customer clicks continue the checkout shipping page goes blank.

In Admin the shippingmodule shows up in the list. When i click install the page goes blank. If Idclick the module, everything opens and i can edit the shipping prices perregion.

If someone could point mein the right direction i would much appreciate it.

Thanks




<?php

class joyau {
var $code, $title, $description,

$icon, $enabled;

// class constructor
function joyau()

{
$this->code =

'joyau';
$this->title =
MODULE_SHIPPING_JOYAU_TEXT_TITLE;


$this->description =
MODULE_SHIPPING_JOYAU_TEXT_DESCRIPTION;

$this->sort_order
=
MODULE_SHIPPING_JOYAU_SORT_ORDER;


$this->icon = DIR_WS_ICONS . 'delivery.png'; // ou shipping_laposte.gif
au
choix
$this->tax_class =

MODULE_SHIPPING_JOYAU_TAX_CLASS;


$this->enabled = MODULE_SHIPPING_JOYAU_STATUS;

}






// class methods
function quote($method = '')

{
global $order, $cart,
$shipping_weight;






$this->quotes = array('id' =>

$this->code,


'module' =>

MODULE_SHIPPING_JOYAU_TEXT_TITLE,


'methods' => array());






if

(tep_not_null($this->icon))
$this->quotes['icon'] =

tep_image($this->icon, $this->title);






$dest_country =

$order->delivery['country']['iso_code_2'];






// si le pays livré n'est pas la France et france métropolitaine

ZONE INVALIDE
if (($dest_country != 'FR')

&& ($dest_country != 'FX')) {
$this->quotes['error'] =

MODULE_SHIPPING_JOYAU_INVALID_ZONE;
return

$this->quotes;
}






// Simplification de code - Modif par Pitt
$code =

substr($order->delivery['postcode'], 0, 2);

/*

Alsace */
if (($code == '67')||($code == '68')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_ALSACE');






/* Aquitaine */
} elseif (($code == '24')||($code == '33')||($code

== '40')||($code == '47')||($code == '64')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_AQUITAINE');






/* Auvergne*/
} elseif (($code == '03')||($code ==

'15')||($code == '43')||($code == '63')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_AUVERGNE');







/* Basse-Normandie */
} elseif (($code

== '14')||($code == '50')||($code == '61')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_BASSE_NORMANDIE');






/* Bourgogne */
} elseif (($code == '21')||($code == '58')||($code

== '71')||($code == '89')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_BOURGOGNE');



/*
Bretagne */
} elseif (($code == '22')or($code ==
'29')or($code ==
'35')or($code == '56')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_BRETAGNE');







/* Centre */
} elseif (($code ==

'18')||($code == '28')||($code == '36')||($code == '37')||($code ==

'41')||($code == '45')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_CENTRE');






/* Champagne-Ardenne */
} elseif (($code == '08')||($code ==

'10')||($code == '51')||($code == '52')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_CHAMPAGNE_ARDENNE' );

/* Corse

*/
} elseif (($code == '2A')||($code == '2B')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_CORSE');






/* Franche-Comté */
} elseif (($code == '25')||($code ==

'39')||($code == '70')||($code == '90')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_FRANCHE_COMTE');






/* Haute-Normandie */
} elseif (($code == '27')||($code == '76'))

{
$cost = constant('MODULE_SHIPPING_HAUTE_NORMANDIE');






/* Île-de-France */
} elseif (($code == '75')||($code ==

'77')||($code == '78')||($code == '91')||($code == '92')||($code ==

'93')||($code == '94')||($code == '95')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_ILE_DE_FRANCE');

/*

Languedoc-Roussillon */
} elseif (($code == '11')||($code ==

'30')||($code == '34')||($code == '48')||($code == '66')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_LANGUEDOC_ROUSILLO N');

/*
Limousin
*/
} elseif (($code == '19')||($code == '23')||($code ==
'87'))
{
$cost =
constant('MODULE_SHIPPING_JOYAU_LIMOUSIN');

/*
Lorraine
*/
} elseif (($code == '54')||($code == '55')||($code ==

'57')||($code == '88')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_LORRAINE');

/* Midi-Pyrénées

*/
} elseif (($code == '09')||($code == '12')||($code ==
'31')||($code
== '32')||($code == '46')||($code == '65')||($code ==
'81')||($code == '82'))
{
$cost =
constant('MODULE_SHIPPING_JOYAU_MIDI_PYRENEES');






/* Nord-Pas-de-Calais */
} elseif (($code == '59')||($code ==

'62')) {
$cost = constant('MODULE_SHIPPING_JOYAU_NORD');






/* Pays de la Loire */
} elseif (($code ==

'44')||($code == '49')||($code == '53')||($code == '72')||($code == '85'))

{
$cost = constant('MODULE_SHIPPING_JOYAU_LOIRE');







/* Picardie */
} elseif (($code == '02')||($code == '60')||($code

== '80')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_PICARDIE');







/* Poitou-Charentes */
} elseif (($code == '16')||($code ==

'17')||($code == '79')||($code == '86')) {
$cost =

constant('MODULE_SHIPPING_JOYAU_POITOU_CHARENTES') ;







/* Provence-Alpes-Côte d'Azur */
} elseif (($code == '04')||($code

== '05')||($code == '06')||($code == '13')||($code == '83')||($code ==
'84'))
{
$cost =
constant('MODULE_SHIPPING_JOYAU_PACA');



} else

{
/* Rhône-Alpes

:
o 01

Ain
o 07

Ardèche
o 26

Drôme
o 38

Isère
o 42

Loire
o 69

Rhône
o 73

Savoie
o 74

Haute-Savoie */

$cost =

constant('MODULE_SHIPPING_JOYAU_RHONE_ALPES');


}






$table = split("[:,]" ,

$cost);
for ($i = 0; $i <
sizeof($table);
$i+=2) {
if ($shipping_weight >
$table[$i])


continue;



// Poids minimum pour activer
le
module - Modification par Xaglo
if ($shipping_weight < '10')

$this->quotes['error'] = 'Le texte qui va bien';






$this->quotes['methods'][] = array('id' =>

$this->code,
'title' =>

$shipping_weight . ' ' .

MODULE_SHIPPING_JOYAU_TEXT_UNITS,


'cost' => $table[$i+1] + MODULE_SHIPPING_JOYAU_HANDLING);






if ($this->tax_class > 0)

{
$this->quotes['tax'] =

tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'],


$order->delivery['zone_id']);


}
return

$this->quotes;
}






$this->quotes['error'] =

MODULE_SHIPPING_JOYAU_TOO_HEAVY;
return

$this->quotes;
}






function check() {


$check = tep_db_query("select configuration_value from " .
TABLE_CONFIGURATION .
" where configuration_key =

'MODULE_SHIPPING_JOYAU_STATUS'");
$check =

tep_db_num_rows($check);






return $check;
}






function install() {


tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title,

configuration_key, configuration_value, configuration_description,

configuration_group_id, sort_order, set_function, date_added) VALUES
('Valider
Joyau', 'MODULE_SHIPPING_JOYAU_STATUS', 'True', 'Activer /
Désactiver Colissimo
sans perdre les valeurs changées', '6', '0',

'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, date_added) values ('Joyau Alsace',
'MODULE_SHIPPING_JOYAU_ALSACE',
'0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,
1.5:6.70, 2:7.10, 3:7.65, 4:8.30,
5:9.00, 6:9.60, 7:10.00, 10:11.05,
15:12.85, 30:17.65', 'Port basé sur le poids
total des produits, tarif
ALSACE. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg
facturé 3.50, jusqu\'à 2
Kg, 5.50, etc', '6', '0',
now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau AQUITAINE',

'MODULE_SHIPPING_JOYAU_AQUITAINE', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55,
5:8.80,
7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total
des
produits, tarif AQUITAINE. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg
facturé
6.15, jusqu\'à 2 Kg , 6.95, etc', '6', '0',
now())");

tep_db_query("insert into " . TABLE_CONFIGURATION
. " (configuration_title,
configuration_key, configuration_value,
configuration_description,
configuration_group_id, sort_order, date_added)
values ('Joyau AUVERGNE',
'MODULE_SHIPPING_JOYAU_AUVERGNE', '0.250:4.35,
0.5:5.25, 0.75:5.85, 1:6.25,
1.5:6.70, 2:7.10, 3:7.65, 4:8.30, 5:9.00,
6:9.60, 7:10.00, 10:11.05, 15:12.85,
30:17.65', 'Port basé sur le poids
total des produits, tarif AUVERGNE. Exemple:
1:3.50,2:5.50,etc.. Jusqu\'à 1
Kg facturé 3.50, jusqu\'à 2 Kg, 5.50, etc', '6',
'0',
now())");
tep_db_query("insert into " .

TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau BASSE_NORMANDIE',

'MODULE_SHIPPING_JOYAU_BASSE_NORMANDIE', '0.500:5.10, 1:6.15, 2:6.95,
3:7.55,
5:8.80, 7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le
poids total des
produits, tarif national BASSE_NORMANDIE. Exemple: 1:6.15,
2:6.95, etc. Jusqu\'à
1 Kg facturé 6.15, jusqu\'à 2 Kg , 6.95, etc', '6',
'0',
now())");
tep_db_query("insert into "
.
TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau BOURGOGNE',

'MODULE_SHIPPING_JOYAU_BOURGOGNE', '0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,

1.5:6.70, 2:7.10, 3:7.65, 4:8.30, 5:9.00, 6:9.60, 7:10.00, 10:11.05,
15:12.85,
30:17.65', 'Port basé sur le poids total des produits, tarif
BOURGOGNE. Exemple:
1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg facturé 3.50, jusqu\'à
2 Kg, 5.50, etc', '6',
'0', now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau BRETAGNE',

'MODULE_SHIPPING_JOYAU_BRETAGNE', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55,
5:8.80,
7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total
des
produits, tarif BRETAGNE. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg
facturé
6.15, jusqu\'à 2 Kg , 6.95, etc', '6', '0',

now())");
tep_db_query("insert into " .

TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau CENTRE',
'MODULE_SHIPPING_JOYAU_CENTRE',
'0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,
1.5:6.70, 2:7.10, 3:7.65, 4:8.30,
5:9.00, 6:9.60, 7:10.00, 10:11.05,
15:12.85, 30:17.65', 'Port basé sur le poids
total des produits, tarif
CENTRE. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg
facturé 3.50, jusqu\'à 2
Kg, 5.50, etc', '6', '0',
now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau
CHAMPAGNE_ARDENNE',
'MODULE_SHIPPING_JOYAU_CHAMPAGNE_ARDENNE', '0.500:5.10,
1:6.15, 2:6.95, 3:7.55,
5:8.80, 7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port
basé sur le poids total des
produits, tarif CHAMPAGNE_ARDENNE. Exemple:
1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg
facturé 6.15, jusqu\'à 2 Kg , 6.95, etc',
'6', '0',
now())");
tep_db_query("insert
into " .
TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau CORSE',
'MODULE_SHIPPING_JOYAU_CORSE',
'0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,
1.5:6.70, 2:7.10, 3:7.65, 4:8.30,
5:9.00, 6:9.60, 7:10.00, 10:11.05,
15:12.85, 30:17.65', 'Port basé sur le poids
total des produits, tarif
CORSE. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg
facturé 3.50, jusqu\'à 2
Kg, 5.50, etc', '6', '0',
now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau
FRANCHE_COMTE',
'MODULE_SHIPPING_JOYAU_FRANCHE_COMTE', '0.500:5.10, 1:6.15,
2:6.95, 3:7.55,
5:8.80, 7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé
sur le poids total des
produits, tarif FRANCHE_COMTE. Exemple: 1:6.15,
2:6.95, etc. Jusqu\'à 1 Kg
facturé 6.15, jusqu\'à 2 Kg , 6.95, etc', '6',
'0',
now())");
tep_db_query("insert into "
.
TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau HAUTE_NORMANDIE',

'MODULE_SHIPPING_JOYAU_HAUTE_NORMANDIE', '0.250:4.35, 0.5:5.25, 0.75:5.85,

1:6.25, 1.5:6.70, 2:7.10, 3:7.65, 4:8.30, 5:9.00, 6:9.60, 7:10.00, 10:11.05,

15:12.85, 30:17.65', 'Port basé sur le poids total des produits, tarif

HAUTE_NORMANDIE. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg facturé 3.50,

jusqu\'à 2 Kg, 5.50, etc', '6', '0',
now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau ILE_DE_FRANCE',

'MODULE_SHIPPING_JOYAU_ILE_DE_FRANCE', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55,

5:8.80, 7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total
des
produits, tarif ILE_DE_FRANCE. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'à 1
Kg
facturé 6.15, jusqu\'à 2 Kg , 6.95, etc', '6', '0',

now())");
tep_db_query("insert into " .

TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau LIMOUSIN',

'MODULE_SHIPPING_JOYAU_LIMOUSIN', '0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,

1.5:6.70, 2:7.10, 3:7.65, 4:8.30, 5:9.00, 6:9.60, 7:10.00, 10:11.05,
15:12.85,
30:17.65', 'Port basé sur le poids total des produits, tarif
LIMOUSIN. Exemple:
1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg facturé 3.50, jusqu\'à
2 Kg, 5.50, etc', '6',
'0', now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau LORRAINE',

'MODULE_SHIPPING_JOYAU_LORRAINE', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55,
5:8.80,
7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total
des
produits, tarif LORRAINE. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg
facturé
6.15, jusqu\'à 2 Kg , 6.95, etc', '6', '0',
now())");

tep_db_query("insert into " . TABLE_CONFIGURATION
. " (configuration_title,
configuration_key, configuration_value,
configuration_description,
configuration_group_id, sort_order, date_added)
values ('Joyau MIDI_PYRENEES',
'MODULE_SHIPPING_JOYAU_MIDI_PYRENEES',
'0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,
1.5:6.70, 2:7.10, 3:7.65, 4:8.30,
5:9.00, 6:9.60, 7:10.00, 10:11.05, 15:12.85,
30:17.65', 'Port basé sur le
poids total des produits, tarif MIDI_PYRENEES.
Exemple: 1:3.50,2:5.50,etc..
Jusqu\'à 1 Kg facturé 3.50, jusqu\'à 2 Kg, 5.50,
etc', '6', '0',
now())");
tep_db_query("insert
into " .
TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau NORD', 'MODULE_SHIPPING_JOYAU_NORD',

'0.500:5.10, 1:6.15, 2:6.95, 3:7.55, 5:8.80, 7:9.60, 10:11.45, 15:13.30,

30:18.05', 'Port basé sur le poids total des produits, tarif NORD. Exemple:

1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg facturé 6.15, jusqu\'à 2 Kg , 6.95, etc',

'6', '0', now())");
tep_db_query("insert
into
" . TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau LOIRE',
'MODULE_SHIPPING_JOYAU_LOIRE',
'0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25,
1.5:6.70, 2:7.10, 3:7.65, 4:8.30,
5:9.00, 6:9.60, 7:10.00, 10:11.05,
15:12.85, 30:17.65', 'Port basé sur le poids
total des produits, tarif
LOIRE. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg
facturé 3.50, jusqu\'à 2
Kg, 5.50, etc', '6', '0',
now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau PICARDIE',

'MODULE_SHIPPING_JOYAU_PICARDIE', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55,
5:8.80,
7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total
des
produits, tarif PICARDIE. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg
facturé
6.15, jusqu\'à 2 Kg , 6.95, etc', '6', '0',

now())");
tep_db_query("insert into " .

TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Joyau POITOU_CHARENTES',

'MODULE_SHIPPING_JOYAU_POITOU_CHARENTES', '0.250:4.35, 0.5:5.25, 0.75:5.85,

1:6.25, 1.5:6.70, 2:7.10, 3:7.65, 4:8.30, 5:9.00, 6:9.60, 7:10.00, 10:11.05,

15:12.85, 30:17.65', 'Port basé sur le poids total des produits, tarif

POITOU_CHARENTES. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg facturé 3.50,

jusqu\'à 2 Kg, 5.50, etc', '6', '0',
now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau PACA',
'MODULE_SHIPPING_JOYAU_PACA',
'0.500:5.10, 1:6.15, 2:6.95, 3:7.55, 5:8.80,
7:9.60, 10:11.45, 15:13.30,
30:18.05', 'Port basé sur le poids total des
produits, tarif PACA. Exemple:
1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg facturé 6.15,
jusqu\'à 2 Kg , 6.95, etc',
'6', '0', now())");

tep_db_query("insert into " .
TABLE_CONFIGURATION . " (configuration_title,
configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, date_added) values ('Joyau RHONE_ALPES',

'MODULE_SHIPPING_JOYAU_RHONE_ALPES', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55,

5:8.80, 7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total
des
produits, tarif RHONE_ALPES. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'à 1 Kg
facturé
6.15, jusqu\'à 2 Kg , 6.95, etc', '6', '0',

now())");
tep_db_query("insert into " .

TABLE_CONFIGURATION . " (configuration_title, configuration_key,

configuration_value, configuration_description, configuration_group_id,

sort_order, date_added) values ('Frais fixes',
'MODULE_SHIPPING_JOYAU_HANDLING',
'0', 'Frais fixes (emballage) pour
colissimo', '6', '0',
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 ('Classe de
taxe',
'MODULE_SHIPPING_JOYAU_TAX_CLASS', '0', 'Appliquer le taux de taxe
suivant sur
les frais de livraison.', '6', '0', 'tep_get_tax_class_title',

'tep_cfg_pull_down_tax_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 ('Code postal',

'MODULE_SHIPPING_JOYAU_STORE_POSTCODE', '75000', 'Code postal de la
boutique',
'6', '0', 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_SHIPPING_JOYAU_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le

plus petit nombre est montré en premier).', '6', '0',

now())");
}






function remove() {


tep_db_query("delete from " . TABLE_CONFIGURATION . " where
configuration_key in
('" . implode("', '", $this->keys()) .
"')");
}






function keys() {
return

array('MODULE_SHIPPING_JOYAU_STATUS', 'MODULE_SHIPPING_JOYAU_ALSACE',

'MODULE_SHIPPING_JOYAU_AQUITAINE', 'MODULE_SHIPPING_JOYAU_AUVERGNE',

'MODULE_SHIPPING_JOYAU_BASSE_NORMANDIE', 'MODULE_SHIPPING_JOYAU_BOURGOGNE',

'MODULE_SHIPPING_JOYAU_BRETAGNE', 'MODULE_SHIPPING_JOYAU_CENTRE',

'MODULE_SHIPPING_JOYAU_CHAMPAGNE_ARDENNE', 'MODULE_SHIPPING_JOYAU_CORSE',

'MODULE_SHIPPING_JOYAU_FRANCHE_COMTE',
'MODULE_SHIPPING_JOYAU_HAUTE_NORMANDIE',

'MODULE_SHIPPING_JOYAU_ILE_DE_FRANCE', 'MODULE_SHIPPING_JOYAU_LIMOUSIN',

'MODULE_SHIPPING_JOYAU_LORRAINE', 'MODULE_SHIPPING_JOYAU_MIDI_PYRENEES',

'MODULE_SHIPPING_JOYAU_NORD', 'MODULE_SHIPPING_JOYAU_LOIRE',

'MODULE_SHIPPING_JOYAU_PICARDIE', 'MODULE_SHIPPING_JOYAU_POITOU_CHARENTES',

'MODULE_SHIPPING_JOYAU_PACA', 'MODULE_SHIPPING_JOYAU_RHONE_ALPES',

'MODULE_SHIPPING_JOYAU_HANDLING', 'MODULE_SHIPPING_JOYAU_STORE_POSTCODE',

'MODULE_SHIPPING_JOYAU_TAX_CLASS','MODULE_SHIPPING _JOYAU_SORT_ORDER');


}
}
?>