[TYPO3-german] tt_products / Mehrwertsteuer Ausland

andi zaugg az at cabag.ch
Fri Jun 30 14:07:57 CEST 2006


> Hallo Andi,
> Ich stehe vor selbiger Frage/Problem! Darf man Fragen auf welche Idee du
> gekommen bist ;-))
> 
> L.G.
> Michael


Kurze Anleitung:
1) Funktion: class.tx_ttproducts_paymentshipping -> generateRadioSelect
Alt:
-----------
$template = $this->conf[$key.'.']['template'] ? ereg_replace('\' *\. *\$key
*\. *\'',$key, $this->conf[$key.'.']['template']) : '<nobr>###IMAGE###
<input type="radio" name="recs[tt_products]['.$key.']" onClick="submit()"
value="###VALUE###"###CHECKED###> ###TITLE###</nobr><BR>';
   
$wrap = $this->conf[$key.'.']['wrap'] ? $this->conf[$key.'.'
['wrap'] :'<select name="recs[tt_products]['.$key.']" onChange="submit()">
</select>';
-----------

Neu:
-----------
 // MODIFIZIERT BY cab services ag - 30.06.06
 // Andi Zaugg - az at cabag.ch
 // Uebergibt MwST Attribut
 // Benoetigt fuer das Entfernen der MwSt von Auslandskunden
   if(empty($_GET['withoutMwSt'])){
    $template = $this->conf[$key.'.']['template'] ? ereg_replace('\' *\.
*\$key *\. *\'',$key, $this->conf[$key.'.']['template']) :
'<nobr>###IMAGE### <input type="radio" name="recs[tt_products]['.$key.']"
onClick="this.form.action =
\'shop-tt-products/warenkorb.html?withoutMwSt=true\'; submit()"
value="###VALUE###"###CHECKED###> ###TITLE###</nobr><BR>';
    $wrap = $this->conf[$key.'.']['wrap'] ? $this->conf[$key.'.'
['wrap'] :'<select name="recs[tt_products]['.$key.']"
onChange="this.form.action =
\'shop-tt-products/warenkorb.html?withoutMwSt=true\'; submit()">
</select>';
   }
   else{
   $template = $this->conf[$key.'.']['template'] ? ereg_replace('\' *\.
*\$key *\. *\'',$key, $this->conf[$key.'.']['template']) :
'<nobr>###IMAGE### <input type="radio" name="recs[tt_products]['.$key.']"
onClick="this.form.action = \'shop-tt-products/warenkorb.html\'; submit()"
value="###VALUE###"###CHECKED###> ###TITLE###</nobr><BR>';
   
   $wrap = $this->conf[$key.'.']['wrap'] ? $this->conf[$key.'.'
['wrap'] :'<select name="recs[tt_products]['.$key.']"
onChange="this.form.action = \'shop-tt-products/warenkorb.html\';
submit()">|</select>';
   }
 // --- 
-----------

Der Schlüssel ist das "onChange". Ich ändere dort das form.action und
übermittle die Variable "withoutMwSt"

Da nun tt_products sich die Shipping Änderungen merkt, muss dies bei
erneuten Seitenaufruf gelöscht werden (siehe nächster Schritt).







2) Funktion: class.tx_ttproducts_paymentshipping -> setBasketExtras
Alt:
-----------
function setBasketExtras(&$basketRec) {
 global $TSFE;
 .
 .
 .
-----------

Neu:
-----------
function setBasketExtras(&$basketRec) {
 global $TSFE;
  
  
// MODIFIZIERT BY cab services ag - 30.06.06
// Andi Zaugg - az at cabag.ch
// Loescht Warenkorb Attributte des Shippings
// Benoetigt fuer das Entfernen der MwSt von Auslandskunden
 if(empty($_GET['withoutMwSt'])){
  unset($basketRec);
 }
//--
-----------

3)
Nun muss nur noch Dein ts modifiziert werden:
[userFunc = user_noMwSt()]
 plugin.tt_products.TAXpercentage = 0
 plugin.tt_products.shipping.TAXpercentage = 0;
[global]


4)
Die Funktion für das localconf.php
function user_noMwSt(){
 if(!empty($_GET['withoutMwSt'])){
  return true;
 }
}



Ist eine "Bastellösung". Aber eine Bessere weiss ich momentan nicht.


gruss andi











More information about the TYPO3-german mailing list