Guest jr.allmedia Posted November 6, 2007 Report Share Posted November 6, 2007 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 Link to comment Share on other sites More sharing options...
Gecko6 Posted November 6, 2007 Report Share Posted November 6, 2007 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 Link to comment Share on other sites More sharing options...
Guest jr.allmedia Posted November 6, 2007 Report Share Posted November 6, 2007 vielen Dank Gecko, werde ich morgen gleich machen. Gute Nacht. Link to comment Share on other sites More sharing options...
redcurrant Posted November 8, 2007 Report Share Posted November 8, 2007 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 Link to comment Share on other sites More sharing options...
Gecko6 Posted November 8, 2007 Report Share Posted November 8, 2007 Du bist scheinbar nicht nach Anleitung vorgegangen und hast nicht alle "flat" durch Deine Bezeichnung ersetzt! Link to comment Share on other sites More sharing options...
Grospolian Posted November 21, 2007 Report Share Posted November 21, 2007 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: 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 <?php /* ----------------------------------------------------------------------------------------- $Id: table_eu.php 1002 2007-11-21 09:38:37Z mz $ XT-Commerce - community made shopping http://www.xt-commerce.com Copyright © 2003 XT-Commerce ----------------------------------------------------------------------------------------- based on: © 2000-2001 The Exchange Project (earlier name of osCommerce) © 2002-2003 osCommerce(table.php,v 1.27 2003/02/05); www.oscommerce.com © 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_SHIPPING_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? Link to comment Share on other sites More sharing options...
Grospolian Posted December 12, 2007 Report Share Posted December 12, 2007 kann mir hier keiner weiterhelfen? Link to comment Share on other sites More sharing options...
Numerobis Posted December 12, 2007 Report Share Posted December 12, 2007 Wenn Du tabellarisch wg. Gewicht nutzt, kannst Du doch die Zonen nehmen. Mußt nur in der zones.php die Anzahl einstellen. /** * CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED * * + CUSTOMIZE THE SETTING IN lang/LANGUAGE/modules/shipping/zones.php */ [B]$this->num_zones = 1;[/B] } Auf meinem Testsystem funzt das mit 3. Muß mal schauen, ob es Online auch tut... Ach ja, die Änderungen vor dem Installieren machen. Link to comment Share on other sites More sharing options...
SonjaSt Posted December 12, 2007 Report Share Posted December 12, 2007 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 Link to comment Share on other sites More sharing options...
Numerobis Posted December 12, 2007 Report Share Posted December 12, 2007 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. Link to comment Share on other sites More sharing options...
SonjaSt Posted December 12, 2007 Report Share Posted December 12, 2007 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. Oh holy *peeeeeep* Sorry, dann hab ich in "grauer Vorzeit" offenbar mal neue Zonen angelegt. Inzwischen habe ich deren nämlich fünf und bin das so gewöhnt . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.