Hallo,
habe schon so einiges gefunden darüber, aber so recht klappen will es nicht bei mir.
Möchte die Versandkosten generell ab 300 Euro auf null setzen.
dazu habe ich dieses hier in die products_comp_calcScript.inc eingfügt (hier im Forum gefunden):
$case = 0;
if ( $this->calculatedSums_tax["goodstotal"] < 300)
else{
$this->calculatedSums_tax["shipping"] = 0;
}
nur bekomme ich dann einen Parse Error.
Wie kann man das ganze kurz und schmerzlos realisieren?
In der Doku konnte ich darüber auch nichts finden.
Danke
Du kannst kein PHP, gell?!
Naja, sagen wir so: rudimentär,
Für die ganz heißen Sachen hab ich meine Programmiererin, die ist aber noch 2 Wochen im Urlaub.
Nun frag ich mal hier gelle.
Danke
Poste mal das ganze Skript, vielleicht fällt mir was ins Auge :o
Danke hier der Code
<?php
/*
products_comp_calcScript.php
Calculation script for use with the default products.inc script
The script is based on the assumption that you're going to add a fee for using MasterCard/Eurocard, VISA or Diners Club.
MasterCard and VISA demands 5.75 % percent of the total amount in transaction fee. To compensate for this and let the customer pay the fee, this script calculates how much you need to add to the total in order to fully compensate.
To compensate 5,75% you must add 6.10%, then 5,75 % percent of that total is exactly the same as the amount of the fee.
TypoScript properties:
.feeTax = enter sales-tax percentage for the fee, if any
.feePercent = the percent to be compensated for, default is 5.75 %
*/
$baseAmount = $this->basket->calculatedArray['priceTax']['goodstotal']+$this->basket->calculatedArray['priceTax']['shipping']; // The fee is calculated from the total of the goods AND shipping
$feePercent = doubleval($confScript['feePercent'] ? $confScript['feePercent'] : 5.75); // Fee percent is by default 5.75 %
# Calculate conpensating percentage by: 100/(1-pFee/100)-100 = pComp, where pFee is the percentage, eg. Mastercard is taking (5,75%) and pComp will thus be 6.1 %
$compPercent = 100/(1-$feePercent/100)-100; // The compensation percentage.
$this->basket->calculatedArray['priceNoTax']['payment'] = $baseAmount/100*$compPercent; // Add the amount to the no_tax total
$this->basket->calculatedArray['priceTax']['payment'] = $this->basket->calculatedArray['priceNoTax']['payment'] * (1+$this->basket->conf['payment.']['TAXpercentage']/100); // ..and add the amount to the tax total + tax of the amount, if any
$case = 0;
if ( $this->calculatedSums_tax["goodstotal"] < 300)
else{
$this->calculatedSums_tax["shipping"] = 0;
}
?>
Vielen Dank
P.S. Sollte mich mal ernsthafter mit PHP auseinandersetzen
So, bekomme es leider immer noch nicht hin,das ab 300 Euro Mindestbestellwert
der Versand auf 0,00 Euro steht. Mein products_comp_calcScript.inc
sieht jetzt so aus:
<?php
/*
products_comp_calcScript.php
Calculation script for use with the default products.inc script
The script is based on the assumption that you're going to add a fee for using MasterCard/Eurocard, VISA or Diners Club.
MasterCard and VISA demands 5.75 % percent of the total amount in transaction fee. To compensate for this and let the customer pay the fee, this script calculates how much you need to add to the total in order to fully compensate.
To compensate 5,75% you must add 6.10%, then 5,75 % percent of that total is exactly the same as the amount of the fee.
TypoScript properties:
.feeTax = enter sales-tax percentage for the fee, if any
.feePercent = the percent to be compensated for, default is 5.75 %
*/
$baseAmount = $this->basket->calculatedArray['priceTax']['goodstotal']+$this->basket->calculatedArray['priceTax']['shipping']; // The fee is calculated from the total of the goods AND shipping
$feePercent = doubleval($confScript['feePercent'] ? $confScript['feePercent'] : 5.75); // Fee percent is by default 5.75 %
# Calculate conpensating percentage by: 100/(1-pFee/100)-100 = pComp, where pFee is the percentage, eg. Mastercard is taking (5,75%) and pComp will thus be 6.1 %
$compPercent = 100/(1-$feePercent/100)-100; // The compensation percentage.
$this->basket->calculatedArray['priceNoTax']['payment'] = $baseAmount/100*$compPercent; // Add the amount to the no_tax total
$this->basket->calculatedArray['priceTax']['payment'] = $this->basket->calculatedArray['priceNoTax']['payment'] * (1+$this->basket->conf['payment.']['TAXpercentage']/100); // ..and add the amount to the tax total + tax of the amount, if any
if ( $this->calculatedSums_tax["goodstotal"] < 300) ;
else{
$this->calculatedSums_tax["shipping"] = 0;
}
$this->calculatedSums_tax["shipping"] = 5.00;
?>
Im Setup steht dieses hier:
plugin.tt_products.shipping >
## EXAMPLE shipping config:
plugin.tt_products.shipping {
TAXpercentage = 16
10.title = Post
10.priceTax = 3,00
20.title = Paketdienst
20.priceTax = 12
40.title = Selbstabholer
40.excludePayment = 10,40
}
Überschreibt TS die Angaben im products_comp_calcScript.inc?
Wie kann/muss ich das lösen?
Danke
Hey ... poste mal den genauen laut deines Errors.
Ich denk es ist Zeile 21. Die musst du abschließen ...
$baseAmount = ""; // irgendwie so .. Oder was immer dort rein soll
Hallo Vielen Dank für den Tip,
werde es mir morgen nochmal vornehmen und schaun ob es es dann funzt.
Fehlermeldung bekomme ich ja keine.
Gruß
Hallo,
es will mir einfach nicht gelingen. das die Versandkosten ab 300.00 Euro Mindestbestellwert auf null stehen.
1.
$baseAmount = ""; // irgendwie so .. Oder was immer dort rein soll
Dieses habe ich getan,ändern tut sich nichts, Fehlermeldung bekomme ich auch nicht.
Was ist das Geheimnis?
Muss doch gehen.
Jemand da der mir helfen kann?
Danke
Entschuldigung,
habe zu schnell gepostet.
Habe es jetzt über TS hinbekommen.
Und zwar so hier:
plugin.tt_products.shipping >
TAXpercentage = 16
10.title = Post
10.priceTax.type = count
10.priceTax.1 = 3.00
10.priceTax.noCostsAmount = 300
}
Danke
Gruß