Version Notes
This is extension to add new fields to customer account pages i.e registration,edit profile, checkout and admin manage customer.
version : 0.1.0
stability : stable
Download this release
Release Info
Developer | Magento Core Team |
Extension | Amar_Profile |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/local/Amar/Profile/Block/Profile.php +4 -0
- app/code/local/Amar/Profile/Helper/Data.php +6 -0
- app/code/local/Amar/Profile/Model/Entity/School.php +29 -0
- app/code/local/Amar/Profile/controllers/IndexController.php +10 -0
- app/code/local/Amar/Profile/etc/config.xml +105 -0
- app/code/local/Amar/Profile/sql/profile_setup/mysql4-install-0.1.0.php +44 -0
- app/design/frontend/default/default/layout/profile.xml +20 -0
- app/design/frontend/default/default/template/profile/customer/form/edit.phtml +104 -0
- app/design/frontend/default/default/template/profile/persistent/checkout/onepage/billing.phtml +215 -0
- app/design/frontend/default/default/template/profile/persistent/customer/form/register.phtml +171 -0
- app/etc/modules/Amar_Profile.xml +9 -0
- package.xml +24 -0
app/code/local/Amar/Profile/Block/Profile.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Amar_Profile_Block_Profile extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
}
|
app/code/local/Amar/Profile/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Amar_Profile_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/local/Amar/Profile/Model/Entity/School.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Amar_Profile_Model_Entity_School extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
|
3 |
+
{
|
4 |
+
public function getAllOptions()
|
5 |
+
{
|
6 |
+
if ($this->_options === null) {
|
7 |
+
$this->_options = array();
|
8 |
+
$this->_options[] = array(
|
9 |
+
'value' => '',
|
10 |
+
'label' => 'Choose Option..'
|
11 |
+
);
|
12 |
+
$this->_options[] = array(
|
13 |
+
'value' => 1,
|
14 |
+
'label' => 'School1'
|
15 |
+
);
|
16 |
+
$this->_options[] = array(
|
17 |
+
'value' => 2,
|
18 |
+
'label' => 'School2'
|
19 |
+
);
|
20 |
+
$this->_options[] = array(
|
21 |
+
'value' => 3,
|
22 |
+
'label' => 'School3'
|
23 |
+
);
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
return $this->_options;
|
28 |
+
}
|
29 |
+
}
|
app/code/local/Amar/Profile/controllers/IndexController.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Amar_Profile_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
|
7 |
+
$this->loadLayout();
|
8 |
+
$this->renderLayout();
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Amar/Profile/etc/config.xml
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Amar_Profile>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Amar_Profile>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<profile>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Amar_Profile</module>
|
14 |
+
<frontName>profile</frontName>
|
15 |
+
</args>
|
16 |
+
</profile>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<profile>
|
21 |
+
<file>profile.xml</file>
|
22 |
+
</profile>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<profile>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Amar_Profile</module>
|
32 |
+
<frontName>profile</frontName>
|
33 |
+
</args>
|
34 |
+
</profile>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<global>
|
38 |
+
<fieldsets>
|
39 |
+
<checkout_onepage_quote>
|
40 |
+
<customer_school>
|
41 |
+
<to_customer>school</to_customer>
|
42 |
+
</customer_school>
|
43 |
+
</checkout_onepage_quote>
|
44 |
+
<customer_account>
|
45 |
+
<school>
|
46 |
+
<to_quote>customer_school</to_quote>
|
47 |
+
</school>
|
48 |
+
</customer_account>
|
49 |
+
</fieldsets>
|
50 |
+
</global>
|
51 |
+
<global>
|
52 |
+
<fieldsets>
|
53 |
+
<customer_account>
|
54 |
+
<school><create>1</create><update>1</update><name>1</name></school>
|
55 |
+
</customer_account>
|
56 |
+
</fieldsets>
|
57 |
+
</global>
|
58 |
+
<global>
|
59 |
+
<models>
|
60 |
+
<profile>
|
61 |
+
<class>Amar_Profile_Model</class>
|
62 |
+
<resourceModel>profile_mysql4</resourceModel>
|
63 |
+
</profile>
|
64 |
+
<profile_mysql4>
|
65 |
+
<class>Amar_Profile_Model_Mysql4</class>
|
66 |
+
<entities>
|
67 |
+
<profile>
|
68 |
+
<table>profile</table>
|
69 |
+
</profile>
|
70 |
+
</entities>
|
71 |
+
</profile_mysql4>
|
72 |
+
</models>
|
73 |
+
<resources>
|
74 |
+
<profile_setup>
|
75 |
+
<setup>
|
76 |
+
<module>Amar_Profile</module>
|
77 |
+
<class>Mage_Customer_Model_Entity_Setup</class>
|
78 |
+
</setup>
|
79 |
+
<connection>
|
80 |
+
<use>core_setup</use>
|
81 |
+
</connection>
|
82 |
+
</profile_setup>
|
83 |
+
<profile_write>
|
84 |
+
<connection>
|
85 |
+
<use>core_write</use>
|
86 |
+
</connection>
|
87 |
+
</profile_write>
|
88 |
+
<profile_read>
|
89 |
+
<connection>
|
90 |
+
<use>core_read</use>
|
91 |
+
</connection>
|
92 |
+
</profile_read>
|
93 |
+
</resources>
|
94 |
+
<blocks>
|
95 |
+
<profile>
|
96 |
+
<class>Amar_Profile_Block</class>
|
97 |
+
</profile>
|
98 |
+
</blocks>
|
99 |
+
<helpers>
|
100 |
+
<profile>
|
101 |
+
<class>Amar_Profile_Helper</class>
|
102 |
+
</profile>
|
103 |
+
</helpers>
|
104 |
+
</global>
|
105 |
+
</config>
|
app/code/local/Amar/Profile/sql/profile_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$setup = Mage::getModel('customer/entity_setup', 'core_setup');
|
7 |
+
$setup->addAttribute('customer', 'school', array(
|
8 |
+
'type' => 'int',
|
9 |
+
'input' => 'select',
|
10 |
+
'label' => 'School',
|
11 |
+
'global' => 1,
|
12 |
+
'visible' => 1,
|
13 |
+
'required' => 0,
|
14 |
+
'user_defined' => 1,
|
15 |
+
'default' => '0',
|
16 |
+
'visible_on_front' => 1,
|
17 |
+
'source' => 'profile/entity_school',
|
18 |
+
));
|
19 |
+
|
20 |
+
|
21 |
+
if (version_compare(Mage::getVersion(), '1.6.0', '<='))
|
22 |
+
{
|
23 |
+
$customer = Mage::getModel('customer/customer');
|
24 |
+
$attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
|
25 |
+
$setup->addAttributeToSet('customer', $attrSetId, 'General', 'school');
|
26 |
+
}
|
27 |
+
|
28 |
+
if (version_compare(Mage::getVersion(), '1.4.2', '>='))
|
29 |
+
{
|
30 |
+
Mage::getSingleton('eav/config')
|
31 |
+
->getAttribute('customer', 'school')
|
32 |
+
->setData('used_in_forms', array('adminhtml_customer','customer_account_create','customer_account_edit','checkout_register'))
|
33 |
+
->save();
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
$tablequote = $this->getTable('sales/quote');
|
38 |
+
$installer->run("
|
39 |
+
ALTER TABLE $tablequote ADD `customer_school` INT NOT NULL
|
40 |
+
");
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/design/frontend/default/default/layout/profile.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
</default>
|
5 |
+
<customer_account_create>
|
6 |
+
<reference name="customer_form_register">
|
7 |
+
<action method="setTemplate"><template>profile/persistent/customer/form/register.phtml</template></action>
|
8 |
+
</reference>
|
9 |
+
</customer_account_create>
|
10 |
+
<customer_account_edit>
|
11 |
+
<reference name='customer_edit'>
|
12 |
+
<action method="setTemplate"><template>profile/customer/form/edit.phtml</template></action>
|
13 |
+
</reference>
|
14 |
+
</customer_account_edit>
|
15 |
+
<checkout_onepage_index>
|
16 |
+
<reference name="checkout.onepage.billing">
|
17 |
+
<action method="setTemplate"><template>profile/persistent/checkout/onepage/billing.phtml</template></action>
|
18 |
+
</reference>
|
19 |
+
</checkout_onepage_index>
|
20 |
+
</layout>
|
app/design/frontend/default/default/template/profile/customer/form/edit.phtml
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="page-title">
|
2 |
+
<h1><?php echo $this->__('Edit Account Information') ?></h1>
|
3 |
+
</div>
|
4 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
5 |
+
<form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate">
|
6 |
+
<div class="fieldset">
|
7 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
8 |
+
<h2 class="legend"><?php echo $this->__('Account Information') ?></h2>
|
9 |
+
<ul class="form-list">
|
10 |
+
<li class="fields">
|
11 |
+
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
|
12 |
+
</li>
|
13 |
+
<li>
|
14 |
+
<label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
15 |
+
<div class="input-box">
|
16 |
+
<input type="text" name="email" id="email" value="<?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
|
17 |
+
</div>
|
18 |
+
</li>
|
19 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
20 |
+
<?php if ($_dob->isEnabled()): ?>
|
21 |
+
<li><?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?></li>
|
22 |
+
<?php endif ?>
|
23 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
24 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
25 |
+
<li><?php echo $_taxvat->setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?></li>
|
26 |
+
<?php endif ?>
|
27 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
28 |
+
<?php if ($_gender->isEnabled()): ?>
|
29 |
+
<li><?php echo $_gender->setGender($this->getCustomer()->getGender())->toHtml() ?></li>
|
30 |
+
<?php endif ?>
|
31 |
+
<li class="control">
|
32 |
+
<input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change_password"><?php echo $this->__('Change Password') ?></label>
|
33 |
+
</li>
|
34 |
+
<li>
|
35 |
+
<?php
|
36 |
+
$attribute = Mage::getModel('eav/config')->getAttribute('customer','school');
|
37 |
+
?>
|
38 |
+
<label for="is_active" class="<?php if($attribute->getIsRequired() == true){?>required<?php } ?>"><?php if($attribute->getIsRequired() == true){?><em>*</em><?php } ?><?php echo $this->__('School') ?></label>
|
39 |
+
<div class="input-box">
|
40 |
+
<select name="school" id="school" class="<?php if($attribute->getIsRequired() == true){?>required-entry<?php } ?>">
|
41 |
+
<?php
|
42 |
+
$options = $attribute->getSource()->getAllOptions();
|
43 |
+
foreach($options as $option){
|
44 |
+
?>
|
45 |
+
<option value='<?php echo $option['value']?>' <?php if($this->getCustomer()->getSchool() == $option['value']){ echo 'selected="selected"';}?>><?php echo $this->__($option['label'])?></option>
|
46 |
+
<?php } ?>
|
47 |
+
</select>
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
</ul>
|
51 |
+
</div>
|
52 |
+
<div class="fieldset" style="display:none;">
|
53 |
+
<h2 class="legend"><?php echo $this->__('Change Password') ?></h2>
|
54 |
+
<ul class="form-list">
|
55 |
+
<li>
|
56 |
+
<label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
|
57 |
+
<div class="input-box">
|
58 |
+
<input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
|
59 |
+
</div>
|
60 |
+
</li>
|
61 |
+
<li class="fields">
|
62 |
+
<div class="field">
|
63 |
+
<label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
|
64 |
+
<div class="input-box">
|
65 |
+
<input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text validate-password" name="password" id="password" />
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<div class="field">
|
69 |
+
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
|
70 |
+
<div class="input-box">
|
71 |
+
<input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text validate-cpassword" name="confirmation" id="confirmation" />
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
</li>
|
75 |
+
</ul>
|
76 |
+
</div>
|
77 |
+
<div class="buttons-set">
|
78 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
79 |
+
<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
80 |
+
<button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
|
81 |
+
</div>
|
82 |
+
</form>
|
83 |
+
<script type="text/javascript">
|
84 |
+
//<![CDATA[
|
85 |
+
var dataForm = new VarienForm('form-validate', true);
|
86 |
+
function setPasswordForm(arg){
|
87 |
+
if(arg){
|
88 |
+
$('current_password').up(3).show();
|
89 |
+
$('current_password').addClassName('required-entry');
|
90 |
+
$('password').addClassName('required-entry');
|
91 |
+
$('confirmation').addClassName('required-entry');
|
92 |
+
|
93 |
+
}else{
|
94 |
+
$('current_password').up(3).hide();
|
95 |
+
$('current_password').removeClassName('required-entry');
|
96 |
+
$('password').removeClassName('required-entry');
|
97 |
+
$('confirmation').removeClassName('required-entry');
|
98 |
+
}
|
99 |
+
}
|
100 |
+
<?php if($this->getCustomer()->getChangePassword()): ?>
|
101 |
+
setPasswordForm(true);
|
102 |
+
<?php endif; ?>
|
103 |
+
//]]>
|
104 |
+
</script>
|
app/design/frontend/default/default/template/profile/persistent/checkout/onepage/billing.phtml
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<form id="co-billing-form" action="">
|
2 |
+
<fieldset>
|
3 |
+
<ul class="form-list">
|
4 |
+
<?php if ($this->customerHasAddresses()): ?>
|
5 |
+
<li class="wide">
|
6 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
7 |
+
<div class="input-box">
|
8 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
9 |
+
</div>
|
10 |
+
</li>
|
11 |
+
<?php endif; ?>
|
12 |
+
<li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
|
13 |
+
<fieldset>
|
14 |
+
<input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
|
15 |
+
<ul>
|
16 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
|
17 |
+
<li class="fields">
|
18 |
+
<div class="field">
|
19 |
+
<label for="billing:company"><?php echo $this->__('Company') ?></label>
|
20 |
+
<div class="input-box">
|
21 |
+
<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
25 |
+
<div class="field">
|
26 |
+
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
27 |
+
<div class="input-box">
|
28 |
+
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
<?php endif ?>
|
32 |
+
</li>
|
33 |
+
<li class="wide">
|
34 |
+
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
35 |
+
<div class="input-box">
|
36 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
|
37 |
+
</div>
|
38 |
+
</li>
|
39 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
40 |
+
<li class="wide">
|
41 |
+
<div class="input-box">
|
42 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
|
43 |
+
</div>
|
44 |
+
</li>
|
45 |
+
<?php endfor ?>
|
46 |
+
<li class="fields">
|
47 |
+
<div class="field">
|
48 |
+
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
49 |
+
<div class="input-box">
|
50 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="billing:city" />
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div class="field">
|
54 |
+
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
55 |
+
<div class="input-box">
|
56 |
+
<select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
57 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
58 |
+
</select>
|
59 |
+
<script type="text/javascript">
|
60 |
+
//<![CDATA[
|
61 |
+
$('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
62 |
+
//]]>
|
63 |
+
</script>
|
64 |
+
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</li>
|
68 |
+
<li class="fields">
|
69 |
+
<div class="field">
|
70 |
+
<label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
71 |
+
<div class="input-box">
|
72 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" />
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
<div class="field">
|
76 |
+
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
77 |
+
<div class="input-box">
|
78 |
+
<?php echo $this->getCountryHtmlSelect('billing') ?>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
</li>
|
82 |
+
<li class="fields">
|
83 |
+
<div class="field">
|
84 |
+
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
85 |
+
<div class="input-box">
|
86 |
+
<input type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="billing:telephone" />
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div class="field">
|
90 |
+
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
|
91 |
+
<div class="input-box">
|
92 |
+
<input type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="billing:fax" />
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</li>
|
96 |
+
|
97 |
+
|
98 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
99 |
+
|
100 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
101 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
102 |
+
<?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
|
103 |
+
<li class="fields">
|
104 |
+
<?php if ($_dob->isEnabled()): ?>
|
105 |
+
<div class="field">
|
106 |
+
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
107 |
+
</div>
|
108 |
+
<?php endif; ?>
|
109 |
+
<?php if ($_gender->isEnabled()): ?>
|
110 |
+
<div class="field">
|
111 |
+
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
112 |
+
</div>
|
113 |
+
<?php endif ?>
|
114 |
+
</li>
|
115 |
+
<?php endif ?>
|
116 |
+
|
117 |
+
<?php if ($this->isTaxvatEnabled()):?>
|
118 |
+
<li><?php echo $this->getTaxvatHtml() ?></li>
|
119 |
+
<?php endif; ?>
|
120 |
+
|
121 |
+
<li>
|
122 |
+
<?php
|
123 |
+
$attribute = Mage::getModel('eav/config')->getAttribute('customer','school');
|
124 |
+
?>
|
125 |
+
<label for="school" class="<?php if($attribute->getIsRequired() == true){?>required<?php } ?>"><?php if($attribute->getIsRequired() == true){?><em>*</em><?php } ?><?php echo $this->__('School') ?></label>
|
126 |
+
<div class="input-box">
|
127 |
+
<select name="billing[school]" id="school" class="<?php if($attribute->getIsRequired() == true){?>required-entry<?php } ?>">
|
128 |
+
<?php
|
129 |
+
$options = $attribute->getSource()->getAllOptions();
|
130 |
+
foreach($options as $option){
|
131 |
+
?>
|
132 |
+
<option value='<?php echo $option['value']?>'><?php echo $this->__($option['label'])?></option>
|
133 |
+
<?php } ?>
|
134 |
+
</select>
|
135 |
+
</div>
|
136 |
+
</li>
|
137 |
+
|
138 |
+
<li class="fields" id="register-customer-password">
|
139 |
+
<div class="field">
|
140 |
+
<label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
141 |
+
<div class="input-box">
|
142 |
+
<input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
<div class="field">
|
146 |
+
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
147 |
+
<div class="input-box">
|
148 |
+
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</li>
|
152 |
+
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
153 |
+
<?php endif; ?>
|
154 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
155 |
+
<li class="control">
|
156 |
+
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
157 |
+
</li>
|
158 |
+
<?php else:?>
|
159 |
+
<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
|
160 |
+
<?php endif; ?>
|
161 |
+
</ul>
|
162 |
+
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
163 |
+
</fieldset>
|
164 |
+
</li>
|
165 |
+
<li class="fields">
|
166 |
+
<div class="field">
|
167 |
+
<label for="billing:ssn" class="required"><em>*</em><?php echo $this->__('SSN') ?></label>
|
168 |
+
<div class="input-box">
|
169 |
+
<input type="text" name="custom[ssn]" value="<?php echo $this->htmlEscape($this->getQuote()->getSsn()) ?>" title="<?php echo $this->__('SSN') ?>" class="input-text required-entry" id="billing:ssn" />
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
|
173 |
+
</li>
|
174 |
+
<?php if ($this->canShip()): ?>
|
175 |
+
<li class="control">
|
176 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
|
177 |
+
<li class="control">
|
178 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
|
179 |
+
</li>
|
180 |
+
<?php endif; ?>
|
181 |
+
</ul>
|
182 |
+
<?php if (!$this->canShip()): ?>
|
183 |
+
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
184 |
+
<?php endif; ?>
|
185 |
+
<div class="buttons-set" id="billing-buttons-container">
|
186 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
187 |
+
<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
188 |
+
<span class="please-wait" id="billing-please-wait" style="display:none;">
|
189 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
190 |
+
</span>
|
191 |
+
</div>
|
192 |
+
</fieldset>
|
193 |
+
</form>
|
194 |
+
<script type="text/javascript">
|
195 |
+
//<![CDATA[
|
196 |
+
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
197 |
+
var billingForm = new VarienForm('co-billing-form');
|
198 |
+
|
199 |
+
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
200 |
+
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
201 |
+
|
202 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
|
203 |
+
Event.observe($('onepage-guest-register-button'), 'click', function(event) {
|
204 |
+
var billingRememberMe = $$('#billing-new-address-form li #remember-me-box');
|
205 |
+
if(billingRememberMe.length > 0) {
|
206 |
+
billingRememberMe = $(billingRememberMe[0].parentNode);
|
207 |
+
if ($('login:guest') && $('login:guest').checked) {
|
208 |
+
billingRememberMe.hide();
|
209 |
+
} else if ($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) {
|
210 |
+
billingRememberMe.show();
|
211 |
+
}
|
212 |
+
}
|
213 |
+
})
|
214 |
+
//]]>
|
215 |
+
</script>
|
app/design/frontend/default/default/template/profile/persistent/customer/form/register.phtml
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="account-create">
|
2 |
+
<div class="page-title">
|
3 |
+
<h1><?php echo $this->__('Create an Account') ?></h1>
|
4 |
+
</div>
|
5 |
+
<?php echo $this->getChildHtml('form_fields_before')?>
|
6 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
7 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
|
8 |
+
<div class="fieldset">
|
9 |
+
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
|
10 |
+
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
|
11 |
+
<h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
|
12 |
+
<ul class="form-list">
|
13 |
+
<li class="fields">
|
14 |
+
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
|
15 |
+
</li>
|
16 |
+
<li>
|
17 |
+
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
18 |
+
<div class="input-box">
|
19 |
+
<input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
20 |
+
</div>
|
21 |
+
</li>
|
22 |
+
<?php if ($this->isNewsletterEnabled()): ?>
|
23 |
+
<li class="control">
|
24 |
+
<div class="input-box">
|
25 |
+
<input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
|
26 |
+
</div>
|
27 |
+
<label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
|
28 |
+
</li>
|
29 |
+
<?php endif ?>
|
30 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
31 |
+
<?php if ($_dob->isEnabled()): ?>
|
32 |
+
<li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
|
33 |
+
<?php endif ?>
|
34 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
35 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
36 |
+
<li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
|
37 |
+
<?php endif ?>
|
38 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
39 |
+
<?php if ($_gender->isEnabled()): ?>
|
40 |
+
<li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
|
41 |
+
<?php endif ?>
|
42 |
+
<li>
|
43 |
+
<?php
|
44 |
+
$attribute = Mage::getModel('eav/config')->getAttribute('customer','school');
|
45 |
+
?>
|
46 |
+
<label for="school" class="<?php if($attribute->getIsRequired() == true){?>required<?php } ?>"><?php if($attribute->getIsRequired() == true){?><em>*</em><?php } ?><?php echo $this->__('School') ?></label>
|
47 |
+
<div class="input-box">
|
48 |
+
<select name="school" id="school" class="<?php if($attribute->getIsRequired() == true){?>required-entry<?php } ?>">
|
49 |
+
<?php
|
50 |
+
$options = $attribute->getSource()->getAllOptions();
|
51 |
+
foreach($options as $option){
|
52 |
+
?>
|
53 |
+
<option value='<?php echo $option['value']?>' <?php if($this->getFormData()->getSchool() == $option['value']){ echo 'selected="selected"';}?>><?php echo $this->__($option['label'])?></option>
|
54 |
+
<?php } ?>
|
55 |
+
</select>
|
56 |
+
</div>
|
57 |
+
</li>
|
58 |
+
</ul>
|
59 |
+
</div>
|
60 |
+
<?php if($this->getShowAddressFields()): ?>
|
61 |
+
<div class="fieldset">
|
62 |
+
<input type="hidden" name="create_address" value="1" />
|
63 |
+
<h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
|
64 |
+
<ul class="form-list">
|
65 |
+
<li class="fields">
|
66 |
+
<div class="field">
|
67 |
+
<label for="company"><?php echo $this->__('Company') ?></label>
|
68 |
+
<div class="input-box">
|
69 |
+
<input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
<div class="field">
|
73 |
+
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
74 |
+
<div class="input-box">
|
75 |
+
<input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
</li>
|
79 |
+
<li class="wide">
|
80 |
+
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
|
81 |
+
<div class="input-box">
|
82 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
|
83 |
+
</div>
|
84 |
+
</li>
|
85 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
86 |
+
<li class="wide">
|
87 |
+
<div class="input-box">
|
88 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
|
89 |
+
</div>
|
90 |
+
</li>
|
91 |
+
<?php endfor ?>
|
92 |
+
<li class="fields">
|
93 |
+
<div class="field">
|
94 |
+
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
95 |
+
<div class="input-box">
|
96 |
+
<input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
<div class="field">
|
100 |
+
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
101 |
+
<div class="input-box">
|
102 |
+
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
103 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
104 |
+
</select>
|
105 |
+
<script type="text/javascript">
|
106 |
+
//<![CDATA[
|
107 |
+
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
108 |
+
//]]>
|
109 |
+
</script>
|
110 |
+
<input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</li>
|
114 |
+
<li class="fields">
|
115 |
+
<div class="field">
|
116 |
+
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
117 |
+
<div class="input-box">
|
118 |
+
<input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
<div class="field">
|
122 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
123 |
+
<div class="input-box">
|
124 |
+
<?php echo $this->getCountryHtmlSelect() ?>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</li>
|
128 |
+
</ul>
|
129 |
+
<input type="hidden" name="default_billing" value="1" />
|
130 |
+
<input type="hidden" name="default_shipping" value="1" />
|
131 |
+
</div>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="fieldset">
|
134 |
+
<h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
|
135 |
+
<ul class="form-list">
|
136 |
+
<li class="fields">
|
137 |
+
<div class="field">
|
138 |
+
<label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
139 |
+
<div class="input-box">
|
140 |
+
<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
<div class="field">
|
144 |
+
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
145 |
+
<div class="input-box">
|
146 |
+
<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
</li>
|
150 |
+
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
151 |
+
</ul>
|
152 |
+
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
153 |
+
</div>
|
154 |
+
<div class="buttons-set">
|
155 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
156 |
+
<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
157 |
+
<button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
|
158 |
+
</div>
|
159 |
+
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
|
160 |
+
<input name="context" type="hidden" value="checkout" />
|
161 |
+
<?php endif; ?>
|
162 |
+
</form>
|
163 |
+
<script type="text/javascript">
|
164 |
+
//<![CDATA[
|
165 |
+
var dataForm = new VarienForm('form-validate', true);
|
166 |
+
<?php if($this->getShowAddressFields()): ?>
|
167 |
+
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
|
168 |
+
<?php endif; ?>
|
169 |
+
//]]>
|
170 |
+
</script>
|
171 |
+
</div>
|
app/etc/modules/Amar_Profile.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Amar_Profile>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Amar_Profile>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Amar_Profile</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>This is extension to add new fields to customer account pages.</summary>
|
10 |
+
<description>This is extension to add new fields to customer account pages i.e registration,edit profile, checkout and admin manage customer.
|
11 |
+

|
12 |
+
version : 0.1.0
|
13 |
+
stability : stable</description>
|
14 |
+
<notes>This is extension to add new fields to customer account pages i.e registration,edit profile, checkout and admin manage customer.
|
15 |
+

|
16 |
+
version : 0.1.0
|
17 |
+
stability : stable</notes>
|
18 |
+
<authors><author><name>Chirag</name><user>auto-converted</user><email>info@amarinfotech.com</email></author></authors>
|
19 |
+
<date>2012-07-04</date>
|
20 |
+
<time>10:23:09</time>
|
21 |
+
<contents><target name="magelocal"><dir name="Amar"><dir name="Profile"><dir name="Block"><file name="Profile.php" hash="f64035ee37649dd45ad77720cc8226db"/></dir><dir name="Helper"><file name="Data.php" hash="da3cf1e92e2444417475cfea8d6341ac"/></dir><dir name="Model"><dir name="Entity"><file name="School.php" hash="c1641144aaef0390915f8671584e5f8e"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="84f1bc97bba2242ed1319b4315ea62ff"/></dir><dir name="etc"><file name="config.xml" hash="0b54ad52e507a5238c01afe38373c438"/></dir><dir name="sql"><dir name="profile_setup"><file name="mysql4-install-0.1.0.php" hash="ba93987c41e326ae38c26f42204fd18f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="profile"><dir name="customer"><dir name="form"><file name="edit.phtml" hash="9d2e737eca300810b5615b943da62321"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="b54846854877bfcadcfeaafba3925d57"/></dir></dir><dir name="customer"><dir name="form"><file name="register.phtml" hash="7c71b0c8518c40320aafc1eafc59ced6"/></dir></dir></dir></dir></dir><dir name="layout"><file name="profile.xml" hash="273fd1631aadf27966292be5068b219c"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amar_Profile.xml" hash="437354baf6756c1ae88ee3cf10826748"/></dir></target></contents>
|
22 |
+
<compatible/>
|
23 |
+
<dependencies/>
|
24 |
+
</package>
|