Get Pref
public getPref ( ) : Eccube\Entity\Master\Pref | ||
리턴 | Eccube\Entity\Master\Pref |
/** * 配送料金の設定 * * @param Shipping $Shipping * @param Delivery|null $Delivery */ public function setShippingDeliveryFee(Shipping $Shipping, Delivery $Delivery = null) { // 配送料金の設定 if (is_null($Delivery)) { $Delivery = $Shipping->getDelivery(); } $deliveryFee = $this->app['eccube.repository.delivery_fee']->findOneBy(array('Delivery' => $Delivery, 'Pref' => $Shipping->getPref())); $Shipping->setDelivery($Delivery); $Shipping->setDeliveryFee($deliveryFee); $Shipping->setShippingDeliveryFee($deliveryFee->getFee()); $Shipping->setShippingDeliveryName($Delivery->getName()); }
/** * 配送料金の設定 * * @param Shipping $Shipping * @param Delivery|null $Delivery */ public function setShippingDeliveryFee(Shipping $Shipping, Delivery $Delivery = null) { // 配送料金の設定 if (is_null($Delivery)) { $Delivery = $Shipping->getDelivery(); } $deliveryFee = $this->app['eccube.repository.delivery_fee']->findOneBy(array('Delivery' => $Delivery, 'Pref' => $Shipping->getPref())); $Shipping->setDeliveryFee($deliveryFee); $Shipping->setDelivery($Delivery); // 商品ごとの配送料合計 $productDeliveryFeeTotal = 0; if (!is_null($this->BaseInfo->getOptionProductDeliveryFee())) { $productDeliveryFeeTotal += $this->getProductDeliveryFee($Shipping); } $Shipping->setShippingDeliveryFee($deliveryFee->getFee() + $productDeliveryFeeTotal); $Shipping->setShippingDeliveryName($Delivery->getName()); }
/** * Set from Shipping. * * @param \Eccube\Entity\Shipping $Shipping * @return \Eccube\Entity\CustomerAddress */ public function setFromShipping(Shipping $Shipping) { $this->setName01($Shipping->getName01())->setName02($Shipping->getName02())->setKana01($Shipping->getKana01())->setKana02($Shipping->getKana02())->setCompanyName($Shipping->getCompanyName())->setTel01($Shipping->getTel01())->setTel02($Shipping->getTel02())->setTel03($Shipping->getTel03())->setFax01($Shipping->getFax01())->setFax02($Shipping->getFax02())->setFax03($Shipping->getFax03())->setZip01($Shipping->getZip01())->setZip02($Shipping->getZip02())->setZipCode($Shipping->getZip01() . $Shipping->getZip02())->setPref($Shipping->getPref())->setAddr01($Shipping->getAddr01())->setAddr02($Shipping->getAddr02()); return $this; }