Checkout_Custom - Version 0.1.0

Version Notes

stable

Download this release

Release Info

Developer Magento Core Team
Extension Checkout_Custom
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

Files changed (25) hide show
  1. app/code/local/Magentojack/Custom/Block/Adminhtml/Custom/Order.php +7 -0
  2. app/code/local/Magentojack/Custom/Block/Custom/Order.php +11 -0
  3. app/code/local/Magentojack/Custom/Helper/Data.php +6 -0
  4. app/code/local/Magentojack/Custom/Model/Custom/Order.php +14 -0
  5. app/code/local/Magentojack/Custom/Model/Custom/Quote.php +14 -0
  6. app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Order.php +27 -0
  7. app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Order/Collection.php +10 -0
  8. app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Quote.php +27 -0
  9. app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Quote/Collection.php +10 -0
  10. app/code/local/Magentojack/Custom/Model/Observer.php +58 -0
  11. app/code/local/Magentojack/Custom/Model/Sales/Order.php +16 -0
  12. app/code/local/Magentojack/Custom/controllers/IndexController.php +47 -0
  13. app/code/local/Magentojack/Custom/etc/config.xml +147 -0
  14. app/code/local/Magentojack/Custom/sql/custom_setup/mysql4-install-0.1.0.php +27 -0
  15. app/design/adminhtml/default/default/layout/custom.xml +11 -0
  16. app/design/adminhtml/default/default/template/custom/order.phtml +22 -0
  17. app/design/adminhtml/default/default/template/custom/sales/order/info.phtml +2 -0
  18. app/design/adminhtml/default/default/template/custom/sales/order/view/tab/info.phtml +108 -0
  19. app/design/frontend/default/default/layout/custom.xml +8 -0
  20. app/design/frontend/default/default/template/custom/order.phtml +19 -0
  21. app/design/frontend/default/default/template/custom/sales/order/view.phtml +92 -0
  22. app/etc/modules/Magentojack_Custom.xml +9 -0
  23. app/locale/en_US/template/email/sales/order_new.html +126 -0
  24. app/locale/en_US/template/email/sales/order_new_guest.html +125 -0
  25. package.xml +18 -0
