No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- <?php
-
- namespace Lc\CaracoleBundle\Builder\Order;
-
- use Lc\CaracoleBundle\Model\Order\OrderProductInterface;
- use Lc\CaracoleBundle\Resolver\Price\PriceResolver;
-
- class OrderProductBuilder
- {
- protected PriceResolver $priceResolver;
-
- public function __construct(PriceResolver $priceResolver)
- {
- $this->priceResolver = $priceResolver;
- }
-
- public function init(OrderProductInterface $orderProduct)
- {
- $orderProduct->setTitle($orderProduct->getTitleOrderShop());
- $orderProduct->setPrice($this->priceResolver->getPrice($orderProduct->getProduct()));
- $orderProduct->setBuyingPrice($this->priceResolver->getBuyingPrice($orderProduct->getProduct()));
- $orderProduct->setUnit($orderProduct->getProduct()->getUnitInherited());
- $orderProduct->setTaxRate($orderProduct->getProduct()->getTaxRateInherited());
- $orderProduct->setQuantityProduct($orderProduct->getProduct()->getQuantityInherited());
-
- return $orderProduct;
- }
- }
|