Version Notes
Added order comment column to orders grid
Tested and updated to work with Magento 1.4
Tested and updated to work with Magento 1.5
Download this release
Release Info
| Developer | Sergey Storchay |
| Extension | Magemaven_OrderComment |
| Version | 1.0.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/Magemaven/OrderComment/Block/Adminhtml/Sales/Order/Grid.php +42 -0
- app/code/community/Magemaven/OrderComment/Block/Checkout/Agreements.php +24 -24
- app/code/community/Magemaven/OrderComment/Helper/Data.php +15 -15
- app/code/community/Magemaven/OrderComment/Model/Mysql4/Order/Grid/Collection.php +15 -0
- app/code/community/Magemaven/OrderComment/Model/Observer.php +33 -33
- app/code/community/Magemaven/OrderComment/Model/Resource/Order/Grid/Collection.php +35 -0
- app/code/community/Magemaven/OrderComment/etc/config.xml +80 -63
- app/design/frontend/base/default/template/ordercomment/checkout/agreements.phtml +50 -50
- app/etc/modules/Magemaven_OrderComment.xml +25 -25
- package.xml +7 -5
app/code/community/Magemaven/OrderComment/Block/Adminhtml/Sales/Order/Grid.php
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category Magemaven
|
| 9 |
+
* @package Magemaven_OrderComment
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
class Magemaven_OrderComment_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
|
| 14 |
+
{
|
| 15 |
+
/**
|
| 16 |
+
* Retrieve collection class
|
| 17 |
+
*
|
| 18 |
+
* @return string
|
| 19 |
+
*/
|
| 20 |
+
protected function _getCollectionClass()
|
| 21 |
+
{
|
| 22 |
+
return 'ordercomment/order_grid_collection';
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* Prepare grid columns
|
| 27 |
+
*
|
| 28 |
+
* @return Magemaven_OrderComment_Block_Adminhtml_Sales_Order_Grid
|
| 29 |
+
*/
|
| 30 |
+
protected function _prepareColumns()
|
| 31 |
+
{
|
| 32 |
+
parent::_prepareColumns();
|
| 33 |
+
|
| 34 |
+
// Add order comment to grid
|
| 35 |
+
$this->addColumn('ordercomment', array(
|
| 36 |
+
'header' => Mage::helper('ordercomment')->__('Order Comment'),
|
| 37 |
+
'index' => 'ordercomment',
|
| 38 |
+
));
|
| 39 |
+
|
| 40 |
+
return $this;
|
| 41 |
+
}
|
| 42 |
+
}
|
app/code/community/Magemaven/OrderComment/Block/Checkout/Agreements.php
CHANGED
|
@@ -1,25 +1,25 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
-
* It is also available through the world-wide-web at this URL:
|
| 6 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
-
*
|
| 8 |
-
* @category Magemaven
|
| 9 |
-
* @package Magemaven_OrderComment
|
| 10 |
-
* @copyright Copyright (c) 2011 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
-
*/
|
| 13 |
-
class Magemaven_OrderComment_Block_Checkout_Agreements extends Mage_Checkout_Block_Agreements
|
| 14 |
-
{
|
| 15 |
-
/**
|
| 16 |
-
* Override block template
|
| 17 |
-
*
|
| 18 |
-
* @return string
|
| 19 |
-
*/
|
| 20 |
-
protected function _toHtml()
|
| 21 |
-
{
|
| 22 |
-
$this->setTemplate('ordercomment/checkout/agreements.phtml');
|
| 23 |
-
return parent::_toHtml();
|
| 24 |
-
}
|
| 25 |
}
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category Magemaven
|
| 9 |
+
* @package Magemaven_OrderComment
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
class Magemaven_OrderComment_Block_Checkout_Agreements extends Mage_Checkout_Block_Agreements
|
| 14 |
+
{
|
| 15 |
+
/**
|
| 16 |
+
* Override block template
|
| 17 |
+
*
|
| 18 |
+
* @return string
|
| 19 |
+
*/
|
| 20 |
+
protected function _toHtml()
|
| 21 |
+
{
|
| 22 |
+
$this->setTemplate('ordercomment/checkout/agreements.phtml');
|
| 23 |
+
return parent::_toHtml();
|
| 24 |
+
}
|
| 25 |
}
|
app/code/community/Magemaven/OrderComment/Helper/Data.php
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
-
* It is also available through the world-wide-web at this URL:
|
| 6 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
-
*
|
| 8 |
-
* @category Magemaven
|
| 9 |
-
* @package Magemaven_OrderComment
|
| 10 |
-
* @copyright Copyright (c) 2011 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
-
*/
|
| 13 |
-
class Magemaven_OrderComment_Helper_Data extends Mage_Core_Helper_Abstract
|
| 14 |
-
{
|
| 15 |
-
|
| 16 |
}
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category Magemaven
|
| 9 |
+
* @package Magemaven_OrderComment
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
class Magemaven_OrderComment_Helper_Data extends Mage_Core_Helper_Abstract
|
| 14 |
+
{
|
| 15 |
+
|
| 16 |
}
|
app/code/community/Magemaven/OrderComment/Model/Mysql4/Order/Grid/Collection.php
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category Magemaven
|
| 9 |
+
* @package Magemaven_OrderComment
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
class Magemaven_OrderComment_Model_Mysql4_Order_Grid_Collection extends Mage_Sales_Model_Resource_Order_Grid_Collection
|
| 14 |
+
{
|
| 15 |
+
}
|
app/code/community/Magemaven/OrderComment/Model/Observer.php
CHANGED
|
@@ -1,34 +1,34 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
-
* It is also available through the world-wide-web at this URL:
|
| 6 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
-
*
|
| 8 |
-
* @category Magemaven
|
| 9 |
-
* @package Magemaven_OrderComment
|
| 10 |
-
* @copyright Copyright (c) 2011 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
-
*/
|
| 13 |
-
class Magemaven_OrderComment_Model_Observer extends Varien_Object
|
| 14 |
-
{
|
| 15 |
-
/**
|
| 16 |
-
* Save comment from agreement form to order
|
| 17 |
-
*
|
| 18 |
-
* @param $observer
|
| 19 |
-
*/
|
| 20 |
-
public function saveOrderComment($observer)
|
| 21 |
-
{
|
| 22 |
-
$orderComment = Mage::app()->getRequest()->getPost('ordercomment');
|
| 23 |
-
if (is_array($orderComment) && isset($orderComment['comment'])) {
|
| 24 |
-
$comment = trim($orderComment['comment']);
|
| 25 |
-
|
| 26 |
-
if (!empty($comment)) {
|
| 27 |
-
$order = $observer->getEvent()->getOrder();
|
| 28 |
-
$order->setCustomerComment($comment);
|
| 29 |
-
$order->setCustomerNoteNotify(true);
|
| 30 |
-
$order->setCustomerNote($comment);
|
| 31 |
-
}
|
| 32 |
-
}
|
| 33 |
-
}
|
| 34 |
}
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category Magemaven
|
| 9 |
+
* @package Magemaven_OrderComment
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
class Magemaven_OrderComment_Model_Observer extends Varien_Object
|
| 14 |
+
{
|
| 15 |
+
/**
|
| 16 |
+
* Save comment from agreement form to order
|
| 17 |
+
*
|
| 18 |
+
* @param $observer
|
| 19 |
+
*/
|
| 20 |
+
public function saveOrderComment($observer)
|
| 21 |
+
{
|
| 22 |
+
$orderComment = Mage::app()->getRequest()->getPost('ordercomment');
|
| 23 |
+
if (is_array($orderComment) && isset($orderComment['comment'])) {
|
| 24 |
+
$comment = trim($orderComment['comment']);
|
| 25 |
+
|
| 26 |
+
if (!empty($comment)) {
|
| 27 |
+
$order = $observer->getEvent()->getOrder();
|
| 28 |
+
$order->setCustomerComment($comment);
|
| 29 |
+
$order->setCustomerNoteNotify(true);
|
| 30 |
+
$order->setCustomerNote($comment);
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
}
|
app/code/community/Magemaven/OrderComment/Model/Resource/Order/Grid/Collection.php
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category Magemaven
|
| 9 |
+
* @package Magemaven_OrderComment
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
class Magemaven_OrderComment_Model_Resource_Order_Grid_Collection extends Mage_Sales_Model_Mysql4_Order_Grid_Collection
|
| 14 |
+
{
|
| 15 |
+
/**
|
| 16 |
+
* Init collection select
|
| 17 |
+
*
|
| 18 |
+
* @return Mage_Core_Model_Resource_Db_Collection_Abstract
|
| 19 |
+
*/
|
| 20 |
+
protected function _initSelect()
|
| 21 |
+
{
|
| 22 |
+
parent::_initSelect();
|
| 23 |
+
|
| 24 |
+
// Join order comment
|
| 25 |
+
$this->getSelect()->joinLeft(
|
| 26 |
+
array('ordercomment_table' => $this->getTable('sales/order_status_history')),
|
| 27 |
+
'main_table.entity_id = ordercomment_table.parent_id AND ordercomment_table.comment IS NOT NULL',
|
| 28 |
+
'ordercomment_table.comment AS ordercomment'
|
| 29 |
+
)->group('main_table.entity_id');
|
| 30 |
+
|
| 31 |
+
return $this;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
}
|
app/code/community/Magemaven/OrderComment/etc/config.xml
CHANGED
|
@@ -1,63 +1,80 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 5 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 6 |
-
* It is also available through the world-wide-web at this URL:
|
| 7 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 8 |
-
*
|
| 9 |
-
* @category Magemaven
|
| 10 |
-
* @package Magemaven_OrderComment
|
| 11 |
-
* @copyright Copyright (c) 2011 Sergey Storchay <r8@r8.com.ua>
|
| 12 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 13 |
-
*/
|
| 14 |
-
-->
|
| 15 |
-
<config>
|
| 16 |
-
<modules>
|
| 17 |
-
<Magemaven_OrderComment>
|
| 18 |
-
<version>1.0.
|
| 19 |
-
</Magemaven_OrderComment>
|
| 20 |
-
</modules>
|
| 21 |
-
<global>
|
| 22 |
-
<models>
|
| 23 |
-
<ordercomment>
|
| 24 |
-
<class>Magemaven_OrderComment_Model</class>
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
<
|
| 30 |
-
</
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
<
|
| 45 |
-
<
|
| 46 |
-
<
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
</
|
| 51 |
-
</
|
| 52 |
-
</
|
| 53 |
-
<
|
| 54 |
-
<
|
| 55 |
-
<
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 5 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 6 |
+
* It is also available through the world-wide-web at this URL:
|
| 7 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 8 |
+
*
|
| 9 |
+
* @category Magemaven
|
| 10 |
+
* @package Magemaven_OrderComment
|
| 11 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 12 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 13 |
+
*/
|
| 14 |
+
-->
|
| 15 |
+
<config>
|
| 16 |
+
<modules>
|
| 17 |
+
<Magemaven_OrderComment>
|
| 18 |
+
<version>1.0.3.0</version>
|
| 19 |
+
</Magemaven_OrderComment>
|
| 20 |
+
</modules>
|
| 21 |
+
<global>
|
| 22 |
+
<models>
|
| 23 |
+
<ordercomment>
|
| 24 |
+
<class>Magemaven_OrderComment_Model</class>
|
| 25 |
+
<resourceModel>ordercomment_resource</resourceModel>
|
| 26 |
+
</ordercomment>
|
| 27 |
+
<ordercomment_resource>
|
| 28 |
+
<class>Magemaven_OrderComment_Model_Resource</class>
|
| 29 |
+
<deprecatedNode>ordercomment_mysql4</deprecatedNode>
|
| 30 |
+
</ordercomment_resource>
|
| 31 |
+
<sales_resource>
|
| 32 |
+
<rewrite>
|
| 33 |
+
<order_grid_collection>
|
| 34 |
+
Magemaven_OrderComment_Model_Mysql4_Order_Grid_Collection
|
| 35 |
+
</order_grid_collection>
|
| 36 |
+
</rewrite>
|
| 37 |
+
</sales_resource>
|
| 38 |
+
</models>
|
| 39 |
+
<helpers>
|
| 40 |
+
<ordercomment>
|
| 41 |
+
<class>Magemaven_OrderComment_Helper</class>
|
| 42 |
+
</ordercomment>
|
| 43 |
+
</helpers>
|
| 44 |
+
<blocks>
|
| 45 |
+
<ordercomment>
|
| 46 |
+
<class>Magemaven_OrderComment_Block</class>
|
| 47 |
+
</ordercomment>
|
| 48 |
+
<checkout>
|
| 49 |
+
<rewrite>
|
| 50 |
+
<agreements>Magemaven_OrderComment_Block_Checkout_Agreements</agreements>
|
| 51 |
+
</rewrite>
|
| 52 |
+
</checkout>
|
| 53 |
+
<adminhtml>
|
| 54 |
+
<rewrite>
|
| 55 |
+
<sales_order_grid>Magemaven_OrderComment_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
|
| 56 |
+
</rewrite>
|
| 57 |
+
</adminhtml>
|
| 58 |
+
</blocks>
|
| 59 |
+
</global>
|
| 60 |
+
<frontend>
|
| 61 |
+
<events>
|
| 62 |
+
<checkout_type_onepage_save_order>
|
| 63 |
+
<observers>
|
| 64 |
+
<saveCustomerComment>
|
| 65 |
+
<class>Magemaven_OrderComment_Model_Observer</class>
|
| 66 |
+
<method>saveOrderComment</method>
|
| 67 |
+
</saveCustomerComment>
|
| 68 |
+
</observers>
|
| 69 |
+
</checkout_type_onepage_save_order>
|
| 70 |
+
<checkout_type_multishipping_create_orders_single>
|
| 71 |
+
<observers>
|
| 72 |
+
<saveCustomerComment>
|
| 73 |
+
<class>Magemaven_OrderComment_Model_Observer</class>
|
| 74 |
+
<method>saveOrderComment</method>
|
| 75 |
+
</saveCustomerComment>
|
| 76 |
+
</observers>
|
| 77 |
+
</checkout_type_multishipping_create_orders_single>
|
| 78 |
+
</events>
|
| 79 |
+
</frontend>
|
| 80 |
+
</config>
|
app/design/frontend/base/default/template/ordercomment/checkout/agreements.phtml
CHANGED
|
@@ -1,50 +1,50 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
-
* It is also available through the world-wide-web at this URL:
|
| 6 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
-
*
|
| 8 |
-
* @category design
|
| 9 |
-
* @package base_default
|
| 10 |
-
* @copyright Copyright (c) 2011 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
-
*/
|
| 13 |
-
?>
|
| 14 |
-
<form action="" id="checkout-agreements" onsubmit="return false;">
|
| 15 |
-
<div class="buttons-set">
|
| 16 |
-
<ul class="form-list">
|
| 17 |
-
<li>
|
| 18 |
-
<fieldset>
|
| 19 |
-
<ul>
|
| 20 |
-
<li class="wide">
|
| 21 |
-
<label for="ordercomment-comment"><?php echo Mage::helper('ordercomment')->__('Order Comment') ?></label>
|
| 22 |
-
<div class="input-box">
|
| 23 |
-
<textarea id="ordercomment-comment" class="input-text validation-passed" name="ordercomment[comment]" title="<?php echo $this->__('Order Comment') ?>" rows="5" cols="10"></textarea>
|
| 24 |
-
</div>
|
| 25 |
-
</li>
|
| 26 |
-
</ul>
|
| 27 |
-
</fieldset>
|
| 28 |
-
</li>
|
| 29 |
-
</ul>
|
| 30 |
-
</div>
|
| 31 |
-
|
| 32 |
-
<?php if ($this->getAgreements()): ?>
|
| 33 |
-
<ol class="checkout-agreements">
|
| 34 |
-
<?php foreach ($this->getAgreements() as $_a): ?>
|
| 35 |
-
<li>
|
| 36 |
-
<div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
|
| 37 |
-
<?php if ($_a->getIsHtml()):?>
|
| 38 |
-
<?php echo $_a->getContent() ?>
|
| 39 |
-
<?php else:?>
|
| 40 |
-
<?php echo nl2br($this->htmlEscape($_a->getContent())) ?>
|
| 41 |
-
<?php endif; ?>
|
| 42 |
-
</div>
|
| 43 |
-
<p class="agree">
|
| 44 |
-
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->htmlEscape($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->htmlEscape($_a->getCheckboxText()) ?></label>
|
| 45 |
-
</p>
|
| 46 |
-
</li>
|
| 47 |
-
<?php endforeach ?>
|
| 48 |
-
</ol>
|
| 49 |
-
<?php endif; ?>
|
| 50 |
-
</form>
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 4 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 5 |
+
* It is also available through the world-wide-web at this URL:
|
| 6 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 7 |
+
*
|
| 8 |
+
* @category design
|
| 9 |
+
* @package base_default
|
| 10 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 11 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 12 |
+
*/
|
| 13 |
+
?>
|
| 14 |
+
<form action="" id="checkout-agreements" onsubmit="return false;">
|
| 15 |
+
<div class="buttons-set">
|
| 16 |
+
<ul class="form-list">
|
| 17 |
+
<li>
|
| 18 |
+
<fieldset>
|
| 19 |
+
<ul>
|
| 20 |
+
<li class="wide">
|
| 21 |
+
<label for="ordercomment-comment"><?php echo Mage::helper('ordercomment')->__('Order Comment') ?></label>
|
| 22 |
+
<div class="input-box">
|
| 23 |
+
<textarea id="ordercomment-comment" class="input-text validation-passed" name="ordercomment[comment]" title="<?php echo $this->__('Order Comment') ?>" rows="5" cols="10"></textarea>
|
| 24 |
+
</div>
|
| 25 |
+
</li>
|
| 26 |
+
</ul>
|
| 27 |
+
</fieldset>
|
| 28 |
+
</li>
|
| 29 |
+
</ul>
|
| 30 |
+
</div>
|
| 31 |
+
|
| 32 |
+
<?php if ($this->getAgreements()): ?>
|
| 33 |
+
<ol class="checkout-agreements">
|
| 34 |
+
<?php foreach ($this->getAgreements() as $_a): ?>
|
| 35 |
+
<li>
|
| 36 |
+
<div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
|
| 37 |
+
<?php if ($_a->getIsHtml()):?>
|
| 38 |
+
<?php echo $_a->getContent() ?>
|
| 39 |
+
<?php else:?>
|
| 40 |
+
<?php echo nl2br($this->htmlEscape($_a->getContent())) ?>
|
| 41 |
+
<?php endif; ?>
|
| 42 |
+
</div>
|
| 43 |
+
<p class="agree">
|
| 44 |
+
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->htmlEscape($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->htmlEscape($_a->getCheckboxText()) ?></label>
|
| 45 |
+
</p>
|
| 46 |
+
</li>
|
| 47 |
+
<?php endforeach ?>
|
| 48 |
+
</ol>
|
| 49 |
+
<?php endif; ?>
|
| 50 |
+
</form>
|
app/etc/modules/Magemaven_OrderComment.xml
CHANGED
|
@@ -1,25 +1,25 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 5 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 6 |
-
* It is also available through the world-wide-web at this URL:
|
| 7 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 8 |
-
*
|
| 9 |
-
* @category Magemaven
|
| 10 |
-
* @package Magemaven_OrderComment
|
| 11 |
-
* @copyright Copyright (c) 2011 Sergey Storchay <r8@r8.com.ua>
|
| 12 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 13 |
-
*/
|
| 14 |
-
-->
|
| 15 |
-
<config>
|
| 16 |
-
<modules>
|
| 17 |
-
<Magemaven_OrderComment>
|
| 18 |
-
<active>true</active>
|
| 19 |
-
<codePool>community</codePool>
|
| 20 |
-
<depends>
|
| 21 |
-
<Mage_Checkout />
|
| 22 |
-
</depends>
|
| 23 |
-
</Magemaven_OrderComment>
|
| 24 |
-
</modules>
|
| 25 |
-
</config>
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 5 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 6 |
+
* It is also available through the world-wide-web at this URL:
|
| 7 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 8 |
+
*
|
| 9 |
+
* @category Magemaven
|
| 10 |
+
* @package Magemaven_OrderComment
|
| 11 |
+
* @copyright Copyright (c) 2011-2012 Sergey Storchay <r8@r8.com.ua>
|
| 12 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 13 |
+
*/
|
| 14 |
+
-->
|
| 15 |
+
<config>
|
| 16 |
+
<modules>
|
| 17 |
+
<Magemaven_OrderComment>
|
| 18 |
+
<active>true</active>
|
| 19 |
+
<codePool>community</codePool>
|
| 20 |
+
<depends>
|
| 21 |
+
<Mage_Checkout />
|
| 22 |
+
</depends>
|
| 23 |
+
</Magemaven_OrderComment>
|
| 24 |
+
</modules>
|
| 25 |
+
</config>
|
package.xml
CHANGED
|
@@ -1,18 +1,20 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Magemaven_OrderComment</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/academic.php">AFL 3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Optional comment for customer orders.</summary>
|
| 10 |
<description>Allows customer to specify optional comment during order placing.</description>
|
| 11 |
-
<notes>
|
|
|
|
|
|
|
| 12 |
<authors><author><name>Sergey Storchay</name><user>magemaven</user><email>r8@r8.com.ua</email></author></authors>
|
| 13 |
-
<date>
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Magemaven_OrderComment.xml" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Magemaven_OrderComment</name>
|
| 4 |
+
<version>1.0.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/academic.php">AFL 3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Optional comment for customer orders.</summary>
|
| 10 |
<description>Allows customer to specify optional comment during order placing.</description>
|
| 11 |
+
<notes>Added order comment column to orders grid
|
| 12 |
+
Tested and updated to work with Magento 1.4
|
| 13 |
+
Tested and updated to work with Magento 1.5</notes>
|
| 14 |
<authors><author><name>Sergey Storchay</name><user>magemaven</user><email>r8@r8.com.ua</email></author></authors>
|
| 15 |
+
<date>2012-02-19</date>
|
| 16 |
+
<time>17:23:01</time>
|
| 17 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Magemaven_OrderComment.xml" hash="1722cb37ea9d60fcd2d540f705cf5dfb"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ordercomment"><dir name="checkout"><file name="agreements.phtml" hash="19c7a999d95179511b43855993c7e224"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Magemaven"><dir name="OrderComment"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="a3f02c096eb7d405c90aa0457b72ff83"/></dir></dir></dir><dir name="Checkout"><file name="Agreements.php" hash="eb070d363d8d2e95681925d05f0730a7"/></dir></dir><dir name="Helper"><file name="Data.php" hash="210fa2d4d4c47dc41d0dc8c9d9a64a3e"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Order"><dir name="Grid"><file name="Collection.php" hash="d9cd9897fa42c4075b41d139b64892e4"/></dir></dir></dir><file name="Observer.php" hash="7dccb4842a7b9ac6b22c1622f78ab5e4"/><dir name="Resource"><dir name="Order"><dir name="Grid"><file name="Collection.php" hash="737ec71a824a44470d3948e27cc62cff"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5284802844c3ac456631d228f6ba178a"/></dir></dir></dir></target></contents>
|
| 18 |
<compatible/>
|
| 19 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 20 |
</package>
|
