getShipmentItems() public method

Get ShipmentItems
public getShipmentItems ( ) : Doctrine\Common\Collections\Collection
return Doctrine\Common\Collections\Collection
Exemplo n.º 1
0
 /**
  * 商品ごとの配送料を取得
  *
  * @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;
 }