Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery.ajax(
- {
- url: formURL,
- type: "POST",
- data: {
- location : location,
- width : width
- },
- success: function() {
- alert('form good');
- },
- error: function() {
- alert('form issue');
- }
- });
- class Custom_GateSelector_IndexController extends Mage_Core_Controller_Front_Action
- {
- public function indexAction()
- {
- $gate_location = $this->getRequest()->getPost('location');
- $gate_width = $this->getRequest()->getPost('width');
- }
- }
- class Custom_GateSelector_Model_Products extends Mage_Catalog_Model_Product
- {
- public function getItemsCollection()
- {
- $topStairs = 'yes';
- $gateWidth = 29.00;
- $rootcatID = Mage::app()->getStore()->getRootCategoryId();
- $collection = $this->getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('gate_max_width', array('gt' => $gateWidth))
- ->addAttributeToFilter('category_id', array('in' => $rootcatID))
- ->addAttributeToFilter('type_id', array('eq' => 'simple'))
- ->addAttributeToSort('price', 'DESC')
- ->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED));
- return $collection;
- }
- }
- public function getItemsCollection($gateLocation, $gateWidth)
- {
- // …
- }
- $collection = $gsProduct->getItemsCollection();
- $collection->addAttributeToFilter('gate_max_width', array('gt' => $gateWidth))
- $gate_location = Mage::app()->getRequest()->getPost('location');
- $gate_width = Mage::app()->getRequest()->getPost('width');
- Mage::app()->getRequest()->getParam('location');
Add Comment
Please, Sign In to add comment