/** * Get shipping price * * @param float $price * @param bool|null $includingTax * @param Address|null $shippingAddress * @param int|null $ctc * @param null|string|bool|int|Store $store * @return float */ public function getShippingPrice($price, $includingTax = null, $shippingAddress = null, $ctc = null, $store = null) { $pseudoProduct = new \Magento\Framework\Object(); $pseudoProduct->setTaxClassId($this->getShippingTaxClass($store)); $billingAddress = false; if ($shippingAddress && $shippingAddress->getQuote() && $shippingAddress->getQuote()->getBillingAddress()) { $billingAddress = $shippingAddress->getQuote()->getBillingAddress(); } $price = $this->catalogHelper->getTaxPrice($pseudoProduct, $price, $includingTax, $shippingAddress, $billingAddress, $ctc, $store, $this->shippingPriceIncludesTax($store)); return $price; }
/** * 2016-04-04 * @param AA|CA|QA|OA $a * @return Customer|Quote|Order|null */ function df_address_owner($a) { return $a instanceof CA ? $a->getCustomer() : ($a instanceof QA ? $a->getQuote() : ($a instanceof OA ? $a->getOrder() : null)); }