pitneybowes_gsp - Version 1.1.1

Version Notes

Patch release for Magento Connect.

1. Corrected currency conversion logic to not request rate from PB but run conversion directly in Magento

Download this release

Release Info

Developer Raymond Lai
Extension pitneybowes_gsp
Version 1.1.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.1.1

Files changed (43) hide show
  1. ReadMe.txt +5 -0
  2. app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Invoice/Totals.php +3 -3
  3. app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Totals.php +3 -3
  4. app/code/local/Pb/Pbgsp/Block/Checkout/Shipping/Method/Available.php +3 -3
  5. app/code/local/Pb/Pbgsp/Block/Form.php +3 -3
  6. app/code/local/Pb/Pbgsp/Block/Sales/Order/Invoice/Totals.php +3 -3
  7. app/code/local/Pb/Pbgsp/Block/Sales/Order/Totals.php +3 -3
  8. app/code/local/Pb/Pbgsp/Model/Api.php +3 -3
  9. app/code/local/Pb/Pbgsp/Model/Carrier/ShippingMethod.php +12 -4
  10. app/code/local/Pb/Pbgsp/Model/Catalog/Category.php +3 -3
  11. app/code/local/Pb/Pbgsp/Model/Catalog/Cron.php +3 -3
  12. app/code/local/Pb/Pbgsp/Model/Catalog/File.php +3 -3
  13. app/code/local/Pb/Pbgsp/Model/Catalog/Product.php +3 -3
  14. app/code/local/Pb/Pbgsp/Model/Credentials.php +3 -3
  15. app/code/local/Pb/Pbgsp/Model/Creditmemo/Duty.php +3 -3
  16. app/code/local/Pb/Pbgsp/Model/Handlingoptions.php +3 -3
  17. app/code/local/Pb/Pbgsp/Model/Helper.php +3 -3
  18. app/code/local/Pb/Pbgsp/Model/Inboundparcel.php +3 -3
  19. app/code/local/Pb/Pbgsp/Model/Inboundparcel.php_bk +0 -20
  20. app/code/local/Pb/Pbgsp/Model/Invoice/Duty.php +3 -3
  21. app/code/local/Pb/Pbgsp/Model/Messages.php +3 -3
  22. app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel.php +3 -3
  23. app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel/Collection.php +3 -3
  24. app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber.php +3 -3
  25. app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber/Collection.php +3 -3
  26. app/code/local/Pb/Pbgsp/Model/Mysql4/Variable.php +3 -3
  27. app/code/local/Pb/Pbgsp/Model/Mysql4/Variable/Collection.php +3 -3
  28. app/code/local/Pb/Pbgsp/Model/Observer.php +17 -6
  29. app/code/local/Pb/Pbgsp/Model/Observer.php_bk +0 -347
  30. app/code/local/Pb/Pbgsp/Model/Ordernumber.php +3 -3
  31. app/code/local/Pb/Pbgsp/Model/Pdf/Tax.php +3 -3
  32. app/code/local/Pb/Pbgsp/Model/Quote/Duty.php +17 -9
  33. app/code/local/Pb/Pbgsp/Model/Resource/Mysql4/Setup.php +3 -3
  34. app/code/local/Pb/Pbgsp/Model/Sales/Order/Shipment.php +3 -3
  35. app/code/local/Pb/Pbgsp/Model/Util.php +3 -3
  36. app/code/local/Pb/Pbgsp/Model/Variable.php +3 -3
  37. app/code/local/Pb/Pbgsp/README +0 -2
  38. app/code/local/Pb/Pbgsp/data/pb_pbgsp_setup/data-install-1.0.0.php +3 -3
  39. app/code/local/Pb/Pbgsp/etc/config.xml +1 -1
  40. app/code/local/Pb/Pbgsp/etc/config.xml_bk +0 -511
  41. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php +3 -3
  42. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.0.0-1.0.1.php +3 -3
  43. package.xml +5 -9
ReadMe.txt CHANGED
@@ -31,6 +31,11 @@ In order to take advantage of the file encryption setting in the extension confi
31
  ========================================================
32
  CHANGELOG
33
  ========================================================
 
 
 
 
 
34
  v. 1.1.0
35
 
36
  Added logic to cancel the order in the PB system when a PB order is cancelled in Magento.
31
  ========================================================
32
  CHANGELOG
33
  ========================================================
34
+ v. 1.1.1
35
+
36
+ Corrected currency conversion logic to not request rate from PB but run conversion directly in Magento
37
+
38
+
39
  v. 1.1.0
40
 
41
  Added logic to cancel the order in the PB system when a PB order is cancelled in Magento.
app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Invoice/Totals.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
 
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
 
app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Totals.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
 
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
 
app/code/local/Pb/Pbgsp/Block/Checkout/Shipping/Method/Available.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
 
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
 
app/code/local/Pb/Pbgsp/Block/Form.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Block/Sales/Order/Invoice/Totals.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
 
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
 
app/code/local/Pb/Pbgsp/Block/Sales/Order/Totals.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Api.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Carrier/ShippingMethod.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
 
@@ -144,7 +144,15 @@ class Pb_Pbgsp_Model_Carrier_ShippingMethod extends Mage_Shipping_Model_Carrier_
144
 
145
  else {
146
  Pb_Pbgsp_Model_Util::log('Free tax disabled');
147
- $method->setTax($quote['totalImportation']['total']['value']);
 
 
 
 
 
 
 
 
148
  }
149
 
150
  return $method;
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
 
144
 
145
  else {
146
  Pb_Pbgsp_Model_Util::log('Free tax disabled');
147
+ $tax = $quote['totalImportation']['total']['value'];
148
+ Mage::getSingleton("customer/session")->setPbDutyAndTaxUSD($tax);
149
+ if(Mage::app()->getStore()->getCurrentCurrencyCode() != 'USD') {
150
+
151
+ $tax = Mage::app()->getStore()->convertPrice($tax);
152
+
153
+ }
154
+ Mage::getSingleton("customer/session")->setPbDutyAndTax($tax);
155
+ $method->setTax($tax);
156
  }
157
 
158
  return $method;
app/code/local/Pb/Pbgsp/Model/Catalog/Category.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Catalog/Cron.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Catalog/File.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/File.php
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/File.php
app/code/local/Pb/Pbgsp/Model/Catalog/Product.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Credentials.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Creditmemo/Duty.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Handlingoptions.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Helper.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Inboundparcel.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Inboundparcel.php_bk DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
- /**
3
- * Product: Pb_Pbgsp (1.0.3)
4
- * Packaged: 2015-09-1T15:12:28+00:00
5
- * Last Modified: 2015-08-25T15:12:28+00:00
6
-
7
-
8
-
9
- * File: app/code/local/Pb/Pbgsp/Model/Inboundparcel.php
10
- * Copyright: Copyright (c) 2015 Pitney Bowes <info@pb.com> / All rights reserved.
11
- */
12
- class Pb_Pbgsp_Model_Inboundparcel extends Mage_Core_Model_Abstract {
13
- public function _construct()
14
- {
15
- parent::_construct();
16
- $this->_init('pb_pbgsp/inboundparcel');
17
- }
18
- }
19
-
20
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Pb/Pbgsp/Model/Invoice/Duty.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Messages.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel/Collection.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber/Collection.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Mysql4/Variable.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Mysql4/Variable/Collection.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Observer.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
-
7
 
8
 
9
 
@@ -73,8 +72,9 @@ class Pb_Pbgsp_Model_Observer {
73
  $items[] = $item;
74
 
75
  }
76
-
77
  $parcelResponse = Pb_Pbgsp_Model_Api::generateInboundParcelNumber($shipment,$items,$order,$cpOrderNumber);
 
