One_Step_Checkout - Version 1.1.0

Version Notes

First release

Download this release

Release Info

Developer Magegaga
Extension One_Step_Checkout
Version 1.1.0
Comparing to
See all releases


Version 1.1.0

Files changed (48) hide show
  1. app/code/local/Magegaga/Easycheckout/Controller/Event.php +11 -0
  2. app/code/local/Magegaga/Easycheckout/Helper/Data.php +207 -0
  3. app/code/local/Magegaga/Easycheckout/Model/Block/Adminhtml/Sales/Order/View/Info.php +42 -0
  4. app/code/local/Magegaga/Easycheckout/Model/Block/Onestep.php +17 -0
  5. app/code/local/Magegaga/Easycheckout/Model/Block/Onestepcheckout.php +18 -0
  6. app/code/local/Magegaga/Easycheckout/Model/Checkbox.php +17 -0
  7. app/code/local/Magegaga/Easycheckout/Model/Observer.php +11 -0
  8. app/code/local/Magegaga/Easycheckout/Model/Required.php +17 -0
  9. app/code/local/Magegaga/Easycheckout/Model/Status.php +15 -0
  10. app/code/local/Magegaga/Easycheckout/controllers/OnestepController.php +752 -0
  11. app/code/local/Magegaga/Easycheckout/etc/adminhtml.xml +26 -0
  12. app/code/local/Magegaga/Easycheckout/etc/config.xml +201 -0
  13. app/code/local/Magegaga/Easycheckout/etc/system.xml +362 -0
  14. app/code/local/Magegaga/Easycheckout/sql/easycheckout_setup/mysql4-upgrade-1.0.0-2.0.0.php +31 -0
  15. app/design/adminhtml/default/easycheckout/template/sales/order/view/info.phtml +180 -0
  16. app/design/frontend/default/default/layout/easycheckout.xml +66 -0
  17. app/design/frontend/default/default/template/easycheckout/onestep.phtml +122 -0
  18. app/design/frontend/default/default/template/easycheckout/onestep/agreements.phtml +23 -0
  19. app/design/frontend/default/default/template/easycheckout/onestep/billing.phtml +249 -0
  20. app/design/frontend/default/default/template/easycheckout/onestep/billingdetail.phtml +70 -0
  21. app/design/frontend/default/default/template/easycheckout/onestep/coupon.phtml +137 -0
  22. app/design/frontend/default/default/template/easycheckout/onestep/coupondirect.phtml +23 -0
  23. app/design/frontend/default/default/template/easycheckout/onestep/login.phtml +190 -0
  24. app/design/frontend/default/default/template/easycheckout/onestep/payment.phtml +35 -0
  25. app/design/frontend/default/default/template/easycheckout/onestep/payment/methods.phtml +40 -0
  26. app/design/frontend/default/default/template/easycheckout/onestep/quickheard.phtml +36 -0
  27. app/design/frontend/default/default/template/easycheckout/onestep/review.phtml +77 -0
  28. app/design/frontend/default/default/template/easycheckout/onestep/review/additional.phtml +4 -0
  29. app/design/frontend/default/default/template/easycheckout/onestep/review/info.phtml +58 -0
  30. app/design/frontend/default/default/template/easycheckout/onestep/review/item.phtml +224 -0
  31. app/design/frontend/default/default/template/easycheckout/onestep/shipping.phtml +139 -0
  32. app/design/frontend/default/default/template/easycheckout/onestep/shipping_method.phtml +9 -0
  33. app/design/frontend/default/default/template/easycheckout/onestep/shipping_method/_available.phtml +43 -0
  34. app/design/frontend/default/default/template/easycheckout/onestep/shipping_method/available.phtml +50 -0
  35. app/etc/modules/Magegaga_Easycheckout.xml +10 -0
  36. js/easycheckout/easycheckout.js +807 -0
  37. package.xml +18 -0
  38. skin/frontend/default/default/css/easycheckout/easycheckout.css +475 -0
  39. skin/frontend/default/default/images/easycheckout/Thumbs.db +0 -0
  40. skin/frontend/default/default/images/easycheckout/closebox.png +0 -0
  41. skin/frontend/default/default/images/easycheckout/down.png +0 -0
  42. skin/frontend/default/default/images/easycheckout/loader.gif +0 -0
  43. skin/frontend/default/default/images/easycheckout/loading_inner.gif +0 -0
  44. skin/frontend/default/default/images/easycheckout/osc-numbers.png +0 -0
  45. skin/frontend/default/default/images/easycheckout/osc-numbers1.png +0 -0
  46. skin/frontend/default/default/images/easycheckout/trans_BG.png +0 -0
  47. skin/frontend/default/default/images/easycheckout/up.png +0 -0
  48. skin/frontend/default/default/images/easycheckout/up1.png +0 -0
