isTaxFree example

/** * @return array */
    public function convertCountryStruct(Country $country)
    {
        $data = json_decode(json_encode($country), true);
        $data = array_merge($data[
            'countryname' => $country->getName(),
            'countryiso' => $country->getIso(),
            'countryen' => $country->getEn(),
            'position' => $country->getPosition(),
            'taxfree' => $country->isTaxFree(),
            'taxfree_ustid' => $country->isTaxFreeForVatId(),
            'taxfree_ustid_checked' => $country->checkVatId(),
            'active' => $country->isActive(),
            'iso3' => $country->getIso3(),
            'display_state_in_registration' => $country->displayStateSelection(),
            'force_state_in_registration' => $country->requiresStateSelection(),
            'areaID' => $country->getAreaId(),
            'allow_shipping' => $country->allowShipping(),
            'states' => [],
            'attributes' => $country->getAttributes(),
        ]);

        
public function sCreateTemporaryOrder()
    {
        $this->sShippingData[CartKey::AMOUNT_NUMERIC] = $this->sShippingData[CartKey::AMOUNT_NUMERIC] ?? '0';
        if (!$this->sShippingcostsNumeric) {
            $this->sShippingcostsNumeric = 0.;
        }
        if (!$this->sBasketData[CartKey::AMOUNT_WITH_TAX_NUMERIC]) {
            $this->sBasketData[CartKey::AMOUNT_WITH_TAX_NUMERIC] = $this->sBasketData[CartKey::AMOUNT_NUMERIC];
        }

        $net = '0';
        if ($this->isTaxFree(
            $this->sSYSTEM->sUSERGROUPDATA['tax'],
            $this->sSYSTEM->sUSERGROUPDATA['id']
        )) {
            $net = '1';
        }

        $dispatchId = '0';
        $this->sBasketData[CartKey::AMOUNT_NET_NUMERIC] = round($this->sBasketData[CartKey::AMOUNT_NET_NUMERIC], 2);
        if ($this->dispatchId) {
            $dispatchId = $this->dispatchId;
        }

        
Home | Imprint | This part of the site doesn't use cookies.