78
  if(array_key_exists('errors',$parcelResponse)) {
79
  Pb_Pbgsp_Model_Util::log("Error generating inbound parcel");
80
  Pb_Pbgsp_Model_Util::log($parcelResponse);
@@ -85,6 +85,7 @@ class Pb_Pbgsp_Model_Observer {
85
  $cpParcel->setMageOrderNumber( $order->getRealOrderId());
86
  $cpParcel->setPbOrderNumber( $cpOrderNumber);
87
  $cpParcel->save();
 
88
  Pb_Pbgsp_Model_Util::log('Inbound Parcel Number Saved');
89
  }
90
 
@@ -152,7 +153,9 @@ class Pb_Pbgsp_Model_Observer {
152
  foreach ($clearPathOrders as $cpOrder) {
153
  $cpOrderNumber = $cpOrder -> getCpOrderNumber();
154
  if (Pb_Pbgsp_Model_Api::cancelOrder($cpOrderNumber)) {
 
155
  Pb_Pbgsp_Model_Util::log(" $mageOrderNumber order is cancel in PB");
 
156
  }
157
  }
158
  }
@@ -163,7 +166,7 @@ class Pb_Pbgsp_Model_Observer {
163
  }
164
 
165
  public function saveShippingMethod($observer) {
166
- // Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.saveShippingMethod');
167
  //TODO: If anything fails here I need to fail the checkout process.
168
  $address = $observer->getQuote()->getShippingAddress();
169
  if ($this->isPbOrder($address)) {
@@ -176,8 +179,15 @@ class Pb_Pbgsp_Model_Observer {
176
  }
177
 
178
  $tax = $order['order']['totalImportation']['total']['value'];
 
179
  if(Pb_Pbgsp_Model_Credentials::isFreeTaxEnabled())
180
  $tax = 0;
 
 
 
 
 
 
181
  Mage::getSingleton("customer/session")->setPbDutyAndTax($tax);
182
 
183
  $orderNumber = Mage::getModel("pb_pbgsp/ordernumber");
@@ -196,6 +206,7 @@ class Pb_Pbgsp_Model_Observer {
196
  Pb_Pbgsp_Model_Util::log(" not clearpath order");
197
  Mage::getSingleton("customer/session")->setPbDutyAndTax(false);
198
  Mage::getSingleton("customer/session")->setPbOrderNumber(false);
 
199
  }
200
  }
201
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.0.3)
4
+ * Packaged: 2015-09-1T15:12:28+00:00
5
+ * Last Modified: 2015-08-25T15:12:28+00:00
 
6
 
7
 
8
 
72
  $items[] = $item;
73
 
74
  }
75
+
76
  $parcelResponse = Pb_Pbgsp_Model_Api::generateInboundParcelNumber($shipment,$items,$order,$cpOrderNumber);
77
+
78
  if(array_key_exists('errors',$parcelResponse)) {
79
  Pb_Pbgsp_Model_Util::log("Error generating inbound parcel");
80
  Pb_Pbgsp_Model_Util::log($parcelResponse);
85
  $cpParcel->setMageOrderNumber( $order->getRealOrderId());
86
  $cpParcel->setPbOrderNumber( $cpOrderNumber);
87
  $cpParcel->save();
88
+
89
  Pb_Pbgsp_Model_Util::log('Inbound Parcel Number Saved');
90
  }
91
 
153
  foreach ($clearPathOrders as $cpOrder) {
154
  $cpOrderNumber = $cpOrder -> getCpOrderNumber();
155
  if (Pb_Pbgsp_Model_Api::cancelOrder($cpOrderNumber)) {
156
+
157
  Pb_Pbgsp_Model_Util::log(" $mageOrderNumber order is cancel in PB");
158
+ Mage::getSingleton('core/session')->addSuccess('PB order cancel successfully');
159
  }
160
  }
161
  }
166
  }
167
 
168
  public function saveShippingMethod($observer) {
169
+ //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.saveShippingMethod');
170
  //TODO: If anything fails here I need to fail the checkout process.
171
  $address = $observer->getQuote()->getShippingAddress();
172
  if ($this->isPbOrder($address)) {
179
  }
180
 
181
  $tax = $order['order']['totalImportation']['total']['value'];
182
+
183
  if(Pb_Pbgsp_Model_Credentials::isFreeTaxEnabled())
184
  $tax = 0;
185
+ Mage::getSingleton("customer/session")->setPbDutyAndTaxUSD($tax);
186
+ if(Mage::app()->getStore()->getCurrentCurrencyCode() != 'USD') {
187
+
188
+ $tax = Mage::app()->getStore()->convertPrice($tax);
189
+
190
+ }
191
  Mage::getSingleton("customer/session")->setPbDutyAndTax($tax);
192
 
193
  $orderNumber = Mage::getModel("pb_pbgsp/ordernumber");
206
  Pb_Pbgsp_Model_Util::log(" not clearpath order");
207
  Mage::getSingleton("customer/session")->setPbDutyAndTax(false);
208
  Mage::getSingleton("customer/session")->setPbOrderNumber(false);
209
+ Mage::getSingleton("customer/session")->setPbDutyAndTaxUSD(false);
210
  }
211
  }
212
 
