/** * get the gifting pricegroup; a new price group is created * and attached if one doesn't exist. * @param IGifting * @return IPriceGroup */ protected function _getPriceGroup(IGifting $giftingPayload) { $pg = $giftingPayload->getGiftPricing(); if (!$pg) { $pg = $giftingPayload->getEmptyGiftingPriceGroup(); $giftingPayload->setGiftPricing($pg); } return $pg; }
/** * Get the tax container for address level gifting taxes. * * @return ITaxContainer */ protected function _getTaxContainer() { $taxContainer = $this->_shipGroup->getGiftPricing(); if (!$taxContainer) { $taxContainer = $this->_shipGroup->getEmptyGiftingPriceGroup(); $this->_shipGroup->setGiftPricing($taxContainer); } return $taxContainer; }