Sunday, August 30, 2015

Custom Step Checkout Page

public function saveExcellenceAction(){ if ($this->_expireAjax()) { return; } if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost('excellence', array()); // my custom code start $custom_price = $data['like']; $quote = Mage::getSingleton('checkout/session')->getQuote(); $product1 = Mage::getModel('catalog/product')->loadByAttribute('sku',$bundlePackageSku); $bundler_Price = $custom_price; foreach($quote->getAllVisibleItems() as $quote_item1) { $productPrice = $quote_item1->getProduct()->getPrice(); //print_r(get_class_methods($quote_item1)); $quote_item1->setPrice($bundler_Price + $productPrice); $quote_item1->setCustomPrice($bundler_Price + $productPrice); $quote_item1->setOriginalCustomPrice($bundler_Price + $productPrice); $quote_item1->setRowTotal($bundler_Price + $productPrice); $quote_item1->save(); } // my custom code end $result = $this->getOnepage()->saveExcellence($data); if (!isset($result['error'])) { $result['goto_section'] = 'billing'; } $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } }

http://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript

0 comments:

Post a Comment