Version Notes
This release offers the following:
* New debug features
Download this release
Release Info
| Developer | TaxJar |
| Extension | Taxjar_Salestaxautomation |
| Version | 1.2.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.2.1 to 1.2.2
app/code/community/Taxjar/SalesTax/.DS_Store
DELETED
|
Binary file
|
app/code/community/Taxjar/SalesTax/Model/Debug.php
CHANGED
|
@@ -34,7 +34,7 @@ class Taxjar_SalesTax_Model_Debug {
|
|
| 34 |
$states = implode( ',', unserialize( Mage::getStoreConfig('taxjar/config/states') ) );
|
| 35 |
$apiUser = Mage::getModel('api/user');
|
| 36 |
$existingUserId = $apiUser->load('taxjar', 'username')->getUserId();
|
| 37 |
-
$pluginVersion = '1.2.
|
| 38 |
$phpMemory = @ini_get('memory_limit');
|
| 39 |
$phpVersion = @phpversion();
|
| 40 |
$magentoVersion = Mage::getVersion();
|
| 34 |
$states = implode( ',', unserialize( Mage::getStoreConfig('taxjar/config/states') ) );
|
| 35 |
$apiUser = Mage::getModel('api/user');
|
| 36 |
$existingUserId = $apiUser->load('taxjar', 'username')->getUserId();
|
| 37 |
+
$pluginVersion = '1.2.2';
|
| 38 |
$phpMemory = @ini_get('memory_limit');
|
| 39 |
$phpVersion = @phpversion();
|
| 40 |
$magentoVersion = Mage::getVersion();
|
app/code/community/Taxjar/SalesTax/Model/Observer.php
CHANGED
|
@@ -14,8 +14,8 @@ class Taxjar_SalesTax_Model_Observer {
|
|
| 14 |
* @return void
|
| 15 |
*/
|
| 16 |
public function execute( $observer ) {
|
| 17 |
-
|
| 18 |
-
|
| 19 |
$apiKey = Mage::getStoreConfig('taxjar/config/apikey', $storeId);
|
| 20 |
$apiKey = preg_replace( '/\s+/', '', $apiKey );
|
| 21 |
|
|
@@ -23,7 +23,6 @@ class Taxjar_SalesTax_Model_Observer {
|
|
| 23 |
$this->version = 'v1';
|
| 24 |
$client = Mage::getModel('taxjar/client');
|
| 25 |
$configuration = Mage::getModel('taxjar/configuration');
|
| 26 |
-
$debug = Mage::getModel('taxjar/debug');
|
| 27 |
$regionId = Mage::getStoreConfig('shipping/origin/region_id', $storeId);
|
| 28 |
$this->storeZip = Mage::getStoreConfig('shipping/origin/postcode', $storeId);
|
| 29 |
$this->regionCode = Mage::getModel('directory/region')->load( $regionId )->getCode();
|
|
@@ -130,7 +129,7 @@ class Taxjar_SalesTax_Model_Observer {
|
|
| 130 |
* @return $string
|
| 131 |
*/
|
| 132 |
private function apiUrl( $type ) {
|
| 133 |
-
$apiHost = '
|
| 134 |
$prefix = $apiHost . 'magento/' . $this->version . '/';
|
| 135 |
|
| 136 |
if ( $type == 'config' ) {
|
| 14 |
* @return void
|
| 15 |
*/
|
| 16 |
public function execute( $observer ) {
|
| 17 |
+
$session = Mage::getSingleton( 'adminhtml/session' );
|
| 18 |
+
$storeId = Mage::getModel('core/store')->load( $observer->getEvent()->getStore() )->getStoreId();
|
| 19 |
$apiKey = Mage::getStoreConfig('taxjar/config/apikey', $storeId);
|
| 20 |
$apiKey = preg_replace( '/\s+/', '', $apiKey );
|
| 21 |
|
| 23 |
$this->version = 'v1';
|
| 24 |
$client = Mage::getModel('taxjar/client');
|
| 25 |
$configuration = Mage::getModel('taxjar/configuration');
|
|
|
|
| 26 |
$regionId = Mage::getStoreConfig('shipping/origin/region_id', $storeId);
|
| 27 |
$this->storeZip = Mage::getStoreConfig('shipping/origin/postcode', $storeId);
|
| 28 |
$this->regionCode = Mage::getModel('directory/region')->load( $regionId )->getCode();
|
| 129 |
* @return $string
|
| 130 |
*/
|
| 131 |
private function apiUrl( $type ) {
|
| 132 |
+
$apiHost = 'https://api.taxjar.com/';
|
| 133 |
$prefix = $apiHost . 'magento/' . $this->version . '/';
|
| 134 |
|
| 135 |
if ( $type == 'config' ) {
|
app/code/community/Taxjar/SalesTax/etc/config.xml
CHANGED
|
@@ -5,15 +5,15 @@
|
|
| 5 |
* www.taxjar.com
|
| 6 |
-->
|
| 7 |
<config>
|
| 8 |
-
|
| 9 |
-
|
| 10 |
</modules>
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
<models>
|
| 18 |
<taxjar>
|
| 19 |
<class>Taxjar_SalesTax_Model</class>
|
|
@@ -44,7 +44,7 @@
|
|
| 44 |
</observers>
|
| 45 |
</taxjar_salestax_import_rates>
|
| 46 |
</events>
|
| 47 |
-
|
| 48 |
<frontend>
|
| 49 |
<routers>
|
| 50 |
<taxjar>
|
| 5 |
* www.taxjar.com
|
| 6 |
-->
|
| 7 |
<config>
|
| 8 |
+
<modules>
|
| 9 |
+
<Taxjar_SalesTax><version>1.2.2</version></Taxjar_SalesTax>
|
| 10 |
</modules>
|
| 11 |
+
<global>
|
| 12 |
+
<helpers>
|
| 13 |
+
<taxjar>
|
| 14 |
+
<class>Taxjar_SalesTax_Helper</class>
|
| 15 |
+
</taxjar>
|
| 16 |
+
</helpers>
|
| 17 |
<models>
|
| 18 |
<taxjar>
|
| 19 |
<class>Taxjar_SalesTax_Model</class>
|
| 44 |
</observers>
|
| 45 |
</taxjar_salestax_import_rates>
|
| 46 |
</events>
|
| 47 |
+
</global>
|
| 48 |
<frontend>
|
| 49 |
<routers>
|
| 50 |
<taxjar>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Taxjar_Salestaxautomation</name>
|
| 4 |
-
<version>1.2.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>MITL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -12,8 +12,8 @@
|
|
| 12 |
* New debug features</notes>
|
| 13 |
<authors><author><name>TaxJar</name><user>taxjar</user><email>support@taxjar.com</email></author></authors>
|
| 14 |
<date>2014-11-24</date>
|
| 15 |
-
<time>21:
|
| 16 |
-
<contents><target name="magecommunity"><dir name="Taxjar"><dir name="SalesTax"><dir name="Helper"><file name="Data.php" hash="565812e7d6927df4c91bfb69b79b1b09"/></dir><dir name="Model"><file name="Client.php" hash="6c3339bcc33670b0d41ded468b72e77b"/><file name="Comment.php" hash="e636422b9cc1ac0f0bb6b3751dcc90c9"/><file name="Configuration.php" hash="1ed6e9467ac8c5ca6e906753071a9161"/><file name="Debug.php" hash="
|
| 17 |
<compatible/>
|
| 18 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
| 19 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Taxjar_Salestaxautomation</name>
|
| 4 |
+
<version>1.2.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>MITL</license>
|
| 7 |
<channel>community</channel>
|
| 12 |
* New debug features</notes>
|
| 13 |
<authors><author><name>TaxJar</name><user>taxjar</user><email>support@taxjar.com</email></author></authors>
|
| 14 |
<date>2014-11-24</date>
|
| 15 |
+
<time>21:31:52</time>
|
| 16 |
+
<contents><target name="magecommunity"><dir name="Taxjar"><dir name="SalesTax"><dir name="Helper"><file name="Data.php" hash="565812e7d6927df4c91bfb69b79b1b09"/></dir><dir name="Model"><file name="Client.php" hash="6c3339bcc33670b0d41ded468b72e77b"/><file name="Comment.php" hash="e636422b9cc1ac0f0bb6b3751dcc90c9"/><file name="Configuration.php" hash="1ed6e9467ac8c5ca6e906753071a9161"/><file name="Debug.php" hash="4ce1560ba966e208a70997b753a2233b"/><file name="Observer.php" hash="dae265549f3e99edf406fa7ec9042f70"/><file name="Rate.php" hash="4f1f62e6696f10f34f58d7104936223d"/><file name="Rule.php" hash="ae33149080b3182e62b56607f7b30da4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4ea028ad6b00688d99531597e8d3c404"/><file name="config.xml" hash="7eafa4838a2bacce9bec14b702df2fbe"/><file name="system.xml" hash="8dc55519eef0349d487f4039eabda164"/></dir></dir><file name=".DS_Store" hash="e385b6a995c1af38f899669fa136a12e"/></dir></target><target name="mageetc"><dir name="modules"><file name="Taxjar_SalesTax.xml" hash="60b211e28d8b9d4cc49d1dd746d4aa46"/></dir></target></contents>
|
| 17 |
<compatible/>
|
| 18 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
| 19 |
</package>
|
