/** * @param Mage_Sales_Model_Quote_Item $recQuoteItem * @return mixed */ public function getRecurringItemMessage(Mage_Sales_Model_Quote_Item $recQuoteItem) { $recurringItemMessage = ''; $initialFeeMessage = ''; $rowTotal = $recQuoteItem->getNominalRowTotal(); $currency_symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); $product = $recQuoteItem->getProduct(); $productAdditionalInfo = unserialize($product->getCustomOption('info_buyRequest')->getValue()); $deferredDateStamp = strtotime($productAdditionalInfo['recurring_profile_start_datetime']); if ($deferredDateStamp) { $initialFeeMessage = $this->__(" (initial fee only, 1st recurring fee will be charged on %s)", date('d-M-Y', $deferredDateStamp)); $rowTotal = $recQuoteItem->getXpRecurringInitialFee() + $recQuoteItem->getInitialfeeTaxAmount(); } $recurringItemMessage = $this->__("%s%s for recurring product '%s' in your cart.", number_format($rowTotal, 2, '.', ''), $currency_symbol, $recQuoteItem->getName()); $mainMessage = $recurringItemMessage . $initialFeeMessage; return $mainMessage; }