#1 (permalink)  
Alt 06.11.2007, 21:19
xt:Commerce Support Kunde
 
Registriert seit: 26.06.2007
Beiträge: 23
Standard Versand D , AT CH etc.

Hallo XTC-Gemeinde,

wie kann man die Versandkosten einzeln als FLAT anlegen?

Ich meine für jedes Land eine eigene Flat.


Finde lediglich das Modul nach Zonen, kann aber nur eine Zone editieren ( Zone 1 ).



Besten Dank für eure Hilfe.



Gruß
Dieter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 06.11.2007, 21:59
Erfahrener Benutzer
 
Registriert seit: 18.03.2006
Beiträge: 403
Standard

Hallo Dieter,

Du mußt lediglich das Modul flat kopieren, umbennen in bsp. flat_ch (innerhalb der Datei mußt Du auch noch ein paar Änderungen vornehmen flat durch flat_ch ersetzen). Dann nur noch entsprechende Änderungen in der oder den Sprachdateien und dann müßte das laufen.

Gruß Gecko6

Geändert von Gecko6 (06.11.2007 um 22:02 Uhr) Grund: Noch vergessen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 06.11.2007, 22:16
xt:Commerce Support Kunde
 
Registriert seit: 26.06.2007
Beiträge: 23
Standard

vielen Dank Gecko, werde ich morgen gleich machen.


Gute Nacht.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 08.11.2007, 11:39
xt:Commerce Support Kunde
 
Registriert seit: 01.12.2005
Beiträge: 3
Standard FLAT anpassen

Was hier beschrieben wird wäre ideal für meinen Shop, dann könnte ich Briefversand und Paketversand einfügen.
Ich habe es auch gleich ausprobiert.
Es hätte fast geklappt.

Mein Problem: Die vier Flat-Optionen reagieren alle miteinander im Verbund und lassen sich nicht einzeln aktivieren.

Was habe ich Greenhorn da nicht angepasst ?
Wer kann mir einen Hinweis geben.

Hier die shipping-Datei:
class flat_eu_karten {
var $code, $title, $description, $icon, $enabled;

function flat_eu_karten() {
global $order;
$this->code = 'flat_eu_karten';
$this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
$this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FLAT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_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;
}
}
}

function quote($method = '') {
global $order;
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
'cost' => MODULE_SHIPPING_FLAT_COST)));
if ($this->tax_class > 0) {
$this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (xtc_not_null($this->icon)) $this->quotes['icon'] = xtc_image($this->icon, $this->title);
return $this->quotes;
}
function check() {
if (!isset($this->_check)) {
$check_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FLAT_STATUS'");
$this->_check = xtc_db_num_rows($check_query);
}
return $this->_check;
}
function install() {
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_SHIPPING_FLAT_STATUS', 'True', '6', '0', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_FLAT_ALLOWED', '', '6', '0', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_FLAT_COST', '5.00', '6', '0', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_SHIPPING_FLAT_TAX_CLASS', '0', '6', '0', 'xtc_get_tax_class_title', 'xtc_cfg_pull_down_tax_classes(', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_SHIPPING_FLAT_ZONE', '0', '6', '0', 'xtc_get_zone_class_title', 'xtc_cfg_pull_down_zone_classes(', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_FLAT_SORT_ORDER', '0', '6', '0', now())");
}
function remove() {
xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
function keys() {
return array('MODULE_SHIPPING_FLAT_STATUS', 'MODULE_SHIPPING_FLAT_COST','MODULE_SHIPPING_FLAT_ ALLOWED', 'MODULE_SHIPPING_FLAT_TAX_CLASS', 'MODULE_SHIPPING_FLAT_ZONE', 'MODULE_SHIPPING_FLAT_SORT_ORDER');
}
}
?>


Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 08.11.2007, 12:12
Erfahrener Benutzer
 
Registriert seit: 18.03.2006
Beiträge: 403
Standard

Du bist scheinbar nicht nach Anleitung vorgegangen und hast nicht alle "flat" durch Deine Bezeichnung ersetzt!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 21.11.2007, 09:26
Neuer Benutzer
 
Registriert seit: 12.10.2007
Beiträge: 24
Frage

Ich hab auch versucht, das ganze umzusetzen, da wir allerdings tabellarische Versandkosten verwenden, habe ich nun eben die table.php kopiert.

Leider habe ich nun folgendes Problem:
Zitat:
1146 - Table 'xxxxxx.TABLE_EU_CONFIGURATION' doesn't exist

select configuration_value from TABLE_EU_CONFIGURATION where configuration_key = 'MODULE_SHIPPING_TABLE_EU_STATUS'

[XT SQL Error]
(Ich denke mal was ich ausgexxxt habe, kann sich jeder denken )

Ich vermute mal ich muß ein "TABLE_EU_CONFIGURATION" Feld in die SQL DB einfügen, aber bevor ich da rumstricke, wollte ich mich hier nochmal rückversichern.

So hier noch meine table_eu.php
Zitat:
<?php
/* -----------------------------------------------------------------------------------------
$Id: table_eu.php 1002 2007-11-21 09:38:37Z mz $

XT-Commerce - community made shopping
http://www.xt-commerce.com

Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(table.php,v 1.27 2003/02/05); www.oscommerce.com
(c) 2003 nextcommerce (table.php,v 1.8 2003/08/24); www.nextcommerce.org

Released under the GNU General Public License
---------------------------------------------------------------------------------------*/


class table_eu {
var $code, $title, $description, $icon, $enabled;


function table_eu() {
global $order;

$this->code = 'table_eu';
$this->title = MODULE_SHIPPING_TABLE_EU_TEXT_TITLE;
$this->description = MODULE_SHIPPING_TABLE_EU_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_TABLE_EU_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_TABLE_EU_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_TABLE_EU_STATUS == 'True') ? true : false);

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE_EU_ZONE > 0) ) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_EU_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE_EU_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_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;
}

}
}