app/code/local/Pb/Pbgsp/Model/Observer.php_bk DELETED
@@ -1,347 +0,0 @@
1
- <?php
2
- /**
3
- * Product: Pb_Pbgsp (1.0.3)
4
- * Packaged: 2015-09-1T15:12:28+00:00
5
- * Last Modified: 2015-08-25T15:12:28+00:00
6
-
7
-
8
-
9
- * File: app/code/local/Pb/Pbgsp/Model/Observer.php
10
- * Copyright: Copyright (c) 2015 Pitney Bowes <info@pb.com> / All rights reserved.
11
- */
12
- class Pb_Pbgsp_Model_Observer {
13
- const MODULE_NAME = 'Pb_Pbgsp';
14
- public function __construct() {
15
- }
16
-
17
- public function isPbOrder($address) {
18
- $shipMethod = $address->getShippingMethod();
19
- $len = strlen("pbgsp_");
20
- if (strlen($shipMethod) > $len && substr($shipMethod,0,$len) == "pbgsp_") {
21
- return true;
22
- }
23
- Pb_Pbgsp_Model_Util::log("Shipping method". $shipMethod);
24
- return false;
25
-
26
- }
27
-
28
- public function productLoadAfter($observer) {
29
- $event = $observer->getEvent();
30
- $product = $event->getProduct();
31
- $product->lockAttribute('pb_pbgsp_upload');
32
- }
33
- public function categoryLoadAfter($observer) {
34
- $event = $observer->getEvent();
35
- $category = $event->getCategory();
36
- $category->lockAttribute('pb_pbgsp_upload');
37
- }
38
- public function getShipMethod($observer) {
39
- Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.getShipMethod');
40
- $shipMethod = $observer->getQuote()->getShippingAddress()->getShippingMethod();
41
-
42
- return substr($shipMethod,strlen("pbgsp_"));
43
- }
44
-
45
- public function generateInboundParcelPreAdvice($observer) {
46
-
47
- if(Pb_Pbgsp_Model_Credentials::isASNGenerationEnabled() == '1') {
48
- try {
49
- $shipment = $observer->getEvent()->getShipment();
50
- $order = $shipment->getOrder();
51
- /* @var $order Mage_Sales_Model_Order */
52
-
53
- if(!$this->isPbOrder($order))
54
- return;
55
- //check if ASN already generated or not
56
- $parcel = Mage::getModel("pb_pbgsp/inboundparcel")-> getCollection();
57
- $parcel -> addFieldToFilter('mage_order_number', $order -> getRealOrderId());
58
- // if(count($parcel) > 0)
59
- // return;
60
- Pb_Pbgsp_Model_Util::log("Generting ASN.");
61
- $clearPathOrders = Mage::getModel("pb_pbgsp/ordernumber")-> getCollection();
62
- $clearPathOrders -> addFieldToFilter('mage_order_number', $order -> getRealOrderId());
63
- foreach ($clearPathOrders as $cpOrder) {
64
- $cpOrderNumber = $cpOrder -> getCpOrderNumber();
65
- $tracks = array();
66
- $items = array();
67
- foreach($shipment->getTracksCollection() as $track) {
68
- $tracks[] = $track;
69
- }
70
- foreach($shipment->getItemsCollection() as $item) {
71
-
72
- $items[] = $item;
73
-
74
- }
75
-
76
- $parcelResponse = Pb_Pbgsp_Model_Api::generateInboundParcelNumber($shipment,$items,$order,$cpOrderNumber);
77
- if(array_key_exists('errors',$parcelResponse)) {
78
- Pb_Pbgsp_Model_Util::log("Error generating inbound parcel");
79
- Pb_Pbgsp_Model_Util::log($parcelResponse);
80
- }
81
- else {
82
- $cpParcel = Mage::getModel('pb_pbgsp/inboundparcel');
83
- $cpParcel->setInboundParcel($parcelResponse['parcelIdentifier']);
84
- $cpParcel->setMageOrderNumber( $order->getRealOrderId());
85
- $cpParcel->setPbOrderNumber( $cpOrderNumber);
86
- $cpParcel->save();
87
- Pb_Pbgsp_Model_Util::log('Inbound Parcel Number Saved');
88
- }
89
-
90
- }
91
-
92
-
93
- }
94
- catch(Exception $e) {
95
- Pb_Pbgsp_Model_Util::log("Error creating inbound parcel. ");
96
- Pb_Pbgsp_Model_Util::logException($e);
97
- }
98
- }
99
-
100
- }
101
- public function createPbOrder($observer) {
102
- // Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.createPbOrder');
103
- Mage::getSingleton("customer/session")->setPbDutyAndTax(0);
104
- $mageOrderNumber = Mage::getSingleton('checkout/session')->getLastRealOrderId();
105
- $order = Mage::getModel('sales/order')->loadByIncrementId($mageOrderNumber);
106
- Pb_Pbgsp_Model_Util::log(" createPbOrder");
107
- if ($this->isPbOrder($order)) {
108
- $orderNumber = Mage::getSingleton("customer/session")->getPbOrderNumber();
109
-
110
- // Save in DB
111
-
112
- $orderNumber->setMageOrderNumber($mageOrderNumber);
113
- //$orderNumber->setCpOrderNumber($cpOrderNumber);
114
- Pb_Pbgsp_Model_Util::log($orderNumber->getHubId());
115
- Pb_Pbgsp_Model_Util::log($orderNumber->getHubCountry());
116
- $orderNumber->setConfirmed(false);
117
- $orderNumber->setReferenced(false);
118
- $orderNumber->save();
119
- Pb_Pbgsp_Model_Util::log("calling PB confirm order for $mageOrderNumber");
120
- if (Pb_Pbgsp_Model_Api::confirmOrder($orderNumber->getCpOrderNumber(),$order)) {
121
- $orderNumber->setConfirmed(true);
122
- $orderNumber->setReferenced(true);
123
- $orderNumber->save();
124
- Pb_Pbgsp_Model_Util::log(" $mageOrderNumber order is confirmed in PB");
125
- }
126
- // if (Pb_Pbgsp_Model_Api::setOrderReference($cpOrderNumber,$mageOrderNumber)) {
127
- // $orderNumber->setReferenced(true);
128
- // $orderNumber->save();
129
- // }
130
- }
131
- else {
132
- Pb_Pbgsp_Model_Util::log("$mageOrderNumber not PB order");
133
- }
134
-
135
- }
136
-
137
- public function saveShippingMethod($observer) {
138
- // Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.saveShippingMethod');
139
- //TODO: If anything fails here I need to fail the checkout process.
140
- $address = $observer->getQuote()->getShippingAddress();
141
- if ($this->isPbOrder($address)) {
142
- Pb_Pbgsp_Model_Util::log(" PB order");
143
- $items = Mage::getSingleton('checkout/cart')->getItems();
144
- $shipMethod = $this->getShipMethod($observer);
145
- $order = Pb_Pbgsp_Model_Api::createOrder($items,$shipMethod,$address);
146
- if (!$order) {
147
- Mage::throwException("Unable to create Pb order.");
148
- }
149
-
150
- $tax = $order['order']['totalImportation']['total']['value'];
151
- if(Pb_Pbgsp_Model_Credentials::isFreeTaxEnabled())
152
- $tax = 0;
153
- Mage::getSingleton("customer/session")->setPbDutyAndTax($tax);
154
-
155
- $orderNumber = Mage::getModel("pb_pbgsp/ordernumber");
156
-
157
- $orderNumber->setCpOrderNumber($order["orderId"]);
158
- $orderNumber->setHubId($order["shipToHub"]['hubId']);
159
- $orderNumber->setHubStreet1($order["shipToHub"]['hubAddress']['street1']);
160
- $orderNumber->setHubStreet2($order["shipToHub"]['hubAddress']['street2']);
161
-
162
- $orderNumber->setHubProvinceOrState($order["shipToHub"]['hubAddress']['provinceOrState']);
163
- $orderNumber->setHubCountry($order["shipToHub"]['hubAddress']['country']);
164
- $orderNumber->setHubPostalCode($order["shipToHub"]['hubAddress']['postalOrZipCode']);
165
- $orderNumber->setHubCity($order["shipToHub"]['hubAddress']['city']);
166
- Mage::getSingleton("customer/session")->setPbOrderNumber($orderNumber);
167
- } else {
168
- Pb_Pbgsp_Model_Util::log(" not clearpath order");
169
- Mage::getSingleton("customer/session")->setPbDutyAndTax(false);
170
- Mage::getSingleton("customer/session")->setPbOrderNumber(false);
171
- }
172
- }
173
-
174
- public function addDutiesOnEstimation($observer){
175
- //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.addDutiesOnEstimation');
176
- Mage::getSingleton("customer/session")->setPbDutyAndTax(false);//Added by BigPixel to clear previous values, 10/20/2013
177
- $clearPathMethods = Mage::getSingleton('checkout/session')->getPbMethods();
178
- $quote = Mage::getSingleton('checkout/session')->getQuote();
179
- $selectedMethod = null;
180
- if($quote->getShippingAddress()){
181
- $selectedMethod = $quote->getShippingAddress()->getShippingMethod();
182
- }
183
-
184
- if($selectedMethod){
185
- $selectedMethod = preg_replace('/pbgsp_/', '',$selectedMethod);
186
- foreach($clearPathMethods as $clearPathMethod){
187
- Pb_Pbgsp_Model_Util::log('addDutiesOnEstimation method'.$clearPathMethod->getMethod().' and tax'.$clearPathMethod->getTax());
188
- if($clearPathMethod->getMethod() == $selectedMethod){
189
- Mage::getSingleton("customer/session")->setPbDutyAndTax($clearPathMethod->getTax());
190
- }
191
- }
192
- }
193
- }
194
-
195
- public function modifyOrderView($observer = NULL) {
196
-
197
- //return;
198
- if (!$observer) {
199
- return;
200
- }
201
- if (Mage::getStoreConfig('advanced/modules_disable_output/'.self::MODULE_NAME))
202
- return;
203
- $transport = $observer->getEvent()->getTransport();
204
- $layoutName = $observer->getEvent()->getBlock()->getNameInLayout();
205
- if ('order_info' == $layoutName) {
206
-
207
- if (!Mage::getStoreConfig('advanced/modules_disable_output/'.self::MODULE_NAME)) {
208
-
209
-
210
- $cpOrderNumber = $this->_getCpOrderNumber($observer->getEvent()->getBlock()->getOrder());
211
- if($cpOrderNumber) {
212
- $html = "<div class='entry-edit'>
213
- <div class='entry-edit-head'>
214
- <h4 class='icon-head '>Pitney Bowes Shipments</h4>
215
- </div>
216
- <fieldset>
217
- <strong>PB Order Number</strong>
218
- <span>".$cpOrderNumber->getCpOrderNumber()."</span><br/>
219
- <strong>Hub ID</strong>
220
- <span>".$cpOrderNumber->getHubId()."</span><br/>
221
- <strong>Hub Street 1</strong>
222
- <span>".$cpOrderNumber->getHubStreet1()."</span><br/>
223
- <strong>Hub Street 2</strong>
224
- <span>".$cpOrderNumber->getHubStreet2()."</span><br/>
225
-
226
- <strong>Postal Code</strong>
227
- <span>".$cpOrderNumber->getHubPostalCode()."</span><br/>
228
- <strong>Hub Province/State</strong>
229
- <span>".$cpOrderNumber->getHubProvinceOrState()."</span><br/>
230
- <strong>Hub City</strong>
231
- <span>".$cpOrderNumber->getHubCity()."</span><br/>
232
- <strong>Hub Country</strong>
233
- <span>".$cpOrderNumber->getHubCountry()."</span><br/>
234
- </fieldset>
235
- </div>";
236
- $transport['html'] = $transport['html'] . $html;
237
- }
238
-
239
-
240
- }
241
- }
242
- else if('email/order/shipment/track.phtml' == $observer->getEvent()->getBlock()->getTemplate()) {
243
- if(!Mage::getStoreConfig('carriers/pbgsp/trackinglink'))
244
- return;
245
-
246
- $cpord = $this->_getCPORD($observer->getEvent()->getBlock()->getOrder());
247
- if($cpord) {
248
- $staging = 0;
249
- if(strpos(Pb_Pbgsp_Model_Credentials::getCheckoutUrl(),'cpsandbox') >=0)
250
- $staging = 1;
251
- $transport['html'] = "<a href='http://tracking.ecommerce.pb.com/track/$cpord?staging=$staging'>Track your order</a>";
252
- }
253
-
254
- }
255
- else if('shipping.tracking.popup' == $layoutName) {
256
- if(!Mage::getStoreConfig('carriers/pbgsp/trackinglink'))
257
- return;
258
-
259
- $helper = Mage::helper('shipping');
260
- $data = $helper->decodeTrackingHash($observer->getEvent()->getBlock()->getRequest()->getParam('hash'));
261
-
262
- $orderId = null;
263
- if($data['key'] == 'order_id')
264
- $orderId = $data['id'];
265
- else if($data['key'] == 'ship_id') {
266
- /* @var $model Mage_Sales_Model_Order_Shipment */
267
- $model = Mage::getModel('sales/order_shipment');
268
- $ship = $model->load($data['id']);
269
- $orderId = $model->getOrderId();
270
- }
271
- else if($data['key'] == 'track_id') {
272
- $track = Mage::getModel('sales/order_shipment_track')->load($data['id']);
273
- $orderId = $track->getOrderId();
274
- }
275
- if(!$orderId)
276
- return;
277
- $cpord = $this->_getCPORD(Mage::getModel('sales/order')->load($orderId));
278
- if($cpord) {
279
- $staging = 0;
280
- if(strpos(Pb_Pbgsp_Model_Credentials::getCheckoutUrl(),'cpsandbox') >=0)
281
- $staging = 1;
282
- $script = "<script lang='javascript'>
283
- window.location = 'http://tracking.ecommerce.pb.com/track/$cpord?staging=$staging';
284
- </script>
285
- ";
286
- $transport['html'] = $script;
287
- }
288
-
289
- }
290
- else
291
- // if( 'checkout.onepage.review' == $layoutName
292
- // || 'checkout.onepage.review.info.totals' == $layoutName
293
- // || 'checkout.cart.totals' == $layoutName)
294
- {
295
- //replace "Shipping & Handling" to "Transportation Charges" and "Duty & Taxes" to "Importation Charges"
296
- $html = $transport['html'];
297
- $pbTitle = Mage::getStoreConfig('carriers/pbgsp/title');
298
- if(strpos($html,$pbTitle) !== false) {
299
- $html = str_replace("Shipping &amp; Handling","Transportation Charges",$html);
300
- $html = str_replace("Shipping & Handling","Transportation Charges",$html);
301
- $html = str_replace("Duty & Taxes","Importation Charges",$html);
302
- $html = str_replace("Duty &amp; Taxes","Importation Charges",$html);
303
- $transport['html'] = $html;
304
- }
305
-
306
- }
307
- // else {
308
- //
309
- // }
310
- // else {
311
- // $html = $transport['html'];
312
- // if(strpos('Shipping & Handling',$html) >= 0)
313
- // Pb_Pbgsp_Model_Util::log("Found in $layoutName");
314
- // }
315
-
316
- return $this;
317
- }
318
- private function _getCPORD($order)
319
- {
320
- if($order) {
321
- $cpOrder = $this->_getCpOrderNumber($order);
322
- if($cpOrder) {
323
- return $cpOrder -> getCpOrderNumber();
324
- }
325
-
326
- }
327
-
328
- return false;
329
- }
330
- private function _getCpOrderNumber($order)
331
- {
332
- if($order) {
333
- // $clearPathOrders = Mage::getModel("pb_pbgsp/ordernumber")-> getCollection();
334
- //
335
- // $clearPathOrders -> addFieldToFilter('mage_order_number', $order -> getRealOrderId());
336
- // foreach ($clearPathOrders as $cpOrder) {
337
- // return $cpOrder ;
338
- //
339
- // }
340
- $cpOrder = Mage::getModel("pb_pbgsp/ordernumber")->load($order -> getRealOrderId(),'mage_order_number');
341
- return $cpOrder;
342
- }
343
-
344
- return false;
345
- }
346
- }
347
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Pb/Pbgsp/Model/Ordernumber.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Pdf/Tax.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Quote/Duty.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.1.0)
5
- * Packaged: 2015-09-9T12:10:00+00:00
6
- * Last Modified: 2015-09-1T15:12:28+00:00
7
 
