spedizione

Postate qui discussioni di carattere generale riguardo a problemi di installazione e configurazione di osCommerce

Moderatore: mod Generali

Rispondi
Avatar utente
oversize
membro Senior
membro Senior
Messaggi: 280
Iscritto il: 28/07/2005, 18:54
Località: carrara
Contatta:

spedizione

Messaggio da oversize »

quando clicco sul tasto spedizione mi d aquesto errore

Warning: Cannot modify header information - headers already sent by (output started at /home/bigmasww/public_html/includes/modules/order_total/ot_cod_fee.php:145) in /home/bigmasww/public_html/includes/functions/general.php on line 29

anche se le email di conferma le manda... :roll:
Bass
membro Master
membro Master
Messaggi: 3593
Iscritto il: 18/04/2004, 0:00
Località: Varese
Contatta:

Re: spedizione

Messaggio da Bass »

oversize ha scritto:quando clicco sul tasto spedizione mi d aquesto errore
Prova ad aprire il file ot_code_fee.php in includes/modules/order_total e vedere se ci sono spazi dopo l'ultima riga, dopo il ?> finale

'iao

Sergio
http://www.oscomtemplate.com - E' disponibile il nuovo pacchetto free con forum di supporto

http://www.semilandia.it
Avatar utente
oversize
membro Senior
membro Senior
Messaggi: 280
Iscritto il: 28/07/2005, 18:54
Località: carrara
Contatta:

Messaggio da oversize »

no nessun spazio... cosa puo essere????
Bass
membro Master
membro Master
Messaggi: 3593
Iscritto il: 18/04/2004, 0:00
Località: Varese
Contatta:

Messaggio da Bass »

oversize ha scritto:no nessun spazio... cosa puo essere????
Mah, la maggior parte delle volte dipende da spazi all'inizio o alla fine del file,
non saprei che dirti, forse qualche altro file che interferisce

'iao

Sergio
http://www.oscomtemplate.com - E' disponibile il nuovo pacchetto free con forum di supporto

http://www.semilandia.it
Avatar utente
oversize
membro Senior
membro Senior
Messaggi: 280
Iscritto il: 28/07/2005, 18:54
Località: carrara
Contatta:

Messaggio da oversize »

bass è il tuo pacchetto :twisted: :twisted: :twisted:

questo è il codice dagli un occhiata:

---------------------------
<?php
/*
$Id: ot_cod_fee.php,v 1.00 2002/11/30 17:02:00 harley_vb Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/
/********************************************************************
* Copyright (C) 2002 TheMedia, Dipl.-Ing Thomas Pl"nkers.
* http://www.themedia.at & http://www.oscommerce.at
*
* All rights reserved.
*
* This program is free software licensed under the GNU General Public License (GPL).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*********************************************************************/

class ot_cod_fee {
var $title, $output;

function ot_cod_fee() {
$this->code = 'ot_cod_fee';
$this->title = MODULE_ORDER_TOTAL_COD_TITLE;
$this->description = MODULE_ORDER_TOTAL_COD_DESCRIPTION;
$this->enabled = ((MODULE_ORDER_TOTAL_COD_STATUS == 'true') ? true : false);
$this->sort_order = MODULE_ORDER_TOTAL_COD_SORT_ORDER;

$this->output = array();
}

function process() {
global $order, $currencies, $cod_cost, $cod_country, $shipping;

if (MODULE_ORDER_TOTAL_COD_STATUS == 'true') {
$tax = tep_get_tax_rate(MODULE_ORDER_TOTAL_COD_TAX_CLASS);

//Will become true, if cod can be processed.
$cod_country = false;

//check if payment method is cod. If yes, check if cod is possible.
if ($GLOBALS['payment'] == 'cod') {
//process installed shipping modules
if (substr_count($shipping['id'], 'corriere1') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CORRIERE1);
if (substr_count($shipping['id'], 'postepaccocelere1') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOCELERE1);
if (substr_count($shipping['id'], 'postepaccocelere3') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOCELERE3);
if (substr_count($shipping['id'], 'postepaccoordinario') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOORDINARIO);
if (substr_count($shipping['id'], 'postepostaraccomandata') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_POSTEPOSTARACCOMANDATA);

for ($i = 0; $i < count($cod_zones); $i++) {
if ($cod_zones[$i] == $order->delivery['country']['iso_code_2']) {
$cod_cost = $cod_zones[$i + 1];
$cod_country = true;
//print('match' . $i . ': ' . $cod_cost);
break;
} elseif ($cod_zones[$i] == '00') {
$cod_cost = $cod_zones[$i + 1];
$cod_country = true;
//print('match' . $i . ': ' . $cod_cost);
break;
} else {
//print('no match');
}
$i++;
}
} else {
//COD selected, but no shipping module which offers COD
}

if ($cod_country) {
$order->info['tax'] += tep_calculate_tax($cod_cost, $tax);
$order->info['tax_groups']["{$tax}"] += tep_calculate_tax($cod_cost, $tax);
$order->info['total'] += $cod_cost + tep_calculate_tax($cod_cost, $tax);

$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format(tep_add_tax($cod_cost, $tax), true, $order->info['currency'], $order->info['currency_value']),
'value' => tep_add_tax($cod_cost, $tax));
} else {
//Following code should be improved if we can't get the shipping modules disabled, who don't allow COD
// as well as countries who do not have cod
// $this->output[] = array('title' => $this->title . ':',
// 'text' => 'No COD for this module.',
// 'value' => '');
}
}
}

