Version Notes
Import your Magento Orders in real time into your Invoicera online billing software.
Download this release
Release Info
Developer | Sandeep Kumar |
Extension | Invoicera-Order-and-Invoice-Integrator |
Version | 0.0.2 |
Comparing to | |
See all releases |
Code changes from version 0.0.1 to 0.0.2
- app/code/community/Invoicera/Invoice/Helper/Data.php +69 -0
- app/code/community/Invoicera/Invoice/Model/Mysql4/Codes.php +42 -0
- app/code/community/Invoicera/Invoice/Model/Mysql4/Codes/Collection.php +55 -0
- app/code/community/Invoicera/Invoice/Model/Mysql4/Setup.php +36 -0
- app/code/community/Invoicera/Invoice/controllers/Sales/Order/InvoiceController.php +263 -0
- app/code/community/Invoicera/Invoice/etc/adminhtml.xml +51 -0
- app/code/community/Invoicera/Invoice/etc/config.xml +480 -0
- app/code/community/Invoicera/Invoice/etc/system.xml +73 -0
- package.xml +7 -7
app/code/community/Invoicera/Invoice/Helper/Data.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Find
|
22 |
+
* @package Invoicera_Invoice
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* TheFind feed helper
|
30 |
+
*
|
31 |
+
* @category Find
|
32 |
+
* @package Invoicera_Invoice
|
33 |
+
*/
|
34 |
+
class Invoicera_Invoice_Helper_Data extends Mage_Core_Helper_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Checking if some required attributes missed
|
38 |
+
*
|
39 |
+
* @param array $attributes
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
public function checkRequired($attributes)
|
43 |
+
{
|
44 |
+
$attributeConfig = Mage::getConfig()->getNode(Invoicera_Invoice_Model_Import::XML_NODE_FIND_FEED_ATTRIBUTES);
|
45 |
+
$attributeRequired = array();
|
46 |
+
foreach ($attributeConfig->children() as $ac) {
|
47 |
+
if ((int)$ac->required) {
|
48 |
+
$attributeRequired[] = (string)$ac->label;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
foreach ($attributeRequired as $value) {
|
53 |
+
if (!isset($attributes[$value])) {
|
54 |
+
return false;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
return true;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Product entity type
|
62 |
+
*
|
63 |
+
* @return int
|
64 |
+
*/
|
65 |
+
public function getProductEntityType()
|
66 |
+
{
|
67 |
+
return Mage::getSingleton('eav/config')->getEntityType('catalog_product')->getId();
|
68 |
+
}
|
69 |
+
}
|
app/code/community/Invoicera/Invoice/Model/Mysql4/Codes.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Find
|
22 |
+
* @package Invoicera_Invoice
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Thefind feed codes (attribute map) model
|
29 |
+
*
|
30 |
+
* @category Find
|
31 |
+
* @package Invoicera_Invoice
|
32 |
+
*/
|
33 |
+
class Invoicera_Invoice_Model_Mysql4_Codes extends Mage_Core_Model_Mysql4_Abstract
|
34 |
+
{
|
35 |
+
/**
|
36 |
+
* Class local constructor
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->_init('invoicera_invoice/feed_import_codes', 'code_id');
|
41 |
+
}
|
42 |
+
}
|
app/code/community/Invoicera/Invoice/Model/Mysql4/Codes/Collection.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Find
|
22 |
+
* @package Invoicera_Invoice
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* TheFind feed codes (attribute map) collection
|
29 |
+
*
|
30 |
+
* @category Find
|
31 |
+
* @package Invoicera_Invoice
|
32 |
+
*/
|
33 |
+
class Invoicera_Invoice_Model_Mysql4_Codes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
34 |
+
{
|
35 |
+
/**
|
36 |
+
* Local constructor
|
37 |
+
*
|
38 |
+
*/
|
39 |
+
protected function _construct()
|
40 |
+
{
|
41 |
+
$this->_init('invoicera_invoice/codes');
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Fetch attributes to import
|
46 |
+
*
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
public function getImportAttributes()
|
50 |
+
{
|
51 |
+
$this->addFieldToFilter('is_imported', array('eq' => '1'));
|
52 |
+
return $this->_toOptionHash('import_code', 'eav_code');
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
app/code/community/Invoicera/Invoice/Model/Mysql4/Setup.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Find
|
22 |
+
* @package Invoicera_Invoice
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Thefind feed module setup
|
29 |
+
*
|
30 |
+
* @category Find
|
31 |
+
* @package Invoicera_Invoice
|
32 |
+
*/
|
33 |
+
class Invoicera_Invoice_Model_Mysql4_Setup extends Mage_Catalog_Model_Resource_Eav_Mysql4_Setup
|
34 |
+
{
|
35 |
+
}
|
36 |
+
|
app/code/community/Invoicera/Invoice/controllers/Sales/Order/InvoiceController.php
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once 'Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php';
|
3 |
+
class Invoicera_Invoice_Sales_Order_InvoiceController extends Mage_Adminhtml_Sales_Order_InvoiceController
|
4 |
+
{
|
5 |
+
public function saveAction()
|
6 |
+
{
|
7 |
+
$data = $this->getRequest()->getPost('invoice');
|
8 |
+
|
9 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
10 |
+
if (!empty($data['comment_text'])) {
|
11 |
+
Mage::getSingleton('adminhtml/session')->setCommentText($data['comment_text']);
|
12 |
+
}
|
13 |
+
|
14 |
+
try {
|
15 |
+
$invoice = $this->_initInvoice();
|
16 |
+
if ($invoice) {
|
17 |
+
|
18 |
+
if (!empty($data['capture_case'])) {
|
19 |
+
$invoice->setRequestedCaptureCase($data['capture_case']);
|
20 |
+
}
|
21 |
+
|
22 |
+
if (!empty($data['comment_text'])) {
|
23 |
+
$invoice->addComment($data['comment_text'], isset($data['comment_customer_notify']), isset($data['is_visible_on_front']));
|
24 |
+
}
|
25 |
+
|
26 |
+
$invoice->register();
|
27 |
+
|
28 |
+
if (!empty($data['send_email'])) {
|
29 |
+
$invoice->setEmailSent(true);
|
30 |
+
}
|
31 |
+
|
32 |
+
$invoice->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
|
33 |
+
$invoice->getOrder()->setIsInProcess(true);
|
34 |
+
|
35 |
+
$transactionSave = Mage::getModel('core/resource_transaction')
|
36 |
+
->addObject($invoice)
|
37 |
+
->addObject($invoice->getOrder());
|
38 |
+
$shipment = false;
|
39 |
+
|
40 |
+
if (!empty($data['do_shipment']) || (int) $invoice->getOrder()->getForcedDoShipmentWithInvoice()) {
|
41 |
+
$shipment = $this->_prepareShipment($invoice);
|
42 |
+
if ($shipment) {
|
43 |
+
$shipment->setEmailSent($invoice->getEmailSent());
|
44 |
+
$transactionSave->addObject($shipment);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
//$transactionSave->save();
|
49 |
+
$this->sendXMLForInvoicera($invoice, $data);
|
50 |
+
if (!empty($data['do_shipment'])) {
|
51 |
+
$this->_getSession()->addSuccess($this->__('The invoice and shipment have been created.'));
|
52 |
+
} else {
|
53 |
+
$this->_getSession()->addSuccess($this->__('The invoice has been created.'));
|
54 |
+
}
|
55 |
+
|
56 |
+
// SEND INVOICE/SHIPMENT EMAILS
|
57 |
+
$comment = '';
|
58 |
+
if (isset($data['comment_customer_notify'])) {
|
59 |
+
$comment = $data['comment_text'];
|
60 |
+
}
|
61 |
+
try {
|
62 |
+
$invoice->sendEmail(!empty($data['send_email']), $comment);
|
63 |
+
} catch (Exception $e) {
|
64 |
+
Mage::logException($e);
|
65 |
+
$this->_getSession()->addError($this->__('Unable to send the invoice email.'));
|
66 |
+
}
|
67 |
+
if ($shipment) {
|
68 |
+
try {
|
69 |
+
$shipment->sendEmail(!empty($data['send_email']));
|
70 |
+
} catch (Exception $e) {
|
71 |
+
Mage::logException($e);
|
72 |
+
$this->_getSession()->addError($this->__('Unable to send the shipment email.'));
|
73 |
+
}
|
74 |
+
}
|
75 |
+
Mage::getSingleton('adminhtml/session')->getCommentText(true);
|
76 |
+
$this->_redirect('*/sales_order/view', array('order_id' => $orderId));
|
77 |
+
} else {
|
78 |
+
$this->_redirect('*/*/new', array('order_id' => $orderId));
|
79 |
+
}
|
80 |
+
return;
|
81 |
+
} catch (Mage_Core_Exception $e) {
|
82 |
+
$this->_getSession()->addError($e->getMessage());
|
83 |
+
} catch (Exception $e) {
|
84 |
+
$this->_getSession()->addError($this->__('Unable to save the invoice.'));
|
85 |
+
Mage::logException($e);
|
86 |
+
}
|
87 |
+
$this->_redirect('*/*/new', array('order_id' => $orderId));
|
88 |
+
}
|
89 |
+
|
90 |
+
public function sendXMLForInvoicera($invoice, $data=array())
|
91 |
+
{
|
92 |
+
$varCurrenyCode = Mage::app()->getStore()->getCurrentCurrency()->getCode();
|
93 |
+
$varOrderID = $invoice->getOrder()->getId();
|
94 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
95 |
+
// GETTING ORDER STATUS
|
96 |
+
$resultOne = $db->query("SELECT entity_id, status, customer_email, base_currency_code, shipping_description, shipping_amount, increment_id FROM sales_flat_order WHERE entity_id=".$varOrderID);
|
97 |
+
$rowOne = $resultOne->fetch(PDO::FETCH_ASSOC);
|
98 |
+
|
99 |
+
if($rowOne['status'] == 'processing')
|
100 |
+
{
|
101 |
+
$varStatus = 'Sent';
|
102 |
+
}
|
103 |
+
else
|
104 |
+
{
|
105 |
+
$varStatus = 'Draft';
|
106 |
+
}
|
107 |
+
|
108 |
+
// GETTING CLIENT DETAILS
|
109 |
+
$resultThree = $db->query("SELECT firstname, lastname, company, email, telephone, concat_ws(',', street, city, region, postcode) as ClientAddress FROM sales_flat_order_address WHERE email='".$rowOne['customer_email']."'");
|
110 |
+
$rowThree = $resultThree->fetch(PDO::FETCH_ASSOC);
|
111 |
+
|
112 |
+
$clientCreateXml = '<?xml version="1.0" encoding="utf-8"?>
|
113 |
+
<request method="createClient">
|
114 |
+
<name>'.$rowThree['firstname'].' '.$rowThree['lastname'].'</name>
|
115 |
+
<organization>'.$rowThree['firstname'].' '.$rowThree['lastname'].'</organization>
|
116 |
+
<email>'.$rowOne['customer_email'].'</email>
|
117 |
+
<work_phone>'.$rowThree['telephone'].'</work_phone>
|
118 |
+
<address>'.$rowThree['ClientAddress'].'</address>
|
119 |
+
<currency>'.$rowOne['value'].'</currency>
|
120 |
+
</request>';
|
121 |
+
$curlClientResult = $this->sendCurlRequest($clientCreateXml);
|
122 |
+
$xml = stripslashes($curlClientResult);
|
123 |
+
$objXml = new SimpleXMLElement($xml);
|
124 |
+
$arrParamList = $this->objectsIntoArray($objXml);
|
125 |
+
|
126 |
+
$curlClientResult = 0;
|
127 |
+
if($arrParamList['@attributes']['status'] == '403')
|
128 |
+
{
|
129 |
+
$this->_getSession()->addError($this->__('Invoicera Notification: Authentication failed. Please check your API Token.'));
|
130 |
+
}
|
131 |
+
if($arrParamList['@attributes']['status'] == '426')
|
132 |
+
{
|
133 |
+
$this->_getSession()->addError($this->__('Invoicera Notification: Due to client limit, your invoice did not save into your Invoicera account. Please login to your Invoicera account and upgrade your plan.'));
|
134 |
+
}
|
135 |
+
if($arrParamList['@attributes']['status'] == '200')
|
136 |
+
{
|
137 |
+
$curlClientResult = $arrParamList['client_id'];
|
138 |
+
}
|
139 |
+
if($curlClientResult)
|
140 |
+
{
|
141 |
+
$result = $db->query("SELECT item_id, order_id, parent_item_id, quote_item_id, store_id, created_at, updated_at, product_id, product_type, product_options, weight, is_virtual, sku, name, description, applied_rule_ids, additional_data, free_shipping, is_qty_decimal, no_discount, qty_backordered, qty_canceled, qty_invoiced, qty_ordered, qty_refunded, qty_shipped, base_cost, price, base_price, original_price, base_original_price, tax_percent, tax_amount, base_tax_amount, tax_invoiced, base_tax_invoiced, discount_percent, discount_amount, base_discount_amount, discount_invoiced, base_discount_invoiced, amount_refunded, base_amount_refunded, row_total, base_row_total, row_invoiced, base_row_invoiced, row_weight, gift_message_id, gift_message_available, base_tax_before_discount, base_tax_before_discount, ext_order_item_id, locked_do_invoice, locked_do_ship, hidden_tax_amount, base_hidden_tax_amount, hidden_tax_invoiced, base_hidden_tax_invoiced, hidden_tax_refunded, base_hidden_tax_refunded, is_nominal, tax_canceled, hidden_tax_canceled, tax_refunded, price_incl_tax, base_price_incl_tax, row_total_incl_tax, base_row_total_incl_tax, weee_tax_applied, weee_tax_applied_amount, weee_tax_applied_row_amount, base_weee_tax_applied_amount, base_weee_tax_applied_row_amount, weee_tax_disposition, weee_tax_row_disposition, base_weee_tax_disposition, base_weee_tax_row_disposition FROM sales_flat_order_item WHERE order_id=".$varOrderID." GROUP BY sku HAVING (order_id > 0) ORDER BY item_id desc");
|
142 |
+
|
143 |
+
if(!$result) {
|
144 |
+
return false;
|
145 |
+
}
|
146 |
+
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
147 |
+
$arrData[] = $row;
|
148 |
+
}
|
149 |
+
if(!$arrData) {
|
150 |
+
return false;
|
151 |
+
}
|
152 |
+
|
153 |
+
$comment = '';
|
154 |
+
$comment = $data['comment_text'];
|
155 |
+
// getting po_number
|
156 |
+
$random_number = rand(0, pow(10, 7));
|
157 |
+
// creating XML for creating invoice
|
158 |
+
$createInvoiceXML = '';
|
159 |
+
$createInvoiceXML .= '<?xml version="1.0" encoding="utf-8"?>
|
160 |
+
<request method="createInvoice">
|
161 |
+
<client>
|
162 |
+
<client_id>'.$curlClientResult.'</client_id>
|
163 |
+
<address>'.$rowThree['ClientAddress'].'</address>
|
164 |
+
</client>
|
165 |
+
<invoice_title>Order #'.$rowOne['increment_id'].'</invoice_title>
|
166 |
+
<number>'.$rowOne['increment_id'].'</number>
|
167 |
+
<date>'.trim($arrData[0]['created_at']).'</date>
|
168 |
+
<due_date></due_date>
|
169 |
+
<schedule_date></schedule_date>
|
170 |
+
<po_number>'.trim($random_number).'</po_number>
|
171 |
+
<status>'.trim($varStatus).'</status>
|
172 |
+
<currency_code>'.trim($varCurrenyCode).'</currency_code>
|
173 |
+
<notes>'.$comment.'</notes>
|
174 |
+
<terms></terms>
|
175 |
+
<items>';
|
176 |
+
for($i=0;$i<count($arrData);$i++)
|
177 |
+
{
|
178 |
+
$createInvoiceXML .='<item>
|
179 |
+
<name>'.trim($arrData[$i]['name']).'</name>
|
180 |
+
<description>'.$arrData[$i]['description'].'-'.trim($arrData[$i]['description']).'</description>
|
181 |
+
<unit_cost>'.trim($arrData[$i]['base_price']).'</unit_cost>
|
182 |
+
<quantity>'.trim($arrData[$i]['qty_ordered']).'</quantity>
|
183 |
+
<discount>'.trim($arrData[$i]['base_discount_amount']).'</discount>
|
184 |
+
<discount_type>Fixed</discount_type>';
|
185 |
+
if($arrData[$i]['tax_percent'] > 0)
|
186 |
+
{
|
187 |
+
$createInvoiceXML .='
|
188 |
+
<tax1_name>Tax-1</tax1_name>
|
189 |
+
<tax1_percent>'.trim($arrData[$i]['tax_percent']).'</tax1_percent>';
|
190 |
+
}
|
191 |
+
$createInvoiceXML .='
|
192 |
+
</item>';
|
193 |
+
}
|
194 |
+
$createInvoiceXML .= '</items>';
|
195 |
+
if($rowOne['shipping_amount'] > 0)
|
196 |
+
{
|
197 |
+
$createInvoiceXML .= '
|
198 |
+
<additional_charges>
|
199 |
+
<additional_charge>
|
200 |
+
<name>'.trim($rowOne['shipping_description']).'</name>
|
201 |
+
<type>Fixed</type>
|
202 |
+
<amount>'.trim($rowOne['shipping_amount']).'</amount>
|
203 |
+
</additional_charge>
|
204 |
+
</additional_charges>';
|
205 |
+
}
|
206 |
+
$createInvoiceXML .= '</request>';
|
207 |
+
$curlInvoiveResult = $this->sendCurlRequest($createInvoiceXML);
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
public function sendCurlRequest($xml)
|
212 |
+
{
|
213 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
214 |
+
// getting api token
|
215 |
+
$varPath = 'invoice/settings/api_token';
|
216 |
+
$resultTwo = $db->query("SELECT value FROM core_config_data WHERE path LIKE '".$varPath."'");
|
217 |
+
$rowTwo = $resultTwo->fetch(PDO::FETCH_ASSOC);
|
218 |
+
$token = $rowTwo['value'];
|
219 |
+
|
220 |
+
// getting api URL
|
221 |
+
$varURLPath = 'invoice/settings/api_url';
|
222 |
+
$resultURL = $db->query("SELECT value FROM core_config_data WHERE path LIKE '".$varURLPath."'");
|
223 |
+
$rowURL = $resultURL->fetch(PDO::FETCH_ASSOC);
|
224 |
+
$apiURL = $rowURL['value'];
|
225 |
+
|
226 |
+
|
227 |
+
$ch = curl_init($apiURL);
|
228 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
229 |
+
curl_setopt($ch, CURLOPT_USERPWD, $token.':123');
|
230 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, 'xml_request='.$xml);
|
231 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
232 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
233 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
234 |
+
curl_setopt($ch, CURLOPT_USERAGENT, "Invoicera API tester 1.0");
|
235 |
+
$curlClientResult = curl_exec($ch);
|
236 |
+
curl_close ($ch);
|
237 |
+
return $curlClientResult;
|
238 |
+
}
|
239 |
+
|
240 |
+
public function objectsIntoArray($arrObjData, $arrSkipIndices = array())
|
241 |
+
{
|
242 |
+
$arrData = array();
|
243 |
+
|
244 |
+
// if input is object, convert into array
|
245 |
+
if (is_object($arrObjData)) {
|
246 |
+
$arrObjData = get_object_vars($arrObjData);
|
247 |
+
}
|
248 |
+
|
249 |
+
if (is_array($arrObjData)) {
|
250 |
+
foreach ($arrObjData as $index => $value) {
|
251 |
+
if (is_object($value) || is_array($value)) {
|
252 |
+
$value = $this->objectsIntoArray($value, $arrSkipIndices); // recursive call
|
253 |
+
}
|
254 |
+
if (in_array($index, $arrSkipIndices)) {
|
255 |
+
continue;
|
256 |
+
}
|
257 |
+
$arrData[$index] = $value;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
return $arrData;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
?>
|
app/code/community/Invoicera/Invoice/etc/adminhtml.xml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-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 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Find
|
23 |
+
* @package Invoicera_Invoice
|
24 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<config>
|
29 |
+
<menu>
|
30 |
+
<catalog translate="title" module="invoicera_invoice">
|
31 |
+
<children>
|
32 |
+
<invoice translate="title" module="invoicera_invoice">
|
33 |
+
<title>TheInvoicera invoice</title>
|
34 |
+
<sort_order>5</sort_order>
|
35 |
+
<children>
|
36 |
+
<import_products translate="title" module="invoicera_invoice">
|
37 |
+
<title>Manage attributes</title>
|
38 |
+
<action>adminhtml/codes_grid/index</action>
|
39 |
+
<sort_order>5</sort_order>
|
40 |
+
</import_products>
|
41 |
+
<import_items translate="title" module="invoicera_invoice">
|
42 |
+
<title>Manage items</title>
|
43 |
+
<action>adminhtml/items_grid/index</action>
|
44 |
+
<sort_order>10</sort_order>
|
45 |
+
</import_items>
|
46 |
+
</children>
|
47 |
+
</invoice>
|
48 |
+
</children>
|
49 |
+
</catalog>
|
50 |
+
</menu>
|
51 |
+
</config>
|
app/code/community/Invoicera/Invoice/etc/config.xml
ADDED
@@ -0,0 +1,480 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-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 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Find
|
23 |
+
* @package Invoicera_Invoice
|
24 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<config>
|
29 |
+
<modules>
|
30 |
+
<Invoicera_Invoice>
|
31 |
+
<version>0.0.2</version>
|
32 |
+
</Invoicera_Invoice>
|
33 |
+
</modules>
|
34 |
+
<global>
|
35 |
+
<models>
|
36 |
+
<invoicera_invoice>
|
37 |
+
<class>Invoicera_Invoice_Model</class>
|
38 |
+
<resourceModel>invoicera_invoice_mysql4</resourceModel>
|
39 |
+
</invoicera_invoice>
|
40 |
+
<invoicera_invoice_mysql4>
|
41 |
+
<class>Invoicera_Invoice_Model_Mysql4</class>
|
42 |
+
<entities>
|
43 |
+
<invoice_import_codes>
|
44 |
+
<table>invoicera_invoice_import_codes</table>
|
45 |
+
</invoice_import_codes>
|
46 |
+
</entities>
|
47 |
+
</invoicera_invoice_mysql4>
|
48 |
+
</models>
|
49 |
+
<resources>
|
50 |
+
<invoicera_invoice_setup>
|
51 |
+
<setup>
|
52 |
+
<module>Invoicera_Invoice</module>
|
53 |
+
<class>Invoicera_Invoice_Model_Mysql4_Setup</class>
|
54 |
+
</setup>
|
55 |
+
</invoicera_invoice_setup>
|
56 |
+
</resources>
|
57 |
+
<blocks>
|
58 |
+
<invoicera_invoice><class>Invoicera_Invoice_Block</class></invoicera_invoice>
|
59 |
+
</blocks>
|
60 |
+
<helpers>
|
61 |
+
<invoicera_invoice>
|
62 |
+
<class>Invoicera_Invoice_Helper</class>
|
63 |
+
</invoicera_invoice>
|
64 |
+
</helpers>
|
65 |
+
</global>
|
66 |
+
<adminhtml>
|
67 |
+
<events>
|
68 |
+
<admin_system_config_changed_section_invoice>
|
69 |
+
<observers>
|
70 |
+
<invoicera_invoice>
|
71 |
+
<class>invoicera_invoice/observer</class>
|
72 |
+
<method>saveSystemConfig</method>
|
73 |
+
</invoicera_invoice>
|
74 |
+
</observers>
|
75 |
+
</admin_system_config_changed_section_invoice>
|
76 |
+
</events>
|
77 |
+
<acl>
|
78 |
+
<resources>
|
79 |
+
<admin>
|
80 |
+
<children>
|
81 |
+
<system>
|
82 |
+
<children>
|
83 |
+
<config>
|
84 |
+
<children>
|
85 |
+
<invoice>
|
86 |
+
<title>Invoice</title>
|
87 |
+
</invoice>
|
88 |
+
</children>
|
89 |
+
</config>
|
90 |
+
</children>
|
91 |
+
</system>
|
92 |
+
</children>
|
93 |
+
</admin>
|
94 |
+
</resources>
|
95 |
+
</acl>
|
96 |
+
</adminhtml>
|
97 |
+
<crontab>
|
98 |
+
<jobs>
|
99 |
+
<invoicera_invoice_file_send>
|
100 |
+
<schedule>
|
101 |
+
<config_path>invoice/settings/cron_schedule</config_path>
|
102 |
+
</schedule>
|
103 |
+
<run>
|
104 |
+
<model>invoicera_invoice/import::dispatch</model>
|
105 |
+
</run>
|
106 |
+
</invoicera_invoice_file_send>
|
107 |
+
</jobs>
|
108 |
+
</crontab>
|
109 |
+
<admin>
|
110 |
+
<routers>
|
111 |
+
<adminhtml>
|
112 |
+
<args>
|
113 |
+
<modules>
|
114 |
+
<invoicera_Invoice before="Mage_Adminhtml">Invoicera_Invoice</invoicera_Invoice>
|
115 |
+
</modules>
|
116 |
+
</args>
|
117 |
+
</adminhtml>
|
118 |
+
</routers>
|
119 |
+
</admin>
|
120 |
+
<stores>
|
121 |
+
<admin>
|
122 |
+
<design>
|
123 |
+
<theme>
|
124 |
+
<default>invoicera</default>
|
125 |
+
</theme>
|
126 |
+
</design>
|
127 |
+
</admin>
|
128 |
+
</stores>
|
129 |
+
<adminhtml>
|
130 |
+
<layout>
|
131 |
+
<updates>
|
132 |
+
<invoicera_invoice>
|
133 |
+
<file>invoice.xml</file>
|
134 |
+
</invoicera_invoice>
|
135 |
+
</updates>
|
136 |
+
</layout>
|
137 |
+
</adminhtml>
|
138 |
+
<invoicera_invoice_attributes>
|
139 |
+
<title>
|
140 |
+
<required>1</required>
|
141 |
+
<label>Title</label>
|
142 |
+
</title>
|
143 |
+
<description>
|
144 |
+
<required>1</required>
|
145 |
+
<label>Description</label>
|
146 |
+
</description>
|
147 |
+
<price>
|
148 |
+
<required>1</required>
|
149 |
+
<label>Price</label>
|
150 |
+
</price>
|
151 |
+
<page_url>
|
152 |
+
<required>1</required>
|
153 |
+
<label>Page_Url</label>
|
154 |
+
</page_url>
|
155 |
+
<image_link>
|
156 |
+
<required>1</required>
|
157 |
+
<label>Image_Link</label>
|
158 |
+
</image_link>
|
159 |
+
<sku>
|
160 |
+
<required>0</required>
|
161 |
+
<label>SKU</label>
|
162 |
+
</sku>
|
163 |
+
<upc_ean>
|
164 |
+
<required>0</required>
|
165 |
+
<labe>UPC-EAN</labe>
|
166 |
+
</upc_ean>
|
167 |
+
<mpn>
|
168 |
+
<required>0</required>
|
169 |
+
<label>MPN</label>
|
170 |
+
</mpn>
|
171 |
+
<isbn>
|
172 |
+
<required>0</required>
|
173 |
+
<label>ISBN</label>
|
174 |
+
</isbn>
|
175 |
+
<unique_id>
|
176 |
+
<required>0</required>
|
177 |
+
<label>Unique_ID</label>
|
178 |
+
</unique_id>
|
179 |
+
<style_id>
|
180 |
+
<required>0</required>
|
181 |
+
<label>Style_ID</label>
|
182 |
+
</style_id>
|
183 |
+
<style_name>
|
184 |
+
<required>0</required>
|
185 |
+
<label>Style_Name</label>
|
186 |
+
</style_name>
|
187 |
+
<sale>
|
188 |
+
<required>0</required>
|
189 |
+
<label>Sale</label>
|
190 |
+
</sale>
|
191 |
+
<sale_price>
|
192 |
+
<required>0</required>
|
193 |
+
<label>Sale_Price</label>
|
194 |
+
</sale_price>
|
195 |
+
<shipping_cost>
|
196 |
+
<required>0</required>
|
197 |
+
<label>Shipping_Cost</label>
|
198 |
+
</shipping_cost>
|
199 |
+
<free_shipping>
|
200 |
+
<required>0</required>
|
201 |
+
<label>Free_Shipping</label>
|
202 |
+
</free_shipping>
|
203 |
+
<online_only>
|
204 |
+
<required>0</required>
|
205 |
+
<label>Online_Only</label>
|
206 |
+
</online_only>
|
207 |
+
<qty>
|
208 |
+
<required>0</required>
|
209 |
+
<label>Stock_Quantity</label>
|
210 |
+
</qty>
|
211 |
+
<user_rating>
|
212 |
+
<required>0</required>
|
213 |
+
<label>User_Rating</label>
|
214 |
+
</user_rating>
|
215 |
+
<user_review_link>
|
216 |
+
<required>0</required>
|
217 |
+
<label>User_Review_Link</label>
|
218 |
+
</user_review_link>
|
219 |
+
<brand>
|
220 |
+
<required>0</required>
|
221 |
+
<label>Brand</label>
|
222 |
+
</brand>
|
223 |
+
<categories>
|
224 |
+
<required>0</required>
|
225 |
+
<label>Categories</label>
|
226 |
+
</categories>
|
227 |
+
<color>
|
228 |
+
<required>0</required>
|
229 |
+
<label>Color</label>
|
230 |
+
</color>
|
231 |
+
<compatible_with>
|
232 |
+
<required>0</required>
|
233 |
+
<label>Compatible_Wirth</label>
|
234 |
+
</compatible_with>
|
235 |
+
<condition>
|
236 |
+
<required>0</required>
|
237 |
+
<label>Condition</label>
|
238 |
+
</condition>
|
239 |
+
<coupons>
|
240 |
+
<required>0</required>
|
241 |
+
<label>Coupons</label>
|
242 |
+
</coupons>
|
243 |
+
<made_in>
|
244 |
+
<required>0</required>
|
245 |
+
<label>Made_In</label>
|
246 |
+
</made_in>
|
247 |
+
<model>
|
248 |
+
<required>0</required>
|
249 |
+
<label>Model</label>
|
250 |
+
</model>
|
251 |
+
<model_number>
|
252 |
+
<required>0</required>
|
253 |
+
<label>Model_Number</label>
|
254 |
+
</model_number>
|
255 |
+
<similar_to>
|
256 |
+
<required>0</required>
|
257 |
+
<label>Similar_To</label>
|
258 |
+
</similar_to>
|
259 |
+
<tags>
|
260 |
+
<required>0</required>
|
261 |
+
<label>Tags-Keywords</label>
|
262 |
+
</tags>
|
263 |
+
<unit_qty>
|
264 |
+
<required>0</required>
|
265 |
+
<label>Unit_Quantity</label>
|
266 |
+
</unit_qty>
|
267 |
+
<video_link>
|
268 |
+
<required>0</required>
|
269 |
+
<label>Video_Link</label>
|
270 |
+
</video_link>
|
271 |
+
<video_title>
|
272 |
+
<required>0</required>
|
273 |
+
<label>Video_Title</label>
|
274 |
+
</video_title>
|
275 |
+
<weight>
|
276 |
+
<required>0</required>
|
277 |
+
<label>Weight</label>
|
278 |
+
</weight>
|
279 |
+
<actors>
|
280 |
+
<required>0</required>
|
281 |
+
<label>Actors</label>
|
282 |
+
</actors>
|
283 |
+
<age_range>
|
284 |
+
<required>0</required>
|
285 |
+
<label>Age_Range</label>
|
286 |
+
</age_range>
|
287 |
+
<artist>
|
288 |
+
<required>0</required>
|
289 |
+
<label>Artist</label>
|
290 |
+
</artist>
|
291 |
+
<aspect_ratio>
|
292 |
+
<reuired>0</reuired>
|
293 |
+
<label>Aspect_Ratio</label>
|
294 |
+
</aspect_ratio>
|
295 |
+
<author>
|
296 |
+
<required>0</required>
|
297 |
+
<label>Author</label>
|
298 |
+
</author>
|
299 |
+
<battery_life>
|
300 |
+
<required>0</required>
|
301 |
+
<label>Battery_Life</label>
|
302 |
+
</battery_life>
|
303 |
+
<binding>
|
304 |
+
<required>0</required>
|
305 |
+
<label>Binding</label>
|
306 |
+
</binding>
|
307 |
+
<capacity>
|
308 |
+
<required>0</required>
|
309 |
+
<label>Capasity</label>
|
310 |
+
</capacity>
|
311 |
+
<color_output>
|
312 |
+
<required>0</required>
|
313 |
+
<label>Color_Output</label>
|
314 |
+
</color_output>
|
315 |
+
<department>
|
316 |
+
<required>0</required>
|
317 |
+
<label>Department</label>
|
318 |
+
</department>
|
319 |
+
<director>
|
320 |
+
<required>0</required>
|
321 |
+
<label>Directior</label>
|
322 |
+
</director>
|
323 |
+
<display_type>
|
324 |
+
<required>0</required>
|
325 |
+
<label>Display_Type</label>
|
326 |
+
</display_type>
|
327 |
+
<edition>
|
328 |
+
<required>0</required>
|
329 |
+
<label>Edition</label>
|
330 |
+
</edition>
|
331 |
+
<focus_type>
|
332 |
+
<required>0</required>
|
333 |
+
<label>Focus_Type</label>
|
334 |
+
</focus_type>
|
335 |
+
<format>
|
336 |
+
<required>0</required>
|
337 |
+
<label>Format</label>
|
338 |
+
</format>
|
339 |
+
<genre>
|
340 |
+
<required>0</required>
|
341 |
+
<label>Genre</label>
|
342 |
+
</genre>
|
343 |
+
<heel_height>
|
344 |
+
<required>0</required>
|
345 |
+
<label>Heel_Height</label>
|
346 |
+
</heel_height>
|
347 |
+
<height>
|
348 |
+
<required>0</required>
|
349 |
+
<label>Height</label>
|
350 |
+
</height>
|
351 |
+
<insallation>
|
352 |
+
<required>0</required>
|
353 |
+
<label>Installation</label>
|
354 |
+
</insallation>
|
355 |
+
<length>
|
356 |
+
<required>0</required>
|
357 |
+
<label>Length</label>
|
358 |
+
</length>
|
359 |
+
<load_type>
|
360 |
+
<required>0</required>
|
361 |
+
<label>Load_Type</label>
|
362 |
+
</load_type>
|
363 |
+
<material>
|
364 |
+
<required>0</required>
|
365 |
+
<label>Material</label>
|
366 |
+
</material>
|
367 |
+
<media_rating>
|
368 |
+
<required>0</required>
|
369 |
+
<label>Media_Rating</label>
|
370 |
+
</media_rating>
|
371 |
+
<megapixels>
|
372 |
+
<required>0</required>
|
373 |
+
<label>Megapixels</label>
|
374 |
+
</megapixels>
|
375 |
+
<memory_card_slot>
|
376 |
+
<required>0</required>
|
377 |
+
<label>Memory_Card_Slot</label>
|
378 |
+
</memory_card_slot>
|
379 |
+
<occasion>
|
380 |
+
<required>0</required>
|
381 |
+
<label>Occasion</label>
|
382 |
+
</occasion>
|
383 |
+
<optical_drive>
|
384 |
+
<required>0</required>
|
385 |
+
<label>Optical_Drive</label>
|
386 |
+
</optical_drive>
|
387 |
+
<pages>
|
388 |
+
<required>0</required>
|
389 |
+
<label>Pages</label>
|
390 |
+
</pages>
|
391 |
+
<gaming_platform>
|
392 |
+
<required>0</required>
|
393 |
+
<label>Gaming_Platform</label>
|
394 |
+
</gaming_platform>
|
395 |
+
<processor_speed>
|
396 |
+
<required>0</required>
|
397 |
+
<label>Processor_Speed</label>
|
398 |
+
</processor_speed>
|
399 |
+
<publisher>
|
400 |
+
<required>0</required>
|
401 |
+
<label>Publisher</label>
|
402 |
+
</publisher>
|
403 |
+
<recommended_usage>
|
404 |
+
<required>0</required>
|
405 |
+
<label>Recommended_Usage</label>
|
406 |
+
</recommended_usage>
|
407 |
+
<screen_resolution>
|
408 |
+
<required>0</required>
|
409 |
+
<label>Screen_Resolution</label>
|
410 |
+
</screen_resolution>
|
411 |
+
<sales_rank>
|
412 |
+
<required>0</required>
|
413 |
+
<label>Sales_Rank</label>
|
414 |
+
</sales_rank>
|
415 |
+
<screen_size>
|
416 |
+
<required>0</required>
|
417 |
+
<label>Screen_Size</label>
|
418 |
+
</screen_size>
|
419 |
+
<shoe_width>
|
420 |
+
<required>0</required>
|
421 |
+
<label>Shoe_Width</label>
|
422 |
+
</shoe_width>
|
423 |
+
<sizes>
|
424 |
+
<required>0</required>
|
425 |
+
<label>Sizes</label>
|
426 |
+
</sizes>
|
427 |
+
<sizes_in_stock>
|
428 |
+
<required>0</required>
|
429 |
+
<label>Sizes_in_Stock</label>
|
430 |
+
</sizes_in_stock>
|
431 |
+
<subject>
|
432 |
+
<required>0</required>
|
433 |
+
<label>Subject</label>
|
434 |
+
</subject>
|
435 |
+
<tech_spec_link>
|
436 |
+
<required>0</required>
|
437 |
+
<label>Tech_Spec_Link</label>
|
438 |
+
</tech_spec_link>
|
439 |
+
<width>
|
440 |
+
<required>0</required>
|
441 |
+
<label>Width</label>
|
442 |
+
</width>
|
443 |
+
<wireless_interface>
|
444 |
+
<required>0</required>
|
445 |
+
<label>Wireless_Interface</label>
|
446 |
+
</wireless_interface>
|
447 |
+
<year>
|
448 |
+
<required>0</required>
|
449 |
+
<label>Year</label>
|
450 |
+
</year>
|
451 |
+
<zoom>
|
452 |
+
<required>0</required>
|
453 |
+
<label>Zoom</label>
|
454 |
+
</zoom>
|
455 |
+
<alt_image_1>
|
456 |
+
<required>0</required>
|
457 |
+
<label>Alt_Image_1</label>
|
458 |
+
</alt_image_1>
|
459 |
+
<alt_image_2>
|
460 |
+
<required>0</required>
|
461 |
+
<label>Alt_Image_2</label>
|
462 |
+
</alt_image_2>
|
463 |
+
<alt_image_3>
|
464 |
+
<required>0</required>
|
465 |
+
<label>Alt_Image_3</label>
|
466 |
+
</alt_image_3>
|
467 |
+
<option_1>
|
468 |
+
<required>0</required>
|
469 |
+
<label>Option_1</label>
|
470 |
+
</option_1>
|
471 |
+
<option_2>
|
472 |
+
<required>0</required>
|
473 |
+
<label>Option_2</label>
|
474 |
+
</option_2>
|
475 |
+
<option_3>
|
476 |
+
<required>0</required>
|
477 |
+
<label>Option_3</label>
|
478 |
+
</option_3>
|
479 |
+
</invoicera_invoice_attributes>
|
480 |
+
</config>
|
app/code/community/Invoicera/Invoice/etc/system.xml
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-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 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Invoicera
|
23 |
+
* @package Invoicera_Invoice
|
24 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<config>
|
29 |
+
<tabs>
|
30 |
+
<invoicera translate="label" module="invoicera_invoice">
|
31 |
+
<label>The Invoicera</label>
|
32 |
+
<sort_order>300</sort_order>
|
33 |
+
</invoicera>
|
34 |
+
</tabs>
|
35 |
+
<sections>
|
36 |
+
<invoice translate="label" module="invoicera_invoice">
|
37 |
+
<label>Invoice Settings</label>
|
38 |
+
<tab>invoicera</tab>
|
39 |
+
<sort_order>10</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
<groups>
|
44 |
+
<settings translate="label">
|
45 |
+
<label>Invoicera Settings</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<sort_order>200</sort_order>
|
48 |
+
<show_in_default>1</show_in_default>
|
49 |
+
<show_in_website>1</show_in_website>
|
50 |
+
<show_in_store>1</show_in_store>
|
51 |
+
<fields>
|
52 |
+
<api_url translate="label">
|
53 |
+
<label>API URL</label>
|
54 |
+
<frontend_type>text</frontend_type>
|
55 |
+
<sort_order>1</sort_order>
|
56 |
+
<show_in_default>1</show_in_default>
|
57 |
+
<show_in_website>1</show_in_website>
|
58 |
+
<show_in_store>1</show_in_store>
|
59 |
+
</api_url>
|
60 |
+
<api_token translate="label">
|
61 |
+
<label>API Token</label>
|
62 |
+
<frontend_type>text</frontend_type>
|
63 |
+
<sort_order>2</sort_order>
|
64 |
+
<show_in_default>1</show_in_default>
|
65 |
+
<show_in_website>1</show_in_website>
|
66 |
+
<show_in_store>1</show_in_store>
|
67 |
+
</api_token>
|
68 |
+
</fields>
|
69 |
+
</settings>
|
70 |
+
</groups>
|
71 |
+
</invoice>
|
72 |
+
</sections>
|
73 |
+
</config>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Invoicera-Order-and-Invoice-Integrator</name>
|
4 |
-
<version>0.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Import your Magento Orders in real time into your Invoicera online billing software.</summary>
|
10 |
<description>Import your Magento Orders in real time into your Invoicera online billing software.</description>
|
11 |
<notes>Import your Magento Orders in real time into your Invoicera online billing software.</notes>
|
12 |
-
<authors><author><name>Sandeep Kumar</name><user>
|
13 |
-
<date>2011-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.2.9</min><max>5.2.17</max></php
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Invoicera-Order-and-Invoice-Integrator</name>
|
4 |
+
<version>0.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Import your Magento Orders in real time into your Invoicera online billing software.</summary>
|
10 |
<description>Import your Magento Orders in real time into your Invoicera online billing software.</description>
|
11 |
<notes>Import your Magento Orders in real time into your Invoicera online billing software.</notes>
|
12 |
+
<authors><author><name>Sandeep Kumar</name><user>Invoicera</user><email>sandeep.kumar@mail.vinove.com</email></author></authors>
|
13 |
+
<date>2011-06-15</date>
|
14 |
+
<time>13:43:40</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Invoicera"><dir name="Invoice"><dir name="Helper"><file name="Data.php" hash="dca64f7a606e2d41a000b131bad83fde"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Codes"><file name="Collection.php" hash="35e29977d34e82a35c5eae214fbf3ffc"/></dir><file name="Codes.php" hash="e6c3b680d09b4a393fd65b318ef3eb9d"/><file name="Setup.php" hash="de225644d18817672e4cf88fde1c7e79"/></dir></dir><dir name="controllers"><dir name="Sales"><dir name="Order"><file name="InvoiceController.php" hash="d379ff437f409c405f9d5c734ceb9776"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="89ff75885fa9c29ccb824ecd1fc679ba"/><file name="config.xml" hash="1a8c922864efbf33216465493d97a243"/><file name="system.xml" hash="073521b00ffad92c5f66c46106f2ab03"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.9</min><max>5.2.17</max></php></required></dependencies>
|
18 |
</package>
|