HusseyCoding_Backorder - Version 1.0.5

Version Notes

Order today display logic fix, min out of stock quantity now pulled from config, added handling time, fixed lead time as date logic, added delivery estimates to order

Download this release

Release Info

Developer Hussey Coding
Extension HusseyCoding_Backorder
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.5

Files changed (21) hide show
  1. app/code/community/HusseyCoding/Backorder/Block/Adminhtml/Estimate.php +5 -0
  2. app/code/community/HusseyCoding/Backorder/Block/Customer/Estimate.php +5 -0
  3. app/code/community/HusseyCoding/Backorder/Block/Estimate/Common.php +28 -0
  4. app/code/community/HusseyCoding/Backorder/Helper/Data.php +34 -2
  5. app/code/community/HusseyCoding/Backorder/Model/Observer.php +80 -0
  6. app/code/community/HusseyCoding/Backorder/etc/config.xml +20 -1
  7. app/code/community/HusseyCoding/Backorder/etc/system.xml +9 -0
  8. app/code/community/HusseyCoding/Backorder/sql/backorder_setup/upgrade-1.0.3-1.0.4.php +24 -0
  9. app/code/community/HusseyCoding/Backorder/sql/backorder_setup/upgrade-1.0.4-1.0.5.php +10 -0
  10. app/design/adminhtml/default/default/layout/backorder.xml +16 -0
  11. app/design/adminhtml/default/default/template/backorder/estimate.phtml +11 -0
  12. app/design/frontend/base/default/layout/backorder.xml +20 -0
  13. app/design/frontend/base/default/template/backorder/bundle/email/order/items/order/default.phtml +160 -0
  14. app/design/frontend/base/default/template/backorder/customer/estimate.phtml +11 -0
  15. app/design/frontend/base/default/template/backorder/email/order/items/order/.LCKdefault.phtml~ +1 -0
  16. app/design/frontend/base/default/template/backorder/email/order/items/order/default.phtml +120 -0
  17. app/design/frontend/base/default/template/backorder/estimate.phtml +1 -1
  18. package.xml +5 -5
  19. skin/adminhtml/default/default/backorder/css/estimate.css +1 -0
  20. skin/adminhtml/default/default/backorder/js/estimate.js +7 -0
  21. skin/frontend/base/default/js/backorder/customer.js +7 -0
app/code/community/HusseyCoding/Backorder/Block/Adminhtml/Estimate.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class HusseyCoding_Backorder_Block_Adminhtml_Estimate extends HusseyCoding_Backorder_Block_Estimate_Common
3
+ {
4
+
5
+ }
app/code/community/HusseyCoding/Backorder/Block/Customer/Estimate.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class HusseyCoding_Backorder_Block_Customer_Estimate extends HusseyCoding_Backorder_Block_Estimate_Common
3
+ {
4
+
5
+ }
app/code/community/HusseyCoding/Backorder/Block/Estimate/Common.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class HusseyCoding_Backorder_Block_Estimate_Common extends Mage_Core_Block_Template
3
+ {
4
+ public function getOrderEstimates()
5
+ {
6
+ $estimates = array();
7
+ $order = Mage::registry('current_order');
8
+ foreach ($order->getAllVisibleItems() as $item):
9
+ if ($estimate = $item->getBackorderEstimate()):
10
+ if ($epoch = strtotime($estimate)):
11
+ if ($string = date('l, jS F', $epoch)):
12
+ $estimates[$item->getId()] = $string;
13
+ endif;
14
+ endif;
15
+ endif;
16
+ if (!isset($estimates[$item->getId()])):
17
+ $estimates[$item->getId()] = '';
18
+ endif;
19
+ endforeach;
20
+
21
+ return Mage::helper('core')->jsonEncode($estimates);
22
+ }
23
+
24
+ public function isEnabled()
25
+ {
26
+ return Mage::helper('backorder')->isEnabled();
27
+ }
28
+ }
app/code/community/HusseyCoding/Backorder/Helper/Data.php CHANGED
@@ -40,7 +40,8 @@ class HusseyCoding_Backorder_Helper_Data extends Mage_Core_Helper_Abstract
40
  $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
41
  if ($this->_areManagingStock($stock)):
42
  if (!Mage::getStoreConfig('backorder/general/ignorestock')):
43
- if ($stock->getQty() > 0 && $stock->getIsInStock()):
 
44
  return false;
45
  else:
46
  if (!$stock->getBackorders()):
@@ -54,9 +55,11 @@ class HusseyCoding_Backorder_Helper_Data extends Mage_Core_Helper_Abstract
54
  endif;
55
  endif;
56
  $backorder = $product->getBackorder();
