Get ShipmentItems
public getShipmentItems ( ) : Doctrine\Common\Collections\Collection | ||
리턴 | Doctrine\Common\Collections\Collection |
/** * 商品ごとの配送料を取得 * * @param Shipping $Shipping * @return int */ public function getProductDeliveryFee(Shipping $Shipping) { $productDeliveryFeeTotal = 0; $shipmentItems = $Shipping->getShipmentItems(); foreach ($shipmentItems as $ShipmentItem) { $productDeliveryFeeTotal += $ShipmentItem->getProductClass()->getDeliveryFee() * $ShipmentItem->getQuantity(); } return $productDeliveryFeeTotal; }