Step 2: After this line:
Add a line like this:
<li><a href="<?php echo $this->getUrl('contacts')?>"><?php echo $this->__('Contact Us') ?></a></li>
Step 3: Click the Magento cache; System > Cache Management.
Hope it Helps... thanks....
<li><a href="<?php echo $this->getUrl('contacts')?>"><?php echo $this->__('Contact Us') ?></a></li>
<div class="input-box">
<label for="email"><?php echo Mage::helper('contacts')->__('Email') ?> <span class="required">*</span></label>
<input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="required-entry input-text validate-email" type="text" />
</div>
<div class="clear"></div>
<div class="input-box">
<label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
<input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
</div>
<div class="input-box">
<label for="email"><?php echo Mage::helper('contacts')->__('Email') ?> <span class="required">*</span></label>
<input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="required-entry input-text validate-email" type="text" />
</div>
<div class="clear"></div>
<span style="background-color: rgb(255, 255, 0);"><!-- New Field Code-->
<div class="input-box">
<label for="website"><?php echo Mage::helper('contacts')->__('Website') ?></label>
<input name="website" id="website" title="<?php echo Mage::helper('contacts')->__('Website') ?>" value="" class="input-text" type="text" />
</div>
<div class="clear"></div>
<!-- End New Field Code--></span>
<div class="input-box">
<label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
<input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
</div>
$mageFilename = realpath(‘mymagentoshop/app/Mage.php’); require_once( $mageFilename ); umask(0); Mage::app(); Mage::getSingleton(‘core/session’, array(‘name’ => ‘frontend’)); $session = Mage::getSingleton(‘customer/session’); if($session->isLoggedIn()) echo ‘LOGGED IN’; else echo ‘NOT LOGGED IN’;
<config>
<modules>
<Mydons_Customertab>
<version>0.1.0</version>
</Mydons_Customertab>
</modules>
<adminhtml>
<layout>
<updates>
<customertab>
<file>customertab.xml</file>
</customertab>
</updates>
</layout>
</adminhtml>
<global>
<blocks>
<customertab>
<class>Mydons_Customertab_Block</class>
</customertab>
</blocks>
</global>
</config>
<?php
/**
* Adminhtml customer action tab
*
*/
class Mydons_Customertab_Block_Adminhtml_Customer_Edit_Tab_Action
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
public function __construct()
{
$this->setTemplate('customertab/action.phtml');
}
public function getCustomtabInfo(){
$customer = Mage::registry('current_customer');
$customtab='My Custom tab Action Contents Here';
return $customtab;
}
/**
* Return Tab label
*
* @return string
*/
public function getTabLabel()
{
return $this->__('Action Center');
}
/**
* Return Tab title
*
* @return string
*/
public function getTabTitle()
{
return $this->__('Action Tab');
}
/**
* Can show tab in tabs
*
* @return boolean
*/
public function canShowTab()
{
$customer = Mage::registry('current_customer');
return (bool)$customer->getId();
}
/**
* Tab is hidden
*
* @return boolean
*/
public function isHidden()
{
return false;
}
/**
* Defines after which tab, this tab should be rendered
*
* @return string
*/
public function getAfter()
{
return 'tags';
}
}
?>
<layout version="0.1.0">
<adminhtml_customer_edit>
<reference name="customer_edit_tabs">
<action method="addTab"><name>customer_edit_tab_action</name><block>customertab/adminhtml_customer_edit_tab_action</block></action>
</reference>
</adminhtml_customer_edit>
</layout>
<div id="customer_info_tabs_customer_edit_tab_action_content"> <div class="entry-edit"> <div class="entry-edit-head"> <h4 class="icon-head head-edit-form fieldset-legend">Action Tab</h4> </div> <div id="group_fields4" class="fieldset fieldset-wide"> <div class="hor-scroll"> <table class="form-list" cellspacing="0"> <tbody> <tr> <td>Custom Action Tab Contents Here</td> </tr> </tbody> </table> </div> </div> </div> </div>
<config>
<modules>
<Mydons_Customertab>
<active>true</active>
<codepool>local</codepool>
</Mydons_Customertab>
</modules>
</config>
Validation.addAllThese([
['validate-cemail', 'Please make sure your emails match.', function(v) {
var conf = $('confirmation') ? $('confirmation') : $$('.validate-cemail')[0];
var pass = false;
var confirm;
if ($('email')) {
pass = $('email');
}
confirm =conf.value;
if(!confirm && $('email2'))
{
confirm = $('email2').value;
}
return (pass.value == confirm);
}],
]);
<reference name="head">
<action method="addJs"><script>email/validation.js</script></action>
</reference>
<label class="required" for="email_address"><em>*</em>CONFIRM EMAIL</label> <div class="input-box"> <input class="input-text required-entry validate-cemail" title="Email Address" value="" id="email2" name="email2" type="text"> </div>
Mohan Natarajan Powered by Blogger