I need to place dropdowns which will be connected to each other e.g Truck Brand, Truck Model, Model Years.
So There will be one drop down for Brand. which contains all the attribute options of Truck Brands. Once Selected Brand, another dropdown will appear which contains the attribute options of Truck Model but filtered for that specific brand. Once Model is selected, the years dropdown will apear containing the filtered years for that brand and model. I am new to Magento, and I can get attributes and its options through php using
$attributeId = Mage::getResourceModel('eav/entity_attribute')
->getIdByCode('catalog_product','attribute_code_here');
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
$attributeOptions = $attribute ->getSource()->getAllOptions();
But I dont get filtered Attribute Options fitlered on first attribute. and speaicly using ajax.
Hi buddy you can use below code as per your requirement.
$tableName = Mage::getSingleton(‘core/resource’)->getTableName(‘bharat_sliders/categories’); $slides->getSelect() ->join( array(‘sc’=>$tableName), ‘main_table.slider_id = sc.slider_id’, array(‘sc.*’)) ->where(‘sc.category_id = ?’, $this->getCategoryId()); return $slides;
or also try
http://bmagento.wordpress.com/2014/04/13/join-two-table/
http://bmagento.wordpress.com/2014/04/08/join-two-table-in-magento/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With