57
- if (!empty($backorder)):
58
  $backorder = str_replace(' and ', ' + ', $backorder);
 
59
  if ($time = strtotime($backorder)):
 
60
  return $this->_getEstimateString($time);
61
  endif;
62
  endif;
@@ -65,6 +68,35 @@ class HusseyCoding_Backorder_Helper_Data extends Mage_Core_Helper_Abstract
65
  return false;
66
  }
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  public function areManagingStock($product)
69
  {
70
  $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
40
  $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
41
  if ($this->_areManagingStock($stock)):
42
  if (!Mage::getStoreConfig('backorder/general/ignorestock')):
43
+ $minquantity = (int) Mage::getStoreConfig('cataloginventory/item_options/min_qty');
44
+ if ($stock->getQty() > $minquantity && $stock->getIsInStock()):
45
  return false;
46
  else:
47
  if (!$stock->getBackorders()):
55
  endif;
56
  endif;
57
  $backorder = $product->getBackorder();
58
+ if (!empty($backorder) && !$this->_isInPast($backorder)):
59
  $backorder = str_replace(' and ', ' + ', $backorder);
60
+ $backorder = $this->_addHandlingTime($product, $backorder);
61
  if ($time = strtotime($backorder)):
62
+
63
  return $this->_getEstimateString($time);
64
  endif;
65
  endif;
68
  return false;
69
  }
70
 
71
+ private function _addHandlingTime($product, $backorder)
72
+ {
73
+ $handling = $product->getBackorderHandling();
74
+ if (empty($handling)):
75
+ $handling = Mage::getStoreConfig('backorder/general/handling_time');
76
+ endif;
77
+
78
+ if (!empty($handling)):
79
+ $handling = str_replace(' and ', ' + ', $handling);
80
+ if (strtotime($handling)):
81
+ $backorder = $backorder . ' + ' . $handling;
82
+ endif;
83
+ endif;
84
+
85
+ return $backorder;
86
+ }
87
+
88
+ private function _isInPast($backorder)
89
+ {
90
+ if ($time = strtotime($backorder)):
91
+ $now = time();
92
+ if ($time < $now):
93
+ return true;
94
+ endif;
95
+ endif;
96
+
97
+ return false;
98
+ }
99
+
100
  public function areManagingStock($product)
