Fontis_Australia - Version 2.0

Version Notes

Currently active are modules for BPAY, direct deposit, Australia Post, the addition of regions and postcodes, and the addition of ABN and phone number to the general configuration values (although currently not in use).

Download this release

Release Info

Developer Magento Core Team
Extension Fontis_Australia
Version 2.0
Comparing to
See all releases


Code changes from version 1.2.6 to 2.0

Files changed (25) hide show
  1. app/code/community/Fontis/Australia/Block/Bpay/Info.php.~1~ +80 -0
  2. app/code/community/Fontis/Australia/Block/Myshopping.php +83 -0
  3. app/code/community/Fontis/Australia/Block/Shopbot.php +88 -0
  4. app/code/community/Fontis/Australia/Helper/Bpay.php +58 -0
  5. app/code/community/Fontis/Australia/Model/Getprice/Child.php +83 -0
  6. app/code/community/Fontis/Australia/Model/Getprice/Cron.php +190 -0
  7. app/code/community/Fontis/Australia/Model/Myshopping/Child.php +101 -0
  8. app/code/community/Fontis/Australia/Model/Myshopping/Cron.php +146 -0
  9. app/code/community/Fontis/Australia/Model/Payment/Bpay.php +47 -56
  10. app/code/community/Fontis/Australia/Model/Payment/Directdeposit.php +0 -3
  11. app/code/community/Fontis/Australia/Model/Shopbot/Child.php +107 -0
  12. app/code/community/Fontis/Australia/Model/Shopbot/Cron.php +144 -0
  13. app/code/community/Fontis/Australia/Model/Shopbot/Cron.php~ +290 -0
  14. app/code/community/Fontis/Australia/etc/config.xml +113 -24
  15. app/code/community/Fontis/Australia/etc/system.xml +194 -20
  16. app/design/adminhtml/default/default/template/fontis/australia/payment/bpay/info.phtml +6 -5
  17. app/design/adminhtml/default/default/template/fontis/australia/system/config/form/field/array_dropdown.phtml +180 -0
  18. app/design/frontend/default/default/layout/fontis_australia.xml +45 -0
  19. app/design/frontend/default/default/template/fontis/australia/payment/bpay/form.phtml +3 -78
  20. app/design/frontend/default/default/template/fontis/australia/payment/bpay/info.phtml +4 -7
  21. app/design/frontend/default/default/template/fontis/australia/payment/bpay/success.phtml +40 -0
  22. app/design/frontend/default/default/template/fontis/australia/payment/directdeposit/success.phtml +38 -0
  23. app/design/frontend/default/default/template/fontis/australia/postcode.phtml.~1~ +0 -128
  24. package.xml +4 -4
  25. skin/frontend/default/default/images/fontis/bpay.png +0 -0
