Pagina 1 di 1
Ancora problemi prezzi...
Inviato: 08/02/2010, 22:01
da daniloronchi
Ho letto in giro, ma purtroppo anche io ho il problema dei prezzi.
Ho installato Oscommerce v. 3 alpha 5.
Ho messo la valuta euro ad 1.
Ho definito una zona, e inserita l'iva al 20%.
Ho messo a true la visualizzazione dell'iva nello store
eppure quello che mi ritorna è questo:
Perché mi calcola l'iva 2 volte???
Grazie a chi mi saprà aiutare.
Re: Ancora problemi prezzi...
Inviato: 08/02/2010, 22:07
da dynamo
perchè è sbagliato il modulo ot_subtotal.php

Re: Ancora problemi prezzi...
Inviato: 08/02/2010, 22:16
da daniloronchi
Grazie Dynamo, e dove trovo una versione "aggiustata" del file?
Re: Ancora problemi prezzi...
Inviato: 08/02/2010, 23:34
da dynamo
devi modificarlo a mano... io l'ho fatto per l'implementazione del mio sistema di fatturazione...
Re: Ancora problemi prezzi...
Inviato: 09/02/2010, 13:14
da daniloronchi
dynamo ha scritto:devi modificarlo a mano... io l'ho fatto per l'implementazione del mio sistema di fatturazione...
Azz e se non ne fossi capace???

Re: Ancora problemi prezzi...
Inviato: 09/02/2010, 14:38
da dynamo
io ho risolto così
Codice: Seleziona tutto
<?php
/*
$Id: ot_subtotal.php 1739 2007-12-20 00:52:16Z hpdl $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
class ot_subtotal {
var $title, $output;
function ot_subtotal() {
$this->code = 'ot_subtotal';
$this->title = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE;
$this->description = MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION;
$this->enabled = ((MODULE_ORDER_TOTAL_SUBTOTAL_STATUS == 'true') ? true : false);
$this->sort_order = MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER;
$this->output = array();
}
/* function process() {
global $order, $currencies;
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format($order->info['subtotal'], true, $order->info['currency'], $order->info['currency_value']),
'value' => $order->info['subtotal']);
}*/
function process() {
global $order, $currencies;
if (DISPLAY_PRICE_WITH_TAX == 'true')
{
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format($order->info['subtotal']-$order->info['tax'], true, $order->info['currency'], $order->info['currency_value']),
'value' => $order->info['subtotal']);
}
else
{
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format($order->info['subtotal'], true, $order->info['currency'], $order->info['currency_value']),
'value' => $order->info['subtotal']);
}
}
function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS'");
$this->_check = tep_db_num_rows($check_query);
}
return $this->_check;
}
function keys() {
return array('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER');
}
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 Sub-Total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Do you want to display the order sub-total cost?', '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_SUBTOTAL_SORT_ORDER', '1', 'Sort order of display.', '6', '2', now())");
}
function remove() {
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
}
?>
Re: Ancora problemi prezzi...
Inviato: 09/02/2010, 16:17
da daniloronchi
Sei veramente troppo gentile...
quindi copio ed incollo tutto il tuo testo nel file ot_subtotal.php ?
Grazie ancora.
Re: Ancora problemi prezzi...
Inviato: 09/02/2010, 16:21
da dynamo
si in ogni caso fai un backup del tuo file

così stiamo tutti più tranquilli

Re: Ancora problemi prezzi...
Inviato: 09/02/2010, 17:09
da daniloronchi
Su quello non c'erano dubbi... devo solo trovare dove sia

)
Re: Ancora problemi prezzi...
Inviato: 09/02/2010, 17:34
da dynamo
-.-"
catalog/includes/modules/order_total
Re: Ancora problemi prezzi...
Inviato: 10/02/2010, 17:16
da daniloronchi
purtroppo cambiando il file con quello che mi hai dato tu, mi torna questo errore:
Fatal error: Class 'osC_OrderTotal_sub_total' not found in /shop/includes/classes/order_total.php on line 44
il file che ho io però si chiama sub_total.php e non ot_subtotal.php come mi avevi scritto...

Re: Ancora problemi prezzi...
Inviato: 10/02/2010, 17:45
da dynamo
ho notato che con la versione 3.0 hanno cambiato un po' i nomi dei file...
il mio consiglio lascia stare la 3.0 che è beta e passa alla versione 2.2 rca che trovi anche moltissime contributions

Re: Ancora problemi prezzi...
Inviato: 10/02/2010, 17:57
da daniloronchi
Grazie, hai qualche versione già farcita con contrib da segnalarmi?
Re: Ancora problemi prezzi...
Inviato: 10/02/2010, 18:51
da dynamo
si il pack fatto dal nostro forum