app/code/local/Magentojack/Custom/Block/Adminhtml/Custom/Order.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Block_Adminhtml_Custom_Order extends Mage_Adminhtml_Block_Sales_Order_Abstract{
3
+ public function getCustomVars(){
4
+ $model = Mage::getModel('custom/custom_order');
5
+ return $model->getByOrder($this->getOrder()->getId());
6
+ }
7
+ }
app/code/local/Magentojack/Custom/Block/Custom/Order.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Block_Custom_Order extends Mage_Core_Block_Template{
3
+ public function getCustomVars(){
4
+ $model = Mage::getModel('custom/custom_order');
5
+ return $model->getByOrder($this->getOrder()->getId());
6
+ }
7
+ public function getOrder()
8
+ {
9
+ return Mage::registry('current_order');
10
+ }
11
+ }
app/code/local/Magentojack/Custom/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magentojack_Custom_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Magentojack/Custom/Model/Custom/Order.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Model_Custom_Order extends Mage_Core_Model_Abstract{
3
+ public function _construct()
4
+ {
5
+ parent::_construct();
6
+ $this->_init('custom/custom_order');
7
+ }
8
+ public function deleteByOrder($order_id,$var){
9
+ $this->_getResource()->deteleByOrder($order_id,$var);
10
+ }
11
+ public function getByOrder($order_id,$var = ''){
12
+ return $this->_getResource()->getByOrder($order_id,$var);
13
+ }
14
+ }
app/code/local/Magentojack/Custom/Model/Custom/Quote.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Model_Custom_Quote extends Mage_Core_Model_Abstract{
3
+ public function _construct()
4
+ {
5
+ parent::_construct();
6
+ $this->_init('custom/custom_quote');
7
+ }
8
+ public function deteleByQuote($quote_id,$var){
9
+ $this->_getResource()->deteleByQuote($quote_id,$var);
10
+ }
11
+ public function getByQuote($quote_id,$var = ''){
12
+ return $this->_getResource()->getByQuote($quote_id,$var);
13
+ }
14
+ }
app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Order.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Model_Mysql4_Custom_Order extends Mage_Core_Model_Mysql4_Abstract{
3
+ public function _construct()
4
+ {
5
+ $this->_init('custom/custom_order', 'id');
6
+ }
7
+ public function deteleByOrder($order_id,$var){
8
+ $table = $this->getMainTable();
9
+ $where = $this->_getWriteAdapter()->quoteInto('order_id = ? AND ', $order_id)
10
+ .$this->_getWriteAdapter()->quoteInto('`key` = ? ', $var);
11
+ $this->_getWriteAdapter()->delete($table,$where);
12
+ }
13
+ public function getByOrder($order_id,$var = ''){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto('order_id = ?', $order_id);
16
+ if(!empty($var)){
17
+ $where .= $this->_getReadAdapter()->quoteInto(' AND `key` = ? ', $var);
18
+ }
19
+ $sql = $this->_getReadAdapter()->select()->from($table)->where($where);
20
+ $rows = $this->_getReadAdapter()->fetchAll($sql);
21
+ $return = array();
22
+ foreach($rows as $row){
23
+ $return[$row['key']] = $row['value'];
24
+ }
25
+ return $return;
26
+ }
27
+ }
app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Order/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magentojack_Custom_Model_Mysql4_Custom_Order_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('custom/custom_order');
9
+ }
10
+ }
app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Quote.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Model_Mysql4_Custom_Quote extends Mage_Core_Model_Mysql4_Abstract{
3
+ public function _construct()
4
+ {
5
+ $this->_init('custom/custom_quote', 'id');
6
+ }
7
+ public function deteleByQuote($quote_id,$var){
8
+ $table = $this->getMainTable();
9
+ $where = $this->_getWriteAdapter()->quoteInto('quote_id = ? AND ', $quote_id)
10
+ .$this->_getWriteAdapter()->quoteInto('`key` = ? ', $var);
11
+ $this->_getWriteAdapter()->delete($table,$where);
12
+ }
13
+ public function getByQuote($quote_id,$var = ''){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto('quote_id = ?', $quote_id);
16
+ if(!empty($var)){
17
+ $where .= $this->_getReadAdapter()->quoteInto(' AND `key` = ? ', $var);
18
+ }
19
+ $sql = $this->_getReadAdapter()->select()->from($table)->where($where);
20
+ $rows = $this->_getReadAdapter()->fetchAll($sql);
21
+ $return = array();
22
+ foreach($rows as $row){
23
+ $return[$row['key']] = $row['value'];
24
+ }
25
+ return $return;
26
+ }
27
+ }
app/code/local/Magentojack/Custom/Model/Mysql4/Custom/Quote/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magentojack_Custom_Model_Mysql4_Custom_Quote_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('custom/custom_quote');
9
+ }
10
+ }
app/code/local/Magentojack/Custom/Model/Observer.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Model_Observer{
3
+ public function saveQuoteBefore($evt){
4
+ $quote = $evt->getQuote();
5
+ $post = Mage::app()->getFrontController()->getRequest()->getPost();
6
+ if(isset($post['custom']['ssn'])){
7
+ $var = $post['custom']['ssn'];
8
+ $quote->setSsn($var);
9
+ }
10
+ }
11
+ public function saveQuoteAfter($evt){
12
+ $quote = $evt->getQuote();
13
+ if($quote->getSsn()){
14
+ $var = $quote->getSsn();
15
+ if(!empty($var)){
16
+ $model = Mage::getModel('custom/custom_quote');
17
+ $model->deteleByQuote($quote->getId(),'ssn');
18
+ $model->setQuoteId($quote->getId());
19
+ $model->setKey('ssn');
20
+ $model->setValue($var);
21
+ $model->save();
22
+ }
23
+ }
24
+ }
25
+ public function loadQuoteAfter($evt){
26
+ $quote = $evt->getQuote();
27
+ $model = Mage::getModel('custom/custom_quote');
28
+ $data = $model->getByQuote($quote->getId());
29
+ foreach($data as $key => $value){
30
+ $quote->setData($key,$value);
31
+ }
32
+ }
33
+ public function saveOrderAfter($evt){
34
+ $order = $evt->getOrder();
35
+ $quote = $evt->getQuote();
36
+ if($quote->getSsn()){
37
+ $var = $quote->getSsn();
38
+ if(!empty($var)){
39
+ $model = Mage::getModel('custom/custom_order');
40
+ $model->deleteByOrder($order->getId(),'ssn');
41
+ $model->setOrderId($order->getId());
42
+ $model->setKey('ssn');
43
+ $model->setValue($var);
44
+ $order->setSsn($var);
45
+ $model->save();
46
+ }
47
+ }
48
+ }
49
+ public function loadOrderAfter($evt){
50
+ $order = $evt->getOrder();
51
+ $model = Mage::getModel('custom/custom_order');
52
+ $data = $model->getByOrder($order->getId());
53
+ foreach($data as $key => $value){
54
+ $order->setData($key,$value);
55
+ }
56
+ }
57
+
58
+ }
app/code/local/Magentojack/Custom/Model/Sales/Order.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_Model_Sales_Order extends Mage_Sales_Model_Order{
3
+ public function hasCustomFields(){
4
+ $var = $this->getSsn();
5
+ if($var && !empty($var)){
6
+ return true;
7
+ }else{
8
+ return false;
9
+ }
10
+ }
11
+ public function getFieldHtml(){
12
+ $var = $this->getSsn();
13
+ $html = '<b>SSN:</b>'.$var.'<br/>';
14
+ return $html;
15
+ }
16
+ }
app/code/local/Magentojack/Custom/controllers/IndexController.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magentojack_Custom_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+
7
+ /*
8
+ * Load an object by id
9
+ * Request looking like:
10
+ * http://site.com/custom?id=15
11
+ * or
12
+ * http://site.com/custom/id/15
13
+ */
14
+ /*
15
+ $custom_id = $this->getRequest()->getParam('id');
16
+
17
+ if($custom_id != null && $custom_id != '') {
18
+ $custom = Mage::getModel('custom/custom')->load($custom_id)->getData();
19
+ } else {
20
+ $custom = null;
21
+ }
22
+ */
23
+
24
+ /*
25
+ * If no param we load a the last created item
26
+ */
27
+ /*
28
+ if($custom == null) {
29
+ $resource = Mage::getSingleton('core/resource');
30
+ $read= $resource->getConnection('core_read');
31
+ $customTable = $resource->getTableName('custom');
32
+
33
+ $select = $read->select()
34
+ ->from($customTable,array('custom_id','title','content','status'))
35
+ ->where('status',1)
36
+ ->order('created_time DESC') ;
37
+
38
+ $custom = $read->fetchRow($select);
39
+ }
40
+ Mage::register('custom', $custom);
41
+ */
42
+
43
+
44
+ $this->loadLayout();
45
+ $this->renderLayout();
46
+ }
47
+ }
app/code/local/Magentojack/Custom/etc/config.xml ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magentojack_Custom>
5
+ <version>0.1.0</version>
6
+ </Magentojack_Custom>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <custom>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Magentojack_Custom</module>
14
+ <frontName>custom</frontName>
15
+ </args>
16
+ </custom>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <custom>
21
+ <file>custom.xml</file>
22
+ </custom>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <custom>
29
+ <use>admin</use>
30
+ <args>
31
+ <module>Magentojack_Custom</module>
32
+ <frontName>custom</frontName>
33
+ </args>
34
+ </custom>
35
+ </routers>
36
+ </admin>
37
+ <adminhtml>
38
+ <layout>
39
+ <updates>
40
+ <custom>
41
+ <file>custom.xml</file>
42
+ </custom>
43
+ </updates>
44
+ </layout>
45
+ </adminhtml>
46
+ <global>
47
+ <events>
48
+ <sales_quote_save_before> <!-- Name of Event -->
49
+ <observers>
50
+ <save_before>
51
+ <type>singleton</type>
52
+ <class>Magentojack_Custom_Model_Observer</class> <!-- Over Model Class -->
53
+ <method>saveQuoteBefore</method> <!-- name of function -->
54
+ </save_before>
55
+ </observers>
56
+ </sales_quote_save_before>
57
+ <sales_quote_save_after> <!-- Name of Event -->
58
+ <observers>
59
+ <save_after>
60
+ <type>singleton</type>
61
+ <class>Magentojack_Custom_Model_Observer</class> <!-- Over Model Class -->
62
+ <method>saveQuoteAfter</method> <!-- name of function -->
63
+ </save_after>
64
+ </observers>
65
+ </sales_quote_save_after>
66
+ <sales_quote_load_after>
67
+ <observers>
68
+ <load_after>
69
+ <type>singleton</type>
70
+ <class>Magentojack_Custom_Model_Observer</class> <!-- Over Model Class -->
71
+ <method>loadQuoteAfter</method> <!-- name of function -->
72
+ </load_after>
73
+ </observers>
74
+ </sales_quote_load_after>
75
+ <sales_model_service_quote_submit_after>
76
+ <observers>
77
+ <sales_model_service_quote_submit_after>
78
+ <type>singleton</type>
79
+ <class>Magentojack_Custom_Model_Observer</class> <!-- Over Model Class -->
80
+ <method>saveOrderAfter</method> <!-- name of function -->
81
+ </sales_model_service_quote_submit_after>
82
+ </observers>
83
+ </sales_model_service_quote_submit_after>
84
+ <sales_order_load_after>
85
+ <observers>
86
+ <sales_order_load_after>
87
+ <type>singleton</type>
88
+ <class>Magentojack_Custom_Model_Observer</class> <!-- Over Model Class -->
89
+ <method>loadOrderAfter</method> <!-- name of function -->
90
+ </sales_order_load_after>
91
+ </observers>
92
+ </sales_order_load_after>
93
+ </events>
94
+ <models>
95
+ <sales>
96
+ <rewrite>
97
+ <order>Magentojack_Custom_Model_Sales_Order</order>
98
+ </rewrite>
99
+ </sales>
100
+ <custom>
101
+ <class>Magentojack_Custom_Model</class>
102
+ <resourceModel>custom_mysql4</resourceModel>
103
+ </custom>
104
+ <custom_mysql4>
105
+ <class>Magentojack_Custom_Model_Mysql4</class>
106
+ <entities>
107
+ <custom_quote>
108
+ <table>sales_quote_custom</table>
109
+ </custom_quote>
110
+ <custom_order>
111
+ <table>sales_order_custom</table>
112
+ </custom_order>
113
+ </entities>
114
+ </custom_mysql4>
115
+ </models>
116
+ <resources>
117
+ <custom_setup>
118
+ <setup>
119
+ <module>Magentojack_Custom</module>
120
+ </setup>
121
+ <connection>
122
+ <use>core_setup</use>
123
+ </connection>
124
+ </custom_setup>
125
+ <custom_write>
126
+ <connection>
127
+ <use>core_write</use>
128
+ </connection>
129
+ </custom_write>
130
+ <custom_read>
131
+ <connection>
132
+ <use>core_read</use>
133
+ </connection>
134
+ </custom_read>
135
+ </resources>
136
+ <blocks>
137
+ <custom>
138
+ <class>Magentojack_Custom_Block</class>
139
+ </custom>
140
+ </blocks>
141
+ <helpers>
142
+ <custom>
143
+ <class>Magentojack_Custom_Helper</class>
144
+ </custom>
145
+ </helpers>
146
+ </global>
147
+ </config>
app/code/local/Magentojack/Custom/sql/custom_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ CREATE TABLE IF NOT EXISTS {$this->getTable('sales_quote_custom')} (
10
+ `id` int(11) unsigned NOT NULL auto_increment,
11
+ `quote_id` int(11) unsigned NOT NULL,
12
+ `key` varchar(255) NOT NULL,
13
+ `value` text NOT NULL,
14
+ PRIMARY KEY (`id`)
15
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
+
17
+ CREATE TABLE IF NOT EXISTS {$this->getTable('sales_order_custom')} (
18
+ `id` int(11) unsigned NOT NULL auto_increment,
19
+ `order_id` int(11) unsigned NOT NULL,
20
+ `key` varchar(255) NOT NULL,
21
+ `value` text NOT NULL,
22
+ PRIMARY KEY (`id`)
23
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
24
+
25
+ ");
26
+
27
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/custom.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <adminhtml_sales_order_view>
4
+ <reference name="order_info">
5
+ <action method='setTemplate'><template>custom/sales/order/info.phtml</template></action>
6
+ <block type="adminhtml/sales_order_view_info" name="order_info2" template="sales/order/view/info.phtml"></block>
7
+ <block type="custom/adminhtml_custom_order" name="custom.order" template='custom/order.phtml'/>
8
+
9
+ </reference>
10
+ </adminhtml_sales_order_view>
11
+ </layout>
app/design/adminhtml/default/default/template/custom/order.phtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_order = $this->getOrder() ?>
2
+ <div class="box-left">
3
+ <div class="entry-edit">
4
+ <div class="entry-edit-head">
5
+ <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Custom Fields') ?></h4>
6
+ </div>
7
+ <div class="fieldset">
8
+ <table cellspacing="0" class="form-list">
9
+ <?php
10
+ $custom = $this->getCustomVars();
11
+ foreach($custom as $key => $value){
12
+ ?>
13
+ <tr>
14
+ <td style="width:10%" class="label"><strong><?php echo Mage::helper('sales')->__($key) ?></strong></td>
15
+ <td class="value"><?php echo $value;?></td>
16
+ </tr>
17
+ <?php } ?>
18
+ </table>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <div class="clear"></div>
app/design/adminhtml/default/default/template/custom/sales/order/info.phtml ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php echo $this->getChildHtml('order_info2');?>
2
+ <?php echo $this->getChildHtml('custom.order');?>
app/design/adminhtml/default/default/template/custom/sales/order/view/tab/info.phtml ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_order = $this->getOrder() ?>
2
+ <div>
3
+ <div id="order-messages">
4
+ <?php echo $this->getChildHtml('order_messages') ?>
5
+ </div>
6
+ <?php echo $this->getChildHtml('order_info') ?>
7
+ <input type="hidden" name="order_id" value="<?php echo $_order->getId() ?>"/>
8
+ <?php if ($_order->getIsVirtual()): ?>
9
+ <div class="box-right">
10
+ <?php else: ?>
11
+ <div class="box-left">
12
+ <?php endif; ?>
13
+ <!--Payment Method-->
14
+ <div class="entry-edit">
15
+ <div class="entry-edit-head">
16
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('Payment Information') ?></h4>
17
+ </div>
18
+ <fieldset>
19
+ <?php echo $this->getPaymentHtml() ?>
20
+ <div><?php echo Mage::helper('sales')->__('Order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
21
+ </fieldset>
22
+ </div>
23
+ </div>
24
+ <?php if (!$_order->getIsVirtual()): ?>
25
+ <div class="box-right">
26
+ <!--Shipping Method-->
27
+ <div class="entry-edit">
28
+ <div class="entry-edit-head">
29
+ <h4 class="icon-head head-shipping-method"><?php echo Mage::helper('sales')->__('Shipping &amp; Handling Information') ?></h4>
30
+ </div>
31
+ <fieldset>
32
+ <?php if ($_order->getTracksCollection()->count()) : ?>
33
+ <a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopupUrlBySalesModel($_order) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track Order') ?>"><?php echo $this->__('Track Order') ?></a>
34
+ <br/>
35
+ <?php endif; ?>
36
+ <?php if ($_order->getShippingDescription()): ?>
37
+ <strong><?php echo $_order->getShippingDescription() ?></strong>
38
+
39
+ <?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
40
+ <?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
41
+ <?php else: ?>
42
+ <?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
43
+ <?php endif; ?>
44
+ <?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
45
+
46
+ <?php echo $_excl; ?>
47
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
48
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
49
+ <?php endif; ?>
50
+ <?php else: ?>
51
+ <?php echo $this->helper('sales')->__('No shipping information available'); ?>
52
+ <?php endif; ?>
53
+ </fieldset>
54
+ </div>
55
+ </div>
56
+ <?php endif; ?>
57
+ <div class="clear"></div>
58
+ <?php echo $this->getGiftOptionsHtml() ?>
59
+ <div class="clear"></div>
60
+ <div class="entry-edit">
61
+ <div class="entry-edit-head">
62
+ <h4 class="icon-head head-products"><?php echo Mage::helper('sales')->__('Items Ordered') ?></h4>
63
+ </div>
64
+ </div>
65
+ <?php echo $this->getItemsHtml() ?>
66
+ <div class="clear"></div>
67
+
68
+ <div class="box-left">
69
+ <div class="entry-edit">
70
+ <div class="entry-edit-head">
71
+ <h4><?php echo Mage::helper('sales')->__('Comments History') ?></h4>
72
+ </div>
73
+ <fieldset><?php echo $this->getChildHtml('order_history') ?></fieldset>
74
+ </div>
75
+ </div>
76
+ <div class="box-right entry-edit">
77
+ <div class="entry-edit-head"><h4><?php echo Mage::helper('sales')->__('Order Totals') ?></h4></div>
78
+ <div class="order-totals"><?php echo $this->getChildHtml('order_totals') ?></div>
79
+ </div>
80
+ <div class="clear"></div>
81
+ </div>
82
+
83
+ <?php echo $this->getChildHtml('popup_window');?>
84
+ <script type="text/javascript">
85
+ //<![CDATA[
86
+ /**
87
+ * Retrieve gift options tooltip content
88
+ */
89
+ function getGiftOptionsTooltipContent(itemId) {
90
+ var contentLines = [];
91
+ var headerLine = null;
92
+ var contentLine = null;
93
+
94
+ $$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element) {
95
+ if (element.down(0)) {
96
+ headerLine = element.down(0).innerHTML;
97
+ contentLine = element.down(0).next().innerHTML;
98
+ if (contentLine.length > 30) {
99
+ contentLine = contentLine.slice(0,30) + '...';
100
+ }
101
+ contentLines.push(headerLine + ' ' + contentLine);
102
+ }
103
+ });
104
+ return contentLines.join('<br/>');
105
+ }
106
+ giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
107
+ //]]>
108
+ </script>
app/design/frontend/default/default/layout/custom.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <sales_order_view>
4
+ <reference name="my.account.wrapper">
5
+ <block type="custom/custom_order" name="custom.order" template="custom/order.phtml" after='sales.order.info' />
6
+ </reference>
7
+ </sales_order_view>
8
+ </layout>
app/design/frontend/default/default/template/custom/order.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="col-set order-info-box">
2
+ <div class="col">
3
+ <div class="box">
4
+ <div class="box-title">
5
+ <h2><?php echo $this->__('Custom Fields') ?></h2>
6
+ </div>
7
+ <div class="box-content">
8
+
9
+ <?php
10
+ $custom = $this->getCustomVars();
11
+ foreach($custom as $key => $value){
12
+ ?>
13
+ <b><?php echo $this->__($key);?></b> : <?php echo $value;?> <br/>
14
+ <?php } ?>
15
+
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
app/design/frontend/default/default/template/custom/sales/order/view.phtml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="order-items order-details">
28
+ <?php if ($this->helper('giftmessage/message')->getIsMessagesAvailable('items', $this->getOrder())): ?>
29
+ <script type="text/javascript">
30
+ //<![CDATA[
31
+ function giftMessageToogle(giftMessageIdentifier)
32
+ {
33
+ var link = $('order-item-gift-message-link-'+giftMessageIdentifier);
34
+ var container = $('order-item-gift-message-'+giftMessageIdentifier);
35
+ var row = $('order-item-row-'+giftMessageIdentifier);
36
+ if(link.expanded) {
37
+ link.expanded = false;
38
+ link.removeClassName('expanded');
39
+ if(container.hasClassName('last')) {
40
+ row.addClassName('last');
41
+ }
42
+ container.hide();
43
+ } else {
44
+ link.expanded = true;
45
+ link.addClassName('expanded');
46
+ if(container.hasClassName('last')) {
47
+ row.removeClassName('last');
48
+ }
49
+ container.show();
50
+ }
51
+
52
+ return false;
53
+ }
54
+ //]]>
55
+ </script>
56
+ <?php endif; ?>
57
+ <?php $_order = $this->getOrder() ?>
58
+ <h2 class="table-caption"><?php echo $this->__('Items Ordered') ?>
59
+ <?php if ($_order->getTracksCollection()->count()) : ?>
60
+ <span class="separator">|</span> <a href="#" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopupUrlBySalesModel($_order) ?>','trackorder','top=0,left=0,width=800,height=600,resizable=yes,scrollbars=yes'); return false;" title="<?php echo $this->__('Track your order') ?>"><?php echo $this->__('Track your order') ?></a>
61
+ <?php endif; ?>
62
+ </h2>
63
+
64
+ <?php echo $this->getChildHtml('order_items') ?>
65
+
66
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?>
67
+ <div class="order-additional order-gift-message">
68
+ <h2 class="sub-title"><?php echo $this->__('Gift Message for This Order') ?></h2>
69
+ <?php $_giftMessage=$this->helper('giftmessage/message')->getGiftMessageForEntity($_order); ?>
70
+ <dl class="gift-message">
71
+ <dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->htmlEscape($_giftMessage->getSender()) ?></dt>
72
+ <dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?></dt>
73
+ <dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_order) ?></dd>
74
+ </dl>
75
+ </div>
76
+ <?php endif; ?>
77
+ <?php $_history = $this->getOrder()->getVisibleStatusHistory() ?>
78
+ <?php if (count($_history)): ?>
79
+ <div class="order-additional order-comments">
80
+ <h2 class="sub-title"><?php echo $this->__('About Your Order') ?></h2>
81
+ <dl class="order-about">
82
+ <?php foreach ($_history as $_historyItem): ?>
83
+ <dt><?php echo $this->formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?></dt>
84
+ <dd><?php echo $this->escapeHtml($_historyItem->getComment()) ?></dd>
85
+ <?php endforeach; ?>
86
+ </dl>
87
+ </div>
88
+ <?php endif; ?>
89
+ <div class="buttons-set">
90
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->getBackTitle() ?></a></p>
91
+ </div>
92
+ </div>
app/etc/modules/Magentojack_Custom.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magentojack_Custom>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Magentojack_Custom>
8
+ </modules>
9
+ </config>
app/locale/en_US/template/email/sales/order_new.html ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject {{var store.getFrontendName()}}: New Order # {{var order.increment_id}} @-->
2
+ <!--@vars
3
+ {"store url=\"\"":"Store Url",
4
+ "skin url=\"images/logo_email.gif\" _area='frontend'":"Email Logo Image",
5
+ "htmlescape var=$order.getCustomerName()":"Customer Name",
6
+ "var store.getFrontendName()":"Store Name",
7
+ "store url=\"customer/account/\"":"Customer Account Url",
8
+ "var order.increment_id":"Order Id",
9
+ "var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
10
+ "var order.getBillingAddress().format('html')":"Billing Address",
11
+ "var payment_html":"Payment Details",
12
+ "var order.getShippingAddress().format('html')":"Shipping Address",
13
+ "var order.getShippingDescription()":"Shipping Description",
14
+ "layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
15
+ "var order.getEmailCustomerNote()":"Email Order Note"}
16
+ @-->
17
+ <!--@styles
18
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
19
+ @-->
20
+
21
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
22
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
23
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
24
+ <tr>
25
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
26
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
27
+ <!-- [ header starts here] -->
28
+ <tr>
29
+ <td valign="top"><a href="{{store url=""}}"><img src="{{skin url="images/logo_email.gif" _area='frontend'}}" alt="{{var store.getFrontendName()}}" style="margin-bottom:10px;" border="0"/></a></td>
30
+ </tr>
31
+ <!-- [ middle starts here] -->
32
+ <tr>
33
+ <td valign="top">
34
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$order.getCustomerName()}}</h1>
35
+ <p style="font-size:12px; line-height:16px; margin:0;">
36
+ Thank you for your order from {{var store.getFrontendName()}}.
37
+ Once your package ships we will send an email with a link to track your order.
38
+ You can check the status of your order by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
39
+ If you have any questions about your order please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.
40
+ </p>
41
+ <p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
42
+ </tr>
43
+ <tr>
44
+ <td>
45
+ <h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <td>
50
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
51
+ <thead>
52
+ <tr>
53
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
54
+ <th width="10"></th>
55
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
56
+ </tr>
57
+ </thead>
58
+ <tbody>
59
+ <tr>
60
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
61
+ {{var order.getBillingAddress().format('html')}}
62
+ </td>
63
+ <td>&nbsp;</td>
64
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
65
+ {{var payment_html}}
66
+ </td>
67
+ </tr>
68
+ </tbody>
69
+ </table>
70
+ <br/>
71
+ {{depend order.getIsNotVirtual()}}
72
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
73
+ <thead>
74
+ <tr>
75
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
76
+ <th width="10"></th>
77
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
78
+ </tr>
79
+ </thead>
80
+ <tbody>
81
+ <tr>
82
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
83
+ {{var order.getShippingAddress().format('html')}}
84
+ &nbsp;
85
+ </td>
86
+ <td>&nbsp;</td>
87
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
88
+ {{var order.getShippingDescription()}}
89
+ &nbsp;
90
+ </td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+ <br/>
95
+ {{/depend}}
96
+ {{depend order.hasCustomFields()}}
97
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
98
+ <thead>
99
+ <tr>
100
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Custom Fields:</th>
101
+ </tr>
102
+ </thead>
103
+ <tbody>
104
+ <tr>
105
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
106
+ {{var order.getFieldHtml()}}
107
+ &nbsp;
108
+ </td>
109
+ </tr>
110
+ </tbody>
111
+ </table>
112
+ {{/depend}}
113
+ <br/>
114
+ {{layout handle="sales_email_order_items" order=$order}}
115
+ <p style="font-size:12px; margin:0 0 10px 0">{{var order.getEmailCustomerNote()}}</p>
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
120
+ </tr>
121
+ </table>
122
+ </td>
123
+ </tr>
124
+ </table>
125
+ </div>
126
+ </body>
app/locale/en_US/template/email/sales/order_new_guest.html ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject {{var store.getFrontendName()}}: New Order # {{var order.increment_id}} @-->
2
+ <!--@vars
3
+ {"store url=\"\"":"Store Url",
4
+ "skin url=\"images/logo_email.gif\" _area='frontend'":"Email Logo Image",
5
+ "htmlescape var=$order.getBillingAddress().getName()":"Guest Customer Name",
6
+ "var store.getFrontendName()":"Store Name",
7
+ "var order.increment_id":"Order Id",
8
+ "var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
9
+ "var order.getBillingAddress().format('html')":"Billing Address",
10
+ "var payment_html":"Payment Details",
11
+ "var order.getShippingAddress().format('html')":"Shipping Address",
12
+ "var order.getShippingDescription()":"Shipping Description",
13
+ "layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
14
+ "var order.getEmailCustomerNote()":"Email Order Note"}
15
+ @-->
16
+ <!--@styles
17
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
18
+ @-->
19
+
20
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
21
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
22
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
23
+ <tr>
24
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
25
+ <!-- [ header starts here] -->
26
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
27
+ <tr>
28
+ <td valign="top"><a href="{{store url=""}}"><img src="{{skin url="images/logo_email.gif" _area='frontend'}}" alt="{{var store.getFrontendName()}}" style="margin-bottom:10px;" border="0"/></a></td>
29
+ </tr>
30
+ <!-- [ middle starts here] -->
31
+ <tr>
32
+ <td valign="top">
33
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello, {{htmlescape var=$order.getBillingAddress().getName()}}</h1>
34
+ <p style="font-size:12px; line-height:16px; margin:0 0 10px 0;">
35
+ Thank you for your order from {{var store.getFrontendName()}}.
36
+ Once your package ships we will send an email with a link to track your order.
37
+ If you have any questions about your order please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.
38
+ </p>
39
+ <p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
40
+ </td>
41
+ </tr>
42
+ <tr>
43
+ <td>
44
+ <h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <td>
49
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
50
+ <thead>
51
+ <tr>
52
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
53
+ <th width="10"></th>
54
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
55
+ </tr>
56
+ </thead>
57
+ <tbody>
58
+ <tr>
59
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
60
+ {{var order.getBillingAddress().format('html')}}
61
+ </td>
62
+ <td>&nbsp;</td>
63
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
64
+ {{var payment_html}}
65
+ </td>
66
+ </tr>
67
+ </tbody>
68
+ </table>
69
+ <br/>
70
+ {{depend order.getIsNotVirtual()}}
71
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
72
+ <thead>
73
+ <tr>
74
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
75
+ <th width="10"></th>
76
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
77
+ </tr>
78
+ </thead>
79
+ <tbody>
80
+ <tr>
81
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
82
+ {{var order.getShippingAddress().format('html')}}
83
+ &nbsp;
84
+ </td>
85
+ <td>&nbsp;</td>
86
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
87
+ {{var order.getShippingDescription()}}
88
+ &nbsp;
89
+ </td>
90
+ </tr>
91
+ </tbody>
92
+ </table>
93
+ <br/>
94
+ {{/depend}}
95
+ {{depend order.hasCustomFields()}}
96
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
97
+ <thead>
98
+ <tr>
99
+ <th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Custom Fields:</th>
100
+ </tr>
101
+ </thead>
102
+ <tbody>
103
+ <tr>
104
+ <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
105
+ {{var order.getFieldHtml()}}
106
+ &nbsp;
107
+ </td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+ {{/depend}}
112
+ <br/>
113
+ {{layout handle="sales_email_order_items" order=$order}}
114
+ <p style="font-size:12px; margin:0 10px 10px 0">{{var order.getEmailCustomerNote()}}</p>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
119
+ </tr>
120
+ </table>
121
+ </td>
122
+ </tr>
123
+ </table>
124
+ </div>
125
+ </body>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Checkout_Custom</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>add custom field in any step of onepage checkout</summary>
10
+ <description>add custom field in any step of onepage checkout</description>
11
+ <notes>stable</notes>
12
+ <authors><author><name>jaimin</name><user>auto-converted</user><email>jaimin85india@yahoo.com</email></author></authors>
13
+ <date>2012-07-14</date>
14
+ <time>12:47:16</time>
15
+ <contents><target name="magelocal"><dir name="Magentojack"><dir name="Custom"><dir name="Block"><dir name="Adminhtml"><dir name="Custom"><file name="Order.php" hash="f151f216ae2d863b33e32be813db3769"/></dir></dir><dir name="Custom"><file name="Order.php" hash="9490d51c0a141ae90304ebb342832de0"/></dir></dir><dir name="Helper"><file name="Data.php" hash="20e80151af04aef272224e2803a9178e"/></dir><dir name="Model"><dir name="Custom"><file name="Order.php" hash="6b843b62b91484156956c28e6267ad14"/><file name="Quote.php" hash="f399f97f5c9c74cbda136a88b233e088"/></dir><dir name="Mysql4"><dir name="Custom"><dir name="Order"><file name="Collection.php" hash="36909742e1e893106b2f429107a63c27"/></dir><dir name="Quote"><file name="Collection.php" hash="231827d72012bbf88f12d8991ed5162f"/></dir><file name="Order.php" hash="981b70a549ba2f7d7e57beab18e01662"/><file name="Quote.php" hash="89b5ca4b6ea4e89f005b51e67743ab0b"/></dir></dir><dir name="Sales"><file name="Order.php" hash="109c5a33fca9acf91686bb2c64f092cf"/></dir><file name="Observer.php" hash="ffa50f8461d598719537bc7229ae41de"/></dir><dir name="controllers"><file name="IndexController.php" hash="3c6a9f5d4652527cfe9664e6d7fe14f4"/></dir><dir name="etc"><file name="config.xml" hash="98d187e2240d9672fbfd2352b69f4fad"/></dir><dir name="sql"><dir name="custom_setup"><file name="mysql4-install-0.1.0.php" hash="1b1cf1ce0fd918853e9a63f0c90f5d08"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="custom.xml" hash="e70c7a72baa4e0dd45982217c5437a7c"/></dir><dir name="template"><dir name="custom"><dir name="sales"><dir name="order"><file name="view.phtml" hash="41c7d695d3795503f6006971499035ed"/></dir></dir><file name="order.phtml" hash="80e5f9d7aefc4b97486594b6ce1aea55"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="custom.xml" hash="162d43bb56cdf14de574d34c8433c91a"/></dir><dir name="template"><dir name="custom"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="4b2c910dd9dcc0c07a6db7ef5a2c1913"/></dir></dir><file name="info.phtml" hash="e3546a212b5556cffbb604c532623157"/></dir></dir><file name="order.phtml" hash="c33c6bb4a95c5805b05a9afa8d868629"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magentojack_Custom.xml" hash="559139c4e1540453ac8156e60378bfb2"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="sales"><file name="order_new.html" hash="4f73af6666af909ca9452fce363b1fc0"/><file name="order_new_guest.html" hash="6773db530e362eb21ba99fcb5f49ee05"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>