Franz Holzinger

Verse of the day

Denn es ist ein Gott und ein Mittler zwischen Gott und den Menschen, nämlich der Mensch Christus Jesus, der sich selbst gegeben hat für alle zur Erlösung, daß solches zu seiner Zeit gepredigt würde;
1 Timotheus 2:5-6

© Bible Gateway's Verse of the Day


autor  
12-05-11 17:29:02 Versandkosten - Fehler
Robert
Hallo,

seit den letzten Versionen von tt_products 2.7.2 werden keine Versandkosten mehr angezeigt bzw. berechnet. Zwischenzeitlich wurde der Fehler zwar schon mal behoben, die korrigierte Version offenbar aber wieder überschrieben oder entfernt.

Die letzte funktionierende Version ist die 2.7.2.1 vom 27.06.2010

Danke schön

Robert
12-07-11 18:40:17 tt_products 2.7.2
Franz Holzinger
Ich habe eine neue tt_products 2.7.2 erzeugt.
DIe Versandkosten und Kosten für die Bezahlung werden angezeigt und berechnet.
13-07-11 00:43:33 Neue Version
Robert
Die neueste Version die ich sehe ist 2.7.2.8 vom 12.07.2011. Und mit der geht's bei mir nicht. Mit 2.7.3 und 2.7.4 übrigens auch nicht.

Es klappt nach wie vor nur bis Version 2.7.2.1
13-07-11 07:02:17 unklar
Franz Holzinger
Ich habe diese Versionen von tt_products erfolgreich getestet. Mit welchem Setup funktioniert es denn nicht?
13-07-11 07:57:39 Setup
Robert
shipping {
radio = 1
TAXpercentage = 19

10 {
title = Post/Paket Deutschland
price.noCostsAmount = 75.00
calculationScript = fileadmin/scripts/shop/calc_script_de.inc
}

20 {
title = Post/Paket innerhalb EU
price.noCostsAmount = 75.00
excludePayment = 40
calculationScript = fileadmin/scripts/shop/calc_script_eu.inc
}

30 {
title = Post/Paket weltweit (außerhalb EU)
price.noCostsAmount = 75.00
excludePayment = 40
calculationScript = fileadmin/scripts/shop/calc_script_in.inc
}

40 {
title = Selbstabholer
excludePayment = 40
}
}



Hier noch ein entsprechendes calc_script_de.inc:

<?php

if ($this->basket->calculatedArray[priceTax][goodstotal] < 75) {
$res = false;
foreach ($this->basket->itemArray as &$value) {
if ($value['0']['rec']['category'] != '23') {
if (!$res) {
$value['0']['rec']['shipping'] = '5.90';
$res = true;
break;
}
}
}

if (!$res) {
$res = false;
foreach ($this->basket->itemArray as &$value) {
if ($value['0']['rec']['category'] == '23') {
if (!$res) {
$value['0']['rec']['shipping'] = '0.55';
$res = true;
break;
}
}
}
}
}

?>
13-07-11 11:02:50 calculationScript
Franz Holzinger
Das Berechnungs Skript muss an den neuen Code von tt_products angepasst werden:

----------------------------------------------------------------
<?php

$priceObj = &t3lib_div::getUserObj('tx_ttproducts_field_price'); // new independant price object
$taxIncluded = $priceObj->getTaxIncluded();

if ($this->basket->calculatedArray[priceTax][goodstotal] < 75) {
$res = FALSE;
foreach ($this->basket->itemArray as &$value) {
if ($value['0']['rec']['category'] != '23') {
if (!$res) {
$priceShipping = '5.90';
$value['0']['rec']['shipping'] = $priceShipping;
$res = TRUE;
break;
}
}
}

if (!$res) {
$res = FALSE;

foreach ($this->basket->itemArray as &$value) {
if ($value['0']['rec']['category'] == '23') {
if (!$res) {
$priceShipping = '0.55';
$value['0']['rec']['shipping'] = $priceShipping;
$res = TRUE;
break;
}
}
}
}
}

if ($res == TRUE && isset($priceShipping)) {
$priceShippingTax = $priceShippingTax + $priceObj->getPrice($priceShipping,TRUE,$taxpercentage,$taxIncluded,TRUE);
$priceShippingNoTax = $priceShippingNoTax + $priceObj->getPrice($priceShipping,FALSE,$taxpercentage,$taxIncluded,TRUE);
}

?>
< Zurück zum Forum