function quote($method = '') {
global $order, $shipping_weight, $shipping_num_boxes,$xtPrice;

if (MODULE_SHIPPING_TABLE_EU_MODE == 'price') {
$order_total = $xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total());
} else {
$order_total = $shipping_weight;
}

$table_eu_cost = split("[:,]" , MODULE_SHIPPING_TABLE_EU_COST);
$size = sizeof($table_eu_cost);
for ($i=0, $n=$size; $i<$n; $i+=2) {
if ($order_total <= $table_eu_cost[$i]) {
$shipping = $table_eu_cost[$i+1];
break;
}
}

if (MODULE_SHIPPING_TABLE_EU_MODE == 'weight') {
$shipping = $shipping * $shipping_num_boxes;
}

$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_TABLE_EU_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_TABLE_EU_TEXT_WAY,
'cost' => $shipping + MODULE_SHIPPING_TABLE_EU_HANDLING)));

if ($this->tax_class > 0) {
$this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}

if (xtc_not_null($this->icon)) $this->quotes['icon'] = xtc_image($this->icon, $this->title);

return $this->quotes;
}

function check() {
if (!isset($this->_check)) {
$check_query = xtc_db_query("select configuration_value from " . TABLE_EU_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_TABLE_EU_STATUS'");
$this->_check = xtc_db_num_rows($check_query);
}
return $this->_check;
}

function install() {
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_SHIPPING_TABLE_EU_EU_STATUS', 'True', '6', '0', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_ALLOWED', '', '6', '0', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_COST', '25:8.50,50:5.50,10000:0.00', '6', '0', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_MODE', 'weight', '6', '0', 'xtc_cfg_select_option(array(\'weight\', \'price\'), ', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_HANDLING', '0', '6', '0', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_TAX_CLASS', '0', '6', '0', 'xtc_get_tax_class_title', 'xtc_cfg_pull_down_tax_classes(', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_ZONE', '0', '6', '0', 'xtc_get_zone_class_title', 'xtc_cfg_pull_down_zone_classes(', now())");
xtc_db_query("insert into " . TABLE_EU_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_TABLE_EU_EU_SORT_ORDER', '0', '6', '0', now())");
}

function remove() {
xtc_db_query("delete from " . TABLE_EU_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}

function keys() {
return array('MODULE_SHIPPING_TABLE_EU_STATUS', 'MODULE_SHIPPING_TABLE_EU_COST', 'MODULE_SHIPPING_TABLE_EU_MODE', 'MODULE_SHIPPING_TABLE_EU_HANDLING','MODULE_SHIPPI NG_TABLE_EU_ALLOWED', 'MODULE_SHIPPING_TABLE_EU_TAX_CLASS', 'MODULE_SHIPPING_TABLE_EU_ZONE', 'MODULE_SHIPPING_TABLE_EU_SORT_ORDER');
}
}
?>
Die lang Datei hab ich ebenfalls entsprechend angepasst, aber ich vermute mal, dass die hier nichts zu suchen hat
Also hab ich beim Verändern grundlegend was falsch gemacht oder muß ich an der DB was verändern?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 12.12.2007, 13:44
Neuer Benutzer
 
Registriert seit: 12.10.2007
Beiträge: 24
Standard

kann mir hier keiner weiterhelfen?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 12.12.2007, 14:10
Erfahrener Benutzer
 
Registriert seit: 02.05.2007
Beiträge: 149
Standard

Wenn Du tabellarisch wg. Gewicht nutzt, kannst Du doch die Zonen nehmen. Mußt nur in der zones.php die Anzahl einstellen.

Code:
/**
 * CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
 * 
 * + CUSTOMIZE THE SETTING IN lang/LANGUAGE/modules/shipping/zones.php
 */
      $this->num_zones = 1;
    }
Auf meinem Testsystem funzt das mit 3. Muß mal schauen, ob es Online auch tut...

Ach ja, die Änderungen vor dem Installieren machen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 12.12.2007, 14:27
Erfahrener Benutzer
 
Registriert seit: 24.04.2006
Beiträge: 288
Standard

Warum so kompliziert?

Gehe zum Adminbereich.
Wähle: Module --> Versandarten
Installiere: Versandkosten nach Zonen

Sagen wir als Beispiel, dass die versandkosten in Deutschland 5.90 Euro kosten. In die Schweiz und nach Österreich kosten sie 10.90 Euro.

Dann gib folgendes im oben genannten Modul ein:

Zone 1 Länder
DE

Zone 1 Versandkosten
500.00:5.90 (Gewicht:Preis)

Zone 2 Länder
DE

Zone 2 Versandkosten
500.00:10.90 (Gewicht:Preis)

Nun kosten alle Pakete bis 500 Kilo nur 5.90 Euro in Deutschland bzw 10.90 für Österreich & Schweiz.

Gruß,
Sonja
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #10 (permalink)  
Alt 12.12.2007, 14:51
Erfahrener Benutzer
 
Registriert seit: 02.05.2007
Beiträge: 149
Standard

Mal das Zonenmodul im Originalzustand angeschaut?

Genialerweise ist da erstmal nur eine Zone vorhanden.
Ich hab jedenfallst gedacht: "Hä? Zonenmodul mit einer Zone? Wasn Schwachsinn"

Da muß man erst mal draufkommen, in das Script reinzuschauen.

Die Smileys passen wirklich gut zu meinem Gesichtsausdruck.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
versand

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 18:55 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand