Smasoft_Oneclickorder - Version 0.1.1

Version Notes

Added Extension code

Download this release

Release Info

Developer Slabko Michail
Extension Smasoft_Oneclickorder
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

Files changed (25) hide show
  1. app/code/community/Smasoft/Oneclickorder/Block/Abstract.php +41 -41
  2. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders.php +33 -33
  3. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/Grid.php +165 -165
  4. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/Grid/Filter/Filter.php +25 -25
  5. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/Grid/Renderer/Customer.php +37 -37
  6. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View.php +60 -60
  7. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Tab/Cart.php +184 -184
  8. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Tab/View.php +101 -101
  9. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Tabs.php +26 -26
  10. app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Totals.php +71 -71
  11. app/code/community/Smasoft/Oneclickorder/Block/Email/Items.php +18 -18
  12. app/code/community/Smasoft/Oneclickorder/Block/Form.php +55 -55
  13. app/code/community/Smasoft/Oneclickorder/Block/Success.php +68 -68
  14. app/code/community/Smasoft/Oneclickorder/Helper/Email.php +56 -56
  15. app/code/community/Smasoft/Oneclickorder/Model/Country.php +28 -28
  16. app/code/community/Smasoft/Oneclickorder/Model/ServiceQuote.php +25 -25
  17. app/code/community/Smasoft/Oneclickorder/controllers/Adminhtml/OneclickorderController.php +92 -92
  18. app/code/community/Smasoft/Oneclickorder/etc/adminhtml.xml +48 -48
  19. app/code/community/Smasoft/Oneclickorder/etc/config.xml +15 -1
  20. app/design/frontend/base/default/template/smasoft/oneclickorder/form.phtml +102 -102
  21. app/locale/en_US/Smasoft_Oneclickorder.csv +26 -0
  22. app/locale/en_US/template/email/oneclickorder/admin_order.html +54 -0
  23. app/locale/ru_RU/template/email/oneclickorder/admin_order.html +54 -0
  24. package.xml +17 -11
  25. skin/frontend/default/default/css/oneclickorder.css +96 -96
app/code/community/Smasoft/Oneclickorder/Block/Abstract.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
-
18
- class Smasoft_Oneclickorder_Block_Abstract extends Mage_Core_Block_Template
19
- {
20
-
21
- /**
22
- * @return Smasoft_Oneclickorder_Helper_Data
23
- */
24
- public function getModuleHelper()
25
- {
26
- return Mage::helper('smasoft_oneclickorder');
27
- }
28
-
29
- protected function _toHtml()
30
- {
31
- if (!$this->getModuleHelper()->isEnabled()) {
32
- return '';
33
- }
34
- return parent::_toHtml();
35
- }
36
-
37
- public function isGuest()
38
- {
39
- return !(bool)Mage::getSingleton('customer/session')->getCustomerId();
40
- }
41
-
42
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+
18
+ class Smasoft_Oneclickorder_Block_Abstract extends Mage_Core_Block_Template
19
+ {
20
+
21
+ /**
22
+ * @return Smasoft_Oneclickorder_Helper_Data
23
+ */
24
+ public function getModuleHelper()
25
+ {
26
+ return Mage::helper('smasoft_oneclickorder');
27
+ }
28
+
29
+ protected function _toHtml()
30
+ {
31
+ if (!$this->getModuleHelper()->isEnabled()) {
32
+ return '';
33
+ }
34
+ return parent::_toHtml();
35
+ }
36
+
37
+ public function isGuest()
38
+ {
39
+ return !(bool)Mage::getSingleton('customer/session')->getCustomerId();
40
+ }
41
+
42
  }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders.php CHANGED
@@ -1,34 +1,34 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders extends Mage_Adminhtml_Block_Widget_Grid_Container
18
- {
19
- /**
20
- * Block constructor
21
- */
22
- public function __construct()
23
- {
24
- $this->_blockGroup = 'smasoft_oneclickorder';
25
- $this->_controller = 'adminhtml_orders';
26
- $this->_headerText = Mage::helper('smasoft_oneclickorder')->__('Manage OneClick Orders');
27
-
28
- parent::__construct();
29
-
30
- $this->_removeButton('add');
31
-
32
- }
33
-
34
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders extends Mage_Adminhtml_Block_Widget_Grid_Container
18
+ {
19
+ /**
20
+ * Block constructor
21
+ */
22
+ public function __construct()
23
+ {
24
+ $this->_blockGroup = 'smasoft_oneclickorder';
25
+ $this->_controller = 'adminhtml_orders';
26
+ $this->_headerText = Mage::helper('smasoft_oneclickorder')->__('Manage OneClick Orders');
27
+
28
+ parent::__construct();
29
+
30
+ $this->_removeButton('add');
31
+
32
+ }
33
+
34
  }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/Grid.php CHANGED
@@ -1,165 +1,165 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_Grid extends Mage_Adminhtml_Block_Widget_Grid
18
- {
19
-
20
-
21
- /**
22
- * Init Grid default properties
23
- *
24
- */
25
- public function __construct()
26
- {
27
- parent::__construct();
28
- $this->setId('oneclickorder_list_grid');
29
- $this->setDefaultSort('entity_id');
30
- $this->setDefaultDir('DESC');
31
- $this->setSaveParametersInSession(true);
32
- $this->setUseAjax(true);
33
-
34
- }
35
-
36
- protected function _prepareCollectionBefore()
37
- {
38
- /** @var $collection Smasoft_Oneclickorder_Model_Resource_Order_Collection */
39
- $collection = Mage::getModel('smasoft_oneclickorder/order')->getCollection();
40
- $collection->getSelect()->joinLeft(
41
- array('country' => Mage::getModel('smasoft_oneclickorder/country')->getResource()
42
- ->getTable('smasoft_oneclickorder/country')),
43
- 'country.country_code = main_table.country',
44
- array('country.country_code', 'country.phone_code')
45
- );
46
- $collection->joinCustomerAttribute('firstname');
47
- $collection->joinCustomerAttribute('lastname');
48
-
49
- return $collection;
50
- }
51
-
52
-
53
- /**
54
- * @return this
55
- */
56
- protected function _prepareCollection()
57
- {
58
- $collection = $this->_prepareCollectionBefore();
59
- $this->setCollection($collection);
60
- return parent::_prepareCollection();
61
- }
62
-
63
-
64
- /**
65
- * Prepare Grid columns
66
- *
67
- * @return Mage_Adminhtml_Block_Widget_Grid
68
- */
69
- protected function _prepareColumns()
70
- {
71
- $this->_customFieldsOptions();
72
- return parent::_prepareColumns();
73
- }
74
-
75
- protected function _customFieldsOptions()
76
- {
77
- /** @var $helper Smasoft_Oneclickorder_Helper_Data */
78
- $helper = Mage::helper('smasoft_oneclickorder');
79
- $this->addColumn('entity_id', array(
80
- 'header' => $helper->__('#'),
81
- 'width' => '10px',
82
- 'index' => 'entity_id',
83
- 'filter_index' => 'main_table.entity_id',
84
- ));
85
-
86
-
87
- $this->addColumn('customer_id', array(
88
- 'header' => $helper->__('Customer Name'),
89
- 'index' => 'customer_id',
90
- 'getter' => 'getGridCustomerName',
91
- 'renderer' => 'smasoft_oneclickorder/adminhtml_orders_grid_renderer_customer',
92
- ));
93
- $this->addColumn('phone', array(
94
- 'header' => $helper->__('Phone'),
95
- 'index' => 'phone',
96
- 'getter' => 'getFullPhoneNumber',
97
- 'filter_index' => 'main_table.phone',
98
- ));
99
-
100
- $this->addColumn('country', array(
101
- 'header' => $helper->__('country'),
102
- 'index' => 'country',
103
- 'width' => '155px',
104
- 'empty_option' => $helper->__('All Codes'),
105
- 'filter' => 'smasoft_oneclickorder/adminhtml_orders_grid_filter_filter',
106
- 'options' => $helper->getPhoneCodes()->toOptionArray(),
107
- 'filter_index' => 'main_table.country',
108
- ));
109
-
110
- $this->addColumn('create_date', array(
111
- 'header' => $helper->__('Create Date'),
112
- 'index' => 'create_date',
113
- 'filter_index' => 'create_date',
114
- 'type' => 'datetime',
115
- 'width' => '220px',
116
- ));
117
-
118
- if (Mage::getSingleton('admin/session')->isAllowed('sales/oneclick_order/view')) {
119
- $this->addColumn('action',
120
- array(
121
- 'header' => $helper->__('Action'),
122
- 'type' => 'action',
123
- 'actions' => array(
124
- array(
125
- 'caption' => $helper->__('View'),
126
- 'url' => $this->getUrl('*/oneclickorder/view', array('id' => '$entity_id')),
127
- 'field' => 'entity_id'
128
- ),
129
- ),
130
- 'filter' => false,
131
- 'sortable' => false,
132
- 'index' => 'smasoft_oneclickorder',
133
- 'is_system' => true,
134
- 'width' => 100
135
- ));
136
- }
137
-
138
- }
139
-
140
- /**
141
- * Return row URL for js event handlers
142
- *
143
- * @param null $row
144
- * @return string
145
- */
146
- public function getRowUrl($row)
147
- {
148
- if (Mage::getSingleton('admin/session')->isAllowed('sales/oneclick_order/view')) {
149
- return $this->getUrl('*/oneclickorder/view', array('id' => $row->getEntityId()));
150
- }
151
- return null;
152
- }
153
-
154
- /**
155
- * Grid url getter
156
- *
157
- * @return string current grid url
158
- */
159
- public function getGridUrl()
160
- {
161
- return $this->getUrl('adminhtml/oneclickorder/grid', array('_current' => true));
162
- }
163
-
164
-
165
- }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_Grid extends Mage_Adminhtml_Block_Widget_Grid
18
+ {
19
+
20
+
21
+ /**
22
+ * Init Grid default properties
23
+ *
24
+ */
25
+ public function __construct()
26
+ {
27
+ parent::__construct();
28
+ $this->setId('oneclickorder_list_grid');
29
+ $this->setDefaultSort('entity_id');
30
+ $this->setDefaultDir('DESC');
31
+ $this->setSaveParametersInSession(true);
32
+ $this->setUseAjax(true);
33
+
34
+ }
35
+
36
+ protected function _prepareCollectionBefore()
37
+ {
38
+ /** @var $collection Smasoft_Oneclickorder_Model_Resource_Order_Collection */
39
+ $collection = Mage::getModel('smasoft_oneclickorder/order')->getCollection();
40
+ $collection->getSelect()->joinLeft(
41
+ array('country' => Mage::getModel('smasoft_oneclickorder/country')->getResource()
42
+ ->getTable('smasoft_oneclickorder/country')),
43
+ 'country.country_code = main_table.country',
44
+ array('country.country_code', 'country.phone_code')
45
+ );
46
+ $collection->joinCustomerAttribute('firstname');
47
+ $collection->joinCustomerAttribute('lastname');
48
+
49
+ return $collection;
50
+ }
51
+
52
+
53
+ /**
54
+ * @return this
55
+ */
56
+ protected function _prepareCollection()
57
+ {
58
+ $collection = $this->_prepareCollectionBefore();
59
+ $this->setCollection($collection);
60
+ return parent::_prepareCollection();
61
+ }
62
+
63
+
64
+ /**
65
+ * Prepare Grid columns
66
+ *
67
+ * @return Mage_Adminhtml_Block_Widget_Grid
68
+ */
69
+ protected function _prepareColumns()
70
+ {
71
+ $this->_customFieldsOptions();
72
+ return parent::_prepareColumns();
73
+ }
74
+
75
+ protected function _customFieldsOptions()
76
+ {
77
+ /** @var $helper Smasoft_Oneclickorder_Helper_Data */
78
+ $helper = Mage::helper('smasoft_oneclickorder');
79
+ $this->addColumn('entity_id', array(
80
+ 'header' => $helper->__('#'),
81
+ 'width' => '10px',
82
+ 'index' => 'entity_id',
83
+ 'filter_index' => 'main_table.entity_id',
84
+ ));
85
+
86
+
87
+ $this->addColumn('customer_id', array(
88
+ 'header' => $helper->__('Customer Name'),
89
+ 'index' => 'customer_id',
90
+ 'getter' => 'getGridCustomerName',
91
+ 'renderer' => 'smasoft_oneclickorder/adminhtml_orders_grid_renderer_customer',
92
+ ));
93
+ $this->addColumn('phone', array(
94
+ 'header' => $helper->__('Phone'),
95
+ 'index' => 'phone',
96
+ 'getter' => 'getFullPhoneNumber',
97
+ 'filter_index' => 'main_table.phone',
98
+ ));
99
+
100
+ $this->addColumn('country', array(
101
+ 'header' => $helper->__('country'),
102
+ 'index' => 'country',
103
+ 'width' => '155px',
104
+ 'empty_option' => $helper->__('All Codes'),
105
+ 'filter' => 'smasoft_oneclickorder/adminhtml_orders_grid_filter_filter',
106
+ 'options' => $helper->getPhoneCodes()->toOptionArray(),
107
+ 'filter_index' => 'main_table.country',
108
+ ));
109
+
110
+ $this->addColumn('create_date', array(
111
+ 'header' => $helper->__('Create Date'),
112
+ 'index' => 'create_date',
113
+ 'filter_index' => 'create_date',
114
+ 'type' => 'datetime',
115
+ 'width' => '220px',
116
+ ));
117
+
118
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/oneclick_order/view')) {
119
+ $this->addColumn('action',
120
+ array(
121
+ 'header' => $helper->__('Action'),
122
+ 'type' => 'action',
123
+ 'actions' => array(
124
+ array(
125
+ 'caption' => $helper->__('View'),
126
+ 'url' => $this->getUrl('*/oneclickorder/view', array('id' => '$entity_id')),
127
+ 'field' => 'entity_id'
128
+ ),
129
+ ),
130
+ 'filter' => false,
131
+ 'sortable' => false,
132
+ 'index' => 'smasoft_oneclickorder',
133
+ 'is_system' => true,
134
+ 'width' => 100
135
+ ));
136
+ }
137
+
138
+ }
139
+
140
+ /**
141
+ * Return row URL for js event handlers
142
+ *
143
+ * @param null $row
144
+ * @return string
145
+ */
146
+ public function getRowUrl($row)
147
+ {
148
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/oneclick_order/view')) {
149
+ return $this->getUrl('*/oneclickorder/view', array('id' => $row->getEntityId()));
150
+ }
151
+ return null;
152
+ }
153
+
154
+ /**
155
+ * Grid url getter
156
+ *
157
+ * @return string current grid url
158
+ */
159
+ public function getGridUrl()
160
+ {
161
+ return $this->getUrl('adminhtml/oneclickorder/grid', array('_current' => true));
162
+ }
163
+
164
+
165
+ }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/Grid/Filter/Filter.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_Grid_Filter_Filter extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select
17
- {
18
-
19
- protected function _getOptions()
20
- {
21
- $options = $this->getColumn()->getOptions();
22
- array_unshift($options, array('value' => '', 'label' => $this->getColumn()->getEmptyOption()));
23
- return $options;
24
- }
25
- }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_Grid_Filter_Filter extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select
17
+ {
18
+
19
+ protected function _getOptions()
20
+ {
21
+ $options = $this->getColumn()->getOptions();
22
+ array_unshift($options, array('value' => '', 'label' => $this->getColumn()->getEmptyOption()));
23
+ return $options;
24
+ }
25
+ }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/Grid/Renderer/Customer.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
-
18
- /**
19
- * Сustomer field grid renderer
20
- */
21
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_Grid_Renderer_Customer extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
22
- {
23
- /**
24
- * @param Varien_Object $row
25
- * @return string
26
- */
27
- public function render(Varien_Object $row)
28
- {
29
- if ($row->getCustomerId()) {
30
- $name = $row->getFirstname() . ' ' . $row->getLastname();
31
- $result = sprintf('<a href="%s">%s</a>', Mage::getUrl('adminhtml/customer/edit', array('id' => $row->getCustomerId())), $name);
32
- } else {
33
- $result = 'Guest';
34
- }
35
-
36
- return $result;
37
- }
38
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+
18
+ /**
19
+ * Сustomer field grid renderer
20
+ */
21
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_Grid_Renderer_Customer extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
22
+ {
23
+ /**
24
+ * @param Varien_Object $row
25
+ * @return string
26
+ */
27
+ public function render(Varien_Object $row)
28
+ {
29
+ if ($row->getCustomerId()) {
30
+ $name = $row->getFirstname() . ' ' . $row->getLastname();
31
+ $result = sprintf('<a href="%s">%s</a>', Mage::getUrl('adminhtml/customer/edit', array('id' => $row->getCustomerId())), $name);
32
+ } else {
33
+ $result = 'Guest';
34
+ }
35
+
36
+ return $result;
37
+ }
38
  }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View.php CHANGED
@@ -1,60 +1,60 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View extends Mage_Adminhtml_Block_Widget_Form_Container
18
- {
19
-
20
- public function __construct()
21
- {
22
- $this->_objectId = 'order_id';
23
- $this->_controller = 'sales_order';
24
- $this->_mode = 'view';
25
- parent::__construct();
26
-
27
- $this->_removeButton('delete');
28
- $this->_removeButton('reset');
29
- $this->_removeButton('save');
30
- $this->setId('sales_order_view');
31
-
32
- }
33
-
34
- /**
35
- * Retrieve order model object
36
- *
37
- * @return Smasoft_Oneclickorder_Model_Order
38
- */
39
- public function getOrder()
40
- {
41
- return Mage::registry('order');
42
- }
43
-
44
- /**
45
- * Return back url for view grid
46
- *
47
- * @return string
48
- */
49
- public function getBackUrl()
50
- {
51
- return $this->getUrl('*/*/index');
52
- }
53
-
54
-
55
- public function getHeaderText()
56
- {
57
- return Mage::helper('sales')->__('Order # %s | %s', $this->getOrder()->getEntityId(), $this->formatDate($this->getOrder()->getCreateDate(), 'medium', true));
58
- }
59
-
60
- }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View extends Mage_Adminhtml_Block_Widget_Form_Container
18
+ {
19
+
20
+ public function __construct()
21
+ {
22
+ $this->_objectId = 'order_id';
23
+ $this->_controller = 'sales_order';
24
+ $this->_mode = 'view';
25
+ parent::__construct();
26
+
27
+ $this->_removeButton('delete');
28
+ $this->_removeButton('reset');
29
+ $this->_removeButton('save');
30
+ $this->setId('sales_order_view');
31
+
32
+ }
33
+
34
+ /**
35
+ * Retrieve order model object
36
+ *
37
+ * @return Smasoft_Oneclickorder_Model_Order
38
+ */
39
+ public function getOrder()
40
+ {
41
+ return Mage::registry('order');
42
+ }
43
+
44
+ /**
45
+ * Return back url for view grid
46
+ *
47
+ * @return string
48
+ */
49
+ public function getBackUrl()
50
+ {
51
+ return $this->getUrl('*/*/index');
52
+ }
53
+
54
+
55
+ public function getHeaderText()
56
+ {
57
+ return Mage::helper('sales')->__('Order # %s | %s', $this->getOrder()->getEntityId(), $this->formatDate($this->getOrder()->getCreateDate(), 'medium', true));
58
+ }
59
+
60
+ }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Tab/Cart.php CHANGED
@@ -1,185 +1,185 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
-
18
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Tab_Cart
19
- extends Mage_Adminhtml_Block_Widget_Grid
20
- implements Mage_Adminhtml_Block_Widget_Tab_Interface
21
- {
22
-
23
-
24
- public function __construct($attributes = array())
25
- {
26
- parent::__construct($attributes);
27
- $this->setUseAjax(true);
28
- $this->setFilterVisibility(false);
29
- $this->_parentTemplate = $this->getTemplate();
30
- $this->setTemplate('customer/tab/cart.phtml');
31
- }
32
-
33
- /**
34
- * Retrieve order model instance
35
- *
36
- * @return Smasoft_Oneclickorder_Model_Order
37
- */
38
- public function getOrder()
39
- {
40
- return Mage::registry('order');
41
- }
42
-
43
- /**
44
- * Prepare grid
45
- *
46
- * @return void
47
- */
48
- protected function _prepareGrid()
49
- {
50
- $this->setId('customer_cart_grid');
51
- parent::_prepareGrid();
52
- }
53
-
54
-
55
- protected function _prepareCollection()
56
- {
57
- $quote = $this->getOrder()->getQuote();
58
- if ($quote) {
59
- $collection = $quote->getItemsCollection(false);
60
- } else {
61
- $collection = new Varien_Data_Collection();
62
- }
63
- $collection->addFieldToFilter('parent_item_id', array('null' => true));
64
- $this->setCollection($collection);
65
-
66
- return parent::_prepareCollection();
67
- }
68
-
69
- /**
70
- * Gets customer assigned to this block
71
- *
72
- * @return Mage_Customer_Model_Customer
73
- */
74
- public function getCustomer()
75
- {
76
- return $this->getOrder()->getCustomer();
77
- }
78
-
79
-
80
- protected function _prepareColumns()
81
- {
82
- $this->addColumn('product_id', array(
83
- 'header' => Mage::helper('catalog')->__('Product ID'),
84
- 'index' => 'product_id',
85
- 'width' => '100px',
86
- ));
87
-
88
- $this->addColumn('name', array(
89
- 'header' => Mage::helper('catalog')->__('Product Name'),
90
- 'index' => 'name',
91
- 'renderer' => 'adminhtml/customer_edit_tab_view_grid_renderer_item'
92
- ));
93
-
94
- $this->addColumn('sku', array(
95
- 'header' => Mage::helper('catalog')->__('SKU'),
96
- 'index' => 'sku',
97
- 'width' => '100px',
98
- ));
99
-
100
- $this->addColumn('qty', array(
101
- 'header' => Mage::helper('catalog')->__('Qty'),
102
- 'index' => 'qty',
103
- 'type' => 'number',
104
- 'width' => '60px',
105
- ));
106
-
107
- $this->addColumn('price', array(
108
- 'header' => Mage::helper('catalog')->__('Price'),
109
- 'index' => 'price',
110
- 'type' => 'currency',
111
- 'currency_code' => (string)Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),
112
- ));
113
-
114
- $this->addColumn('total', array(
115
- 'header' => Mage::helper('sales')->__('Total'),
116
- 'index' => 'row_total',
117
- 'type' => 'currency',
118
- 'currency_code' => (string)Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),
119
- ));
120
-
121
- $this->addColumn('action', array(
122
- 'header' => Mage::helper('customer')->__('Action'),
123
- 'index' => 'quote_item_id',
124
- 'renderer' => 'adminhtml/customer_grid_renderer_multiaction',
125
- 'filter' => false,
126
- 'sortable' => false,
127
- 'actions' => array(
128
- array(
129
- 'caption' => Mage::helper('customer')->__('View'),
130
- 'url' => $this->getUrl('*/catalog_product/edit', array('id' => '$product_id')),
131
- 'field' => '$product_id'
132
- ),
133
-
134
- )
135
- ));
136
-
137
- return parent::_prepareColumns();
138
- }
139
-
140
-
141
- public function getGridParentHtml()
142
- {
143
- $templateName = Mage::getDesign()->getTemplateFilename($this->_parentTemplate, array('_relative' => true));
144
- return $this->fetchView($templateName);
145
- }
146
-
147
- public function getRowUrl($row)
148
- {
149
- return $this->getUrl('*/catalog_product/edit', array('id' => $row->getProductId()));
150
- }
151
-
152
-
153
- /**
154
- * Grid url getter
155
- *
156
- * @return string current grid url
157
- */
158
- public function getGridUrl()
159
- {
160
- return $this->getUrl('adminhtml/oneclickorder/cartgrid', array('_current' => true));
161
- }
162
-
163
- /**
164
- * ######################## TAB settings #################################
165
- */
166
- public function getTabLabel()
167
- {
168
- return Mage::helper('customer')->__('Shopping Cart');
169
- }
170
-
171
- public function getTabTitle()
172
- {
173
- return Mage::helper('sales')->__('Order Information');
174
- }
175
-
176
- public function canShowTab()
177
- {
178
- return true;
179
- }
180
-
181
- public function isHidden()
182
- {
183
- return false;
184
- }
185
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+
18
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Tab_Cart
19
+ extends Mage_Adminhtml_Block_Widget_Grid
20
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
21
+ {
22
+
23
+
24
+ public function __construct($attributes = array())
25
+ {
26
+ parent::__construct($attributes);
27
+ $this->setUseAjax(true);
28
+ $this->setFilterVisibility(false);
29
+ $this->_parentTemplate = $this->getTemplate();
30
+ $this->setTemplate('customer/tab/cart.phtml');
31
+ }
32
+
33
+ /**
34
+ * Retrieve order model instance
35
+ *
36
+ * @return Smasoft_Oneclickorder_Model_Order
37
+ */
38
+ public function getOrder()
39
+ {
40
+ return Mage::registry('order');
41
+ }
42
+
43
+ /**
44
+ * Prepare grid
45
+ *
46
+ * @return void
47
+ */
48
+ protected function _prepareGrid()
49
+ {
50
+ $this->setId('customer_cart_grid');
51
+ parent::_prepareGrid();
52
+ }
53
+
54
+
55
+ protected function _prepareCollection()
56
+ {
57
+ $quote = $this->getOrder()->getQuote();
58
+ if ($quote) {
59
+ $collection = $quote->getItemsCollection(false);
60
+ } else {
61
+ $collection = new Varien_Data_Collection();
62
+ }
63
+ $collection->addFieldToFilter('parent_item_id', array('null' => true));
64
+ $this->setCollection($collection);
65
+
66
+ return parent::_prepareCollection();
67
+ }
68
+
69
+ /**
70
+ * Gets customer assigned to this block
71
+ *
72
+ * @return Mage_Customer_Model_Customer
73
+ */
74
+ public function getCustomer()
75
+ {
76
+ return $this->getOrder()->getCustomer();
77
+ }
78
+
79
+
80
+ protected function _prepareColumns()
81
+ {
82
+ $this->addColumn('product_id', array(
83
+ 'header' => Mage::helper('catalog')->__('Product ID'),
84
+ 'index' => 'product_id',
85
+ 'width' => '100px',
86
+ ));
87
+
88
+ $this->addColumn('name', array(
89
+ 'header' => Mage::helper('catalog')->__('Product Name'),
90
+ 'index' => 'name',
91
+ 'renderer' => 'adminhtml/customer_edit_tab_view_grid_renderer_item'
92
+ ));
93
+
94
+ $this->addColumn('sku', array(
95
+ 'header' => Mage::helper('catalog')->__('SKU'),
96
+ 'index' => 'sku',
97
+ 'width' => '100px',
98
+ ));
99
+
100
+ $this->addColumn('qty', array(
101
+ 'header' => Mage::helper('catalog')->__('Qty'),
102
+ 'index' => 'qty',
103
+ 'type' => 'number',
104
+ 'width' => '60px',
105
+ ));
106
+
107
+ $this->addColumn('price', array(
108
+ 'header' => Mage::helper('catalog')->__('Price'),
109
+ 'index' => 'price',
110
+ 'type' => 'currency',
111
+ 'currency_code' => (string)Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),
112
+ ));
113
+
114
+ $this->addColumn('total', array(
115
+ 'header' => Mage::helper('sales')->__('Total'),
116
+ 'index' => 'row_total',
117
+ 'type' => 'currency',
118
+ 'currency_code' => (string)Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),
119
+ ));
120
+
121
+ $this->addColumn('action', array(
122
+ 'header' => Mage::helper('customer')->__('Action'),
123
+ 'index' => 'quote_item_id',
124
+ 'renderer' => 'adminhtml/customer_grid_renderer_multiaction',
125
+ 'filter' => false,
126
+ 'sortable' => false,
127
+ 'actions' => array(
128
+ array(
129
+ 'caption' => Mage::helper('customer')->__('View'),
130
+ 'url' => $this->getUrl('*/catalog_product/edit', array('id' => '$product_id')),
131
+ 'field' => '$product_id'
132
+ ),
133
+
134
+ )
135
+ ));
136
+
137
+ return parent::_prepareColumns();
138
+ }
139
+
140
+
141
+ public function getGridParentHtml()
142
+ {
143
+ $templateName = Mage::getDesign()->getTemplateFilename($this->_parentTemplate, array('_relative' => true));
144
+ return $this->fetchView($templateName);
145
+ }
146
+
147
+ public function getRowUrl($row)
148
+ {
149
+ return $this->getUrl('*/catalog_product/edit', array('id' => $row->getProductId()));
150
+ }
151
+
152
+
153
+ /**
154
+ * Grid url getter
155
+ *
156
+ * @return string current grid url
157
+ */
158
+ public function getGridUrl()
159
+ {
160
+ return $this->getUrl('adminhtml/oneclickorder/cartgrid', array('_current' => true));
161
+ }
162
+
163
+ /**
164
+ * ######################## TAB settings #################################
165
+ */
166
+ public function getTabLabel()
167
+ {
168
+ return Mage::helper('customer')->__('Shopping Cart');
169
+ }
170
+
171
+ public function getTabTitle()
172
+ {
173
+ return Mage::helper('sales')->__('Order Information');
174
+ }
175
+
176
+ public function canShowTab()
177
+ {
178
+ return true;
179
+ }
180
+
181
+ public function isHidden()
182
+ {
183
+ return false;
184
+ }
185
  }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Tab/View.php CHANGED
@@ -1,101 +1,101 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Tab_View
18
- extends Mage_Adminhtml_Block_Sales_Order_Abstract
19
- implements Mage_Adminhtml_Block_Widget_Tab_Interface
20
- {
21
- /**
22
- * Retrieve order model instance
23
- *
24
- * @return Smasoft_Oneclickorder_Model_Order
25
- */
26
- public function getOrder()
27
- {
28
- return Mage::registry('order');
29
- }
30
-
31
- /**
32
- * @return Smasoft_Oneclickorder_Helper_Data
33
- */
34
- public function getHelper()
35
- {
36
- return Mage::helper('smasoft_oneclickorder');
37
- }
38
-
39
-
40
- public function getCustomerViewUrl()
41
- {
42
- }
43
-
44
- /**
45
- * Retrieve source model instance
46
- *
47
- * @return Mage_Sales_Model_Order
48
- */
49
- public function getSource()
50
- {
51
- return $this->getOrder();
52
- }
53
-
54
- public function getMagentoOrderUrl($orderId)
55
- {
56
- return $this->getUrl('*/sales_order/view/', array('order_id' => $orderId));
57
- }
58
-
59
-
60
- public function getOrderStoreName()
61
- {
62
- if ($this->getOrder()) {
63
- $storeId = $this->getOrder()->getStoreId();
64
- if (is_null($storeId)) {
65
- $deleted = Mage::helper('adminhtml')->__(' [deleted]');
66
- return nl2br($this->getOrder()->getStoreName()) . $deleted;
67
- }
68
- $store = Mage::app()->getStore($storeId);
69
- $name = array(
70
- $store->getWebsite()->getName(),
71
- $store->getGroup()->getName(),
72
- $store->getName()
73
- );
74
- return implode('<br/>', $name);
75
- }
76
- return null;
77
- }
78
-
79
- /**
80
- * ######################## TAB settings #################################
81
- */
82
- public function getTabLabel()
83
- {
84
- return Mage::helper('sales')->__('Information');
85
- }
86
-
87
- public function getTabTitle()
88
- {
89
- return Mage::helper('sales')->__('Order Information');
90
- }
91
-
92
- public function canShowTab()
93
- {
94
- return true;
95
- }
96
-
97
- public function isHidden()
98
- {
99
- return false;
100
- }
101
- }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Tab_View
18
+ extends Mage_Adminhtml_Block_Sales_Order_Abstract
19
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
20
+ {
21
+ /**
22
+ * Retrieve order model instance
23
+ *
24
+ * @return Smasoft_Oneclickorder_Model_Order
25
+ */
26
+ public function getOrder()
27
+ {
28
+ return Mage::registry('order');
29
+ }
30
+
31
+ /**
32
+ * @return Smasoft_Oneclickorder_Helper_Data
33
+ */
34
+ public function getHelper()
35
+ {
36
+ return Mage::helper('smasoft_oneclickorder');
37
+ }
38
+
39
+
40
+ public function getCustomerViewUrl()
41
+ {
42
+ }
43
+
44
+ /**
45
+ * Retrieve source model instance
46
+ *
47
+ * @return Mage_Sales_Model_Order
48
+ */
49
+ public function getSource()
50
+ {
51
+ return $this->getOrder();
52
+ }
53
+
54
+ public function getMagentoOrderUrl($orderId)
55
+ {
56
+ return $this->getUrl('*/sales_order/view/', array('order_id' => $orderId));
57
+ }
58
+
59
+
60
+ public function getOrderStoreName()
61
+ {
62
+ if ($this->getOrder()) {
63
+ $storeId = $this->getOrder()->getStoreId();
64
+ if (is_null($storeId)) {
65
+ $deleted = Mage::helper('adminhtml')->__(' [deleted]');
66
+ return nl2br($this->getOrder()->getStoreName()) . $deleted;
67
+ }
68
+ $store = Mage::app()->getStore($storeId);
69
+ $name = array(
70
+ $store->getWebsite()->getName(),
71
+ $store->getGroup()->getName(),
72
+ $store->getName()
73
+ );
74
+ return implode('<br/>', $name);
75
+ }
76
+ return null;
77
+ }
78
+
79
+ /**
80
+ * ######################## TAB settings #################################
81
+ */
82
+ public function getTabLabel()
83
+ {
84
+ return Mage::helper('sales')->__('Information');
85
+ }
86
+
87
+ public function getTabTitle()
88
+ {
89
+ return Mage::helper('sales')->__('Order Information');
90
+ }
91
+
92
+ public function canShowTab()
93
+ {
94
+ return true;
95
+ }
96
+
97
+ public function isHidden()
98
+ {
99
+ return false;
100
+ }
101
+ }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Tabs.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
18
- {
19
- public function __construct()
20
- {
21
- parent::__construct();
22
- $this->setId('sales_order_view_tabs');
23
- $this->setDestElementId('sales_order_view');
24
- $this->setTitle(Mage::helper('sales')->__('Order View'));
25
- }
26
- }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
18
+ {
19
+ public function __construct()
20
+ {
21
+ parent::__construct();
22
+ $this->setId('sales_order_view_tabs');
23
+ $this->setDestElementId('sales_order_view');
24
+ $this->setTitle(Mage::helper('sales')->__('Order View'));
25
+ }
26
+ }
app/code/community/Smasoft/Oneclickorder/Block/Adminhtml/Orders/View/Totals.php CHANGED
@@ -1,71 +1,71 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Totals extends Mage_Adminhtml_Block_Sales_Totals //Mage_Adminhtml_Block_Sales_Order_Abstract
18
- {
19
-
20
-
21
- /**
22
- * Retrieve order model object
23
- *
24
- * @return Smasoft_Oneclickorder_Model_Order
25
- */
26
- public function getOrder()
27
- {
28
- return Mage::registry('order');
29
- }
30
-
31
- /**
32
- * @return Mage_Sales_Model_Quote
33
- */
34
- public function getSource()
35
- {
36
- return $this->getOrder()->getQuote();
37
- }
38
-
39
- /**
40
- * Initialize order totals array
41
- *
42
- * @return Mage_Sales_Block_Order_Totals
43
- */
44
- protected function _initTotals()
45
- {
46
- parent::_initTotals();
47
- $this->_totals['count'] = new Varien_Object(array(
48
- 'code' => 'count',
49
- 'strong' => true,
50
- 'is_formated' => true,
51
- 'value' => $this->getSource()->getItemsCount(),
52
- 'base_value' => $this->getSource()->getItemsCount(),
53
- 'label' => $this->helper('smasoft_oneclickorder')->__('Total items'),
54
- 'area' => 'footer'
55
- ));
56
-
57
- $magentoOrder = $this->getOrder()->getMagentoOrder();
58
-
59
- if ($magentoOrder) {
60
- $this->_totals['paid'] = new Varien_Object(array(
61
- 'code' => 'paid',
62
- 'strong' => true,
63
- 'value' => $magentoOrder->getTotalPaid(),
64
- 'base_value' => $magentoOrder->getBaseTotalPaid(),
65
- 'label' => $this->helper('sales')->__('Total Paid'),
66
- 'area' => 'footer'
67
- ));
68
- }
69
- return $this;
70
- }
71
- }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Adminhtml_Orders_View_Totals extends Mage_Adminhtml_Block_Sales_Totals //Mage_Adminhtml_Block_Sales_Order_Abstract
18
+ {
19
+
20
+
21
+ /**
22
+ * Retrieve order model object
23
+ *
24
+ * @return Smasoft_Oneclickorder_Model_Order
25
+ */
26
+ public function getOrder()
27
+ {
28
+ return Mage::registry('order');
29
+ }
30
+
31
+ /**
32
+ * @return Mage_Sales_Model_Quote
33
+ */
34
+ public function getSource()
35
+ {
36
+ return $this->getOrder()->getQuote();
37
+ }
38
+
39
+ /**
40
+ * Initialize order totals array
41
+ *
42
+ * @return Mage_Sales_Block_Order_Totals
43
+ */
44
+ protected function _initTotals()
45
+ {
46
+ parent::_initTotals();
47
+ $this->_totals['count'] = new Varien_Object(array(
48
+ 'code' => 'count',
49
+ 'strong' => true,
50
+ 'is_formated' => true,
51
+ 'value' => $this->getSource()->getItemsCount(),
52
+ 'base_value' => $this->getSource()->getItemsCount(),
53
+ 'label' => $this->helper('smasoft_oneclickorder')->__('Total items'),
54
+ 'area' => 'footer'
55
+ ));
56
+
57
+ $magentoOrder = $this->getOrder()->getMagentoOrder();
58
+
59
+ if ($magentoOrder) {
60
+ $this->_totals['paid'] = new Varien_Object(array(
61
+ 'code' => 'paid',
62
+ 'strong' => true,
63
+ 'value' => $magentoOrder->getTotalPaid(),
64
+ 'base_value' => $magentoOrder->getBaseTotalPaid(),
65
+ 'label' => $this->helper('sales')->__('Total Paid'),
66
+ 'area' => 'footer'
67
+ ));
68
+ }
69
+ return $this;
70
+ }
71
+ }
app/code/community/Smasoft/Oneclickorder/Block/Email/Items.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- class Smasoft_Oneclickorder_Block_Email_Items extends Mage_Core_Block_Template
17
- {
18
-
19
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ class Smasoft_Oneclickorder_Block_Email_Items extends Mage_Core_Block_Template
17
+ {
18
+
19
  }
app/code/community/Smasoft/Oneclickorder/Block/Form.php CHANGED
@@ -1,56 +1,56 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Block_Form extends Smasoft_Oneclickorder_Block_Abstract
18
- {
19
- public function getPhoneCodeHtml($name, $class = '', $withCountryName = true, $emptyLabel = 'Code')
20
- {
21
- $codesCollection = $this->getModuleHelper()->getPhoneCodes();
22
- $codes = $codesCollection->toOptionArray($withCountryName);
23
-
24
- if (count($codes) > 1) {
25
- $options = array_merge(
26
- array(array(
27
- 'value' => '',
28
- 'label' => $emptyLabel,
29
- )),
30
- $codes
31
- );
32
-
33
- $selectedValue = '';
34
-
35
- $html = $this->getLayout()->createBlock('core/html_select')
36
- ->setName($name)
37
- ->setId('oneclickorder-phone-code')
38
- ->setClass($class)
39
- ->setValue($selectedValue)
40
- ->setOptions($options)
41
- ->getHtml();
42
- } else {
43
- $item = $codesCollection->getFirstItem();
44
- $html = "<input type=\"hidden\" name=\"$name\" value=\"{$item->getCountryCode()}\" /><span class=\"$class\">+{$item->getPhoneCode()}</span> ";
45
- }
46
- return $html;
47
- }
48
-
49
- /**
50
- * need o render email field. Only for guest and if magento order is enabled
51
- */
52
- public function isShowEmailField()
53
- {
54
- return $this->getModuleHelper()->isSaveMagentoOrder() && $this->isGuest();
55
- }
56
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Block_Form extends Smasoft_Oneclickorder_Block_Abstract
18
+ {
19
+ public function getPhoneCodeHtml($name, $class = '', $withCountryName = true, $emptyLabel = 'Code')
20
+ {
21
+ $codesCollection = $this->getModuleHelper()->getPhoneCodes();
22
+ $codes = $codesCollection->toOptionArray($withCountryName);
23
+
24
+ if (count($codes) > 1) {
25
+ $options = array_merge(
26
+ array(array(
27
+ 'value' => '',
28
+ 'label' => $emptyLabel,
29
+ )),
30
+ $codes
31
+ );
32
+
33
+ $selectedValue = '';
34
+
35
+ $html = $this->getLayout()->createBlock('core/html_select')
36
+ ->setName($name)
37
+ ->setId('oneclickorder-phone-code')
38
+ ->setClass($class)
39
+ ->setValue($selectedValue)
40
+ ->setOptions($options)
41
+ ->getHtml();
42
+ } else {
43
+ $item = $codesCollection->getFirstItem();
44
+ $html = "<input type=\"hidden\" name=\"$name\" value=\"{$item->getCountryCode()}\" /><span class=\"$class\">+{$item->getPhoneCode()}</span> ";
45
+ }
46
+ return $html;
47
+ }
48
+
49
+ /**
50
+ * need o render email field. Only for guest and if magento order is enabled
51
+ */
52
+ public function isShowEmailField()
53
+ {
54
+ return $this->getModuleHelper()->isSaveMagentoOrder() && $this->isGuest();
55
+ }
56
  }
app/code/community/Smasoft/Oneclickorder/Block/Success.php CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- class Smasoft_Oneclickorder_Block_Success extends Smasoft_Oneclickorder_Block_Abstract
17
- {
18
-
19
- /**
20
- * @return null|string
21
- */
22
- public function getOrderId()
23
- {
24
- $id = $this->_getData('order_id');
25
- return $id ? str_pad($id, 6, '0', STR_PAD_LEFT) : null;
26
- }
27
-
28
- /**
29
- * @return null|string
30
- */
31
- public function getPhoneNumber()
32
- {
33
- return $this->_getData('phone');
34
- }
35
-
36
- /**
37
- * @return bool
38
- */
39
- public function isShowMagentoOrderSuccess()
40
- {
41
- if (Mage::helper('smasoft_oneclickorder')->isSaveMagentoOrder() && $this->_getData('magento_order_id')) {
42
- return true;
43
- }
44
- return false;
45
- }
46
-
47
- protected function _prepareData()
48
- {
49
- $orderId = Mage::getSingleton('checkout/session')->getOneclickOrderId();
50
- if ($orderId) {
51
- /** @var $order Smasoft_Oneclickorder_Model_Order */
52
- $order = Mage::getModel('smasoft_oneclickorder/order')->load($orderId);
53
- if ($order->getId()) {
54
- $this->addData(array(
55
- 'order_id' => $orderId,
56
- 'phone' => $order->getFullPhoneNumber(),
57
- 'magento_order_id' => $order->getMagentoOrderId(),
58
- ));
59
- }
60
- }
61
-
62
- }
63
-
64
- protected function _beforeToHtml()
65
- {
66
- $this->_prepareData();
67
- parent::_beforeToHtml();
68
- }
69
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ class Smasoft_Oneclickorder_Block_Success extends Smasoft_Oneclickorder_Block_Abstract
17
+ {
18
+
19
+ /**
20
+ * @return null|string
21
+ */
22
+ public function getOrderId()
23
+ {
24
+ $id = $this->_getData('order_id');
25
+ return $id ? str_pad($id, 6, '0', STR_PAD_LEFT) : null;
26
+ }
27
+
28
+ /**
29
+ * @return null|string
30
+ */
31
+ public function getPhoneNumber()
32
+ {
33
+ return $this->_getData('phone');
34
+ }
35
+
36
+ /**
37
+ * @return bool
38
+ */
39
+ public function isShowMagentoOrderSuccess()
40
+ {
41
+ if (Mage::helper('smasoft_oneclickorder')->isSaveMagentoOrder() && $this->_getData('magento_order_id')) {
42
+ return true;
43
+ }
44
+ return false;
45
+ }
46
+
47
+ protected function _prepareData()
48
+ {
49
+ $orderId = Mage::getSingleton('checkout/session')->getOneclickOrderId();
50
+ if ($orderId) {
51
+ /** @var $order Smasoft_Oneclickorder_Model_Order */
52
+ $order = Mage::getModel('smasoft_oneclickorder/order')->load($orderId);
53
+ if ($order->getId()) {
54
+ $this->addData(array(
55
+ 'order_id' => $orderId,
56
+ 'phone' => $order->getFullPhoneNumber(),
57
+ 'magento_order_id' => $order->getMagentoOrderId(),
58
+ ));
59
+ }
60
+ }
61
+
62
+ }
63
+
64
+ protected function _beforeToHtml()
65
+ {
66
+ $this->_prepareData();
67
+ parent::_beforeToHtml();
68
+ }
69
  }
app/code/community/Smasoft/Oneclickorder/Helper/Email.php CHANGED
@@ -1,57 +1,57 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Helper_Email extends Mage_Core_Helper_Abstract
18
- {
19
- const XML_PATH_ADMIN_EMAIL_TEMPLATE = 'smasoft_oneclickorder/general/template_admin';
20
-
21
- /**
22
- * @param Smasoft_Oneclickorder_Model_Order $order
23
- * @return Smasoft_Oneclickorder_Helper_Email
24
- */
25
- public function sendOrderEmailToAdmin($order)
26
- {
27
- /** @var $helper Smasoft_Oneclickorder_Helper_Data */
28
- $helper = Mage::helper('smasoft_oneclickorder');
29
- $translate = Mage::getSingleton('core/translate');
30
- /* @var $translate Mage_Core_Model_Translate */
31
- $translate->setTranslateInline(false);
32
-
33
- $mailTemplate = Mage::getModel('core/email_template');
34
- /* @var $mailTemplate Mage_Core_Model_Email_Template */
35
-
36
- $template = Mage::getStoreConfig(self::XML_PATH_ADMIN_EMAIL_TEMPLATE);
37
- $recipientEmail = $helper->getOrderNotificationEmail();
38
- $recipientName = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
39
- $customer = $order->getCustomer();
40
-
41
- $mailTemplate->setDesignConfig(array('area' => 'frontend'))
42
- ->sendTransactional(
43
- $template,
44
- 'general',
45
- $recipientEmail,
46
- $recipientName,
47
- array(
48
- 'customer' => $customer,
49
- 'order' => $order,
50
- 'invoice' => $order->getQuote()
51
- )
52
- );
53
-
54
- $translate->setTranslateInline(true);
55
- return $this;
56
- }
57
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Helper_Email extends Mage_Core_Helper_Abstract
18
+ {
19
+ const XML_PATH_ADMIN_EMAIL_TEMPLATE = 'smasoft_oneclickorder/general/template_admin';
20
+
21
+ /**
22
+ * @param Smasoft_Oneclickorder_Model_Order $order
23
+ * @return Smasoft_Oneclickorder_Helper_Email
24
+ */
25
+ public function sendOrderEmailToAdmin($order)
26
+ {
27
+ /** @var $helper Smasoft_Oneclickorder_Helper_Data */
28
+ $helper = Mage::helper('smasoft_oneclickorder');
29
+ $translate = Mage::getSingleton('core/translate');
30
+ /* @var $translate Mage_Core_Model_Translate */
31
+ $translate->setTranslateInline(false);
32
+
33
+ $mailTemplate = Mage::getModel('core/email_template');
34
+ /* @var $mailTemplate Mage_Core_Model_Email_Template */
35
+
36
+ $template = Mage::getStoreConfig(self::XML_PATH_ADMIN_EMAIL_TEMPLATE);
37
+ $recipientEmail = $helper->getOrderNotificationEmail();
38
+ $recipientName = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
39
+ $customer = $order->getCustomer();
40
+
41
+ $mailTemplate->setDesignConfig(array('area' => 'frontend'))
42
+ ->sendTransactional(
43
+ $template,
44
+ 'general',
45
+ $recipientEmail,
46
+ $recipientName,
47
+ array(
48
+ 'customer' => $customer,
49
+ 'order' => $order,
50
+ 'invoice' => $order->getQuote()
51
+ )
52
+ );
53
+
54
+ $translate->setTranslateInline(true);
55
+ return $this;
56
+ }
57
  }
app/code/community/Smasoft/Oneclickorder/Model/Country.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Model_Country extends Mage_Core_Model_Abstract
18
- {
19
-
20
- /**
21
- * Initialize resources
22
- */
23
- protected function _construct()
24
- {
25
- $this->_init('smasoft_oneclickorder/country');
26
- }
27
-
28
-
29
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Model_Country extends Mage_Core_Model_Abstract
18
+ {
19
+
20
+ /**
21
+ * Initialize resources
22
+ */
23
+ protected function _construct()
24
+ {
25
+ $this->_init('smasoft_oneclickorder/country');
26
+ }
27
+
28
+
29
  }
app/code/community/Smasoft/Oneclickorder/Model/ServiceQuote.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
- class Smasoft_Oneclickorder_Model_ServiceQuote extends Mage_Sales_Model_Service_Quote
17
- {
18
-
19
- protected function _validate()
20
- {
21
- if (Mage::registry('oneclickorder_ignore_quote_validation')) {
22
- return $this;
23
- }
24
- return parent::_validate();
25
- }
26
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+ class Smasoft_Oneclickorder_Model_ServiceQuote extends Mage_Sales_Model_Service_Quote
17
+ {
18
+
19
+ protected function _validate()
20
+ {
21
+ if (Mage::registry('oneclickorder_ignore_quote_validation')) {
22
+ return $this;
23
+ }
24
+ return parent::_validate();
25
+ }
26
  }
app/code/community/Smasoft/Oneclickorder/controllers/Adminhtml/OneclickorderController.php CHANGED
@@ -1,93 +1,93 @@
1
- <?php
2
- /**
3
- * NOTICE OF LICENSE
4
- *
5
- * This source file is subject to the Open Software License (OSL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Smasoft
11
- * @package Smasoft_Oneclikorder
12
- * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
- */
15
-
16
-
17
- class Smasoft_Oneclickorder_Adminhtml_OneclickorderController extends Mage_Adminhtml_Controller_Action
18
- {
19
-
20
- protected function _isActionAllowed($action)
21
- {
22
- return Mage::getSingleton('admin/session')->isAllowed('sales/oneclick_order/' . $action);
23
- }
24
-
25
- public function indexAction()
26
- {
27
- $this->loadLayout();
28
- $this->_initLayoutMessages('adminhtml/session');
29
- $this->_setActiveMenu('sales/oneclickorder');
30
- $this->renderLayout();
31
- }
32
-
33
- /**
34
- * grid
35
- */
36
- public function gridAction()
37
- {
38
- $block = $this->getLayout()->createBlock('smasoft_oneclickorder/adminhtml_orders_grid');
39
- $this->getResponse()->setBody($block->toHtml());
40
- }
41
-
42
- /**
43
- * grid
44
- */
45
- public function cartgridAction()
46
- {
47
- $order = Mage::getModel('smasoft_oneclickorder/order')->load(
48
- $this->getRequest()->getParam('id')
49
- );
50
- Mage::register('order', $order);
51
- $block = $this->getLayout()->createBlock('smasoft_oneclickorder/adminhtml_orders_view_tab_cart');
52
- $this->getResponse()->setBody($block->toHtml());
53
- }
54
-
55
- public function viewAction()
56
- {
57
- $order = Mage::getModel('smasoft_oneclickorder/order')->load(
58
- $this->getRequest()->getParam('id')
59
- );
60
- Mage::register('order', $order);
61
- if (!$order->getId()) {
62
- return $this->_redirect('*/*/index');
63
- }
64
- $this->loadLayout();
65
- $this->_initLayoutMessages('adminhtml/session');
66
- $this->_setActiveMenu('sales/oneclickorder');
67
-
68
-
69
- $this->renderLayout();
70
- }
71
-
72
- /**
73
- * check permissions
74
- * @return bool
75
- */
76
- protected function _isAllowed()
77
- {
78
- switch ($this->getRequest()->getActionName()) {
79
- case 'index':
80
- case 'grid':
81
- case 'cartgrid':
82
- return $this->_isActionAllowed('grid');
83
- break;
84
- case 'view':
85
- return $this->_isActionAllowed('view');
86
- break;
87
- case 'delete':
88
- return $this->_isActionAllowed('delete');
89
- break;
90
- }
91
- return false;
92
- }
93
  }
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Smasoft
11
+ * @package Smasoft_Oneclikorder
12
+ * @copyright Copyright (c) 2013 Slabko Michail. <l.nagash@gmail.com>
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+
16
+
17
+ class Smasoft_Oneclickorder_Adminhtml_OneclickorderController extends Mage_Adminhtml_Controller_Action
18
+ {
19
+
20
+ protected function _isActionAllowed($action)
21
+ {
22
+ return Mage::getSingleton('admin/session')->isAllowed('sales/oneclick_order/' . $action);
23
+ }
24
+
25
+ public function indexAction()
26
+ {
27
+ $this->loadLayout();
28
+ $this->_initLayoutMessages('adminhtml/session');
29
+ $this->_setActiveMenu('sales/oneclickorder');
30
+ $this->renderLayout();
31
+ }
32
+
33
+ /**
34
+ * grid
35
+ */
36
+ public function gridAction()
37
+ {
38
+ $block = $this->getLayout()->createBlock('smasoft_oneclickorder/adminhtml_orders_grid');
39
+ $this->getResponse()->setBody($block->toHtml());
40
+ }
41
+
42
+ /**
43
+ * grid
44
+ */
45
+ public function cartgridAction()
46
+ {
47
+ $order = Mage::getModel('smasoft_oneclickorder/order')->load(
48
+ $this->getRequest()->getParam('id')
49
+ );
50
+ Mage::register('order', $order);
51
+ $block = $this->getLayout()->createBlock('smasoft_oneclickorder/adminhtml_orders_view_tab_cart');
52
+ $this->getResponse()->setBody($block->toHtml());
53
+ }
54
+
55
+ public function viewAction()
56
+ {
57
+ $order = Mage::getModel('smasoft_oneclickorder/order')->load(
58
+ $this->getRequest()->getParam('id')
59
+ );
60
+ Mage::register('order', $order);
61
+ if (!$order->getId()) {
62
+ return $this->_redirect('*/*/index');
63
+ }
64
+ $this->loadLayout();
65
+ $this->_initLayoutMessages('adminhtml/session');
66
+ $this->_setActiveMenu('sales/oneclickorder');
67
+
68
+
69
+ $this->renderLayout();
70
+ }
71
+
72
+ /**
73
+ * check permissions
74
+ * @return bool
75
+ */
76
+ protected function _isAllowed()
77
+ {
78
+ switch ($this->getRequest()->getActionName()) {
79
+ case 'index':
80
+ case 'grid':
81
+ case 'cartgrid':
82
+ return $this->_isActionAllowed('grid');
83
+ break;
84
+ case 'view':
85
+ return $this->_isActionAllowed('view');
86
+ break;
87
+ case 'delete':
88
+ return $this->_isActionAllowed('delete');
89
+ break;
90
+ }
91
+ return false;
92
+ }
93
  }
app/code/community/Smasoft/Oneclickorder/etc/adminhtml.xml CHANGED
@@ -1,49 +1,49 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <menu>
5
- <sales>
6
- <children>
7
- <oneclick_order translate="title" module="smasoft_oneclickorder">
8
- <title>One Click Order</title>
9
- <action>adminhtml/oneclickorder/index</action>
10
- <sort_order>11</sort_order>
11
- </oneclick_order>
12
- </children>
13
- </sales>
14
- </menu>
15
- <acl>
16
- <resources>
17
- <admin>
18
- <children>
19
- <sales>
20
- <children>
21
- <oneclick_order translate="title">
22
- <title>One Click Order</title>
23
- <children>
24
- <grid translate="title">
25
- <title>Grid</title>
26
- </grid>
27
- <view translate="title">
28
- <title>View</title>
29
- </view>
30
- </children>
31
- </oneclick_order>
32
- </children>
33
- </sales>
34
- <system>
35
- <children>
36
- <config>
37
- <children>
38
- <smasoft_oneclickorder translate="title" module="smasoft_oneclickorder">
39
- <title>One Click Order Settings</title>
40
- </smasoft_oneclickorder>
41
- </children>
42
- </config>
43
- </children>
44
- </system>
45
- </children>
46
- </admin>
47
- </resources>
48
- </acl>
49
  </config>
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <menu>
5
+ <sales>
6
+ <children>
7
+ <oneclick_order translate="title" module="smasoft_oneclickorder">
8
+ <title>One Click Order</title>
9
+ <action>adminhtml/oneclickorder/index</action>
10
+ <sort_order>11</sort_order>
11
+ </oneclick_order>
12
+ </children>
13
+ </sales>
14
+ </menu>
15
+ <acl>
16
+ <resources>
17
+ <admin>
18
+ <children>
19
+ <sales>
20
+ <children>
21
+ <oneclick_order translate="title">
22
+ <title>One Click Order</title>
23
+ <children>
24
+ <grid translate="title">
25
+ <title>Grid</title>
26
+ </grid>
27
+ <view translate="title">
28
+ <title>View</title>
29
+ </view>
30
+ </children>
31
+ </oneclick_order>
32
+ </children>
33
+ </sales>
34
+ <system>
35
+ <children>
36
+ <config>
37
+ <children>
38
+ <smasoft_oneclickorder translate="title" module="smasoft_oneclickorder">
39
+ <title>One Click Order Settings</title>
40
+ </smasoft_oneclickorder>
41
+ </children>
42
+ </config>
43
+ </children>
44
+ </system>
45
+ </children>
46
+ </admin>
47
+ </resources>
48
+ </acl>
49
  </config>
app/code/community/Smasoft/Oneclickorder/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Smasoft_Oneclickorder>
6
- <version>0.1.0</version>
7
  </Smasoft_Oneclickorder>
8
  </modules>
9
  <global>
@@ -60,6 +60,20 @@
60
  </oneclickorder_read>
61
  </resources>
62
  <events>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
  <checkout_type_onepage_save_order_after>
65
  <observers>
3
  <config>
4
  <modules>
5
  <Smasoft_Oneclickorder>
6
+ <version>0.1.1</version>
7
  </Smasoft_Oneclickorder>
8
  </modules>
9
  <global>
60
  </oneclickorder_read>
61
  </resources>
62
  <events>
63
+ <catalog_controller_product_view> <!-- identifier of the event we want to catch -->
64
+ <observers>
65
+ <smasoft_events> <!-- identifier of the event handler -->
66
+ <type>model</type>
67
+ <!-- class method call type; valid are model, object and singleton -->
68
+ <class>smasoft_oneclickorder/observer</class>
69
+ <!-- observers class alias -->
70
+ <method>test</method>
71
+ <!-- observer's method to be called -->
72
+ <args></args>
73
+ <!-- additional arguments passed to observer -->
74
+ </smasoft_events>
75
+ </observers>
76
+ </catalog_controller_product_view>
77
 
78
  <checkout_type_onepage_save_order_after>
79
  <observers>
app/design/frontend/base/default/template/smasoft/oneclickorder/form.phtml CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
- /** @var $this Smasoft_Oneclickorder_Block_Form */
3
- /** @var $helper Smasoft_Oneclickorder_Helper_Data */
4
- $helper = Mage::helper('smasoft_oneclickorder');
5
- $action = $this->getAction()->getFullActionName();
6
-
7
- ?>
8
-
9
- <div id="oneclickorder-form-wrapper" class="<?php echo $this->getAction()->getFullActionName()?>">
10
- <div class="oneclickorder-title"><?php echo $this->__('1 Click Order')?></div>
11
- <div class="descr">
12
- <?php echo $this->__('Manager will call you, knows all details and will help place your order.')?>
13
- </div>
14
- <form id="oneclickorder-form" action="<?php echo $this->getUrl('oneclickorder/index/saveOrder')?>" method="post">
15
- <div class="oneclickorder-fields">
16
- <img class="phone-icon" src="<?php echo $this->getSkinUrl('images/oneclickorder/telephone.png') ?>"/>
17
- <?php echo $this->getPhoneCodeHtml('oneclickorder[country]', 'validate-select oneclickorder-country', true, $helper->__('Code'))?>
18
- <input type="text" name="oneclickorder[phone]" class="required-entry oneclickorder-phone" placeholder="<?php echo $this->__('phone number')?>"/>
19
- <?php if ($this->isShowEmailField()): ?>
20
- <input type="text" name="oneclickorder[email]" class="required-entry validate-email oneclickorder-email" placeholder="<?php echo $this->__('email')?>"/>
21
- <?php endif; ?>
22
- <div class="comment-wrapper" id="oneclickorder-comment-wrapper" style="display: none;">
23
- <span class="comment"><?php echo $helper->__('Comment:')?></span>
24
- <textarea name="oneclickorder[comment]"></textarea>
25
- </div>
26
- </div>
27
- <div class="button-wrapper" id="oneclickorder-buttons-container">
28
- <div class="comment-toggle" title="<?php echo $this->__('Add comment')?>">&nbsp;</div>
29
- <button type="button" class="button <?php echo $action=='checkout_cart_index' ? 'btn-proceed-checkout btn-checkout' : ''?>" name="submitOneclickOrder" onclick="oneClickOrder.saveOrder()"/>
30
- <span><span><?php echo $this->__('Order Now')?></span></span>
31
- </button>
32
- </div>
33
- <span class="please-wait" id="oneclickorder-please-wait" style="display:none;">
34
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $helper->__('Submit Order...') ?>" title="<?php echo $helper->__('Submit Order...') ?>" class="v-middle" /> <?php echo $helper->__('Submit Order...') ?>
35
- </span>
36
- </form>
37
-
38
- </div>
39
- <script type="text/javascript">
40
-
41
- var oneClickOrder = {
42
- formInstance:new VarienForm('oneclickorder-form'),
43
-
44
- _processResponse:function (response) {
45
- if (response.error) {
46
- Element.hide('oneclickorder-please-wait');
47
- Element.show('oneclickorder-buttons-container');
48
- $('oneclickorder-buttons-container').descendants().each(function(s) {
49
- s.disabled = false;
50
- });
51
- alert(response.error);
52
- return false;
53
- }
54
- if (response.success) {
55
- if (response.message) {
56
- alert(response.message)
57
- }
58
- if (response.redirect) {
59
- window.location.href = response.redirect;
60
- }
61
- }
62
- return true;
63
- },
64
- _afterSaveOrder:function (transport) {
65
- var response = {};
66
- try {
67
- response = transport.responseText.evalJSON();
68
- } catch (e) {
69
- response = transport.responseText;
70
- }
71
- if (this._processResponse(response)) {
72
-
73
- }
74
- },
75
- saveOrder:function () {
76
- if (this.formInstance.validator && this.formInstance.validator.validate()) {
77
-
78
- Element.show('oneclickorder-please-wait');
79
- Element.hide('oneclickorder-buttons-container');
80
- $('oneclickorder-buttons-container').descendants().each(function(s) {
81
- s.disabled = true;
82
- });
83
-
84
- new Ajax.Request(this.formInstance.form.getAttribute('action'), {
85
- method:'post',
86
- parameters:this.formInstance.form.serialize(),
87
- onComplete:this._afterSaveOrder.bind(this),
88
- onFailure:function () {
89
- location.href = BASE_URL;
90
- }
91
- });
92
- }
93
- },
94
- toggleCommentBlock:function (event) {
95
- Element.toggle('oneclickorder-comment-wrapper');
96
- }
97
- };
98
-
99
- $$("#oneclickorder-form-wrapper .comment-toggle").invoke('observe', 'click', function () {
100
- oneClickOrder.toggleCommentBlock(this)
101
- });
102
-
103
  </script>
1
+ <?php
2
+ /** @var $this Smasoft_Oneclickorder_Block_Form */
3
+ /** @var $helper Smasoft_Oneclickorder_Helper_Data */
4
+ $helper = Mage::helper('smasoft_oneclickorder');
5
+ $action = $this->getAction()->getFullActionName();
6
+
7
+ ?>
8
+
9
+ <div id="oneclickorder-form-wrapper" class="<?php echo $this->getAction()->getFullActionName()?>">
10
+ <div class="oneclickorder-title"><?php echo $this->__('1 Click Order')?></div>
11
+ <div class="descr">
12
+ <?php echo $this->__('Manager will call you, knows all details and will help place your order.')?>
13
+ </div>
14
+ <form id="oneclickorder-form" action="<?php echo $this->getUrl('oneclickorder/index/saveOrder')?>" method="post">
15
+ <div class="oneclickorder-fields">
16
+ <img class="phone-icon" src="<?php echo $this->getSkinUrl('images/oneclickorder/telephone.png') ?>"/>
17
+ <?php echo $this->getPhoneCodeHtml('oneclickorder[country]', 'validate-select oneclickorder-country', true, $helper->__('Code'))?>
18
+ <input type="text" name="oneclickorder[phone]" class="required-entry oneclickorder-phone" placeholder="<?php echo $this->__('phone number')?>"/>
19
+ <?php if ($this->isShowEmailField()): ?>
20
+ <input type="text" name="oneclickorder[email]" class="required-entry validate-email oneclickorder-email" placeholder="<?php echo $this->__('email')?>"/>
21
+ <?php endif; ?>
22
+ <div class="comment-wrapper" id="oneclickorder-comment-wrapper" style="display: none;">
23
+ <span class="comment"><?php echo $helper->__('Comment:')?></span>
24
+ <textarea name="oneclickorder[comment]"></textarea>
25
+ </div>
26
+ </div>
27
+ <div class="button-wrapper" id="oneclickorder-buttons-container">
28
+ <div class="comment-toggle" title="<?php echo $this->__('Add comment')?>">&nbsp;</div>
29
+ <button type="button" class="button <?php echo $action=='checkout_cart_index' ? 'btn-proceed-checkout btn-checkout' : ''?>" name="submitOneclickOrder" onclick="oneClickOrder.saveOrder()"/>
30
+ <span><span><?php echo $this->__('Order Now')?></span></span>
31
+ </button>
32
+ </div>
33
+ <span class="please-wait" id="oneclickorder-please-wait" style="display:none;">
34
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $helper->__('Submit Order...') ?>" title="<?php echo $helper->__('Submit Order...') ?>" class="v-middle" /> <?php echo $helper->__('Submit Order...') ?>
35
+ </span>
36
+ </form>
37
+
38
+ </div>
39
+ <script type="text/javascript">
40
+
41
+ var oneClickOrder = {
42
+ formInstance:new VarienForm('oneclickorder-form'),
43
+
44
+ _processResponse:function (response) {
45
+ if (response.error) {
46
+ Element.hide('oneclickorder-please-wait');
47
+ Element.show('oneclickorder-buttons-container');
48
+ $('oneclickorder-buttons-container').descendants().each(function(s) {
49
+ s.disabled = false;
50
+ });
51
+ alert(response.error);
52
+ return false;
53
+ }
54
+ if (response.success) {
55
+ if (response.message) {
56
+ alert(response.message)
57
+ }
58
+ if (response.redirect) {
59
+ window.location.href = response.redirect;
60
+ }
61
+ }
62
+ return true;
63
+ },
64
+ _afterSaveOrder:function (transport) {
65
+ var response = {};
66
+ try {
67
+ response = transport.responseText.evalJSON();
68
+ } catch (e) {
69
+ response = transport.responseText;
70
+ }
71
+ if (this._processResponse(response)) {
72
+
73
+ }
74
+ },
75
+ saveOrder:function () {
76
+ if (this.formInstance.validator && this.formInstance.validator.validate()) {
77
+
78
+ Element.show('oneclickorder-please-wait');
79
+ Element.hide('oneclickorder-buttons-container');
80
+ $('oneclickorder-buttons-container').descendants().each(function(s) {
81
+ s.disabled = true;
82
+ });
83
+
84
+ new Ajax.Request(this.formInstance.form.getAttribute('action'), {
85
+ method:'post',
86
+ parameters:this.formInstance.form.serialize(),
87
+ onComplete:this._afterSaveOrder.bind(this),
88
+ onFailure:function () {
89
+ location.href = BASE_URL;
90
+ }
91
+ });
92
+ }
93
+ },
94
+ toggleCommentBlock:function (event) {
95
+ Element.toggle('oneclickorder-comment-wrapper');
96
+ }
97
+ };
98
+
99
+ $$("#oneclickorder-form-wrapper .comment-toggle").invoke('observe', 'click', function () {
100
+ oneClickOrder.toggleCommentBlock(this)
101
+ });
102
+
103
  </script>
app/locale/en_US/Smasoft_Oneclickorder.csv ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "1 Click Order","1 Click Order"
2
+ "Admin Email Template","Admin Email Template"
3
+ "By default uses General Store Email [General=>Store Email Addresses=>General Contact]","By default uses General Store Email [General=>Store Email Addresses=>General Contact]"
4
+ "Controls whether create Magento Order if possible.","Controls whether create Magento Order if possible."
5
+ "Create Magento Order","Create Magento Order"
6
+ "If select more, than one option, on frontend will be shown select-box with selected phone codes","If select more, than one option, on frontend will be shown select-box with selected phone codes"
7
+ "One Click Order General Settings","One Click Order General Settings"
8
+ "Send Email with order info","Send Email with order info"
9
+ "Code","Code"
10
+ "Manager will call you, knows all details and will help place your order.","Manager will call you, knows all details and will help place your order."
11
+ "Place Order","Place Order"
12
+ "Comment:","Comment:"
13
+ "Add comment","Add comment"
14
+ "phone number","phone number"
15
+ "Submit Order...","Submit Order..."
16
+ "Your order # is: %s. Manager will call you to %s","Your order # is: %s. Manager will call you to %s"
17
+ "Phone","Phone"
18
+ "One Click Order","One Click Order"
19
+ "OneClick Order Admin Email template","OneClick Order Admin Email template"
20
+ "View Magento Order","View Magento Order"
21
+ "Email Address","Email Address"
22
+ "Order Now","Order Now"
23
+ "Change standard One Page Checkout","Change standard One Page Checkout"
24
+ "If yes, than standard One Page Checkout will be replaced by One Click Order","If yes, than standard One Page Checkout will be replaced by One Click Order"
25
+ "One Click Order Checkout Settings","One Click Order Checkout Settings"
26
+ "Total items","Total items"
app/locale/en_US/template/email/oneclickorder/admin_order.html ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject New order #{{var order.entity_id}} from {{if customer.is_guest}}Guest{{else}}{{var customer.name}}{{/if}} @-->
2
+
3
+ <!--@styles
4
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
8
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
9
+ <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
10
+ <tr>
11
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
12
+ <!-- [ header starts here] -->
13
+ <table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
14
+ <tr>
15
+ <td valign="top">
16
+ <a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
17
+ </tr>
18
+ <!-- [ middle starts here] -->
19
+ <tr>
20
+ <td valign="top">
21
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">
22
+ New order #{{var order.entity_id}} from {{htmlescape var=$customer.name}}
23
+ </h1>
24
+ <p style="border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#f9f9f9;">
25
+ Customer Information:<br/>
26
+ {{if customer.is_guest}}
27
+ <strong>Name</strong>: Guest<br/>
28
+ {{else}}
29
+ <strong>Name</strong>: {{var customer.name}}<br/>
30
+ <strong>E-mail</strong>: {{var customer.email}}<br/>
31
+ {{/if}}
32
+ <strong>Phone</strong>: {{var order.getFullPhoneNumber()}}<br/>
33
+ <strong>Comment</strong>: {{var order.comment}}<br/>
34
+ </p>
35
+
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <td align="center">
40
+ {{layout area="frontend" handle="oneclickorder_email_order_items" invoice=$invoice order=$order}}
41
+
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
46
+ </tr>
47
+
48
+ </table>
49
+
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ </div>
54
+ </body>
app/locale/ru_RU/template/email/oneclickorder/admin_order.html ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject New order #{{var order.entity_id}} from {{if customer.is_guest}}Guest{{else}}{{var customer.name}}{{/if}} @-->
2
+
3
+ <!--@styles
4
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
8
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
9
+ <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
10
+ <tr>
11
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
12
+ <!-- [ header starts here] -->
13
+ <table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
14
+ <tr>
15
+ <td valign="top">
16
+ <a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
17
+ </tr>
18
+ <!-- [ middle starts here] -->
19
+ <tr>
20
+ <td valign="top">
21
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">
22
+ New order #{{var order.entity_id}} from {{htmlescape var=$customer.name}}
23
+ </h1>
24
+ <p style="border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#f9f9f9;">
25
+ Customer Information:<br/>
26
+ {{if customer.is_guest}}
27
+ <strong>Name</strong>: Guest<br/>
28
+ {{else}}
29
+ <strong>Name</strong>: {{var customer.name}}<br/>
30
+ <strong>E-mail</strong>: {{var customer.email}}<br/>
31
+ {{/if}}
32
+ <strong>Phone</strong>: {{var order.getFullPhoneNumber()}}<br/>
33
+ <strong>Comment</strong>: {{var order.comment}}<br/>
34
+ </p>
35
+
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <td align="center">
40
+ {{layout area="frontend" handle="oneclickorder_email_order_items" invoice=$invoice order=$order}}
41
+
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
46
+ </tr>
47
+
48
+ </table>
49
+
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ </div>
54
+ </body>
package.xml CHANGED
@@ -1,29 +1,35 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Smasoft_Oneclickorder</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Magento One Click Order</summary>
10
- <description>This extension allows your customers to place an order only in one click , by entering only phone number.&#xD;
11
  &#xD;
12
  On the Product View page (right column) and Cart View page will appear form "1 Click order"&#xD;
 
 
 
 
 
13
  &#xD;
14
  &lt;h2&gt;Features&lt;/h2&gt;&#xD;
15
  &lt;ul&gt;&#xD;
16
  &lt;li&gt;Ability to view order history in admin&lt;/li&gt;&#xD;
17
- &lt;li&gt;Save order in Magento [optional]&lt;/li&gt;&#xD;
18
- &lt;li&gt;Send notification to admin by email [optional]&lt;/li&gt;&#xD;
 
19
  &lt;li&gt;Disable extension&lt;/li&gt;&#xD;
20
- &lt;li&gt;ajax form submit&lt;/li&gt;&#xD;
21
  &lt;/ul&gt;</description>
22
- <notes>Add extension code</notes>
23
- <authors><author><name>Slabko Michail</name><user>mslabko</user><email>michail.slabko@magento.com</email></author></authors>
24
- <date>2013-02-17</date>
25
- <time>19:32:14</time>
26
- <contents><target name="magecommunity"><dir name="Smasoft"><dir name="Oneclickorder"><dir><dir name="Block"><file name="Abstract.php" hash="7ac1c4d2e31853bde2104fe43bfb219b"/><dir name="Adminhtml"><dir name="Orders"><dir name="Grid"><dir name="Filter"><file name="Filter.php" hash="85310a3cd2b743761e91eba00eae9160"/></dir><dir name="Renderer"><file name="Customer.php" hash="41d3e6b5c27ea79647e175ae966ed85d"/></dir></dir><file name="Grid.php" hash="dd552aec694f243eb479941e9799c33f"/><dir name="View"><dir name="Tab"><file name="Cart.php" hash="7d33d08f804ca525ca2268ae2766c6f1"/><file name="View.php" hash="59d8bb9146b051d8deb7eafba78441df"/></dir><file name="Tabs.php" hash="96121fedb9fde7f875287f9795d53dc9"/><file name="Totals.php" hash="e034a5b9dd5fbaa84fb7cb8194b100a1"/></dir><file name="View.php" hash="ba7a0f092ebe0388073c31e7330fb8d1"/></dir><file name="Orders.php" hash="c13781a656ef0ad6dd6cbc45171f0ffd"/></dir><dir name="Email"><file name="Items.php" hash="f3429350aa7adff3b8f38ba4fa8224c6"/></dir><file name="Form.php" hash="dd11a5a24931cc9114dcb09fd1c866bd"/><file name="Success.php" hash="85648fecbd5c1db1c2a2e2c0a80814f0"/></dir><dir name="Helper"><file name="Data.php" hash="fe618bf196b25961e7dd2b7b9c23b546"/><file name="Email.php" hash="fbcc2b33a32d1352ba49a46ac0624421"/></dir><dir name="Model"><file name="Country.php" hash="81e4fe06bb7480d91185d26006afb07e"/><file name="Observer.php" hash="8b43e8ee35bc52a44c2d4d2056554702"/><file name="Order.php" hash="5f8572272cebc0b94bb9ed404bd7dcd3"/><dir name="Payment"><dir name="Method"><file name="Oneclick.php" hash="cc78b8283304560f3c10b8ca603c5e73"/></dir></dir><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="78ffe2ccd768fe3207693103cb2e2b9a"/></dir><file name="Country.php" hash="6ab590f51494c706e58b8be26b6de799"/><dir name="Order"><file name="Collection.php" hash="909e254e17fa93326a7adb1427f6e1ad"/></dir><file name="Order.php" hash="848513d334ecb128ecb31da0b926e158"/></dir><file name="ServiceQuote.php" hash="588b5af1ab7d5361dfac5ab77ee55aa0"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Country.php" hash="d4f27b6a172bcfd6ad31f253d4637f0d"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OneclickorderController.php" hash="d364c0c870bc1467f011cfb0fc68646d"/></dir><file name="IndexController.php" hash="310d1e2ac0bee1704fe5b385170caac8"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d5bb33432bc01b35a395935bbff852fb"/><file name="config.xml" hash="2531e2b0d6b4122df85dc5398b2ea184"/><file name="system.xml" hash="d85dab36443009f3c769b896d7fee217"/></dir><dir name="sql"><dir name="oneclickorder_setup"><file name="mysql4-install-0.1.0.php" hash="0f74fa38899ed8ec22ce6dd61844a074"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="smasoft"><file name="oneclickorder.xml" hash="d6909370ecd1c83f0ca30f9975e20d18"/></dir></dir><dir name="template"><dir name="smasoft"><dir><dir name="oneclickorder"><file name="view.phtml" hash="851502a4e36982b3c11658eae83910ed"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="smasoft"><file name="oneclickorder.xml" hash="7d30fc248b37372ec574aea63aed60fe"/></dir></dir><dir name="template"><dir name="smasoft"><dir><dir name="oneclickorder"><dir name="email"><file name="items.phtml" hash="84b6c0882e2d419603fcd3248287ed0c"/></dir><file name="form.phtml" hash="7a735295a44df1940101d750ff8365b1"/><file name="success.phtml" hash="c325bfd66ded12b59199f36afe393c00"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Smasoft_Oneclickorder.xml" hash="41538eaa88059b69cd0bd1e1d4ef02e2"/></dir></target><target name="magelocale"><dir name="ru_RU"><file name="Smasoft_Oneclickorder.csv" hash="bc7bb64d47579cb159fa1bb3c4780a27"/></dir><dir name="en_US"><file name="Smasoft_Oneclickorder.csv" hash=""/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="oneclickorder.css" hash="69ef655acbab8ba3178f53871f51a2ea"/></dir><dir name="images"><dir name="oneclickorder"><file name="comment.png" hash="a22ab82fb3a33ece38c3ab5e0844154d"/><file name="telephone.png" hash="0c8298910fbe3c2423f4f30f8ce5c983"/></dir></dir></dir></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.2.0</min><max>5.4.0</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Smasoft_Oneclickorder</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>One Click Order</summary>
10
+ <description>This extension allows your customers to place an order only in one click, by entering only phone number.&#xD;
11
  &#xD;
12
  On the Product View page (right column) and Cart View page will appear form "1 Click order"&#xD;
13
+ &lt;br /&gt;&#xD;
14
+ &lt;ul&gt;&#xD;
15
+ &lt;li&gt;Bugtracker: &lt;a href="https://github.com/l-nagash/magento-oneclickorder/issues"&gt;https://github.com/l-nagash/magento-oneclickorder/issues&lt;/a&gt;&lt;/li&gt;&#xD;
16
+ &lt;li&gt;Source Code: &lt;a href="https://github.com/l-nagash/magento-oneclickorder"&gt;https://github.com/l-nagash/magento-oneclickorder&lt;/a&gt;&lt;/li&gt;&#xD;
17
+ &lt;/ul&gt;&#xD;
18
  &#xD;
19
  &lt;h2&gt;Features&lt;/h2&gt;&#xD;
20
  &lt;ul&gt;&#xD;
21
  &lt;li&gt;Ability to view order history in admin&lt;/li&gt;&#xD;
22
+ &lt;li&gt;Save order in Magento&lt;/li&gt;&#xD;
23
+ &lt;li&gt;Send notification to admin&lt;/li&gt;&#xD;
24
+ &lt;li&gt;Disable Standard Onepage Checkout&lt;/li&gt;&#xD;
25
  &lt;li&gt;Disable extension&lt;/li&gt;&#xD;
26
+ &lt;li&gt;Ajax form submit&lt;/li&gt;&#xD;
27
  &lt;/ul&gt;</description>
28
+ <notes>Added Extension code</notes>
29
+ <authors><author><name>Slabko Michail</name><user>mslabko</user><email>l.nagash@gmail.com</email></author></authors>
30
+ <date>2013-02-21</date>
31
+ <time>16:07:29</time>
32
+ <contents><target name="magecommunity"><dir name="Smasoft"><dir name="Oneclickorder"><dir name="Block"><file name="Abstract.php" hash="ec689e71fffeac8ecb73a6a2c5c77014"/><dir name="Adminhtml"><dir name="Orders"><dir name="Grid"><dir name="Filter"><file name="Filter.php" hash="93beba774c9ed82e8737b92d63a56e86"/></dir><dir name="Renderer"><file name="Customer.php" hash="0e2c3e023a60527f18f8c0e1b5753e08"/></dir></dir><file name="Grid.php" hash="10af2d8bdff42cf0e9d489036973aecf"/><dir name="View"><dir name="Tab"><file name="Cart.php" hash="df499f29a9ac4500a559f35a50047eb9"/><file name="View.php" hash="94522fc1c90ced872dceafd47eb76982"/></dir><file name="Tabs.php" hash="2f5d87eda201576d4551d825819bbc24"/><file name="Totals.php" hash="0b40364a2d1e2f8f571762b4fcdeeb1b"/></dir><file name="View.php" hash="132d19627ffc304e8387e0ddbba0c917"/></dir><file name="Orders.php" hash="fb1a638b9c49d650de8f830ed9de14e1"/></dir><dir name="Email"><file name="Items.php" hash="d17346d16c2d005aaaee3d29284b00a2"/></dir><file name="Form.php" hash="e9d8fb89cede29ec4a637333c066edab"/><file name="Success.php" hash="bcc00f5ef11e7c4fd694d4dcb5906636"/></dir><dir name="Helper"><file name="Data.php" hash="fe618bf196b25961e7dd2b7b9c23b546"/><file name="Email.php" hash="46b059dbc85322a1dec1311fe5505d54"/></dir><dir name="Model"><file name="Country.php" hash="c91142b9ad63b7b6166ca2c4dea1395f"/><file name="Observer.php" hash="8b43e8ee35bc52a44c2d4d2056554702"/><file name="Order.php" hash="5f8572272cebc0b94bb9ed404bd7dcd3"/><dir name="Payment"><dir name="Method"><file name="Oneclick.php" hash="cc78b8283304560f3c10b8ca603c5e73"/></dir></dir><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="78ffe2ccd768fe3207693103cb2e2b9a"/></dir><file name="Country.php" hash="6ab590f51494c706e58b8be26b6de799"/><dir name="Order"><file name="Collection.php" hash="909e254e17fa93326a7adb1427f6e1ad"/></dir><file name="Order.php" hash="848513d334ecb128ecb31da0b926e158"/></dir><file name="ServiceQuote.php" hash="c4724eeb60a0c13358deb49e395c634c"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Country.php" hash="d4f27b6a172bcfd6ad31f253d4637f0d"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OneclickorderController.php" hash="95c974a5173a827daeba973f720b0467"/></dir><file name="IndexController.php" hash="310d1e2ac0bee1704fe5b385170caac8"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0f966de0afbe94f28b408e564159b338"/><file name="config.xml" hash="0bd6482ec8e1c278ef48376d6c27e4fc"/><file name="system.xml" hash="d85dab36443009f3c769b896d7fee217"/></dir><dir name="sql"><dir name="oneclickorder_setup"><file name="mysql4-install-0.1.0.php" hash="0f74fa38899ed8ec22ce6dd61844a074"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="smasoft"><file name="oneclickorder.xml" hash="d6909370ecd1c83f0ca30f9975e20d18"/></dir></dir><dir name="template"><dir name="smasoft"><dir name="oneclickorder"><file name="view.phtml" hash="851502a4e36982b3c11658eae83910ed"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="smasoft"><file name="oneclickorder.xml" hash="7d30fc248b37372ec574aea63aed60fe"/></dir></dir><dir name="template"><dir name="smasoft"><dir name="oneclickorder"><dir name="email"><file name="items.phtml" hash="84b6c0882e2d419603fcd3248287ed0c"/></dir><file name="form.phtml" hash="71336c9d2632bf18c600a993edeb50a7"/><file name="success.phtml" hash="c325bfd66ded12b59199f36afe393c00"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Smasoft_Oneclickorder.xml" hash="41538eaa88059b69cd0bd1e1d4ef02e2"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="oneclickorder"><file name="admin_order.html" hash="74f9cbd698c27be8e68e373c67eebb25"/></dir></dir></dir><file name="Smasoft_Oneclickorder.csv" hash="0ff2430906a089f31f2add731fae288f"/></dir><dir name="ru_RU"><dir name="template"><dir name="email"><dir name="oneclickorder"><file name="admin_order.html" hash="74f9cbd698c27be8e68e373c67eebb25"/></dir></dir></dir><file name="Smasoft_Oneclickorder.csv" hash="bc7bb64d47579cb159fa1bb3c4780a27"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="oneclickorder"><file name="comment.png" hash="a22ab82fb3a33ece38c3ab5e0844154d"/><file name="telephone.png" hash="0c8298910fbe3c2423f4f30f8ce5c983"/></dir></dir><dir name="css"><file name="oneclickorder.css" hash="33ae3810d9201983a055e80661a909b9"/></dir></dir></dir></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.2.0</min><max>5.4.0</max></php></required></dependencies>
35
  </package>
skin/frontend/default/default/css/oneclickorder.css CHANGED
@@ -1,96 +1,96 @@
1
- #oneclickorder-form-wrapper {
2
- text-align: left;
3
- margin: 2px 0 10px 0;
4
- }
5
-
6
- #oneclickorder-form-wrapper .oneclickorder-fields{
7
- text-align: right;
8
- /*width: 196px;*/
9
- width: 98%;
10
- }
11
-
12
- #oneclickorder-form-wrapper form {
13
- margin-top: 6px;
14
- display: block;
15
- }
16
-
17
-
18
- #oneclickorder-form-wrapper input {
19
- width: 30px;
20
- }
21
-
22
- #oneclickorder-form-wrapper .button-wrapper {
23
- margin-top: 4px;
24
- }
25
-
26
- #oneclickorder-form-wrapper .oneclickorder-country {
27
- width: 58px;
28
- }
29
-
30
- #oneclickorder-form-wrapper .oneclickorder-phone,
31
- #oneclickorder-form-wrapper .oneclickorder-email {
32
- /*width: 110px;*/
33
- width: 63%;
34
- height: 15px;
35
- margin-bottom: 2px;
36
-
37
- }
38
-
39
- #oneclickorder-form-wrapper .oneclickorder-email {
40
- /*margin: 2px 0 0 39px;*/
41
- }
42
-
43
- #oneclickorder-form-wrapper .phone-icon {
44
- /*margin-top: 3px;*/
45
- vertical-align:top;
46
- }
47
-
48
- #oneclickorder-form-wrapper .descr {
49
- font-size: 10px;
50
- line-height: 12px;
51
- }
52
-
53
- #oneclickorder-form-wrapper .oneclickorder-title {
54
- font-size: 15px;
55
- font-weight: bold;
56
- }
57
-
58
- #oneclickorder-form-wrapper .please-wait {
59
- display: block;
60
- margin-top: 5px;
61
- float: none;
62
- }
63
-
64
- #oneclickorder-form-wrapper .checkout_cart_index {
65
-
66
- }
67
-
68
- #oneclickorder-form-wrapper .catalog_product_view {
69
-
70
- }
71
-
72
- #oneclickorder-form-wrapper .comment-toggle {
73
- background: url('../images/oneclickorder/comment.png');
74
- width: 17px;
75
- height: 16px;
76
- cursor: pointer;
77
- float: left;
78
- margin-top: 2px;
79
- margin-right: 4px;
80
- }
81
-
82
- #oneclickorder-form-wrapper .comment-wrapper textarea {
83
- width: 90%;
84
- max-width: 178px;
85
- height: 50px;
86
- }
87
-
88
- #oneclickorder-form-wrapper .button {
89
- /*margin: 5px 0 0 24px;*/
90
- /*float: none;*/
91
- }
92
-
93
- #oneclickorder-form-wrapper.catalog_product_view {
94
- width: 195px;
95
- }
96
-
1
+ #oneclickorder-form-wrapper {
2
+ text-align: left;
3
+ margin: 2px 0 10px 0;
4
+ }
5
+
6
+ #oneclickorder-form-wrapper .oneclickorder-fields{
7
+ text-align: right;
8
+ /*width: 196px;*/
9
+ width: 98%;
10
+ }
11
+
12
+ #oneclickorder-form-wrapper form {
13
+ margin-top: 6px;
14
+ display: block;
15
+ }
16
+
17
+
18
+ #oneclickorder-form-wrapper input {
19
+ width: 30px;
20
+ }
21
+
22
+ #oneclickorder-form-wrapper .button-wrapper {
23
+ margin-top: 4px;
24
+ }
25
+
26
+ #oneclickorder-form-wrapper .oneclickorder-country {
27
+ width: 58px;
28
+ }
29
+
30
+ #oneclickorder-form-wrapper .oneclickorder-phone,
31
+ #oneclickorder-form-wrapper .oneclickorder-email {
32
+ /*width: 110px;*/
33
+ width: 63%;
34
+ height: 15px;
35
+ margin-bottom: 2px;
36
+
37
+ }
38
+
39
+ #oneclickorder-form-wrapper .oneclickorder-email {
40
+ /*margin: 2px 0 0 39px;*/
41
+ }
42
+
43
+ #oneclickorder-form-wrapper .phone-icon {
44
+ /*margin-top: 3px;*/
45
+ vertical-align:top;
46
+ }
47
+
48
+ #oneclickorder-form-wrapper .descr {
49
+ font-size: 10px;
50
+ line-height: 12px;
51
+ }
52
+
53
+ #oneclickorder-form-wrapper .oneclickorder-title {
54
+ font-size: 15px;
55
+ font-weight: bold;
56
+ }
57
+
58
+ #oneclickorder-form-wrapper .please-wait {
59
+ display: block;
60
+ margin-top: 5px;
61
+ float: none;
62
+ }
63
+
64
+ #oneclickorder-form-wrapper .checkout_cart_index {
65
+
66
+ }
67
+
68
+ #oneclickorder-form-wrapper .catalog_product_view {
69
+
70
+ }
71
+
72
+ #oneclickorder-form-wrapper .comment-toggle {
73
+ background: url('../images/oneclickorder/comment.png');
74
+ width: 17px;
75
+ height: 16px;
76
+ cursor: pointer;
77
+ float: left;
78
+ margin-top: 2px;
79
+ margin-right: 4px;
80
+ }
81
+
82
+ #oneclickorder-form-wrapper .comment-wrapper textarea {
83
+ width: 90%;
84
+ max-width: 178px;
85
+ height: 50px;
86
+ }
87
+
88
+ #oneclickorder-form-wrapper .button {
89
+ /*margin: 5px 0 0 24px;*/
90
+ /*float: none;*/
91
+ }
92
+
93
+ #oneclickorder-form-wrapper.catalog_product_view {
94
+ width: 195px;
95
+ }
96
+