101
  {
102
  $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
app/code/community/HusseyCoding/Backorder/Model/Observer.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  class HusseyCoding_Backorder_Model_Observer
3
  {
 
 
4
  public function frontendControllerActionPredispatchCheckout($observer)
5
  {
6
  if (Mage::helper('backorder')->isEnabled() && Mage::helper('backorder')->acceptEnabled()):
@@ -25,4 +27,82 @@ class HusseyCoding_Backorder_Model_Observer
25
  Mage::register('is_backorder_email', true);
26
  endif;
27
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
1
  <?php
2
  class HusseyCoding_Backorder_Model_Observer
3
  {
4
+ private $_helper;
5
+
6
  public function frontendControllerActionPredispatchCheckout($observer)
7
  {
8
  if (Mage::helper('backorder')->isEnabled() && Mage::helper('backorder')->acceptEnabled()):
27
  Mage::register('is_backorder_email', true);
28
  endif;
29
  }
30
+
31
+ public function globalSalesOrderPlaceAfter($observer)
32
+ {
33
+ $estimates = $this->_setOrderEstimates($observer->getOrder());
34
+ }
35
+
36
+ private function _setOrderEstimates($order)
37
+ {
38
+ $bundleitems = array();
39
+ $childids = array();
40
+ foreach ($order->getAllItems() as $item):
41
+ if ($parent = $item->getParentItemId()):
42
+ $childids[$parent][] = $item;
43
+ else:
44
+ if ($item->getProductType() == 'configurable'):
45
+ $sku = $item->getSku();
46
+ $product = Mage::getModel('catalog/product');
47
+ if ($productid = $product->getIdBySku($sku)):
48
+ $product->load($productid);
49
+ if ($product->getId()):
50
+ if ($estimate = $this->_getEstimateDate($product)):
51
+ if ($epoch = strtotime($estimate)):
52
+ if ($timestamp = date('Y-m-d H:i:s', $epoch)):
53
+ $item->setBackorderEstimate($timestamp);
54
+ endif;
55
+ endif;
56
+ endif;
57
+ endif;
58
+ endif;
59
+ elseif ($item->getProductType() == 'bundle'):
60
+ $bundleitems[] = $item;
61
+ else:
62
+ if ($estimate = $this->_getEstimateDate($item->getProduct())):
63
+ if ($epoch = strtotime($estimate)):
64
+ if ($timestamp = date('Y-m-d H:i:s', $epoch)):
65
+ $item->setBackorderEstimate($timestamp);
66
+ endif;
67
+ endif;
68
+ endif;
69
+ endif;
70
+ endif;
71
+ endforeach;
72
+
73
+ foreach ($bundleitems as $bundleitem):
74
+ $estimates = array();
75
+ if (isset($childids[$bundleitem->getId()])):
76
+ foreach ($childids[$bundleitem->getId()] as $childitem):
77
+ if ($estimate = $this->_getEstimateDate($childitem->getProduct())):
78
+ $epoch = strtotime($estimate);
79
+ $estimates[$epoch] = $estimate;
80
+ endif;
81
+ endforeach;
82
+ if (!empty($estimates)):
83
+ ksort($estimates);
84
+ $estimate = end($estimates);
85
+ if ($epoch = strtotime($estimate)):
86
+ if ($timestamp = date('Y-m-d H:i:s', $epoch)):
87
+ $bundleitem->setBackorderEstimate($timestamp);
88
+ endif;
89
+ endif;
90
+ endif;
91
+ endif;
92
+ endforeach;
93
+ }
94
+
95
+ private function _getEstimateDate($product)
96
+ {
97
+ return $this->_getHelper()->getEstimatedDispatch($product);
98
+ }
99
+
100
+ private function _getHelper()
101
+ {
102
+ if (!isset($this->_helper)):
103
+ $this->_helper = Mage::helper('backorder');
104
+ endif;
105
+
106
+ return $this->_helper;
107
+ }
108
  }
app/code/community/HusseyCoding/Backorder/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <HusseyCoding_Backorder>
5
- <version>1.0.3</version>
6
  </HusseyCoding_Backorder>
7
  </modules>
8
  <global>
@@ -34,6 +34,16 @@
34
  </setup>
35
  </backorder_setup>
36
  </resources>
 
 
 
 
 
 
 
 
 
 
37
  </global>
38
  <frontend>
39
  <layout>
@@ -71,4 +81,13 @@
71
  </sales_order_place_after>
72
  </events>
73
  </frontend>
 
 
 
 
 
 
 
 
 
74
  </config>
2
  <config>
3
  <modules>
4
  <HusseyCoding_Backorder>
5
+ <version>1.0.5</version>
6
  </HusseyCoding_Backorder>
7
  </modules>
8
  <global>
34
  </setup>
35
  </backorder_setup>
36
  </resources>
37
+ <events>
38
+ <sales_order_place_after>
39
+ <observers>
40
+ <global_sales_order_place_after_backorder>
41
+ <class>backorder/observer</class>
42
+ <method>globalSalesOrderPlaceAfter</method>
43
+ </global_sales_order_place_after_backorder>
44
+ </observers>
45
+ </sales_order_place_after>
46
+ </events>
47
  </global>
48
  <frontend>
49
  <layout>
81
  </sales_order_place_after>
82
  </events>
83
  </frontend>
84
+ <adminhtml>
85
+ <layout>
86
+ <updates>
87
+ <backorder>
88
+ <file>backorder.xml</file>
89
+ </backorder>
90
+ </updates>
91
+ </layout>
92
+ </adminhtml>
93
  </config>
app/code/community/HusseyCoding/Backorder/etc/system.xml CHANGED
@@ -94,6 +94,15 @@
94
  <show_in_store>1</show_in_store>
95
  <comment>Comma separated dynamic holiday dates in format day of week (1-7, Mon-Sun)-week in the month-month i.e. 1-1-5 for May Day (first Monday in May). Use 'last' for last week of the month i.e. 1-last-5</comment>
96
  </dynamic_holidays>
 
 
 
 
 
 
 
 
 
97
  </fields>
98
  </general>
99
  </groups>
94
  <show_in_store>1</show_in_store>
95
  <comment>Comma separated dynamic holiday dates in format day of week (1-7, Mon-Sun)-week in the month-month i.e. 1-1-5 for May Day (first Monday in May). Use 'last' for last week of the month i.e. 1-last-5</comment>
96
  </dynamic_holidays>
97
+ <handling_time>
98
+ <label>Handling Time</label>
99
+ <frontend_type>text</frontend_type>
100
+ <sort_order>9</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ <show_in_store>1</show_in_store>
104
+ <comment>Global handling time, overridden by handling time on each product. Entered as human readable text string i.e. '1 day'</comment>
105
+ </handling_time>
106
  </fields>
107
  </general>
108
  </groups>
app/code/community/HusseyCoding/Backorder/sql/backorder_setup/upgrade-1.0.3-1.0.4.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'backorder_handling', array(
4
+ 'type' => 'varchar',
5
+ 'label' => 'Backorder Handling Time',
6
+ 'input' => 'text',
7
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
8
+ 'visible' => true,
9
+ 'required' => false,
10
+ 'user_defined' => true,
11
+ 'searchable' => false,
12
+ 'filterable' => false,
13
+ 'comparable' => false,
14
+ 'visible_on_front' => false,
15
+ 'unique' => false,
16
+ 'apply_to' => 'simple,configurable,bundle,grouped',
17
+ 'is_configurable' => false
18
+ ));
19
+
20
+ foreach ($installer->getAllAttributeSetIds('catalog_product') as $setid):
21
+ $attributeid = $installer->getAttributeId('catalog_product', 'backorder_handling');
22
+ $groupid = $installer->getDefaultAttributeGroupId('catalog_product', $setid);
23
+ $installer->addAttributeToSet('catalog_product', $setid, $groupid, $attributeid);
24
+ endforeach;
app/code/community/HusseyCoding/Backorder/sql/backorder_setup/upgrade-1.0.4-1.0.5.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+
6
+ $installer->run("
7
+ ALTER TABLE `{$this->getTable('sales/order_item')}` ADD `backorder_estimate` TIMESTAMP NULL;
8
+ ");
9
+
10
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/backorder.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <adminhtml_sales_order_view>
4
+ <block type="backorder/adminhtml_estimate" name="adminhtml_backorder" template="backorder/estimate.phtml" parent="before_body_end" />
5
+ <reference name="head">
6
+ <action method="addItem">
7
+ <type>skin_js</type>
8
+ <name>backorder/js/estimate.js</name>
9
+ </action>
10
+ <action method="addItem">
11
+ <type>skin_css</type>
12
+ <name>backorder/css/estimate.css</name>
13
+ </action>
14
+ </reference>
15
+ </adminhtml_sales_order_view>
16
+ </layout>
app/design/adminhtml/default/default/template/backorder/estimate.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ($this->isEnabled()): ?>
2
+ <script type="text/javascript">
3
+ //<![CDATA[
4
+ var thisbackorder = new backorder();
5
+ thisbackorder.orderestimates = <?php echo $this->getOrderEstimates(); ?>;
6
+ thisbackorder.estimatetext = "<?php echo $this->__('Estimated dispatch'); ?>";
7
+
8
+ thisbackorder.afterInit();
9
+ //]]>
10
+ </script>
11
+ <?php endif; ?>
app/design/frontend/base/default/layout/backorder.xml CHANGED
@@ -19,4 +19,24 @@
19
  </reference>
20
  <block type="backorder/estimate" name="backorder" template="backorder/estimate.phtml" parent="before_body_end" />
21
  </backorder_layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  </layout>
19
  </reference>
20
  <block type="backorder/estimate" name="backorder" template="backorder/estimate.phtml" parent="before_body_end" />
21
  </backorder_layout>
22
+ <sales_order_view>
23
+ <block type="backorder/customer_estimate" name="customer_backorder" template="backorder/customer/estimate.phtml" parent="before_body_end" />
24
+ <reference name="head">
25
+ <action method="addItem">
26
+ <type>skin_js</type>
27
+ <name>js/backorder/customer.js</name>
28
+ </action>
29
+ <action method="addItem">
30
+ <type>skin_css</type>
31
+ <name>css/backorder.css</name>
32
+ </action>
33
+ </reference>
34
+ </sales_order_view>
35
+ <sales_email_order_items>
36
+ <reference name="items">
37
+ <action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>backorder/email/order/items/order/default.phtml</template></action>
38
+ <action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>backorder/email/order/items/order/default.phtml</template></action>
39
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>backorder/bundle/email/order/items/order/default.phtml</template></action>
40
+ </reference>
41
+ </sales_email_order_items>
42
  </layout>
app/design/frontend/base/default/template/backorder/bundle/email/order/items/order/default.phtml ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_item = $this->getItem() ?>
2
+ <?php $_order=$this->getOrder() ?>
3
+
4
+ <?php $parentItem = $this->getItem() ?>
5
+ <?php $items = array_merge(array($parentItem), $parentItem->getChildrenItems()); ?>
6
+
7
+ <?php if($this->getItemOptions() || $_item->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
8
+ <?php $_showlastRow = true ?>
9
+ <?php else: ?>
10
+ <?php $_showlastRow = false ?>
11
+ <?php endif; ?>
12
+
13
+ <?php $_prevOptionId = '' ?>
14
+
15
+ <?php foreach ($items as $_item): ?>
16
+
17
+ <?php if ($_item->getParentItem()): ?>
18
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
19
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
20
+ <tr>
21
+ <td align="left" valign="top" style="padding:3px 9px"><strong><em><?php echo $attributes['option_label'] ?></em></strong></td>
22
+ <td>&nbsp;</td>
23
+ <td>&nbsp;</td>
24
+ <td>&nbsp;</td>
25
+ </tr>
26
+ <?php $_prevOptionId = $attributes['option_id'] ?>
27
+ <?php endif; ?>
28
+ <?php endif; ?>
29
+ <tr id="order-item-row-<?php echo $_item->getId() ?>">
30
+ <?php if (!$_item->getParentItem()): ?>
31
+ <td align="left" valign="top" style="padding:3px 9px">
32
+ <strong><?php echo $this->escapeHtml($_item->getName()) ?></strong>
33
+ <?php if (Mage::helper('backorder')->isEnabled()): ?>
34
+ <?php if ($estimate = $_item->getBackorderEstimate()): ?>
35
+ <?php if ($epoch = strtotime($estimate)): ?>
36
+ <?php if ($string = date('l, jS F', $epoch)): ?>
37
+ <br />
38
+ <?php echo $this->__('Estimated dispatch') . ': ' . $string; ?>
39
+ <?php endif; ?>
40
+ <?php endif; ?>
41
+ <?php endif; ?>
42
+ <?php endif; ?>
43
+ </td>
44
+ <?php else: ?>
45
+ <td align="left" valign="top" style="padding:3px 19px"><?php echo $this->getValueHtml($_item)?></td>
46
+ <?php endif; ?>
47
+ <td align="left" valign="top" style="padding:3px 9px"><?php echo $this->escapeHtml($_item->getSku()) ?></td>
48
+ <td align="center" valign="top" style="padding:3px 9px">
49
+ <?php if (!$_item->getParentItem()): ?>
50
+ <?php echo $_item->getQtyOrdered()*1 ?>
51
+ <?php else: ?>
52
+ &nbsp;
53
+ <?php endif; ?>
54
+ </td>
55
+ <td align="right" valign="top" style="padding:3px 9px">
56
+ <?php if (!$_item->getParentItem()): ?>
57
+ <?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
58
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
59
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
60
+ <?php endif; ?>
61
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
62
+ <?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
63
+ <?php else: ?>
64
+ <?php echo $_order->formatPrice($_item->getRowTotal()) ?>
65
+ <?php endif; ?>
66
+
67
+
68
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
69
+ <br />
70
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
71
+ <small>
72
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
73
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
74
+ <?php endforeach; ?>
75
+ </small>
76
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
77
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
78
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></small></span><br />
79
+ <?php endforeach; ?>
80
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
81
+ <small>
82
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
83
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
84
+ <?php endforeach; ?>
85
+ </small>
86
+ <?php endif; ?>
87
+
88
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
89
+ <br />
90
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
91
+ <?php endif; ?>
92
+ <?php endif; ?>
93
+ <?php endif; ?>
94
+
95
+
96
+ <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
97
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
98
+ <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
99
+ <?php endif; ?>
100
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
101
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
102
+ <?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
103
+ <?php else: ?>
104
+ <?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
105
+ <?php endif; ?>
106
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
107
+ <br />
108
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
109
+ <small>
110
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
111
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
112
+ <?php endforeach; ?>
113
+ </small>
114
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
115
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
116
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
117
+ <?php endforeach; ?>
118
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
119
+ <small>
120
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
121
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
122
+ <?php endforeach; ?>
123
+ </small>
124
+ <?php endif; ?>
125
+
126
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
127
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
128
+ <?php endif; ?>
129
+ <?php endif; ?>
130
+ <?php endif; ?>
131
+ <?php else: ?>
132
+ &nbsp;
133
+ <?php endif; ?>
134
+ </td>
135
+ </tr>
136
+ <?php endforeach; ?>
137
+
138
+ <?php if ($_showlastRow): ?>
139
+ <tr>
140
+ <td align="left" valign="top" style="padding:3px 9px">
141
+ <?php if ($this->getItemOptions()): ?>
142
+ <dl style="margin:0; padding:0;">
143
+ <?php foreach ($this->getItemOptions() as $option): ?>
144
+ <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
145
+ <dd style="margin:0; padding:0 0 0 9px;"><?php echo $option['value'] ?></dd>
146
+ <?php endforeach; ?>
147
+ </dl>
148
+ <?php endif; ?>
149
+ <?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
150
+ <br /><strong><?php echo $this->__('Gift Message') ?></strong>
151
+ <br /><?php echo $this->__('From:'); ?> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?>
152
+ <br /><?php echo $this->__('To:'); ?> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
153
+ <br /><?php echo $this->__('Message:'); ?><br /> <?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
154
+ <?php endif; ?>
155
+ </td>
156
+ <td>&nbsp;</td>
157
+ <td>&nbsp;</td>
158
+ <td>&nbsp;</td>
159
+ </tr>
160
+ <?php endif; ?>
app/design/frontend/base/default/template/backorder/customer/estimate.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ($this->isEnabled()): ?>
2
+ <script type="text/javascript">
3
+ //<![CDATA[
4
+ var thisbackorder = new backorder();
5
+ thisbackorder.orderestimates = <?php echo $this->getOrderEstimates(); ?>;
6
+ thisbackorder.estimatetext = "<?php echo $this->__('Estimated dispatch'); ?>";
7
+
8
+ thisbackorder.afterInit();
9
+ //]]>
10
+ </script>
11
+ <?php endif; ?>
app/design/frontend/base/default/template/backorder/email/order/items/order/.LCKdefault.phtml~ ADDED
@@ -0,0 +1 @@
 
1
+ /home/husseycoding/husseycoding/Magento/extensions/clean/app/design/frontend/base/default/template/backorder/email/order/items/order/default.phtml
app/design/frontend/base/default/template/backorder/email/order/items/order/default.phtml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_item = $this->getItem() ?>
2
+ <?php $_order = $this->getItem()->getOrder() ?>
3
+ <tr>
4
+ <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
5
+ <strong style="font-size:11px;"><?php echo $this->escapeHtml($_item->getName()) ?></strong>
6
+ <?php if (Mage::helper('backorder')->isEnabled()): ?>
7
+ <?php if ($estimate = $_item->getBackorderEstimate()): ?>
8
+ <?php if ($epoch = strtotime($estimate)): ?>
9
+ <?php if ($string = date('l, jS F', $epoch)): ?>
10
+ <br />
11
+ <?php echo $this->__('Estimated dispatch') . ': ' . $string; ?>
12
+ <?php endif; ?>
13
+ <?php endif; ?>
14
+ <?php endif; ?>
15
+ <?php endif; ?>
16
+ <?php if ($this->getItemOptions()): ?>
17
+ <dl style="margin:0; padding:0;">
18
+ <?php foreach ($this->getItemOptions() as $option): ?>
19
+ <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
20
+ <dd style="margin:0; padding:0 0 0 9px;">
21
+ <?php echo nl2br($option['value']) ?>
22
+ </dd>
23
+ <?php endforeach; ?>
24
+ </dl>
25
+ <?php endif; ?>
26
+ <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
27
+ <?php if ($addInfoBlock) :?>
28
+ <?php echo $addInfoBlock->setItem($_item)->toHtml(); ?>
29
+ <?php endif; ?>
30
+ <?php echo $this->escapeHtml($_item->getDescription()) ?>
31
+ </td>
32
+ <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->escapeHtml($this->getSku($_item)) ?></td>
33
+ <td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $_item->getQtyOrdered()*1 ?></td>
34
+ <td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
35
+ <?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
36
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
37
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
38
+ <?php endif; ?>
39
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
40
+ <?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
41
+ <?php else: ?>
42
+ <?php echo $_order->formatPrice($_item->getRowTotal()) ?>
43
+ <?php endif; ?>
44
+
45
+
46
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
47
+ <br />
48
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
49
+ <small>
50
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
51
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
52
+ <?php endforeach; ?>
53
+ </small>
54
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
55
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
56
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></small></span><br />
57
+ <?php endforeach; ?>
58
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
59
+ <small>
60
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
61
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
62
+ <?php endforeach; ?>
63
+ </small>
64
+ <?php endif; ?>
65
+
66
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
67
+ <br />
68
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
69
+ <?php endif; ?>
70
+ <?php endif; ?>
71
+ <?php endif; ?>
72
+
73
+
74
+ <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
75
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
76
+ <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
77
+ <?php endif; ?>
78
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
79
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
80
+ <?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
81
+ <?php else: ?>
82
+ <?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
83
+ <?php endif; ?>
84
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
85
+ <br />
86
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
87
+ <small>
88
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
89
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
90
+ <?php endforeach; ?>
91
+ </small>
92
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
93
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
94
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
95
+ <?php endforeach; ?>
96
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
97
+ <small>
98
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
99
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
100
+ <?php endforeach; ?>
101
+ </small>
102
+ <?php endif; ?>
103
+
104
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
105
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
106
+ <?php endif; ?>
107
+ <?php endif; ?>
108
+ <?php endif; ?>
109
+ </td>
110
+ </tr>
111
+ <?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
112
+ <tr>
113
+ <td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
114
+ <strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
115
+ <?php echo $this->__('From:'); ?> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?><br />
116
+ <?php echo $this->__('To:'); ?> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?><br />
117
+ <strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
118
+ </td>
119
+ </tr>
120
+ <?php endif; ?>
app/design/frontend/base/default/template/backorder/estimate.phtml CHANGED
@@ -17,8 +17,8 @@
17
  thisbackorder.now = "<?php echo Mage::getModel('core/date')->timestamp(); ?>";
18
  thisbackorder.orderbeforestring = false;
19
  <?php if ($isproduct == 'true'): ?>
 
20
  <?php if ($estimate = $this->getProductEstimate()): ?>
21
- thisbackorder.producttype = "<?php echo $this->getProductType(); ?>";
22
  <?php if (!is_array($estimate)): ?>
23
  thisbackorder.productestimate = "<?php echo $estimate; ?>";
24
  <?php else: ?>
17
  thisbackorder.now = "<?php echo Mage::getModel('core/date')->timestamp(); ?>";
18
  thisbackorder.orderbeforestring = false;
19
  <?php if ($isproduct == 'true'): ?>
20
+ thisbackorder.producttype = "<?php echo $this->getProductType(); ?>";
21
  <?php if ($estimate = $this->getProductEstimate()): ?>
 
22
  <?php if (!is_array($estimate)): ?>
23
  thisbackorder.productestimate = "<?php echo $estimate; ?>";
24
  <?php else: ?>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HusseyCoding_Backorder</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Adds dispatch estimate notifications to product pages and the cart.</summary>
10
  <description>Adds a dispatch lead time attribute to each product which should be entered as a human readable text string describing the lead time for the product, i.e. 1 week and 3 days. For parent products (grouped, configurable and bundle) the lead time should be entered for the child simple products rather than the parent product - any lead time on a parent product will be ignored.</description>
11
- <notes>Fixed non stock managed logic, disabled for downloadable and virtual product types.</notes>
12
  <authors><author><name>Hussey Coding</name><user>husseycoding</user><email>info@husseycoding.co.uk</email></author></authors>
13
- <date>2015-03-10</date>
14
- <time>13:02:44</time>
15
- <contents><target name="magecommunity"><dir name="HusseyCoding"><dir name="Backorder"><dir name="Block"><file name="Estimate.php" hash="d72aca15f662940fe7c1a1db0faf1c90"/></dir><dir name="Helper"><file name="Data.php" hash="5e5b9078f5f8a9aa34e5b8d0c7d101d7"/></dir><dir name="Model"><file name="Observer.php" hash="971fa0f7da6d23849fdf856aa21f1499"/><dir name="Order"><file name="SalesItem.php" hash="04de33199c3fac846eefaa9276114183"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="398362af6bd568d1cb5cb616c73d461a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="81e616c4c65ddbd6e92728f8dc8e3fe5"/><file name="config.xml" hash="705009f4008acc391b9405e5e833c187"/><file name="system.xml" hash="c3a6eb4358c2718fa834b43aa4f3e9ab"/></dir><dir name="sql"><dir name="backorder_setup"><file name="install-1.0.0.php" hash="54c2cb1a423fad263b465df516da1ccb"/><file name="upgrade-1.0.0-1.0.1.php" hash="87b1f3a15a9e062691e33be10e39d330"/></dir></dir></dir><dir name="Common"><dir name="etc"><file name="system.xml" hash="6c9ba9f227b9adfc9abf97f17b46fdbf"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HusseyCoding_Backorder.xml" hash="97f4e05e024b0baa9f51ed3be9929168"/><file name="HusseyCoding_Common.xml" hash="31e82d3d9b3179c2fa9e002f9669da47"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="backorder.xml" hash="04d971a9830ffb2240b348783fec82bc"/></dir><dir name="template"><dir name="backorder"><file name="estimate.phtml" hash="0dcd530661f569dfb9db9f818397b787"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><file name="backorder.js" hash="d1515bb6ec6807a56b2e4adb3d28d5a2"/></dir><dir name="css"><file name="backorder.css" hash="f9601103bb20f597f9b58ec31d53ca6a"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HusseyCoding_Backorder</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Adds dispatch estimate notifications to product pages and the cart.</summary>
10
  <description>Adds a dispatch lead time attribute to each product which should be entered as a human readable text string describing the lead time for the product, i.e. 1 week and 3 days. For parent products (grouped, configurable and bundle) the lead time should be entered for the child simple products rather than the parent product - any lead time on a parent product will be ignored.</description>
11
+ <notes>Order today display logic fix, min out of stock quantity now pulled from config, added handling time, fixed lead time as date logic, added delivery estimates to order</notes>
12
  <authors><author><name>Hussey Coding</name><user>husseycoding</user><email>info@husseycoding.co.uk</email></author></authors>
13
+ <date>2015-07-28</date>
14
+ <time>15:15:23</time>
15
+ <contents><target name="magecommunity"><dir name="HusseyCoding"><dir name="Backorder"><dir name="Block"><dir name="Adminhtml"><file name="Estimate.php" hash="385e1c6b6984be79c5d1b0e26ac1ae38"/></dir><dir name="Customer"><file name="Estimate.php" hash="6e6d0edf0a2419a03d02c812430ac1dc"/></dir><dir name="Estimate"><file name="Common.php" hash="bb1ef493353c5a2ca2ca6f7b72b0fe82"/></dir><file name="Estimate.php" hash="d72aca15f662940fe7c1a1db0faf1c90"/></dir><dir name="controllers"><file name="IndexController.php" hash="398362af6bd568d1cb5cb616c73d461a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="81e616c4c65ddbd6e92728f8dc8e3fe5"/><file name="config.xml" hash="5dc9f1332e3d14bdc2093d1e08deb117"/><file name="system.xml" hash="f3903f9bd44783fd82c895b6bf92eade"/></dir><dir name="Helper"><file name="Data.php" hash="349453311bf4d5691ffacb258ab558a2"/></dir><dir name="Model"><file name="Observer.php" hash="7d83be0a6ae9ca9c8726d8db9c069de1"/><dir name="Order"><file name="SalesItem.php" hash="04de33199c3fac846eefaa9276114183"/></dir></dir><dir name="sql"><dir name="backorder_setup"><file name="install-1.0.0.php" hash="54c2cb1a423fad263b465df516da1ccb"/><file name="upgrade-1.0.0-1.0.1.php" hash="87b1f3a15a9e062691e33be10e39d330"/><file name="upgrade-1.0.3-1.0.4.php" hash="bef00d714a36ad2a2d093d0804390715"/><file name="upgrade-1.0.4-1.0.5.php" hash="d8ce9608c85c192dfc1d23070f2cd275"/></dir></dir></dir><dir name="Common"><dir name="etc"><file name="system.xml" hash="6c9ba9f227b9adfc9abf97f17b46fdbf"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HusseyCoding_Backorder.xml" hash="97f4e05e024b0baa9f51ed3be9929168"/><file name="HusseyCoding_Common.xml" hash="31e82d3d9b3179c2fa9e002f9669da47"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="backorder.xml" hash="ae19bf83ee5e57e66e3d02f7d66471ba"/></dir><dir name="template"><dir name="backorder"><dir name="bundle"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="ead8320a2ffbc1ff62e00752a148bba0"/></dir></dir></dir></dir></dir><dir name="customer"><file name="estimate.phtml" hash="06b9a643a15d4d6c703ac97b50f5ddd2"/></dir><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="7c10e6eab957575c37548a8b4f4c30bd"/><file name=".LCKdefault.phtml~" hash="fc43612dd0aea43db22c8e5dcfafa252"/></dir></dir></dir></dir><file name="estimate.phtml" hash="72630a99f3703fc726a486516f694b92"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="backorder.xml" hash="1a7857b4d23af1401afda19cf0dc2aa2"/></dir><dir name="template"><dir name="backorder"><file name="estimate.phtml" hash="06b9a643a15d4d6c703ac97b50f5ddd2"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><file name="backorder.js" hash="d1515bb6ec6807a56b2e4adb3d28d5a2"/><dir name="backorder"><file name="customer.js" hash="d63fd34949bf1bee192ccc48d2e805cd"/></dir></dir><dir name="css"><file name="backorder.css" hash="f9601103bb20f597f9b58ec31d53ca6a"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="backorder"><dir name="css"><file name="estimate.css" hash="d1e518f4f08c6ebdf5204bb016ce0372"/></dir><dir name="js"><file name="estimate.js" hash="032dd22494211533781eed6b94b7cb83"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/adminhtml/default/default/backorder/css/estimate.css ADDED
@@ -0,0 +1 @@
 
1
+ .dispatch-estimate span { color:#eb340a; }
skin/adminhtml/default/default/backorder/js/estimate.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ var backorder = Class.create({
2
+ afterInit: function() {
3
+ $H(this.orderestimates).each(function(estimate) {
4
+ $("order_item_" + estimate.key + "_title").insert({after: "<p class=\"dispatch-estimate\">" + this.estimatetext + ": <span>" + estimate.value + "</span></p>"});
5
+ }.bind(this));
6
+ }
7
+ });
skin/frontend/base/default/js/backorder/customer.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ var backorder = Class.create({
2
+ afterInit: function() {
3
+ $H(this.orderestimates).each(function(estimate) {
4
+ $("order-item-row-" + estimate.key).down("h3").insert({after: "<p class=\"dispatch-estimate\">" + this.estimatetext + ": <span>" + estimate.value + "</span></p>"});
5
+ }.bind(this));
6
+ }
7
+ });