first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
class stDeliveryOrderProductInfo extends stDeliveryProductInfoAbstract
{
/**
* Zamówienie
* @var Order
*/
protected $order;
public function __construct(Order $order, stCurrencyModelInterface $currency)
{
$this->order = $order;
parent::__construct($currency);
}
protected function initialize(): void
{
foreach ($this->order->getOrderProductsJoinProduct() as $orderProduct)
{
$this->addAmountWithCurrency($orderProduct->getTotalAmount(true, true));
$this->addWeight($orderProduct->getTotalWeight());
$this->addQuantity($orderProduct->getQuantity());
$this->addDimensions($orderProduct->getWidth(), $orderProduct->getHeight(), $orderProduct->getDepth(), $orderProduct->getQuantity());
$this->addDeliveryPrice($orderProduct->getTotalDeliveryPrice());
$this->addMaxTax($orderProduct->getTax());
if (!empty($orderProduct->getProduct()->getDeliveries()))
{
$this->addAllowedDeliveries($orderProduct->getProduct()->getDeliveries());
}
}
}
}