Skip to main content

Posts

Showing posts from April, 2017

How to create Guest Wishlist For Magento

Add to wishlist without customer login Add three tables CREATE TABLE `wishlist` ( `wishlist_id` INT(11) NOT NULL AUTO_INCREMENT, `customer_id` INT(11) NULL DEFAULT NULL, `shared` INT(11) NULL DEFAULT NULL, `sharing_code` VARCHAR(50) NULL DEFAULT NULL, `updated_at` TIMESTAMP NULL DEFAULT NULL, `cookie` VARCHAR(255) NULL DEFAULT NULL, PRIMARY KEY (`wishlist_id`) ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB AUTO_INCREMENT=0 ; CREATE TABLE `wishlist_item` ( `wishlist_item_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Wishlist item ID', `wishlist_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Wishlist ID', `product_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Product ID', `store_id` SMALLINT(5) UNSIGNED NULL DEFAULT NULL COMMENT 'Store ID', `added_at` TIMESTAMP NULL DEFAULT NULL COMMENT 'Add date and time', `description` TEXT NULL COMMENT '

Add Dynamic data on magento admin form

<?php class Ankur_Banners_Block_Adminhtml_Banners_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $form = new Varien_Data_Form(); $this->setForm($form); $fieldset = $form->addFieldset("banners_form", array("legend"=>Mage::helper("banners")->__("Item information"))); $fieldset->addField('lable', 'hidden', array( 'label'     => Mage::helper('megamenu')->__('Add Images'), 'name' => 'label', 'after_element_html' => '<div id="add_more"></div><button id="add" class="add_field_button"  type="button" >Add Images</button>' )); if (Mage::getSingleton("adminhtml/session")->getBannersData()) { $form->setValues(Mage::getSingleton("adm