app/code/local/Magegaga/Easycheckout/Controller/Event.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magegaga_Easycheckout_Controller_Event
4
+ {
5
+ //Event: adminhtml_controller_action_predispatch_start
6
+ public function customTheme()
7
+ {
8
+ Mage::getDesign()->setArea('adminhtml')
9
+ ->setTheme((string)Mage::getStoreConfig('easycheckout/css_style/admin'));
10
+ }
11
+ }
app/code/local/Magegaga/Easycheckout/Helper/Data.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magegaga_Easycheckout_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+
6
+ public function getEasycheckoutConfig($value) {
7
+
8
+ return trim(Mage::getStoreConfig('easycheckout/'.$value));
9
+ }
10
+
11
+ public function getEasycheckoutLoading($for) {
12
+
13
+ return $this->getEasycheckoutConfig('ajax_text/'.$for);
14
+
15
+ }
16
+
17
+ public function getEasycheckoutskin() {
18
+ if($color= $this->getEasycheckoutConfig('css_style/heading')){
19
+ return $color = "background:$color'";
20
+ }
21
+ }
22
+
23
+ public function getEasycheckoutHeadingCSS() {
24
+
25
+ if($style= $this->getEasycheckoutConfig('css_style/heading_text')){
26
+ return $style;
27
+ }
28
+ }
29
+
30
+ public function getEasycheckoutbuttonCSS() {
31
+ if($style= $this->getEasycheckoutConfig('css_style/button')){
32
+ return $style;
33
+ }
34
+ }
35
+
36
+ public function getEasycheckoutTitle() {
37
+ return $this->getEasycheckoutConfig('general/title');
38
+ }
39
+
40
+ public function getEasycheckoutContent() {
41
+ if($this->getEasycheckoutConfig('general/enable_content')){
42
+ return nl2br($this->getEasycheckoutConfig('general/content'));
43
+ }
44
+
45
+ }
46
+
47
+ public function getWidth() {
48
+ if($data=(int)$this->getEasycheckoutConfig('css_style/agreement')){
49
+ return "width:" . $data . "px";
50
+ }
51
+ return;
52
+ }
53
+
54
+ public function getEasycheckoutLogin() {
55
+ if($data=$this->getEasycheckoutConfig('general/login')){
56
+ return $data;
57
+ }
58
+ else{
59
+ return 'Already registered? Please log in below.';
60
+ }
61
+
62
+ }
63
+
64
+ public function getEasycheckoutHeard() {
65
+
66
+ if($data=$this->getEasycheckoutConfig('quickheared/options_quickheared')){
67
+ $Sources = explode(',', $data);
68
+ return $Sources;
69
+ }
70
+ return;
71
+ }
72
+
73
+ function getautoPassword()
74
+ {$rand_id='az09a9';$length=8;
75
+ if($length=$this->getEasycheckoutConfig('general/length_autogenerate')){}
76
+ if($length>0)
77
+ {
78
+ $rand_id="";
79
+ for($i=1; $i<=$length; $i++)
80
+ {
81
+ mt_srand((double)microtime() * 1000000);
82
+ $num = mt_rand(1,36);
83
+ $rand_id .= $this->assign_rand_value($num);
84
+ }
85
+ }
86
+ return $rand_id;
87
+ }
88
+
89
+ function assign_rand_value($num)
90
+ {
91
+ // accepts 1 - 36
92
+ switch($num)
93
+ {
94
+ case "1":
95
+ $rand_value = "a";
96
+ break;
97
+ case "2":
98
+ $rand_value = "b";
99
+ break;
100
+ case "3":
101
+ $rand_value = "c";
102
+ break;
103
+ case "4":
104
+ $rand_value = "d";
105
+ break;
106
+ case "5":
107
+ $rand_value = "e";
108
+ break;
109
+ case "6":
110
+ $rand_value = "f";
111
+ break;
112
+ case "7":
113
+ $rand_value = "g";
114
+ break;
115
+ case "8":
116
+ $rand_value = "h";
117
+ break;
118
+ case "9":
119
+ $rand_value = "i";
120
+ break;
121
+ case "10":
122
+ $rand_value = "j";
123
+ break;
124
+ case "11":
125
+ $rand_value = "k";
126
+ break;
127
+ case "12":
128
+ $rand_value = "l";
129
+ break;
130
+ case "13":
131
+ $rand_value = "m";
132
+ break;
133
+ case "14":
134
+ $rand_value = "n";
135
+ break;
136
+ case "15":
137
+ $rand_value = "o";
138
+ break;
139
+ case "16":
140
+ $rand_value = "p";
141
+ break;
142
+ case "17":
143
+ $rand_value = "q";
144
+ break;
145
+ case "18":
146
+ $rand_value = "r";
147
+ break;
148
+ case "19":
149
+ $rand_value = "s";
150
+ break;
151
+ case "20":
152
+ $rand_value = "t";
153
+ break;
154
+ case "21":
155
+ $rand_value = "u";
156
+ break;
157
+ case "22":
158
+ $rand_value = "v";
159
+ break;
160
+ case "23":
161
+ $rand_value = "w";
162
+ break;
163
+ case "24":
164
+ $rand_value = "x";
165
+ break;
166
+ case "25":
167
+ $rand_value = "y";
168
+ break;
169
+ case "26":
170
+ $rand_value = "z";
171
+ break;
172
+ case "27":
173
+ $rand_value = "0";
174
+ break;
175
+ case "28":
176
+ $rand_value = "1";
177
+ break;
178
+ case "29":
179
+ $rand_value = "2";
180
+ break;
181
+ case "30":
182
+ $rand_value = "3";
183
+ break;
184
+ case "31":
185
+ $rand_value = "4";
186
+ break;
187
+ case "32":
188
+ $rand_value = "5";
189
+ break;
190
+ case "33":
191
+ $rand_value = "6";
192
+ break;
193
+ case "34":
194
+ $rand_value = "7";
195
+ break;
196
+ case "35":
197
+ $rand_value = "8";
198
+ break;
199
+ case "36":
200
+ $rand_value = "9";
201
+ break;
202
+ }
203
+ return $rand_value;
204
+ }
205
+
206
+ }
207
+
app/code/local/Magegaga/Easycheckout/Model/Block/Adminhtml/Sales/Order/View/Info.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ //require_once BP.DS.'app'.DS.'code'.DS.'core'.DS.'Mage'.DS.'Adminhtml'.DS.'Block'.DS.'Sales'.DS.'Order'.DS.'View'.DS.'Info.php';
4
+ class Magegaga_Easycheckout_Block_Adminhtml_Sales_Order_View_Info extends Mage_Adminhtml_Block_Sales_Order_View_Info{
5
+
6
+ protected $order;
7
+ protected function _afterToHtml($html)
8
+ {
9
+
10
+ if($this->getChild('easycheckout_info')){
11
+
12
+ $html .= $this->getChild('easycheckout_info')->toHtml();
13
+
14
+ }
15
+
16
+ return parent::_afterToHtml($html);
17
+ }
18
+ //public function getOrder(){
19
+ // if(is_null($this->order)){
20
+ //
21
+ // if(Mage::registry('current_order')) {
22
+ //
23
+ // $order = Mage::registry('current_order');
24
+ //
25
+ // }elseif(Mage::registry('order')) {
26
+ //
27
+ // $order = Mage::registry('order');
28
+ //
29
+ // }else{
30
+ //
31
+ // $order = new Varien_Object();
32
+ //
33
+ // }
34
+ //
35
+ // $this->order = $order;
36
+ // }
37
+ //
38
+ // return $this->order;
39
+ //}
40
+
41
+
42
+ }
app/code/local/Magegaga/Easycheckout/Model/Block/Onestep.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vinagento_Oscheckout_Block_Onestep extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getEasycheckout()
10
+ {
11
+ if (!$this->hasData('easycheckout')) {
12
+ $this->setData('easycheckout', Mage::registry('easycheckout'));
13
+ }
14
+ return $this->getData('easycheckout');
15
+
16
+ }
17
+ }
app/code/local/Magegaga/Easycheckout/Model/Block/Onestepcheckout.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magegaga_Easycheckout_Block_Onestepcheckout extends Mage_Core_Block_Template
4
+ {
5
+ public function _prepareLayout()
6
+ {
7
+ return parent::_prepareLayout();
8
+ }
9
+
10
+ public function getEasycheckout()
11
+ {
12
+ if (!$this->hasData('easycheckout')) {
13
+ $this->setData('easycheckout', Mage::registry('easycheckout'));
14
+ }
15
+ return $this->getData('easycheckout');
16
+
17
+ }
18
+ }
app/code/local/Magegaga/Easycheckout/Model/Checkbox.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magegaga_Easycheckout_Model_Checkbox extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 0;
7
+ const STATUS_ENABLED_CHECKED = 2;
8
+
9
+ static public function toOptionArray()
10
+ {
11
+ return array(
12
+ self::STATUS_ENABLED => Mage::helper('easycheckout')->__('Enabled And Checked'),
13
+ self::STATUS_ENABLED_CHECKED => Mage::helper('easycheckout')->__('Enabled But UnChecked'),
14
+ self::STATUS_DISABLED => Mage::helper('easycheckout')->__('Disabled')
15
+ );
16
+ }
17
+ }
app/code/local/Magegaga/Easycheckout/Model/Observer.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magegaga_Easycheckout_Model_Observer{
4
+ public function EasycheckoutRedirect($observer) {
5
+ if (Mage::helper('easycheckout')->getEasycheckoutConfig('general/active')) {
6
+ Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl("checkout/onestep"))->sendResponse();
7
+
8
+ // Mage::app()->getResponse()->setRedirect(Mage::getUrl("checkout/onestep"));
9
+ }
10
+ }
11
+ }
app/code/local/Magegaga/Easycheckout/Model/Required.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magegaga_Easycheckout_Model_Required extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED_REQUIRED = 1;
6
+ const STATUS_DISABLED = 0;
7
+ const STATUS_ENABLED_OPTIONAL = 2;
8
+
9
+ static public function toOptionArray()
10
+ {
11
+ return array(
12
+ self::STATUS_ENABLED_REQUIRED => Mage::helper('easycheckout')->__('Enabled And Required'),
13
+ self::STATUS_ENABLED_OPTIONAL => Mage::helper('easycheckout')->__('Enabled But Optional'),
14
+ self::STATUS_DISABLED => Mage::helper('easycheckout')->__('Disabled')
15
+ );
16
+ }
17
+ }
app/code/local/Magegaga/Easycheckout/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magegaga_Easycheckout_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('easycheckout')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('easycheckout')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/local/Magegaga/Easycheckout/controllers/OnestepController.php ADDED
@@ -0,0 +1,752 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once BP.DS.'app'.DS.'code'.DS.'core'.DS.'Mage'.DS.'Checkout'.DS.'controllers'.DS.'OnepageController.php';
3
+ class Magegaga_Easycheckout_OnestepController extends Mage_Checkout_OnepageController
4
+ {
5
+
6
+ public function indexAction()
7
+ {
8
+
9
+ if (!Mage::helper('easycheckout')->getEasycheckoutConfig('general/active')) {
10
+ $this->_redirect('checkout/onepage');
11
+ return;
12
+ }
13
+ Mage::getSingleton('checkout/session')->setRBR(true);
14
+ $quote = $this->getOnepage()->getQuote();
15
+ if (!$quote->hasItems() || $quote->getHasError()) {
16
+ $this->_redirect('checkout/cart');
17
+ return;
18
+ }
19
+ if (!$quote->validateMinimumAmount()) {
20
+ $error = Mage::getStoreConfig('sales/minimum_order/error_message');
21
+ Mage::getSingleton('checkout/session')->addError($error);
22
+ $this->_redirect('checkout/cart');
23
+ return;
24
+ }
25
+ if (!count(Mage::getSingleton('customer/session')->getCustomer()->getAddresses())) {
26
+ $this->setDefaultCountryId();
27
+ }
28
+
29
+ $this->getQuote()->getShippingAddress()->setCollectShippingRates(true);
30
+ Mage::getSingleton('checkout/session')->setCartWasUpdated(false);
31
+ Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array(
32
+ '_secure' => true
33
+ )));
34
+ $this->getOnepage()->initCheckout();
35
+ if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
36
+ $this->getOnepage()->saveCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST);
37
+ }
38
+ $this->loadLayout();
39
+ $this->_initLayoutMessages('customer/session');
40
+ $this->getLayout()->getBlock('head')->setTitle(Mage::helper('easycheckout')->getEasycheckoutTitle());
41
+ $this->renderLayout();
42
+ }
43
+
44
+ public function loginPostAction()
45
+ {
46
+ if (Mage::getSingleton('customer/session')->isLoggedIn()) {
47
+ $this->_redirect('*/*/');
48
+ return;
49
+ }
50
+ $session = Mage::getSingleton('customer/session');
51
+ $message = '';
52
+ $result = array();
53
+
54
+ if ($this->getRequest()->isPost()) {
55
+ $login = $this->getRequest()->getPost();
56
+ if (!empty($login['username']) && !empty($login['password'])) {
57
+ try {
58
+ $session->login($login['username'], $login['password']);
59
+ if ($session->getCustomer()->getIsJustConfirmed()) {
60
+ $this->_welcomeCustomer($session->getCustomer(), true);
61
+ }
62
+ }
63
+ catch (Mage_Core_Exception $e) {
64
+ switch ($e->getCode()) {
65
+ case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
66
+ $message = Mage::helper('customer')->__('This account is not confirmed. <a href="%s">Click here</a> to resend confirmation email.', Mage::helper('customer')->getEmailConfirmationUrl($login['username']));
67
+ break;
68
+ case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
69
+ $message = $e->getMessage();
70
+ break;
71
+ default:
72
+ $message = $e->getMessage();
73
+ }
74
+ $session->setUsername($login['username']);
75
+ }
76
+ catch (Exception $e) {
77
+ $message = $e->getMessage();
78
+ }
79
+ } else {
80
+ $message = $this->__('Login and password are required');
81
+ }
82
+ }
83
+ if ($message) {
84
+ $result['error'] = $message;
85
+ } else {
86
+ $result['redirect'] = 1;
87
+ }
88
+ $this->getResponse()->setBody(Zend_Json::encode($result));
89
+ }
90
+
91
+ public function forgotpassPostAction()
92
+ {
93
+ $email = $this->getRequest()->getPost('email');
94
+ if ($email) {
95
+ if (!Zend_Validate::is($email, 'EmailAddress')) {
96
+ $message=$this->__('Invalid email address.');
97
+ }
98
+ else{
99
+ $customer = Mage::getModel('customer/customer')
100
+ ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
101
+ ->loadByEmail($email);
102
+
103
+ if ($customer->getId()) {
104
+ try {
105
+ $newPassword = $customer->generatePassword();
106
+ $customer->changePassword($newPassword, false);
107
+ $customer->sendPasswordReminderEmail();
108
+ $message=$this->__('A new password has been sent.');
109
+ }
110
+ catch (Exception $e){
111
+ $message=$e->getMessage();
112
+ }
113
+ } else {
114
+ $message=$this->__('This email address was not found in our records.');
115
+ }
116
+ }
117
+ } else {
118
+ $message=$this->__('Please enter your email.');
119
+ }
120
+ $result['error'] = $message;
121
+
122
+ $this->getResponse()->setBody(Zend_Json::encode($result));
123
+ }
124
+
125
+ public function reloadReviewAction()
126
+ {
127
+ if ($this->_expireAjax()) {
128
+ return;
129
+ }
130
+ $result = array();
131
+ try {
132
+ $result['review'] = $this->_getReviewHtml();
133
+ }
134
+ catch (Exception $e) {
135
+ $result['success'] = false;
136
+ $result['error'] = true;
137
+ $result['error_messages'] = $e->getMessage();
138
+ }
139
+ $this->getResponse()->setBody(Zend_Json::encode($result));
140
+ }
141
+
142
+ public function switchMethodAction()
143
+ {
144
+ if ($this->_expireAjax()) {
145
+ return;
146
+ }
147
+
148
+ $method = $this->getRequest()->getPost('method');
149
+ if ($this->getRequest()->isPost() && $method)
150
+ $this->getOnepage()->saveCheckoutMethod($method);
151
+ }
152
+
153
+ public function reloadPaymentAction()
154
+ {
155
+ if ($this->_expireAjax()) {
156
+ return;
157
+ }
158
+ $result = array();
159
+ try {
160
+ $result['payment'] = $this->_getPaymentMethodsHtml();
161
+ }
162
+ catch (Exception $e) {
163
+ $result['success'] = false;
164
+ $result['error'] = true;
165
+ $result['error_messages'] = $e->getMessage();
166
+ }
167
+ $this->getResponse()->setBody(Zend_Json::encode($result));
168
+ }
169
+
170
+ public function saveBillingAction()
171
+ {
172
+ if ($this->_expireAjax()) {
173
+ return;
174
+ }
175
+
176
+ $result = array();
177
+ $data = $this->getRequest()->getPost();
178
+ //print_r($data);exit;
179
+ if ($data) {
180
+ if ($data['use_for'] == 'billing') {
181
+ Mage::getSingleton('checkout/session')->setData('use_for_shipping', false);
182
+ try {
183
+ $this->getQuote()->getBillingAddress()->setCountryId($data['country_id'])->setPostcode($data['postcode'])->setRegionId($data['region_id'])->save();
184
+ $this->getQuote()->getShippingAddress()->setCountryId($data['country_id'])->setPostcode($data['postcode'])->setRegionId($data['region_id'])->save();
185
+ $this->getQuote()->getShippingAddress()->setCollectShippingRates(true);
186
+ $this->getQuote()->collectTotals()->save();
187
+ $result['shippingMethod'] = $this->_getShippingMethodsHtml();
188
+ $result['payment'] = $this->_getPaymentMethodsHtml();
189
+ }
190
+ catch (Exception $e) {
191
+ $result['success'] = false;
192
+ $result['error'] = true;
193
+ $result['error_messages'] = $e->getMessage();
194
+ }
195
+ } else {
196
+ Mage::getSingleton('checkout/session')->setData('use_for_shipping', true);
197
+ try {
198
+ $this->getQuote()->getBillingAddress()->setCountryId($data['country_id'])->setPostcode($data['postcode'])->setRegionId($data['region_id'])->save();
199
+ $result['shippingMethod'] = $this->_getShippingMethodsHtml();
200
+ $result['payment'] = $this->_getPaymentMethodsHtml();
201
+ }
202
+ catch (Exception $e) {
203
+ $result['success'] = false;
204
+ $result['error'] = true;
205
+ $result['error_messages'] = $e->getMessage();
206
+ }
207
+ }
208
+ $this->getResponse()->setBody(Zend_Json::encode($result));
209
+ }
210
+ }
211
+
212
+ public function save_Before_ReviewAction()
213
+ {
214
+ if ($this->_expireAjax()) {
215
+ return;
216
+ }
217
+
218
+ $result = array();
219
+ $billdata = $this->getRequest()->getPost();
220
+ if($heard=$this->getRequest()->getPost('easycheckout_heard')){
221
+ if($this->getRequest()->getPost('easycheckout_other') && $heard=="Others"){
222
+ $heard=$this->getRequest()->getPost('easycheckout_other');
223
+ }
224
+ $this->getOnepage()->getQuote()->setData('easycheckout_heard', $heard);
225
+ }
226
+ if($comment=$this->getRequest()->getPost('easycheckout_comment')){
227
+ $this->getOnepage()->getQuote()->setData('easycheckout_comment', nl2br(strip_tags($comment)));
228
+ }
229
+ if ($billdata) {
230
+ $data = $this->getRequest()->getPost('billing', array());
231
+
232
+ if (!$data['use_for_shipping']) {
233
+ Mage::getSingleton('checkout/session')->setData('use_for_shipping', false);
234
+ $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
235
+ if (isset($data['email'])) {
236
+ $data['email'] = trim($data['email']);
237
+ }
238
+ $this->getOnepage()->saveBilling($data, $customerAddressId);
239
+ $customerAddressId2 = $this->getRequest()->getPost('shipping_address_id', false);
240
+ $this->getOnepage()->saveShipping($data, $customerAddressId2);
241
+ $this->getQuote()->collectTotals()->save();
242
+ } else {
243
+ $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
244
+ if (isset($data['email'])) {
245
+ $data['email'] = trim($data['email']);
246
+ }
247
+ $this->getOnepage()->saveBilling($data, $customerAddressId);
248
+ if($data2 = $this->getRequest()->getPost('shipping', array())){
249
+ $customerAddressId2 = $this->getRequest()->getPost('shipping_address_id', false);
250
+ $this->getOnepage()->saveShipping($data2, $customerAddressId2);
251
+ }
252
+ $this->getQuote()->collectTotals()->save();
253
+ }
254
+ if (isset($data['email'])) {
255
+ $data['email'] = trim($data['email']);
256
+ }
257
+ if($this->getRequest()->getParam('is_subscribed', false)) {
258
+ if(!$email=Mage::getSingleton('customer/session')->getCustomer()->getEmail()){
259
+ $email=$data['email'];
260
+ }
261
+ $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
262
+ if(!$subscriber->getId()){
263
+ $status = Mage::getModel('newsletter/subscriber')->subscribe($email);
264
+ if ($status == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {
265
+ $result['email']=($this->__('Confirmation request has been sent'));
266
+ }
267
+ }
268
+ }
269
+ }
270
+ $result['success'] = true;
271
+ $result['error'] = false;
272
+ $this->getResponse()->setBody(Zend_Json::encode($result));
273
+ return;
274
+ }
275
+
276
+
277
+ public function saveShippingAction()
278
+ {
279
+ if ($this->_expireAjax()) {
280
+ return;
281
+ }
282
+ Mage::getSingleton('checkout/session')->setData('use_for_shipping', true);
283
+ $result = array();
284
+ $data = $this->getRequest()->getPost();
285
+ if ($data) {
286
+ try {
287
+ $this->getQuote()->getShippingAddress()->setCountryId($data['country_id'])->setPostcode($data['postcode'])->setRegionId($data['region_id'])->save();
288
+ $this->getQuote()->getShippingAddress()->setCollectShippingRates(true);
289
+ $this->getQuote()->collectTotals()->save();
290
+ $result['shippingMethod'] = $this->_getShippingMethodsHtml();
291
+ $result['payment'] = $this->_getPaymentMethodsHtml();
292
+ }
293
+ catch (Exception $e) {
294
+ $result['success'] = false;
295
+ $result['error'] = true;
296
+ $result['error_messages'] = $e->getMessage();
297
+ }
298
+ }
299
+ $this->getResponse()->setBody(Zend_Json::encode($result));
300
+ }
301
+
302
+ public function saveShippingMethodAction() {
303
+ if($this->_expireAjax()) {
304
+ return;
305
+ }
306
+ $result = array();
307
+ $data = $this->getRequest()->getPost();
308
+ if($data) {
309
+ try{
310
+ $return = $this->getOnepage()->saveShippingMethod($data['shipping_method']);
311
+ if(!$return) {
312
+ Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array('request'=>$this->getRequest(), 'quote'=>$this->getOnepage()->getQuote()));
313
+ $this->getQuote()->collectTotals()->save();
314
+ }
315
+ $result['payment'] = $this->_getPaymentMethodsHtml();
316
+ $result['review'] = $this->_getReviewHtml();
317
+ } catch(Exception $e) {
318
+ $result['success'] = false;
319
+ $result['error'] = true;
320
+ $result['error_messages'] = $e->getMessage();
321
+ }
322
+ }
323
+ $this->getResponse()->setBody(Zend_Json::encode($result));
324
+ }
325
+
326
+ public function savePaymentAction()
327
+ {
328
+ if ($this->_expireAjax()) {
329
+ return;
330
+ }
331
+ $result = array();
332
+ $data = $this->getRequest()->getPost();
333
+ if ($data) {
334
+ try {
335
+ $this->getQuote()->getBillingAddress()->setPaymentMethod($data['method'])->save();
336
+ $this->getQuote()->getPayment()->setMethod($data['method'])->save();
337
+ $this->getQuote()->collectTotals();
338
+ Mage::getSingleton('checkout/session')->setRBR(true);
339
+ if($this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl()){
340
+ Mage::getSingleton('checkout/session')->setRBR(false);
341
+ }
342
+ $result['test'] = $this->getQuote()->getPayment()->getMethod();
343
+ $result['review'] = $this->_getReviewHtml();
344
+ }
345
+ catch (Exception $e) {
346
+ $result['success'] = false;
347
+ $result['error'] = true;
348
+ $result['error_messages'] = $e->getMessage();
349
+ }
350
+ }
351
+ $this->getResponse()->setBody(Zend_Json::encode($result));
352
+ }
353
+
354
+ /**
355
+ * Retrieve shopping cart model object
356
+ *
357
+ * @return Mage_Checkout_Model_Cart
358
+ */
359
+ protected function _getCart()
360
+ {
361
+ return Mage::getSingleton('checkout/cart');
362
+ }
363
+
364
+
365
+ /**
366
+ * Get current active quote instance
367
+ *
368
+ * @return Mage_Sales_Model_Quote
369
+ */
370
+ protected function _getQuote()
371
+ {
372
+ return $this->_getCart()->getQuote();
373
+ }
374
+ public function cartupdateAction()
375
+ {
376
+ $a=$this->getRequest()->getParam('productid');
377
+ $b=$this->getRequest()->getParam('update');
378
+ $quote = $this->getQuote();
379
+ $product = $quote->getItemById($a);
380
+ if($b=="inc" && $a ){
381
+
382
+ $qty = intval($product->getQty()+1);
383
+ $maximumQty = intval(Mage::getModel('catalog/product')->load($product->getProductId())->getStockItem()->getMaxSaleQty());
384
+
385
+ if($qty > $maximumQty){
386
+
387
+ $result['error'] = $this->__('Product Has Reached To Maximum Allowed Qty: %s', $maximumQty);
388
+ $this->getResponse()->setBody(Zend_Json::encode($result));
389
+ return;
390
+ }
391
+
392
+ $product->setQty($qty);
393
+ $this->_getQuote()->getShippingAddress()->setCollectShippingRates(true);
394
+
395
+ $quote->collectTotals()
396
+ ->save();
397
+ $result['success'] = $this->__('Increased');
398
+ $this->getResponse()->setBody(Zend_Json::encode($result));
399
+ return;
400
+
401
+ }
402
+ else if ($b=="dec" && $a){
403
+
404
+ $qty = intval($product->getQty()-1);
405
+ $minimumQty = intval(Mage::getModel('catalog/product')->load($product->getProductId())->getStockItem()->getMinSaleQty());
406
+
407
+ if($qty < $minimumQty){
408
+
409
+ $result['error'] = $this->__('Product Has Reached To Minimal Allowed Qty: %s', $minimumQty);
410
+ $this->getResponse()->setBody(Zend_Json::encode($result));
411
+ return;
412
+ }
413
+
414
+ if($qty > 0){
415
+ $product->setQty($qty);
416
+ }else{
417
+ $quote->removeItem($a);
418
+ }
419
+ $this->_getQuote()->getShippingAddress()->setCollectShippingRates(true);
420
+
421
+ $quote->collectTotals()
422
+ ->save();
423
+ $result['success'] = $this->__('Decreased');
424
+ $this->getResponse()->setBody(Zend_Json::encode($result));
425
+ return;
426
+ }
427
+ }
428
+ public function couponPostAction()
429
+ {
430
+ /**
431
+ * No reason continue with empty shopping cart
432
+ */
433
+
434
+ if ($this->_expireAjax()) {
435
+ return;
436
+ }
437
+
438
+ $couponCode = (string) $this->getRequest()->getParam('coupon_code');
439
+ if ($remov=$this->getRequest()->getParam('remove') == 1) {
440
+ $couponCode = '';
441
+ }
442
+ //$result['enabled']=false;
443
+ $oldCouponCode = $this->_getQuote()->getCouponCode();
444
+
445
+ if (!strlen($couponCode) && !strlen($oldCouponCode)) {
446
+ $result['enabled']=false;
447
+ return;
448
+ }
449
+
450
+
451
+ try {
452
+ $this->_getQuote()->getShippingAddress()->setCollectShippingRates(true);
453
+ $this->_getQuote()->setCouponCode(strlen($couponCode) ? $couponCode : '')
454
+ ->collectTotals()
455
+ ->save();
456
+
457
+ if ($couponCode) {
458
+ if ($couponCode == $this->_getQuote()->getCouponCode()) {
459
+ $result['success'] = $this->__('Coupon code "%s" was applied successfully.', Mage::helper('core')->htmlEscape($couponCode));
460
+ $result['reload']=true;
461
+ }
462
+ else {
463
+
464
+ $result['error'] =$this->__('Coupon code "%s" is not valid.', Mage::helper('core')->htmlEscape($couponCode));
465
+ $result['reload']=false;
466
+ }
467
+ } else {
468
+ $result['error'] = $this->__('Coupon code was canceled successfully.');
469
+ $result['reload']=true;
470
+ }
471
+
472
+ }
473
+ catch (Mage_Core_Exception $e) {
474
+ $result['error'] = $e->getMessage();
475
+ }
476
+ catch (Exception $e) {
477
+
478
+ $result['error'] = $this->__('Can not apply coupon code.');
479
+ }
480
+ $this->getResponse()->setBody(Zend_Json::encode($result));
481
+ return;
482
+ }
483
+ public function saveOrderAction()
484
+ {
485
+ if ($this->_expireAjax()) {
486
+ return;
487
+ }
488
+
489
+ if ($this->getRequest()->isPost()) {
490
+ $result = array();
491
+ $paymentData = $this->getRequest()->getPost('payment', array());
492
+ $resultPayment = $this->getOnepage()->savePayment($paymentData);
493
+ // /// for fieldsmanager compatibility ///
494
+ if($fields = $this->getRequest()->getPost('fm_fields', array())){
495
+ Mage::getSingleton('core/session')->setRegistry('');
496
+ foreach($fields as $key=>$value){
497
+ if(substr($key,0,3)=='fm_'){
498
+ Mage::getModel('fieldsmanager/fieldsmanager')->SaveFieldsdata(substr($key,3),$value);
499
+
500
+ }
501
+ }
502
+ }
503
+ Mage::dispatchEvent('checkout_controller_easycheckout_save_order_after', array(
504
+ 'request' => $this->getRequest(),
505
+ 'quote' => $this->getOnepage()->getQuote()
506
+ ));
507
+ if($heard=$this->getRequest()->getPost('easycheckout_heard')){
508
+
509
+ if($this->getRequest()->getPost('easycheckout_other') && $heard=="Others"){
510
+ $heard=$this->getRequest()->getPost('easycheckout_other');
511
+ }
512
+ $this->getOnepage()->getQuote()->setData('easycheckout_heard', $heard);
513
+ }
514
+ if($comment=$this->getRequest()->getPost('easycheckout_comment')){
515
+ $this->getOnepage()->getQuote()->setData('easycheckout_comment', nl2br(strip_tags($comment)));
516
+ }
517
+ //save BillingAddres
518
+ $billingPostData = $this->getRequest()->getPost('billing', array());
519
+ if(Mage::getVersion() >= '1.4.0.1' && Mage::getVersion() < '1.4.2.0' ){
520
+ $billingData = $this->_filterPostData($billingPostData);
521
+ }else{
522
+ //Not supported by some versions.
523
+
524
+ $billingData = $billingPostData;
525
+ }
526
+ $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
527
+ if(isset($billingData['register']) && isset($billingData['customer_password'])) {
528
+ $this->getOnepage()->saveCheckoutMethod('register');
529
+ }else{
530
+ $this->getOnepage()->saveCheckoutMethod('guest');
531
+ }
532
+ if (isset($billingData['email'])) {
533
+ $billingData['email'] = trim($billingData['email']);
534
+ }
535
+ if($this->getRequest()->getParam('is_subscribed', false)) {
536
+ if(!$email=Mage::getSingleton('customer/session')->getCustomer()->getEmail()){
537
+ $email=$billingData['email'];
538
+ }
539
+ $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
540
+ if(!$subscriber->getId()){
541
+ $status = Mage::getModel('newsletter/subscriber')->subscribe($email);
542
+ if ($status == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {
543
+ $result['email']=($this->__('Confirmation request has been sent'));
544
+ }
545
+ }
546
+ }
547
+ $resultBilling = $this->getOnepage()->saveBilling($billingData, $customerAddressId);
548
+ if (isset($resultBilling['error'])) {
549
+ $result['success'] = false;
550
+ $result['error'] = true;
551
+ if(is_array($resultBilling['message'])){
552
+ $errors = implode(' And ',$resultBilling['message']);
553
+ }else{
554
+ $errors = $resultBilling['message'];
555
+ }
556
+ $result['error_messages'] = 'Billing Error: ' . $errors;
557
+ $this->getResponse()->setBody(Zend_Json::encode($result));
558
+ return;
559
+ }
560
+ if(isset($billingData['register']) && $billingData['register'] == 1){
561
+ $iscustomer = Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('email',$billingData['email'])->getData();
562
+ if(count($iscustomer) > 0){
563
+ $result['success'] = false;
564
+ $result['error'] = true;
565
+ $result['error_messages'] = 'Billing Error: ' . $this->__('There is already a customer registered using this email address. Please login using this email address or enter a different email address to register your account.');
566
+ $this->getResponse()->setBody(Zend_Json::encode($result));
567
+ return;
568
+ }
569
+ }
570
+ if (isset($billingData['use_for_shipping']) && $billingData['use_for_shipping'] == 1) {
571
+ //save ShippingAddress
572
+ $shippingData = $this->getRequest()->getPost('shipping', array());
573
+ $customerAddressId = $this->getRequest()->getPost('shipping_address_id', false);
574
+ $resultShipping = $this->getOnepage()->saveShipping($shippingData, $customerAddressId);
575
+ if (isset($resultShipping['error'])) {
576
+ $result['success'] = false;
577
+ $result['error'] = true;
578
+ if(is_array($resultShipping['message'])){
579
+ $errors = implode(' And ',$resultShipping['message']);
580
+ }else{
581
+ $errors = $resultShipping['message'];
582
+ }
583
+ $result['error_messages'] = 'Shipping Error: ' . $errors;
584
+ $this->getResponse()->setBody(Zend_Json::encode($result));
585
+ return;
586
+ }
587
+ } else {
588
+ $resultShipping = $this->getOnepage()->saveShipping($billingData, $customerAddressId);
589
+ if (isset($resultShipping['error'])) {
590
+ $result['success'] = false;
591
+ $result['error'] = true;
592
+ if(is_array($resultShipping['message'])){
593
+ $errors = implode(' And ',$resultShipping['message']);
594
+ }else{
595
+ $errors = $resultShipping['message'];
596
+ }
597
+ $result['error_messages'] = 'Shipping Error: ' . $errors;
598
+ $this->getResponse()->setBody(Zend_Json::encode($result));
599
+ return;
600
+ }
601
+ }
602
+ //save Shipping Method
603
+ $shippingMethodData = $this->getRequest()->getPost('shipping_method', '');
604
+ $resultShippingMethod = $this->getOnepage()->saveShippingMethod($shippingMethodData,'');
605
+
606
+ try {
607
+ //save Payment
608
+ $paymentData = $this->getRequest()->getPost('payment', array());
609
+ $resultPayment = $this->getOnepage()->savePayment($paymentData);
610
+ //$redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
611
+ // $this->getResponse()->setBody(Zend_Json::encode($redirectUrl));
612
+ //return;
613
+
614
+
615
+ if ($this->getRequest()->getPost('payment', false) && Mage::getSingleton('checkout/session')->getRBR()) {
616
+ $data= $this->getRequest()->getPost('payment', false);
617
+ $this->getOnepage()->getQuote()->getPayment()->importData($data);
618
+ $this->getOnepage()->saveOrder();
619
+ $redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl();
620
+ }
621
+
622
+ if (isset($resultPayment['error'])) {
623
+ $result['success'] = false;
624
+ $result['error'] = true;
625
+ $result['error_messages'] = 'Your order cannot be completed at this time as there is no payment methods available for it.';
626
+ $this->getResponse()->setBody(Zend_Json::encode($result));
627
+ return;
628
+ }
629
+ }
630
+ catch (Mage_Payment_Exception $e) {
631
+ if ($e->getFields()) {
632
+ $result['fields'] = $e->getFields();
633
+ }
634
+ $result['success'] = false;
635
+ $result['error'] = true;
636
+ $result['error_messages'] = 'Payment Method Error:' . $e->getMessage();
637
+ $this->getResponse()->setBody(Zend_Json::encode($result));
638
+ return;
639
+ }
640
+ catch (Mage_Core_Exception $e) {
641
+ $result['success'] = false;
642
+ $result['error'] = true;
643
+ $result['error_messages'] = 'Core Exception: ' . $e->getMessage();
644
+ $this->getResponse()->setBody(Zend_Json::encode($result));
645
+ return;
646
+ }
647
+ catch (Exception $e) {
648
+ Mage::logException($e);
649
+ $result['success'] = false;
650
+ $result['error'] = true;
651
+ $result['error_messages'] = 'Exception: ' . $this->__('Unable to set Payment Method.');
652
+ $this->getResponse()->setBody(Zend_Json::encode($result));
653
+ return;
654
+ }
655
+
656
+ try {
657
+ if ($requiredAgreements = Mage::helper('checkout')->getRequiredAgreementIds()) {
658
+ $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));
659
+ if ($diff = array_diff($requiredAgreements, $postedAgreements)) {
660
+ $result['success'] = false;
661
+ $result['error'] = true;
662
+ $result['error_messages'] = $this->__('Please agree to all Terms and Conditions before placing the order.');
663
+ $this->getResponse()->setBody(Zend_Json::encode($result));
664
+ return;
665
+ }
666
+ }
667
+ if($this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl()){
668
+
669
+ $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
670
+
671
+ }
672
+
673
+ $result['success'] = true;
674
+ $result['error'] = false;
675
+ }
676
+ catch (Mage_Core_Exception $e) {
677
+ Mage::logException($e);
678
+ Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage());
679
+ $this->getOnepage()->getQuote()->save();
680
+ $result['success'] = false;
681
+ $result['error'] = true;
682
+ $result['error_messages'] = $e->getMessage();
683
+ $this->getResponse()->setBody(Zend_Json::encode($result));
684
+ return;
685
+ }
686
+ catch (Exception $e) {
687
+ Mage::logException($e);
688
+ Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage());
689
+ $this->getOnepage()->getQuote()->save();
690
+ $result['success'] = false;
691
+ $result['error'] = true;
692
+ $result['error_messages'] = 'Exception: ' . $this->__('There was an error processing your order. Please contact us or try again later.');
693
+ $this->getResponse()->setBody(Zend_Json::encode($result));
694
+ return;
695
+ }
696
+
697
+ if ($redirectUrl) {
698
+ $result['redirect'] = $redirectUrl;
699
+ }
700
+ $this->getOnepage()->getQuote()->save();
701
+ //$result['error'] = '123';
702
+ $this->getCheckout()->unsetData('use_for_shipping');
703
+ $this->getResponse()->setBody(Zend_Json::encode($result));
704
+ }
705
+ }
706
+
707
+ protected function getCheckout()
708
+ {
709
+ return $this->getOnepage()->getCheckout();
710
+ }
711
+ protected function _getReviewHtml()
712
+ {
713
+ $layout = $this->getLayout();
714
+ $update = $layout->getUpdate();
715
+ $update->load('checkout_onestep_review');
716
+ $layout->generateXml();
717
+ $layout->generateBlocks();
718
+ $output = $layout->getOutput();
719
+ return $output;
720
+ }
721
+ protected function _getShippingMethodsHtml()
722
+ {
723
+ $layout = $this->getLayout();
724
+ $update = $layout->getUpdate();
725
+ $update->load('checkout_onestep_shippingmethod');
726
+ $layout->generateXml();
727
+ $layout->generateBlocks();
728
+ $output = $layout->getOutput();
729
+ return $output;
730
+ }
731
+
732
+ protected function _getPaymentMethodsHtml()
733
+ {
734
+ $layout = $this->getLayout();
735
+ $update = $layout->getUpdate();
736
+ $update->load('checkout_onestep_paymentmethod');
737
+ $layout->generateXml();
738
+ $layout->generateBlocks();
739
+ $output = $layout->getOutput();
740
+ return $output;
741
+ }
742
+ private function getQuote()
743
+ {
744
+ return $this->getCheckout()->getQuote();
745
+ }
746
+
747
+ private function setDefaultCountryId()
748
+ {
749
+ $defaultCountry = Mage::getStoreConfig('general/country/default');
750
+ $this->getQuote()->getShippingAddress()->setCountryId($defaultCountry)->save();
751
+ }
752
+ }
app/code/local/Magegaga/Easycheckout/etc/adminhtml.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <all>
6
+ <title>Allow Everything</title>
7
+ </all>
8
+ <admin>
9
+ <children>
10
+ <system>
11
+ <children>
12
+ <config>
13
+ <children>
14
+ <easycheckout translate="title">
15
+ <title>Easycheckout Module</title>
16
+ <sort_order>10</sort_order>
17
+ </easycheckout>
18
+ </children>
19
+ </config>
20
+ </children>
21
+ </system>
22
+ </children>
23
+ </admin>
24
+ </resources>
25
+ </acl>
26
+ </config>
app/code/local/Magegaga/Easycheckout/etc/config.xml ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magegaga_Easycheckout>
5
+ <version>2.0.0</version>
6
+ </Magegaga_Easycheckout>
7
+ </modules>
8
+ <frontend>
9
+ <secure_url>
10
+ <checkout_onestep>/checkout/onestep</checkout_onestep>
11
+ </secure_url>
12
+ <routers>
13
+ <checkout>
14
+ <args>
15
+ <modules>
16
+ <Magegaga_Easycheckout before="Mage_Checkout">Magegaga_Easycheckout</Magegaga_Easycheckout>
17
+ </modules>
18
+ </args>
19
+ </checkout>
20
+ </routers>
21
+ <layout>
22
+ <updates>
23
+ <easycheckout>
24
+ <file>easycheckout.xml</file>
25
+ </easycheckout>
26
+ </updates>
27
+ </layout>
28
+ <events>
29
+ <checkout_controller_easycheckout_save_order_after>
30
+ <observers>
31
+ <giftmessage>
32
+ <type>model</type>
33
+ <class>giftmessage/observer</class>
34
+ <method>checkoutEventCreateGiftMessage</method>
35
+ </giftmessage>
36
+ </observers>
37
+ </checkout_controller_easycheckout_save_order_after>
38
+ </events>
39
+ <translate>
40
+ <modules>
41
+ <Magegaga_Easycheckout>
42
+ <files>
43
+ <default>Magegaga_Easycheckout.csv</default>
44
+ </files>
45
+ </Magegaga_Easycheckout>
46
+ </modules>
47
+ </translate>
48
+ </frontend>
49
+ <admin>
50
+ <routers>
51
+ <easycheckoutadmin>
52
+ <use>admin</use>
53
+ <args>
54
+ <module>Magegaga_Easycheckout</module>
55
+ <frontName>easycheckoutadmin</frontName>
56
+ </args>
57
+ </easycheckoutadmin>
58
+ </routers>
59
+ </admin>
60
+ <adminhtml>
61
+ <menu>
62
+ <magegaga_extensions>
63
+ <title>Magegaga Extensions</title>
64
+ <sort_order>71</sort_order>
65
+ <children>
66
+ <easycheckout module="easycheckout">
67
+ <title>Easycheckout</title>
68
+ <sort_order>71</sort_order>
69
+ <children>
70
+ <settings translate="title">
71
+ <title>Settings</title>
72
+ <sort_order>2</sort_order>
73
+ <action>adminhtml/system_config/edit/section/easycheckout/</action>
74
+ </settings>
75
+ </children>
76
+ </easycheckout>
77
+ </children>
78
+ </magegaga_extensions>
79
+ </menu>
80
+ <acl>
81
+ <resources>
82
+ <all>
83
+ <title>Allow Everything</title>
84
+ </all>
85
+ <admin>
86
+ <children>
87
+ <magegaga_extensions>
88
+ <title>Magegaga Extensions</title>
89
+ <sort_order>71</sort_order>
90
+ <action>adminhtml/system_config/edit/section/easycheckout/</action>
91
+ </magegaga_extensions>
92
+ <system>
93
+ <children>
94
+ <config>
95
+ <children>
96
+ <easycheckout translate="title" module="easycheckout">
97
+ <title>Easycheckout Section</title>
98
+ </easycheckout>
99
+ </children>
100
+ </config>
101
+ </children>
102
+ </system>
103
+ </children>
104
+ </admin>
105
+ </resources>
106
+ </acl>
107
+ <layout>
108
+ <updates>
109
+ <easycheckout module="easycheckout">
110
+ <file>easycheckout.xml</file>
111
+ </easycheckout>
112
+ </updates>
113
+ </layout>
114
+ </adminhtml>
115
+ <global>
116
+
117
+ <models>
118
+ <easycheckout>
119
+ <class>Magegaga_Easycheckout_Model</class>
120
+ </easycheckout>
121
+ </models>
122
+ <blocks>
123
+ <easycheckout>
124
+ <class>Magegaga_Easycheckout_Block</class>
125
+ </easycheckout>
126
+ </blocks>
127
+ <fieldsets>
128
+ <sales_convert_quote>
129
+ <easycheckout_comment><to_order>easycheckout_comment</to_order></easycheckout_comment>
130
+ <easycheckout_heard><to_order>easycheckout_heard</to_order></easycheckout_heard>
131
+ </sales_convert_quote>
132
+ </fieldsets>
133
+ <helpers>
134
+ <easycheckout>
135
+ <class>Magegaga_Easycheckout_Helper</class>
136
+ </easycheckout>
137
+ </helpers>
138
+ <resources>
139
+ <easycheckout_setup>
140
+ <setup>
141
+ <module>Magegaga_Easycheckout</module>
142
+ </setup>
143
+ <connection>
144
+ <use>core_setup</use>
145
+ </connection>
146
+ </easycheckout_setup>
147
+ <easycheckout_write>
148
+ <connection>
149
+ <use>core_write</use>
150
+ </connection>
151
+ </easycheckout_write>
152
+ <easycheckout_read>
153
+ <connection>
154
+ <use>core_read</use>
155
+ </connection>
156
+ </easycheckout_read>
157
+ </resources>
158
+ <events>
159
+ <controller_action_predispatch_checkout_onepage_index>
160
+ <observers>
161
+ <magegaga_easycheckout_observer>
162
+ <type>singleton</type>
163
+ <class>easycheckout/observer</class>
164
+ <method>EasycheckoutRedirect</method>
165
+ </magegaga_easycheckout_observer>
166
+ </observers>
167
+ </controller_action_predispatch_checkout_onepage_index>
168
+ <adminhtml_controller_action_predispatch_start>
169
+ <observers>
170
+ <magegaga_easycheckout_event>
171
+ <type>singleton</type>
172
+ <class>Magegaga_Easycheckout_Controller_Event</class>
173
+ <method>customTheme</method>
174
+ </magegaga_easycheckout_event>
175
+ </observers>
176
+ </adminhtml_controller_action_predispatch_start>
177
+ </events>
178
+ </global>
179
+ <default>
180
+ <easycheckout>
181
+ <general>
182
+ <active>1</active>
183
+ <title><![CDATA[Quick Checkout]]></title>
184
+ <enable_content>1</enable_content>
185
+ <content><![CDATA[Enter the required options for easy checkout process]]></content>
186
+ <label_comments><![CDATA[Enter Any Special Comments]]></label_comments>
187
+ <enable_newsletter>1</enable_newsletter><enable_comments>1</enable_comments>
188
+ <enable_cartupdate>1</enable_cartupdate><enable_coupon>1</enable_coupon>
189
+ <enable_login>1</enable_login><enable_register>1</enable_register>
190
+ <update_country>1</update_country><update_zip>1</update_zip><update_state>1</update_state>
191
+ </general>
192
+ <css_style>
193
+ <admin><![CDATA[easycheckout]]></admin>
194
+ <agreement>200</agreement>
195
+ </css_style>
196
+ <quickheared>
197
+ <enable_quickheared>1</enable_quickheared><label_quickheared><![CDATA[Which Source Lead You To Us]]> </label_quickheared><options_quickheared><![CDATA[Google,Magazine Advertising,Newspaper,Friend]]></options_quickheared>
198
+ </quickheared>
199
+ </easycheckout>
200
+ </default>
201
+ </config>
app/code/local/Magegaga/Easycheckout/etc/system.xml ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <magegaga_extensions translate="label" module="easycheckout">
5
+ <label>Magegaga Extensions</label>
6
+ <sort_order>100</sort_order>
7
+ </magegaga_extensions>
8
+ </tabs>
9
+ <sections>
10
+ <easycheckout>
11
+ <label>One Page Checkout</label>
12
+ <tab>magegaga_extensions</tab>
13
+ <class>separator-top</class>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>150</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <groups>
20
+ <general translate="label">
21
+ <label>General</label>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>0</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <fields>
28
+ <active translate="label">
29
+ <label>Enable One Page Checkout</label>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_model>
32
+ <sort_order>1</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ </active>
37
+ <title translate="label">
38
+ <label>One Page Checkout Title</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>10</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </title>
45
+ <enable_content translate="label">
46
+ <label>Enable One Page Checkout Content</label>
47
+ <frontend_type>select</frontend_type>
48
+ <source_model>adminhtml/system_config_source_yesno</source_model>
49
+ <sort_order>20</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </enable_content>
54
+ <content translate="label">
55
+ <label>Enter One Page Checkout Content</label>
56
+ <frontend_type>textarea</frontend_type>
57
+ <sort_order>21</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ </content>
62
+ <enable_terms translate="label">
63
+ <label>Enable One Page Checkout Terms and Conditions</label>
64
+ <frontend_type>select</frontend_type>
65
+ <source_model>adminhtml/system_config_source_yesno</source_model>
66
+ <sort_order>51</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ </enable_terms>
71
+ <conditions translate="label">
72
+ <label>Enter Content for Terms and Conditions</label>
73
+ <frontend_type>textarea</frontend_type>
74
+ <sort_order>52</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
+ </conditions>
79
+
80
+ <enable_detail translate="label">
81
+ <label>Enable Billing Detail on One Page Checkout</label>
82
+ <frontend_type>select</frontend_type>
83
+ <source_model>adminhtml/system_config_source_yesno</source_model>
84
+ <sort_order>25</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ </enable_detail>
89
+ <enable_newsletter translate="label">
90
+ <label>Enable NewsLetter Subscription on One Page Checkout</label>
91
+ <frontend_type>select</frontend_type>
92
+ <source_model>easycheckout/checkbox</source_model>
93
+ <sort_order>28</sort_order>
94
+ <show_in_default>1</show_in_default>
95
+ <show_in_website>1</show_in_website>
96
+ <show_in_store>1</show_in_store>
97
+ </enable_newsletter>
98
+ <enable_comments translate="label">
99
+ <label>Enable Comments on One Page Checkout</label>
100
+ <frontend_type>select</frontend_type>
101
+ <source_model>adminhtml/system_config_source_yesno</source_model>
102
+ <sort_order>31</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
+ </enable_comments>
107
+ <label_comments translate="label">
108
+ <label>Label For Comments on One Page Checkout</label>
109
+ <frontend_type>text</frontend_type>
110
+ <sort_order>32</sort_order>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>1</show_in_store>
114
+ <validate>required-entry</validate>
115
+ </label_comments>
116
+ <enable_cartupdate translate="label">
117
+ <label>Allow to change Quantity on One Page Checkout</label>
118
+ <frontend_type>select</frontend_type>
119
+ <source_model>adminhtml/system_config_source_yesno</source_model>
120
+ <sort_order>34</sort_order>
121
+ <show_in_default>1</show_in_default>
122
+ <show_in_website>1</show_in_website>
123
+ <show_in_store>1</show_in_store>
124
+ </enable_cartupdate>
125
+ <enable_coupon translate="label">
126
+ <label>Enable Coupon on One Page Checkout</label>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>adminhtml/system_config_source_yesno</source_model>
129
+ <sort_order>35</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ </enable_coupon>
134
+ <enable_login translate="label">
135
+ <label>Enable Login link on One Page Checkout</label>
136
+ <frontend_type>select</frontend_type>
137
+ <source_model>adminhtml/system_config_source_yesno</source_model>
138
+ <sort_order>37</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>1</show_in_store>
142
+ </enable_login>
143
+ <login translate="label">
144
+ <label>Enter One Page Checkout Login Link Context</label>
145
+ <frontend_type>text</frontend_type>
146
+ <sort_order>38</sort_order>
147
+ <show_in_default>1</show_in_default>
148
+ <show_in_website>1</show_in_website>
149
+ <show_in_store>1</show_in_store>
150
+ </login>
151
+ <enable_register translate="label">
152
+ <label>Enable Customer Registration on One Page Checkout</label>
153
+ <frontend_type>select</frontend_type>
154
+ <source_model>easycheckout/checkbox</source_model>
155
+ <sort_order>40</sort_order>
156
+ <show_in_default>1</show_in_default>
157
+ <show_in_website>1</show_in_website>
158
+ <show_in_store>1</show_in_store>
159
+ </enable_register>
160
+ <enable_autogenerate translate="label">
161
+ <label>Enable Auto Password Generator on One Page Checkout</label>
162
+ <frontend_type>select</frontend_type>
163
+ <source_model>adminhtml/system_config_source_yesno</source_model>
164
+ <sort_order>41</sort_order>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>1</show_in_store>
168
+ </enable_autogenerate>
169
+ <length_autogenerate translate="label">
170
+ <label>Enter the length of Auto Generator Password</label>
171
+ <frontend_type>text</frontend_type>
172
+ <sort_order>42</sort_order>
173
+ <show_in_default>1</show_in_default>
174
+ <show_in_website>1</show_in_website>
175
+ <show_in_store>1</show_in_store>
176
+ <validate>validate-digits</validate>
177
+ </length_autogenerate>
178
+ <update_country translate="label">
179
+ <label>Update Shipping/Payment Methods on Country Change</label>
180
+ <frontend_type>select</frontend_type>
181
+ <source_model>adminhtml/system_config_source_yesno</source_model>
182
+ <sort_order>45</sort_order>
183
+ <show_in_default>1</show_in_default>
184
+ <show_in_website>1</show_in_website>
185
+ <show_in_store>1</show_in_store>
186
+ </update_country>
187
+ <update_zip translate="label">
188
+ <label>Update Shipping/Payment Methods on Zip/Postal code Change</label>
189
+ <frontend_type>select</frontend_type>
190
+ <source_model>adminhtml/system_config_source_yesno</source_model>
191
+ <sort_order>47</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>1</show_in_website>
194
+ <show_in_store>1</show_in_store>
195
+ </update_zip>
196
+ <update_state translate="label">
197
+ <label>Update Shipping/Payment Methods on State/Province Change</label>
198
+ <frontend_type>select</frontend_type>
199
+ <source_model>adminhtml/system_config_source_yesno</source_model>
200
+ <sort_order>50</sort_order>
201
+ <show_in_default>1</show_in_default>
202
+ <show_in_website>1</show_in_website>
203
+ <show_in_store>1</show_in_store>
204
+ </update_state>
205
+ </fields>
206
+ </general>
207
+ <quickheared>
208
+ <label>Ask Sources From Customers which Lead Them To Your Site.</label>
209
+ <frontend_type>text</frontend_type>
210
+ <sort_order>10</sort_order>
211
+ <show_in_default>1</show_in_default>
212
+ <show_in_website>1</show_in_website>
213
+ <show_in_store>1</show_in_store>
214
+ <fields>
215
+ <enable_quickheared translate="label">
216
+ <label>Enable Quick Heared </label>
217
+ <frontend_type>select</frontend_type>
218
+ <source_model>easycheckout/required</source_model>
219
+ <sort_order>41</sort_order>
220
+ <show_in_default>1</show_in_default>
221
+ <show_in_website>1</show_in_website>
222
+ <show_in_store>1</show_in_store>
223
+ </enable_quickheared>
224
+ <label_quickheared translate="label">
225
+ <label>Enter Label For Quick Heared </label>
226
+ <frontend_type>text</frontend_type>
227
+ <sort_order>42</sort_order>
228
+ <show_in_default>1</show_in_default>
229
+ <show_in_website>1</show_in_website>
230
+ <show_in_store>1</show_in_store>
231
+ <validate>required-entry</validate>
232
+ </label_quickheared>
233
+ <options_quickheared translate="label">
234
+ <label>Enter The Well Known Sources For Quick Heared </label>
235
+ <frontend_type>textarea</frontend_type>
236
+ <sort_order>43</sort_order>
237
+ <show_in_default>1</show_in_default>
238
+ <show_in_website>1</show_in_website>
239
+ <show_in_store>1</show_in_store>
240
+ <comment><![CDATA[Seperate each option with comma <br/>Example <b>Google,Magazine Advertising,Newspaper</b><br/>Please don't Include the option <b>Others</b> ]]></comment>
241
+ </options_quickheared>
242
+ </fields>
243
+ </quickheared>
244
+ <css_style translate="label">
245
+ <label>Theme</label>
246
+ <frontend_type>text</frontend_type>
247
+ <comment><![CDATA[Enter Color Code as <b>#000000</b> ]]></comment>
248
+ <sort_order>10</sort_order>
249
+ <show_in_default>1</show_in_default>
250
+ <show_in_website>1</show_in_website>
251
+ <show_in_store>1</show_in_store>
252
+ <fields>
253
+ <admin>
254
+ <label>Admin Theme</label>
255
+ <frontend_type>text</frontend_type>
256
+ <sort_order>5</sort_order>
257
+ <show_in_default>1</show_in_default>
258
+ <show_in_website>1</show_in_website>
259
+ <show_in_store>1</show_in_store>
260
+ <comment><![CDATA[Do not Change this if you don't know how to handle it ]]></comment>
261
+ </admin>
262
+ <heading translate="label">
263
+ <label>Enter Color Code For Tabs Background</label>
264
+ <frontend_type>text</frontend_type>
265
+ <sort_order>10</sort_order>
266
+ <show_in_default>1</show_in_default>
267
+ <show_in_website>1</show_in_website>
268
+ <show_in_store>1</show_in_store>
269
+ </heading>
270
+ <heading_text translate="label">
271
+ <label>Enter CSS Style For Tabs Heading</label>
272
+ <frontend_type>textarea</frontend_type>
273
+ <comment><![CDATA[Example <b>color:#FFF;font: 18px/28px Trebuchet MS;</b> ]]></comment>
274
+ <sort_order>15</sort_order>
275
+ <show_in_default>1</show_in_default>
276
+ <show_in_website>1</show_in_website>
277
+ <show_in_store>1</show_in_store>
278
+ </heading_text>
279
+ <button translate="label">
280
+ <label>Enter CSS Style For Buttons</label>
281
+ <frontend_type>textarea</frontend_type>
282
+ <comment><![CDATA[Example <b>color:#000;background: #1474FC;</b> ]]></comment>
283
+ <sort_order>20</sort_order>
284
+ <show_in_default>1</show_in_default>
285
+ <show_in_website>1</show_in_website>
286
+ <show_in_store>1</show_in_store>
287
+ </button>
288
+ <agreement translate="label">
289
+ <label>Enter the width of Agreements Popups</label>
290
+ <frontend_type>text</frontend_type>
291
+ <comment><![CDATA[Enter in pixels. Example <b>200</b> ]]></comment>
292
+ <sort_order>30</sort_order>
293
+ <show_in_default>1</show_in_default>
294
+ <show_in_website>1</show_in_website>
295
+ <show_in_store>1</show_in_store>
296
+ <validate>validate-digits</validate>
297
+ </agreement>
298
+ </fields>
299
+ </css_style>
300
+ <ajax_text>
301
+ <label>Ajax Loading Message</label>
302
+ <frontend_type>text</frontend_type>
303
+ <sort_order>20</sort_order>
304
+ <show_in_default>1</show_in_default>
305
+ <show_in_website>1</show_in_website>
306
+ <show_in_store>1</show_in_store>
307
+ <fields>
308
+ <login translate="label">
309
+ <label>Login Validation</label>
310
+ <frontend_type>text</frontend_type>
311
+ <sort_order>1</sort_order>
312
+ <show_in_default>1</show_in_default>
313
+ <show_in_website>1</show_in_website>
314
+ <show_in_store>1</show_in_store>
315
+ </login>
316
+ <forgotpass translate="label">
317
+ <label>Forgot Password Loading</label>
318
+ <frontend_type>text</frontend_type>
319
+ <sort_order>5</sort_order>
320
+ <show_in_default>1</show_in_default>
321
+ <show_in_website>1</show_in_website>
322
+ <show_in_store>1</show_in_store>
323
+ </forgotpass>
324
+ <ship_method translate="label">
325
+ <label>Shipping Method</label>
326
+ <frontend_type>text</frontend_type>
327
+ <sort_order>10</sort_order>
328
+ <show_in_default>1</show_in_default>
329
+ <show_in_website>1</show_in_website>
330
+ <show_in_store>1</show_in_store>
331
+ </ship_method>
332
+ <pay_method translate="label">
333
+ <label>Payment Method</label>
334
+ <frontend_type>text</frontend_type>
335
+ <sort_order>20</sort_order>
336
+ <show_in_default>1</show_in_default>
337
+ <show_in_website>1</show_in_website>
338
+ <show_in_store>1</show_in_store>
339
+ </pay_method>
340
+ <review translate="label">
341
+ <label>Review Order</label>
342
+ <frontend_type>text</frontend_type>
343
+ <sort_order>30</sort_order>
344
+ <show_in_default>1</show_in_default>
345
+ <show_in_website>1</show_in_website>
346
+ <show_in_store>1</show_in_store>
347
+ </review>
348
+ <order translate="label">
349
+ <label>Order Submission</label>
350
+ <frontend_type>text</frontend_type>
351
+ <sort_order>40</sort_order>
352
+ <show_in_default>1</show_in_default>
353
+ <show_in_website>1</show_in_website>
354
+ <show_in_store>1</show_in_store>
355
+ </order>
356
+ </fields>
357
+ </ajax_text>
358
+
359
+ </groups>
360
+ </easycheckout>
361
+ </sections>
362
+ </config>
app/code/local/Magegaga/Easycheckout/sql/easycheckout_setup/mysql4-upgrade-1.0.0-2.0.0.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ $installer = $this;
5
+ $connection = $installer->getConnection();
6
+ $installer->startSetup();
7
+ try{
8
+ $installer->run("
9
+ ALTER TABLE `{$installer->getTable('sales/quote')}`
10
+ ADD `easycheckout_heard` TEXT NULL ,
11
+ ADD `easycheckout_comment` TEXT NULL
12
+
13
+ ");
14
+ }catch(Exception $e){
15
+ if(strpos($e, 'Column already exists') === false){
16
+ throw $e;
17
+ }
18
+ }
19
+ try{
20
+ $installer->run("
21
+ ALTER TABLE `{$installer->getTable('sales/order')}`
22
+ ADD `easycheckout_heard` TEXT NULL ,
23
+ ADD `easycheckout_comment` TEXT NULL
24
+
25
+ ");
26
+ }catch(Exception $e){
27
+ if(strpos($e, 'Column already exists') === false){
28
+ throw $e;
29
+ }
30
+ }
31
+ $installer->endSetup();
app/design/adminhtml/default/easycheckout/template/sales/order/view/info.phtml ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_order = $this->getOrder() ?>
2
+
3
+ <?php
4
+ $orderAdminDate = $this->formatDate($_order->getCreatedAtDate(), 'medium', true);
5
+ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium', true);
6
+ ?>
7
+ <div class="box-left">
8
+ <!--Order Information-->
9
+ <div class="entry-edit">
10
+ <?php if ($_order->getEmailSent()):
11
+ $_email=$this->__('Order confirmation email sent');
12
+ else:
13
+ $_email=$this->__('Order confirmation email not sent');
14
+ endif; ?>
15
+ <div class="entry-edit-head">
16
+ <?php if ($this->getNoUseOrderLink()): ?>
17
+ <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?> (<?php echo $_email ?>)</h4>
18
+ <?php else: ?>
19
+ <a href="<?php echo $this->getViewUrl($_order->getId()) ?>"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?></a>
20
+ <strong>(<?php echo $_email ?>)</strong>
21
+ <?php endif; ?>
22
+ </div>
23
+ <div class="fieldset">
24
+ <table cellspacing="0" class="form-list">
25
+ <tr>
26
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Order Date') ?></label></td>
27
+ <td><strong><?php echo $orderAdminDate ?></strong></td>
28
+ </tr>
29
+ <?php if ($orderAdminDate != $orderStoreDate):?>
30
+ <tr>
31
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Order Date (%s)', $_order->getCreatedAtStoreDate()->getTimezone()) ?></label></td>
32
+ <td><strong><?php echo $orderStoreDate ?></strong></td>
33
+ </tr>
34
+ <?php endif;?>
35
+ <tr>
36
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Order Status') ?></label></td>
37
+ <td><strong><span id="order_status"><?php echo $_order->getStatusLabel() ?></span></strong></td>
38
+ </tr>
39
+ <tr>
40
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Purchased From') ?></label></td>
41
+ <td><strong><?php echo $this->getOrderStoreName() ?></strong></td>
42
+ </tr>
43
+ <?php if($_order->getRelationChildId()): ?>
44
+ <tr>
45
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Link to the new order') ?></label></td>
46
+ <td><a href="<?php echo $this->getViewUrl($_order->getRelationChildId()) ?>">
47
+ <?php echo $_order->getRelationChildRealId() ?>
48
+ </a></td>
49
+ </tr>
50
+ <?php endif; ?>
51
+ <?php if($_order->getRelationParentId()): ?>
52
+ <tr>
53
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Link to the previous order') ?></label></td>
54
+ <td><a href="<?php echo $this->getViewUrl($_order->getRelationParentId()) ?>">
55
+ <?php echo $_order->getRelationParentRealId() ?>
56
+ </a></td>
57
+ </tr>
58
+ <?php endif; ?>
59
+ <?php if($_order->getRemoteIp()): ?>
60
+ <tr>
61
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Placed from IP') ?></label></td>
62
+ <td><strong><?php echo $_order->getRemoteIp() ?></strong></td>
63
+ </tr>
64
+ <?php endif; ?>
65
+ <?php if($_order->getGlobalCurrencyCode() != $_order->getBaseCurrencyCode()): ?>
66
+ <tr>
67
+ <td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getGlobalCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
68
+ <td><strong><?php echo $_order->getBaseToGlobalRate() ?></strong></td>
69
+ </tr>
70
+ <?php endif; ?>
71
+ <?php if($_order->getBaseCurrencyCode() != $_order->getOrderCurrencyCode()): ?>
72
+ <tr>
73
+ <td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getOrderCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
74
+ <td><strong><?php echo $_order->getBaseToOrderRate() ?></strong></td>
75
+ </tr>
76
+ <?php endif; ?>
77
+ </table>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ <div class="box-right">
82
+ <!--Account Information-->
83
+ <div class="entry-edit">
84
+ <div class="entry-edit-head">
85
+ <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Account Information') ?></h4>
86
+ </div>
87
+ <div class="fieldset">
88
+ <div class="hor-scroll">
89
+ <table cellspacing="0" class="form-list">
90
+ <tr>
91
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Customer Name') ?></label></td>
92
+ <td>
93
+ <?php if ($_customerUrl=$this->getCustomerViewUrl()) : ?>
94
+ <a href="<?php echo $_customerUrl ?>" target="_blank"><strong><?php echo $this->htmlEscape($_order->getCustomerName()) ?></strong></a>
95
+ <?php else: ?>
96
+ <strong><?php echo $this->htmlEscape($_order->getCustomerName()) ?></strong>
97
+ <?php endif; ?>
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Email') ?></label></td>
102
+ <td><a href="mailto:<?php echo $_order->getCustomerEmail() ?>"><strong><?php echo $_order->getCustomerEmail() ?></strong></a></td>
103
+ </tr>
104
+ <?php if ($_groupName=$this->getCustomerGroupName()) : ?>
105
+ <tr>
106
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Customer Group') ?></label></td>
107
+ <td><strong><?php echo $_groupName ?></strong></td>
108
+ </tr>
109
+ <?php endif; ?>
110
+ <?php if ($_dob=$this->getOrder()->getCustomerDob()) : ?>
111
+ <tr>
112
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Date of Birth') ?></label></td>
113
+ <td><strong><?php echo Mage::helper('core')->formatDate($_dob, 'medium') ?></strong></td>
114
+ </tr>
115
+ <?php endif; ?>
116
+ <?php if ($_taxvat = $_order->getCustomerTaxvat()):?>
117
+ <tr>
118
+ <td class="label"><label><?php echo Mage::helper('sales')->__('TAX/VAT Number') ?></label></label></td>
119
+ <td><strong><?php echo $this->htmlEscape($_taxvat)?></strong></td>
120
+ </tr>
121
+ <?php endif;?>
122
+ </table>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div class="clear"></div>
128
+ <?php if($clientcomment=$_order->getEasycheckoutComment()): ?>
129
+ <div class="box-left">
130
+ <!--Customer's Comments-->
131
+ <div class="entry-edit">
132
+ <div class="entry-edit-head">
133
+ <h4 class="icon-head head-easycheckout-comment"><?php echo Mage::helper('easycheckout')->getEasycheckoutConfig('general/label_comments'); ?></h4>
134
+ </div>
135
+ <fieldset>
136
+ <easycheckout_comment><?php echo $clientcomment; ?></easycheckout_comment>
137
+ </fieldset>
138
+ </div>
139
+ </div>
140
+ <?php endif; ?>
141
+ <?php if($clientheard=$_order->getEasycheckoutHeard()): ?>
142
+ <!--Customer's heard from-->
143
+ <div class="box-right">
144
+ <div class="entry-edit">
145
+ <div class="entry-edit-head">
146
+ <h4 class="icon-head head-easycheckout-heard"><?php echo Mage::helper('easycheckout')->getEasycheckoutConfig('quickheared/label_quickheared'); ?></h4>
147
+ </div>
148
+ <fieldset>
149
+ <easycheckout_heard><?php echo $clientheard; ?></easycheckout_heard>
150
+ </fieldset>
151
+ </div>
152
+ </div>
153
+ <?php endif; ?>
154
+ <div class="clear"></div>
155
+
156
+ <div class="box-left">
157
+ <!--Billing Address-->
158
+ <div class="entry-edit">
159
+ <div class="entry-edit-head">
160
+ <h4 class="icon-head head-billing-address"><?php echo Mage::helper('sales')->__('Billing Address') ?></h4>
161
+ </div>
162
+ <fieldset>
163
+ <address><?php echo $_order->getBillingAddress()->getFormated(true) ?></address>
164
+ </fieldset>
165
+ </div>
166
+ </div>
167
+ <?php if (!$this->getOrder()->getIsVirtual()): ?>
168
+ <div class="box-right">
169
+ <!--Shipping Address-->
170
+ <div class="entry-edit">
171
+ <div class="entry-edit-head">
172
+ <h4 class="icon-head head-shipping-address"><?php echo Mage::helper('sales')->__('Shipping Address') ?></h4>
173
+ </div>
174
+ <fieldset>
175
+ <address><?php echo $_order->getShippingAddress()->getFormated(true) ?></address>
176
+ </fieldset>
177
+ </div>
178
+ </div>
179
+ <div class="clear"></div>
180
+ <?php endif; ?>
app/design/frontend/default/default/layout/easycheckout.xml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <checkout_onestep_index>
4
+ <reference name="head">
5
+ <action method="addJs" ifconfig="easycheckout/general/active"><script>easycheckout/easycheckout.js</script></action>
6
+ <action method="addCss" ifconfig="easycheckout/general/active"><stylesheet>css/easycheckout/easycheckout.css</stylesheet></action>
7
+ </reference>
8
+ <reference name="root">
9
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
10
+ </reference>
11
+ <reference name="content">
12
+ <block type="checkout/onepage" name="checkout.onepage" template="easycheckout/onestep.phtml">
13
+ <action method="setDummyAddress"/>
14
+ <block type="checkout/onepage_login" name="checkout.onepage.login" as="osc-login" template="easycheckout/onestep/login.phtml">
15
+ <block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before">
16
+ <action method="setMayBeInvisible"><value>1</value></action>
17
+ </block>
18
+ </block>
19
+ <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="easycheckout/onestep/coupon.phtml"/>
20
+ <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="easycheckout/onestep/billing.phtml"/>
21
+ <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="easycheckout/onestep/shipping.phtml"/>
22
+ <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="easycheckout/onestep/shipping_method.phtml">
23
+ <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="easycheckout/onestep/shipping_method/available.phtml"/>
24
+ </block>
25
+ <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="easycheckout/onestep/payment.phtml">
26
+ <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="easycheckout/onestep/payment/methods.phtml">
27
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
28
+ </block>
29
+ </block>
30
+ <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="easycheckout/onestep/review.phtml">
31
+ <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="easycheckout/onestep/coupon.phtml"/>
32
+ <block type="checkout/cart_coupon" name="checkout.cart.coupon.review" as="coupon.review" template="easycheckout/onestep/coupondirect.phtml"/>
33
+ <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="easycheckout/onestep/agreements.phtml"/>
34
+ <block type="core/template" name="checkout.onepage.quickheard" as="quickheard" template="easycheckout/onestep/quickheard.phtml"/>
35
+ <block type="core/template" name="checkout.onepage.billingdetail" as="billingdetail" template="easycheckout/onestep/billingdetail.phtml"/>
36
+ <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="easycheckout/onestep/review/additional.phtml"/>
37
+ </block>
38
+ </block>
39
+ </reference>
40
+ </checkout_onestep_index>
41
+ <checkout_onestep_review>
42
+ <remove name="right"/>
43
+ <remove name="left"/>
44
+ <block type="checkout/onepage_review_info" name="root" output="toHtml" template="easycheckout/onestep/review/info.phtml">
45
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>easycheckout/onestep/review/item.phtml</template></action>
46
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>easycheckout/onestep/review/item.phtml</template></action>
47
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>easycheckout/onestep/review/item.phtml</template></action>
48
+ <action method="addItemRender"><type>downloadable</type><block>downloadable/checkout_cart_item_renderer</block><template>easycheckout/onestep/review/item.phtml</template></action>
49
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>easycheckout/onestep/review/item.phtml</template></action>
50
+ <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
51
+ <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before"/>
52
+ </block>
53
+ </checkout_onestep_review>
54
+ <checkout_onestep_paymentmethod>
55
+ <reference name="root">
56
+ <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" output="toHtml" as="methods" template="easycheckout/onestep/payment/methods.phtml">
57
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
58
+ </block>
59
+ </reference>
60
+ </checkout_onestep_paymentmethod>
61
+ <checkout_onestep_shippingmethod>
62
+ <reference name="root">
63
+ <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" output="toHtml" as="available" template="easycheckout/onestep/shipping_method/available.phtml"/>
64
+ </reference>
65
+ </checkout_onestep_shippingmethod>
66
+ </layout>
app/design/frontend/default/default/template/easycheckout/onestep.phtml ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $checkUseForShipping = Mage::getSingleton('core/session')->getData('use_for_shipping'); ?>
3
+ <script type="text/javascript">
4
+ countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?>
5
+ </script>
6
+ <div class="easycheout_main v-fix f-fix">
7
+ <div class="easycheout_main_header">
8
+ <h1><?php echo Mage::helper('easycheckout')->getEasycheckoutTitle(); ?></h1>
9
+ <h2><?php echo Mage::helper('easycheckout')->getEasycheckoutContent() ?></h2>
10
+ <?php if(!$this->isCustomerLoggedIn() && Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_login')): ?>
11
+
12
+ <?php echo $this->getChildHtml('osc-login'); ?>
13
+
14
+ <?php endif; ?>
15
+
16
+ </div>
17
+ <div id="easycheckout-ajax-loader" style="display:none;">
18
+ <div id="easycheckout-ajax-loader-text"> Loading...</div>
19
+ </div>
20
+
21
+ <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
22
+ <?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; ?>
23
+ <?php if($_stepId == 'login'): ?>
24
+ <div class="onestepcheckout-<?php echo $_stepId ?>">
25
+ <div class="checkout-step-<?php echo $_stepId ?>">
26
+ <?php echo $this->getChildHtml($_stepId) ?>
27
+ </div>
28
+ </div>
29
+ <?php else: ?>
30
+ <?php if($_stepId == 'shipping'): ?>
31
+ <?php if($checkUseForShipping): ?>
32
+ <?php $i++; ?>
33
+ <?php endif; ?>
34
+ <?php else: ?>
35
+ <?php $i++ ?>
36
+ <?php endif; ?>
37
+ <?php if($_stepId == 'billing'): ?>
38
+ <form id="onestepcheckout-form" action="" method="post">
39
+ <div id="os-container" class="clearfix f-fix v-fix">
40
+ <div id="os-row">
41
+ <div id="os-left" class="f-left left">
42
+ <ol class="first">
43
+ <?php endif; ?>
44
+ <?php if($_stepId == 'shipping_method' || $i == 2): ?>
45
+ </ol>
46
+ </div >
47
+ <div id="os-right" class="f-left left">
48
+ <ol class="">
49
+ <?php elseif($_stepId == 'review'):?>
50
+ </ol>
51
+ <div id="os-review" >
52
+ <ol class="">
53
+ <?php endif;?>
54
+ <?php if($_stepId == 'shipping'): ?>
55
+ <li class="step <?php echo $_stepId ?>" <?php if($checkUseForShipping): ?>style="display:block;"<?php else: ?>style="display:none;"<?php endif; ?> id="shipping-address-form">
56
+ <?php else: ?>
57
+ <li class="<?php echo $_stepId ?> ">
58
+ <?php endif; ?>
59
+ <div class="easycheout_headings easycheckout-title" <?php echo "style='". Mage::helper('easycheckout')->getEasycheckoutskin() . "'"; ?>>
60
+ <span id="easycheckout-number" <?php if($_stepId == 'review'): ?>class="step-review"<?php elseif($checkUseForShipping): ?>class="step-<?php echo $i ?>"<?php elseif($_stepId != 'shipping'): ?>class="step-<?php echo $i ?>"<?php endif; ?>></span>
61
+ <h3 <?php echo "style='". Mage::helper('easycheckout')->getEasycheckoutHeadingCSS() . "'"; ?>><?php echo $_stepInfo['label'] ?></h3>
62
+ </div>
63
+ <?php echo $this->getChildHtml($_stepId) ?>
64
+ </li>
65
+ <?php endif; ?>
66
+ <?php endforeach ?>
67
+ </ol>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </form>
73
+ <div class="clear"></div>
74
+ </div>
75
+ <script type="text/javascript">
76
+ //<![CDATA[
77
+ billing.cartupdateinit('<?php echo $this->getUrl('checkout/onestep/cartupdate') ?>');
78
+ var addaddressb4review='<?php echo $this->getUrl('checkout/onestep/save_Before_Review') ?>';
79
+ var easycheckout = new Easycheckout(
80
+ {
81
+ failure: '<?php echo $this->getUrl('checkout/onepage/failure') ?>',
82
+ reloadReview: '<?php echo $this->getUrl('checkout/onestep/reloadReview') ?>',
83
+ reloadPayment: '<?php echo $this->getUrl('checkout/onestep/reloadPayment') ?>',
84
+ success: '<?php echo $this->getUrl('checkout/onepage/success') ?>'
85
+ }
86
+ );
87
+ if($('billing-address-select')) {
88
+ billing.setAddress($('billing-address-select').value);
89
+ } else {
90
+ billing.saveCountry();
91
+ }
92
+
93
+
94
+ function processOnepagecheckoutResponse(response) {
95
+ processResponse (response);
96
+ easycheckout.setLoadWaitingReview('saving_order');
97
+ if (response.get('ret_status') == 'SUCCESS') {
98
+ if (response.get('paydata_bank_name'))
99
+ document.getElementById('ipayment_elv_bank_name').value = response.get('paydata_bank_name');
100
+
101
+ new Ajax.Request(
102
+ saveSessInfoUrlGlobal,
103
+ {
104
+ method:'post',
105
+ parameters: Form.serialize(billing.form)
106
+ }
107
+ );
108
+
109
+ var request = new Ajax.Request(
110
+ billing.saveUrlpayment,
111
+ {
112
+ method:'post',
113
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
114
+ onSuccess: billing.processIpayment.bind(easycheckout),
115
+ onFailure: easycheckout.ajaxFailure.bind(false),
116
+ parameters: Form.serialize(billing.form)
117
+ }
118
+ );
119
+ }
120
+ }
121
+ //]]>
122
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/agreements.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!$this->getAgreements()) return; ?>
2
+ <?php foreach ($this->getAgreements() as $_a): ?>
3
+ <p class="easycheckout-agreement-p">
4
+ <input class="checkbox required-entry" type="checkbox" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->htmlEscape($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $this->htmlEscape($_a->getCheckboxText()) ?></label>
5
+ <a href="#" class="demo-btn" title="<?php echo $_a->getName() ?>" onclick="easycheckout_agreement.show('<?php echo $_a->getId(); ?>')"><?php echo $_a->getName() ?></a>
6
+ </p>
7
+
8
+ <div id="<?php echo 'QC-AG-Bk'. $_a->getId() ;?>" class="easycheckout-agreement-back" style="visibility:hidden;" ></div>
9
+ <div id="<?php echo 'QC-AG-CO' . $_a->getId() ;?>" class="easycheckout-agreement-content" style="display:none;">
10
+ <div style="<?php echo Mage::helper('easycheckout')->getWidth() ?>">
11
+ <a href="#" onclick="easycheckout_agreement.hide('<?php echo $_a->getId();?>')" class="popup_closer"></a>
12
+ <h1><?php echo $_a->getName() ?></h1>
13
+ <div class="easycheckout-agreement-content-p">
14
+ <?php if ($_a->getIsHtml()){echo $_a->getContent();}else{echo nl2br($this->htmlEscape($_a->getContent()));} ?>
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <?php endforeach ?>
20
+
21
+ <script type="text/javascript" charset="utf-8">
22
+ var easycheckout_agreement=new Easycheckout_Agreements();
23
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/billing.phtml ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="clear"></div>
2
+ <ul class="">
3
+ <?php if ($this->customerHasAddresses()): ?>
4
+ <li class="section_2">
5
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
6
+ <div class="input-box">
7
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
8
+ </div>
9
+ </li>
10
+ <?php $primaryBillingAddressId = $this->getCustomer()->getPrimaryBillingAddress()->getId(); ?>
11
+ <script type="text/javascript">
12
+ //<![CDATA[
13
+ $('billing-address-select').observe('change', function(event){billing.setAddress($('billing-address-select').value);}.bind(this));
14
+ billingSelect = $('billing-address-select');
15
+ for(var i=0;i<billingSelect.length;i++) {
16
+ if(billingSelect[i].value == <?php echo $primaryBillingAddressId ?>) {
17
+ billingSelect[i].selected = true;
18
+ }
19
+ }
20
+ //]]
21
+ </script>
22
+ <?php endif; ?>
23
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
24
+
25
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
26
+ <ul>
27
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
28
+ echo $this->getfieldshtml(1);
29
+ }?>
30
+ <li class="section_2"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
31
+ <li class="section_2">
32
+ <div class="section_1">
33
+ <label for="billing:company"><?php echo $this->__('Company') ?></label>
34
+ <div class="input-box">
35
+ <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" />
36
+ </div>
37
+ </div>
38
+ <?php if(!$this->isCustomerLoggedIn()): ?>
39
+ <div class="section_4">
40
+ <label for="billing:email"><?php echo $this->__('Email Address') ?><span class="required">*</span></label>
41
+ <div class="input-box">
42
+ <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" />
43
+ </div>
44
+ </div>
45
+ <?php endif ?>
46
+ </li>
47
+ <li class="section_3">
48
+ <label for="billing:street1"><?php echo $this->__('Address') ?><span class="required">*</span></label>
49
+ <div class="input-box">
50
+ <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" />
51
+ </div>
52
+ </li>
53
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
54
+ <br/>
55
+ <li class="section_3">
56
+ <div class="input-box">
57
+ <input type="text" title="<?php echo $this->__('Street Address '.$_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
58
+ </div>
59
+ </li>
60
+ <?php endfor ?>
61
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
62
+ echo $this->getfieldshtml(2);
63
+ }?>
64
+
65
+ <li class="section_2">
66
+ <label for="billing:country_id"><?php echo $this->__('Country') ?><span class="required">*</span></label>
67
+ <div class="input-box">
68
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
69
+ <script type="text/javascript">
70
+ //<![CDATA[
71
+ <?php if($this->getQuote()->getBillingAddress()->getCountryId()): ?>
72
+ billingCountry = $('billing:country_id');
73
+ billingCountry[billingCountry.selectedIndex].removeAttribute('selected');
74
+ for(var i=0; i<billingCountry.options.length; i++) {
75
+ if(billingCountry[i].value == '<?php echo $this->getQuote()->getBillingAddress()->getCountryId(); ?>') {
76
+ billingCountry[i].setAttribute('selected', true);
77
+ }
78
+ }
79
+ <?php endif; ?>
80
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/update_country')): ?>
81
+ $('billing:country_id').observe('change', function(event){billing.saveCountry();Event.stop(event);}.bind(this));
82
+ <?php endif; ?>
83
+ //]]
84
+ </script>
85
+ </div>
86
+ </li>
87
+ <li class="section_3">
88
+ <label for="billing:city"><?php echo $this->__('City') ?><span class="required">*</span></label>
89
+ <div class="input-box">
90
+ <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" />
91
+ </div>
92
+ </li>
93
+ <li class="section_2">
94
+ <div class="section_1 field-postcode">
95
+ <label for="billing:postcode"><?php echo $this->__('Zip/Postal Code') ?><span class="required">*</span></label>
96
+ <div class="input-box">
97
+ <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="postcode input-text validate-zip-international required-entry" />
98
+ <script type="text/javascript">
99
+ //<![CDATA[
100
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/update_zip')): ?>
101
+ $('billing:postcode').observe('change', function(event){billing.saveCountry();Event.stop(event);}.bind(this));
102
+ <?php endif; ?>
103
+ //]]
104
+ </script>
105
+ </div>
106
+ </div>
107
+ <div class="section_4 field-region">
108
+ <label for="billing:region_id"><?php echo $this->__('State/Province') ?><span class="required">*</span></label>
109
+ <div class="input-box">
110
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="region validate-select" style="display:none;">
111
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
112
+ </select>
113
+ <script type="text/javascript">
114
+ //<![CDATA[
115
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
116
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/update_state')): ?>
117
+ $('billing:region_id').observe('change', function(event){billing.saveCountry();Event.stop(event);}.bind(this));
118
+ <?php endif; ?>
119
+ //]]>
120
+ </script>
121
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="region input-text" style="display:none;" />
122
+ </div>
123
+ </div>
124
+ </li>
125
+ <li class="section_2">
126
+ <div class="section_1">
127
+ <label for="billing:telephone"><?php echo $this->__('Telephone') ?><span class="required">*</span></label>
128
+ <div class="input-box">
129
+ <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" />
130
+ </div>
131
+ </div>
132
+ <div class="section_4">
133
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
134
+ <div class="input-box">
135
+ <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" />
136
+ </div>
137
+ </div>
138
+ </li>
139
+ <?php if(!$this->isCustomerLoggedIn()): ?>
140
+
141
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
142
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
143
+ <?php if (($_dob&&$_dob->isEnabled()) || ($_gender&&$_gender->isEnabled())): ?>
144
+ <li class="section_2">
145
+ <?php if ($_dob->isEnabled()): ?>
146
+ <div class="section_1">
147
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())
148
+ ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
149
+ </div>
150
+ <?php endif; ?>
151
+ <?php if ($_gender->isEnabled()): ?>
152
+ <div class="section_4">
153
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())
154
+ ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
155
+ </div>
156
+ <?php endif; ?>
157
+ </li>
158
+ <?php endif ?>
159
+
160
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
161
+ <?php if ($_taxvat->isEnabled()): ?>
162
+ <li>
163
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
164
+ </li>
165
+ <?php endif ?>
166
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
167
+ echo $this->getfieldshtml(3);
168
+ }?>
169
+ <?php $reg=Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_register');
170
+ if($reg>0): ?>
171
+ <?php if($reg == 1): ?>
172
+ <script type="text/javascript">
173
+ //<![CDATA[
174
+ new Ajax.Request('<?php echo $this->getUrl('checkout/onestep/switchMethod'); ?>',{
175
+ parameters:{method:'register'},
176
+ method:"post"
177
+ });
178
+ //]]>
179
+ </script>
180
+ <?php endif ?>
181
+ <?php if(Mage::getStoreConfig('checkout/options/guest_checkout') == 1): ?>
182
+ <li class="section_2">
183
+ <input type="checkbox" name="billing[register]" <?php if($reg==1){echo "checked";} ?> value="1" title="<?php echo $this->__('Create an account') ?>" id="billing:register" class="checkbox" onclick="billing.register()" /><label for="billing:register"><?php echo $this->__('Create an Account') ?></label>
184
+ </li>
185
+ <?php else: ?>
186
+ <input type="hidden" name="billing[register]" value="1" id="billing:register" />
187
+ <?php endif; ?>
188
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_autogenerate')):
189
+ $password=Mage::helper('easycheckout')->getautoPassword(); ?>
190
+ <li id="register-customer-password">
191
+ <input type="hidden" name="billing[customer_password]" value="<?php echo $password; ?>" />
192
+ <input type="hidden" name="billing[confirm_password]" value="<?php echo $password; ?>" />
193
+ </li>
194
+ <?php else: ?>
195
+ <li class="section_2" id="register-customer-password" style="<?php if($reg==1){echo "display:block;";}else{echo "display:none;";} ?>">
196
+ <div class="section_1">
197
+ <label for="billing:customer_password"><?php echo $this->__('Password') ?><span class="required">*</span></label>
198
+ <div class="input-box">
199
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
200
+ </div>
201
+ </div>
202
+ <div class="section_4">
203
+ <label for="billing:confirm_password"><?php echo $this->__('Re-Enter') ?><span class="required">*</span></label>
204
+ <div class="input-box">
205
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
206
+ </div>
207
+ </div>
208
+ </li>
209
+ <?php endif; ?>
210
+ <?php endif; ?>
211
+ <?php endif; ?>
212
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
213
+ <li class="section_2">
214
+ <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="billing.setSameAsBilling_ship(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>
215
+ </li>
216
+ <?php else:?>
217
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
218
+ <?php endif; ?>
219
+ </ul>
220
+
221
+ </li>
222
+ <?php if ($this->canShip()): ?>
223
+ <li class="section_2">
224
+ <?php $checkUseForShipping = Mage::getSingleton('core/session')->getData('use_for_shipping'); ?>
225
+ <input type="checkbox" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" <?php if($checkUseForShipping): ?>checked="checked"<?php endif; ?> value="1" title="<?php echo $this->__('Ship to different address') ?>" class="checkbox" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to different address') ?></label>
226
+ <script type="text/javascript">
227
+ //<![CDATA[
228
+ $('billing:use_for_shipping_yes').observe('click', function(event){billing.enalbleShippingAddress();}.bind(this));
229
+ //]]
230
+ </script>
231
+ </li>
232
+ <?php endif; ?>
233
+ </ul>
234
+
235
+
236
+ <script type="text/javascript">
237
+ //<![CDATA[
238
+ var billing = new Billing(
239
+ '<?php echo !Mage::getSingleton('checkout/session')->getData('use_for_shipping'); ?>',
240
+ '<?php echo $this->getUrl('checkout/onestep/saveBilling'); ?>',
241
+ '<?php echo $this->getUrl('checkout/onestep/switchMethod'); ?>',
242
+ '<?php echo $this->getUrl('checkout/onestep/getAddress') ?>address/'
243
+ );
244
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
245
+
246
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
247
+
248
+ //]]>
249
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/billingdetail.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <br/>
3
+ <div class="left billing_detail" id="billing:firstname_detail"></div><div class="left billing_detail" id="billing:lastname_detail"></div><br />
4
+ <div class="billing_detail" id="billing:company_detail"></div>
5
+ <div class="billing_detail" id="billing:email_detail"></div>
6
+ <?php for ($_i=1, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
7
+ <div class="billing_detail" id="billing:street<?php echo $_i?>_detail"></div>
8
+ <?php endfor ?>
9
+ <div class="billing_detail" id="billing:street2_detail"></div>
10
+ <div class="left billing_detail" id="billing:city_detail"></div><div class="left billing_detail"></div><div class="left billing_detail" id="billing:region_id_detail"></div><div class="left billing_detail" id="billing:region_detail"></div><div class="left billing_detail" id="billing:postcode_detail"></div><br/>
11
+ <div class="billing_detail" id="billing:country_id_detail"></div>
12
+ <div class="billing_detail" id="billing:telephone_detail"></div>
13
+ <div class="billing_detail" id="billing:fax_detail"></div>
14
+
15
+ <script type="text/javascript">
16
+ //<![CDATA[
17
+ $$("#os-left ol li.billing input").each(function(imp){
18
+ if($(imp.id)!=null){
19
+ var label='';
20
+ var labels = document.getElementsByTagName('LABEL');
21
+ for (var i = 0; i < labels.length; i++) {
22
+ if (labels[i].htmlFor == imp.id) {
23
+ label=labels[i].innerHTML +': ';
24
+ label=label.replace('*','').stripTags();
25
+ }
26
+ }
27
+ if($(imp.id+'_detail')){newlabel=label+$(imp.id).value;
28
+ Element.show("easycheckout_billingdetail");$(imp.id+'_detail').update($(imp.id).value?newlabel:' ');
29
+ }
30
+ $(imp.id).observe('keyup', function(event){
31
+ if($(imp.id+'_detail')){newlabel=label+$(imp.id).value;
32
+ Element.show("easycheckout_billingdetail");$(imp.id+'_detail').update($(imp.id).value?newlabel:' ');
33
+ }
34
+ });
35
+ $(imp.id).observe('change', function(event){
36
+ if($(imp.id+'_detail')){newlabel=label+$(imp.id).value;
37
+ Element.show("easycheckout_billingdetail");$(imp.id+'_detail').update($(imp.id).value?newlabel:' ');
38
+ }
39
+ });
40
+ }
41
+ });
42
+ $$("#os-left ol li.billing select").each(function(imp){
43
+ if($(imp.id)!=null){
44
+ var selectlabels = document.getElementsByTagName('LABEL');
45
+ for (var i = 0; i < selectlabels.length; i++) {
46
+ if (selectlabels[i].htmlFor == imp.id) {
47
+ selectlabel=selectlabels[i].innerHTML +': ';
48
+ selectlabel=selectlabel.replace('*','').stripTags();
49
+ }
50
+ }
51
+ if($(imp.id+'_detail') && $(imp.id).value){
52
+ var newselectlabel=selectlabel + $(imp.id).options[$(imp.id).selectedIndex].text;
53
+ Element.show("easycheckout_billingdetail");$(imp.id+'_detail').update(newselectlabel+' ');
54
+ }
55
+ $(imp.id).observe('change', function(event){
56
+ if($(imp.id+'_detail')){
57
+ for (var i = 0; i < selectlabels.length; i++) {
58
+ if (selectlabels[i].htmlFor == imp.id) {
59
+ selectlabel=selectlabels[i].innerHTML +': ';
60
+ selectlabel=selectlabel.replace('*','').stripTags();
61
+ }
62
+ }
63
+ newselectlabel=selectlabel + $(imp.id).options[$(imp.id).selectedIndex].text;
64
+ Element.show("easycheckout_billingdetail");$(imp.id+'_detail').update($(imp.id).value?newselectlabel:'');
65
+ }
66
+ });
67
+ }
68
+ });
69
+ //]]>
70
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/coupon.phtml ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="easycheckout-coupon" class="easycheckout-coupon" style="visibility:hidden;"></div>
2
+ <div id="easycheckout-coupon-form" class="coupon-form" style="display:block;">
3
+ <!--<a href="javascript:void(0);" onclick="coupon.hide();" class="div_closer"></a>-->
4
+ <div id="easycheckout-coupon-form-div">
5
+ <h4><?php echo $this->__('Coupon Codes') ?></h4>
6
+ <div id="inner_loader_base" style="display:none;"></div>
7
+ <div id="inner_loader_coupon" class="inner_loader" style="display:none;"></div>
8
+ <p><?php echo $this->__('Enter your coupon code if you have one.') ?></p>
9
+ <div id="easycheckout-coupon-message" class="easycheckout-error-message"></div>
10
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
11
+ <div id="coupon_form" method="post">
12
+ <div class="coupon_form_div">
13
+ <input type="hidden" name="remove" id="remove-coupone" value="0" />
14
+ <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->htmlEscape($this->getCouponCode()) ?>" />
15
+ <div style="">
16
+ <input type="button" class="left coup_button easycheout_bg" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?>" onclick="coupon.coupon(false)" value="<?php echo $this->__('Apply Coupon'); ?>" title="<?php echo $this->__('Apply Coupon'); ?>" />
17
+ <input type="button" id="remove_coupon" class="coup_button easycheout_bg" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?><?php if(!strlen($this->getCouponCode())){echo "display:none";}?>" onclick="coupon.coupon(true)" value="<?php echo $this->__('Cancel Coupon'); ?>" title="<?php echo $this->__('Cancel Coupon'); ?>"/>
18
+ </div></div>
19
+ </div>
20
+ </div>
21
+ </div>
22
+
23
+ <script type="text/javascript">
24
+ //<![CDATA[
25
+ var Coupon=Class.create();
26
+ Coupon.prototype={
27
+ initialize:function(a){
28
+ this.CouponUrl=a;
29
+ this.response=[]
30
+ },
31
+ show:function(){
32
+ this.reload=false;
33
+ $("easycheckout-coupon").setStyle({
34
+ opacity:0,
35
+ visibility:"visible"
36
+ });
37
+ new Effect.Opacity("easycheckout-coupon",{
38
+ duration:0.9,from:0,to:0.8
39
+ });
40
+ Element.show("easycheckout-coupon-form")
41
+ },
42
+ hide:function(){
43
+ new Effect.Opacity("easycheckout-coupon",{
44
+ duration:0.9,
45
+ from:0.8,to:0,
46
+ afterFinish:function(){
47
+ $("easycheckout-coupon").setStyle({
48
+ opacity:0,visibility:"hidden"
49
+ })
50
+ }
51
+ });
52
+ Element.hide("easycheckout-coupon-form")
53
+ },
54
+ coupon:function(remove){
55
+ var b=0;
56
+ if(remove){
57
+ $("coupon_code").removeClassName('required-entry');
58
+ b="1";
59
+ }
60
+ else{
61
+ $("coupon_code").addClassName('required-entry');
62
+ }
63
+ var c=$("coupon_form");
64
+ if((c=new Validation(c))&&c.validate()){
65
+ c=$("coupon_code").value;
66
+ this.setLoadWaitingcoupon(false);
67
+ new Ajax.Request(this.CouponUrl,{
68
+ parameters:{coupon_code:c,remove:b},
69
+ method:"post",
70
+ onComplete:this.setLoadWaitingcoupon(false),
71
+ onSuccess:this.processRespone.bind(this),
72
+ onFailure:easycheckout.ajaxFailure.bind(this)
73
+ })
74
+ }
75
+ },
76
+ coupondirect:function(remove){
77
+ var b=0;
78
+ if(remove){
79
+ b="1";
80
+ }
81
+ c=$("coupon_code").value.trim();
82
+ if(c !=''){this.setLoadWaitingcoupon(false);
83
+ new Ajax.Request(this.CouponUrl,{
84
+ parameters:{coupon_code:c,remove:b},
85
+ method:"post",
86
+ onComplete:this.setLoadWaitingcoupon(false),
87
+ onSuccess:this.processRespone.bind(this),
88
+ onFailure:easycheckout.ajaxFailure.bind(this)
89
+ })
90
+ }
91
+
92
+ },
93
+ processRespone:function(a){
94
+ var b;
95
+ if(a&&a.responseText)
96
+ try{
97
+ b=a.responseText.evalJSON()
98
+ }catch(c){
99
+ b={}
100
+ }
101
+ this.setLoadWaitingcoupon(true);
102
+
103
+ if(b.error){
104
+ Element.hide("remove_coupon")
105
+
106
+ $("easycheckout-coupon-message").setStyle({
107
+ color:"red"
108
+ });
109
+
110
+ $("easycheckout-coupon-message").update(b.error);
111
+ if(b.reload==true)
112
+ billing.saveCountry();
113
+ }
114
+ else if(b.success){
115
+ Element.show("remove_coupon")
116
+ $("easycheckout-coupon-message").setStyle({
117
+ color:"green"
118
+ });
119
+ $("easycheckout-coupon-message").update(b.success);
120
+ if(b.reload==true)
121
+ billing.saveCountry();
122
+ }
123
+ },
124
+ setLoadWaitingcoupon:function(a){
125
+ if(a){
126
+ $("inner_loader_base").hide();
127
+ Element.hide("inner_loader_coupon");
128
+ }else{
129
+ $("inner_loader_base").show();
130
+ Element.show("inner_loader_coupon");
131
+ }
132
+ }
133
+ };
134
+ var coupon = new Coupon('<?php echo $this->getUrl('checkout/onestep/couponPost') ?>');
135
+ //]]>
136
+
137
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/coupondirect.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="easycheckout-coupon-form" class="left" >
2
+
3
+ <div id="easycheckout-coupon-form-div">
4
+ <div id="easycheckout-coupon-message" class="easycheckout-error-message clearboth"></div>
5
+ <div class="coupon_form_div right clearboth"><div id="inner_loader_coupon" class="inner_loader coupon-direct" style="display:none;"></div>
6
+ <input type="hidden" name="remove" id="remove-coupone" value="0" />
7
+ <div id="inner_loader_coupon" class="inner_loader" style="display:none;"></div>
8
+ <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->htmlEscape($this->getCouponCode()) ?>" />
9
+ <input type="button" class="notopmargins coup_button easycheout_bg" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?>" onclick="coupon.coupondirect(false)" value="<?php echo $this->__('Apply Coupon'); ?>" title="<?php echo $this->__('Apply Coupon'); ?>" />
10
+ <input type="button" id="remove_coupon" class="notopmargins coup_button easycheout_bg" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?><?php if(!strlen($this->getCouponCode())){echo "display:none";}?>" onclick="coupon.coupondirect(true)" value="<?php echo $this->__('Cancel Coupon'); ?>" title="<?php echo $this->__('Cancel Coupon'); ?>"/>
11
+ </div>
12
+ </div>
13
+ </div>
14
+
15
+
16
+
17
+ <script type="text/javascript">
18
+ //<![CDATA[
19
+ // var forgot_loading_text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('forgotpass')?Mage::helper('easycheckout')->getEasycheckoutLoading('forgotpass'):'Reseting Password';?>';
20
+ var coupon = new Coupon('<?php echo $this->getUrl('checkout/onestep/couponPost') ?>');
21
+ //]]>
22
+
23
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/login.phtml ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="onestepcheckout-checkout-method">
2
+ <a href="javascript:void(0);" onclick="quicklogin.show();"><?php echo Mage::helper('easycheckout')->getEasycheckoutLogin(); ?></a>
3
+ </div>
4
+ <div id="easycheckout-login" class="easycheckout-login" style="visibility:hidden;" onclick="quicklogin.hide();"></div>
5
+ <div id="easycheckout-login-form" style="display:none;">
6
+ <!--<div id="easycheckout-login-form" class="login-form">-->
7
+ <a href="javascript:void(0);" onclick="quicklogin.hide();" title="<?php echo $this->__('Close') ?>" class="popup_closer"></a>
8
+ <div id="easycheckout-login-form-div">
9
+ <!--<div class="login_dialogBox">-->
10
+ <h1><?php echo $this->__('Login') ?></h1><br />
11
+ <div id="inner_loader" class="inner_loader" style="display:none;"></div>
12
+ <p><?php echo $this->__('Please login below') ?></p>
13
+ <div id="easycheckout-error-message" class="easycheckout-error-message"></div>
14
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
15
+
16
+ <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
17
+ <div class="login_form_div">
18
+ <label><?php echo $this->__('Email Address') ?></label>
19
+ <input type="text" class="easycheckout-login-form_input required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" />
20
+
21
+
22
+ <label><?php echo $this->__('Password') ?></label>
23
+ <input type="password" class="easycheckout-login-form_input set_margin required-entry" id="login-password" name="login[password]" />
24
+
25
+ <a href="#" onclick="toggleit('easycheckout-login-form-div','easycheckout-forgotpass-div')"><?php echo $this->__('Forgot your password?') ?></a>
26
+
27
+ <input type="button" class="loging_btn easycheout_bg" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?>" onclick="quicklogin.login()" value="<?php echo $this->__('Login'); ?>"/>
28
+ </div>
29
+ </form>
30
+ </div>
31
+
32
+ <div id="easycheckout-forgotpass-div" style="display:none;">
33
+ <h1><?php echo $this->__('Forgot Your Password?') ?></h1>
34
+ <div id="inner_loader_forgotpass" class="inner_loader" style="display:none;"></div>
35
+ <div id="easycheckout-forgotpass-error-message" class="easycheckout-error-message"></div>
36
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
37
+ <p><?php echo $this->__('Please enter your email below and we will send you a new password.') ?></p>
38
+ <form action="" method="post" id="forgotpass-form">
39
+ <div class="login_form_div">
40
+ <label><?php echo $this->__('Email Address') ?></label>
41
+ <input type="text" name="email" alt="email" id="email_address" class="easycheckout-login-form_input required-entry validate-email" value="<?php echo $this->htmlEscape($this->getEmailValue()) ?>" />
42
+ <p class="back-link"><a href="#" onclick="toggleit('easycheckout-forgotpass-div','easycheckout-login-form-div')"><small>&laquo; </small><?php echo $this->__('Back to Login') ?></a></p>
43
+ <input type="button" class="loging_btn easycheout_bg" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?>" onclick="forgotpass.forgotpass()" value="<?php echo $this->__('Submit'); ?>"/>
44
+ </div>
45
+ </form>
46
+
47
+ </div>
48
+ </div>
49
+
50
+
51
+ <script type="text/javascript">
52
+ //<![CDATA[
53
+ var Login=Class.create();
54
+ Login.prototype={
55
+ initialize:function(a){
56
+ //alert("in login");
57
+ this.loginUrl=a;
58
+ this.loadWaitingLogin=false;
59
+ this.response=[]
60
+ },
61
+ show:function(){
62
+ $("easycheckout-login").setStyle({
63
+ opacity:0,
64
+ visibility:"visible"
65
+ });
66
+ new Effect.Opacity("easycheckout-login",{
67
+ duration:0.9,from:0,to:0.8
68
+ });
69
+ Element.show("easycheckout-login-form")
70
+ },
71
+ hide:function(){
72
+ new Effect.Opacity("easycheckout-login",{
73
+ duration:0.9,
74
+ from:0.8,to:0,
75
+ afterFinish:function(){
76
+ $("easycheckout-login").setStyle({
77
+ opacity:0,visibility:"hidden"
78
+ })
79
+ }
80
+ });
81
+ Element.hide("easycheckout-login-form")
82
+ },
83
+ login:function(){
84
+ var a=$("login-form");
85
+ if((a=new Validation(a))&&a.validate()){
86
+ a=$("login-email").value;
87
+ var b=$("login-password").value;
88
+ this.setLoadWaitingLogin(true);
89
+ new Ajax.Updater('',this.loginUrl,{
90
+ parameters:{username:a,password:b},
91
+ method:"post",
92
+ onComplete:this.resetLoadWaitingLogin,
93
+ onSuccess:this.processRespone.bind(this),
94
+ onFailure:easycheckout.ajaxFailure.bind(this)
95
+ })
96
+ }
97
+ },
98
+ processRespone:function(a){
99
+ var b;
100
+ if(a&&a.responseText)
101
+ try{
102
+ b=a.responseText.evalJSON()
103
+ //alert("in response login");
104
+ //alert(a.responseText);
105
+ //alert(b);
106
+ }catch(c){
107
+ b={}
108
+ }
109
+ if(b.error){
110
+
111
+ $("easycheckout-error-message").update(b.error);
112
+ this.resetLoadWaitingLogin()
113
+ }else
114
+ location.href=""
115
+ },
116
+ setLoadWaitingLogin:function(a){
117
+ if(this.loadWaitingLogin==a){
118
+
119
+ Element.hide("inner_loader");
120
+ Element.show("easycheckout-login-form")
121
+ }else{
122
+ $('inner_loader').update(login_loading_text);
123
+ Element.show("inner_loader");
124
+ Element.show("easycheckout-login-form")
125
+ }
126
+ },
127
+ resetLoadWaitingLogin:function(){
128
+ this.setLoadWaitingLogin(false)
129
+ }
130
+ };
131
+ var login_loading_text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('login')?Mage::helper('easycheckout')->getEasycheckoutLoading('login'):'Validating';?>';
132
+ var quicklogin = new Login('<?php echo $this->getUrl('checkout/onestep/loginPost') ?>');
133
+ function toggleit(a,b){
134
+ Element.hide(a)
135
+ Element.show(b)
136
+
137
+ }
138
+
139
+
140
+ //]]>
141
+ </script>
142
+ <script type="text/javascript">
143
+ //<![CDATA[
144
+ var Forgotpass=Class.create();
145
+ Forgotpass.prototype={
146
+ initialize:function(a){
147
+ this.forgotpassUrl=a;
148
+ this.response=[]
149
+ },
150
+ forgotpass:function(){
151
+ var a=$("forgotpass-form");
152
+ if((a=new Validation(a))&&a.validate()){
153
+ a=$("email_address").value;
154
+ this.setLoadWaitingforgot(false);
155
+ new Ajax.Updater('',this.forgotpassUrl,{
156
+ parameters:{email:a},
157
+ method:"post",
158
+ onComplete:this.setLoadWaitingforgot(false),
159
+ onSuccess:this.processRespone.bind(this),
160
+ onFailure:easycheckout.ajaxFailure.bind(this)
161
+ })
162
+ }
163
+ },
164
+ processRespone:function(a){
165
+ var b;
166
+ if(a&&a.responseText)
167
+ try{
168
+ b=a.responseText.evalJSON()
169
+ }catch(c){
170
+ b={}
171
+ }
172
+ if(b.error){
173
+ $("easycheckout-forgotpass-error-message").update(b.error);
174
+ this.setLoadWaitingforgot(true)
175
+ }
176
+ },
177
+ setLoadWaitingforgot:function(a){
178
+ if(a){
179
+
180
+ Element.hide("inner_loader_forgotpass");
181
+ }else{
182
+ $('inner_loader_forgotpass').update(forgot_loading_text);
183
+ Element.show("inner_loader_forgotpass");
184
+ }
185
+ }
186
+ };
187
+ var forgot_loading_text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('forgotpass')?Mage::helper('easycheckout')->getEasycheckoutLoading('forgotpass'):'Reseting Password';?>';
188
+ var forgotpass = new Forgotpass('<?php echo $this->getUrl('checkout/onestep/forgotpassPost') ?>');
189
+ //]]>
190
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/payment.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <script type="text/javascript">
3
+ //<![CDATA[
4
+ billing.paymentinit('<?php echo $this->getUrl('checkout/onestep/savePayment') ?>');
5
+ // var payment = new Payment('<?php echo $this->getUrl('checkout/onestep/savePayment') ?>');
6
+ //]]>
7
+ </script>
8
+
9
+
10
+
11
+ <?php echo $this->getChildHtml('methods') ?>
12
+
13
+
14
+ <div class="tips" id="payment-tool-tip" style="display:none;">
15
+ <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
16
+ <div class="tips-content"><img src="<?php echo $this->getSkinUrl('images/cvv.jpg') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
17
+ </div>
18
+ <script type="text/javascript">
19
+ //<![CDATA[
20
+ var Payment_Loading_Text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('pay_method')?Mage::helper('easycheckout')->getEasycheckoutLoading('pay_method'):'Updating payment Information';?>';
21
+ function toggleToolTip(event){
22
+ if($('payment-tool-tip')){
23
+ $('payment-tool-tip').setStyle({
24
+ top: (Event.pointerY(event)-330)+'px',
25
+ left: (Event.pointerX(event)-502)+'px'
26
+ })
27
+ $('payment-tool-tip').toggle();
28
+ }
29
+ Event.stop(event);
30
+ }
31
+ if($('payment-tool-tip-close')){
32
+ Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
33
+ }
34
+ //]]>
35
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/payment/methods.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <dl class="shipping-methods" id="checkout-payment-method-load">
3
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
4
+ echo $this->getfieldshtml(1);
5
+ }?>
6
+ <?php $i=0; foreach ($this->getMethods() as $_method): $_code = $_method->getCode(); ?>
7
+ <dt>
8
+ <?php if( sizeof($this->getMethods()) > 1 ): ?>
9
+ <?php if($this->getSelectedMethodCode()=='' && $i==0): $i=1; ?>
10
+ <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="billing.switchMethod('<?php echo $_code ?>')" checked="checked" class="radio validate-one-required-by-name" />
11
+ <?php else: ?>
12
+ <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="billing.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio validate-one-required-by-name" />
13
+ <?php endif; ?>
14
+ <?php else: ?>
15
+ <span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
16
+ <?php endif; ?>
17
+ <label for="p_method_<?php echo $_code ?>"><?php echo $this->getMethodTitle($_method)?$this->getMethodTitle($_method):$_method->getTitle(); ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
18
+ </dt>
19
+ <?php if ($html = $this->getPaymentMethodFormHtml($_method)?$this->getPaymentMethodFormHtml($_method):$this->getChildHtml('payment.method.'.$_code)): ?>
20
+ <dd>
21
+ <?php echo $html; ?>
22
+ </dd>
23
+ <?php endif; ?>
24
+ <?php endforeach; ?>
25
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
26
+ echo $this->getfieldshtml(2);
27
+ echo $this->getfieldshtml(3);
28
+ }?>
29
+ </dl>
30
+ <script type="text/javascript">
31
+ //<![CDATA[
32
+ billing.init();
33
+ //]]>
34
+ </script>
35
+ <script type="text/javascript">
36
+ //<![CDATA[
37
+ var ShippingMethods_Loading_Text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('ship_method')?Mage::helper('easycheckout')->getEasycheckoutLoading('ship_method'):'Updating Shipping Method';?>';
38
+ $$('#checkout-payment-method-load dt input').invoke('observe', 'click', function(event){billing.savePayment();});
39
+ //]]>
40
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/quickheard.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $required=Mage::helper('easycheckout')->getEasycheckoutConfig('quickheared/enable_quickheared');?>
2
+ <p class="easycheckout-agreement-p">
3
+ <label for="easycheckout_heared"><?php echo Mage::helper('easycheckout')->getEasycheckoutConfig('quickheared/label_quickheared'); ?></label>
4
+ <select id="easycheckout_heared" name="easycheckout_heard" title="<?php echo $this->__(Mage::helper('easycheckout')->getEasycheckoutConfig('quickheared/label_quickheared')) ?>" class="<?php if($required=='1'){echo "validate-select";}?>" >
5
+ <option value=""><?php echo $this->__('Please select an Option') ?></option>
6
+ <?php
7
+ if($sources=Mage::helper('easycheckout')->getEasycheckoutHeard()):
8
+ foreach($sources as $_option): ?>
9
+ <option value="<?php echo $_option ?>"><?php echo $_option ?></option>
10
+ <?php endforeach;
11
+ endif;
12
+ ?>
13
+ <option value="Others"><?php echo $this->__('Others'); ?></option>
14
+ </select>
15
+ <input id="easycheckout_other" type="text" class="<?php if($required=='1'){echo "required-entry";}?>" value="" name="easycheckout_other" style="display:none;">
16
+ </p>
17
+ <script type="text/javascript">
18
+ //<![CDATA[
19
+ $('easycheckout_heared').observe('change', function(event){
20
+ if($('easycheckout_heared').value=="Others"){
21
+ $('easycheckout_other').setStyle({display:"inline"});
22
+ if($('advice-validate-select-easycheckout_heared')){
23
+ $('advice-validate-select-easycheckout_heared').setStyle({display:"none"});
24
+ $('easycheckout_heared').removeClassName('validation-failed');
25
+ }
26
+ }else{
27
+ $('easycheckout_other').setStyle({display:"none"});
28
+ if($('advice-required-entry-easycheckout_other')){
29
+ $('advice-required-entry-easycheckout_other').setStyle({display:"none"});
30
+ $('easycheckout_other').removeClassName('validation-failed');
31
+
32
+ }
33
+ }
34
+ });
35
+ //]]>
36
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/review.phtml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="easycheckout-review-loadaction" style="display:block;" class="order">
2
+ <?php echo $this->getChildHtml('info') ?>
3
+ </div>
4
+ <div id="checkout-review-submit">
5
+ <p style="clear:both;"></p>
6
+ <?php echo $this->getChildHtml('agreements') ?>
7
+ <?php if($news=Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_newsletter')): ?>
8
+ <p class="easycheckout-agreement-p"> <input <?php if($news =='1'){echo "checked='checked'";}?> type="checkbox" name="is_subscribed" value="1" title="<?php echo $this->__('Sign Up for Newsletter'); ?>" class="checkbox" id="newsletter" /><label for="newsletter"><?php echo $this->__('Sign Up for Newsletter'); ?></label></p>
9
+ <?php endif; ?>
10
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('quickheared/enable_quickheared')): ?>
11
+ <?php echo $this->getChildHtml('quickheard'); ?>
12
+ <?php endif; ?>
13
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_comments')): ?>
14
+ <div style="padding-bottom:10px;"><div class="easycheckout-comments-left"> <p class="easycheckout-agreement-p">
15
+ <label for="comments"><?php echo Mage::helper('easycheckout')->getEasycheckoutConfig('general/label_comments'); ?></label><br />
16
+ <textarea cols="46" rows="6" name="easycheckout_comment" value="" title="<?php echo $this->__('Enter Special Comments'); ?>" id="comments" ></textarea>
17
+ </p>
18
+ </div>
19
+ <?php endif; ?>
20
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_coupon')): ?>
21
+ <?php echo $this->getChildHtml('coupon') ?> </div>
22
+ <?php endif; ?>
23
+ <div id="onepage-checkout-shipping-method-additional-load">
24
+ <?php echo $this->getChildHtml('additional') ?>
25
+ </div>
26
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_detail')): ?>
27
+ <div class="easycheckout-agreement-p" id="easycheckout_billingdetail" style="display:none;">
28
+ <div class="easycheout_headings easycheckout-title" <?php echo "style='". Mage::helper('easycheckout')->getEasycheckoutskin() . "'"; ?>>
29
+ <span id="easycheckout-number" class="step-review"></span>
30
+ <h3 <?php echo "style='". Mage::helper('easycheckout')->getEasycheckoutHeadingCSS() . "'"; ?>><?php echo $this->__('Recheck Your Billing Detail') ?></h3>
31
+ </div>
32
+ <?php echo $this->getChildHtml('billingdetail') ?>
33
+ </div>
34
+ <?php endif; ?>
35
+ <div class="buttons-set" id="review-buttons-container">
36
+ <p><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p>
37
+ <?php if(Mage::getStoreConfig('easycheckout/general/enable_terms')): ?>
38
+ <p>
39
+ <input type="checkbox" name="terms" value="1" title="terms and conditions" class="checkbox required-entry"/>I Accept The<a href="#" id="terms">Terms and Conditions</a>
40
+ <div id="termscontent" class="termscontent" style="display:none;"></div>
41
+ <div id="contentview" class="contentview" style="display:none;">
42
+ <div class="contentview_close" >
43
+ <div id="contentview_btn"><img src="<?php echo $this->getSkinUrl('images/easycheckout/closebox.png') ?>" /></div></div>
44
+ <p><h5>Terms and Conditions</h5><br />
45
+ <?php echo Mage::getStoreConfig('easycheckout/general/conditions') ?>
46
+ </p>
47
+ </div>
48
+ </p>
49
+ <?php endif; ?>
50
+ <div class="margin-top">
51
+ <button type="button" title="<?php echo $this->__('Place Order') ?>" style="<?php echo Mage::helper('easycheckout')->getEasycheckoutbuttonCSS(); ?>" class="place_order_btn easycheout_bg" onclick="billing.save_review();"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
52
+ </div>
53
+ </div>
54
+ <script type="text/javascript">
55
+ //<![CDATA[
56
+ var Review_Loading_Text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('review')?Mage::helper('easycheckout')->getEasycheckoutLoading('review'):'Updating Review Order Data';?>';
57
+ var Review_Submitting_Text='<?php echo Mage::helper('easycheckout')->getEasycheckoutLoading('order')?Mage::helper('easycheckout')->getEasycheckoutLoading('order'):'Submitting Your order Now';?>';
58
+ billing.reviewinit('onestepcheckout-form', '<?php echo $this->getUrl('checkout/onestep/saveOrder') ?>', $('checkout-agreements'));
59
+ var review_url='<?php echo $this->getUrl('checkout/onestep/saveOrder') ?>';
60
+
61
+ Event.observe('terms', 'click', show);
62
+ Event.observe('contentview_btn', 'click', hide);
63
+ function show()
64
+ {
65
+ Element.show("termscontent");
66
+ Element.show("contentview");
67
+ }
68
+ function hide()
69
+ {
70
+ Element.hide("termscontent");
71
+ Element.hide("contentview");
72
+ }
73
+
74
+
75
+ //]]>
76
+ </script>
77
+ </div>
app/design/frontend/default/default/template/easycheckout/onestep/review/additional.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+
2
+ <?php if (!$this->getQuote()->isVirtual()): ?>
3
+ <?php echo $this->helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
4
+ <?php endif; ?>
app/design/frontend/default/default/template/easycheckout/onestep/review/info.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
2
+ echo $this->getfieldshtml(1);
3
+ }?>
4
+ <?php echo $this->getChildHtml('items_before'); ?>
5
+ <div id="checkout-review-table-wrapper">
6
+ <table class="data-table" id="checkout-review-table">
7
+ <?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
8
+ <col />
9
+ <col width="1" />
10
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_cartupdate')):?>
11
+
12
+ <col width="50" />
13
+ <?php else:?>
14
+ <col width="1"/>
15
+ <?php endif;?>
16
+ <col width="1" />
17
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
18
+ <col width="1" />
19
+ <col width="1" />
20
+ <?php endif; ?>
21
+ <thead>
22
+ <tr>
23
+ <th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
24
+ <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
25
+ <th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
26
+ <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
27
+ </tr>
28
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
29
+ <tr>
30
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
31
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
32
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
33
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
34
+ </tr>
35
+ <?php endif; ?>
36
+ </thead>
37
+ <?php echo $this->getChildHtml('totals'); ?>
38
+ <tbody>
39
+ <?php foreach($this->getItems() as $_item): ?>
40
+ <?php echo $this->getItemHtml($_item)?>
41
+ <?php endforeach ?>
42
+ </tbody>
43
+ </table>
44
+ </div>
45
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
46
+ echo $this->getfieldshtml(2); }?>
47
+ <?php echo $this->getChildHtml('items_after'); ?>
48
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
49
+ echo $this->getfieldshtml(3);
50
+ }?>
51
+ <script type="text/javascript">
52
+ //<![CDATA[
53
+ decorateTable('checkout-review-table');
54
+ truncateOptions();
55
+ $$('dl.item-options').each(function(element){element.hide();});
56
+ $$('a.close-options-link').each(function(element){element.hide();});
57
+ //]]>
58
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/review/item.phtml ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_item = $this->getItem()?>
2
+ <tr>
3
+ <td><h3 class="product-name"><?php echo $this->htmlEscape($this->getProductName()) ?></h3>
4
+ <?php if ($_options = $this->getOptionList()):?>
5
+ <a href="javascript:void(0)" id="option-exp-<?php echo $_item->getId();?>" title="<?php echo $this->__('View Option(s)');?>" class="expand-options-link" onclick="easycheckout.showOptionsList(this,'option-<?php echo $_item->getId();?>-list'); return false;"><?php echo $this->__('View Option(s)');?></a>
6
+ <a href="javascript:void(0)" id="option-clo-<?php echo $_item->getId();?>" title="<?php echo $this->__('Hide Option(s)');?>" class="close-options-link" onclick="easycheckout.showOptionsList(this,'option-<?php echo $_item->getId();?>-list'); return false;"><?php echo $this->__('Hide Option(s)');?></a>
7
+ <dl class="item-options" id="option-<?php echo $_item->getId();?>-list">
8
+ <?php foreach ($_options as $_option) : ?>
9
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
10
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
11
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
12
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
13
+ <div class="truncated_full_value">
14
+ <dl class="item-options">
15
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
16
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
17
+ </dl>
18
+ </div>
19
+ <?php endif; ?>
20
+ </dd>
21
+ <?php endforeach; ?>
22
+ </dl>
23
+ <?php endif;?>
24
+ </td>
25
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
26
+ <td class="a-right">
27
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
28
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
29
+ <?php else: ?>
30
+ <span class="cart-price">
31
+ <?php endif; ?>
32
+
33
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
34
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
35
+ <?php else: ?>
36
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
37
+ <?php endif; ?>
38
+
39
+ </span>
40
+
41
+
42
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
43
+
44
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
45
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
46
+ <small>
47
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
48
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
49
+ <?php endforeach; ?>
50
+ </small>
51
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
52
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
53
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
54
+ <?php endforeach; ?>
55
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
56
+ <small>
57
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
58
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
59
+ <?php endforeach; ?>
60
+ </small>
61
+ <?php endif; ?>
62
+ </div>
63
+
64
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
65
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
66
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
67
+ </div>
68
+ <?php endif; ?>
69
+ <?php endif; ?>
70
+ </td>
71
+ <?php endif; ?>
72
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
73
+ <td>
74
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
75
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
76
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
77
+ <?php else: ?>
78
+ <span class="cart-price">
79
+ <?php endif; ?>
80
+
81
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
82
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
83
+ <?php else: ?>
84
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
85
+ <?php endif; ?>
86
+
87
+ </span>
88
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
89
+
90
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
91
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
92
+ <small>
93
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
94
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
95
+ <?php endforeach; ?>
96
+ </small>
97
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
98
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
99
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
100
+ <?php endforeach; ?>
101
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
102
+ <small>
103
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
104
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
105
+ <?php endforeach; ?>
106
+ </small>
107
+ <?php endif; ?>
108
+ </div>
109
+
110
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
111
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
112
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
113
+ </div>
114
+ <?php endif; ?>
115
+ <?php endif; ?>
116
+ </td>
117
+ <?php endif; ?>
118
+
119
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/enable_cartupdate')):?>
120
+ <td class="a-center" style="white-space:nowrap;">
121
+ <img class="" style="cursor:pointer;" onclick="billing.cartupdate(<?php echo $_item->getId();?>,'dec')" src="<?php echo $this->getSkinUrl('images/easycheckout/down.png')?>" />
122
+ <span class="a-center" ><?php echo $_item->getQty() ?></span>
123
+ <img class="" style="cursor:pointer;" onclick="billing.cartupdate(<?php echo $_item->getId();?>,'inc')" src="<?php echo $this->getSkinUrl('images/easycheckout/up.png')?>" />
124
+ </td>
125
+
126
+ <?php else:?>
127
+ <td class="a-center">
128
+ <?php echo $_item->getQty() ?>
129
+ </td>
130
+ <?php endif;?>
131
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
132
+ <td class="a-right">
133
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
134
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
135
+ <?php else: ?>
136
+ <span class="cart-price">
137
+ <?php endif; ?>
138
+
139
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
140
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
141
+ <?php else: ?>
142
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
143
+ <?php endif; ?>
144
+
145
+ </span>
146
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
147
+
148
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
149
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
150
+ <small>
151
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
152
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
153
+ <?php endforeach; ?>
154
+ </small>
155
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
156
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
157
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
158
+ <?php endforeach; ?>
159
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
160
+ <small>
161
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
162
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
163
+ <?php endforeach; ?>
164
+ </small>
165
+ <?php endif; ?>
166
+ </div>
167
+
168
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
169
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
170
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
171
+ </div>
172
+ <?php endif; ?>
173
+ <?php endif; ?>
174
+ </td>
175
+ <?php endif; ?>
176
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
177
+ <td>
178
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
179
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
180
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
181
+ <?php else: ?>
182
+ <span class="cart-price">
183
+ <?php endif; ?>
184
+
185
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
186
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
187
+ <?php else: ?>
188
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
189
+ <?php endif; ?>
190
+
191
+ </span>
192
+
193
+
194
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
195
+
196
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
197
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
198
+ <small>
199
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
200
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
201
+ <?php endforeach; ?>
202
+ </small>
203
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
204
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
205
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
206
+ <?php endforeach; ?>
207
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
208
+ <small>
209
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
210
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
211
+ <?php endforeach; ?>
212
+ </small>
213
+ <?php endif; ?>
214
+ </div>
215
+
216
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
217
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
218
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
219
+ </div>
220
+ <?php endif; ?>
221
+ <?php endif; ?>
222
+ </td>
223
+ <?php endif; ?>
224
+ </tr>
app/design/frontend/default/default/template/easycheckout/onestep/shipping.phtml ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="clear"></div>
2
+ <ul class="">
3
+ <?php if ($this->customerHasAddresses()): ?>
4
+ <li class="section_2">
5
+ <label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
6
+ <div class="input-box">
7
+ <?php echo $this->getAddressesHtmlSelect('shipping') ?>
8
+ </div>
9
+ </li>
10
+ <?php endif ?>
11
+ <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
12
+
13
+ <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
14
+ <ul><?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
15
+ echo $this->getfieldshtml(1);
16
+ }?>
17
+ <li class="section_2"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="billing.setSameAsBilling_ship(false)"')->toHtml() ?></li>
18
+ <li class="section_2">
19
+ <div class="section_1">
20
+ <label for="shipping:company"><?php echo $this->__('Company') ?></label>
21
+ <div class="input-box">
22
+ <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" onchange="billing.setSameAsBilling_ship(false);" />
23
+ </div>
24
+ </div>
25
+ <?php if(false): ?>
26
+ <div class="section_4">
27
+ <label for="shipping:email" ><?php echo $this->__('Email Address') ?><em class="required">*</em></label>
28
+ <div class="input-box">
29
+ <input type="text" name="shipping[email]" id="shipping:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
30
+ </div>
31
+ </div>
32
+ <?php endif ?>
33
+ </li>
34
+ <li class="section_3">
35
+ <label for="shipping:street1"><?php echo $this->__('Address') ?><em class="required">*</em></label>
36
+ <div class="input-box">
37
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" onchange="billing.setSameAsBilling_ship(false);" />
38
+ </div>
39
+ </li>
40
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
41
+ <br/>
42
+ <li class="section_3">
43
+ <div class="input-box">
44
+ <input type="text" title="<?php echo $this->__('Street Address '.$_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" onchange="billing.setSameAsBilling_ship(false);" />
45
+ </div>
46
+ </li>
47
+ <?php endfor ?>
48
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
49
+ echo $this->getfieldshtml(2);
50
+ }?>
51
+
52
+ <li class="section_2">
53
+ <label for="shipping:country_id"><?php echo $this->__('Country') ?><em class="required">*</em></label>
54
+ <div class="input-box">
55
+ <?php echo $this->getCountryHtmlSelect('shipping') ?>
56
+ </div>
57
+ </li>
58
+ <li class="section_1">
59
+ <label for="shipping:city"><?php echo $this->__('City') ?><em class="required">*</em></label>
60
+ <div class="input-box">
61
+ <input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="shipping:city" onchange="billing.setSameAsBilling_ship(false);" />
62
+ </div>
63
+ </li>
64
+ <li class="section_2">
65
+ <div class="section_1 field-postcode">
66
+ <label for="shipping:postcode"><?php echo $this->__('Zip/Postal Code') ?><em class="required">*</em></label>
67
+ <div class="input-box">
68
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="postcode input-text validate-zip-international required-entry" onchange="billing.setSameAsBilling_ship(false);" />
69
+
70
+ </div>
71
+ </div>
72
+ <div class="section_4 field-region">
73
+ <label for="shipping:region"><?php echo $this->__('State/Province') ?><em class="required">*</em></label>
74
+ <div class="input-box">
75
+ <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="region validate-select" style="display:none;">
76
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
77
+ </select>
78
+ <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="region input-text" style="display:none;" />
79
+ </div>
80
+ </div>
81
+ </li>
82
+ <li class="section_2">
83
+ <div class="section_1">
84
+ <label for="shipping:telephone"><?php echo $this->__('Telephone') ?><em class="required">*</em></label>
85
+ <div class="input-box">
86
+ <input type="text" name="shipping[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="shipping:telephone" onchange="billing.setSameAsBilling_ship(false);" />
87
+ </div>
88
+ </div>
89
+ <div class="section_4">
90
+ <label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
91
+ <div class="input-box">
92
+ <input type="text" name="shipping[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="shipping:fax" onchange="billing.setSameAsBilling_ship(false);" />
93
+ </div>
94
+ </div>
95
+ </li>
96
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
97
+ echo $this->getfieldshtml(3);
98
+ }?>
99
+
100
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
101
+ <li class="section_2">
102
+ <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="billing.setSameAsBilling_ship(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
103
+ <?php else:?>
104
+ <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
105
+ <?php endif;?>
106
+ </ul>
107
+
108
+ </li>
109
+ <li class="section_2">
110
+ <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="billing.setSameAsBilling_ship(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
111
+ </li>
112
+ </ul>
113
+ <script type="text/javascript">
114
+ //<![CDATA[
115
+ if($('shipping-address-select')){$('shipping-address-select').observe('change', function(event){billing.setAddress_ship($('shipping-address-select').value);}.bind(this));}
116
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/update_country')): ?>
117
+ if($('shipping:country_id')){$('shipping:country_id').observe('change', function(event){billing.saveCountry_ship();Event.stop(event);}.bind(this));}
118
+ <?php endif;?>
119
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/update_zip')): ?>
120
+ if($('shipping:postcode')){$('shipping:postcode').observe('change', function(event){billing.saveCountry_ship();Event.stop(event);}.bind(this));}
121
+ <?php endif;?>
122
+ <?php if(Mage::helper('easycheckout')->getEasycheckoutConfig('general/update_state')): ?>
123
+ if($('shipping:region_id')){$('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");}
124
+ <?php endif;?>
125
+
126
+ billing.shippinginit(
127
+ '<?php echo $this->getUrl('checkout/onestep/saveShipping') ?>',
128
+ '<?php echo $this->getUrl('checkout/onestep/getAddress') ?>address/'
129
+ );
130
+ /*var shipping = new Shipping(
131
+ '<?php echo $this->getUrl('checkout/onestep/saveShipping') ?>',
132
+ '<?php echo $this->getUrl('checkout/onestep/getAddress') ?>address/'
133
+ ); */
134
+
135
+ $('shipping-address-select') && billing.newAddress_ship(!$('shipping-address-select').value);
136
+
137
+ var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', countryRegions, undefined, 'shipping:postcode');
138
+ //]]>
139
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/shipping_method.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <div id="checkout-shipping-method-loadaction" style="display:block;">
2
+ <?php echo $this->getChildHtml('available') ?>
3
+ </div>
4
+ <script type="text/javascript">
5
+ //<![CDATA[
6
+ billing.shippingmethodinit("<?php echo $this->getUrl('checkout/onestep/saveShippingMethod') ?>",true);
7
+ //var shippingMethod = new ShippingMethod("<?php echo $this->getUrl('checkout/onestep/saveShippingMethod') ?>",true);
8
+ //]]>
9
+ </script>
app/design/frontend/default/default/template/easycheckout/onestep/shipping_method/_available.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
2
+ <h6><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></h6>
3
+ <?php else: ?>
4
+ <dl >
5
+ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
6
+ <h6><?php echo $this->getCarrierName($code) ?></h6>
7
+ <dt>
8
+
9
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
10
+
11
+ <?php if ($_rate->getErrorMessage()): ?>
12
+ <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
13
+ <?php else: ?>
14
+ <?php if ($_sole) : ?>
15
+
16
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" class="radio" /></span>
17
+
18
+ <?php else: ?>
19
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio validate-one-required-by-name" />
20
+ <?php endif; ?>
21
+
22
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
23
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
24
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
25
+ <?php echo strip_tags($_excl); ?>
26
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
27
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo strip_tags($_incl); ?>)
28
+ <?php endif; ?>
29
+ </label>
30
+ <p class="clear"></p>
31
+ <?php endif ?>
32
+
33
+ <?php endforeach; ?>
34
+
35
+ </dt>
36
+ <?php endforeach; ?>
37
+ </dl>
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ $$('#checkout-shipping-method-loadaction input').invoke('observe', 'click', function(event){billing.saveShippingMethod();});
41
+ //]]>
42
+ </script>
43
+ <?php endif; ?>
app/design/frontend/default/default/template/easycheckout/onestep/shipping_method/available.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
2
+ <h6><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></h6>
3
+ <?php else: ?>
4
+ <dl > <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
5
+
6
+ echo $this->getfieldshtml(1);
7
+ }?>
8
+ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
9
+ <h6><?php echo $this->getCarrierName($code) ?></h6>
10
+ <dt>
11
+
12
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
13
+
14
+ <?php if ($_rate->getErrorMessage()): ?>
15
+ <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
16
+ <?php else: ?>
17
+ <?php if ($_sole) : ?>
18
+
19
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" class="radio" /></span>
20
+
21
+ <?php else: ?>
22
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio validate-one-required-by-name" />
23
+ <?php endif; ?>
24
+
25
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
26
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
27
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
28
+ <?php echo strip_tags($_excl); ?>
29
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
30
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo strip_tags($_incl); ?>)
31
+ <?php endif; ?>
32
+ </label>
33
+ <p class="clear"></p>
34
+ <?php endif ?>
35
+
36
+ <?php endforeach; ?>
37
+
38
+ </dt>
39
+ <?php endforeach; ?>
40
+ <?php if(Mage::getStoreConfig('fieldsmanager/general/enable') == 1){
41
+ echo $this->getfieldshtml(2);
42
+ echo $this->getfieldshtml(3);
43
+ }?>
44
+ </dl>
45
+ <script type="text/javascript">
46
+ //<![CDATA[
47
+ $$('#checkout-shipping-method-loadaction input').invoke('observe', 'click', function(event){billing.saveShippingMethod();});
48
+ //]]>
49
+ </script>
50
+ <?php endif; ?>
app/etc/modules/Magegaga_Easycheckout.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Magegaga_Easycheckout>
6
+ <active>true</active>
7
+ <codePool>local</codePool>
8
+ </Magegaga_Easycheckout>
9
+ </modules>
10
+ </config>
js/easycheckout/easycheckout.js ADDED
@@ -0,0 +1,807 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(typeof String.prototype.trim !== 'function') {
2
+ String.prototype.trim = function() {
3
+ return this.replace(/^\s+|\s+$/g, '');
4
+ }
5
+ }
6
+
7
+ var Easycheckout=Class.create();
8
+ Easycheckout.prototype={
9
+ initialize:function(a){
10
+ //alert("In easycheckout");
11
+ this.loadWaitingReview=this.loadWaitingPayment=this.loadWaitingShippingMethod=false;
12
+ this.failureUrl=a.failure;this.reloadReviewUrl=a.reloadReview;
13
+ this.reloadPaymentUrl=a.reloadPayment;
14
+ this.successUrl=a.success;
15
+ this.response=[]
16
+ },
17
+ ajaxFailure:function(){
18
+
19
+ location.href=this.failureUrl
20
+ },
21
+ processRespone:function(a){
22
+
23
+ var b;
24
+ if(a&&a.responseText)
25
+ try{
26
+ b=a.responseText.evalJSON()
27
+
28
+ }
29
+ catch(c){
30
+ b={}
31
+ }
32
+
33
+ if(b.redirect){
34
+ location.href=b.redirect;}
35
+ else if(b.error){
36
+
37
+ if(b.fields){
38
+ a=b.fields.split(",");
39
+ for(var d=0;d<a.length;d++)
40
+ null==$(a[d])&&Validation.ajaxError(null,b.error)
41
+ }
42
+ else{
43
+ if(b.error && b.payment){
44
+ this.updatePayment();billing.initWhatIsCvvListeners()
45
+ }
46
+ else{
47
+ alert(Translator.translate(b.error_messages));
48
+ }
49
+ }
50
+ }
51
+ else if(b.response_status_detail){
52
+ alert(Translator.translate(b.response_status_detail));
53
+ }
54
+ else{
55
+ this.response=b;
56
+
57
+ if(b.shippingMethod)
58
+ {
59
+ this.updateShippingMethod();}
60
+ else if(b.payment){
61
+
62
+ this.updatePayment();billing.initWhatIsCvvListeners()
63
+ }
64
+ else{
65
+
66
+ this.updateReview()}
67
+ }
68
+ },
69
+ setLoadWaitingShippingMethod:function(a){
70
+ this.loadWaitingShippingMethod=a;
71
+ if(a==true){
72
+ $('easycheckout-ajax-loader-text').update(ShippingMethods_Loading_Text);
73
+ $("easycheckout-ajax-loader")&&Element.show("easycheckout-ajax-loader");
74
+ $("checkout-shipping-method-loadaction")&&Element.hide("checkout-shipping-method-loadaction")
75
+ }
76
+ else{
77
+ if($("billing:use_for_shipping_yes") && $("billing:use_for_shipping_yes").checked==true){
78
+ $("easycheckout-ajax-loader")&&Element.hide("easycheckout-ajax-loader");
79
+ }
80
+ $("checkout-shipping-method-loadaction")&&Element.show("checkout-shipping-method-loadaction")
81
+ }
82
+
83
+ },
84
+ resetLoadWaitingShippingMethod:function(){
85
+ this.setLoadWaitingShippingMethod(false)
86
+ },
87
+ updateShippingMethod:function(){
88
+ if($("checkout-shipping-method-loadaction")){
89
+
90
+ $("checkout-shipping-method-loadaction").update(this.response.shippingMethod);
91
+ this.resetLoadWaitingShippingMethod();
92
+ if($$("#checkout-shipping-method-loadaction .no-display input").length!=0){
93
+ $$("#checkout-shipping-method-loadaction .no-display input")[0].checked==true&&billing.saveShippingMethod();
94
+ }
95
+ else if($$("#checkout-shipping-method-loadaction input").length!=0) {
96
+ var a=false;
97
+ $$("#checkout-shipping-method-loadaction input").each(function(b){
98
+ if(b.checked==true)
99
+ { a=true;
100
+ }
101
+ });
102
+ if(!a){
103
+ $$("#checkout-shipping-method-loadaction input").each(function(b){
104
+ b.checked=true;
105
+ a=true;
106
+ throw $break;
107
+ });
108
+ }
109
+ a==true?billing.saveShippingMethod():this.reloadPayment();
110
+ }else{
111
+ this.response.payment&&this.reloadPayment()}
112
+ }
113
+ else{
114
+
115
+ this.response.payment&&this.reloadPayment()
116
+ }
117
+ },
118
+ setLoadWaitingPayment:function(a){
119
+ this.loadWaitingPayment=a;
120
+ if(a==true){
121
+ $('easycheckout-ajax-loader-text').update(Payment_Loading_Text);
122
+ $("easycheckout-ajax-loader")&& Element.show("easycheckout-ajax-loader");
123
+ $("checkout-payment-method-load")&&Element.hide("checkout-payment-method-load")
124
+ }
125
+ else{
126
+ $("checkout-payment-method-load")&&Element.show("checkout-payment-method-load")
127
+ }
128
+ },
129
+ resetLoadWaitingPayment:function(){
130
+ this.setLoadWaitingPayment(false)
131
+ },
132
+ updatePayment:function(){
133
+ $("checkout-payment-method-load").update(this.response.payment);
134
+ this.resetLoadWaitingPayment();
135
+ billing.switchMethod(billing.currentMethod);
136
+ if($$("#checkout-payment-method-load .no-display input").length!=0)
137
+ $$("#checkout-payment-method-load .no-display input")[0].checked==true&&billing.savePayment();
138
+ else{
139
+
140
+ var a=false;
141
+ $$("#checkout-payment-method-load input").each(function(b){
142
+ if(b.checked==true)
143
+ { a=true;
144
+ }
145
+ });
146
+ if(!a){
147
+ $$("#checkout-payment-method-load input").each(function(b){
148
+ b.checked=true;
149
+ a=true;
150
+ throw $break;
151
+ });
152
+ }
153
+ a==true?billing.savePayment():this.reloadReview()
154
+ }
155
+ },
156
+ setLoadWaitingReview:function(a){
157
+ this.loadWaitingReview=a;
158
+ if(a==true){
159
+ $('easycheckout-ajax-loader-text').update(Review_Loading_Text);
160
+ $("easycheckout-ajax-loader")&&Element.show("easycheckout-ajax-loader");
161
+ $("easycheckout-review-loadaction")&&Element.hide("easycheckout-review-loadaction")
162
+ }
163
+ else if(a=='saving_order'){
164
+ $('easycheckout-ajax-loader-text').update(Review_Submitting_Text);
165
+ $("easycheckout-ajax-loader")&&Element.show("easycheckout-ajax-loader");
166
+ }
167
+ else{
168
+ $("easycheckout-ajax-loader")&&Element.hide("easycheckout-ajax-loader");
169
+ $("easycheckout-review-loadaction")&&Element.show("easycheckout-review-loadaction")
170
+ }
171
+ },
172
+ resetLoadWaitingReview:function(){
173
+ this.setLoadWaitingReview(false)
174
+ },
175
+ updateReview:function(){
176
+ $("easycheckout-review-loadaction").update(this.response.review);
177
+ this.resetLoadWaitingReview();
178
+ if(this.response.success)
179
+ location.href=this.successUrl
180
+ },
181
+ reloadReview:function(){
182
+ this.setLoadWaitingReview(true);
183
+ new Ajax.Updater('',this.reloadReviewUrl,{
184
+ method:"post",
185
+ onComplete:this.resetLoadWaitingReview,
186
+ onSuccess:this.processRespone.bind(this),
187
+ onFailure:this.ajaxFailure.bind(this)
188
+ })
189
+ },
190
+ reloadPayment:function(){
191
+ this.setLoadWaitingPayment(true);
192
+ new Ajax.Updater('',this.reloadPaymentUrl,{
193
+ method:"post",
194
+ onComplete:this.resetLoadWaitingPayment,
195
+ onSuccess:this.processRespone.bind(this),
196
+ onFailure:this.ajaxFailure.bind(this)
197
+ })
198
+ },
199
+ showOptionsList:function(a,b){
200
+ if(a){
201
+ new Effect.toggle(b,"appear");
202
+ new Effect.toggle(a.id,"appear");
203
+ console.log(a.id.substring(0,10));
204
+ if(a.id.substring(0,10)=="option-exp")
205
+ new Effect.toggle("option-clo-"+a.id.substring(11));
206
+ else
207
+ new Effect.toggle("option-exp-"+a.id.substring(11))
208
+ }
209
+ }
210
+ };
211
+ var Billing=Class.create();
212
+ Billing.prototype={
213
+ initialize:function(a,b,c,d){
214
+ //alert("In Billing");
215
+ this.useBilling=a;
216
+ this.saveCountryUrl=b;
217
+ this.switchMethodUrl=c;
218
+ this.addressUrl=d
219
+ },
220
+ shippinginit:function(a,b){
221
+ //alert("In Shipping");
222
+ this.saveCountryUrlShip=a;
223
+ this.addressUrlShip=b
224
+ },
225
+ paymentinit:function(a){
226
+ this.saveUrlpayment=a;
227
+ this.form;
228
+ this.saveUrlpayment=a;
229
+ this.onComplete;
230
+ this.currentMethod;
231
+ },
232
+ shippingmethodinit:function(a,b){ //alert("In shipping method");
233
+ this.saveUrl=a;
234
+ this.isReloadPayment=b
235
+ },
236
+ reviewinit:function(a,b,c){ //alert("In Review");
237
+ this.formreview=a;
238
+ this.saveUrlreview=b;
239
+ this.agreementsForm=c;
240
+ this.formdata = '';
241
+ this.onestepcheckourForm=new VarienForm(this.formreview)
242
+ },
243
+ cartupdateinit:function(a){
244
+ // alert("in cart update");
245
+ this.CartUrl=a;
246
+ // this.reload=false;
247
+ this.response=[]
248
+ },
249
+ enalbleShippingAddress:function(){
250
+ this.setStepNumber();
251
+ if($("billing:use_for_shipping_yes").checked==true){
252
+ Element.show("shipping-address-form");
253
+ this.useBilling=false;
254
+ $("shipping-address-select")?billing.setAddress_ship($("shipping-address-select").value):billing.saveCountry_ship();
255
+
256
+ }else{
257
+ Element.hide("shipping-address-form");
258
+ this.useBilling=true;
259
+ this.saveCountry()
260
+ }
261
+ },
262
+ saveCountry:function(){
263
+ var a=$("billing:country_id").value,
264
+ b=$("billing:postcode").value,
265
+ c=$("billing:region_id").value;
266
+ if(this.useBilling){
267
+ easycheckout.setLoadWaitingShippingMethod(true);
268
+ new Ajax.Updater('',this.saveCountryUrl,{
269
+ parameters:{country_id:a,postcode:b,region_id:c,use_for:"billing"},
270
+ method:"post",
271
+ onComplete:easycheckout.resetLoadWaitingShippingMethod.bind(easycheckout),
272
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
273
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
274
+ })
275
+
276
+ }else{
277
+ easycheckout.setLoadWaitingShippingMethod(true);
278
+ new Ajax.Updater('',this.saveCountryUrl,{
279
+ parameters:{country_id:a,postcode:b,region_id:c,use_for:"shipping"},
280
+ method:"post",
281
+ onComplete:easycheckout.resetLoadWaitingPayment.bind(easycheckout),
282
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
283
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
284
+ })
285
+
286
+ }
287
+ },
288
+ register:function(){
289
+ var a="";
290
+ if($("billing:register").checked==true&&$("billing:register").value==1){
291
+ Element.show("register-customer-password");
292
+ a="register"
293
+ }else{
294
+ Element.hide("register-customer-password");
295
+ a="guest"
296
+ }
297
+ a&&new Ajax.Updater('',this.switchMethodUrl,{
298
+ parameters:{method:a},
299
+ method:"post",
300
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
301
+ })
302
+ },
303
+ setAddress:function(a){
304
+ if(a)request=new Ajax.Updater('',this.addressUrl+a,{
305
+ method:"get",
306
+ onSuccess:this.fillForm.bindAsEventListener(this),
307
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
308
+ })
309
+ },
310
+ newAddress:function(a){
311
+ if(a){
312
+ this.resetSelectedAddress();
313
+ Element.show("billing-new-address-form")
314
+ }else
315
+ Element.hide("billing-new-address-form")
316
+ },
317
+ resetSelectedAddress:function(){
318
+ var a=$("billing-address-select");
319
+ if(a)a.value=""
320
+ },
321
+ fillForm:function(a){
322
+ var b={};
323
+ if(a&&a.responseText)
324
+ try{
325
+ b=a.responseText.evalJSON()
326
+ }
327
+ catch(c){
328
+ b={}
329
+ }else
330
+ this.resetSelectedAddress();
331
+ arrElements=Form.getElements(billing.formreview);
332
+ for(var d in arrElements)
333
+ if(arrElements[d].id){
334
+ a=arrElements[d].id.replace(/^billing:/,"");
335
+ if(b[a]!=undefined&&b[a])
336
+ arrElements[d].value=b[a]
337
+ }
338
+ this.saveCountry()
339
+ },
340
+ setStepNumber:function(){
341
+ steps=$$("#easycheckout-number");
342
+ for(var a=0;a<steps.length;a++)
343
+ if(steps[a].className!="step-1"&&steps[a].className!="step-review")
344
+ if($("billing:use_for_shipping_yes").checked==true){
345
+ steps[a].className!="shipping"&&steps[a].removeClassName("step-"+a);
346
+ steps[a].addClassName("step-"+(a+1))
347
+ }else{
348
+ steps[a].className!="step-2"&&steps[a].addClassName("step-"+a);
349
+ steps[a].removeClassName("step-"+(a+1))
350
+ }
351
+ },
352
+ // SHIPPNG ======= STARTS
353
+ saveCountry_ship:function(){
354
+ if(billing.useBilling==false){
355
+ var a=$("shipping:country_id").value,
356
+ b=$("shipping:postcode").value,
357
+ c=$("shipping:region_id").value;
358
+ easycheckout.setLoadWaitingShippingMethod(true);
359
+ new Ajax.Updater('',this.saveCountryUrlShip,{
360
+ parameters:{country_id:a,postcode:b,region_id:c},
361
+ method:"post",
362
+ onComplete:easycheckout.resetLoadWaitingPayment.bind(easycheckout),
363
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
364
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
365
+ })
366
+ }
367
+ },
368
+ setAddress_ship:function(a){
369
+ if(a)request=new Ajax.Updater('',this.addressUrlShip+a,{
370
+ method:"get",
371
+ onSuccess:this.fillForm_ship.bindAsEventListener(this),
372
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
373
+ })
374
+ },
375
+ newAddress_ship:function(a){
376
+ if(a){
377
+ this.resetSelectedAddress_ship();
378
+ Element.show("shipping-new-address-form")
379
+ }else
380
+ Element.hide("shipping-new-address-form");
381
+ billing.setSameAsBilling_ship(false)
382
+ },
383
+ resetSelectedAddress_ship:function(){
384
+ var a=$("shipping-address-select");
385
+ if(a)a.value=""
386
+ },
387
+ setSameAsBilling_ship:function(a){
388
+ ($("shipping:same_as_billing").checked=a)&&this.syncWithBilling_ship()
389
+ },
390
+ syncWithBilling_ship:function(){
391
+ $("billing-address-select")&&this.newAddress_ship(!$("billing-address-select").value);
392
+ $("shipping:same_as_billing").checked=true;
393
+ if(!$("billing-address-select")||!$("billing-address-select").value){
394
+ arrElements=Form.getElements(billing.formreview);
395
+ for(var a in arrElements)if(arrElements[a].id){
396
+ var b=$(arrElements[a].id.replace(/^shipping:/,"billing:"));
397
+ if(b)
398
+ arrElements[a].value=b.value
399
+ }
400
+ shippingRegionUpdater.update();
401
+ $("shipping:region_id").value=$("billing:region_id").value;
402
+ $("shipping:region").value=$("billing:region").value
403
+ }else{
404
+ $("shipping-address-select").value=$("billing-address-select").value
405
+ }
406
+ billing.saveCountry_ship();
407
+ },
408
+ fillForm_ship:function(a){
409
+ var b={};
410
+ if(a&&a.responseText)
411
+ try{
412
+ b=a.responseText.evalJSON()
413
+ }catch(c){
414
+ b={}
415
+ }
416
+ else
417
+ this.resetSelectedAddress_ship();
418
+ arrElements=Form.getElements(billling.formreview);
419
+ for(var d in arrElements)
420
+ if(arrElements[d].id){
421
+ a=arrElements[d].id.replace(/^shipping:/,"");
422
+ if(b[a]!=undefined&&b[a])arrElements[d].value=b[a]
423
+ }
424
+ this.saveCountry_ship()
425
+ },
426
+ setRegionValue_ship:function(){
427
+ $("shipping:region").value=$("billing:region").value
428
+ },
429
+ // SHIPPNG ======= ENDS
430
+
431
+ //START OF SHIPPING METHOD
432
+ saveShippingMethod:function(){
433
+ for(var a=document.getElementsByName("shipping_method"),b="",c=0;c<a.length;c++)
434
+ if(a[c].checked)b=a[c].value;
435
+ if(b!=""){
436
+
437
+ this.isReloadPayment==1&&easycheckout.setLoadWaitingPayment(true);
438
+ new Ajax.Updater('',this.saveUrl,{
439
+ parameters:{shipping_method:b},
440
+ method:"post",
441
+ onComplete:easycheckout.resetLoadWaitingPayment.bind(easycheckout),
442
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
443
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
444
+ })
445
+ }
446
+ },
447
+
448
+ //End OF SHIPPING METHOD ==========
449
+
450
+ // START OF PaYMENT METHOD ======================
451
+ beforeInitFunc:$H({}),
452
+ afterInitFunc:$H({}),
453
+ beforeValidateFunc:$H({}),
454
+ afterValidateFunc:$H({}),
455
+ init:function(){ //alert("In payment");
456
+ for(var a=$$("input[name^=payment]"),b=null,c=0;c<a.length;c++)
457
+ {
458
+ if(a[c].name=="payment[method]")
459
+ {
460
+ if(a[c].checked)b=a[c].value
461
+ }
462
+ else
463
+
464
+ a[c].disabled=true;
465
+ a[c].setAttribute("autocomplete","off")
466
+ }
467
+ b&&this.switchMethod(b)
468
+ },
469
+ savePayment:function(){
470
+ var a=document.getElementsByName("payment[method]");
471
+
472
+ value="";
473
+ for(var b=0;b<a.length;b++)
474
+ if(a[b].checked)value=a[b].value;
475
+ if(value!=""){easycheckout.setLoadWaitingReview(true);
476
+
477
+ new Ajax.Updater('',this.saveUrlpayment,{
478
+ parameters:{method:value},
479
+ method:"post",
480
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
481
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
482
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
483
+ })
484
+ }
485
+ },
486
+ /////////Ipayment fix ///////////////
487
+ save:function(){
488
+ var a=document.getElementsByName("payment[method]");
489
+
490
+ value="";
491
+ for(var b=0;b<a.length;b++)
492
+ if(a[b].checked)value=a[b].value;
493
+ if(value!=""){easycheckout.setLoadWaitingReview(true);
494
+
495
+ new Ajax.Updater('',this.saveUrlpayment,{
496
+ parameters:{method:value},
497
+ method:"post",
498
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
499
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
500
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
501
+ })
502
+ }
503
+ },
504
+ beforeValidate : function() {
505
+ var validateResult = true;
506
+ var hasValidation = false;
507
+ (this.beforeValidateFunc).each(function(validate){
508
+ hasValidation = true;
509
+ if ((validate.value)() == false) {
510
+ validateResult = false;
511
+ }
512
+ }.bind(this));
513
+ if (!hasValidation) {
514
+ validateResult = false;
515
+ }
516
+ return validateResult;
517
+ },
518
+
519
+ validate: function() {
520
+ var result = this.beforeValidate();
521
+ if (result) {
522
+ return true;
523
+ }
524
+ var methods = document.getElementsByName('payment[method]');
525
+ if (methods.length==0) {
526
+ alert(Translator.translate('Your order cannot be completed at this time as there is no payment methods available for it.').stripTags());
527
+ return false;
528
+ }
529
+ for (var i=0; i<methods.length; i++) {
530
+ if (methods[i].checked) {
531
+ return true;
532
+ }
533
+ }
534
+ result = this.afterValidate();
535
+ if (result) {
536
+ return true;
537
+ }
538
+ alert(Translator.translate('Please specify payment method.').stripTags());
539
+ return false;
540
+ },addAfterValidateFunction : function(code, func) {
541
+ this.afterValidateFunc.set(code, func);
542
+ },
543
+
544
+ afterValidate : function() {
545
+ var validateResult = true;
546
+ var hasValidation = false;
547
+ (this.afterValidateFunc).each(function(validate){
548
+ hasValidation = true;
549
+ if ((validate.value)() == false) {
550
+ validateResult = false;
551
+ }
552
+ }.bind(this));
553
+ if (!hasValidation) {
554
+ validateResult = false;
555
+ }
556
+ return validateResult;
557
+ },
558
+
559
+ /////////////////////////////////////
560
+ switchMethod:function(a){
561
+
562
+ if(this.currentMethod&&$("payment_form_"+this.currentMethod))
563
+ {
564
+ var b=$("payment_form_"+this.currentMethod);
565
+ b.hide();
566
+ b=b.select("input","select","textarea");
567
+ for(var c=0;c<b.length;c++)b[c].disabled=true
568
+ }
569
+ if($("payment_form_"+a))
570
+ {
571
+ b=$("payment_form_"+a);
572
+ b.show();
573
+ b=b.select("input","select","textarea");
574
+ for(c=0;c<b.length;c++)b[c].disabled=false
575
+ }else
576
+
577
+ $(document.body).fire("payment-method:switched",{
578
+ method_code:a
579
+ });
580
+ this.currentMethod=a
581
+ },
582
+ initWhatIsCvvListeners:function(){
583
+ $$(".cvv-what-is-this").each(function(a){
584
+ Event.observe(a,"click",toggleToolTip)
585
+ })
586
+ },
587
+ // END OF PaYMENT METHOD ======================
588
+
589
+ // START OF REVIEW METHOD ======================
590
+ save_review:function(){
591
+ if((new Validation(this.formreview)).validate()){
592
+ if(billing.currentMethod && billing.currentMethod.startsWith('sage') && $("billing:use_for_shipping_yes").checked!=true){
593
+ billing.setSameAsBilling_ship(true);
594
+ } easycheckout.setLoadWaitingReview('saving_order');
595
+ var a=Form.serialize(this.formreview);
596
+ if(this.agreementsForm)
597
+ a+="&"+Form.serialize(this.agreementsForm);
598
+ if($(billing.currentMethod+"_cc_type")){
599
+ pay="payment%5Bcc_type%5D="+$(billing.currentMethod+"_cc_type").value+"&payment%5Bcc_exp_month%5D="+$(billing.currentMethod+"_expiration").value+"&payment%5Bcc_exp_year%5D="+$(billing.currentMethod+"_expiration_yr").value;
600
+ a+="&"+pay;
601
+ }
602
+ a.save=true;
603
+ this.formdata =a;
604
+ if(billing.currentMethod && billing.currentMethod.startsWith('sage') || billing.currentMethod.startsWith('ipayment')){
605
+ /////////// Ipayment Fix ///////////////
606
+ if( billing.currentMethod.startsWith('ipayment')){
607
+ billing.form=this.formreview;billing.onComplete = billing.processRespone_review.bind(this);
608
+ if ($('ipayment_cc_additional_data').value.length!=0) {
609
+ new Ajax.Updater('',addaddressb4review,{
610
+ method:"post",
611
+ parameters:this.formdata,
612
+ onSuccess:this.processRespone_review.bind(this),
613
+ onFailure:easycheckout.ajaxFailure.bind(false)
614
+ })
615
+
616
+ }else{
617
+ new Ajax.Updater('',addaddressb4review,{
618
+ method:"post",
619
+ parameters:this.formdata,
620
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
621
+ onSuccess: billing.save(),
622
+ onFailure:easycheckout.ajaxFailure.bind(false)
623
+ })
624
+ }
625
+ }
626
+
627
+ else{
628
+ new Ajax.Updater('',addaddressb4review,{
629
+ method:"post",
630
+ parameters:this.formdata,
631
+ onSuccess:this.processRespone_review.bind(this),
632
+ onFailure:easycheckout.ajaxFailure.bind(false)
633
+ })
634
+ }
635
+ ///////////////////////////////
636
+ }
637
+ else{
638
+
639
+ if(billing.currentMethod && !billing.currentMethod.startsWith('sage')){
640
+ this.saveUrlreview=review_url;
641
+ }
642
+ new Ajax.Updater('',this.saveUrlreview,{
643
+ method:"post",
644
+ parameters:this.formdata,
645
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
646
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
647
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
648
+ })
649
+ }
650
+ }
651
+ },
652
+ processRespone_review:function(a){
653
+ var b;
654
+ if(a&&a.responseText)
655
+ try{
656
+ b=a.responseText.evalJSON()
657
+ }catch(c){
658
+ b={}
659
+ }
660
+ if(b.success){
661
+ if(billing.currentMethod && !billing.currentMethod.startsWith('sage')){
662
+
663
+ this.saveUrlreview=review_url;
664
+ }
665
+ if(billing.currentMethod.startsWith('sage') && 'sagepaydirectpro' != billing.currentMethod){
666
+ new Ajax.Updater('',SuiteConfig.getConfig('global', 'sgps_saveorder_url'),{
667
+ method:"post",
668
+ parameters: this.formdata,
669
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
670
+ onSuccess:function(f){
671
+ var data=f.responseText.evalJSON()
672
+
673
+ if(data.redirect && 'sagepayform'==billing.currentMethod){
674
+ if(data.response_status == 'ERROR'){
675
+ alert(data.response_status_detail);
676
+ //this.resetOscLoading();
677
+ return;
678
+ }
679
+ setLocation(SuiteConfig.getConfig('form','url'));
680
+ }else{
681
+ SageServer.reviewSave(f);
682
+ }
683
+ //skin\frontend\base\default\sagepaysuite\js\sagePaySuite_Checkout.js
684
+ //changes required in above js file also.
685
+
686
+ }.bind(this)
687
+ });
688
+ }else{
689
+ new Ajax.Updater('',this.saveUrlreview,{
690
+ method:"post",
691
+ parameters:this.formdata,
692
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
693
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
694
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
695
+ })
696
+ }
697
+
698
+ }
699
+
700
+ },
701
+ /////////////Ipayment Fix////////////////////
702
+ processIpayment:function(a){
703
+
704
+ if(!billing.currentMethod.startsWith('sage')){
705
+ this.saveUrlreview=review_url;
706
+ }
707
+
708
+ if(billing.currentMethod.startsWith('ipayment')){
709
+ new Ajax.Updater('',this.saveUrlreview,{
710
+ method:"post",
711
+ parameters:Form.serialize(billing.form),
712
+ onComplete:easycheckout.resetLoadWaitingReview.bind(easycheckout),
713
+ onSuccess:easycheckout.processRespone.bind(easycheckout),
714
+ onFailure:easycheckout.ajaxFailure.bind(easycheckout)
715
+ })
716
+ }
717
+ },
718
+
719
+ // END OF REVIEW METHOD ======================
720
+
721
+ //START OF CART UPDATER ====================
722
+ cartupdate:function(id,action){
723
+ // this.setLoadWaitingcoupon(false);
724
+ new Ajax.Updater('',this.CartUrl,{
725
+ parameters:{productid:id,update:action},
726
+ method:"post",
727
+ onComplete:easycheckout.setLoadWaitingShippingMethod(false),
728
+ onSuccess:this.processRespone_cartupdate.bind(this),
729
+ onFailure:easycheckout.ajaxFailure.bind(this)
730
+ })
731
+
732
+ },
733
+ processRespone_cartupdate:function(a){
734
+ var b;
735
+ if(a&&a.responseText)
736
+ try{
737
+ b=a.responseText.evalJSON()
738
+ }catch(c){
739
+ b={}
740
+ }
741
+ if(b.error){
742
+ alert(b.error);
743
+
744
+ }
745
+ else if (b.success){
746
+ if($("billing:use_for_shipping_yes").checked==true){
747
+ billing.saveCountry_ship();
748
+ }else{
749
+ billing.saveCountry();
750
+ }
751
+
752
+ }
753
+ }
754
+
755
+ //End OF CART UPDATER ====================
756
+
757
+ };
758
+
759
+
760
+
761
+ var Easycheckout_Agreements=Class.create();
762
+ Easycheckout_Agreements.prototype={
763
+ initialize:function(){
764
+ alert("In Easycheckout_Agreements ");
765
+ },
766
+ show:function(c){
767
+ a='QC-AG-Bk';
768
+ a+=c;
769
+ b='QC-AG-CO';
770
+ b+=c;
771
+ $(a).setStyle({
772
+ opacity:0,
773
+ visibility:"visible"
774
+ });
775
+ new Effect.Opacity(a,{
776
+ duration:0.9,from:0,to:0.8
777
+ });
778
+ Element.show(b)
779
+ },
780
+ hide:function(c){
781
+ a='QC-AG-Bk'+c;
782
+ b='QC-AG-CO'+c;
783
+ new Effect.Opacity(a,{
784
+ duration:0.9,
785
+ from:0.8,to:0,
786
+ afterFinish:function(){
787
+ $(a).setStyle({
788
+ opacity:0,visibility:"hidden"
789
+ })
790
+ }
791
+ });
792
+ Element.hide(b)
793
+ }
794
+ };
795
+ var Checkout=Class.create();
796
+ Checkout.prototype={
797
+ initialize:function(a){
798
+ this.loadWaiting=false;
799
+ }, ajaxFailure: function(){
800
+ easycheckout.ajaxFailure.bind(this);
801
+ },setLoadWaiting: function(step, keepDisabled) {
802
+
803
+
804
+ }
805
+ };
806
+ checkout = new Checkout();
807
+ ///////////////////////////////////
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>One_Step_Checkout</name>
4
+ <version>1.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://magegaga.com/licence/?___store=default">Magegaga License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>OSC dramatically simplifies the standard 6 step check-out into one step checkout process for your customers. </summary>
10
+ <description>OSC dramatically simplifies the standard 6 step check-out into one step checkout process for your customers. All unnecessary questions are removed and all the steps are combined into one. The user simply fills in their address and chooses delivery/payment methods on the same page, rather than having to do a separate step for each.</description>
11
+ <notes>First release</notes>
12
+ <authors><author><name>Magegaga</name><user>Magegaga</user><email>Magegaga.com@gmail.com</email></author></authors>
13
+ <date>2013-11-26</date>
14
+ <time>10:01:12</time>
15
+ <contents><target name="magelocal"><dir><dir name="Magegaga"><dir name="Easycheckout"><dir name="Controller"><file name="Event.php" hash="80d943d109115ef93f2e9487f92c8ab0"/></dir><dir name="Helper"><file name="Data.php" hash="38eb3068e07a54cf18fd2fe8665350b3"/></dir><dir name="Model"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><file name="Info.php" hash="0e001a16e7ca01e3b987f118120517bf"/></dir></dir></dir></dir><file name="Onestep.php" hash="e472cde528572007b76f64e4f38d3445"/><file name="Onestepcheckout.php" hash="7226f1b68a07b0fede7d6f9755f99f32"/></dir><file name="Checkbox.php" hash="eaab320c05d59ced2c8b3217b2b4d12b"/><file name="Observer.php" hash="d84f0e6d9d38c37008cd169f7974cc45"/><file name="Required.php" hash="8fc9b6b8c39f29f5a60b8df60e080d77"/><file name="Status.php" hash="47cf9bacc1eacb8f137b0a1f67a2579a"/></dir><dir name="controllers"><file name="OnestepController.php" hash="19c22e39ddfa7be7aa85fc06c3ae4b02"/></dir><dir name="etc"><file name="adminhtml.xml" hash="ecff30ea3f988f285318c4f15df8bb44"/><file name="config.xml" hash="9bfb5af22533f3a0cacc0282f1a57f6e"/><file name="system.xml" hash="253b99af66f95d82da697f41bb8a09bd"/></dir><dir name="sql"><dir name="easycheckout_setup"><file name="mysql4-upgrade-1.0.0-2.0.0.php" hash="dfa9409c6cf37a1d2911bc5f68f4a56d"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="easycheckout"><dir name="template"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="144b468be902692d8f11ba03ba975478"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="easycheckout.xml" hash="f779b07f27b82e00fdf8d0ce23781e02"/></dir><dir name="template"><dir name="easycheckout"><dir><dir name="onestep"><file name="agreements.phtml" hash="a4b9516f819a2896bbe66be7a652d05d"/><file name="billing.phtml" hash="753f1bdb109aa89a06b32aaa3be7192f"/><file name="billingdetail.phtml" hash="b0451e6f5d92c39533312b0087edb40f"/><file name="coupon.phtml" hash="77fb6696448c2faac9c6636ed3766e52"/><file name="coupondirect.phtml" hash="827f7452ac4a3ebf6503a1efde683c43"/><file name="login.phtml" hash="55b927d01f4eeab6f9a4ea49f976c59b"/><dir name="payment"><file name="methods.phtml" hash="a45ea5d0226d2d3ac7f33dc3ad87ff97"/></dir><file name="payment.phtml" hash="30df2c533d48a926b7953655bd6c620c"/><file name="quickheard.phtml" hash="912bc951d8c9ebf09c3318ad677b0dd7"/><dir name="review"><file name="additional.phtml" hash="8bbb8138a77758039416e706736c4a84"/><file name="info.phtml" hash="255fbc7deabf03b7002fac1aca165c50"/><file name="item.phtml" hash="48747e386fd75ec9b1caf314fedc0a7a"/></dir><file name="review.phtml" hash="a600c94026b5f63c6186b474a433afa8"/><file name="shipping.phtml" hash="642216c4a6a98cabc7d67852ab2261b9"/><dir name="shipping_method"><file name="_available.phtml" hash="f4d29550e603d61074928c1610fccd94"/><file name="available.phtml" hash="ec4479746d2c1a2e496239981b67491e"/></dir><file name="shipping_method.phtml" hash="8b0b77a903880a2fcb9e3154cd06cc1b"/></dir></dir><file name="onestep.phtml" hash="bf1e38c3178cf8c896b7367bd8c94c74"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Magegaga_Easycheckout.xml" hash="8c3936207cb891c11327b14e6e2ef844"/></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="easycheckout"><file name="easycheckout.css" hash="9aeadf0f2cd209b690ebe06af1f629a2"/></dir></dir><dir name="images"><dir name="easycheckout"><file name="Thumbs.db" hash="22b8e788375b9c4c208e56a60fdcd3cd"/><file name="closebox.png" hash="f2aace763cfcc4d6f3427a8a0842e55c"/><file name="down.png" hash="3c7c136244177094ee9dfd129787cb7a"/><file name="loader.gif" hash="26b595fb9273eb89fe5494325feea9ce"/><file name="loading_inner.gif" hash="b5e24db8f84eb4eac09c88f804f36df2"/><file name="osc-numbers.png" hash="49e36ff5d3af91ff1d3ab6b307866ebf"/><file name="osc-numbers1.png" hash="d43ece18426c6f281c9195163fedc7f1"/><file name="trans_BG.png" hash="fec7e99a538e0a88eb04c156b61f7cc1"/><file name="up.png" hash="4ef4b8e451af6e5f4af14f855b3b62cb"/><file name="up1.png" hash="714e886068d050e819cd166c50488725"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><dir name="js"><dir name="easycheckout"><file name="easycheckout.js" hash="e071571db558e18d196bff3fa756047a"/></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.8</max></package></required></dependencies>
18
+ </package>
skin/frontend/default/default/css/easycheckout/easycheckout.css ADDED
@@ -0,0 +1,475 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ol, ul {
4
+ list-style: none;
5
+ }
6
+
7
+ .clear { clear:both; line-height:10px;}
8
+
9
+ div.clear { height:10px}
10
+
11
+ div.c { clear:both; width:100%; height:0px}
12
+
13
+ /*---easycheout background color---*/
14
+ .easycheout_bg { background: linear-gradient(to bottom, #ffb76b 0%,#ffa73d 50%,#ff7c00 51%,#ff7f04 100%);}
15
+
16
+ .easycheout_headings {
17
+ -moz-border-radius: 4px 4px 4px 4px;
18
+ background: none repeat scroll 0 0 #f0b73e;
19
+ padding: 3px 0 1px 0;
20
+ width: 100%;
21
+ }
22
+
23
+ /*========== Main Container ===========*/
24
+ .easycheout_main { }
25
+
26
+ .easycheout_main_header { width:100%; clear:both}
27
+
28
+ .easycheout_main_header h1 { float:left; width:100%; text-transform:uppercase; font:24px/22px Tahoma normal; color:#434343}
29
+
30
+ .easycheout_main_header h2 { float:left; width:100%; font:18px/28px Tahoma normal; color:#434343; padding:5px 0 16px;}
31
+
32
+ .easycheout_main_header a { font:13px/20px Tahoma normal; text-decoration:underline; color:#5e8dbc; clear:both; margin-bottom:10px; *white-space:nowrap; *padding-bottom:10px;}
33
+
34
+ .easycheout_main_header a:hover { color:#666; text-decoration:none}
35
+
36
+ /*=============== Main Content ===============*/
37
+ #main_content { width:100%; margin:0px auto 0; border-top:1px solid #ddd; clear:both}
38
+
39
+ /*========= Billing Info div ==========*/
40
+ .billing { border:1px dashed #D8D8D8; -moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px;
41
+ float: left;
42
+ margin: 10px 0 0;
43
+ padding: 10px;
44
+ }
45
+
46
+ .billing h3 {
47
+ text-transform:uppercase; font:bold 15px/22px Tahoma normal; color:#000000;padding:0 0 2px 28px; margin-bottom:2px}
48
+
49
+
50
+ /*============ Shippng Address div =============*/
51
+ .easycheout_main .shipping { float:left; padding:10px; border:1px dashed #D8D8D8; -moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px; margin:16px 0 0; }
52
+
53
+ @media screen and (-webkit-min-device-pixel-ratio:0)
54
+ {
55
+ .easycheout_main .shipping{
56
+ clear:both
57
+ }
58
+ }
59
+
60
+ .easycheout_main .shipping h3 {text-transform:uppercase; font:bold 15px/22px Tahoma normal; color:#434343; padding:0 0 2px 28px; margin-bottom:15px}
61
+ .section_1 { float:left; width:47%; font:12px/18px Tahoma normal; margin:10px 0 0}
62
+
63
+ .section_4 { float:right; width:47%; font:12px/18px Tahoma normal; margin:10px 0 0}
64
+
65
+ .section_1 span, .section_2 span, .section_3 span, .section_4 span { color:#F03}
66
+
67
+ .section_1 input[type="text"] { width:100px; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px}
68
+
69
+ .section_1 input[type="password"] { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px}
70
+ .section_1 select { width:100% !important; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:1px 0 1px;}
71
+
72
+ .section_4 input[type="text"] { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px}
73
+
74
+ .section_4 input[type="password"] { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px}
75
+
76
+ .section_2 { float:left; width:100%; font:12px/18px Tahoma normal !important; margin:10px 0 0; clear:both}
77
+
78
+
79
+ .section_2 .field, .name-firstname{ width:47%;}
80
+ .name-firstname{ float:left;}
81
+ .section_2 .name-lastname{ float:right; width:47%;}
82
+ .section_2 input[type="text"] { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px; margin-bottom:6px}
83
+
84
+ .section_2 select { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:1px 0 1px;}
85
+
86
+ .section_3 { float:left; width:100%; font:12px/18px Tahoma normal; margin:10px 0 0}
87
+
88
+ .section_3 input[type="text"] { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px}
89
+
90
+ .section_4 select { width:100%; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:1px 0 1px; *margin-bottom:3px;}
91
+
92
+ @media screen and (-webkit-min-device-pixel-ratio:0)
93
+ {
94
+ .section_4 select{
95
+ margin-bottom:6px
96
+ }
97
+ }
98
+
99
+
100
+ /*=================== Methods section =================*/
101
+ .easycheout_main .shipping_method { float:left; border:1px dashed #D8D8D8; padding: 10px; width: 43%; -moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px; margin:10px 0 0 15px;}
102
+
103
+ .easycheout_main .shipping_method .payment { float:left; clear:both; padding-top:28px}
104
+
105
+ .easycheout_main .shipping_method .payment br { margin-bottom:5px}
106
+
107
+ .easycheout_main .shipping_method h3 { text-transform:uppercase; font:bold 15px/22px Tahoma normal; color:#000000; padding:0 0 2px 28px; margin:0px 0 2px 4px}
108
+
109
+ .easycheout_main .shipping_method h6 { width:100%; font:bold 12px/20px Tahoma normal; color:#434343; padding:5px 0 0px 4px; }
110
+
111
+ .easycheout_main .shipping_method label { font:12px/18px Tahoma normal; color:#474747; vertical-align:top; *vertical-align:middle !important;}
112
+
113
+
114
+ .easycheout_main .payment { float:right; border:1px dashed #D8D8D8; padding: 10px;width: 44%; -moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px; margin:10px 0 0 15px;}
115
+
116
+ .easycheout_main .payment h3 {text-transform:uppercase; font:bold 15px/22px Tahoma normal; color:#000000; padding:0 0 2px 28px; margin:0px 0 2px 4px}
117
+
118
+ .easycheout_main .payment h6 { float:left; width:100%; font:bold 12px/20px Tahoma normal; color:#434343; padding:5px 0 0px 4px; }
119
+
120
+ .easycheout_main .payment label { font:12px/18px Tahoma normal; color:#474747; vertical-align:top; *vertical-align:middle !important;}
121
+
122
+
123
+
124
+ #jumpMenu4 { width:180px; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:1px 0 1px;}
125
+
126
+ /*================== Review Order section ===================*/
127
+ .review { float:right; padding: 10px; border:1px dashed #D8D8D8; -moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px; margin:10px 0 0 0px; width:94%}
128
+
129
+ .review h3 {text-transform:uppercase; font:bold 15px/22px Tahoma normal; color:#000000; padding:0 0 2px 28px; margin:0px 0 2px 4px}
130
+
131
+
132
+
133
+ .order { width:100%; clear:both; margin:0 auto; padding:10px 0;}
134
+
135
+ .order ul { float:left; padding:0px; list-style:none; font:13px/18px Tahoma normal; color:#343434}
136
+
137
+ .order ul li { float:left}
138
+
139
+ /*=========== Plus Minus btn ===============*/
140
+ .minus { vertical-align:middle; margin-right:4px}
141
+
142
+ .plus { vertical-align:middle; margin-left:3px}
143
+
144
+
145
+
146
+
147
+ .place_order_btn { padding:6px 14px 7px; border:0px; cursor:pointer; clear:both; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; color:#494949; font:bold 13px/18px Tahoma; clear:both; height:auto;}
148
+
149
+ .place_order_btn:hover { opacity:0.85; color:#130e00;}
150
+
151
+
152
+ /*=============== Tooltip ==================*/
153
+
154
+ #screenshot{ position:absolute; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; background:#6E6E6E; display:none; color:#fff;}
155
+
156
+
157
+ #os-left{width:32%;float: left;}
158
+ #os-right{width:68%;float: right;}
159
+ .fields{width:100% !important;}
160
+ .form-list li.wide textarea{width:254px;}
161
+ .form-list li input{ border: 1px solid #BFBFBF;
162
+ color: #6F6F6F;
163
+ font: 12px/18px Tahoma normal;
164
+ padding: 2px 4px 3px;
165
+ width: 170px !important;}
166
+ .shipping-methods select.month,.shipping-methods select.year {
167
+ width: 85px !important;}
168
+ .shipping-methods select.month {
169
+ margin-right: 10px;
170
+ }
171
+ .shipping-methods input.cvv {
172
+ width: 3em !important;
173
+ }
174
+ .shipping-methods {
175
+ margin: 0 0 8px;
176
+ }
177
+
178
+ .shipping-methods dt {
179
+ font-weight: bold;
180
+ margin: 13px 0 5px;
181
+ }
182
+ .tips .tips-content {
183
+ padding: 15px 8px 0px !important
184
+ }
185
+
186
+ .form-list li select{ border: 1px solid #BFBFBF;
187
+ color: #6F6F6F;
188
+ font: 12px/18px Tahoma normal;
189
+ padding: 1px 0;
190
+ width: 180px !important;}
191
+
192
+ /*================= Data Table =================*/
193
+
194
+ .data-table { width:100%;border:none; }
195
+ .data-table .odd { background:#f8f7f5 }
196
+ .data-table .even { background:#eeeded; }
197
+ .data-table td.last,
198
+ .data-table th.last { border-right:0; }
199
+ .data-table tr.last th { border-bottom:0 !important;border-right:none;}
200
+ .data-table tr.last td { border-bottom:0 !important;border-right:none;text-align: right; }
201
+ .data-table th { padding:3px 8px; font-weight:bold; }
202
+
203
+
204
+ .data-table thead th { font-weight:bold; padding:2px 8px; color:#0a263c; white-space:nowrap; vertical-align:middle; background:none;border:none;}
205
+ .data-table thead th.wrap { white-space:normal; }
206
+ .data-table thead th a,
207
+ .data-table thead th a:hover { color:#fff; }
208
+ .data-table thead th { }
209
+ .data-table thead th .tax-flag { font-size:11px; white-space:nowrap; }
210
+
211
+ .data-table tfoot { border-bottom:1px solid #d9dde3; }
212
+ .data-table tfoot tr.first td {background:none; text-align: right; }
213
+ .data-table tfoot tr { border:none;background:none;background-color:#FFF !important; }
214
+ .data-table tfoot td { padding-top:1px; padding-bottom:1px; border-bottom:0;border-right:none; }
215
+ .data-table tfoot strong { font-size:16px; }
216
+
217
+ .data-table tbody th,
218
+ .data-table tbody td { border-bottom:1px solid #d9dde3; }
219
+
220
+
221
+ /*=================== Bundle products tables design =================*/
222
+
223
+
224
+ .data-table tbody.odd tr { background:#f8f7f5 !important; }
225
+ .data-table tbody.even tr { background:#f6f6f6 !important; }
226
+ .data-table tbody.odd tr td,
227
+ .data-table tbody.even tr td { border-bottom:0; }
228
+ .data-table tbody.odd tr.border td,
229
+ .data-table tbody.even tr.border td { border-bottom:1px solid #d9dde3; }
230
+
231
+ .data-table tbody td .option-label { font-weight:bold; font-style:italic; }
232
+ .data-table tbody td .option-value { padding-left:10px; }
233
+ .product-name {
234
+ padding: 0px !important;
235
+ background: none repeat scroll 0 0 transparent !important;
236
+ text-align: left;
237
+ margin: 0 !important;
238
+ text-transform: none !important;
239
+ width: 100%; font:12px/1.55 Tahoma normal !important;
240
+ }
241
+
242
+
243
+
244
+ .close { float:right; margin: -30px -50px 0 0; border:0px; }
245
+ .easycheckout_loader { width:400px; height:300px; margin:0 auto; top:30%; background:url('../../images/easycheckout/ajax-loader.gif') no-repeat left top; position:relative}
246
+ .easycheckout-title span{float:left;width:27px;height:27px;margin-right:5px;background:transparent url(../../images/easycheckout/osc-numbers.png) no-repeat;}
247
+ .easycheckout-title .step-1{background-position:0;}
248
+ .easycheckout-title .step-2{background-position:-27px;}
249
+ .easycheckout-title .step-3{background-position:-54px;}
250
+ .easycheckout-title .step-4{background-position:-81px;}
251
+ .easycheckout-title .step-review{background-position:-242px;}
252
+
253
+ .easycheckout-login{background:none repeat scroll 0 0 black;height:100%;width:100%;left:0;top:0;position:fixed;z-index:999;}
254
+ .easycheckout-login-form .login-form button{float:right;}
255
+ #easycheckout-login-form { width:305px; background:#FFF; padding: 20px 40px; -moz-box-shadow: 0 0 20px #000; box-shadow: 0 0 20px #000;
256
+ height: auto; border: 1px solid #CCCCCC;
257
+ left: 30%;
258
+ position: fixed;
259
+ top: 22%;
260
+ z-index: 1000;}
261
+
262
+ #easycheckout-login-form h1 { font:23px/20px Tahoma normal; color:#4B4B4B; padding-bottom:20px}
263
+
264
+ #easycheckout-login-form label { font:12px/32px Tahoma normal; color:#474747; float:left; clear: both;}
265
+
266
+ .easycheckout-login-form_input { width:180px; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px; float:right; margin-bottom:8px; margin-top:5px}
267
+
268
+ #easycheckout-login-form a { float:right; clear:both; color:#4B4B4B; text-decoration:none; font:11px/18px Tahoma normal; }
269
+
270
+ .set_margin { margin-bottom:2px !important;}
271
+
272
+ #easycheckout-login-form a:hover { text-decoration:underline; color:#F00}
273
+
274
+ #easycheckout-login-form .loging_btn {height:auto; padding:4px 13px 5px; border:0px; cursor:pointer; clear:both; margin:20px 10px 0 0; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; color:#494949; font:bold 13px/18px Tahoma; float:left; clear:both;}
275
+
276
+ #easycheckout-login-form .loging_btn:hover { opacity:0.85;}
277
+
278
+
279
+ /*============== Loading Box =============*/
280
+ #easycheckout-ajax-loader { position:fixed; z-index:9999; width:100%; height:100%; background:url('../../images/easycheckout/trans_BG.png') repeat; left:0; top:0}
281
+
282
+ #easycheckout-ajax-loader div { width:120px; height:auto; margin:28% auto 0; font:13px/18px Tahoma normal; color:#CCC;
283
+ background:url(../../images/easycheckout/loader.gif) no-repeat left center;padding-left:38px;padding-top:10px;padding-bottom:10px;
284
+ }
285
+ .easycheckout-agreement-p{margin: 0;padding: 10px 0 10px 11px;font:13px/18px Tahoma normal;}
286
+ .easycheckout-agreement-back {background:none repeat scroll 0 0 black;height:100%;width:100%;left:0;top:0;position:fixed;z-index:999;}
287
+
288
+
289
+ .easycheckout-agreement-content{
290
+ height: 100%;
291
+ left: 0;
292
+ position: fixed;
293
+ top: 0;
294
+ width: 100%;
295
+ z-index: 9999;
296
+ }
297
+ .easycheckout-agreement-content div { -moz-box-shadow: 0 0 22px #000000;
298
+ background: none repeat scroll 0 0 #FFFFFF;
299
+ color: #6E6E6E;
300
+ font: 12px/18px Tahoma normal;
301
+ margin: 2% auto 0;
302
+ padding: 30px;
303
+ position: relative;
304
+ width: 330px;
305
+
306
+ }
307
+
308
+
309
+ .easycheckout-agreement-content div h1 { font:24px/22px Tahoma normal; color:#5A5A5A; width:100%; clear:both; margin-bottom:15px}
310
+
311
+ .popup_closer { position:absolute; width:30px; height:30px; right:-10px; top:-10px; background:url(../../images/easycheckout/closebox.png) no-repeat left top;}
312
+
313
+ .inner_loader {margin-top: 8px; text-decoration: blink; padding:16px 32px 16px 0px; background:url(../../images/easycheckout/loading_inner.gif) no-repeat; position:absolute; right:30px; top:20px}
314
+
315
+ .easycheckout-error-message{color:red;font-weight:bold;}
316
+ /*=============================================*/
317
+ .left {float:left;margin-top:0px;}
318
+ .margin-top {margin-top:10px;}
319
+
320
+
321
+ /*============= coupon ==================*/
322
+ .easycheckout-coupon{background:none repeat scroll 0 0 black;height:100%;width:100%;left:0;top:0;position:fixed;z-index:999;}
323
+ .easycheckout-coupon-form .coupon-form button{float:right;}
324
+ #easycheckout-coupon-form , #easycheckout-coupon-form .coupon-form { width:224px; background:#FFF; float:right; padding: 10px 20px; -moz-box-shadow: 0 0 0px #000; box-shadow: 0 0 0px #000;
325
+ height: auto; border: 2px dotted #CCCCCC;
326
+ left: 0;
327
+ position: none;
328
+ top: 0;
329
+ z-index: 1000;}
330
+ .notopmargins {margin-top: 0px !important;}
331
+ .coupon-direct{float: left;left: 0 !important;margin: 0 !important;position: relative !important;top: 0 !important;}
332
+ #easycheckout-coupon-form h1 { font:23px/20px Tahoma normal; color:#4B4B4B; padding-bottom:20px}
333
+
334
+ #easycheckout-coupon-form label { font:12px/32px Tahoma normal; color:#474747; float:left; }
335
+
336
+ .easycheckout-coupon-form_input { width:180px; border:1px solid #BFBFBF; font:12px/18px Tahoma normal; color:#6F6F6F; padding:2px 0 3px; float:right; margin-bottom:8px; margin-top:5px}
337
+
338
+ #easycheckout-coupon-form a { float:right; clear:both; color:#4B4B4B; text-decoration:none; font:11px/18px Tahoma normal; }
339
+
340
+ #easycheckout-coupon-form a:hover { text-decoration:underline; color:#F00}
341
+
342
+ #easycheckout-coupon-form .coup_button {height:auto; padding:4px 13px 5px; border:0px; cursor:pointer; clear:both; margin:20px 10px 0 0; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; color:#494949; font:bold 13px/18px Tahoma normal; clear:both;}
343
+
344
+ #easycheckout-coupon-form .coup_button:hover { opacity:0.85;}
345
+
346
+ /*====================================================================*/
347
+ .display_inline{
348
+ display:inline;
349
+ }
350
+ .display_block{
351
+ display:block;
352
+ }
353
+ .no-display{
354
+ display:none;
355
+ }
356
+ .easycheckout-agreement-content-p{
357
+ max-height:400px;
358
+ overflow:auto;
359
+ }
360
+ input.checkbox {
361
+ margin: -3px 3px 0 0 !important;
362
+ }
363
+ #easycheckout-login-form .validation-advice {
364
+
365
+ right: -11em !important;
366
+
367
+ }
368
+ .validation-advice {
369
+
370
+ width: 10em !important;
371
+ }
372
+ #advice-validate-select-easycheckout_heared {
373
+ right: -14em !important;
374
+ }
375
+ #advice-required-entry-easycheckout_other{
376
+ right: -29em !important;
377
+ }
378
+ .billing_detail{
379
+ padding: 0 5px;font: 12px/18px Tahoma normal;
380
+ }
381
+ .easycheout_main ul ,.easycheout_main ol{margin:0 !important;}
382
+ .easycheout_main .payment .input-box .v-fix {
383
+ float: left;
384
+ }
385
+ .shipping-methods .form-list {
386
+ padding-left: 20px;
387
+ }
388
+ .shipping-methods .form-list li {
389
+ margin: 0 0 8px;overflow: hidden;
390
+ }
391
+ .shipping-methods .form-list li label {
392
+ clear:both;display:block;
393
+ }
394
+ .shipping-methods .form-list .input-box {
395
+ clear: both;
396
+ display: block;
397
+ width: 260px;
398
+ }
399
+ .buttons-set {
400
+ border-top: 1px solid #E4E4E4;
401
+ clear: both;
402
+ margin: 4em 0 0;
403
+ padding: 8px 0 0;
404
+ text-align: right;
405
+ }
406
+ .a-right {
407
+ text-align: right !important;
408
+ }
409
+ .tips {
410
+ background: none repeat scroll 0 0 #EAF6FF;
411
+ border: 1px solid #7BA7C9;
412
+ padding: 15px 20px;
413
+ position: absolute;
414
+ z-index: 9999;
415
+ }
416
+ .data-table td {
417
+ padding: 3px 8px;
418
+ }
419
+ #checkout-review-table-wrapper{float: left;
420
+ width: 100%;}
421
+ .termscontent{
422
+ position:fixed;
423
+ z-index:4999;
424
+ width:100%;
425
+ background:#000;
426
+ opacity:0.4;
427
+ filter: alpha(opacity=50);
428
+ height:100%;
429
+ left:0;
430
+ top:0;
431
+ }
432
+ .contentview{
433
+ position:fixed;
434
+ z-index:5000;
435
+ width:422px;
436
+ overflow:visible;
437
+ top:38%;
438
+ left:34%;
439
+ background:#fff;
440
+ font-family:vardana;
441
+ font-weight:16px;
442
+ text-align:center;
443
+ border-radius:6px;
444
+ word-wrap:break-word;
445
+ padding:10px;
446
+ }
447
+ .contentview_close{
448
+ position:relative;
449
+ }
450
+ #contentview_btn{
451
+ position:absolute;
452
+ top:-20px;
453
+ right:-20px;
454
+ color:#f00;
455
+ cursor:pointer;
456
+ }
457
+ .easycheckout-comments-left{
458
+ float:left;
459
+ }
460
+ #inner_loader_base{
461
+ width:100%;
462
+ height:100%;
463
+ position:fixed;
464
+ z-index:4999;
465
+ background:#000;
466
+ opacity:0.5;
467
+ top:0px;
468
+ left:0px;
469
+ }
470
+ #inner_loader_coupon{
471
+ top:45% !important;
472
+ left:48% !important;
473
+ z-index:5000;
474
+ position:fixed !important;
475
+ }
skin/frontend/default/default/images/easycheckout/Thumbs.db ADDED
Binary file
skin/frontend/default/default/images/easycheckout/closebox.png ADDED
Binary file
skin/frontend/default/default/images/easycheckout/down.png ADDED
Binary file
skin/frontend/default/default/images/easycheckout/loader.gif ADDED
Binary file
skin/frontend/default/default/images/easycheckout/loading_inner.gif ADDED
Binary file
skin/frontend/default/default/images/easycheckout/osc-numbers.png ADDED
Binary file
skin/frontend/default/default/images/easycheckout/osc-numbers1.png ADDED
Binary file
skin/frontend/default/default/images/easycheckout/trans_BG.png ADDED
Binary file
skin/frontend/default/default/images/easycheckout/up.png ADDED
Binary file
skin/frontend/default/default/images/easycheckout/up1.png ADDED
Binary file