8
 
9
 
@@ -29,7 +29,13 @@ class Pb_Pbgsp_Model_Quote_Duty extends Mage_Tax_Model_Sales_Total_Quote_Tax
29
 
30
  public function getDutyAndTax() {
31
  //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Quote_Duty.getDutyAndTax');
32
- return Mage::getSingleton("customer/session")->getPbDutyAndTax();
 
 
 
 
 
 
33
  }
34
 
35
  /**
@@ -40,7 +46,7 @@ class Pb_Pbgsp_Model_Quote_Duty extends Mage_Tax_Model_Sales_Total_Quote_Tax
40
  */
41
  public function collect(Mage_Sales_Model_Quote_Address $address)
42
  {
43
- //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Quote_Duty.collect');
44
  parent::collect($address);
45
 
46
  if ($this->getDutyAndTax()) {
@@ -65,16 +71,18 @@ class Pb_Pbgsp_Model_Quote_Duty extends Mage_Tax_Model_Sales_Total_Quote_Tax
65
  public function fetch(Mage_Sales_Model_Quote_Address $address)
66
  {
67
  //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Quote_Duty.fetch');
68
-
69
- if ($this->getDutyAndTax()) {
70
  if($this->dutyDisplayed) {
71
  return $this;
72
  }
73
  $this->dutyDisplayed = true;
74
 
75
- $amount = $address->getTaxAmount();
 
 
76
  $title = "Duty & Taxes";
77
- Pb_Pbgsp_Model_Util::log("Add Duty & Taxes at Duty");
78
  $address->addTotal(array(
79
  'code' => $this->getCode(),
80
  'title' => $title,
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.1.1)
5
+ * Packaged: 2015-09-14T12:11:20+00:00
6
+ * Last Modified: 2015-09-9T12:10:00+00:00
7
 
8
 
9
 
29
 
30
  public function getDutyAndTax() {
31
  //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Quote_Duty.getDutyAndTax');
32
+ $amount = Mage::getSingleton("customer/session")->getPbDutyAndTax();
33
+ if($amount) {
34
+ if(Mage::app()->getStore()->getCurrentCurrencyCode() == 'USD')
35
+ return Mage::getSingleton("customer/session")->getPbDutyAndTaxUSD();
36
+ }
37
+
38
+ return $amount;
39
  }
40
 
41
  /**
46
  */
47
  public function collect(Mage_Sales_Model_Quote_Address $address)
48
  {
49
+ // Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Quote_Duty.collect');
50
  parent::collect($address);
51
 
52
  if ($this->getDutyAndTax()) {
71
  public function fetch(Mage_Sales_Model_Quote_Address $address)
72
  {
73
  //Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Quote_Duty.fetch');
74
+ $amount = $this->getDutyAndTax();
75
+ if ($amount) {
76
  if($this->dutyDisplayed) {
77
  return $this;
78
  }
79
  $this->dutyDisplayed = true;
80
 
81
+ //$amount = $address->getTaxAmount();
82
+ //$amount = Mage::app()->getStore()->convertPrice($amount);
83
+
84
  $title = "Duty & Taxes";
85
+ Pb_Pbgsp_Model_Util::log("Add Duty & Taxes at Duty:" . $amount);
86
  $address->addTotal(array(
87
  'code' => $this->getCode(),
88
  'title' => $title,
app/code/local/Pb/Pbgsp/Model/Resource/Mysql4/Setup.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Sales/Order/Shipment.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Util.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/Model/Variable.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/README DELETED
@@ -1,2 +0,0 @@
1
- Dependencies:
2
- gnupg
 
 
app/code/local/Pb/Pbgsp/data/pb_pbgsp_setup/data-install-1.0.0.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
app/code/local/Pb/Pbgsp/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pb_Pbgsp>
5
- <version>1.1.0</version>
6
  </Pb_Pbgsp>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Pb_Pbgsp>
5
+ <version>1.1.1</version>
6
  </Pb_Pbgsp>
7
  </modules>
8
  <global>
app/code/local/Pb/Pbgsp/etc/config.xml_bk DELETED
@@ -1,511 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Pb_Pbgsp>
5
- <version>1.0.1</version>
6
- </Pb_Pbgsp>
7
- </modules>
8
- <global>
9
- <!--<template>-->
10
- <!--<email>-->
11
- <!--<sales_email_pb_shipment_template>-->
12
- <!--<label>Pitney Bowes Custom Shipment Email</label>-->
13
- <!--<file>pbgsp_shipment_new.html</file>-->
14
- <!--<type>html</type>-->
15
- <!--</sales_email_pb_shipment_template>-->
16
- <!--</email>-->
17
- <!--</template>-->
18
- <blocks>
19
- <PB_Pbgsp>
20
- <class>Pb_Pbgsp_Block</class>
21
- </PB_Pbgsp>
22
- <sales>
23
- <rewrite>
24
- <order_totals>Pb_Pbgsp_Block_Sales_Order_Totals</order_totals>
25
- <order_invoice_totals>Pb_Pbgsp_Block_Sales_Order_Invoice_Totals</order_invoice_totals>
26
-
27
- </rewrite>
28
- </sales>
29
- <adminhtml>
30
- <rewrite>
31
- <sales_order_totals>Pb_Pbgsp_Block_Adminhtml_Sales_Order_Totals</sales_order_totals>
32
- <sales_order_invoice_totals>Pb_Pbgsp_Block_Adminhtml_Sales_Order_Invoice_Totals</sales_order_invoice_totals>
33
-
34
- </rewrite>
35
- </adminhtml>
36
- <checkout>
37
- <rewrite>
38
- <onepage_shipping_method_available>Pb_Pbgsp_Block_Checkout_Shipping_Method_Available</onepage_shipping_method_available>
39
- </rewrite>
40
- </checkout>
41
- </blocks>
42
- <models>
43
- <pb_pbgsp>
44
- <class>Pb_Pbgsp_Model</class>
45
- <resourceModel>pb_pbgsp_mysql4</resourceModel>
46
- </pb_pbgsp>
47
- <pb_pbgsp_mysql4>
48
- <class>Pb_Pbgsp_Model_Mysql4</class>
49
- <entities>
50
- <variable>
51
- <table>pbgsp_variable</table>
52
- </variable>
53
- <ordernumber>
54
- <table>pbgsp_ordernumber</table>
55
- </ordernumber>
56
- <inboundparcel>
57
- <table>pbgsp_inbound_parcel</table>
58
- </inboundparcel>
59
- </entities>
60
- </pb_pbgsp_mysql4>
61
- <sales>
62
- <rewrite>
63
- <order_invoice_total_tax>Pb_Pbgsp_Model_Invoice_Duty</order_invoice_total_tax>
64
- <order_creditmemo_total_tax>Pb_Pbgsp_Model_Creditmemo_Duty</order_creditmemo_total_tax>
65
- <order_shipment>Pb_Pbgsp_Model_Sales_Order_Shipment</order_shipment>
66
- </rewrite>
67
- </sales>
68
- </models>
69
- <resources>
70
- <pbgsp_setup>
71
- <setup>
72
- <module>Pb_Pbgsp</module>
73
- <class>Pb_Pbgsp_Model_Resource_Mysql4_Setup</class>
74
- </setup>
75
- <connection>
76
- <use>core_setup</use>
77
- </connection>
78
- </pbgsp_setup>
79
- <pb_pbgsp_write>
80
- <connection>
81
- <use>core_write</use>
82
- </connection>
83
- </pb_pbgsp_write>
84
- <pb_pbgsp_read>
85
- <connection>
86
- <use>core_read</use>
87
- </connection>
88
- </pb_pbgsp_read>
89
- </resources>
90
- <events>
91
- <!--<checkout_submit_all_after>&lt;!&ndash; added by Kamran 7/2/2014 &ndash;&gt;-->
92
- <!--<observers>-->
93
- <!--<Pb_Pbgsp_Model_CheckoutSubmitAllAfter>-->
94
- <!--<type>model</type>-->
95
- <!--<class>pb_pbgsp/observer</class>-->
96
- <!--<method>createOrderAdminAfter</method>-->
97
- <!--</Pb_Pbgsp_Model_CheckoutSubmitAllAfter>-->
98
- <!--</observers>-->
99
- <!--</checkout_submit_all_after>-->
100
- <core_block_abstract_to_html_after>
101
- <observers>
102
- <Pb_Pbgsp_Model_OrderView>
103
- <type>model</type>
104
- <class>pb_pbgsp/observer</class>
105
- <method>modifyOrderView</method>
106
- </Pb_Pbgsp_Model_OrderView>
107
- </observers>
108
- </core_block_abstract_to_html_after>
109
- <checkout_controller_onepage_save_shipping_method>
110
- <observers>
111
- <Pb_Pbgsp_Model_SaveShippingOne>
112
- <type>model</type>
113
- <class>pb_pbgsp/observer</class>
114
- <method>saveShippingMethod</method>
115
- </Pb_Pbgsp_Model_SaveShippingOne>
116
- </observers>
117
- </checkout_controller_onepage_save_shipping_method>
118
- <checkout_onepage_controller_success_action>
119
- <observers>
120
- <Pb_Pbgsp_Model_CheckoutCompleteOne>
121
- <type>model</type>
122
- <class>pb_pbgsp/observer</class>
123
- <method>createPbOrder</method>
124
- </Pb_Pbgsp_Model_CheckoutCompleteOne>
125
- </observers>
126
- </checkout_onepage_controller_success_action>
127
- <controller_action_postdispatch_checkout_cart_estimateUpdatePost>
128
- <observers>
129
- <Pb_Pbgsp_Estimated_Shipping>
130
- <type>model</type>
131
- <class>pb_pbgsp/observer</class>
132
- <method>addDutiesOnEstimation</method>
133
- </Pb_Pbgsp_Estimated_Shipping>
134
- </observers>
135
- </controller_action_postdispatch_checkout_cart_estimateUpdatePost>
136
- <catalog_product_load_after>
137
- <observers>
138
- <Pb_Pbgsp_Product_Last_Export>
139
- <type>model</type>
140
- <class>pb_pbgsp/observer</class>
141
- <method>productLoadAfter</method>
142
- </Pb_Pbgsp_Product_Last_Export>
143
- </observers>
144
- </catalog_product_load_after>
145
- <catalog_category_load_after>
146
- <observers>
147
- <Pb_Pbgsp_Product_Last_Export>
148
- <type>model</type>
149
- <class>pb_pbgsp/observer</class>
150
- <method>categoryLoadAfter</method>
151
- </Pb_Pbgsp_Product_Last_Export>
152
- </observers>
153
- </catalog_category_load_after>
154
- </events>
155
- <sales>
156
- <quote>
157
- <totals>
158
- <tax>
159
- <class>Pb_Pbgsp_Model_Quote_Duty</class>
160
- <before>grand_total</before>
161
- <after>shipping</after>
162
- </tax>
163
- </totals>
164
- </quote>
165
- </sales>
166
- <pdf>
167
- <totals>
168
- <tax translate="title">
169
- <title>Tax</title>
170
- <source_field>tax_amount</source_field>
171
- <model>pb_pbgsp/pdf_tax</model>
172
- <font_size>7</font_size>
173
- <display_zero>0</display_zero>
174
- <sort_order>300</sort_order>
175
- </tax>
176
- </totals>
177
- </pdf>
178
-
179
- </global>
180
- <resources>
181
- <sales_setup>
182
- <setup>
183
- <module>Pb_Pbgsp</module>
184
- <class>Pb_Pbgsp_Model_Entity_Setup</class>
185
- </setup>
186
- </sales_setup>
187
- </resources>
188
-
189
- <!--<frontend>-->
190
- <!--<layout>-->
191
- <!--<updates>-->
192
- <!--<pbcheckout>-->
193
- <!--<file>pbcheckout.xml</file>-->
194
- <!--</pbcheckout>-->
195
- <!--</updates>-->
196
- <!--</layout>-->
197
- <!--<routers>-->
198
- <!--<Pb_Pbgsp>-->
199
- <!--<use>standard</use>-->
200
- <!--<args>-->
201
- <!--<module>Pb_Pbgsp</module>-->
202
- <!--<frontName>pbgsp</frontName>-->
203
- <!--&lt;!&ndash; loads ../controller/IndexController in http://..../magento/index.php/testController &ndash;&gt;-->
204
- <!--</args>-->
205
- <!--</Pb_Pbgsp>-->
206
- <!--</routers>-->
207
- <!--<translate>-->
208
- <!--<modules>-->
209
- <!--<translations>-->
210
- <!--<files>-->
211
- <!--<default>Pb_Pbgsp.csv</default>-->
212
- <!--</files>-->
213
- <!--</translations>-->
214
- <!--</modules>-->
215
- <!--</translate>-->
216
- <!--</frontend>-->
217
-
218
- <default>
219
- <carriers>
220
- <pbgsp>
221
- <active>1</active>
222
- <sallowspecific>0</sallowspecific>
223
- <model>Pb_Pbgsp_Model_Carrier_ShippingMethod</model>
224
- <specificerrmsg>
225
- This shipping method is currently unavailable.
226
- If you would like to ship using this shipping
227
- method, please contact us.
228
- </specificerrmsg>
229
- <handling_type>F</handling_type>
230
- <catalog_diff>1</catalog_diff>
231
- <catalog_full>1</catalog_full>
232
- <catalog_size>10000</catalog_size>
233
- <catalog_encryption_enabled>0</catalog_encryption_enabled>
234
- <asn_generation_enabled>1</asn_generation_enabled>
235
- <suppress_domestic_tracking>1</suppress_domestic_tracking>
236
- <notify_catalog_ok>0</notify_catalog_ok>
237
- <notify_catalog_err>1</notify_catalog_err>
238
- <custom_shipment_email_subject><![CDATA[{{var store.getFrontendName()}}: Shipment confirmation for Order # {{var order.increment_id}}]]>
239
- </custom_shipment_email_subject>
240
- <custom_shipment_email_template><![CDATA[<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$order.getCustomerName()}}</h1>
241
- <p style="font-size:12px; line-height:16px; margin:0;">
242
- Thank you for your order from {{var store.getFrontendName()}}.
243
- You can check the status of your order by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
244
-
245
- </p>
246
- <p style="font-size:12px; line-height:16px; margin:0;">
247
- Your shipping confirmation is below. Thank you again for your business.
248
- </p>
249
-
250
- <h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} has been shipped from local warehouse to international shipment hub from where it will be shipped to your country.</h2>
251
-
252
- ]]>
253
- </custom_shipment_email_template>
254
- <separate_log_file>0</separate_log_file>
255
-
256
- <shipping_services>
257
- <POSTAL_PRIORITY>
258
- <title>Standard</title>
259
- <enabled>0</enabled>
260
- </POSTAL_PRIORITY>
261
- <FEDEX_ECONOMY>
262
- <title>Express</title>
263
- <enabled>1</enabled>
264
- </FEDEX_ECONOMY>
265
- <FEDEX_PRIORITY>
266
- <title>Express Plus</title>
267
- <enabled>1</enabled>
268
- </FEDEX_PRIORITY>
269
- <AE_STANDARD>
270
- <title>Premier</title>
271
- <enabled>1</enabled>
272
- </AE_STANDARD>
273
- <AU_STANDARD>
274
- <title>Premier</title>
275
- <enabled>1</enabled>
276
- </AU_STANDARD>
277
- <CN_STANDARD>
278
- <title>Premier</title>
279
- <enabled>1</enabled>
280
- </CN_STANDARD>
281
- <CPC_EXPRESS>
282
- <title>Premier Plus</title>
283
- <enabled>1</enabled>
284
- </CPC_EXPRESS>
285
- <CPC_STANDARD>
286
- <title>Premier</title>
287
- <enabled>1</enabled>
288
- </CPC_STANDARD>
289
- <EU_STANDARD>
290
- <title>Premier</title>
291
- <enabled>1</enabled>
292
- </EU_STANDARD>
293
- <HK_STANDARD>
294
- <title>Premier</title>
295
- <enabled>1</enabled>
296
- </HK_STANDARD>
297
- <KR_STANDARD>
298
- <title>Premier</title>
299
- <enabled>1</enabled>
300
- </KR_STANDARD>
301
- <NZ_STANDARD>
302
- <title>Premier</title>
303
- <enabled>1</enabled>
304
- </NZ_STANDARD>
305
- <PH_STANDARD>
306
- <title>Premier</title>
307
- <enabled>1</enabled>
308
- </PH_STANDARD>
309
- <SG_STANDARD>
310
- <title>Premier</title>
311
- <enabled>1</enabled>
312
- </SG_STANDARD>
313
- <TH_STANDARD>
314
- <title>Premier</title>
315
- <enabled>1</enabled>
316
- </TH_STANDARD>
317
- <TW_STANDARD>
318
- <title>Premier</title>
319
- <enabled>1</enabled>
320
- </TW_STANDARD>
321
- </shipping_services>
322
- <error_messages>
323
- <_1005001>
324
- <display>The shipping address is invalid.</display>
325
- </_1005001>
326
- <_1005002>
327
- <display>The consignee information is invalid.</display>
328
- </_1005002>
329
- <_1005003>
330
- <display>The COP transportation information is invalid.</display>
331
- </_1005003>
332
- <_1005004>
333
- <display>The requested return currency is invalid.</display>
334
- </_1005004>
335
- <_1005005>
336
- <display>The request currency is not supported for the target country.</display>
337
- </_1005005>
338
- <_1005006>
339
- <display>The order cannot be shipped by the method selected.</display>
340
- </_1005006>
341
- <_1005007>
342
- <display>The order value has exceeded the allowed value.</display>
343
- </_1005007>
344
- <_1005008>
345
- <display>Invalid fields in parcels.</display>
346
- </_1005008>
347
- <_1005009>
348
- <display>Invalid fields in commoditySources.</display>
349
- </_1005009>
350
- <_1005010>
351
- <display>This basket is over the dollar value for international shipping. Please remove some items before proceeding.</display>
352
- </_1005010>
353
- <_1005011>
354
- <display>There are errors at the Quote Item Level.</display>
355
- </_1005011>
356
- <_1005012>
357
- <display>The order exceeded the weight limit.</display>
358
- </_1005012>
359
- <_1005013>
360
- <display>The shipping address has missing fields.</display>
361
- </_1005013>
362
- <_1005014>
363
- <display>Missing fields in basket.</display>
364
- </_1005014>
365
- <_1005015>
366
- <display>Invalid fields in basket.</display>
367
- </_1005015>
368
- <_1005016>
369
- <display>The consignee information is missing.</display>
370
- </_1005016>
371
- <_1005017>
372
- <display>The COP transportation information is missing.</display>
373
- </_1005017>
374
- <_1005018>
375
- <display>Shipping Speed unavailable.</display>
376
- </_1005018>
377
- <_1005018>
378
- <display>Shipping Speed unavailable.</display>
379
- </_1005018>
380
- <_1005019>
381
- <display>Missing Basket.</display>
382
- </_1005019>
383
- <_1005020>
384
- <display>Missing Parcel Fields.</display>
385
- </_1005020>
386
- <_1005021>
387
- <display>Missing fields in the basket commodity source.</display>
388
- </_1005021>
389
- <_1005022>
390
- <display>Invalid Parcel Fields.</display>
391
- </_1005022>
392
- <_1006001>
393
- <display>The commodity was invalid.</display>
394
- </_1006001>
395
- <_1006002>
396
- <display>The commodity is too large to ship (length, width or height).</display>
397
- </_1006002>
398
- <_1006003>
399
- <display>The commodity cannot be shipped to the COD.</display>
400
- </_1006003>
401
- <_1006004>
402
- <display>The commodity has a negative price.</display>
403
- </_1006004>
404
- <_1006005>
405
- <display>The commodity’s price was too low and did not have a dutiable value.</display>
406
- </_1006005>
407
- <_1006006>
408
- <display>The item price exceeds maximum.</display>
409
- </_1006006>
410
- <_1006007>
411
- <display>Item weight exceeds maximum.</display>
412
- </_1006007>
413
- <_1006008>
414
- <display>Invalid commodity rated data. Commodity cannot be shipped at this time. This is an internal error and should be raised to PB immediately. .</display>
415
- </_1006008>
416
- <_1006009>
417
- <display>The Commodity is restricted for this Country of Destination.</display>
418
- </_1006009>
419
- <_10060010>
420
- <display>Commodity cannot be quoted.</display>
421
- </_10060010>
422
- <_10060011>
423
- <display>Commodity cannot shipped to the address specified.</display>
424
- </_10060011>
425
- <_1007001>
426
- <display>Order value exceeded on this line.</display>
427
- </_1007001>
428
- <_1007002>
429
- <display>Line too large to ship (length, width or height of the shipping box).</display>
430
- </_1007002>
431
- <_1007003>
432
- <display>The quantity is invalid or missing.</display>
433
- </_1007003>
434
- <_1007004>
435
- <display>Weight Value exceeded on this line.</display>
436
- </_1007004>
437
- <_1007005>
438
- <display>Errors in the kitContents.</display>
439
- </_1007005>
440
- <_1007006>
441
- <display>Missing fields in basket line.</display>
442
- </_1007006>
443
- <_1007007>
444
- <display>Invalid fields in basket line.</display>
445
- </_1007007>
446
- <_1007008>
447
- <display>Quantity exceeded for Country of Destination.</display>
448
- </_1007008>
449
- </error_messages>
450
- </pbgsp>
451
- </carriers>
452
- </default>
453
-
454
- <!-- Please modify this part for CRON JOB
455
- For more information on Magento Cron Job, please visit the following url:
456
- http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job#built-in_cron_jobs
457
- -->
458
- <crontab>
459
- <jobs>
460
- <pb_pbgsp>
461
- <schedule>
462
- <cron_expr>30 * * * *</cron_expr>
463
- </schedule>
464
- <run>
465
- <model>pb_pbgsp/catalog_cron::catalogSync</model>
466
- </run>
467
- </pb_pbgsp>
468
- <pb_notifications>
469
- <schedule>
470
- <cron_expr>20 * * * *</cron_expr>
471
- </schedule>
472
- <run>
473
- <model>pb_pbgsp/catalog_cron::processStatusNotifications</model>
474
- </run>
475
- </pb_notifications>
476
- </jobs>
477
- </crontab>
478
- <adminhtml>
479
- <events>
480
- <!--<sales_order_save_commit_after>-->
481
- <!--<observers>-->
482
- <!--<Pb_Pbgsp_CreateParcel>-->
483
- <!--<type>model</type>-->
484
- <!--<class>pb_pbgsp/observer</class>-->
485
- <!--<method>generateInboundParcelPreAdvice</method>-->
486
- <!--</Pb_Pbgsp_CreateParcel>-->
487
- <!--</observers>-->
488
- <!--</sales_order_save_commit_after>-->
489
- <sales_order_shipment_save_after>
490
- <observers>
491
- <Pb_Pbgsp_CreateParcel>
492
- <type>model</type>
493
- <class>pb_pbgsp/observer</class>
494
- <method>generateInboundParcelPreAdvice</method>
495
- </Pb_Pbgsp_CreateParcel>
496
- </observers>
497
- </sales_order_shipment_save_after>
498
- </events>
499
- <!--<translate>-->
500
- <!--<modules>-->
501
- <!--<translations>-->
502
- <!--<files>-->
503
- <!--<default>Pb_Pbgsp.csv</default>-->
504
- <!--</files>-->
505
- <!--</translations>-->
506
- <!--</modules>-->
507
- <!--</translate>-->
508
- </adminhtml>
509
-
510
- </config>
511
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.1.0)
4
- * Packaged: 2015-09-9T12:10:00+00:00
5
- * Last Modified: 2015-09-1T15:12:28+00:00
6
 
7
 
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.1.1)
4
+ * Packaged: 2015-09-14T12:11:20+00:00
5
+ * Last Modified: 2015-09-9T12:10:00+00:00
6
 
7
 
8
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>pitneybowes_gsp</name>
4
- <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -24,16 +24,12 @@ To learn more, go to &lt;a href="http://www.pb.com/ecom"&gt;http://www.pb.com/ec
24
  </description>
25
  <notes>Patch release for Magento Connect.&#xD;
26
  &#xD;
27
- 1. Added logic to cancel the order in the PB system when a PB order is cancelled in Magento.&#xD;
28
- &#xD;
29
- 2. Fixed the incremental catalog/product export to only include products and/or category files when one or both are edited in magento (example: if the incremental update is set to every hour and only a single product was updated in any way during the wait period, that product will be included in the next incremental catalog update. The same is true for categories that were updated within the wait period.)&#xD;
30
- &#xD;
31
- 3. Fixed an issue when empty catalog and category export csv files were created even though there were no updates made.&#xD;
32
  </notes>
33
  <authors><author><name>Raymond Lai</name><user>r3lai</user><email>raymond.lai@pb.com</email></author></authors>
34
- <date>2015-09-09</date>
35
- <time>18:18:38</time>
36
- <contents><target name="magelocal"><dir name="Pb"><dir name="Pbgsp"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="1525a5aa7a7c199912f1ef508232a5eb"/></dir><file name="Totals.php" hash="8cdced54ef497758edbb43849186fdad"/></dir></dir></dir><dir name="Checkout"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="4b79ef22466822e713f8240d46d2127a"/></dir></dir></dir><file name="Form.php" hash="b496459300f91fb5894995d0daa1f457"/><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="daa1fe4da1f6c1298d4426bfc39742e2"/></dir><file name="Totals.php" hash="9a4b9addcb445e40059b65d95b18ba72"/></dir></dir></dir><dir name="Model"><file name="Api.php" hash="be6e411cc1dca8c937deaabc126d5e32"/><dir name="Carrier"><file name="ShippingMethod.php" hash="89703a8d4fa716377082f0fd34b167f7"/></dir><dir name="Catalog"><file name="Category.php" hash="00e269b491d3ee9666215a30254737a2"/><file name="Cron.php" hash="3c365b533196241747a4e0177eeff918"/><file name="File.php" hash="3f9d0b1242c47906aa6af42922840732"/><file name="Product.php" hash="97e76a479479f5fa1a0dbedbb2203220"/></dir><file name="Credentials.php" hash="65dce863b7fee3f2df478b4260ca4c95"/><dir name="Creditmemo"><file name="Duty.php" hash="7815dd2b82c1a60e63e41f2a6c4dff87"/></dir><file name="Handlingoptions.php" hash="217ddc325d671164e5d5f145423d67a9"/><file name="Helper.php" hash="795423e236d634d01fe6a4e1cbed4964"/><file name="Inboundparcel.php" hash="bc51c0979d196022bdfb6509582abf4c"/><file name="Inboundparcel.php_bk" hash="2eb5ccbb316b527a034808f090ff98db"/><dir name="Invoice"><file name="Duty.php" hash="a07a227473081a32ed0fa0d0f4ed249c"/></dir><file name="Messages.php" hash="58434fde192b5fa71940f6ec91799e6c"/><dir name="Mysql4"><dir name="Inboundparcel"><file name="Collection.php" hash="dfd07df56e0a4fd49c618f2bc3d8ee67"/></dir><file name="Inboundparcel.php" hash="aff5a9f952a4a68e57a9d521bd43b58c"/><dir name="Ordernumber"><file name="Collection.php" hash="39c7806b5cb45822bd32c52817ea130d"/></dir><file name="Ordernumber.php" hash="512d9bb922117e3294a5b2a1b11f8eb8"/><dir name="Variable"><file name="Collection.php" hash="0828513828ad25da1786852704205678"/></dir><file name="Variable.php" hash="8f7eefc9210e962d0e40528db099e125"/></dir><file name="Observer.php" hash="db59fa2233a04787e2ba42f652fde006"/><file name="Observer.php_bk" hash="c458ac3550ba95916f350703054aee58"/><file name="Ordernumber.php" hash="2dda66faf24caed1879482ae85824642"/><dir name="Pdf"><file name="Tax.php" hash="a15b6f92132cb18895d0f1840dcab76e"/></dir><dir name="Quote"><file name="Duty.php" hash="c90d97a91077aef85db610e44c0fd58a"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="69f5acb17286282da264c71e94265d9e"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Shipment.php" hash="0ea6e1d5b46c29b3f4a31f5a2964ded6"/></dir></dir><file name="Util.php" hash="a7a35511104303f78f397a66baf32ffe"/><file name="Variable.php" hash="b1359b968627e7d6bde94f9d5c037573"/></dir><file name="README" hash="e7ad1d9a7ba016753e381a9ca92b696e"/><dir name="data"><dir name="pb_pbgsp_setup"><file name="data-install-1.0.0.php" hash="8793a87c4ce037f199ed62fd846130f4"/></dir></dir><dir name="etc"><file name="config.xml" hash="6b8b0929521c82a90ab49d4d7b680132"/><file name="config.xml_bk" hash="cd07d8dcac33bc08cc62eb66e7bd8761"/><file name="system.xml" hash="32456da492543f56536323a99fd4cc00"/></dir><dir name="sql"><dir name="pbgsp_setup"><file name="mysql4-install-1.0.0.php" hash="5222cd523c1edc10c58ed1267f495a99"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="ddfa97743989444a2e7624e3a2e473e2"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pb_Pbgsp.xml" hash="8475d60d4719f8ea7761a4ca39016e48"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Pb_Clearpath.csv" hash="aa4b7a650feb1709a34b6c053b56811c"/><dir name="template"><dir name="email"><file name="pbgsp_shipment_new.html" hash="2cc5cdbeaa719f4dab6a7c9e29fd6574"/></dir></dir></dir></target><target name="mageweb"><dir name="."><file name="ReadMe.txt" hash="3592b6511d44b1e385fa92736adf06e8"/></dir></target></contents>
37
  <compatible/>
38
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
39
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>pitneybowes_gsp</name>
4
+ <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
24
  </description>
25
  <notes>Patch release for Magento Connect.&#xD;
26
  &#xD;
27
+ 1. Corrected currency conversion logic to not request rate from PB but run conversion directly in Magento&#xD;
 
 
 
 
28
  </notes>
29
  <authors><author><name>Raymond Lai</name><user>r3lai</user><email>raymond.lai@pb.com</email></author></authors>
30
+ <date>2015-09-14</date>
31
+ <time>15:29:34</time>
32
+ <contents><target name="magelocal"><dir name="Pb"><dir name="Pbgsp"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="788a0e5bf0941d4b265da63e5bbecef7"/></dir><file name="Totals.php" hash="55178fffd6e0c3db4f0f312d3d170c10"/></dir></dir></dir><dir name="Checkout"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="495b06946c86581c496d6c1d7e7901b3"/></dir></dir></dir><file name="Form.php" hash="0906c5435d3d1e9c46a43a99f1fd6432"/><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="42c54d2c76b233cdbdbe3aaf97713f69"/></dir><file name="Totals.php" hash="3db1d69d5c6c210ebddda93bb4dbe750"/></dir></dir></dir><dir name="Model"><file name="Api.php" hash="f4c8888bc8630d008d1b8098be4ca794"/><dir name="Carrier"><file name="ShippingMethod.php" hash="b8e3daffbfe33cf8760ad14bee4db4e7"/></dir><dir name="Catalog"><file name="Category.php" hash="ba51735b8b4f3e7dd35177c418f9e827"/><file name="Cron.php" hash="8c11dad65e3020e2cc3d22c76fcc6fa5"/><file name="File.php" hash="e93273f2d2c929990a9de662430ce370"/><file name="Product.php" hash="e2d754fdef2b31a6f30ceb7b8ba9f2ff"/></dir><file name="Credentials.php" hash="bb9d0a95affc03a515e7feb24a2134a4"/><dir name="Creditmemo"><file name="Duty.php" hash="c8790c84af41ffb26b44edca7d5b8e85"/></dir><file name="Handlingoptions.php" hash="68652fd26fb06052179dce1779914031"/><file name="Helper.php" hash="67e07e6021e063f6acaf05cfe6d7c3a5"/><file name="Inboundparcel.php" hash="7b43a7b7ca28fa1c6c7adcaa0c67fec1"/><dir name="Invoice"><file name="Duty.php" hash="0352fa7d2b2403193174407c7475920e"/></dir><file name="Messages.php" hash="27614cf16f0f5545cfef883ac8ee70c3"/><dir name="Mysql4"><dir name="Inboundparcel"><file name="Collection.php" hash="6ad90b0c8beefb689b9bb78eaadf68a9"/></dir><file name="Inboundparcel.php" hash="c0bd32e7d49e78c7f0f78f5e3e7f668e"/><dir name="Ordernumber"><file name="Collection.php" hash="84990ff42a4dc11a298210d509d68365"/></dir><file name="Ordernumber.php" hash="4ec366f16174f8ac4b377843e7da81d6"/><dir name="Variable"><file name="Collection.php" hash="d88141a9575ed237bf472f17d52f552a"/></dir><file name="Variable.php" hash="9039c9c6f0e2264e860b249f2d095ef0"/></dir><file name="Observer.php" hash="f0112abc1f8dfff0ae9e4987af145310"/><file name="Ordernumber.php" hash="51e1457db359eea8fd1d3b0fde10228a"/><dir name="Pdf"><file name="Tax.php" hash="872473e6e951d5fafbfb8420fbc7d1ad"/></dir><dir name="Quote"><file name="Duty.php" hash="f6422a051a27677a4d9f048192e9a748"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="afd4e4c3f2f1fc7af319c9e544fafa84"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Shipment.php" hash="6c180e855b4380e73c2f90a81e989688"/></dir></dir><file name="Util.php" hash="62814a0c24ef9c2ad3bfe1e3c9ce69c0"/><file name="Variable.php" hash="591cd6627ae1cac2b77242b634d61bb5"/></dir><dir name="data"><dir name="pb_pbgsp_setup"><file name="data-install-1.0.0.php" hash="10cf523cdab6bc88f68c4f2f6c606c37"/></dir></dir><dir name="etc"><file name="config.xml" hash="548805c68d24476613f77b71e45957c8"/><file name="system.xml" hash="32456da492543f56536323a99fd4cc00"/></dir><dir name="sql"><dir name="pbgsp_setup"><file name="mysql4-install-1.0.0.php" hash="fed5d68e07ed66f46c2f12b6dbcea13a"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="3c0f0e0528d6f1dae4317c3029b9c040"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pb_Pbgsp.xml" hash="8475d60d4719f8ea7761a4ca39016e48"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Pb_Clearpath.csv" hash="aa4b7a650feb1709a34b6c053b56811c"/><dir name="template"><dir name="email"><file name="pbgsp_shipment_new.html" hash="2cc5cdbeaa719f4dab6a7c9e29fd6574"/></dir></dir></dir></target><target name="mageweb"><dir name="."><file name="ReadMe.txt" hash="2486ee6c53a12f3a03438058e1f67300"/></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
35
  </package>