app/code/community/Fontis/Australia/Block/Bpay/Info.php.~1~ ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Chris Norton
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+
23
+ class Fontis_Australia_Block_Bpay_Info extends Mage_Payment_Block_Info
24
+ {
25
+
26
+ protected $_billerCode;
27
+ protected $_ref;
28
+
29
+ protected function _construct()
30
+ {
31
+ parent::_construct();
32
+ $this->setTemplate('fontis/australia/payment/bpay/info.phtml');
33
+ }
34
+
35
+ /**
36
+ * Gets the bank account name as set by the admin.
37
+ *
38
+ * @return string
39
+ */
40
+ public function getBillerCode()
41
+ {
42
+ if (is_null($this->_billerCode)) {
43
+ $this->_convertAdditionalData();
44
+ }
45
+ return $this->_billerCode;
46
+ }
47
+
48
+ /**
49
+ * Gets the ref code for this customer.
50
+ *
51
+ * @return string
52
+ */
53
+ public function getRef()
54
+ {
55
+ Mage::log('Info: ' . print_r($this->getInfo(), true), null, 'bpay.log');
56
+ if (is_null($this->_ref)) {
57
+ $this->_convertAdditionalData();
58
+ }
59
+ return $this->_ref;
60
+ }
61
+
62
+ /**
63
+ * Gets any additional data saved by the BPAY payment module.
64
+ *
65
+ * @return Fontis_Australia_Block_Bpay_Info
66
+ */
67
+ protected function _convertAdditionalData()
68
+ {
69
+ $details = @unserialize($this->getInfo()->getAdditionalData());
70
+ if (is_array($details)) {
71
+ $this->_billerCode = isset($details['biller_code']) ? (string) $details['biller_code'] : '';
72
+ $this->_ref = isset($details['ref']) ? (string) $details['ref'] : '';
73
+ } else {
74
+ $this->_billerCode = '';
75
+ $this->_ref = '';
76
+ }
77
+ return $this;
78
+ }
79
+
80
+ }
app/code/community/Fontis/Australia/Block/Myshopping.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ class Fontis_Australia_Block_Myshopping extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
22
+ {
23
+ protected $magentoOptions;
24
+
25
+ public function __construct()
26
+ {
27
+ $this->addColumn('magento', array(
28
+ 'label' => Mage::helper('adminhtml')->__('Magento product attribute'),
29
+ 'size' => 28,
30
+ ));
31
+ $this->addColumn('xmlfeed', array(
32
+ 'label' => Mage::helper('adminhtml')->__('Shopbot feed tag'),
33
+ 'size' => 28
34
+ ));
35
+ $this->_addAfter = false;
36
+ $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add linked attribute');
37
+
38
+ parent::__construct();
39
+ $this->setTemplate('fontis/australia/system/config/form/field/array_dropdown.phtml');
40
+
41
+ // product options
42
+ $eav_config_model = Mage::getModel('eav/config');
43
+ $attributes = $eav_config_model->getEntityAttributeCodes('catalog_product');
44
+
45
+ foreach($attributes as $att_code)
46
+ {
47
+ $attribute = $eav_config_model->getAttribute('catalog_product', $att_code);
48
+ Mage::log($attribute);
49
+
50
+ if ($att_code != ''
51
+ )
52
+ {
53
+ $this->magentoOptions[$att_code] = $att_code;
54
+ }
55
+ }
56
+ asort($this->magentoOptions);
57
+ }
58
+
59
+ protected function _renderCellTemplate($columnName)
60
+ {
61
+ if (empty($this->_columns[$columnName])) {
62
+ throw new Exception('Wrong column name specified.');
63
+ }
64
+ $column = $this->_columns[$columnName];
65
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
66
+
67
+ if($columnName == 'magento')
68
+ {
69
+ $rendered = '<select name="'.$inputName.'">';
70
+ foreach($this->magentoOptions as $att => $name)
71
+ {
72
+ $rendered .= '<option value="'.$att.'">'.$name.'</option>';
73
+ }
74
+ $rendered .= '</select>';
75
+ }
76
+ else
77
+ {
78
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' . ($column['size'] ? 'size="' . $column['size'] . '"' : '') . '/>';
79
+ }
80
+
81
+ return $rendered;
82
+ }
83
+ }
app/code/community/Fontis/Australia/Block/Shopbot.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ class Fontis_Australia_Block_Shopbot extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
22
+ {
23
+ protected $magentoOptions;
24
+
25
+ public function __construct()
26
+ {
27
+ $this->addColumn('magento', array(
28
+ 'label' => Mage::helper('adminhtml')->__('Magento product attribute'),
29
+ 'size' => 28,
30
+ ));
31
+ $this->addColumn('xmlfeed', array(
32
+ 'label' => Mage::helper('adminhtml')->__('Shopbot feed tag'),
33
+ 'size' => 28
34
+ ));
35
+ $this->_addAfter = false;
36
+ $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add linked attribute');
37
+
38
+ parent::__construct();
39
+ $this->setTemplate('fontis/australia/system/config/form/field/array_dropdown.phtml');
40
+
41
+ // extra options
42
+ $this->magentoOptions['FONTIS-product-id'] = 'Product ID';
43
+ $this->magentoOptions['FONTIS-category'] = 'Product Category';
44
+ $this->magentoOptions['FONTIS-image-link'] = 'Product Image Link';
45
+
46
+ // product options
47
+ $eav_config_model = Mage::getModel('eav/config');
48
+ $attributes = $eav_config_model->getEntityAttributeCodes('catalog_product');
49
+
50
+ foreach($attributes as $att_code)
51
+ {
52
+ $attribute = $eav_config_model->getAttribute('catalog_product', $att_code);
53
+ Mage::log($attribute);
54
+
55
+ if ($att_code != ''
56
+ )
57
+ {
58
+ $this->magentoOptions[$att_code] = $att_code;
59
+ }
60
+ }
61
+ asort($this->magentoOptions);
62
+ }
63
+
64
+ protected function _renderCellTemplate($columnName)
65
+ {
66
+ if (empty($this->_columns[$columnName])) {
67
+ throw new Exception('Wrong column name specified.');
68
+ }
69
+ $column = $this->_columns[$columnName];
70
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
71
+
72
+ if($columnName == 'magento')
73
+ {
74
+ $rendered = '<select name="'.$inputName.'">';
75
+ foreach($this->magentoOptions as $att => $name)
76
+ {
77
+ $rendered .= '<option value="'.$att.'">'.$name.'</option>';
78
+ }
79
+ $rendered .= '</select>';
80
+ }
81
+ else
82
+ {
83
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' . ($column['size'] ? 'size="' . $column['size'] . '"' : '') . '/>';
84
+ }
85
+
86
+ return $rendered;
87
+ }
88
+ }
app/code/community/Fontis/Australia/Helper/Bpay.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Chris Norton
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ /**
23
+ * BPAY-specific helper
24
+ */
25
+ class Fontis_Australia_Helper_Bpay extends Mage_Core_Helper_Abstract
26
+ {
27
+ public function bpayInfoBlock($billerCode, $customerReferenceNumber)
28
+ {
29
+ $acceptCreditCards = Mage::getStoreConfig('payment/bpay/accept_credit_cards');
30
+
31
+ $output = '
32
+ <div id="bpay" style="border: 2px solid rgb(16, 32, 75); margin: 0px; padding: 6px; width: 238px; font-family: Arial,Helvetica,sans-serif; background-color: rgb(255, 255, 255);">
33
+ <div class="bpayLogo" style="border: 2px solid rgb(20, 44, 97); width: 51px; height 87px; float: left;">
34
+ <img src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'frontend/default/default/images/fontis/bpay.png' . '" height="82" width="51">
35
+ </div>
36
+ <div class="customerReferenceBox" style="border: 2px solid rgb(20, 44, 97); padding: 0px 8px; height: 87px; width: 158px; margin-left: 60px; margin-bottom: 4px;">
37
+ <p class="customerReferenceBoxText" style="font-size: 13px; text-transform: capitalize; color: rgb(20, 44, 97); white-space: nowrap; line-height: 22px; font-weight: normal;">
38
+ <b>Biller Code</b>: ' . $billerCode . '<br>
39
+ <b>Ref</b>: ' . $customerReferenceNumber . '<br>
40
+ </p>
41
+ </div>';
42
+
43
+ if($acceptCreditCards) {
44
+ $output .= '<div>
45
+ <p class="billerTextHeading" style="font-size: 11px; text-transform: capitalize; color: rgb(20, 44, 97); white-space: nowrap; line-height: 20px; font-weight: bold;">Telephone &amp; Internet Banking &mdash; BPAY&reg;</p>
46
+ <p class="billerText" style="font-size: 11px; color: rgb(20, 44, 97);">Contact your bank or financial institution to make this payment from your cheque, savings, debit, credit card or transaction account. More info: www.bpay.com.au</p>
47
+ </div>';
48
+ } else {
49
+ $output .= '<div>
50
+ <p class="billerTextHeading" style="font-size: 11px; text-transform: capitalize; color: rgb(20, 44, 97); white-space: nowrap; line-height: 20px; font-weight: bold;">Telephone &amp; Internet Banking &mdash; BPAY&reg;</p>
51
+ <p class="billerText" style="font-size: 11px; color: rgb(20, 44, 97);">Contact your bank or financial institution to make this payment from your cheque, savings, debit, credit card or transaction account. More info: www.bpay.com.au</p>
52
+ </div>';
53
+ }
54
+
55
+ $output .= '</div>';
56
+ return $output;
57
+ }
58
+ }
app/code/community/Fontis/Australia/Model/Getprice/Child.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ if (!isset($argv[1]) or !isset($argv[2]) or !isset($argv[3])) {
23
+ exit;
24
+ }
25
+ $mage_path = $argv[1];
26
+ $product_id = $argv[2];
27
+ $store_id = $argv[3];
28
+
29
+ // Start-up Magento stack
30
+ require_once $mage_path . '/app/Mage.php';
31
+ Mage::app($store_id);
32
+
33
+ // Load product, tax helper and generate final price information
34
+ $product = Mage::getModel('catalog/product')->load($product_id);
35
+ $tax = Mage::helper('tax');
36
+ $final_price = $tax->getPrice($product, $product->getFinalPrice(), true);
37
+
38
+ // This array is translated into XML when fed back to the cron parent PHP.
39
+ $array = array();
40
+
41
+ $array['num'] = $product->getEntityId();
42
+ $array['attribute1'] = htmlspecialchars($product->getName());
43
+ $array['upc'] = $product->getSku();
44
+ $array['product_url'] = $product->getProductUrl();
45
+
46
+ if (Mage::getStoreConfig('fontis_feeds/getpricefeed/manufacturer')) {
47
+ $manufacturer_name = $product->getResource()->
48
+ getAttribute('manufacturer')->getFrontend()->getValue($product);
49
+
50
+ if ($manufacturer_name != 'No') {
51
+ $array['manufacturer'] = $manufacturer_name;
52
+ }
53
+ }
54
+
55
+ $category_found = false;
56
+ $array['category_name'] = '';
57
+ foreach($product->getCategoryCollection() as $c) {
58
+ $children = $c->getData('children_count');
59
+ if ($children <= 0) {
60
+ $category_node[0] = $c->getName();
61
+
62
+ $loaded_categories = Mage::getModel('catalog/category')
63
+ ->getCollection()
64
+ ->addIdFilter(array($c->getId()))
65
+ ->addAttributeToSelect(array('name'), 'inner')->load();
66
+
67
+ foreach($loaded_categories as $loaded_category) {
68
+ $array['category_name'] = $loaded_category->getName();
69
+ }
70
+ $category_found = true;
71
+ }
72
+ }
73
+ if (!$category_found) {
74
+ $array['category_name'] = Mage::getStoreConfig('fontis_feeds/getpricefeed/defaultcategory');
75
+ }
76
+
77
+ $array['description'] = $product->getDescription();
78
+ $array['image'] = (string)Mage::helper('catalog/image')->init($product, 'image');
79
+ $array['price'] = $final_price;
80
+ $array['currency'] = Mage::getStoreConfig('fontis_feeds/getpricefeed/currency');
81
+
82
+ // Serialize and print as a string for the cron parent PHP code to grab.
83
+ echo serialize($array);
app/code/community/Fontis/Australia/Model/Getprice/Cron.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ function addProductXmlCallback($args)
23
+ {
24
+ $product = $args['product'];
25
+ $product->setData($args['row']);
26
+ addProductXml($product);
27
+ }
28
+
29
+ function addProductXml($product)
30
+ {
31
+ $product_id = $product->getId();
32
+ $store_id = Fontis_Australia_Model_GetPrice_Cron::$store->getId();
33
+
34
+ $data = exec("php " . Mage::getBaseDir() . "/app/code/community/Fontis/Australia/Model/Getprice/Child.php " . Mage::getBaseDir() . " " . $product_id . " " . $store_id);
35
+ $array = unserialize($data);
36
+
37
+ $product_node = Fontis_Australia_Model_GetPrice_Cron::$root_node->addChild('product');
38
+
39
+ foreach($array as $key => $val) {
40
+ if ($key == "num") {
41
+ $product_node->addAttribute($key, $val);
42
+ } else {
43
+ $product_node->addChild($key, $val);
44
+ }
45
+ }
46
+ }
47
+
48
+ class Fontis_Australia_Model_GetPrice_Cron
49
+ {
50
+ public static $doc;
51
+ public static $root_node;
52
+ public static $store;
53
+
54
+ protected function _construct()
55
+ {
56
+ }
57
+
58
+ protected function getPath()
59
+ {
60
+ $path = "";
61
+ $config_path = Mage::getStoreConfig('fontis_feeds/getpricefeed/output');
62
+
63
+ if (substr($config_path, 0, 1) == "/") {
64
+ $path = $config_path . '/';
65
+ } else {
66
+ $path = Mage::getBaseDir() . '/' . $config_path . '/';
67
+ }
68
+
69
+ return str_replace('//', '/', $path);
70
+ }
71
+
72
+ public function nonstatic()
73
+ {
74
+ self::update();
75
+ }
76
+
77
+ public static function update()
78
+ {
79
+ Mage::log('Fontis/Australia_Model_Getprice_Cron: entered update function');
80
+ session_start();
81
+
82
+ if (Mage::getStoreConfig('fontis_feeds/getpricefeed/active')) {
83
+ $io = new Varien_Io_File();
84
+ $io->setAllowCreateFolders(true);
85
+
86
+ $io->open(array('path' => self::getPath()));
87
+
88
+ foreach(Mage::app()->getStores() as $store) {
89
+ $clean_store_name = str_replace('+', '-', strtolower(urlencode($store->getName())));
90
+
91
+ $categories_result = self::getCategoriesXml($store);
92
+ $products_result = self::getProductsXml($store);
93
+
94
+ // Write the leaf categories xml file:
95
+ $io->write($clean_store_name . '-categories.xml', $categories_result['xml']);
96
+
97
+ // Write the entire products xml file:
98
+ $io->write($clean_store_name . '-products.xml', $products_result['xml']);
99
+
100
+ // Write for each leaf category, their products xml file:
101
+ foreach($categories_result['link_ids'] as $link_id) {
102
+ $subcategory_products_result = self::getProductsXml($store, $link_id);
103
+ $io->write($clean_store_name . '-products-'.$link_id.'.xml', $subcategory_products_result['xml']);
104
+ }
105
+ }
106
+
107
+ $io->close();
108
+ }
109
+ }
110
+
111
+ public function getCategoriesXml($store)
112
+ {
113
+ $result = array();
114
+ $categories = Mage::getModel('catalog/category')->getCollection()
115
+ ->setStoreId($store->getId())
116
+ ->addAttributeToFilter('is_active', 1);
117
+
118
+ $categories->load()->getItems();
119
+
120
+ $full_categories = array();
121
+
122
+ foreach($categories as $category) {
123
+ $id = $category->getId();
124
+ $category = Mage::getModel('catalog/category')->load($id);
125
+
126
+ $children = $category->getAllChildren(true);
127
+ if (count($children) <= 1) {
128
+ $full_categories[] = $category;
129
+ }
130
+ }
131
+
132
+ $storeUrl = $store->getBaseUrl();
133
+ $shopName = $store->getName();
134
+ $date = date("d-m-Y", Mage::getModel('core/date')->timestamp(time()));
135
+ $time = date("h:i:s", Mage::getModel('core/date')->timestamp(time()));
136
+
137
+ $doc = new SimpleXMLElement('<store url="' . $storeUrl. '" date="'.$date.'" time="'.$time.'" name="' . $shopName . '"></store>');
138
+
139
+ foreach($full_categories as $category) {
140
+ $category_node = $doc->addChild('cat');
141
+
142
+ $title_node = $category_node->addChild('name');
143
+ $title_node[0] = $category->getName();
144
+
145
+ $link_node = $category_node->addChild('link');
146
+ $link_node[0] = Mage::getStoreConfig('web/unsecure/base_url') . 'products-' . $category->getId() . '.xml';
147
+
148
+ $result['link_ids'][] = $category->getId();
149
+ }
150
+
151
+ $result['xml'] = $doc->asXml();
152
+ return $result;
153
+ }
154
+
155
+ public function getProductsXml($store, $cat_id = -1)
156
+ {
157
+ Fontis_Australia_Model_GetPrice_Cron::$store = $store;
158
+ $result = array();
159
+
160
+ $product = Mage::getModel('catalog/product');
161
+ $products = $product->getCollection();
162
+ $products->setStoreId($store);
163
+ $products->addStoreFilter();
164
+ $products->addAttributeToSelect('*');
165
+ $products->addAttributeToSelect(array('name', 'price', 'image', 'status', 'manufacturer'), 'left');
166
+ $products->addAttributeToFilter('type_id', 'simple');
167
+
168
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
169
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
170
+
171
+ if ($cat_id != -1) {
172
+ $products->getSelect()->where("e.entity_id IN (
173
+ SELECT product_id FROM catalog_category_product WHERE category_id = ".$cat_id."
174
+ )");
175
+ }
176
+
177
+ $storeUrl = $store->getBaseUrl();
178
+ $shopName = $store->getName();
179
+ $date = date("d-m-Y", Mage::getModel('core/date')->timestamp(time()));
180
+ $time = date("h:i:s", Mage::getModel('core/date')->timestamp(time()));
181
+
182
+ self::$doc = new SimpleXMLElement('<store url="' . $storeUrl. '" date="'.$date.'" time="'.$time.'" name="' . $shopName . '"></store>');
183
+ self::$root_node = self::$doc->addChild('products');
184
+
185
+ Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('addProductXmlCallback'), array('product' => $product));
186
+
187
+ $result['xml'] = self::$doc->asXml();
188
+ return $result;
189
+ }
190
+ }
app/code/community/Fontis/Australia/Model/Myshopping/Child.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ if (!isset($argv[1]) or !isset($argv[2]) or !isset($argv[3])) {
23
+ exit;
24
+ }
25
+ $mage_path = $argv[1];
26
+ $product_id = $argv[2];
27
+ $store_id = $argv[3];
28
+
29
+ // Start-up Magento stack
30
+ require_once $mage_path . '/app/Mage.php';
31
+ Mage::app($store_id);
32
+
33
+ // Load product, tax helper and generate final price information
34
+ $product = Mage::getModel('catalog/product')->load($product_id);
35
+ $tax = Mage::helper('tax');
36
+ $final_price = $tax->getPrice($product, $product->getFinalPrice(), true);
37
+
38
+ // This array is translated into XML when fed back to the cron parent PHP.
39
+ $array = array();
40
+
41
+ $array['Code'] = $product->getId();
42
+ $array['Name'] = htmlspecialchars($product->getName());
43
+ $array['Price'] = $final_price;
44
+ $array['Description'] = substr($product->getDescription(), 0, 255);
45
+ $array['Product_URL'] = $product->getProductUrl();
46
+ $array['Image_URL'] = (string)Mage::helper('catalog/image')->init($product, 'image');
47
+
48
+ $category_found = false;
49
+ $array['Category'] = "";
50
+ foreach($product->getCategoryCollection() as $c) {
51
+ $children = $c->getData('children_count');
52
+ if ($children <= 0) {
53
+ $array['Category'] = $c->getName();
54
+
55
+ $loaded_categories = Mage::getModel('catalog/category')
56
+ ->getCollection()
57
+ ->addIdFilter(array($c->getId()))
58
+ ->addAttributeToSelect(array('name'), 'inner')->load();
59
+
60
+ foreach($loaded_categories as $loaded_category) {
61
+ $array['Category'] = $loaded_category->getName();
62
+ }
63
+ $category_found = true;
64
+ }
65
+ }
66
+ if (!$category_found) {
67
+ $array['Category'] = Mage::getStoreConfig('fontis_feeds/myshoppingfeed/defaultcategory');
68
+ }
69
+
70
+ if ($product->isSaleable()) {
71
+ $array['InStock'] = 'Y';
72
+ } else {
73
+ $array['InStock'] = 'N';
74
+ }
75
+
76
+ $manufacturer_name = $product->getResource()->getAttribute('manufacturer')->getFrontend()->getValue($product);
77
+
78
+ if ($manufacturer_name == 'No') {
79
+ $array['Brand'] = 'Generic';
80
+ } else {
81
+ $array['Brand'] = $manufacturer_name;
82
+ }
83
+
84
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/myshoppingfeed/m_to_xml_attributes', $store_id));
85
+ if(!empty($linkedAttributes))
86
+ {
87
+ foreach($linkedAttributes as $la)
88
+ {
89
+ $magentoAtt = $la['magento'];
90
+ $xmlAtt = $la['xmlfeed'];
91
+
92
+ $value = $product->getResource()->getAttribute($magentoAtt)->getFrontend()->getValue($product);
93
+
94
+ if ($value != "") {
95
+ $array[$xmlAtt] = htmlspecialchars($value);
96
+ }
97
+ }
98
+ }
99
+
100
+ // Serialize and print as a string for the cron parent PHP code to grab.
101
+ echo serialize($array);
app/code/community/Fontis/Australia/Model/Myshopping/Cron.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ function addProductXmlCallback($args)
23
+ {
24
+ $product = $args['product'];
25
+ $product->setData($args['row']);
26
+ addProductXml($product);
27
+ }
28
+
29
+ function addProductXml($product)
30
+ {
31
+ $product_id = $product->getId();
32
+ $store_id = Fontis_Australia_Model_MyShopping_Cron::$store->getId();
33
+
34
+ $data = exec("php " . Mage::getBaseDir() . "/app/code/community/Fontis/Australia/Model/Myshopping/Child.php " . Mage::getBaseDir() . " " . $product_id . " " . $store_id);
35
+ $array = unserialize($data);
36
+
37
+ $product_node = Fontis_Australia_Model_Myshopping_Cron::$root_node->addChild('product');
38
+
39
+ Mage::log(var_export($array, true));
40
+
41
+ foreach($array as $key => $val) {
42
+ $product_node->addChild($key, $val);
43
+ }
44
+ }
45
+
46
+ class Fontis_Australia_Model_MyShopping_Cron
47
+ {
48
+ public static $doc;
49
+ public static $root_node;
50
+ public static $store;
51
+
52
+ protected function _construct()
53
+ {
54
+ }
55
+
56
+ protected function getPath()
57
+ {
58
+ $path = "";
59
+ $config_path = Mage::getStoreConfig('fontis_feeds/myshoppingfeed/output');
60
+
61
+ if (substr($config_path, 0, 1) == "/") {
62
+ $path = $config_path . '/';
63
+ } else {
64
+ $path = Mage::getBaseDir() . '/' . $config_path . '/';
65
+ }
66
+
67
+ return str_replace('//', '/', $path);
68
+ }
69
+
70
+ public static function update()
71
+ {
72
+ session_start();
73
+
74
+ Mage::log('Fontis/Australia_Model_MyShopping_Cron: entered update function');
75
+ if (Mage::getStoreConfig('fontis_feeds/myshoppingfeed/active')) {
76
+ $io = new Varien_Io_File();
77
+ $io->setAllowCreateFolders(true);
78
+
79
+ $io->open(array('path' => self::getPath()));
80
+
81
+ foreach(Mage::app()->getStores() as $store) {
82
+ Mage::log('for each store');
83
+ $clean_store_name = str_replace('+', '-', strtolower(urlencode($store->getName())));
84
+ $products_result = self::getProductsXml($store);
85
+
86
+ // Write the entire products xml file:
87
+ $io->write($clean_store_name . '-products.xml', $products_result['xml']);
88
+ Mage::log('successful write?');
89
+ }
90
+
91
+ $io->close();
92
+ }
93
+ }
94
+
95
+ public function nonstatic()
96
+ {
97
+ self::update();
98
+ }
99
+
100
+ public function getProductsXml($store)
101
+ {
102
+ Mage::log('new getproductsxml');
103
+ Fontis_Australia_Model_MyShopping_Cron::$store = $store;
104
+
105
+ $result = array();
106
+
107
+ $product = Mage::getModel('catalog/product');
108
+ $products = $product->getCollection();
109
+ $products->setStoreId($store);
110
+ $products->addStoreFilter();
111
+ $products->addAttributeToSelect('*');
112
+
113
+ $attributes_select_array = array('name', 'price', 'image', 'status');
114
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/myshoppingfeed/m_to_xml_attributes', $store->getId()));
115
+ if(!empty($linkedAttributes))
116
+ {
117
+ foreach($linkedAttributes as $la)
118
+ {
119
+ if (strpos($la['magento'], 'FONTIS') === false) {
120
+ $attributes_select_array[] = $la['magento'];
121
+ }
122
+ }
123
+ }
124
+
125
+ $products->addAttributeToSelect($attributes_select_array, 'left');
126
+ $products->addAttributeToFilter('type_id', 'simple');
127
+
128
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
129
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
130
+
131
+ $storeUrl = $store->getBaseUrl();
132
+ $shopName = $store->getName();
133
+ $date = date("d-m-Y", Mage::getModel('core/date')->timestamp(time()));
134
+ $time = date("h:i:s", Mage::getModel('core/date')->timestamp(time()));
135
+
136
+ self::$doc = new SimpleXMLElement('<productset></productset>');
137
+ self::$root_node = self::$doc;
138
+
139
+ Mage::log('about to walk');
140
+ Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('addProductXmlCallback'), array('product' => $product));
141
+ Mage::log('walked');
142
+
143
+ $result['xml'] = self::$doc->asXml();
144
+ return $result;
145
+ }
146
+ }
app/code/community/Fontis/Australia/Model/Payment/Bpay.php CHANGED
@@ -33,9 +33,6 @@ class Fontis_Australia_Model_Payment_Bpay extends Mage_Payment_Model_Method_Abst
33
 
34
  protected $_ref = null;
35
 
36
- // Set to allow the admin to set whether or not payment has been received.
37
- protected $_canCapture = true;
38
-
39
  public function isAvailable($quote = null)
40
  {
41
  $groupAccess = $this->getConfigData('customer_group_access');
@@ -105,66 +102,60 @@ class Fontis_Australia_Model_Payment_Bpay extends Mage_Payment_Model_Method_Abst
105
 
106
  public function getRef()
107
  {
108
- if($this->_ref)
109
- {
110
  return $this->_ref;
111
- }
112
- else
113
- {
114
  // Check whether we will be calculating the reference code based on
115
  // the customer ID or the order ID.
116
- if($this->getConfigData('calculate_using_customerid'))
117
- {
118
- $customer_id = Mage::getSingleton('customer/session')->getCustomerId();
119
-
120
- if($customer_id)
121
- {
122
- $this->_ref = $this->calculateRef($customer_id);
123
- return $this->_ref;
124
- }
125
- else
126
- {
127
- return null;
 
128
  }
129
- }
130
- else
131
- {
132
  $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
133
- $this->_ref = 0123456789;
134
- return $this->_ref;
135
- }
136
-
137
- }
138
  }
139
 
140
- public function calculateRef($number)
141
  {
142
- $revstr = strrev(intval($number));
143
- $total = 0;
144
- for ($i = 0;$i < strlen($revstr); $i++)
145
- {
146
- if ($i%2 == 0)
147
- {
148
- $multiplier = 2;
149
- }
150
- else
151
- {
152
- $multiplier = 1;
153
- }
154
-
155
- $sub_total = intval($revstr[$i]) * $multiplier;
156
-
157
- if ($sub_total >= 10)
158
- {
159
- $temp = (string) $sub_total;
160
- $sub_total = intval($temp[0]) + intval($temp[1]);
161
- }
162
-
163
- $total += $sub_total;
164
- }
165
-
166
- $check_digit = (10 - ($total % 10))%10;
167
- $crn = str_pad($number,6-1,0,STR_PAD_LEFT) . $check_digit ;
168
- return $crn;
169
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  }
33
 
34
  protected $_ref = null;
35
 
 
 
 
36
  public function isAvailable($quote = null)
37
  {
38
  $groupAccess = $this->getConfigData('customer_group_access');
102
 
103
  public function getRef()
104
  {
105
+ if($this->_ref) {
 
106
  return $this->_ref;
107
+ } else {
 
 
108
  // Check whether we will be calculating the reference code based on
109
  // the customer ID or the order ID.
110
+ if($this->getConfigData('calculate_using_customerid')) {
111
+ $customer_id = Mage::getSingleton('customer/session')->getCustomerId();
112
+ if($customer_id) {
113
+ $customer = Mage::getModel('customer/customer')->load($customer_id);
114
+ $this->_ref = $this->_calculateRef($customer->getIncrementId());
115
+ } else {
116
+ $customer_id = Mage::getSingleton('checkout/session')->getQuote()->getCustomerId();
117
+ if($customer_id) {
118
+ $customer = Mage::getModel('customer/customer')->load($customer_id);
119
+ $this->_ref = $this->_calculateRef($customer->getIncrementId());
120
+ } else {
121
+ return null;
122
+ }
123
  }
124
+ } else {
 
 
125
  $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
126
+ $this->_ref = $this->_calculateRef($order_id);
127
+ }
128
+ //$this->assignData();
129
+ }
130
+ return $this->_ref;
131
  }
132
 
133
+ public function getMessage()
134
  {
135
+ return $this->getConfigData('message');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  }
137
+
138
+ protected function _calculateRef($ref, $seperator = '', $crn_length = 6)
139
+ {
140
+ $revstr = strrev(intval($ref));
141
+ $total = 0;
142
+ for ($i = 0;$i < strlen($revstr); $i++) {
143
+
144
+ if ($i%2 == 0) {
145
+ $multiplier = 2;
146
+ }
147
+ else $multiplier = 1;
148
+
149
+ $sub_total = intval($revstr[$i]) * $multiplier;
150
+ if ($sub_total >= 10) {
151
+ $temp = (string) $sub_total;
152
+ $sub_total = intval($temp[0]) + intval($temp[1]);
153
+ }
154
+ $total += $sub_total;
155
+ }
156
+
157
+ $check_digit = (10 - ($total % 10))%10;
158
+ $crn = str_pad(ltrim($ref, "0"),$crn_length-1,0,STR_PAD_LEFT) .$seperator. $check_digit;
159
+ return $crn;
160
+ }
161
  }
app/code/community/Fontis/Australia/Model/Payment/Directdeposit.php CHANGED
@@ -33,9 +33,6 @@ class Fontis_Australia_Model_Payment_Directdeposit extends Mage_Payment_Model_Me
33
  protected $_code = 'directdeposit_au';
34
  protected $_formBlockType = 'fontis_australia_block_directdeposit_form';
35
  protected $_infoBlockType = 'fontis_australia_block_directdeposit_info';
36
-
37
- // Set to allow the admin to set whether or not payment has been received.
38
- protected $_canCapture = true;
39
 
40
  public function isAvailable($quote = null)
41
  {
33
  protected $_code = 'directdeposit_au';
34
  protected $_formBlockType = 'fontis_australia_block_directdeposit_form';
35
  protected $_infoBlockType = 'fontis_australia_block_directdeposit_info';
 
 
 
36
 
37
  public function isAvailable($quote = null)
38
  {
app/code/community/Fontis/Australia/Model/Shopbot/Child.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ if (!isset($argv[1]) or !isset($argv[2]) or !isset($argv[3])) {
23
+ exit;
24
+ }
25
+ $mage_path = $argv[1];
26
+ $product_id = $argv[2];
27
+ $store_id = $argv[3];
28
+
29
+ // Start-up Magento stack
30
+ require_once $mage_path . '/app/Mage.php';
31
+ Mage::app($store_id);
32
+
33
+ // Load product, tax helper and generate final price information
34
+ $product = Mage::getModel('catalog/product')->load($product_id);
35
+ $tax = Mage::helper('tax');
36
+ $final_price = $tax->getPrice($product, $product->getFinalPrice(), true);
37
+
38
+ // This array is translated into XML when fed back to the cron parent PHP.
39
+ $array = array();
40
+
41
+ $array['name'] = htmlspecialchars($product->getName());
42
+ $array['price'] = $final_price;
43
+ $array['link'] = $product->getProductUrl();
44
+
45
+ if ($product->isSaleable()) {
46
+ $array['availability'] = 'yes';
47
+ } else {
48
+ $array['availability'] = 'no';
49
+ }
50
+
51
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/shopbotfeed/m_to_xml_attributes', $store_id));
52
+ if(!empty($linkedAttributes))
53
+ {
54
+ foreach($linkedAttributes as $la)
55
+ {
56
+ $magentoAtt = $la['magento'];
57
+ $xmlAtt = $la['xmlfeed'];
58
+
59
+ if ($magentoAtt == "manufacturer") {
60
+ $manufacturer_name = $product->getResource()->
61
+ getAttribute('manufacturer')->getFrontend()->getValue($product);
62
+
63
+ if ($manufacturer_name != 'No') {
64
+ $array['manufacturer'] = $manufacturer_name;
65
+ }
66
+
67
+ } elseif ($magentoAtt == "FONTIS-image-link") {
68
+ $array[$xmlAtt] = (string)Mage::helper('catalog/image')->init($product, 'image');
69
+
70
+ } elseif ($magentoAtt == "FONTIS-product-id") {
71
+ $array[$xmlAtt] = $product->getId();
72
+
73
+ } elseif ($magentoAtt == "FONTIS-category") {
74
+ $category_found = false;
75
+ $array['category_name'] = "";
76
+ foreach($product->getCategoryCollection() as $c) {
77
+ $children = $c->getData('children_count');
78
+ if ($children <= 0) {
79
+ $array['category_name'] = $c->getName();
80
+
81
+ $loaded_categories = Mage::getModel('catalog/category')
82
+ ->getCollection()
83
+ ->addIdFilter(array($c->getId()))
84
+ ->addAttributeToSelect(array('name'), 'inner')->load();
85
+
86
+ foreach($loaded_categories as $loaded_category) {
87
+ $array['category_name'] = $loaded_category->getName();
88
+ }
89
+ $category_found = true;
90
+ }
91
+ }
92
+ if (!$category_found) {
93
+ $array['category_name'] = Mage::getStoreConfig('fontis_feeds/shopbotfeed/defaultcategory');
94
+ }
95
+
96
+ } else {
97
+ $value = $product->getResource()->getAttribute($magentoAtt)->getFrontend()->getValue($product);
98
+
99
+ if ($value != "") {
100
+ $array[$xmlAtt] = htmlspecialchars($value);
101
+ }
102
+ }
103
+ }
104
+ }
105
+
106
+ // Serialize and print as a string for the cron parent PHP code to grab.
107
+ echo serialize($array);
app/code/community/Fontis/Australia/Model/Shopbot/Cron.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ function addProductXmlCallback($args)
23
+ {
24
+ $product = $args['product'];
25
+ $product->setData($args['row']);
26
+ addProductXml($product);
27
+ }
28
+
29
+ function addProductXml($product)
30
+ {
31
+ $product_id = $product->getId();
32
+ $store_id = Fontis_Australia_Model_ShopBot_Cron::$store->getId();
33
+
34
+ $data = exec("php " . Mage::getBaseDir() . "/app/code/community/Fontis/Australia/Model/Shopbot/Child.php " . Mage::getBaseDir() . " " . $product_id . " " . $store_id);
35
+ $array = unserialize($data);
36
+
37
+ $product_node = Fontis_Australia_Model_Shopbot_Cron::$root_node->addChild('product');
38
+
39
+ foreach($array as $key => $val) {
40
+ $product_node->addChild($key, $val);
41
+ }
42
+ }
43
+
44
+ class Fontis_Australia_Model_ShopBot_Cron
45
+ {
46
+ public static $doc;
47
+ public static $root_node;
48
+ public static $store;
49
+
50
+ protected function _construct()
51
+ {
52
+ }
53
+
54
+ protected function getPath()
55
+ {
56
+ $path = "";
57
+ $config_path = Mage::getStoreConfig('fontis_feeds/shopbotfeed/output');
58
+
59
+ if (substr($config_path, 0, 1) == "/") {
60
+ $path = $config_path . '/';
61
+ } else {
62
+ $path = Mage::getBaseDir() . '/' . $config_path . '/';
63
+ }
64
+
65
+ return str_replace('//', '/', $path);
66
+ }
67
+
68
+ public static function update()
69
+ {
70
+ session_start();
71
+
72
+ Mage::log('Fontis/Australia_Model_Shopbot_Cron: entered update function');
73
+ if (Mage::getStoreConfig('fontis_feeds/shopbotfeed/active')) {
74
+ $io = new Varien_Io_File();
75
+ $io->setAllowCreateFolders(true);
76
+
77
+ $io->open(array('path' => self::getPath()));
78
+
79
+ foreach(Mage::app()->getStores() as $store) {
80
+ Mage::log('for each store');
81
+ $clean_store_name = str_replace('+', '-', strtolower(urlencode($store->getName())));
82
+ $products_result = self::getProductsXml($store);
83
+
84
+ // Write the entire products xml file:
85
+ $io->write($clean_store_name . '-products.xml', $products_result['xml']);
86
+ }
87
+
88
+ $io->close();
89
+ }
90
+ }
91
+
92
+ public function nonstatic()
93
+ {
94
+ self::update();
95
+ }
96
+
97
+ public function getProductsXml($store)
98
+ {
99
+ Mage::log('new getproductsxml');
100
+ Fontis_Australia_Model_ShopBot_Cron::$store = $store;
101
+
102
+ $result = array();
103
+
104
+ $product = Mage::getModel('catalog/product');
105
+ $products = $product->getCollection();
106
+ $products->setStoreId($store);
107
+ $products->addStoreFilter();
108
+ $products->addAttributeToSelect('*');
109
+
110
+ $attributes_select_array = array('name', 'price', 'image', 'status');
111
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/shopbotfeed/m_to_xml_attributes', $store->getId()));
112
+ if(!empty($linkedAttributes))
113
+ {
114
+ foreach($linkedAttributes as $la)
115
+ {
116
+ if (strpos($la['magento'], 'FONTIS') === false) {
117
+ $attributes_select_array[] = $la['magento'];
118
+ }
119
+ }
120
+ }
121
+ Mage::log(var_export($attributes_select_array, true));
122
+
123
+ $products->addAttributeToSelect($attributes_select_array, 'left');
124
+ $products->addAttributeToFilter('type_id', 'simple');
125
+
126
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
127
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
128
+
129
+ $storeUrl = $store->getBaseUrl();
130
+ $shopName = $store->getName();
131
+ $date = date("d-m-Y", Mage::getModel('core/date')->timestamp(time()));
132
+ $time = date("h:i:s", Mage::getModel('core/date')->timestamp(time()));
133
+
134
+ self::$doc = new SimpleXMLElement('<store url="' . $storeUrl. '" date="'.$date.'" time="'.$time.'" name="' . $shopName . '"></store>');
135
+ self::$root_node = self::$doc->addChild('products');
136
+
137
+ Mage::log('about to walk');
138
+ Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('addProductXmlCallback'), array('product' => $product));
139
+ Mage::log('walked');
140
+
141
+ $result['xml'] = self::$doc->asXml();
142
+ return $result;
143
+ }
144
+ }
app/code/community/Fontis/Australia/Model/Shopbot/Cron.php~ ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Tom Greenaway
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ function addProductXmlCallback($args)
23
+ {
24
+ $product = $args['product'];
25
+ $product->setData($args['row']);
26
+ addProductXml($product);
27
+ }
28
+
29
+ function addProductXml($product)
30
+ {
31
+ $store = Fontis_Australia_Model_ShopBot_Cron::$store;
32
+
33
+ Mage::log('walking');
34
+
35
+ $product_node = Fontis_Australia_Model_ShopBot_Cron::$root_node
36
+ ->addChild('product');
37
+
38
+ $name_node = $product_node->addChild('name', $product->getName());
39
+
40
+ $price_node = $product_node->addChild('price', $product->getPrice());
41
+
42
+ $link_node = $product_node->addChild('link', $product->getProductUrl());
43
+
44
+ $availability_node = $product_node->addChild('availability');
45
+ if ($product->isSaleable()) {
46
+ $availability_node[0] = 'yes';
47
+ } else {
48
+ $availability_node[0] = 'no';
49
+ }
50
+
51
+ Mage::log('serialized area');
52
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/shopbotfeed/m_to_xml_attributes', $store->getId()));
53
+ if(!empty($linkedAttributes))
54
+ {
55
+ foreach($linkedAttributes as $la)
56
+ {
57
+ $magentoAtt = $la['magento'];
58
+ $xmlAtt = $la['xmlfeed'];
59
+
60
+ if ($magentoAtt == "FONTIS-image-link") {
61
+ $image_node = $product_node->addChild($xmlAtt);
62
+ $image_node[0] = (string)Mage::helper('catalog/image')->init($product, 'image');
63
+
64
+ } elseif ($magentoAtt == "FONTIS-product-id") {
65
+ $id_node = $product_node->addChild($xmlAtt);
66
+ $id_node[0] = $product->getId();
67
+
68
+ } elseif ($magentoAtt == "FONTIS-category") {
69
+ $category_found = false;
70
+ $category_node = $product_node->addChild('category_name');
71
+ foreach($product->getCategoryCollection() as $c) {
72
+ $children = $c->getData('children_count');
73
+ if ($children <= 0) {
74
+ $category_node[0] = $c->getName();
75
+
76
+ $loaded_categories = Mage::getModel('catalog/category')
77
+ ->getCollection()
78
+ ->addIdFilter(array($c->getId()))
79
+ ->addAttributeToSelect(array('name'), 'inner')->load();
80
+
81
+ foreach($loaded_categories as $loaded_category) {
82
+ $category_node[0] = $loaded_category->getName();
83
+ }
84
+ $category_found = true;
85
+ }
86
+ }
87
+ if (!$category_found) {
88
+ $category_node[0] = Mage::getStoreConfig('fontis_feeds/shopbotfeed/defaultcategory');
89
+ }
90
+
91
+ } else {
92
+ $value = $product->getResource()->getAttribute($magentoAtt)->getFrontend()->getValue($product);
93
+
94
+ if ($value != "") {
95
+ $extra_node = $product_node->addChild($xmlAtt);
96
+ $extra_node[0] = $value;
97
+ }
98
+ }
99
+ }
100
+ }
101
+ Mage::log('end of serialized area');
102
+ }
103
+
104
+ class Fontis_Australia_Model_ShopBot_Cron
105
+ {
106
+ public static $doc;
107
+ public static $root_node;
108
+ public static $store;
109
+
110
+ protected function _construct()
111
+ {
112
+ session_start();
113
+ }
114
+
115
+ protected function getPath()
116
+ {
117
+ $path = "";
118
+ $config_path = Mage::getStoreConfig('fontis_feeds/shopbotfeed/output');
119
+
120
+ if (substr($config_path, 0, 1) == "/") {
121
+ $path = $config_path . '/';
122
+ } else {
123
+ $path = Mage::getBaseDir() . '/' . $config_path . '/';
124
+ }
125
+
126
+ return str_replace('//', '/', $path);
127
+ }
128
+
129
+ public static function update()
130
+ {
131
+ Mage::log('Fontis/Australia_Model_Shopbot_Cron: entered update function');
132
+ if (Mage::getStoreConfig('fontis_feeds/shopbotfeed/active')) {
133
+ $io = new Varien_Io_File();
134
+ $io->setAllowCreateFolders(true);
135
+
136
+ $io->open(array('path' => self::getPath()));
137
+
138
+ foreach(Mage::app()->getStores() as $store) {
139
+ Mage::log('for each store');
140
+ $clean_store_name = str_replace('+', '-', strtolower(urlencode($store->getName())));
141
+ $products_result = self::getProductsXml($store);
142
+
143
+ // Write the entire products xml file:
144
+ $io->write($clean_store_name . '-products.xml', $products_result['xml']);
145
+ }
146
+
147
+ $io->close();
148
+ }
149
+ }
150
+
151
+ public function nonstatic()
152
+ {
153
+ self::update();
154
+ }
155
+
156
+ public function getProductsXml($store)
157
+ {
158
+ Mage::log('new getproductsxml');
159
+ Fontis_Australia_Model_ShopBot_Cron::$store = $store;
160
+
161
+ $result = array();
162
+
163
+ $product = Mage::getModel('catalog/product');
164
+ $products = $product->getCollection();
165
+ $products->setStoreId($store);
166
+ $products->addStoreFilter();
167
+ $products->addAttributeToSelect('*');
168
+
169
+ $attributes_select_array = array('name', 'price', 'image', 'status');
170
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/shopbotfeed/m_to_xml_attributes', $store->getId()));
171
+ if(!empty($linkedAttributes))
172
+ {
173
+ foreach($linkedAttributes as $la)
174
+ {
175
+ if (strpos($la['magento'], 'FONTIS') === false) {
176
+ $attributes_select_array[] = $la['magento'];
177
+ }
178
+ }
179
+ }
180
+ Mage::log(var_export($attributes_select_array, true));
181
+
182
+ $products->addAttributeToSelect($attributes_select_array, 'left');
183
+
184
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
185
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
186
+
187
+ $storeUrl = $store->getBaseUrl();
188
+ $shopName = $store->getName();
189
+ $date = date("d-m-Y", Mage::getModel('core/date')->timestamp(time()));
190
+ $time = date("h:i:s", Mage::getModel('core/date')->timestamp(time()));
191
+
192
+ self::$doc = new SimpleXMLElement('<store url="' . $storeUrl. '" date="'.$date.'" time="'.$time.'" name="' . $shopName . '"></store>');
193
+ self::$root_node = self::$doc->addChild('products');
194
+
195
+ Mage::log('about to walk');
196
+ Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('addProductXmlCallback'), array('product' => $product));
197
+ Mage::log('walked');
198
+
199
+ $result['xml'] = self::$doc->asXml();
200
+ return $result;
201
+ }
202
+
203
+ public function getProductsXmlOLD($store)
204
+ {
205
+ $result = array();
206
+
207
+ $products = Mage::getModel('catalog/product')->getCollection()
208
+ ->setStoreId($store->getId())
209
+ ->addAttributeToSelect('*')->addAttributeToFilter('status', 1);
210
+
211
+ $products->load()->getItems();
212
+
213
+ $storeUrl = $store->getBaseUrl();
214
+ $shopName = $store->getName();
215
+ $date = date("d-m-Y", Mage::getModel('core/date')->timestamp(time()));
216
+ $time = date("h:i:s", Mage::getModel('core/date')->timestamp(time()));
217
+
218
+ $doc = new SimpleXMLElement('<store url="' . $storeUrl. '" date="'.$date.'" time="'.$time.'" name="' . $shopName . '"></store>');
219
+ $root_node = $doc->addChild('products');
220
+
221
+ foreach($products as $product) {
222
+ $product_node = $root_node->addChild('product');
223
+
224
+ $name_node = $product_node->addChild('name');
225
+ $name_node[0] = $product->getName();
226
+
227
+ $price_node = $product_node->addChild('price');
228
+ $price_node[0] = $product->getPrice();
229
+
230
+ $link_node = $product_node->addChild('link');
231
+ $link_node[0] = $product->getProductUrl();
232
+
233
+ $availability_node = $product_node->addChild('availability');
234
+ if ($product->isSaleable()) {
235
+ $availability_node[0] = 'yes';
236
+ } else {
237
+ $availability_node[0] = 'no';
238
+ }
239
+
240
+ $linkedAttributes = @unserialize(Mage::getStoreConfig('fontis_feeds/shopbotfeed/m_to_xml_attributes', $store->getId()));
241
+ if(!empty($linkedAttributes))
242
+ {
243
+ foreach($linkedAttributes as $la)
244
+ {
245
+ $magentoAtt = $la['magento'];
246
+ $xmlAtt = $la['xmlfeed'];
247
+
248
+ if ($magentoAtt == "FONTIS-image-link") {
249
+ $image_node = $product_node->addChild($xmlAtt);
250
+ $image_node[0] = (string)Mage::helper('catalog/image')->init($product, 'image');
251
+
252
+ } elseif ($magentoAtt == "FONTIS-product-id") {
253
+ $id_node = $product_node->addChild($xmlAtt);
254
+ $id_node[0] = $product->getId();
255
+
256
+ } elseif ($magentoAtt == "FONTIS-category") {
257
+ $category_found = false;
258
+ $category_node = $product_node->addChild($xmlAtt);
259
+
260
+ foreach($product->getCategoryCollection() as $c) {
261
+ $cat = Mage::getModel('catalog/category')->load($c->getId());
262
+
263
+ $children = $cat->getAllChildren(true);
264
+
265
+ if (count($children) <= 1) {
266
+ $category_node[0] = $cat->getName();
267
+ $category_found = true;
268
+ }
269
+ }
270
+
271
+ if (!$category_found) {
272
+ $category_node[0] = Mage::getStoreConfig('fontis_feeds/shopbotfeed/defaultcategory');
273
+ }
274
+
275
+ } else {
276
+ $value = $product->getResource()->getAttribute($magentoAtt)->getFrontend()->getValue($product);
277
+
278
+ if ($value != "") {
279
+ $extra_node = $product_node->addChild($xmlAtt);
280
+ $extra_node[0] = $value;
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+
287
+ $result['xml'] = $doc->asXml();
288
+ return $result;
289
+ }
290
+ }
app/code/community/Fontis/Australia/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  <config>
24
  <modules>
25
  <Fontis_Australia>
26
- <version>1.2.6</version>
27
  <depends>
28
  <Mage_Shipping />
29
  <Mage_Payment />
@@ -32,6 +32,34 @@
32
  </depends>
33
  </Fontis_Australia>
34
  </modules>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  <global>
36
  <models>
37
  <australia>
@@ -92,6 +120,20 @@
92
  </gst>
93
  </methods>
94
  </tax>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  </sales>
96
  <events>
97
  <sales_order_shipment_save_after>
@@ -159,29 +201,76 @@
159
  </carriers>
160
 
161
  <payment>
162
- <bpay>
163
- <active>0</active>
164
- <model>australia/payment_bpay</model>
165
- <order_status>pending</order_status>
166
- <customer_group_access>0</customer_group_access>
167
- <customer_group>0</customer_group>
168
- <title>BPAY</title>
169
- <allowspecific>0</allowspecific>
170
- <calculate_using_customerid>0</calculate_using_customerid>
171
- </bpay>
172
- <directdeposit_au>
173
- <active>0</active>
174
- <model>australia/payment_directdeposit</model>
175
- <order_status>pending</order_status>
176
- <customer_group_access>0</customer_group_access>
177
- <customer_group>0</customer_group>
178
- <title>Direct Deposit</title>
179
- <account_name></account_name>
180
- <account_bsb>000000</account_bsb>
181
- <account_number>00000000</account_number>
182
- <allowspecific>0</allowspecific>
183
- <message>Please quote order number (displayed after checkout confirmation) when making your deposit. Order will be processed once payment has been received.</message>
184
- </directdeposit_au>
 
 
185
  </payment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  </default>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  </config>
23
  <config>
24
  <modules>
25
  <Fontis_Australia>
26
+ <version>2.0</version>
27
  <depends>
28
  <Mage_Shipping />
29
  <Mage_Payment />
32
  </depends>
33
  </Fontis_Australia>
34
  </modules>
35
+ <crontab>
36
+ <jobs>
37
+ <Fontis_Australia_Myshopping>
38
+ <schedule>
39
+ <cron_expr>0 0 * * *</cron_expr>
40
+ </schedule>
41
+ <run>
42
+ <model>australia/myshopping_cron::update</model>
43
+ </run>
44
+ </Fontis_Australia_Myshopping>
45
+ <Fontis_Australia_Shopbot>
46
+ <schedule>
47
+ <cron_expr>0 0 * * *</cron_expr>
48
+ </schedule>
49
+ <run>
50
+ <model>australia/shopbot_cron::update</model>
51
+ </run>
52
+ </Fontis_Australia_Shopbot>
53
+ <Fontis_Australia_Getprice>
54
+ <schedule>
55
+ <cron_expr>0 0 * * *</cron_expr>
56
+ </schedule>
57
+ <run>
58
+ <model>australia/getprice_cron::update</model>
59
+ </run>
60
+ </Fontis_Australia_Getprice>
61
+ </jobs>
62
+ </crontab>
63
  <global>
64
  <models>
65
  <australia>
120
  </gst>
121
  </methods>
122
  </tax>
123
+ <order>
124
+ <statuses>
125
+ <pending_bpay translate="label"><label>Pending BPAY</label></pending_bpay>
126
+ <pending_deposit translate="label"><label>Pending Direct Deposit</label></pending_deposit>
127
+ </statuses>
128
+ <states>
129
+ <new>
130
+ <statuses>
131
+ <pending_bpay/>
132
+ <pending_deposit/>
133
+ </statuses>
134
+ </new>
135
+ </states>
136
+ </order>
137
  </sales>
138
  <events>
139
  <sales_order_shipment_save_after>
201
  </carriers>
202
 
203
  <payment>
204
+ <bpay>
205
+ <active>0</active>
206
+ <model>australia/payment_bpay</model>
207
+ <order_status>pending</order_status>
208
+ <customer_group_access>0</customer_group_access>
209
+ <customer_group>0</customer_group>
210
+ <title>BPAY</title>
211
+ <allowspecific>0</allowspecific>
212
+ <calculate_using_customerid>0</calculate_using_customerid>
213
+ <accept_credit_cards>1</accept_credit_cards>
214
+ <message>Payment details will be displayed on order confirmation screen.</message>
215
+ </bpay>
216
+ <directdeposit_au>
217
+ <active>0</active>
218
+ <model>australia/payment_directdeposit</model>
219
+ <order_status>pending</order_status>
220
+ <customer_group_access>0</customer_group_access>
221
+ <customer_group>0</customer_group>
222
+ <title>Direct Deposit</title>
223
+ <account_name></account_name>
224
+ <account_bsb>000000</account_bsb>
225
+ <account_number>00000000</account_number>
226
+ <allowspecific>0</allowspecific>
227
+ <message>Please quote order number (displayed after checkout confirmation) when making your deposit. Order will be processed once payment has been received.</message>
228
+ </directdeposit_au>
229
  </payment>
230
+
231
+ <fontis_feeds>
232
+ <getpricefeed>
233
+ <output>getprice-feeds</output>
234
+ <defaultcategory>Products</defaultcategory>
235
+ <currency>AUS</currency>
236
+ </getpricefeed>
237
+ <shopbotfeed>
238
+ <output>shopbot-feeds/</output>
239
+ <defaultcategory>Products</defaultcategory>
240
+ <m_to_xml_attributes>a:4:{s:18:"_1260239763475_475";a:2:{s:7:"magento";s:12:"manufacturer";s:7:"xmlfeed";s:5:"brand";}s:18:"_1260241020747_747";a:2:{s:7:"magento";s:11:"description";s:7:"xmlfeed";s:11:"description";}s:18:"_1260413375112_112";a:2:{s:7:"magento";s:15:"FONTIS-category";s:7:"xmlfeed";s:8:"category";}s:18:"_1260420319241_241";a:2:{s:7:"magento";s:17:"FONTIS-image-link";s:7:"xmlfeed";s:5:"image";}}</m_to_xml_attributes>
241
+ </shopbotfeed>
242
+ <myshopping>
243
+ <output>myshopping-feeds/</output>
244
+ <defaultcategory>Products</defaultcategory>
245
+ <m_to_xml_attributes>a:4:{s:18:"_1260239763475_475";a:2:{s:7:"magento";s:12:"manufacturer";s:7:"xmlfeed";s:5:"brand";}s:18:"_1260241020747_747";a:2:{s:7:"magento";s:11:"description";s:7:"xmlfeed";s:11:"description";}s:18:"_1260413375112_112";a:2:{s:7:"magento";s:15:"FONTIS-category";s:7:"xmlfeed";s:8:"category";}s:18:"_1260420319241_241";a:2:{s:7:"magento";s:17:"FONTIS-image-link";s:7:"xmlfeed";s:5:"image";}}</m_to_xml_attributes>
246
+ </myshopping>
247
+ </fontis_feeds>
248
  </default>
249
+ <adminhtml>
250
+ <acl>
251
+ <resources>
252
+ <all>
253
+ <title>Allow Everything</title>
254
+ </all>
255
+ <admin>
256
+ <children>
257
+ <system>
258
+ <children>
259
+ <config>
260
+ <children>
261
+ <fontis_australia>
262
+ <title>Australia</title>
263
+ </fontis_australia>
264
+ <fontis_feeds>
265
+ <title>Feeds</title>
266
+ </fontis_feeds>
267
+ </children>
268
+ </config>
269
+ </children>
270
+ </system>
271
+ </children>
272
+ </admin>
273
+ </resources>
274
+ </acl>
275
+ </adminhtml>
276
  </config>
app/code/community/Fontis/Australia/etc/system.xml CHANGED
@@ -21,6 +21,12 @@
21
  */
22
  -->
23
  <config>
 
 
 
 
 
 
24
  <sections>
25
  <carriers>
26
  <groups>
@@ -448,15 +454,6 @@
448
  <show_in_website>1</show_in_website>
449
  <show_in_store>0</show_in_store>
450
  </active>
451
- <order_status translate="label">
452
- <label>New order status</label>
453
- <frontend_type>select</frontend_type>
454
- <source_model>adminhtml/system_config_source_order_status</source_model>
455
- <sort_order>2</sort_order>
456
- <show_in_default>1</show_in_default>
457
- <show_in_website>1</show_in_website>
458
- <show_in_store>0</show_in_store>
459
- </order_status>
460
  <customer_group_access translate="label">
461
  <label>Customer Group Access</label>
462
  <frontend_type>select</frontend_type>
@@ -506,7 +503,26 @@
506
  <show_in_default>1</show_in_default>
507
  <show_in_website>1</show_in_website>
508
  <show_in_store>1</show_in_store>
 
509
  </calculate_using_customerid>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  <allowspecific translate="label">
511
  <label>Payment from applicable countries</label>
512
  <frontend_type>allowspecific</frontend_type>
@@ -562,15 +578,6 @@
562
  <show_in_website>1</show_in_website>
563
  <show_in_store>0</show_in_store>
564
  </active>
565
- <order_status translate="label">
566
- <label>New order status</label>
567
- <frontend_type>select</frontend_type>
568
- <source_model>adminhtml/system_config_source_order_status</source_model>
569
- <sort_order>2</sort_order>
570
- <show_in_default>1</show_in_default>
571
- <show_in_website>1</show_in_website>
572
- <show_in_store>0</show_in_store>
573
- </order_status>
574
  <customer_group_access translate="label">
575
  <label>Customer Group Access</label>
576
  <frontend_type>select</frontend_type>
@@ -674,7 +681,14 @@
674
  </groups>
675
  </payment>
676
 
677
- <general>
 
 
 
 
 
 
 
678
  <groups>
679
  <business translate="label">
680
  <label>Business Details</label>
@@ -704,6 +718,166 @@
704
  </fields>
705
  </business>
706
  </groups>
707
- </general>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
  </sections>
709
  </config>
21
  */
22
  -->
23
  <config>
24
+ <tabs>
25
+ <fontis_extensions translate="label" module="australia">
26
+ <label>Fontis Extensions</label>
27
+ <sort_order>1000000</sort_order>
28
+ </fontis_extensions>
29
+ </tabs>
30
  <sections>
31
  <carriers>
32
  <groups>
454
  <show_in_website>1</show_in_website>
455
  <show_in_store>0</show_in_store>
456
  </active>
 
 
 
 
 
 
 
 
 
457
  <customer_group_access translate="label">
458
  <label>Customer Group Access</label>
459
  <frontend_type>select</frontend_type>
503
  <show_in_default>1</show_in_default>
504
  <show_in_website>1</show_in_website>
505
  <show_in_store>1</show_in_store>
506
+ <comment>Normally set to NO unless you use BPAY for recurring payments. Guest checkouts are NOT supported if this is set to YES.</comment>
507
  </calculate_using_customerid>
508
+ <accept_credit_cards translate="label">
509
+ <label>Accepts Credit Cards</label>
510
+ <frontend_type>select</frontend_type>
511
+ <source_model>adminhtml/system_config_source_yesno</source_model>
512
+ <sort_order>63</sort_order>
513
+ <show_in_default>1</show_in_default>
514
+ <show_in_website>1</show_in_website>
515
+ <show_in_store>1</show_in_store>
516
+ <comment>Set to NO if you do not accept credit card payments through BPAY. This simply changes the text presented to the customer.</comment>
517
+ </accept_credit_cards>
518
+ <message translate="label">
519
+ <label>Message</label>
520
+ <sort_order>64</sort_order>
521
+ <show_in_default>1</show_in_default>
522
+ <show_in_website>1</show_in_website>
523
+ <show_in_store>1</show_in_store>
524
+ <comment>Displayed during checkout. Customise this to notify your customers that they will be presented with BPAY information after checkout.</comment>
525
+ </message>
526
  <allowspecific translate="label">
527
  <label>Payment from applicable countries</label>
528
  <frontend_type>allowspecific</frontend_type>
578
  <show_in_website>1</show_in_website>
579
  <show_in_store>0</show_in_store>
580
  </active>
 
 
 
 
 
 
 
 
 
581
  <customer_group_access translate="label">
582
  <label>Customer Group Access</label>
583
  <frontend_type>select</frontend_type>
681
  </groups>
682
  </payment>
683
 
684
+ <fontis_australia>
685
+ <label>Australia</label>
686
+ <tab>fontis_extensions</tab>
687
+ <frontend_type>text</frontend_type>
688
+ <sort_order>999999</sort_order>
689
+ <show_in_default>1</show_in_default>
690
+ <show_in_website>1</show_in_website>
691
+ <show_in_store>1</show_in_store>
692
  <groups>
693
  <business translate="label">
694
  <label>Business Details</label>
718
  </fields>
719
  </business>
720
  </groups>
721
+ </fontis_australia>
722
+
723
+ <fontis_feeds>
724
+ <label>Feeds Generator</label>
725
+ <tab>fontis_extensions</tab>
726
+ <frontend_type>text</frontend_type>
727
+ <sort_order>999999</sort_order>
728
+ <show_in_default>1</show_in_default>
729
+ <show_in_website>1</show_in_website>
730
+ <show_in_store>1</show_in_store>
731
+ <groups>
732
+ <getpricefeed>
733
+ <label>GetPrice</label>
734
+ <frontend_type>text</frontend_type>
735
+ <sort_order>0</sort_order>
736
+ <show_in_default>1</show_in_default>
737
+ <show_in_website>1</show_in_website>
738
+ <show_in_store>1</show_in_store>
739
+ <fields>
740
+ <active translate="label">
741
+ <label>Enabled</label>
742
+ <frontend_type>select</frontend_type>
743
+ <source_model>adminhtml/system_config_source_yesno</source_model>
744
+ <sort_order>1</sort_order>
745
+ <show_in_default>1</show_in_default>
746
+ <show_in_website>1</show_in_website>
747
+ <show_in_store>0</show_in_store>
748
+ </active>
749
+ <output translate="label">
750
+ <label>Output Filename</label>
751
+ <frontend_type>text</frontend_type>
752
+ <sort_order>2</sort_order>
753
+ <show_in_default>1</show_in_default>
754
+ <show_in_website>1</show_in_website>
755
+ <show_in_store>1</show_in_store>
756
+ <comment>XML files will be generated into this path.</comment>
757
+ </output>
758
+ <defaultcategory translate="label">
759
+ <label>Default Category</label>
760
+ <frontend_type>text</frontend_type>
761
+ <sort_order>3</sort_order>
762
+ <show_in_default>1</show_in_default>
763
+ <show_in_website>1</show_in_website>
764
+ <show_in_store>1</show_in_store>
765
+ <comment>Products with no category assigned will be assigned this category label.</comment>
766
+ </defaultcategory>
767
+ <manufacturer translate="label">
768
+ <label>Show Manufacturer</label>
769
+ <frontend_type>select</frontend_type>
770
+ <source_model>adminhtml/system_config_source_yesno</source_model>
771
+ <sort_order>4</sort_order>
772
+ <show_in_default>1</show_in_default>
773
+ <show_in_website>1</show_in_website>
774
+ <show_in_store>0</show_in_store>
775
+ </manufacturer>
776
+ <currency translate="label">
777
+ <label>Currency</label>
778
+ <frontend_type>text</frontend_type>
779
+ <sort_order>5</sort_order>
780
+ <show_in_default>1</show_in_default>
781
+ <show_in_website>1</show_in_website>
782
+ <show_in_store>0</show_in_store>
783
+ </currency>
784
+ </fields>
785
+ </getpricefeed>
786
+ <shopbotfeed>
787
+ <label>ShopBot</label>
788
+ <frontend_type>text</frontend_type>
789
+ <sort_order>0</sort_order>
790
+ <show_in_default>1</show_in_default>
791
+ <show_in_website>1</show_in_website>
792
+ <show_in_store>1</show_in_store>
793
+ <fields>
794
+ <active translate="label">
795
+ <label>Enabled</label>
796
+ <frontend_type>select</frontend_type>
797
+ <source_model>adminhtml/system_config_source_yesno</source_model>
798
+ <sort_order>1</sort_order>
799
+ <show_in_default>1</show_in_default>
800
+ <show_in_website>1</show_in_website>
801
+ <show_in_store>0</show_in_store>
802
+ </active>
803
+ <output translate="label">
804
+ <label>Output Path</label>
805
+ <frontend_type>text</frontend_type>
806
+ <sort_order>2</sort_order>
807
+ <show_in_default>1</show_in_default>
808
+ <show_in_website>1</show_in_website>
809
+ <show_in_store>1</show_in_store>
810
+ <comment>XML files will be generated into this path.</comment>
811
+ </output>
812
+ <defaultcategory translate="label">
813
+ <label>Default Category</label>
814
+ <frontend_type>text</frontend_type>
815
+ <sort_order>3</sort_order>
816
+ <show_in_default>1</show_in_default>
817
+ <show_in_website>1</show_in_website>
818
+ <show_in_store>1</show_in_store>
819
+ <comment>Products with no category assigned will be assigned this category label.</comment>
820
+ </defaultcategory>
821
+ <m_to_xml_attributes translate="comment">
822
+ <label>Attributes to include in product feed</label>
823
+ <frontend_model>fontis_australia_block_shopbot</frontend_model>
824
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
825
+ <sort_order>25</sort_order>
826
+ <show_in_default>1</show_in_default>
827
+ <show_in_website>1</show_in_website>
828
+ <show_in_store>1</show_in_store>
829
+ <comment></comment>
830
+ </m_to_xml_attributes>
831
+ </fields>
832
+ </shopbotfeed>
833
+ <myshoppingfeed>
834
+ <label>MyShopping</label>
835
+ <frontend_type>text</frontend_type>
836
+ <sort_order>0</sort_order>
837
+ <show_in_default>1</show_in_default>
838
+ <show_in_website>1</show_in_website>
839
+ <show_in_store>1</show_in_store>
840
+ <fields>
841
+ <active translate="label">
842
+ <label>Enabled</label>
843
+ <frontend_type>select</frontend_type>
844
+ <source_model>adminhtml/system_config_source_yesno</source_model>
845
+ <sort_order>1</sort_order>
846
+ <show_in_default>1</show_in_default>
847
+ <show_in_website>1</show_in_website>
848
+ <show_in_store>0</show_in_store>
849
+ </active>
850
+ <output translate="label">
851
+ <label>Output Path</label>
852
+ <frontend_type>text</frontend_type>
853
+ <sort_order>2</sort_order>
854
+ <show_in_default>1</show_in_default>
855
+ <show_in_website>1</show_in_website>
856
+ <show_in_store>1</show_in_store>
857
+ <comment>XML files will be generated into this path.</comment>
858
+ </output>
859
+ <defaultcategory translate="label">
860
+ <label>Default Category</label>
861
+ <frontend_type>text</frontend_type>
862
+ <sort_order>3</sort_order>
863
+ <show_in_default>1</show_in_default>
864
+ <show_in_website>1</show_in_website>
865
+ <show_in_store>1</show_in_store>
866
+ <comment>Products with no category assigned will be assigned this category label.</comment>
867
+ </defaultcategory>
868
+ <m_to_xml_attributes translate="comment">
869
+ <label>Attributes to include in product feed</label>
870
+ <frontend_model>fontis_australia_block_myshopping</frontend_model>
871
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
872
+ <sort_order>25</sort_order>
873
+ <show_in_default>1</show_in_default>
874
+ <show_in_website>1</show_in_website>
875
+ <show_in_store>1</show_in_store>
876
+ <comment></comment>
877
+ </m_to_xml_attributes>
878
+ </fields>
879
+ </myshoppingfeed>
880
+ </groups>
881
+ </fontis_feeds>
882
  </sections>
883
  </config>
app/design/adminhtml/default/default/template/fontis/australia/payment/bpay/info.phtml CHANGED
@@ -15,17 +15,18 @@
15
  * @category Fontis
16
  * @package Fontis_Australia
17
  * @author Chris Norton
18
- * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
  */
21
  ?>
22
  <div>
23
  <p>
24
- <?php if ($this->getMethod()->getBillerCode()): ?>
25
- <?php echo $this->__('<b>Biller Code</b>: %s', $this->getMethod()->getBillerCode()); ?><br />
 
26
  <?php endif; ?>
27
- <?php if ($this->getMethod()->getRef()): ?>
28
- <?php echo $this->__('<b>Ref</b>: %s', $this->getMethod()->getRef()); ?><br />
29
  <?php endif; ?>
30
  </p>
31
  </div>
15
  * @category Fontis
16
  * @package Fontis_Australia
17
  * @author Chris Norton
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
  */
21
  ?>
22
  <div>
23
  <p>
24
+ <?php $data = @unserialize($this->getMethod()->getInfoInstance()->getAdditionalData()); ?>
25
+ <?php if (isset($data['biller_code'])): ?>
26
+ <?php echo $this->__('<b>Biller Code</b>: %s', $data['biller_code']); ?><br />
27
  <?php endif; ?>
28
+ <?php if (isset($data['ref'])): ?>
29
+ <?php echo $this->__('<b>Ref</b>: %s', $data['ref']); ?><br />
30
  <?php endif; ?>
31
  </p>
32
  </div>
app/design/adminhtml/default/default/template/fontis/australia/system/config/form/field/array_dropdown.phtml ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Campaign Monitor Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com and you will be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_CampaignMonitor
17
+ * @author Peter Spiller
18
+ * @author Chris Norton
19
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+
24
+ <?php
25
+ $_htmlId = $this->getHtmlId() ? $this->getHtmlId() : '_' . uniqid();
26
+
27
+ $_colspan = 2;
28
+ if (!$this->_addAfter) {
29
+ $_colspan -= 1;
30
+ }
31
+ $_colspan = $_colspan > 1 ? 'colspan="' . $_colspan . '"' : '';
32
+ ?>
33
+
34
+ <div class="grid" id="grid<?php echo $_htmlId ?>">
35
+ <table cellpadding="0" cellspacing="0" class="border">
36
+ <tbody>
37
+
38
+ <tr class="headings" id="headings<?php echo $_htmlId ?>">
39
+ <?php foreach ($this->_columns as $columnName => $column):?>
40
+ <th><?php echo $column['label'] ?></th>
41
+ <?php endforeach;?>
42
+ <th <?php echo $_colspan?>></th>
43
+ </tr>
44
+
45
+ <tr id="addRow<?php echo $_htmlId ?>">
46
+ <td colspan="<?php echo count($this->_columns) ?>"></td>
47
+ <td <?php echo $_colspan?>>
48
+ <button style="" onclick="" class="scalable add" type="button" id="addToEndBtn<?php echo $_htmlId ?>">
49
+ <span><?php echo $this->_addButtonLabel ?></span>
50
+ </button>
51
+ </td>
52
+ </tr>
53
+
54
+ </tbody>
55
+ </table>
56
+ <input type="hidden" name="<?php echo $this->getElement()->getName() ?>[__empty]" value="" />
57
+ </div>
58
+ <div id="empty<?php echo $_htmlId ?>">
59
+ <button style="" onclick="" class="scalable add" type="button" id="emptyAddBtn<?php echo $_htmlId ?>">
60
+ <span><?php echo $this->_addButtonLabel ?></span>
61
+ </button>
62
+ </div>
63
+
64
+ <script type="text/javascript">
65
+ // <!--
66
+ // create row creator
67
+ var arrayRow<?php echo $_htmlId ?> = {
68
+ // define row prototypeJS template
69
+ template : new Template(
70
+ '<tr id="#{_id}">'
71
+ <?php foreach ($this->_columns as $columnName => $column):?>
72
+ +'<td class="#{_id}-<?php echo $columnName?>">'
73
+ +'<?php echo $this->_renderCellTemplate($columnName)?>'
74
+ +'</td>'
75
+ <?php endforeach;?>
76
+ <?php if ($this->_addAfter):?>
77
+ +'<td><button onclick="" class="scalable add" type="button" id="addAfterBtn#{_id}"><span><?php echo Mage::helper('adminhtml')->__('Add after') ?></span></button></td>'
78
+ <?php endif;?>
79
+ +'<td><button onclick="arrayRow<?php echo $_htmlId ?>.del(\'#{_id}\')" class="scalable delete" type="button"><span><?php echo Mage::helper('adminhtml')->__('Delete') ?></span></button></td>'
80
+ +'</tr>'
81
+ ),
82
+
83
+ rowsCount : 0,
84
+
85
+ add : function(templateData, insertAfterId)
86
+ {
87
+ // generate default template data
88
+ if ('' == templateData) {
89
+ var d = new Date();
90
+ var templateData = {
91
+ <?php foreach ($this->_columns as $columnName => $column):?>
92
+ <?php echo $columnName ?> : '',
93
+ <?php endforeach;?>
94
+ _id : '_' + d.getTime() + '_' + d.getMilliseconds()
95
+ };
96
+ }
97
+
98
+ // insert before last row
99
+ if ('' == insertAfterId) {
100
+ new Insertion.Before(
101
+ $('addRow<?php echo $_htmlId ?>'),
102
+ this.template.evaluate(templateData)
103
+ );
104
+ }
105
+ // insert after specified row
106
+ else {
107
+ new Insertion.After(
108
+ $(insertAfterId),
109
+ this.template.evaluate(templateData)
110
+ );
111
+ }
112
+ // set the selected drop-down list item
113
+ <?php foreach ($this->_columns as $columnName => $column):?>
114
+ var options = $$('td.' + templateData._id + '-' + '<?php echo $columnName?>' + ' option')
115
+ for(var index = 0; index < options.length; ++index)
116
+ {
117
+ var option = options[index]
118
+ if(option.getAttribute('value') == templateData.<?php echo $columnName?>)
119
+ {
120
+ option.selected = true
121
+ }
122
+ }
123
+ <?php endforeach;?>
124
+
125
+ <?php if ($this->_addAfter):?>
126
+ Event.observe('addAfterBtn' + templateData._id, 'click', this.add.bind(this, '', templateData._id));
127
+ <?php endif;?>
128
+
129
+ this.rowsCount += 1;
130
+ },
131
+
132
+ del : function(rowId)
133
+ {
134
+ $(rowId).remove();
135
+ this.rowsCount -= 1;
136
+ if (0 == this.rowsCount) {
137
+ this.showButtonOnly();
138
+ }
139
+ },
140
+
141
+ showButtonOnly : function()
142
+ {
143
+ $('grid<?php echo $_htmlId ?>').hide();
144
+ $('empty<?php echo $_htmlId ?>').show();
145
+ }
146
+ }
147
+
148
+ // bind add action to "Add" button in last row
149
+ Event.observe('addToEndBtn<?php echo $_htmlId ?>', 'click', arrayRow<?php echo $_htmlId ?>.add.bind(arrayRow<?php echo $_htmlId ?>, '', ''));
150
+
151
+ // add existing rows
152
+ <?php
153
+ $_addAfterId = "headings{$_htmlId}";
154
+ foreach ($this->getArrayRows() as $_rowId => $_row) {
155
+ echo "arrayRow{$_htmlId}.add(" . $_row->toJson() . ", '{$_addAfterId}');\n";
156
+ /*print "%%%%%%%%%%%%%%%";
157
+ print_r($_row->toJson());*/
158
+ $_addAfterId = $_rowId;
159
+ }
160
+ ?>
161
+
162
+ // initialize standalone button
163
+ $('empty<?php echo $_htmlId ?>').hide();
164
+ Event.observe('emptyAddBtn<?php echo $_htmlId ?>', 'click', function () {
165
+ $('grid<?php echo $_htmlId ?>').show();
166
+ $('empty<?php echo $_htmlId ?>').hide();
167
+ arrayRow<?php echo $_htmlId ?>.add('', '');
168
+ });
169
+
170
+ // if no rows, hide grid and show button only
171
+ <?php if (!$this->getArrayRows()):?>
172
+ arrayRow<?php echo $_htmlId ?>.showButtonOnly();
173
+ <?php endif;?>
174
+
175
+ // toggle the grid, if element is disabled (depending on scope)
176
+ <?php if ($this->getElement()->getDisabled()):?>
177
+ toggleValueElements({checked:true}, $('grid<?php echo $_htmlId ?>').parentNode);
178
+ <?php endif;?>
179
+ // -->
180
+ </script>
app/design/frontend/default/default/layout/fontis_australia.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis Australia Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Fontis
17
+ * @package Fontis_Australia
18
+ * @author Chris Norton
19
+ * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ -->
23
+ <layout version="0.1.0">
24
+ <customer_address_form>
25
+ <reference name="footer">
26
+ <block type="core/template" name="fontis_australia_autocomplete" template="fontis/australia/postcode.phtml"/>
27
+ </reference>
28
+ </customer_address_form>
29
+ <customer_account_create>
30
+ <reference name="footer">
31
+ <block type="core/template" name="fontis_australia_autocomplete" template="fontis/australia/postcode.phtml"/>
32
+ </reference>
33
+ </customer_account_create>
34
+ <checkout_onepage_index>
35
+ <reference name="footer">
36
+ <block type="core/template" name="fontis_australia_autocomplete" template="fontis/australia/postcode-checkout.phtml"/>
37
+ </reference>
38
+ </checkout_onepage_index>
39
+ <checkout_onepage_success>
40
+ <reference name="checkout.success">
41
+ <block type="checkout/onepage_success" name="fontis.australia.bpay.success" template="fontis/australia/payment/bpay/success.phtml"/>
42
+ <block type="checkout/onepage_success" name="fontis.australia.directdeposit.success" template="fontis/australia/payment/directdeposit/success.phtml"/>
43
+ </reference>
44
+ </checkout_onepage_success>
45
+ </layout>
app/design/frontend/default/default/template/fontis/australia/payment/bpay/form.phtml CHANGED
@@ -22,86 +22,11 @@
22
  <fieldset class="form-list">
23
  <ul id="payment_form_<?php echo $this->getMethodCode(); ?>" style="display:none">
24
  <li>
 
25
  <div class="input-box">
26
- <style type="text/css">
27
- <!--
28
- table.bpay{
29
- width: 200px;
30
- font-family: Arial, Helvetica, sans-serif;
31
- background-color: #FFFFFF;
32
- margin: 0px;
33
- border: 2px solid #10204B;
34
- padding: 6px;
35
- }
36
- td.bpayLogo {
37
- width: 42px;
38
- border: 2px solid #142C61;
39
- }
40
- .bpayLogo img {
41
- margin: 12px;
42
- }
43
- td.customerReferenceBox {
44
- border: 2px solid #142C61;
45
- padding: 0px 8px;
46
- height: 54px;
47
- width: 158px;
48
- }
49
-
50
- .customerReferenceBoxText {
51
- font-size: 13px;
52
- text-transform: capitalize;
53
- color: #142C61;
54
- white-space: nowrap;
55
- line-height: 22px;
56
- font-weight: normal;
57
- }
58
-
59
- .billerTextHeading {
60
- font-size: 11px;
61
- text-transform: capitalize;
62
- color: #142C61;
63
- white-space: nowrap;
64
- line-height: 20px;
65
- font-weight: bold;
66
- }
67
- .billerText{
68
- font-size: 11px;
69
- color: #142C61;
70
- }
71
- -->
72
- </style>
73
- <div align="left">
74
- <table border="0" cellpadding="0" cellspacing="0" class="bpay">
75
- <tr>
76
- <td width="1%" class="bpayLogo"><img src="http://www.bpay.com.au/images/bpay.jpg" width="51" height="82" /></td>
77
- <td class="customerReferenceBox">
78
- <p class="customerReferenceBoxText">
79
- <?php if ($this->getMethod()->getBillerCode()): ?>
80
- <?php echo $this->__('<b>Biller Code</b>: %s', $this->getMethod()->getBillerCode()); ?><br />
81
- <?php endif; ?>
82
- <?php if ($this->getMethod()->getRef()): ?>
83
- <?php echo $this->__('<b>Ref</b>: %s', $this->getMethod()->getRef()); ?><br />
84
- <?php endif; ?>
85
- </p>
86
- </td>
87
- </tr>
88
- <tr>
89
- <td colspan="2">
90
- <p class="billerTextHeading">Telephone & Internet Banking – BPAY&reg;</p>
91
- </td>
92
- </tr>
93
- <tr>
94
- <td colspan="2">
95
- <p class="billerText">
96
- Contact your bank or financial institution to make this
97
- payment from your cheque, savings, debit, credit card
98
- or transaction account. More info: www.bpay.com.au
99
- </p>
100
- </td>
101
- </tr>
102
- </table>
103
- </div>
104
  </div>
 
105
  </li>
106
  </ul>
107
  </fieldset>
22
  <fieldset class="form-list">
23
  <ul id="payment_form_<?php echo $this->getMethodCode(); ?>" style="display:none">
24
  <li>
25
+ <?php if ($this->getMethod()->getMessage()): ?>
26
  <div class="input-box">
27
+ <p><?php echo $this->getMethod()->getMessage(); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  </div>
29
+ <?php endif; ?>
30
  </li>
31
  </ul>
32
  </fieldset>
app/design/frontend/default/default/template/fontis/australia/payment/bpay/info.phtml CHANGED
@@ -19,11 +19,8 @@
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
  */
21
  ?>
22
- <p><?php echo $this->getMethod()->getTitle(); ?>
23
- <?php if ($this->getMethod()->getBillerCode()): ?>
24
- <br /><?php echo $this->__('<b>Biller Code</b>: %s', $this->getMethod()->getBillerCode()); ?>
 
25
  <?php endif; ?>
26
- <?php if ($this->getMethod()->getRef()): ?>
27
- <br /><?php echo $this->__('<b>Ref</b>: %s', $this->getMethod()->getRef()); ?>
28
- <?php endif; ?>
29
- </p>
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
  */
21
  ?>
22
+ <?php if($this->getParentBlock() && $this->getParentBlock()->getModuleName() == 'Mage_Checkout'): ?>
23
+ <p><?php echo $this->getMethod()->getTitle() ?></p>
24
+ <?php else: ?>
25
+ <?php echo Mage::helper('australia/bpay')->bpayInfoBlock($this->getMethod()->getBillerCode(), $this->getMethod()->getRef()); ?>
26
  <?php endif; ?>
 
 
 
 
app/design/frontend/default/default/template/fontis/australia/payment/bpay/success.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Chris Norton
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ ?>
22
+ <?php
23
+ $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
24
+ $payment = $order->getPayment();
25
+ ?>
26
+ <?php if($payment->getMethod() == 'bpay'): ?>
27
+ <?php
28
+ $bpay = Mage::getModel('australia/payment_bpay');
29
+ $data = array(
30
+ 'biller_code' => $bpay->getBillerCode(),
31
+ 'ref' => $bpay->getRef()
32
+ );
33
+ $payment->setAdditionalData(serialize($data));
34
+ $payment->save();
35
+
36
+ $order->addStatusToHistory('pending_bpay', 'Order placed with BPAY', false);
37
+ $order->save();
38
+ ?>
39
+ <?php echo Mage::helper('australia/bpay')->bpayInfoBlock($data['biller_code'], $data['ref']); ?>
40
+ <?php endif; ?>
app/design/frontend/default/default/template/fontis/australia/payment/directdeposit/success.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis Australia Extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_Australia
17
+ * @author Chris Norton
18
+ * @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ ?>
22
+ <?php
23
+ $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
24
+ $payment = $order->getPayment();
25
+ ?>
26
+ <?php if($payment->getMethod() == 'directdeposit_au'): ?>
27
+ <?php
28
+ $order->addStatusToHistory('pending_deposit', 'Order placed with Direct Deposit', false);
29
+ $order->save();
30
+ $data = @unserialize($payment->getAdditionalData());
31
+ ?>
32
+ <div id="directdeposit_au_success">
33
+ <p class="message"><?php echo $this->__('Please use the following details to make payment:'); ?></p>
34
+ <?php if($data['account_name']): ?><br /><b><?php echo $this->__('Account Name: '); ?></b> <?php echo $data['account_name']; ?><?php endif; ?>
35
+ <?php if($data['account_bsb']): ?><br /><b><?php echo $this->__('Account BSB: '); ?></b> <?php echo $data['account_bsb']; ?><?php endif; ?>
36
+ <?php if($data['account_number']): ?><br /><b><?php echo $this->__('Account Number: '); ?></b> <?php echo $data['account_number']; ?><?php endif; ?>
37
+ </div>
38
+ <?php endif; ?>
app/design/frontend/default/default/template/fontis/australia/postcode.phtml.~1~ DELETED
@@ -1,128 +0,0 @@
1
- <?php
2
- /**
3
- * Fontis Australia Extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @category Fontis
16
- * @package Fontis_Australia
17
- * @author Chris Norton
18
- * @copyright Copyright (c) 2008 Fontis Pty. Ltd. (http://www.fontis.com.au)
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <script type="text/javascript">
23
-
24
- // Create and insert the div that will hold the list of autocomplete items. This
25
- // is added to the DOM immediately following the #city field.
26
- var autocomplete_city = new Element('div', { id: 'autocomplete_city', 'class': 'search-autocomplete' });
27
-
28
- function updateAddress(text, item) {
29
- // Update state and postcode fields
30
- var id = item.id;
31
- var tokens = id.split('-');
32
-
33
- // Assume item at index 1 is region_id, item at index 3 is postcode
34
- $('region_id').value = tokens[1];
35
- $('zip').value = tokens[3];
36
- }
37
-
38
- if($('city')) {
39
- function updateAddress(text, item) {
40
- // Update state and postcode fields
41
- var id = item.id;
42
- var tokens = id.split('-');
43
-
44
- // Assume item at index 1 is region_id, item at index 3 is postcode
45
- $('region_id').value = tokens[1];
46
- $('zip').value = tokens[3];
47
- }
48
-
49
- $('city').parentNode.appendChild(autocomplete_city);
50
-
51
- // Create the autocompleter and assign it to a variable for future use.
52
- var completer = new Ajax.Autocompleter("city", "autocomplete_city", "<?=$this->helper('australia')->getCitySuggestUrl();?>", {
53
- afterUpdateElement: updateAddress,
54
- minChars: 2,
55
- parameters: 'country=' + $F('country')
56
- });
57
-
58
- // Detect when the country has changed and update the parameters sent by the autocompleter.
59
- $('country').observe('change', function() {
60
- completer = new Ajax.Autocompleter("city", "autocomplete_city", "<?=$this->helper('australia')->getCitySuggestUrl();?>", {
61
- afterUpdateElement: updateAddress,
62
- minChars: 2,
63
- parameters: 'country=' + $F('country')
64
- });
65
- });
66
- }
67
-
68
- if($('billing:city')) {
69
- function updateAddress(text, item) {
70
- // Update state and postcode fields
71
- var id = item.id;
72
- var tokens = id.split('-');
73
-
74
- // Assume item at index 1 is region_id, item at index 3 is postcode
75
- $('billing:region_id').value = tokens[1];
76
- $('billing:postcode').value = tokens[3];
77
- }
78
-
79
- $('billing:city').parentNode.appendChild(autocomplete_city);
80
-
81
- // Create the autocompleter and assign it to a variable for future use.
82
- var completer = new Ajax.Autocompleter("billing:city", "autocomplete_city", "<?=$this->helper('australia')->getCitySuggestUrl();?>", {
83
- afterUpdateElement: updateAddress,
84
- minChars: 2,
85
- parameters: 'country=' + $F('billing:country_id')
86
- });
87
-
88
- // Detect when the country has changed and update the parameters sent by the autocompleter.
89
- $('billing:country_id').observe('change', function() {
90
- completer = new Ajax.Autocompleter("billing:city", "autocomplete_city", "<?=$this->helper('australia')->getCitySuggestUrl();?>", {
91
- afterUpdateElement: updateAddress,
92
- minChars: 2,
93
- parameters: 'country=' + $F('billing:country_id')
94
- });
95
- });
96
- }
97
-
98
-
99
- if($('shipping:city')) {
100
- function updateAddress(text, item) {
101
- // Update state and postcode fields
102
- var id = item.id;
103
- var tokens = id.split('-');
104
-
105
- // Assume item at index 1 is region_id, item at index 3 is postcode
106
- $('shipping:region_id').value = tokens[1];
107
- $('shipping:postcode').value = tokens[3];
108
- }
109
-
110
- $('shipping:city').parentNode.appendChild(autocomplete_city);
111
-
112
- // Create the autocompleter and assign it to a variable for future use.
113
- var completer = new Ajax.Autocompleter("shipping:city", "autocomplete_city", "<?=$this->helper('australia')->getCitySuggestUrl();?>", {
114
- afterUpdateElement: updateAddress,
115
- minChars: 2,
116
- parameters: 'country=' + $F('shipping:country_id')
117
- });
118
-
119
- // Detect when the country has changed and update the parameters sent by the autocompleter.
120
- $('shipping:country_id').observe('change', function() {
121
- completer = new Ajax.Autocompleter("shipping:city", "autocomplete_city", "<?=$this->helper('australia')->getCitySuggestUrl();?>", {
122
- afterUpdateElement: updateAddress,
123
- minChars: 2,
124
- parameters: 'country=' + $F('shipping:country_id')
125
- });
126
- });
127
- }
128
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fontis_Australia</name>
4
- <version>1.2.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>This extension is intended to provide most of the functionality needed to run a Magento store in Australia. This includes all essential payment and shipping methods as well as small localisations such as adding the store's ABN, adding Australian states and territories to the region directory and adding in a postcode database.</description>
11
  <notes>Currently active are modules for BPAY, direct deposit, Australia Post, the addition of regions and postcodes, and the addition of ABN and phone number to the general configuration values (although currently not in use).</notes>
12
  <authors><author><name>Chris Norton</name><user>auto-converted</user><email>chris.norton@fontis.com.au</email></author><author><name>Lloyd Hazlett</name><user>auto-converted</user><email>hazzard43@fastmail.fm</email></author><author><name>Fontis</name><user>auto-converted</user><email>magento@fontis.com.au</email></author></authors>
13
- <date>2009-09-28</date>
14
- <time>02:59:42</time>
15
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="7245a655eac2513f8cd6c1a825586936"/><file name="info.phtml" hash="7e548c0a8d2c8f4ad780cbf44a5962b9"/></dir><dir name="directdeposit"><file name="form.phtml" hash="0e5272781aa7c4d25c1c243fcf00487e"/><file name="info.phtml" hash="38112ef511c67c91a3f2ad43da7929da"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="7245a655eac2513f8cd6c1a825586936"/><file name="info.phtml" hash="1bff83747996dbad7ff599b7d8842bf0"/></dir><dir name="directdeposit"><file name="form.phtml" hash="e67ee14cf3fb2c9dd15d95eae1be1195"/><file name="info.phtml" hash="8bc98b2fd1d1943f17d2831a67c97db3"/></dir></dir><file name="postcode-checkout.phtml" hash="51867acd43c4f8c982ab1fea103a579f"/><file name="postcode.phtml" hash="b0d7bfa170c7ca3bd4a256f0404d7189"/><file name="postcode.phtml.~1~" hash="85dbbd2b416f85f230dcce12e52cb397"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Fontis"><dir name="Australia"><dir name="Block"><dir name="Bpay"><file name="Form.php" hash="958e11d14d7c87054a68d34b60c498d6"/><file name="Info.php" hash="a28f40be3c76637eb43ba80c61031512"/></dir><dir name="Directdeposit"><file name="Form.php" hash="13589d5d85499678bdc62fde04107095"/><file name="Info.php" hash="0f31ac7451127c87813c823423a9057b"/></dir><file name="Autocomplete.php" hash="4f33f809dae969781ead580b13e9bd3a"/></dir><dir name="controllers"><file name="AjaxController.php" hash="5fb086e3236446b6a6f10f4c78eb3fcb"/></dir><dir name="etc"><file name="config.xml" hash="88397b6553941a2f6f2eb6f019a22da5"/><file name="system.xml" hash="55e1454a117345d75972ce83501f1cf1"/></dir><dir name="Helper"><file name="Data.php" hash="e493486d7a5ccd5589d99d08b136b819"/></dir><dir name="Model"><dir name="Config"><file name="CustomerGroupAccess.php" hash="e531a8049b9a877e01c2b806b065dbef"/><file name="CustomerGroups.php" hash="8014e56b1141cb9bbb63f807ec1c87a5"/></dir><dir name="Mysql4"><dir name="Shipping"><dir name="Carrier"><dir name="Eparcel"><file name="Collection.php" hash="87f450c6b318060b83e7d7d0662cdf50"/></dir><file name="Eparcel.php" hash="9614eed4296b17a429db745c289d42cf"/></dir></dir></dir><dir name="Payment"><file name="Bpay.php" hash="56d5b9d3e17cbc9ff4316fef2574401a"/><file name="Directdeposit.php" hash="21c4febe6d321450fba4de5e655093c8"/></dir><dir name="Shipping"><dir name="Carrier"><file name="Australiapost.php" hash="7e3e4ff6253b31587ff0f9849135f2bc"/><file name="Eparcel.php" hash="b65cd938b27b4666e22b6833ca738226"/></dir><dir name="Config"><file name="Eparcel.php" hash="8c754cdc86316dbee53db68f0e2652bc"/><file name="Eparcelcondition.php" hash="b8cc830ab6e0e397d32bf574f60b0500"/><file name="Weightunits.php" hash="e13ba9de393ae67420f863d4008c3c72"/></dir></dir><dir name="Tax"><file name="Gst.php" hash="d7e024971dab498e80de8c957d2911f2"/></dir></dir><dir name="sql"><dir name="australia_setup"><file name="mysql4-install-0.7.0.php" hash="f475b13bb5319599c4a852cfb8788f9a"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="9a381c07ec9ee53e2ffaa7ea7da4559d"/><file name="postcodes.txt" hash="21083a0f94e200259c9b4540666b251e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fontis_Australia.xml" hash="a60b83cf1b1b449a16fe09da16342a4d"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fontis_Australia</name>
4
+ <version>2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
10
  <description>This extension is intended to provide most of the functionality needed to run a Magento store in Australia. This includes all essential payment and shipping methods as well as small localisations such as adding the store's ABN, adding Australian states and territories to the region directory and adding in a postcode database.</description>
11
  <notes>Currently active are modules for BPAY, direct deposit, Australia Post, the addition of regions and postcodes, and the addition of ABN and phone number to the general configuration values (although currently not in use).</notes>
12
  <authors><author><name>Chris Norton</name><user>auto-converted</user><email>chris.norton@fontis.com.au</email></author><author><name>Lloyd Hazlett</name><user>auto-converted</user><email>hazzard43@fastmail.fm</email></author><author><name>Fontis</name><user>auto-converted</user><email>magento@fontis.com.au</email></author></authors>
13
+ <date>2010-01-26</date>
14
+ <time>10:50:56</time>
15
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="7245a655eac2513f8cd6c1a825586936"/><file name="info.phtml" hash="d4836cf6f5316b76b56ddefc48b67d94"/></dir><dir name="directdeposit"><file name="form.phtml" hash="0e5272781aa7c4d25c1c243fcf00487e"/><file name="info.phtml" hash="38112ef511c67c91a3f2ad43da7929da"/></dir></dir><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array_dropdown.phtml" hash="bdce71494213de5fe194873b5d0bed56"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="fontis_australia.xml" hash="d33f99fc5dfc156de09254e95a2c82eb"/></dir><dir name="template"><dir name="fontis"><dir name="australia"><dir name="payment"><dir name="bpay"><file name="form.phtml" hash="3895f9afa025444eb9a1cdc38582069d"/><file name="info.phtml" hash="47d1e0cc3ae676dff49990eba0ac4608"/><file name="success.phtml" hash="115a1710b1f3b0ef3ecf0b957651bb43"/></dir><dir name="directdeposit"><file name="form.phtml" hash="e67ee14cf3fb2c9dd15d95eae1be1195"/><file name="info.phtml" hash="8bc98b2fd1d1943f17d2831a67c97db3"/><file name="success.phtml" hash="0545f8c3c9d37a2045a20f442991e8d7"/></dir></dir><file name="postcode-checkout.phtml" hash="51867acd43c4f8c982ab1fea103a579f"/><file name="postcode.phtml" hash="b0d7bfa170c7ca3bd4a256f0404d7189"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Fontis"><dir name="Australia"><dir name="Block"><dir name="Bpay"><file name="Form.php" hash="958e11d14d7c87054a68d34b60c498d6"/><file name="Info.php" hash="a28f40be3c76637eb43ba80c61031512"/><file name="Info.php.~1~" hash="0261fa159baac6974b936a29ceffa727"/></dir><dir name="Directdeposit"><file name="Form.php" hash="13589d5d85499678bdc62fde04107095"/><file name="Info.php" hash="0f31ac7451127c87813c823423a9057b"/></dir><file name="Autocomplete.php" hash="4f33f809dae969781ead580b13e9bd3a"/><file name="Myshopping.php" hash="1e9b9149a867136f541b765d54ba402b"/><file name="Shopbot.php" hash="fca48ea13a60bdd1b207913f536bce45"/></dir><dir name="controllers"><file name="AjaxController.php" hash="5fb086e3236446b6a6f10f4c78eb3fcb"/></dir><dir name="etc"><file name="config.xml" hash="e1c99499c1589fff4fa686c4488ef3fb"/><file name="system.xml" hash="bfcebc05a66fb2d2c0b4f13ebae6fc7a"/></dir><dir name="Helper"><file name="Bpay.php" hash="317da2cbee9284e496a28486c212a256"/><file name="Data.php" hash="e493486d7a5ccd5589d99d08b136b819"/></dir><dir name="Model"><dir name="Config"><file name="CustomerGroupAccess.php" hash="e531a8049b9a877e01c2b806b065dbef"/><file name="CustomerGroups.php" hash="8014e56b1141cb9bbb63f807ec1c87a5"/></dir><dir name="Getprice"><file name="Child.php" hash="806d1d3f4b9508e7a982ebdcb4d9faf7"/><file name="Cron.php" hash="024e036fb8772b085bc7ca48bed7f605"/></dir><dir name="Myshopping"><file name="Child.php" hash="b1cb41cdf36352e9d1d6dec0dbeedc9f"/><file name="Cron.php" hash="92021f539e06231715f4639c98f08d9a"/></dir><dir name="Mysql4"><dir name="Shipping"><dir name="Carrier"><dir name="Eparcel"><file name="Collection.php" hash="87f450c6b318060b83e7d7d0662cdf50"/></dir><file name="Eparcel.php" hash="9614eed4296b17a429db745c289d42cf"/></dir></dir></dir><dir name="Payment"><file name="Bpay.php" hash="e9a0f177a8b02762b759a7dc0a211f04"/><file name="Directdeposit.php" hash="6efd8190e62ead4f083dc59e65ecdcc7"/></dir><dir name="Shipping"><dir name="Carrier"><file name="Australiapost.php" hash="7e3e4ff6253b31587ff0f9849135f2bc"/><file name="Eparcel.php" hash="b65cd938b27b4666e22b6833ca738226"/></dir><dir name="Config"><file name="Eparcel.php" hash="8c754cdc86316dbee53db68f0e2652bc"/><file name="Eparcelcondition.php" hash="b8cc830ab6e0e397d32bf574f60b0500"/><file name="Weightunits.php" hash="e13ba9de393ae67420f863d4008c3c72"/></dir></dir><dir name="Shopbot"><file name="Child.php" hash="9c87db1130bdcb1333f9412864191c0a"/><file name="Cron.php" hash="a4d5cbdb1a21257fe9977ff6da43f2d6"/><file name="Cron.php~" hash="edaaa2e9c31e3eb32600476b9bdd83c0"/></dir><dir name="Tax"><file name="Gst.php" hash="d7e024971dab498e80de8c957d2911f2"/></dir></dir><dir name="sql"><dir name="australia_setup"><file name="mysql4-install-0.7.0.php" hash="f475b13bb5319599c4a852cfb8788f9a"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="9a381c07ec9ee53e2ffaa7ea7da4559d"/><file name="postcodes.txt" hash="21083a0f94e200259c9b4540666b251e"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="fontis"><file name="bpay.png" hash="481c9ee07049203aca13d6d2c2948cf7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fontis_Australia.xml" hash="a60b83cf1b1b449a16fe09da16342a4d"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
skin/frontend/default/default/images/fontis/bpay.png ADDED
Binary file