function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_COD_STATUS'");
$this->_check = tep_db_num_rows($check_query);
}

return $this->_check;
}
//lagt tilk servicepakke her!!!!
function keys() {
return array('MODULE_ORDER_TOTAL_COD_STATUS', 'MODULE_ORDER_TOTAL_COD_SORT_ORDER', 'MODULE_ORDER_TOTAL_COD_FEE_CORRIERE1','MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOCELERE1','MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOCELERE3','MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOORDINARIO', 'MODULE_ORDER_TOTAL_COD_FEE_POSTEPOSTARACCOMANDATA', 'MODULE_ORDER_TOTAL_COD_TAX_CLASS');

}

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 ('Display COD', 'MODULE_ORDER_TOTAL_COD_STATUS', 'true', 'Do you want this module to display?', '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, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_COD_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for CORRIERE1', 'MODULE_ORDER_TOTAL_COD_FEE_CORRIERE1', 'IT:7.00,00:9.99', 'CORRIERE1: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '3', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for POSTEPACCOCELERE1', 'MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOCELERE1', 'IT:7.50,00:9.99', 'POSTEPACCOCELERE1: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '4', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for POSTEPACCOCELERE3', 'MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOCELERE3', 'IT:7.50,00:9.99', 'POSTEPACCOCELERE3: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '5', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for POSTEPACCOORDINARIO', 'MODULE_ORDER_TOTAL_COD_FEE_POSTEPACCOORDINARIO', 'IT:7.50,00:9.99', 'POSTEPACCOORDINARIO: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '6', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for POSTEPOSTARACCOMANDATA', 'MODULE_ORDER_TOTAL_COD_FEE_POSTEPOSTARACCOMANDATA', 'IT:7.50,00:9.99', 'POSTEPOSTARACCOMANADATA: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '7', 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 ('Tax Class', 'MODULE_ORDER_TOTAL_COD_TAX_CLASS', '0', 'Use the following tax class on the COD fee.', '6', '8', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
}


function remove() {
$keys = '';
$keys_array = $this->keys();
$keys_size = sizeof($keys_array);
for ($i=0; $i<$keys_size; $i++) {
$keys .= "'" . $keys_array[$i] . "',";
}
$keys = substr($keys, 0, -1);

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
}
}
?>
Bass
membro Master
membro Master
Messaggi: 3593
Iscritto il: 18/04/2004, 0:00
Località: Varese
Contatta:

Messaggio da Bass »

oversize ha scritto:bass è il tuo pacchetto :twisted: :twisted: :twisted:
Lo conosco :lol:
Non credo dipenda dal codice di ot_cod_fee.php se non e' stato toccato deve funzionare.
Piuttosto hai controllato il fondo del file, magari non ci sono spazi dopo ?> ma c'e' una riga vuota oltre, prova a posizionarti con il mouse appena dopo ?> e andare in giu' di una riga con la freccia in basso, non si sa mai...

'iao

Sergio
http://www.oscomtemplate.com - E' disponibile il nuovo pacchetto free con forum di supporto

http://www.semilandia.it
Avatar utente
oversize
membro Senior
membro Senior
Messaggi: 280
Iscritto il: 28/07/2005, 18:54
Località: carrara
Contatta:

Messaggio da oversize »

bass hai un mess privato
Avatar utente
oversize
membro Senior
membro Senior
Messaggi: 280
Iscritto il: 28/07/2005, 18:54
Località: carrara
Contatta:

Messaggio da oversize »

ok risolto , c'era una riga vuota alla riga 145 ,ora funziona.
:lol:
Rispondi