That helped immensely, thank you! I have to give one of three different messages depending on which region the billing address is in.
I have continued the code like this:
<?php if( $this->order->billing_country == 'DE' ) : ?>
<?php echo "Zwischensumme inkl. 19% MwSt. Versandkosten steuerfrei." ?>
<?php endif; ?>
<?php if( $this->order->billing_country == 'AL,AD,AT,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GI,GR,HU,IS,IE,IM,IT,RS,LV,LI,LT,LU,MK,MT,MD,MC,ME,NL,NO,PL,PT,RO,RU,SM,RS,SK,SI,ES,SE,CH,UA,GB,VA,RS' ) : ?>
<?php echo "Tax free § 4 Nr. 1b UStG / Intra - Community Delivery." ?>
<?php endif; ?>
<?php if( $this->order->billing_country != 'DE,AL,AD,AT,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GI,GR,HU,IS,IE,IM,IT,RS,LV,LI,LT,LU,MK,MT,MD,MC,ME,NL,NO,PL,PT,RO,RU,SM,RS,SK,SI,ES,SE,CH,UA,GB,VA,RS' ) : ?>
<?php echo "Tax free export!" ?>
<?php endif; ?>
The first part works fine. If the billing_country is DE, we get the German tax message.
The second part is for within the EU, and the third part is for the rest of the world. However, if the billing_country is anything else besides DE, I get message three (rest of the world). My guess is that it’s not possible to use a comma’d list of country codes like this..it just made sense in my mind to use the same comma’d list of country codes and just say “if this DOES NOT equal, give x response”.
EDIT: I have figured out how to do this bit! I created an array of the country codes necessary:
<?php if( $this->order->billing_country == 'DE' ) : ?>
<?php echo "Zwischensumme inkl. 19% MwSt. Versandkosten steuerfrei." ?>
<?php endif; ?>
<?php
$country_codes = array("AL","AD","AT","BY","BE","BA","BG","HR","CY","CZ","DK","EE","FO","FI","FR","GI","GR","HU","IS","IE","IM","IT","RS","LV","LI","LT","LU","MK","MT","MD","MC","ME","NL","NO","PL","PT","RO","RU","SM","RS","SK","SI","ES","SE","CH","UA","GB","VA","RS");
if (in_array($this->order->billing_country, $country_codes)) {
echo "Tax free § 4 Nr. 1b UStG / Intra - Community Delivery.";
}
if (!in_array($this->order->billing_country, $country_codes)) {
echo "Tax free export!";
}
?>
Now it works fine. Thank you so much for your help, you really put me on the right track. Great plugin!!
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.
-
This reply was modified 7 years, 10 months ago by reydempto.