Version Notes
First stable release.
Download this release
Release Info
Developer | Sitewards Magento Team |
Extension | Sitewards_DeliveryDate |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/community/Sitewards/DeliveryDate/Block/Onepage/Billing.php +6 -0
- app/code/community/Sitewards/DeliveryDate/Helper/Data.php +38 -0
- app/code/community/Sitewards/DeliveryDate/Model/Observer.php +165 -0
- app/code/community/Sitewards/DeliveryDate/Model/Order.php +56 -0
- app/code/community/Sitewards/DeliveryDate/Model/Quote.php +56 -0
- app/code/community/Sitewards/DeliveryDate/Model/Resource/Abstract.php +104 -0
- app/code/community/Sitewards/DeliveryDate/Model/Resource/Order.php +45 -0
- app/code/community/Sitewards/DeliveryDate/Model/Resource/Order/Collection.php +21 -0
- app/code/community/Sitewards/DeliveryDate/Model/Resource/Quote.php +45 -0
- app/code/community/Sitewards/DeliveryDate/Model/Resource/Quote/Collection.php +21 -0
- app/code/community/Sitewards/DeliveryDate/Test/Helper/Data.php +25 -0
- app/code/community/Sitewards/DeliveryDate/Test/Helper/Data/fixtures/testIsExtensionActive.yaml +2 -0
- app/code/community/Sitewards/DeliveryDate/etc/adminhtml.xml +33 -0
- app/code/community/Sitewards/DeliveryDate/etc/config.xml +134 -0
- app/code/community/Sitewards/DeliveryDate/etc/system.xml +47 -0
- app/code/community/Sitewards/DeliveryDate/sql/deliverydate_setup/install-0.1.0.php +100 -0
- app/design/adminhtml/default/default/layout/sitewards/deliverydate.xml +20 -0
- app/design/adminhtml/default/default/template/sitewards/deliverydate/sales/order/view/info.phtml +167 -0
- app/design/frontend/base/default/layout/sitewards/deliverydate.xml +157 -0
- app/design/frontend/base/default/template/sitewards/deliverydate/onepage/shipping_method/additional.phtml +34 -0
- app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/info.phtml +90 -0
- app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print.phtml +74 -0
- app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print/creditmemo.phtml +87 -0
- app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print/invoice.phtml +83 -0
- app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print/shipment.phtml +86 -0
- app/etc/modules/Sitewards_DeliveryDate.xml +25 -0
- app/locale/de_DE/Sitewards_DeliveryDate.csv +4 -0
- app/locale/en_US/Sitewards_DeliveryDate.csv +4 -0
- js/sitewards/deliverydate.js +143 -0
- package.xml +22 -0
app/code/community/Sitewards/DeliveryDate/Block/Onepage/Billing.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Sitewards_DeliveryDate_Block_Onepage_Billing extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Helper/Data.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Helper_Data
|
5 |
+
* - Helper containing the checks for
|
6 |
+
* - extension is active
|
7 |
+
*
|
8 |
+
* @category Sitewards
|
9 |
+
* @package Sitewards_DeliveryDate
|
10 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
11 |
+
*/
|
12 |
+
class Sitewards_DeliveryDate_Helper_Data extends Mage_Core_Helper_Abstract
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Path for the config for extension active status
|
16 |
+
*/
|
17 |
+
const CONFIG_EXTENSION_ACTIVE = 'deliverydate/generalsettings/active';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Variable for if the extension is active
|
21 |
+
*
|
22 |
+
* @var bool
|
23 |
+
*/
|
24 |
+
protected $bExtensionActive;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Check to see if the extension is active
|
28 |
+
*
|
29 |
+
* @return bool
|
30 |
+
*/
|
31 |
+
public function isExtensionActive()
|
32 |
+
{
|
33 |
+
if ($this->bExtensionActive === null) {
|
34 |
+
$this->bExtensionActive = Mage::getStoreConfigFlag(self::CONFIG_EXTENSION_ACTIVE);
|
35 |
+
}
|
36 |
+
return $this->bExtensionActive;
|
37 |
+
}
|
38 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Observer.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Observer
|
5 |
+
* - Observer containing the following event methods
|
6 |
+
* - salesQuoteSaveBefore - get delivery date from the post and set it to the quote
|
7 |
+
* - salesQuoteSaveAfter - when saving the quote also save the delivery date
|
8 |
+
* - salesQuoteLoadAfter - when loading the quote also load the delivery date
|
9 |
+
* - salesModelServiceQuoteSubmitAfter - when saving the order also save the delivery date
|
10 |
+
* - salesOrderLoadAfter - when loading the order also load the delivery date
|
11 |
+
*
|
12 |
+
* @category Sitewards
|
13 |
+
* @package Sitewards_DeliveryDate
|
14 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
15 |
+
*/
|
16 |
+
class Sitewards_DeliveryDate_Model_Observer
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* This function is called just before $quote object get stored to database.
|
20 |
+
* Here, from POST data, we capture our custom field and put it in the quote object
|
21 |
+
*
|
22 |
+
* @param Varien_Event_Observer $oObserver
|
23 |
+
*/
|
24 |
+
public function salesQuoteSaveBefore(Varien_Event_Observer $oObserver)
|
25 |
+
{
|
26 |
+
if ($this->isExtensionActive()) {
|
27 |
+
$oQuote = $oObserver->getQuote();
|
28 |
+
$aPost = Mage::app()->getFrontController()->getRequest()->getPost();
|
29 |
+
if (isset($aPost['sitewards']['delivery_date'])) {
|
30 |
+
$sVar = $aPost['sitewards']['delivery_date'];
|
31 |
+
$oQuote->setDeliveryDate($sVar);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* This function is called, just after $quote object get saved to database.
|
38 |
+
* Here, after the quote object gets saved in database
|
39 |
+
* we save our custom field in the our table created i.e sales_quote_custom
|
40 |
+
*
|
41 |
+
* @param Varien_Event_Observer $oObserver
|
42 |
+
*/
|
43 |
+
public function salesQuoteSaveAfter(Varien_Event_Observer $oObserver)
|
44 |
+
{
|
45 |
+
if ($this->isExtensionActive()) {
|
46 |
+
/** @var Mage_Sales_Model_Quote $oQuote */
|
47 |
+
$oQuote = $oObserver->getQuote();
|
48 |
+
if ($this->hasDeliveryDate($oQuote)) {
|
49 |
+
$sDeliveryDate = $oQuote->getDeliveryDate();
|
50 |
+
|
51 |
+
/** @var Sitewards_DeliveryDate_Model_Quote $oModel */
|
52 |
+
$oModel = Mage::getModel('sitewards_deliverydate/quote');
|
53 |
+
$this->saveObject($oModel, $oQuote->getId(), $sDeliveryDate);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* This function is called after order gets saved to database.
|
60 |
+
* Here we transfer our custom fields from quote table to order table i.e sales_order_custom
|
61 |
+
*
|
62 |
+
* @param Varien_Event_Observer $oObserver
|
63 |
+
*/
|
64 |
+
public function salesModelServiceQuoteSubmitAfter(Varien_Event_Observer $oObserver)
|
65 |
+
{
|
66 |
+
if ($this->isExtensionActive()) {
|
67 |
+
$oQuote = $oObserver->getQuote();
|
68 |
+
if ($this->hasDeliveryDate($oQuote)) {
|
69 |
+
$sDeliveryDate = $oQuote->getDeliveryDate();
|
70 |
+
$oOrder = $oObserver->getOrder();
|
71 |
+
|
72 |
+
/** @var Sitewards_DeliveryDate_Model_Order $oModel */
|
73 |
+
$oModel = Mage::getModel('sitewards_deliverydate/order');
|
74 |
+
$this->saveObject($oModel, $oOrder->getId(), $sDeliveryDate);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* When load() function is called on the quote object,
|
81 |
+
* we read our custom fields value from database and put them back in quote object.
|
82 |
+
*
|
83 |
+
* @param Varien_Event_Observer $oObserver
|
84 |
+
*/
|
85 |
+
public function salesQuoteLoadAfter(Varien_Event_Observer $oObserver)
|
86 |
+
{
|
87 |
+
if ($this->isExtensionActive()) {
|
88 |
+
$oQuote = $oObserver->getQuote();
|
89 |
+
|
90 |
+
/** @var Sitewards_DeliveryDate_Model_Quote $oModel */
|
91 |
+
$oModel = Mage::getModel('sitewards_deliverydate/quote');
|
92 |
+
$this->addInformationToObject($oQuote, $oModel);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* This function is called when $order->load() is done.
|
98 |
+
* Here we read our custom fields value from database and set it in order object.
|
99 |
+
*
|
100 |
+
* @param Varien_Event_Observer $oObserver
|
101 |
+
*/
|
102 |
+
public function salesOrderLoadAfter(Varien_Event_Observer $oObserver)
|
103 |
+
{
|
104 |
+
if ($this->isExtensionActive()) {
|
105 |
+
$oOrder = $oObserver->getOrder();
|
106 |
+
|
107 |
+
/** @var Sitewards_DeliveryDate_Model_Order $oModel */
|
108 |
+
$oModel = Mage::getModel('sitewards_deliverydate/order');
|
109 |
+
$this->addInformationToObject($oOrder, $oModel);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Check to see if the extension is active before doing anything
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
protected function isExtensionActive()
|
119 |
+
{
|
120 |
+
return Mage::helper('sitewards_deliverydate')->isExtensionActive();
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Check to see if the quote has a delivery date set
|
125 |
+
*
|
126 |
+
* @param Mage_Sales_Model_Quote $oQuote
|
127 |
+
* @return bool
|
128 |
+
*/
|
129 |
+
protected function hasDeliveryDate($oQuote)
|
130 |
+
{
|
131 |
+
$sDeliveryDate = $oQuote->getDeliveryDate();
|
132 |
+
return $sDeliveryDate !== null
|
133 |
+
|| $sDeliveryDate !== '';
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Given a model and id load the information from the database into this model
|
138 |
+
*
|
139 |
+
* @param Mage_Sales_Model_Order|Mage_Sales_Model_Quote $oObject
|
140 |
+
* @param Sitewards_DeliveryDate_Model_Quote|Sitewards_DeliveryDate_Model_Order $oModel
|
141 |
+
*/
|
142 |
+
protected function addInformationToObject($oObject, $oModel)
|
143 |
+
{
|
144 |
+
$aData = $oModel->getByObject($oObject->getId());
|
145 |
+
foreach ($aData as $sKey => $sValue) {
|
146 |
+
$oObject->setData($sKey, $sValue);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* From an object delete old values and save options
|
152 |
+
*
|
153 |
+
* @param Sitewards_DeliveryDate_Model_Quote|Sitewards_DeliveryDate_Model_Order $oModel
|
154 |
+
* @param int $iObjectId
|
155 |
+
* @param string $sDeliveryDate
|
156 |
+
*/
|
157 |
+
protected function saveObject($oModel, $iObjectId, $sDeliveryDate)
|
158 |
+
{
|
159 |
+
$oModel->deleteByObject($iObjectId, 'delivery_date');
|
160 |
+
$oModel->setObjectId($iObjectId);
|
161 |
+
$oModel->setKey('delivery_date');
|
162 |
+
$oModel->setValue($sDeliveryDate);
|
163 |
+
$oModel->save();
|
164 |
+
}
|
165 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Order.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Order
|
5 |
+
* - Basic file for the order table for the delivery date information
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
class Sitewards_DeliveryDate_Model_Order extends Mage_Core_Model_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Set-up the table information
|
15 |
+
*/
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
+
parent::_construct();
|
19 |
+
$this->_init('sitewards_deliverydate/order');
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Delete value based on order and key information
|
24 |
+
*
|
25 |
+
* @param int $iOrderId
|
26 |
+
* @param string $sKey
|
27 |
+
*/
|
28 |
+
public function deleteByObject($iOrderId, $sKey)
|
29 |
+
{
|
30 |
+
$this->_getResource()->deleteByObject($iOrderId, $sKey);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Load the values based on order and key information
|
35 |
+
*
|
36 |
+
* @param int $iOrderId
|
37 |
+
* @param string $sKey
|
38 |
+
* @return string[]
|
39 |
+
*/
|
40 |
+
public function getByObject($iOrderId, $sKey = '')
|
41 |
+
{
|
42 |
+
return $this->_getResource()->getByObject($iOrderId, $sKey);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set the order id from the object id
|
47 |
+
*
|
48 |
+
* @param int $iObjectId
|
49 |
+
* @return $this
|
50 |
+
*/
|
51 |
+
public function setObjectId($iObjectId)
|
52 |
+
{
|
53 |
+
$this->setOrderId($iObjectId);
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Quote.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Quote
|
5 |
+
* - Basic file for the quote table for the delivery date information
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
class Sitewards_DeliveryDate_Model_Quote extends Mage_Core_Model_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Set-up the table information
|
15 |
+
*/
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
+
parent::_construct();
|
19 |
+
$this->_init('sitewards_deliverydate/quote');
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Delete value based on quote and key information
|
24 |
+
*
|
25 |
+
* @param int $iQuoteId
|
26 |
+
* @param string $sKey
|
27 |
+
*/
|
28 |
+
public function deleteByObject($iQuoteId, $sKey)
|
29 |
+
{
|
30 |
+
$this->_getResource()->deleteByObject($iQuoteId, $sKey);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Load the values based on quote and key information
|
35 |
+
*
|
36 |
+
* @param int $iQuoteId
|
37 |
+
* @param string $sKey
|
38 |
+
* @return string[]
|
39 |
+
*/
|
40 |
+
public function getByObject($iQuoteId, $sKey = '')
|
41 |
+
{
|
42 |
+
return $this->_getResource()->getByObject($iQuoteId, $sKey);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set the quote id from the object id
|
47 |
+
*
|
48 |
+
* @param int $iObjectId
|
49 |
+
* @return $this
|
50 |
+
*/
|
51 |
+
public function setObjectId($iObjectId)
|
52 |
+
{
|
53 |
+
$this->setQuoteId($iObjectId);
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Resource/Abstract.php
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Resource_Abstract
|
5 |
+
* - core functionality for adding and removing resources
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
abstract class Sitewards_DeliveryDate_Model_Resource_Abstract extends Mage_Core_Model_Resource_Db_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Constant for the key option
|
15 |
+
*/
|
16 |
+
const S_KEY_ATTRIBUTE = 'key';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Constant for the order id
|
20 |
+
*/
|
21 |
+
const S_ORDER_ATTRIBUTE = 'order_id';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Constant for the quote id
|
25 |
+
*/
|
26 |
+
const S_QUOTE_ATTRIBUTE = 'quote_id';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* For a given attribute code and value create a sql safe string
|
30 |
+
*
|
31 |
+
* @param string $sAttribute
|
32 |
+
* @param string|int $mValue
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
protected function getWhere($sAttribute, $mValue)
|
36 |
+
{
|
37 |
+
return $this->_getWriteAdapter()->quoteInto('`'.$sAttribute . '` = ?', $mValue);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Build the sql object from a table and where string
|
42 |
+
*
|
43 |
+
* @param string $sTable
|
44 |
+
* @param string $sWhere
|
45 |
+
* @return Varien_Db_Select
|
46 |
+
*/
|
47 |
+
protected function getSql($sTable, $sWhere)
|
48 |
+
{
|
49 |
+
return $this->_getReadAdapter()->select()->from($sTable)->where($sWhere);
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Format an array in key => value
|
54 |
+
*
|
55 |
+
* @param Varien_Db_Select $oSql
|
56 |
+
* @return string[]
|
57 |
+
*/
|
58 |
+
protected function getFormattedReturn($oSql)
|
59 |
+
{
|
60 |
+
$aRows = $this->_getReadAdapter()->fetchAll($oSql);
|
61 |
+
$aReturn = array();
|
62 |
+
foreach ($aRows as $row) {
|
63 |
+
$aReturn[$row['key']] = $row['value'];
|
64 |
+
}
|
65 |
+
return $aReturn;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* For a given table, attribute code, value and key delete the row
|
70 |
+
*
|
71 |
+
* @param string $sTable
|
72 |
+
* @param string $sAttributeCode
|
73 |
+
* @param int $iAttributeValue
|
74 |
+
* @param string $sKey
|
75 |
+
*/
|
76 |
+
public function deleteItem($sTable, $sAttributeCode, $iAttributeValue, $sKey)
|
77 |
+
{
|
78 |
+
$sOrderIdWhere = $this->getWhere($sAttributeCode, $iAttributeValue);
|
79 |
+
$sKeyWhere = $this->getWhere(self::S_KEY_ATTRIBUTE, $sKey);
|
80 |
+
$sWhere = $sOrderIdWhere . ' AND ' . $sKeyWhere;
|
81 |
+
|
82 |
+
$this->_getWriteAdapter()->delete($sTable, $sWhere);
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* For a given table, attribute code, value and key delete the row
|
87 |
+
*
|
88 |
+
* @param string $sTable
|
89 |
+
* @param string $sAttributeCode
|
90 |
+
* @param int $iAttributeValue
|
91 |
+
* @param string $sKey
|
92 |
+
* @return string[]
|
93 |
+
*/
|
94 |
+
public function getItem($sTable, $sAttributeCode, $iAttributeValue, $sKey = '')
|
95 |
+
{
|
96 |
+
$sWhere = $this->getWhere($sAttributeCode, $iAttributeValue);
|
97 |
+
if (!empty($sKey)) {
|
98 |
+
$sWhere .= ' AND ' . $this->getWhere(self::S_KEY_ATTRIBUTE, $sKey);
|
99 |
+
}
|
100 |
+
|
101 |
+
$oSql = $this->getSql($sTable, $sWhere);
|
102 |
+
return $this->getFormattedReturn($oSql);
|
103 |
+
}
|
104 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Resource/Order.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Resource_Order
|
5 |
+
* - Basic file for the order table resource for the delivery date information
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
class Sitewards_DeliveryDate_Model_Resource_Order extends Sitewards_DeliveryDate_Model_Resource_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Set-up table information
|
15 |
+
*/
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
+
$this->_init('sitewards_deliverydate/order', 'id');
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Delete an entry based on order and key information
|
23 |
+
*
|
24 |
+
* @param int $iOrderId
|
25 |
+
* @param string $sKey
|
26 |
+
*/
|
27 |
+
public function deleteByObject($iOrderId, $sKey)
|
28 |
+
{
|
29 |
+
$sTable = $this->getMainTable();
|
30 |
+
$this->deleteItem($sTable, self::S_ORDER_ATTRIBUTE, $iOrderId, $sKey);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get and entry based on order and key information
|
35 |
+
*
|
36 |
+
* @param int $iOrderId
|
37 |
+
* @param string $sKey
|
38 |
+
* @return string[]
|
39 |
+
*/
|
40 |
+
public function getByObject($iOrderId, $sKey = '')
|
41 |
+
{
|
42 |
+
$sTable = $this->getMainTable();
|
43 |
+
return $this->getItem($sTable, self::S_ORDER_ATTRIBUTE, $iOrderId, $sKey);
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Resource/Order/Collection.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Resource_Order_Collection
|
5 |
+
* - Basic file for the order table collection for the delivery date information
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
class Sitewards_DeliveryDate_Model_Resource_Order_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Set-up the table information
|
15 |
+
*/
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
+
parent::_construct();
|
19 |
+
$this->_init('sitewards_deliverydate/order');
|
20 |
+
}
|
21 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Resource/Quote.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Resource_Quote
|
5 |
+
* - Basic file for the quote table resource for the delivery date information
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
class Sitewards_DeliveryDate_Model_Resource_Quote extends Sitewards_DeliveryDate_Model_Resource_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Set-up link to the table
|
15 |
+
*/
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
+
$this->_init('sitewards_deliverydate/quote', 'id');
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Delete an entry based on quote and key information
|
23 |
+
*
|
24 |
+
* @param int $iQuoteId
|
25 |
+
* @param string $sKey
|
26 |
+
*/
|
27 |
+
public function deleteByObject($iQuoteId, $sKey)
|
28 |
+
{
|
29 |
+
$sTable = $this->getMainTable();
|
30 |
+
$this->deleteItem($sTable, self::S_QUOTE_ATTRIBUTE, $iQuoteId, $sKey);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get an entry based on quote and key information
|
35 |
+
*
|
36 |
+
* @param int $iQuoteId
|
37 |
+
* @param string $sKey
|
38 |
+
* @return string[]
|
39 |
+
*/
|
40 |
+
public function getByObject($iQuoteId, $sKey = '')
|
41 |
+
{
|
42 |
+
$sTable = $this->getMainTable();
|
43 |
+
return $this->getItem($sTable, self::S_QUOTE_ATTRIBUTE, $iQuoteId, $sKey);
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Model/Resource/Quote/Collection.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate_Model_Resource_Quote_Collection
|
5 |
+
* - Basic file for the quote table collection for the delivery date information
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
class Sitewards_DeliveryDate_Model_Resource_Quote_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Set-up the table information
|
15 |
+
*/
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
+
parent::_construct();
|
19 |
+
$this->_init('sitewards_deliverydate/quote');
|
20 |
+
}
|
21 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Test/Helper/Data.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Test for class Sitewards_DeliveryDate_Helper_Data
|
5 |
+
*
|
6 |
+
* @category Sitewards
|
7 |
+
* @package Sitewards_DeliveryDate
|
8 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
9 |
+
*/
|
10 |
+
class Sitewards_DeliveryDate_Test_Helper_Data extends EcomDev_PHPUnit_Test_Case
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Tests is extension active
|
14 |
+
*
|
15 |
+
* @test
|
16 |
+
* @loadFixture
|
17 |
+
*/
|
18 |
+
public function testIsExtensionActive()
|
19 |
+
{
|
20 |
+
$this->assertTrue(
|
21 |
+
Mage::helper('sitewards_deliverydate')->isExtensionActive(),
|
22 |
+
'Extension is not active please check config'
|
23 |
+
);
|
24 |
+
}
|
25 |
+
}
|
app/code/community/Sitewards/DeliveryDate/Test/Helper/Data/fixtures/testIsExtensionActive.yaml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/deliverydate/generalsettings/active: 1
|
app/code/community/Sitewards/DeliveryDate/etc/adminhtml.xml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* adminhtml.xml
|
5 |
+
* - create acl for this module
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<acl>
|
14 |
+
<resources>
|
15 |
+
<admin>
|
16 |
+
<children>
|
17 |
+
<system>
|
18 |
+
<children>
|
19 |
+
<config>
|
20 |
+
<children>
|
21 |
+
<deliverydate translate="title" module="sitewards_deliverydate">
|
22 |
+
<title>Delivery Date</title>
|
23 |
+
<sort_order>50</sort_order>
|
24 |
+
</deliverydate>
|
25 |
+
</children>
|
26 |
+
</config>
|
27 |
+
</children>
|
28 |
+
</system>
|
29 |
+
</children>
|
30 |
+
</admin>
|
31 |
+
</resources>
|
32 |
+
</acl>
|
33 |
+
</config>
|
app/code/community/Sitewards/DeliveryDate/etc/config.xml
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Sitewards_DeliveryDate>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Sitewards_DeliveryDate>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<sitewards_deliverydate>
|
11 |
+
<class>Sitewards_DeliveryDate_Block</class>
|
12 |
+
</sitewards_deliverydate>
|
13 |
+
</blocks>
|
14 |
+
<helpers>
|
15 |
+
<sitewards_deliverydate>
|
16 |
+
<class>Sitewards_DeliveryDate_Helper</class>
|
17 |
+
</sitewards_deliverydate>
|
18 |
+
</helpers>
|
19 |
+
<models>
|
20 |
+
<sitewards_deliverydate>
|
21 |
+
<class>Sitewards_DeliveryDate_Model</class>
|
22 |
+
<resourceModel>sitewards_deliverydate_resource</resourceModel>
|
23 |
+
</sitewards_deliverydate>
|
24 |
+
<sitewards_deliverydate_resource>
|
25 |
+
<class>Sitewards_DeliveryDate_Model_Resource</class>
|
26 |
+
<entities>
|
27 |
+
<quote>
|
28 |
+
<table>sales_quote_deliverydate</table>
|
29 |
+
</quote>
|
30 |
+
<order>
|
31 |
+
<table>sales_order_deliverydate</table>
|
32 |
+
</order>
|
33 |
+
</entities>
|
34 |
+
</sitewards_deliverydate_resource>
|
35 |
+
</models>
|
36 |
+
<resources>
|
37 |
+
<deliverydate_setup>
|
38 |
+
<setup>
|
39 |
+
<module>Sitewards_DeliveryDate</module>
|
40 |
+
</setup>
|
41 |
+
</deliverydate_setup>
|
42 |
+
</resources>
|
43 |
+
<events>
|
44 |
+
<sales_order_load_after>
|
45 |
+
<observers>
|
46 |
+
<sales_order_load_after>
|
47 |
+
<type>singleton</type>
|
48 |
+
<class>sitewards_deliverydate/observer</class>
|
49 |
+
<method>salesOrderLoadAfter</method>
|
50 |
+
</sales_order_load_after>
|
51 |
+
</observers>
|
52 |
+
</sales_order_load_after>
|
53 |
+
</events>
|
54 |
+
</global>
|
55 |
+
<frontend>
|
56 |
+
<translate>
|
57 |
+
<modules>
|
58 |
+
<Sitewards_DeliveryDate>
|
59 |
+
<files>
|
60 |
+
<default>Sitewards_DeliveryDate.csv</default>
|
61 |
+
</files>
|
62 |
+
</Sitewards_DeliveryDate>
|
63 |
+
</modules>
|
64 |
+
</translate>
|
65 |
+
<layout>
|
66 |
+
<updates>
|
67 |
+
<sitewards_deliverydate>
|
68 |
+
<file>sitewards/deliverydate.xml</file>
|
69 |
+
</sitewards_deliverydate>
|
70 |
+
</updates>
|
71 |
+
</layout>
|
72 |
+
<events>
|
73 |
+
<sales_quote_save_before>
|
74 |
+
<observers>
|
75 |
+
<sitewards_deliverydate>
|
76 |
+
<type>singleton</type>
|
77 |
+
<class>sitewards_deliverydate/observer</class>
|
78 |
+
<method>salesQuoteSaveBefore</method>
|
79 |
+
</sitewards_deliverydate>
|
80 |
+
</observers>
|
81 |
+
</sales_quote_save_before>
|
82 |
+
<sales_quote_save_after>
|
83 |
+
<observers>
|
84 |
+
<sitewards_deliverydate>
|
85 |
+
<type>singleton</type>
|
86 |
+
<class>sitewards_deliverydate/observer</class>
|
87 |
+
<method>salesQuoteSaveAfter</method>
|
88 |
+
</sitewards_deliverydate>
|
89 |
+
</observers>
|
90 |
+
</sales_quote_save_after>
|
91 |
+
<sales_quote_load_after>
|
92 |
+
<observers>
|
93 |
+
<sitewards_deliverydate>
|
94 |
+
<type>singleton</type>
|
95 |
+
<class>sitewards_deliverydate/observer</class>
|
96 |
+
<method>salesQuoteLoadAfter</method>
|
97 |
+
</sitewards_deliverydate>
|
98 |
+
</observers>
|
99 |
+
</sales_quote_load_after>
|
100 |
+
<sales_model_service_quote_submit_after>
|
101 |
+
<observers>
|
102 |
+
<sales_model_service_quote_submit_after>
|
103 |
+
<type>singleton</type>
|
104 |
+
<class>sitewards_deliverydate/observer</class>
|
105 |
+
<method>salesModelServiceQuoteSubmitAfter</method>
|
106 |
+
</sales_model_service_quote_submit_after>
|
107 |
+
</observers>
|
108 |
+
</sales_model_service_quote_submit_after>
|
109 |
+
</events>
|
110 |
+
</frontend>
|
111 |
+
<adminhtml>
|
112 |
+
<layout>
|
113 |
+
<updates>
|
114 |
+
<sitewards_deliverydate>
|
115 |
+
<file>sitewards/deliverydate.xml</file>
|
116 |
+
</sitewards_deliverydate>
|
117 |
+
</updates>
|
118 |
+
</layout>
|
119 |
+
</adminhtml>
|
120 |
+
<default>
|
121 |
+
<deliverydate>
|
122 |
+
<generalsettings>
|
123 |
+
<active>0</active>
|
124 |
+
</generalsettings>
|
125 |
+
</deliverydate>
|
126 |
+
</default>
|
127 |
+
<phpunit>
|
128 |
+
<suite>
|
129 |
+
<modules>
|
130 |
+
<Sitewards_DeliveryDate/>
|
131 |
+
</modules>
|
132 |
+
</suite>
|
133 |
+
</phpunit>
|
134 |
+
</config>
|
app/code/community/Sitewards/DeliveryDate/etc/system.xml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* sytem.xml
|
5 |
+
* - create admin config tab,
|
6 |
+
* - assign admin config fields to sections
|
7 |
+
*
|
8 |
+
* @category Sitewards
|
9 |
+
* @package Sitewards_DeliveryDate
|
10 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
11 |
+
*/
|
12 |
+
-->
|
13 |
+
<config>
|
14 |
+
<sections>
|
15 |
+
<deliverydate translate="label" module="sitewards_deliverydate">
|
16 |
+
<label>Delivery Date</label>
|
17 |
+
<tab>sales</tab>
|
18 |
+
<frontend_type>text</frontend_type>
|
19 |
+
<sort_order>990</sort_order>
|
20 |
+
<show_in_default>1</show_in_default>
|
21 |
+
<show_in_website>1</show_in_website>
|
22 |
+
<show_in_store>1</show_in_store>
|
23 |
+
<groups>
|
24 |
+
<generalsettings translate="label">
|
25 |
+
<label>General settings</label>
|
26 |
+
<frontend_type>text</frontend_type>
|
27 |
+
<sort_order>1</sort_order>
|
28 |
+
<show_in_default>1</show_in_default>
|
29 |
+
<show_in_website>1</show_in_website>
|
30 |
+
<show_in_store>1</show_in_store>
|
31 |
+
<fields>
|
32 |
+
<active translate="label,comment">
|
33 |
+
<label>Enable Delivery Date extension</label>
|
34 |
+
<frontend_type>select</frontend_type>
|
35 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
36 |
+
<sort_order>1</sort_order>
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>1</show_in_store>
|
40 |
+
<comment><![CDATA[Enable or disable extension.]]></comment>
|
41 |
+
</active>
|
42 |
+
</fields>
|
43 |
+
</generalsettings>
|
44 |
+
</groups>
|
45 |
+
</deliverydate>
|
46 |
+
</sections>
|
47 |
+
</config>
|
app/code/community/Sitewards/DeliveryDate/sql/deliverydate_setup/install-0.1.0.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** @var Mage_Core_Model_Resource_Setup $oInstaller */
|
3 |
+
$oInstaller = $this;
|
4 |
+
$oInstaller->startSetup();
|
5 |
+
|
6 |
+
$oConnection = $oInstaller->getConnection();
|
7 |
+
$sQuoteTable = $this->getTable('sales_quote_deliverydate');
|
8 |
+
if (!$oInstaller->tableExists($sQuoteTable)) {
|
9 |
+
$oQuoteTable = $oConnection
|
10 |
+
->newTable($sQuoteTable)
|
11 |
+
->addColumn(
|
12 |
+
'id',
|
13 |
+
Varien_Db_Ddl_Table::TYPE_INTEGER,
|
14 |
+
null,
|
15 |
+
array(
|
16 |
+
'identity' => true,
|
17 |
+
'unsigned' => true,
|
18 |
+
'nullable' => false,
|
19 |
+
'primary' => true,
|
20 |
+
),
|
21 |
+
'Quote Delivery Date Id'
|
22 |
+
)
|
23 |
+
->addColumn(
|
24 |
+
'quote_id',
|
25 |
+
Varien_Db_Ddl_Table::TYPE_INTEGER,
|
26 |
+
null,
|
27 |
+
array(
|
28 |
+
'nullable' => false
|
29 |
+
),
|
30 |
+
'Quote Id'
|
31 |
+
)
|
32 |
+
->addColumn(
|
33 |
+
'key',
|
34 |
+
Varien_Db_Ddl_Table::TYPE_TEXT,
|
35 |
+
'255',
|
36 |
+
array(
|
37 |
+
'nullable' => false
|
38 |
+
),
|
39 |
+
'Delivery Date Quote Key'
|
40 |
+
)
|
41 |
+
->addColumn(
|
42 |
+
'value',
|
43 |
+
Varien_Db_Ddl_Table::TYPE_TEXT,
|
44 |
+
null,
|
45 |
+
array(
|
46 |
+
'nullable' => false
|
47 |
+
),
|
48 |
+
'Delivery Date Quote Value'
|
49 |
+
)
|
50 |
+
->setComment('Delivery Date Quote');
|
51 |
+
$oConnection->createTable($oQuoteTable);
|
52 |
+
}
|
53 |
+
|
54 |
+
$sOrderTable = $this->getTable('sales_order_deliverydate');
|
55 |
+
if (!$oInstaller->tableExists($sOrderTable)) {
|
56 |
+
$oOrderTable = $oConnection
|
57 |
+
->newTable($sOrderTable)
|
58 |
+
->addColumn(
|
59 |
+
'id',
|
60 |
+
Varien_Db_Ddl_Table::TYPE_INTEGER,
|
61 |
+
null,
|
62 |
+
array(
|
63 |
+
'identity' => true,
|
64 |
+
'unsigned' => true,
|
65 |
+
'nullable' => false,
|
66 |
+
'primary' => true,
|
67 |
+
),
|
68 |
+
'Order Delivery Date Id'
|
69 |
+
)
|
70 |
+
->addColumn(
|
71 |
+
'order_id',
|
72 |
+
Varien_Db_Ddl_Table::TYPE_INTEGER,
|
73 |
+
null,
|
74 |
+
array(
|
75 |
+
'nullable' => false
|
76 |
+
),
|
77 |
+
'Order Id'
|
78 |
+
)
|
79 |
+
->addColumn(
|
80 |
+
'key',
|
81 |
+
Varien_Db_Ddl_Table::TYPE_TEXT,
|
82 |
+
'255',
|
83 |
+
array(
|
84 |
+
'nullable' => false
|
85 |
+
),
|
86 |
+
'Delivery Date Order Key'
|
87 |
+
)
|
88 |
+
->addColumn(
|
89 |
+
'value',
|
90 |
+
Varien_Db_Ddl_Table::TYPE_TEXT,
|
91 |
+
null,
|
92 |
+
array(
|
93 |
+
'nullable' => false
|
94 |
+
),
|
95 |
+
'Delivery Date Order Value'
|
96 |
+
)
|
97 |
+
->setComment('Delivery Date Order');
|
98 |
+
$oConnection->createTable($oOrderTable);
|
99 |
+
}
|
100 |
+
$oInstaller->endSetup();
|
app/design/adminhtml/default/default/layout/sitewards/deliverydate.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" ?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* layout.xml
|
5 |
+
* - for the admin section to display the delivery date on orders
|
6 |
+
*
|
7 |
+
* @category Sitewards
|
8 |
+
* @package Sitewards_DeliveryDate
|
9 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<layout version="0.1.0">
|
13 |
+
<adminhtml_sales_order_view>
|
14 |
+
<reference name="order_info">
|
15 |
+
<action method="setTemplate">
|
16 |
+
<template>sitewards/deliverydate/sales/order/view/info.phtml</template>
|
17 |
+
</action>
|
18 |
+
</reference>
|
19 |
+
</adminhtml_sales_order_view>
|
20 |
+
</layout>
|
app/design/adminhtml/default/default/template/sitewards/deliverydate/sales/order/view/info.phtml
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category design
|
5 |
+
* @package default_default
|
6 |
+
* @copyright Copyright (c) Sitewards GmbH (http://www.sitewards.com)
|
7 |
+
* @contact magento@sitewards.com
|
8 |
+
* @licence OSL-3.0
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php $_order = $this->getOrder() ?>
|
12 |
+
<?php
|
13 |
+
$orderAdminDate = $this->formatDate($_order->getCreatedAtDate(), 'medium', true);
|
14 |
+
$orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium', true);
|
15 |
+
?>
|
16 |
+
<div class="box-left">
|
17 |
+
<!--Order Information-->
|
18 |
+
<div class="entry-edit">
|
19 |
+
<?php if ($_order->getEmailSent()):
|
20 |
+
$_email = Mage::helper('sales')->__('the order confirmation email was sent');
|
21 |
+
else:
|
22 |
+
$_email = Mage::helper('sales')->__('the order confirmation email is not sent');
|
23 |
+
endif; ?>
|
24 |
+
<div class="entry-edit-head">
|
25 |
+
<?php if ($this->getNoUseOrderLink()): ?>
|
26 |
+
<h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?> (<?php echo $_email ?>)</h4>
|
27 |
+
<?php else: ?>
|
28 |
+
<a href="<?php echo $this->getViewUrl($_order->getId()) ?>"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?></a>
|
29 |
+
<strong>(<?php echo $_email ?>)</strong>
|
30 |
+
<?php endif; ?>
|
31 |
+
</div>
|
32 |
+
<div class="fieldset">
|
33 |
+
<table cellspacing="0" class="form-list">
|
34 |
+
<tr>
|
35 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Order Date') ?></label></td>
|
36 |
+
<td class="value"><strong><?php echo $orderAdminDate ?></strong></td>
|
37 |
+
</tr>
|
38 |
+
<?php if ($orderAdminDate != $orderStoreDate):?>
|
39 |
+
<tr>
|
40 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Order Date (%s)', $_order->getCreatedAtStoreDate()->getTimezone()) ?></label></td>
|
41 |
+
<td class="value"><strong><?php echo $orderStoreDate ?></strong></td>
|
42 |
+
</tr>
|
43 |
+
<?php endif;?>
|
44 |
+
<?php if (Mage::helper('sitewards_deliverydate')->isExtensionActive()) :?>
|
45 |
+
<?php if ($_order->getDeliveryDate() !== null): ?>
|
46 |
+
<tr>
|
47 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Delivery Date') ?></label></td>
|
48 |
+
<td class="value"><strong><?php echo $this->formatDate($_order->getDeliveryDate(), 'medium', true) ?></strong></td>
|
49 |
+
</tr>
|
50 |
+
<?php endif; ?>
|
51 |
+
<?php endif; ?>
|
52 |
+
<tr>
|
53 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Order Status') ?></label></td>
|
54 |
+
<td class="value"><strong><span id="order_status"><?php echo $_order->getStatusLabel() ?></span></strong></td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Purchased From') ?></label></td>
|
58 |
+
<td class="value"><strong><?php echo $this->getOrderStoreName() ?></strong></td>
|
59 |
+
</tr>
|
60 |
+
<?php if($_order->getRelationChildId()): ?>
|
61 |
+
<tr>
|
62 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Link to the New Order') ?></label></td>
|
63 |
+
<td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationChildId()) ?>">
|
64 |
+
<?php echo $_order->getRelationChildRealId() ?>
|
65 |
+
</a></td>
|
66 |
+
</tr>
|
67 |
+
<?php endif; ?>
|
68 |
+
<?php if($_order->getRelationParentId()): ?>
|
69 |
+
<tr>
|
70 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Link to the Previous Order') ?></label></td>
|
71 |
+
<td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationParentId()) ?>">
|
72 |
+
<?php echo $_order->getRelationParentRealId() ?>
|
73 |
+
</a></td>
|
74 |
+
</tr>
|
75 |
+
<?php endif; ?>
|
76 |
+
<?php if($_order->getRemoteIp() && $this->shouldDisplayCustomerIp()): ?>
|
77 |
+
<tr>
|
78 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Placed from IP') ?></label></td>
|
79 |
+
<td class="value"><strong><?php echo $_order->getRemoteIp(); echo ($_order->getXForwardedFor())?' (' . $this->escapeHtml($_order->getXForwardedFor()) . ')':''; ?></strong></td>
|
80 |
+
</tr>
|
81 |
+
<?php endif; ?>
|
82 |
+
<?php if($_order->getGlobalCurrencyCode() != $_order->getBaseCurrencyCode()): ?>
|
83 |
+
<tr>
|
84 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getGlobalCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
|
85 |
+
<td class="value"><strong><?php echo $_order->getBaseToGlobalRate() ?></strong></td>
|
86 |
+
</tr>
|
87 |
+
<?php endif; ?>
|
88 |
+
<?php if($_order->getBaseCurrencyCode() != $_order->getOrderCurrencyCode()): ?>
|
89 |
+
<tr>
|
90 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getOrderCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
|
91 |
+
<td class="value"><strong><?php echo $_order->getBaseToOrderRate() ?></strong></td>
|
92 |
+
</tr>
|
93 |
+
<?php endif; ?>
|
94 |
+
</table>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
<div class="box-right">
|
99 |
+
<!--Account Information-->
|
100 |
+
<div class="entry-edit">
|
101 |
+
<div class="entry-edit-head">
|
102 |
+
<h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Account Information') ?></h4>
|
103 |
+
<div class="tools"><?php echo $this->getAccountEditLink()?></div>
|
104 |
+
</div>
|
105 |
+
<div class="fieldset">
|
106 |
+
<div class="hor-scroll">
|
107 |
+
<table cellspacing="0" class="form-list">
|
108 |
+
<tr>
|
109 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Customer Name') ?></label></td>
|
110 |
+
<td class="value">
|
111 |
+
<?php if ($_customerUrl=$this->getCustomerViewUrl()) : ?>
|
112 |
+
<a href="<?php echo $_customerUrl ?>" target="_blank"><strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong></a>
|
113 |
+
<?php else: ?>
|
114 |
+
<strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong>
|
115 |
+
<?php endif; ?>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
<tr>
|
119 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Email') ?></label></td>
|
120 |
+
<td class="value"><a href="mailto:<?php echo $_order->getCustomerEmail() ?>"><strong><?php echo $_order->getCustomerEmail() ?></strong></a></td>
|
121 |
+
</tr>
|
122 |
+
<?php if ($_groupName = $this->getCustomerGroupName()) : ?>
|
123 |
+
<tr>
|
124 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Customer Group') ?></label></td>
|
125 |
+
<td class="value"><strong><?php echo $_groupName ?></strong></td>
|
126 |
+
</tr>
|
127 |
+
<?php endif; ?>
|
128 |
+
<?php foreach ($this->getCustomerAccountData() as $data):?>
|
129 |
+
<tr>
|
130 |
+
<td class="label"><label><?php echo $data['label'] ?></label></td>
|
131 |
+
<td class="value"><strong><?php echo $data['value'] ?></strong></td>
|
132 |
+
</tr>
|
133 |
+
<?php endforeach;?>
|
134 |
+
</table>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
<div class="clear"></div>
|
140 |
+
|
141 |
+
<div class="box-left">
|
142 |
+
<!--Billing Address-->
|
143 |
+
<div class="entry-edit">
|
144 |
+
<div class="entry-edit-head">
|
145 |
+
<h4 class="icon-head head-billing-address"><?php echo Mage::helper('sales')->__('Billing Address') ?></h4>
|
146 |
+
<div class="tools"><?php echo $this->getAddressEditLink($_order->getBillingAddress())?></div>
|
147 |
+
</div>
|
148 |
+
<fieldset>
|
149 |
+
<address><?php echo $_order->getBillingAddress()->getFormated(true) ?></address>
|
150 |
+
</fieldset>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
<?php if (!$this->getOrder()->getIsVirtual()): ?>
|
154 |
+
<div class="box-right">
|
155 |
+
<!--Shipping Address-->
|
156 |
+
<div class="entry-edit">
|
157 |
+
<div class="entry-edit-head">
|
158 |
+
<h4 class="icon-head head-shipping-address"><?php echo Mage::helper('sales')->__('Shipping Address') ?></h4>
|
159 |
+
<div class="tools"><?php echo $this->getAddressEditLink($_order->getShippingAddress())?></div>
|
160 |
+
</div>
|
161 |
+
<fieldset>
|
162 |
+
<address><?php echo $_order->getShippingAddress()->getFormated(true) ?></address>
|
163 |
+
</fieldset>
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
<div class="clear"></div>
|
167 |
+
<?php endif; ?>
|
app/design/frontend/base/default/layout/sitewards/deliverydate.xml
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" ?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* layout.xml
|
5 |
+
* - add the option to the checkout page in the shipping methods additional block,
|
6 |
+
* - Add the delivery date to all the order and print pages in the customer section
|
7 |
+
*
|
8 |
+
* @category Sitewards
|
9 |
+
* @package Sitewards_DeliveryDate
|
10 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
11 |
+
*/
|
12 |
+
-->
|
13 |
+
<layout version="0.1.0">
|
14 |
+
<checkout_onepage_index>
|
15 |
+
<reference name="checkout.onepage.shipping_method.additional">
|
16 |
+
<action method="setTemplate">
|
17 |
+
<template>sitewards/deliverydate/onepage/shipping_method/additional.phtml</template>
|
18 |
+
</action>
|
19 |
+
</reference>
|
20 |
+
<reference name="head">
|
21 |
+
<reference name="head">
|
22 |
+
<action method="addItem">
|
23 |
+
<type>js_css</type>
|
24 |
+
<name>calendar/calendar-system.css</name>
|
25 |
+
<!--<params/><if/><condition>can_load_calendar_js</condition>-->
|
26 |
+
</action>
|
27 |
+
<action method="addItem">
|
28 |
+
<type>js</type>
|
29 |
+
<name>calendar/calendar.js</name>
|
30 |
+
<!--<params/><if/><condition>can_load_calendar_js</condition>-->
|
31 |
+
</action>
|
32 |
+
<action method="addItem">
|
33 |
+
<type>js</type>
|
34 |
+
<name>calendar/calendar-setup.js</name>
|
35 |
+
<!--<params/><if/><condition>can_load_calendar_js</condition>-->
|
36 |
+
</action>
|
37 |
+
<action method="addItem">
|
38 |
+
<type>js</type>
|
39 |
+
<name>sitewards/deliverydate.js</name>
|
40 |
+
<!--<params/><if/><condition>can_load_calendar_js</condition>-->
|
41 |
+
</action>
|
42 |
+
</reference>
|
43 |
+
</reference>
|
44 |
+
</checkout_onepage_index>
|
45 |
+
|
46 |
+
<checkout_onepage_additional>
|
47 |
+
<reference name="root">
|
48 |
+
<action method="setTemplate">
|
49 |
+
<template>sitewards/deliverydate/onepage/shipping_method/additional.phtml</template>
|
50 |
+
</action>
|
51 |
+
</reference>
|
52 |
+
</checkout_onepage_additional>
|
53 |
+
|
54 |
+
<sales_order_view>
|
55 |
+
<update handle="sitewards_displaydate_order_info"/>
|
56 |
+
</sales_order_view>
|
57 |
+
|
58 |
+
<sales_order_invoice>
|
59 |
+
<update handle="sitewards_displaydate_order_info"/>
|
60 |
+
</sales_order_invoice>
|
61 |
+
|
62 |
+
<sales_order_shipment>
|
63 |
+
<update handle="sitewards_displaydate_order_info"/>
|
64 |
+
</sales_order_shipment>
|
65 |
+
|
66 |
+
<sales_order_creditmemo>
|
67 |
+
<update handle="sitewards_displaydate_order_info"/>
|
68 |
+
</sales_order_creditmemo>
|
69 |
+
|
70 |
+
<sales_guest_view>
|
71 |
+
<update handle="sitewards_displaydate_order_info"/>
|
72 |
+
</sales_guest_view>
|
73 |
+
|
74 |
+
<sales_guest_invoice>
|
75 |
+
<update handle="sitewards_displaydate_order_info"/>
|
76 |
+
</sales_guest_invoice>
|
77 |
+
|
78 |
+
<sales_guest_shipment>
|
79 |
+
<update handle="sitewards_displaydate_order_info"/>
|
80 |
+
</sales_guest_shipment>
|
81 |
+
|
82 |
+
<sales_guest_creditmemo>
|
83 |
+
<update handle="sitewards_displaydate_order_info"/>
|
84 |
+
</sales_guest_creditmemo>
|
85 |
+
|
86 |
+
<sitewards_displaydate_order_info>
|
87 |
+
<reference name="sales.order.info">
|
88 |
+
<action method="setTemplate">
|
89 |
+
<template>sitewards/deliverydate/sales/order/info.phtml</template>
|
90 |
+
</action>
|
91 |
+
</reference>
|
92 |
+
</sitewards_displaydate_order_info>
|
93 |
+
|
94 |
+
<sales_order_print>
|
95 |
+
<update handle="sitewards_displaydate_order_print" />
|
96 |
+
</sales_order_print>
|
97 |
+
|
98 |
+
<sales_guest_print>
|
99 |
+
<update handle="sitewards_displaydate_order_print" />
|
100 |
+
</sales_guest_print>
|
101 |
+
|
102 |
+
<sitewards_displaydate_order_print>
|
103 |
+
<reference name="sales.order.print">
|
104 |
+
<action method="setTemplate">
|
105 |
+
<template>sitewards/deliverydate/sales/order/print.phtml</template>
|
106 |
+
</action>
|
107 |
+
</reference>
|
108 |
+
</sitewards_displaydate_order_print>
|
109 |
+
|
110 |
+
<sales_order_printinvoice>
|
111 |
+
<update handle="sitewards_displaydate_order_printinvoice" />
|
112 |
+
</sales_order_printinvoice>
|
113 |
+
|
114 |
+
<sales_guest_printinvoice>
|
115 |
+
<update handle="sitewards_displaydate_order_printinvoice" />
|
116 |
+
</sales_guest_printinvoice>
|
117 |
+
|
118 |
+
<sitewards_displaydate_order_printinvoice>
|
119 |
+
<reference name="sales.order.print.invoice">
|
120 |
+
<action method="setTemplate">
|
121 |
+
<template>sitewards/deliverydate/sales/order/print/invoice.phtml</template>
|
122 |
+
</action>
|
123 |
+
</reference>
|
124 |
+
</sitewards_displaydate_order_printinvoice>
|
125 |
+
|
126 |
+
<sales_order_printshipment>
|
127 |
+
<update handle="sitewards_displaydate_order_printshipment" />
|
128 |
+
</sales_order_printshipment>
|
129 |
+
|
130 |
+
<sales_guest_printshipment>
|
131 |
+
<update handle="sitewards_displaydate_order_printshipment" />
|
132 |
+
</sales_guest_printshipment>
|
133 |
+
|
134 |
+
<sitewards_displaydate_order_printshipment>
|
135 |
+
<reference name="sales.order.print.shipment">
|
136 |
+
<action method="setTemplate">
|
137 |
+
<template>sitewards/deliverydate/sales/order/print/shipment.phtml</template>
|
138 |
+
</action>
|
139 |
+
</reference>
|
140 |
+
</sitewards_displaydate_order_printshipment>
|
141 |
+
|
142 |
+
<sales_order_printcreditmemo>
|
143 |
+
<update handle="sitewards_displaydate_order_printcreditmemo" />
|
144 |
+
</sales_order_printcreditmemo>
|
145 |
+
|
146 |
+
<sales_guest_printcreditmemo>
|
147 |
+
<update handle="sitewards_displaydate_order_printcreditmemo" />
|
148 |
+
</sales_guest_printcreditmemo>
|
149 |
+
|
150 |
+
<sitewards_displaydate_order_printcreditmemo>
|
151 |
+
<reference name="sales.order.print.creditmemo">
|
152 |
+
<action method="setTemplate">
|
153 |
+
<template>sitewards/deliverydate/sales/order/print/creditmemo.phtml</template>
|
154 |
+
</action>
|
155 |
+
</reference>
|
156 |
+
</sitewards_displaydate_order_printcreditmemo>
|
157 |
+
</layout>
|
app/design/frontend/base/default/template/sitewards/deliverydate/onepage/shipping_method/additional.phtml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (!$this->getQuote()->isVirtual()): ?>
|
2 |
+
<?php echo $this->helper('giftmessage/message')->getInline(
|
3 |
+
'onepage_checkout',
|
4 |
+
$this->getQuote(),
|
5 |
+
$this->getDontDisplayContainer()
|
6 |
+
) ?>
|
7 |
+
<?php endif; ?>
|
8 |
+
<?php
|
9 |
+
/** @var Sitewards_DeliveryDate_Helper_Data $oDeliveryDate */
|
10 |
+
$oDeliveryDate = $this->helper('sitewards_deliverydate');
|
11 |
+
?>
|
12 |
+
<?php if ($this->helper('sitewards_deliverydate')->isExtensionActive()) : ?>
|
13 |
+
<ul>
|
14 |
+
<li class="fields">
|
15 |
+
<div class="field">
|
16 |
+
<label for="delivery_date"><?php echo $oDeliveryDate->__('Order Date') ?></label>
|
17 |
+
|
18 |
+
<div class="input-box">
|
19 |
+
<input
|
20 |
+
type="text"
|
21 |
+
id="delivery_date"
|
22 |
+
name="sitewards[delivery_date]"
|
23 |
+
value="<?php echo $this->escapeHtml($this->getQuote()->getDeliveryDate()) ?>"
|
24 |
+
title="<?php echo $oDeliveryDate->__('Order Date') ?>"
|
25 |
+
class="input-text validate-date"/>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
</li>
|
29 |
+
</ul>
|
30 |
+
<script type="text/javascript">
|
31 |
+
var oOrderDatePicker = new OrderDatePicker();
|
32 |
+
oOrderDatePicker.initialize();
|
33 |
+
</script>
|
34 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/info.phtml
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category design
|
5 |
+
* @package base_default
|
6 |
+
* @copyright Copyright (c) Sitewards GmbH (http://www.sitewards.com)
|
7 |
+
* @contact magento@sitewards.com
|
8 |
+
* @licence OSL-3.0
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php /** @var $this Mage_Sales_Block_Order_Info */ ?>
|
12 |
+
<?php $_order = $this->getOrder() ?>
|
13 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
14 |
+
<div class="page-title title-buttons">
|
15 |
+
<h1><?php echo $this->__('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?></h1>
|
16 |
+
<?php echo $this->getChildHtml('buttons') ?>
|
17 |
+
</div>
|
18 |
+
<?php echo $this->getStatusHistoryRssUrl($_order) ?>
|
19 |
+
<dl class="order-info">
|
20 |
+
<dt><?php echo $this->__('About This Order:') ?></dt>
|
21 |
+
<dd>
|
22 |
+
<?php $_links = $this->getLinks(); ?>
|
23 |
+
<ul id="order-info-tabs">
|
24 |
+
<?php foreach ($_links as $_link): ?>
|
25 |
+
<?php if($_link->getUrl()): ?>
|
26 |
+
<li><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
|
27 |
+
<?php else: ?>
|
28 |
+
<li class="current"><?php echo $_link->getLabel() ?></li>
|
29 |
+
<?php endif; ?>
|
30 |
+
<?php endforeach; ?>
|
31 |
+
</ul>
|
32 |
+
<script type="text/javascript">decorateGeneric($('order-info-tabs').select('LI'),['first','last']);</script>
|
33 |
+
</dd>
|
34 |
+
</dl>
|
35 |
+
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
|
36 |
+
<?php if (Mage::helper('sitewards_deliverydate')->isExtensionActive()) :?>
|
37 |
+
<?php if ($_order->getDeliveryDate() !== null) :?>
|
38 |
+
<p class="order-date"><?php echo $this->__('Delivery Date: %s', $this->formatDate($_order->getDeliveryDate(), 'long')) ?></p>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
42 |
+
<div class="col2-set order-info-box">
|
43 |
+
<div class="col-1">
|
44 |
+
<div class="box">
|
45 |
+
<div class="box-title">
|
46 |
+
<h2><?php echo $this->__('Shipping Address') ?></h2>
|
47 |
+
</div>
|
48 |
+
<div class="box-content">
|
49 |
+
<address><?php echo $_order->getShippingAddress()->format('html') ?></address>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div class="col-2">
|
54 |
+
<div class="box">
|
55 |
+
<div class="box-title">
|
56 |
+
<h2><?php echo $this->__('Shipping Method') ?></h2>
|
57 |
+
</div>
|
58 |
+
<div class="box-content">
|
59 |
+
<?php if ($_order->getShippingDescription()): ?>
|
60 |
+
<?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
|
61 |
+
<?php else: ?>
|
62 |
+
<p><?php echo $this->helper('sales')->__('No shipping information available'); ?></p>
|
63 |
+
<?php endif; ?>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
<div class="col2-set order-info-box">
|
70 |
+
<div class="col-1">
|
71 |
+
<div class="box">
|
72 |
+
<div class="box-title">
|
73 |
+
<h2><?php echo $this->__('Billing Address') ?></h2>
|
74 |
+
</div>
|
75 |
+
<div class="box-content">
|
76 |
+
<address><?php echo $_order->getBillingAddress()->format('html') ?></address>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
<div class="col-2">
|
81 |
+
<div class="box box-payment">
|
82 |
+
<div class="box-title">
|
83 |
+
<h2><?php echo $this->__('Payment Method') ?></h2>
|
84 |
+
</div>
|
85 |
+
<div class="box-content">
|
86 |
+
<?php echo $this->getPaymentInfoHtml() ?>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
</div>
|
app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print.phtml
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category design
|
5 |
+
* @package base_default
|
6 |
+
* @copyright Copyright (c) Sitewards GmbH (http://www.sitewards.com)
|
7 |
+
* @contact magento@sitewards.com
|
8 |
+
* @licence OSL-3.0
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php $_order = $this->getOrder() ?>
|
12 |
+
<h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
|
13 |
+
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
|
14 |
+
<?php if (Mage::helper('sitewards_deliverydate')->isExtensionActive()) :?>
|
15 |
+
<?if ($_order->getDeliveryDate() !== null): ?>
|
16 |
+
<p class="order-date"><?php echo $this->__('Delivery Date: %s', $this->formatDate($_order->getDeliveryDate(), 'long')) ?></p>
|
17 |
+
<?php endif; ?>
|
18 |
+
<?php endif; ?>
|
19 |
+
<div class="col2-set">
|
20 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
21 |
+
<div class="col-1">
|
22 |
+
<h2><?php echo $this->__('Shipping Address') ?></h2>
|
23 |
+
<address><?php echo $_order->getShippingAddress()->format('html') ?></address>
|
24 |
+
</div>
|
25 |
+
<div class="col-2">
|
26 |
+
<?php else: ?>
|
27 |
+
<div class="col-1">
|
28 |
+
<?php endif; ?>
|
29 |
+
<h2><?php echo $this->__('Billing Address') ?></h2>
|
30 |
+
<address><?php echo $_order->getBillingAddress()->format('html') ?></address>
|
31 |
+
</div>
|
32 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
33 |
+
</div>
|
34 |
+
<div class="col2-set">
|
35 |
+
<div class="col-1">
|
36 |
+
<h2><?php echo $this->__('Shipping Method') ?></h2>
|
37 |
+
<?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
|
38 |
+
</div>
|
39 |
+
<?php endif; ?>
|
40 |
+
<div class="col-2">
|
41 |
+
<h2><?php echo $this->__('Payment Method') ?></h2>
|
42 |
+
<?php echo $this->getPaymentInfoHtml() ?>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
<h2><?php echo $this->__('Items Ordered') ?></h2>
|
46 |
+
<table class="data-table" id="my-orders-table">
|
47 |
+
<col />
|
48 |
+
<col width="1" />
|
49 |
+
<col width="1" />
|
50 |
+
<col width="1" />
|
51 |
+
<col width="1" />
|
52 |
+
<thead>
|
53 |
+
<tr>
|
54 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
55 |
+
<th><?php echo $this->__('SKU') ?></th>
|
56 |
+
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
57 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
58 |
+
<th class="a-right"><?php echo $this->__('Subtotal') ?></th>
|
59 |
+
</tr>
|
60 |
+
</thead>
|
61 |
+
<tfoot>
|
62 |
+
<?php echo $this->getChildHtml('order_totals') ?>
|
63 |
+
</tfoot>
|
64 |
+
<?php $_items = $_order->getItemsCollection(); ?>
|
65 |
+
<?php $_count = $_items->count(); ?>
|
66 |
+
<?php foreach ($_items as $_item): ?>
|
67 |
+
<?php if ($_item->getParentItem()) continue; ?>
|
68 |
+
<tbody>
|
69 |
+
<?php echo $this->getItemHtml($_item) ?>
|
70 |
+
</tbody>
|
71 |
+
<?php endforeach; ?>
|
72 |
+
</table>
|
73 |
+
<script type="text/javascript">decorateTable('my-orders-table', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
74 |
+
<script type="text/javascript">window.print();</script>
|
app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print/creditmemo.phtml
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category design
|
5 |
+
* @package base_default
|
6 |
+
* @copyright Copyright (c) Sitewards GmbH (http://www.sitewards.com)
|
7 |
+
* @contact magento@sitewards.com
|
8 |
+
* @licence OSL-3.0
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php $_order = $this->getOrder() ?>
|
12 |
+
<h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
|
13 |
+
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
|
14 |
+
<?php if (Mage::helper('sitewards_deliverydate')->isExtensionActive()) :?>
|
15 |
+
<?php if ($_order->getDeliveryDate() !== null): ?>
|
16 |
+
<p class="order-date"><?php echo $this->__('Delivery Date: %s', $this->formatDate($_order->getDeliveryDate(), 'long')) ?></p>
|
17 |
+
<?php endif; ?>
|
18 |
+
<?php endif; ?>
|
19 |
+
<?php $_creditmemo = $this->getCreditmemo() ?>
|
20 |
+
<?php if($_creditmemo): ?>
|
21 |
+
<?php $_creditmemos = array($_creditmemo); ?>
|
22 |
+
<?php else: ?>
|
23 |
+
<?php $_creditmemos = $_order->getCreditmemosCollection() ?>
|
24 |
+
<?php endif; ?>
|
25 |
+
<?php foreach ($_creditmemos as $_creditmemo): ?>
|
26 |
+
<h2 class="h2"><?php echo $this->__('Refund #%s', $_creditmemo->getIncrementId()) ?></h2>
|
27 |
+
<div class="col2-set">
|
28 |
+
<div class="col-1">
|
29 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
30 |
+
<h3><?php echo $this->__('Shipping Address') ?></h3>
|
31 |
+
<?php $_shipping = $_creditmemo->getShippingAddress() ?>
|
32 |
+
<address><?php echo $_shipping->format('html') ?></address>
|
33 |
+
</div>
|
34 |
+
<div class="col-2">
|
35 |
+
<?php endif; ?>
|
36 |
+
<h3><?php echo $this->__('Billing Address') ?></h3>
|
37 |
+
<?php $_billing = $_creditmemo->getbillingAddress() ?>
|
38 |
+
<address><?php echo $_order->getBillingAddress()->format('html') ?></address>
|
39 |
+
</div>
|
40 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
41 |
+
</div>
|
42 |
+
<div class="col2-set">
|
43 |
+
<div class="col-1">
|
44 |
+
<h3><?php echo $this->__('Shipping Method') ?></h3>
|
45 |
+
<?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
|
46 |
+
</div>
|
47 |
+
<?php endif; ?>
|
48 |
+
<div class="col-2">
|
49 |
+
<h3><?php echo $this->__('Payment Method') ?></h3>
|
50 |
+
<?php echo $this->getPaymentInfoHtml() ?>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<h3><?php echo $this->__('Items Refunded') ?></h3>
|
54 |
+
<table class="data-table" id="my-refund-table-<?php echo $_creditmemo->getId(); ?>">
|
55 |
+
<col />
|
56 |
+
<col width="1" />
|
57 |
+
<col width="1" />
|
58 |
+
<col width="1" />
|
59 |
+
<col width="1" />
|
60 |
+
<col width="1" />
|
61 |
+
<col width="1" />
|
62 |
+
<thead>
|
63 |
+
<tr>
|
64 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
65 |
+
<th><?php echo $this->__('SKU') ?></th>
|
66 |
+
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
67 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
68 |
+
<th class="a-right"><?php echo $this->__('Subtotal') ?></th>
|
69 |
+
<th class="a-center wrap"><?php echo $this->__('Discount Amount') ?></th>
|
70 |
+
<th class="a-center wrap"><?php echo $this->__('Row Total') ?></th>
|
71 |
+
</tr>
|
72 |
+
</thead>
|
73 |
+
<tfoot>
|
74 |
+
<?php echo $this->getTotalsHtml($_creditmemo);?>
|
75 |
+
</tfoot>
|
76 |
+
<?php $_items = $_creditmemo->getAllItems(); ?>
|
77 |
+
<?php $_count = count($_items); ?>
|
78 |
+
<?php foreach ($_items as $_item): ?>
|
79 |
+
<?php if ($_item->getOrderItem()->getParentItem()) continue; ?>
|
80 |
+
<tbody>
|
81 |
+
<?php echo $this->getItemHtml($_item) ?>
|
82 |
+
</tbody>
|
83 |
+
<?php endforeach; ?>
|
84 |
+
</table>
|
85 |
+
<script type="text/javascript">decorateTable('my-refund-table-<?php echo $_creditmemo->getId(); ?>', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
86 |
+
<?php endforeach; ?>
|
87 |
+
<script type="text/javascript">window.print();</script>
|
app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print/invoice.phtml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category design
|
5 |
+
* @package base_default
|
6 |
+
* @copyright Copyright (c) Sitewards GmbH (http://www.sitewards.com)
|
7 |
+
* @contact magento@sitewards.com
|
8 |
+
* @licence OSL-3.0
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php $_order = $this->getOrder() ?>
|
12 |
+
<h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
|
13 |
+
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
|
14 |
+
<?php if (Mage::helper('sitewards_deliverydate')->isExtensionActive()) :?>
|
15 |
+
<?php if ($_order->getDeliveryDate() !== null): ?>
|
16 |
+
<p class="order-date"><?php echo $this->__('Delivery Date: %s', $this->formatDate($_order->getDeliveryDate(), 'long')) ?></p>
|
17 |
+
<?php endif; ?>
|
18 |
+
<?php endif; ?>
|
19 |
+
<?php $_invoice = $this->getInvoice() ?>
|
20 |
+
<?php if($_invoice): ?>
|
21 |
+
<?php $_invoices = array($_invoice); ?>
|
22 |
+
<?php else: ?>
|
23 |
+
<?php $_invoices = $_order->getInvoiceCollection() ?>
|
24 |
+
<?php endif; ?>
|
25 |
+
<?php foreach ($_invoices as $_invoice): ?>
|
26 |
+
<h2 class="h2"><?php echo $this->__('Invoice #%s', $_invoice->getIncrementId()) ?></h2>
|
27 |
+
<div class="col2-set">
|
28 |
+
<div class="col-1">
|
29 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
30 |
+
<h3><?php echo $this->__('Shipping Address') ?></h3>
|
31 |
+
<?php $_shipping = $_invoice->getShippingAddress() ?>
|
32 |
+
<address><?php echo $_shipping->format('html') ?></address>
|
33 |
+
</div>
|
34 |
+
<div class="col-2">
|
35 |
+
<?php endif; ?>
|
36 |
+
<h3><?php echo $this->__('Billing Address') ?></h3>
|
37 |
+
<?php $_billing = $_invoice->getbillingAddress() ?>
|
38 |
+
<address><?php echo $_order->getBillingAddress()->format('html') ?></address>
|
39 |
+
</div>
|
40 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
41 |
+
</div>
|
42 |
+
<div class="col2-set">
|
43 |
+
<div class="col-1">
|
44 |
+
<h3><?php echo $this->__('Shipping Method') ?></h3>
|
45 |
+
<?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
|
46 |
+
</div>
|
47 |
+
<?php endif; ?>
|
48 |
+
<div class="col-2">
|
49 |
+
<h3><?php echo $this->__('Payment Method') ?></h3>
|
50 |
+
<?php echo $this->getPaymentInfoHtml() ?>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<h3><?php echo $this->__('Items Invoiced') ?></h3>
|
54 |
+
<table class="data-table" id="my-invoice-table-<?php echo $_invoice->getId(); ?>">
|
55 |
+
<col />
|
56 |
+
<col width="1" />
|
57 |
+
<col width="1" />
|
58 |
+
<col width="1" />
|
59 |
+
<col width="1" />
|
60 |
+
<thead>
|
61 |
+
<tr>
|
62 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
63 |
+
<th><?php echo $this->__('SKU') ?></th>
|
64 |
+
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
65 |
+
<th class="a-center"><span class="nobr"><?php echo $this->__('Qty Invoiced') ?></span></th>
|
66 |
+
<th class="a-right"><?php echo $this->__('Subtotal') ?></th>
|
67 |
+
</tr>
|
68 |
+
</thead>
|
69 |
+
<tfoot>
|
70 |
+
<?php echo $this->getInvoiceTotalsHtml($_invoice)?>
|
71 |
+
</tfoot>
|
72 |
+
<?php $_items = $_invoice->getItemsCollection(); ?>
|
73 |
+
<?php $_count = $_items->count(); ?>
|
74 |
+
<?php foreach ($_items as $_item): ?>
|
75 |
+
<?php if ($_item->getOrderItem()->getParentItem()) continue; ?>
|
76 |
+
<tbody>
|
77 |
+
<?php echo $this->getItemHtml($_item) ?>
|
78 |
+
</tbody>
|
79 |
+
<?php endforeach; ?>
|
80 |
+
</table>
|
81 |
+
<script type="text/javascript">decorateTable('my-invoice-table-<?php echo $_invoice->getId(); ?>', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
82 |
+
<?php endforeach; ?>
|
83 |
+
<script type="text/javascript">window.print();</script>
|
app/design/frontend/base/default/template/sitewards/deliverydate/sales/order/print/shipment.phtml
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category design
|
5 |
+
* @package base_default
|
6 |
+
* @copyright Copyright (c) Sitewards GmbH (http://www.sitewards.com)
|
7 |
+
* @contact magento@sitewards.com
|
8 |
+
* @licence OSL-3.0
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php /* @var $this Mage_Sales_Block_Order_Print_Shipment */?>
|
12 |
+
<?php $order = $this->getOrder(); ?>
|
13 |
+
<h1><?php echo $this->__('Order #%s', $this->getObjectData($order, 'real_order_id')); ?></h1>
|
14 |
+
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($this->getObjectData($order, 'created_at_store_date'), 'long')) ?></p>
|
15 |
+
<?php if (Mage::helper('sitewards_deliverydate')->isExtensionActive()) :?>
|
16 |
+
<?php if ($this->getObjectData($order, 'delivery_date') !== null): ?>
|
17 |
+
<p class="order-date"><?php echo $this->__('Delivery Date: %s', $this->formatDate($this->getObjectData($order, 'delivery_date'), 'long')) ?></p>
|
18 |
+
<?php endif; ?>
|
19 |
+
<?php endif; ?>
|
20 |
+
<?php if (!$this->getObjectData($order, 'is_virtual')): ?>
|
21 |
+
<?php foreach ($this->getShipmentsCollection() as $shipment): ?>
|
22 |
+
<h2 class="h2"><?php echo $this->__('Shipment #%s', $this->getObjectData($shipment, 'increment_id')); ?></h2>
|
23 |
+
<div class="col2-set">
|
24 |
+
<div class="col-1">
|
25 |
+
<h3><?php echo $this->__('Shipping Address') ?></h3>
|
26 |
+
<address><?php echo $this->getShipmentAddressFormattedHtml($shipment); ?></address>
|
27 |
+
</div>
|
28 |
+
<div class="col-2">
|
29 |
+
<h3><?php echo $this->__('Billing Address') ?></h3>
|
30 |
+
<address><?php echo $this->getBillingAddressFormattedHtml($order); ?></address>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<div class="col2-set">
|
34 |
+
<div class="col-1">
|
35 |
+
<h3><?php echo $this->__('Shipping Method') ?></h3>
|
36 |
+
<?php echo $this->escapeHtml($this->getObjectData($order, 'shipping_description')); ?>
|
37 |
+
<?php $tracks = $this->getShipmentTracks($shipment);
|
38 |
+
if ($tracks): ?>
|
39 |
+
<table class="data-table" id="my-shipment-tracking">
|
40 |
+
<col />
|
41 |
+
<col />
|
42 |
+
<thead>
|
43 |
+
<tr>
|
44 |
+
<th><?php echo Mage::helper('sales')->__('Title')?></th>
|
45 |
+
<th><?php echo Mage::helper('sales')->__('Number')?></th>
|
46 |
+
</tr>
|
47 |
+
</thead>
|
48 |
+
<tbody>
|
49 |
+
<?php foreach ($tracks as $track): ?>
|
50 |
+
<tr>
|
51 |
+
<td><?php echo $this->escapeHtml($this->getObjectData($track, 'title')); ?></td>
|
52 |
+
<td><?php echo $this->escapeHtml($this->getObjectData($track, 'number')); ?></td>
|
53 |
+
</tr>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</tbody>
|
56 |
+
</table>
|
57 |
+
<script type="text/javascript">decorateTable('my-shipment-tracking');</script>
|
58 |
+
<?php endif; ?>
|
59 |
+
</div>
|
60 |
+
<div class="col-2">
|
61 |
+
<h3><?php echo $this->__('Payment Method') ?></h3>
|
62 |
+
<?php echo $this->getPaymentInfoHtml() ?>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<h3><?php echo $this->__('Items Shipped') ?></h3>
|
66 |
+
<table class="data-table" id="my-shipment-table-<?php echo $this->getObjectData($shipment, 'id') ?>">
|
67 |
+
<col />
|
68 |
+
<col width="1" />
|
69 |
+
<col width="1" />
|
70 |
+
<thead>
|
71 |
+
<tr>
|
72 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
73 |
+
<th><?php echo $this->__('SKU') ?></th>
|
74 |
+
<th class="a-center"><span class="nobr"><?php echo $this->__('Qty Shipped') ?></span></th>
|
75 |
+
</tr>
|
76 |
+
</thead>
|
77 |
+
<?php foreach ($this->getShipmentItems($shipment) as $item): ?>
|
78 |
+
<tbody>
|
79 |
+
<?php echo $this->getItemHtml($item) ?>
|
80 |
+
</tbody>
|
81 |
+
<?php endforeach; ?>
|
82 |
+
</table>
|
83 |
+
<script type="text/javascript">decorateTable('my-shipment-table-<?php echo $this->getObjectData($shipment, 'id')?>', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
84 |
+
<?php endforeach; ?>
|
85 |
+
<?php endif; ?>
|
86 |
+
<script type="text/javascript">window.print();</script>
|
app/etc/modules/Sitewards_DeliveryDate.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Sitewards_DeliveryDate.xml
|
5 |
+
* - Activate module,
|
6 |
+
* - Specify code pool,
|
7 |
+
* - Set-up dependencies
|
8 |
+
*
|
9 |
+
* @category Sitewards
|
10 |
+
* @package Sitewards_DeliveryDate
|
11 |
+
* @copyright Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
|
12 |
+
*/
|
13 |
+
-->
|
14 |
+
<config>
|
15 |
+
<modules>
|
16 |
+
<Sitewards_DeliveryDate>
|
17 |
+
<active>true</active>
|
18 |
+
<codePool>community</codePool>
|
19 |
+
<depends>
|
20 |
+
<Mage_Checkout/>
|
21 |
+
<Mage_Sales/>
|
22 |
+
</depends>
|
23 |
+
</Sitewards_DeliveryDate>
|
24 |
+
</modules>
|
25 |
+
</config>
|
app/locale/de_DE/Sitewards_DeliveryDate.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
"Delivery Date","Delivery Date"
|
2 |
+
"General settings","Allgemeine Einstellungen"
|
3 |
+
"Enable Delivery Date extension","Delivery Date aktivieren"
|
4 |
+
"Enable or disable extension.","Aktivieren oder Deaktivieren der Extension."
|
app/locale/en_US/Sitewards_DeliveryDate.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
"Delivery Date","Delivery Date"
|
2 |
+
"General settings","General settings"
|
3 |
+
"Enable Delivery Date extension","Enable Delivery Date extension"
|
4 |
+
"Enable or disable extension.","Enable or disable extension."
|
js/sitewards/deliverydate.js
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Date picker for the order date
|
3 |
+
*/
|
4 |
+
var OrderDatePicker = Class.create(
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* Sets up all events of the input fields and
|
8 |
+
* the Calender
|
9 |
+
*/
|
10 |
+
initialize: function () {
|
11 |
+
// initialize date picker with correct date format
|
12 |
+
Calendar.setup({
|
13 |
+
inputField: 'delivery_date',
|
14 |
+
ifFormat: '%Y-%m-%d',
|
15 |
+
align: 'Bl',
|
16 |
+
button: 'delivery_date',
|
17 |
+
singleClick: true,
|
18 |
+
disableFunc : function(date) {
|
19 |
+
var today = new Date();
|
20 |
+
today.setDate(today.getDate() - 1);
|
21 |
+
return (date < today);
|
22 |
+
}
|
23 |
+
});
|
24 |
+
|
25 |
+
// initialize the input
|
26 |
+
var oDateInput = $('delivery_date');
|
27 |
+
if (oDateInput.value === '') {
|
28 |
+
var oToday = new Date(),
|
29 |
+
sDay = ('0' + oToday.getDate()).slice(-2),
|
30 |
+
sMonth = ('0' + (oToday.getMonth() + 1)).slice(-2),
|
31 |
+
sYear = oToday.getFullYear()
|
32 |
+
;
|
33 |
+
oDateInput.value = sYear + '-' + sMonth + '-' + sDay;
|
34 |
+
}
|
35 |
+
|
36 |
+
// date can only be changed via date picker
|
37 |
+
oDateInput.on('focus', function () {
|
38 |
+
oDateInput.blur();
|
39 |
+
});
|
40 |
+
|
41 |
+
this._initializeLoca();
|
42 |
+
},
|
43 |
+
|
44 |
+
/**
|
45 |
+
* initialize the localization of the calendar, if not already initialized
|
46 |
+
*
|
47 |
+
* @private
|
48 |
+
*/
|
49 |
+
_initializeLoca: function () {
|
50 |
+
|
51 |
+
if (this._isUndefined('enUS', window)) {
|
52 |
+
window.enUS = {
|
53 |
+
"m": {
|
54 |
+
"wide": [
|
55 |
+
"January", "February", "March", "April", "May", "June", "July", "August",
|
56 |
+
"September", "October", "November", "December"
|
57 |
+
],
|
58 |
+
"abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
59 |
+
}
|
60 |
+
};
|
61 |
+
}
|
62 |
+
|
63 |
+
this._initCalendarLocaField('_DN', new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"));
|
64 |
+
this._initCalendarLocaField('_SDN', new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"));
|
65 |
+
this._initCalendarLocaField('_FD', 0);
|
66 |
+
this._initCalendarLocaField('_MN', window.enUS.m.wide);
|
67 |
+
this._initCalendarLocaField('_SMN', window.enUS.m.abbr);
|
68 |
+
this._initCalendarLocaField('_TT', {
|
69 |
+
INFO: "About",
|
70 |
+
ABOUT: "DHTML Date/Time Selector\n" +
|
71 |
+
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
|
72 |
+
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
73 |
+
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
74 |
+
"\n\n" +
|
75 |
+
"Date selection:\n" +
|
76 |
+
"- Use the \xab, \xbb buttons to select year\n" +
|
77 |
+
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
78 |
+
"- Hold mouse button on any of the above buttons for faster selection.",
|
79 |
+
ABOUT_TIME: "\n\n" +
|
80 |
+
"Time selection:\n" +
|
81 |
+
"- Click on any of the time parts to increase it\n" +
|
82 |
+
"- or Shift-click to decrease it\n" +
|
83 |
+
"- or click and drag for faster selection.",
|
84 |
+
PREV_YEAR: "Prev. year (hold for menu)",
|
85 |
+
PREV_MONTH: "Prev. month (hold for menu)",
|
86 |
+
GO_TODAY: "Go Today",
|
87 |
+
NEXT_MONTH: "Next month (hold for menu)",
|
88 |
+
NEXT_YEAR: "Next year (hold for menu)",
|
89 |
+
SEL_DATE: "Select date",
|
90 |
+
DRAG_TO_MOVE: "Drag to move",
|
91 |
+
PART_TODAY: "(today)",
|
92 |
+
DAY_FIRST: "Display %s first",
|
93 |
+
SELECT_COLUMN: "Select all %ss of this month",
|
94 |
+
SELECT_ROW: "Select all days of this week",
|
95 |
+
WEEKEND: "0,6",
|
96 |
+
CLOSE: "Close",
|
97 |
+
TODAY: "Today",
|
98 |
+
TIME_PART: "(Shift-)Click or drag to change value",
|
99 |
+
DEF_DATE_FORMAT: "%Y-%m-%d",
|
100 |
+
TT_DATE_FORMAT: "%a, %b %e",
|
101 |
+
WK: "wk",
|
102 |
+
TIME: "Time:",
|
103 |
+
LAM: "am",
|
104 |
+
AM: "AM",
|
105 |
+
LPM: "pm",
|
106 |
+
PM: "PM"
|
107 |
+
})
|
108 |
+
;
|
109 |
+
this._initCalendarLocaField('_DIR', 'ltr');
|
110 |
+
this._initCalendarLocaField('_am', 'am');
|
111 |
+
this._initCalendarLocaField('_pm', 'pm');
|
112 |
+
},
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Inits a localization part of the calendar
|
116 |
+
*
|
117 |
+
* @param {string} sFieldname name of the part
|
118 |
+
* @param {mixed} mValue value of the field (array, string or number)
|
119 |
+
* @private
|
120 |
+
*/
|
121 |
+
_initCalendarLocaField: function (sFieldname, mValue) {
|
122 |
+
if (this._isUndefined(sFieldname, Calendar)) {
|
123 |
+
Calendar[sFieldname] = mValue;
|
124 |
+
}
|
125 |
+
},
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Checks if element is undefined
|
129 |
+
*
|
130 |
+
* @param {mixed} mElement object or (string) name of property of oParent object
|
131 |
+
* @param {object} oParent object to check the property mElement of (not required)
|
132 |
+
* @return {Boolean} true if the element is undefined
|
133 |
+
* @private
|
134 |
+
*/
|
135 |
+
_isUndefined: function (mElement, oParent) {
|
136 |
+
if (typeof oParent == 'undefined') {
|
137 |
+
return (typeof mElement == 'undefined');
|
138 |
+
} else {
|
139 |
+
return (typeof oParent[mElement] == 'undefined');
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
);
|
package.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Sitewards_DeliveryDate</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>The Sitewards Delivery Date Extension extends your webshop to allow users to specify a desired delivery date with orders.</summary>
|
10 |
+
<description>The Sitewards Delivery Date Extension extends your webshop to allow users to specify a desired delivery date with orders.
|
11 |
+

|
12 |
+
Features of the Delivery Date extension:
|
13 |
+
- On order set a delivery date,
|
14 |
+
- Show delivery date in admin and front end,</description>
|
15 |
+
<notes>First stable release.</notes>
|
16 |
+
<authors><author><name>Sitewards Magento Team</name><user>sitewards</user><email>magento@sitewards.com</email></author></authors>
|
17 |
+
<date>2014-06-23</date>
|
18 |
+
<time>10:01:41</time>
|
19 |
+
<contents><target name="magecommunity"><dir name="Sitewards"><dir name="DeliveryDate"><dir name="Block"><dir name="Onepage"><file name="Billing.php" hash="f3c311c0e67a0cb5decdcf10b3ca90de"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c9bad8b618d6f9e2b7a0b2569d87931b"/></dir><dir name="Model"><file name="Observer.php" hash="60a1cd6fb59117158992b7d9b57f1b01"/><file name="Order.php" hash="ce29e602713402185a8807e495bf544b"/><file name="Quote.php" hash="bc9a05307f6edd5e47cdf52d7549dd8a"/><dir name="Resource"><file name="Abstract.php" hash="d143e1246febd5dd3d5cf60d520bd0c5"/><dir name="Order"><file name="Collection.php" hash="0c5424946efd1bdcf40503a026274b71"/></dir><file name="Order.php" hash="de8cd76752c44d8840ae52047334ef43"/><dir name="Quote"><file name="Collection.php" hash="bd3527e63ce78803bcce3399f46a1fd9"/></dir><file name="Quote.php" hash="301986b5ec14bec4d2577dc427bb26fd"/></dir></dir><dir name="Test"><dir name="Helper"><dir name="Data"><dir name="fixtures"><file name="testIsExtensionActive.yaml" hash="c52e9981fd11f73b86031d039e6baeb2"/></dir></dir><file name="Data.php" hash="a84c550675b30f1f791639cb50069407"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="55d5db8fedc94eaea0b179a74ccffbd0"/><file name="config.xml" hash="6d8d8b78a62c1105afb78031c00a0892"/><file name="system.xml" hash="c09b220b79ad2f9cf9165c24facafc4b"/></dir><dir name="sql"><dir name="deliverydate_setup"><file name="install-0.1.0.php" hash="b5b832830e496cfb29c4534b76ba1a53"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sitewards_DeliveryDate.xml" hash="55be8633ce3d558dedc6d4e3ec2f04cb"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Sitewards_DeliveryDate.csv" hash="e9b0df6efc61e54378cd4bea7c11c114"/></dir><dir name="en_US"><file name="Sitewards_DeliveryDate.csv" hash="f1433ef3e0f3cf7b5d208d9bf2bf969d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="sitewards"><file name="deliverydate.xml" hash="67155727955389a9705e6d5b2c725249"/></dir></dir><dir name="template"><dir name="sitewards"><dir name="deliverydate"><dir name="onepage"><dir name="shipping_method"><file name="additional.phtml" hash="ea3333745b1c546b0340918443c04a5b"/></dir></dir><dir name="sales"><dir name="order"><file name="info.phtml" hash="f01a212be016b4de47eb20c432804025"/><dir name="print"><file name="creditmemo.phtml" hash="3d87af87077453e232f7aaaaf8a6c0a7"/><file name="invoice.phtml" hash="7411fe48aaea414eb4d83b618952488c"/><file name="shipment.phtml" hash="db5060d15d1e1560358801b89db97074"/></dir><file name="print.phtml" hash="ec1d66c288c5c759d917555c1c95fd47"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="sitewards"><file name="deliverydate.xml" hash="388fe578b141c74c1448df20eaf271ff"/></dir></dir><dir name="template"><dir name="sitewards"><dir name="deliverydate"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="cb5c1ebd07e8b5aa7c6c3764b37f68fe"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="sitewards"><file name="deliverydate.js" hash="f31a55624b9bec34356b660584543cd3"/></dir></dir></target></contents>
|
20 |
+
<compatible/>
|
21 |
+
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
22 |
+
</package>
|