sFormatPrice example


            [$userId]
        );

        foreach ($getOrders as $orderKey => $orderValue) {
            if (($this->config->get('sARTICLESOUTPUTNETTO') && !$this->sSYSTEM->sUSERGROUPDATA['tax'])
                || (!$this->sSYSTEM->sUSERGROUPDATA['tax'] && $this->sSYSTEM->sUSERGROUPDATA['id'])
            ) {
                $getOrders[$orderKey]['invoice_amount'] = $this->moduleManager->Articles()
                    ->sFormatPrice($orderValue['invoice_amount_net']);
                $getOrders[$orderKey]['invoice_shipping'] = $this->moduleManager->Articles()
                    ->sFormatPrice($orderValue['invoice_shipping_net']);
            } else {
                $getOrders[$orderKey]['invoice_amount'] = $this->moduleManager->Articles()
                    ->sFormatPrice($orderValue['invoice_amount']);
                $getOrders[$orderKey]['invoice_shipping'] = $this->moduleManager->Articles()
                    ->sFormatPrice($orderValue['invoice_shipping']);
            }

            /** @var array $getOrderDetails */
            $getOrderDetails = $this->db->fetchAll(
                
'articles' => $getProducts,
                'totalAmount' => $totalAmount,
                'totalAmountWithTax' => $totalAmountWithTax,
                'totalCount' => $totalCount,
                'totalAmountNet' => $totalAmountNet,
            ])) {
                return [];
            }
        }

        $totalAmountNumeric = $totalAmount;
        $totalAmount = $this->moduleManager->Articles()->sFormatPrice($totalAmount);

        $totalAmountWithTaxNumeric = $totalAmountWithTax;
        $totalAmountWithTax = $this->moduleManager->Articles()->sFormatPrice($totalAmountWithTax);

        $totalAmountNetNumeric = $totalAmountNet;

        $totalAmountNet = $this->moduleManager->Articles()->sFormatPrice($totalAmountNet);

        $result = [
            CartKey::POSITIONS => $getProducts,
            CartKey::AMOUNT => $totalAmount,
            
// Calculate global discount         if ($this->sSYSTEM->sUSERGROUPDATA['mode'] && $this->sSYSTEM->sUSERGROUPDATA['discount']) {
            $price -= ($price / 100 * $this->sSYSTEM->sUSERGROUPDATA['discount']);
        }
        if ($this->sSYSTEM->sCurrency['factor']) {
            $price *= (float) $this->sSYSTEM->sCurrency['factor'];
        }

        // Condition Output-Netto AND NOT overwrite by customer-group         // OR Output-Netto NOT SET AND tax-settings provided by customer-group         if (!$this->sSYSTEM->sUSERGROUPDATA['tax'] && $this->sSYSTEM->sUSERGROUPDATA['id']) {
            $price = $this->sFormatPrice($price);
        } else {
            $price = $this->sFormatPrice(round($price * (100 + $tax) / 100, 3));
        }

        return $price;
    }

    /** * @param int $taxId * * @return string|false */
$this->sUserData = $this->getUserDataForMail($this->sUserData);

        $details = $this->getOrderDetailsForMail(
            $this->sBasketData[CartKey::POSITIONS]
        );

        $variables = [
            'sOrderDetails' => $details,
            'billingaddress' => $this->sUserData['billingaddress'],
            'shippingaddress' => $this->sUserData['shippingaddress'],
            'additional' => $this->sUserData['additional'],
            'sShippingCosts' => $this->sSYSTEM->sMODULES['sArticles']->sFormatPrice($this->sShippingcosts) . ' ' . $this->sBasketData[CheckoutKey::CURRENCY_NAME],
            'sAmount' => $this->sAmountWithTax ? $this->sSYSTEM->sMODULES['sArticles']->sFormatPrice($this->sAmountWithTax) . ' ' . $this->sBasketData[CheckoutKey::CURRENCY_NAME] : $this->sSYSTEM->sMODULES['sArticles']->sFormatPrice($this->sAmount) . ' ' . $this->sBasketData[CheckoutKey::CURRENCY_NAME],
            'sAmountNumeric' => $this->sAmountWithTax ? $this->sAmountWithTax : $this->sAmount,
            'sAmountNet' => $this->sSYSTEM->sMODULES['sArticles']->sFormatPrice($this->sBasketData[CartKey::AMOUNT_NET_NUMERIC]) . ' ' . $this->sBasketData[CheckoutKey::CURRENCY_NAME],
            'sAmountNetNumeric' => $this->sBasketData[CartKey::AMOUNT_NET_NUMERIC],
            'sTaxRates' => $this->sBasketData[CheckoutKey::TAX_RATES] ?? null,
            'ordernumber' => $orderNumber,
            'sOrderDay' => date('d.m.Y'),
            'sOrderTime' => date('H:i'),
            'sComment' => $this->sComment,
            'attributes' => $attributes,
            'sEsd' => $esdOrder,
        ];

    private function mergeAmount(array $item1, array $item2, string $property)
    {
        $hasComma = str_contains($item1[$property] ?? '', ',');
        $amount = (float) str_replace(',', '.', $item1[$property] ?? '') + (float) str_replace(',', '.', $item2[$property] ?? '');

        if ($hasComma) {
            $amount = $this->modules->Articles()->sFormatPrice($amount);
        }

        return $amount;
    }
}


            $premium['startprice'] *= $activeFactor;

            if ($sBasketAmount >= $premium['startprice']) {
                $premium['available'] = 1;
            } else {
                $premium['available'] = 0;
            }

            if (empty($premium['available'])) {
                $premium['sDifference'] = $this->productModule->sFormatPrice(
                    $premium['startprice'] - $sBasketAmount
                );
            }
            $premium['sArticle'] = $this->productModule->sGetPromotionById(
                'fix',
                0,
                $premium['articleID']
            );
            $premium['startprice'] = $this->productModule->sFormatPrice($premium['startprice']);
            $premium['sVariants'] = $this->getVariantDetailsForPremiumProducts(
                (int) $premium['articleID'],
                
Home | Imprint | This part of the site doesn't use cookies.