Archive for the ‘Magento’ Category

public function massRunprofileAction() { $connection = Mage::getSingleton(’core/resource’)->getConnection(’core_write’); $vantgeimportIds = $this->getRequest()->getParam(’vantgeimport’); if (!is_array($vantgeimportIds)) { Mage::getSingleton(’adminhtml/session’)->addError($this->__(’Please select item(s)’)); } else { try { foreach ($vantgeimportIds as $vantgeimportId) { //Here Added Customer Data $vantgeimport = Mage::getSingleton(’vantgeimport/vantgeimport’) ->load($vantgeimportId)->getData(); // XML Read Content $xmlfile = Mage::getBaseDir(’media’) . DS . ‘vantagecustomer’ . DS . $vantgeimport[’filename’]; $doc = new DOMDocument(); $doc->load($xmlfile); $arrFeeds [...]

Example: app\code\local\Cataloggallery\Gallerycheck\Block\Template\Edit\Tab\General.php This is my custom module file folder structure on General Tab file. $fieldset->addField(’Sku’, ‘text’, array( ‘name’ => ‘Sku’, ‘class’=>’checkskuval’, ‘label’ => Mage::helper(’Gallerycheck’)->__(’Sku’), ‘title’ => Mage::helper(’Gallerycheck’)->__(’Sku’), ‘required’ => true, )); The above fieldset is my prepareform field. I want to check the Sku value is already exist or not. On that same file bottom [...]

First we will call the UPSRequest XML .It will give to response XML with shipmentdigestnumber. After that we will call that UPSAccept Request XML it will give to response XML with UPS Tracking number, transport charge, service charge, etc. Here i have attached with class file. ///Call the UPS XML file Class// $upsclass=new upswebservicecall(); //Call [...]

Country Collection: public function getCountryCollection(){ $countryCollection = Mage::getModel(‘directory/country_api’)->items(); return $countryCollection; } Region Collection: Here You will pass the your country code. public function getRegionCollection($countryCode){ $regionCollection = Mage::getModel(‘directory/region_api’)->items($countryCode); return $regionCollection; }

Shipping Address Details: $addr_entity_id=”Your shipping Address id”; $shippingaddress = Mage::getModel(‘sales/order_address’); $shippingaddress->load($addr_entity_id); $shipaddgetdat =$shippingaddress->getData(); Billing Address Details: $biladdr_entity_id=”Your Billing Address ID”; $billingaddress = Mage::getModel(‘sales/order_address’); $billingaddress->load($biladdr_entity_id); $billaddgetdat =$billingaddress->getData();

$this->_redirect(‘*/*/’,array(‘Websitecat’ =>’assign’));   Here Websitecat is your parameter naem and assign is your value.

Step1–>  You will create you custom module renderer folder the following structure app\code\local\namespace\modulename\Block\Adminhtml\modulename\Edit\Renderer\yourfieldnamefile.php Step2–> If example you want create multiple checkbox on your custom form means you create you file name like as moulenamecheckbox.php Step–>3 then open that php file class namespace_modulename_Block_Adminhtml_modulename_Edit_Renderer_modulenameCheckbox extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface { public function render(Varien_Data_Form_Element_Abstract $element) { $connection = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); [...]