geniv / nette-order-control
Nette 框架的订单控制类
v1.0.1
2018-12-19 18:45 UTC
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2024-09-20 08:01:43 UTC
README
安装
$ composer require geniv/nette-order-control
或
"geniv/nette-order-control": ">=1.0.0"
require
"php": ">=7.0.0"
包含在应用程序中
IOrderControl 的内容
//const: IOrderControl::CURRENCY_CZK IOrderControl::CURRENCY_EUR IOrderControl::CURRENCY_USD IOrderControl::CURRENCY_GBP //method: setPrice(float $price): IOrderControl; setVat(float $vat): IOrderControl; setCurrency(string $currency): IOrderControl; getCurrency(): string; getPrice(): float; getVat(): float; getPriceVat($priceAndVat = false): float; getPriceTotal($priceAndVat = false): float; setPayment(string $name, float $price, float $vat): IOrderControl; getPaymentName(): string; getPaymentPrice(): float; getPaymentPriceVat($priceAndVat = false): float; setDelivery(string $name, float $price, float $vat): IOrderControl; getDeliveryName(): string; getDeliveryPrice(): float; getDeliveryPriceVat($priceAndVat = false): float; getOrderNumber(array $items, int $zeros = self::ZEROS): string;
PHP 使用方法
$orderControl = new OrderControl(); $orderControl->setPrice($this->price); $orderControl->setVat($this->vat); $orderControl->setCurrency($this->currency); $orderControl->setPayment($item['driver'], $item['price'], $this->vat); $orderControl->setDelivery($item['driver'], $item['price'], $this->vat);
latte 使用方法
{$orderControl->getPrice()} {$orderControl->getPriceVat(true)}