/** * Prepare selected options for simple subscription product * * @param Mage_Catalog_Model_Product $product * @param Varien_Object $buyRequest * @return array */ public function processBuyRequest($product, $buyRequest) { $options = parent::processBuyRequest($product, $buyRequest); $option = $buyRequest->getData('adyen_subscription'); $options['adyen_subscription'] = $option; return $options; }
public function testProcessBuyRequest() { $buyRequest = new Varien_Object(array('super_attribute' => array('10', 'string'))); $result = $this->_model->processBuyRequest($this->_product, $buyRequest); $this->assertEquals(array('super_attribute' => array(10)), $result); }
public function processBuyRequest($product, $buyRequest) { $toReturn = parent::processBuyRequest($product, $buyRequest); if ($buyRequest->getData('aw_sarp_subscription_start')) { $toReturn['aw_sarp_subscription_start'] = $buyRequest->getData('aw_sarp_subscription_start'); } if ($buyRequest->getData('aw_sarp_subscription_type')) { $toReturn['aw_sarp_subscription_type'] = $buyRequest->getData('aw_sarp_subscription_type'); } return $toReturn; }