pitneybowes_gsp - Version 1.3.6

Version Notes

v. 1.3.6

1. Added a config option to allow the Merchant to set when the ASN trigger generation happens. Now ASNs can be generated during shipment creation or after adding the tracking number. This is particularly useful for merchants using API calls to create Shipment transactions.

2. Added additional product attributes for more efficient catalog ratings for oversized products: Commodity Height, Commodity Width, Commodity Length, Package Weight, Package Height, Package Width, Package Length

Download this release

Release Info

Developer Shane Bogdan
Extension pitneybowes_gsp
Version 1.3.6
Comparing to
See all releases


Code changes from version 1.3.5 to 1.3.6

Files changed (51) hide show
  1. app/code/local/Pb/Pbgsp/Block/Adminhtml/Categorysettings.php +3 -3
  2. app/code/local/Pb/Pbgsp/Block/Adminhtml/Categorysettings/Grid.php +3 -3
  3. app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Invoice/Totals.php +3 -3
  4. app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Totals.php +3 -3
  5. app/code/local/Pb/Pbgsp/Block/Adminhtml/Version.php +3 -3
  6. app/code/local/Pb/Pbgsp/Block/Checkout/Shipping/Method/Available.php +3 -3
  7. app/code/local/Pb/Pbgsp/Block/Form.php +3 -3
  8. app/code/local/Pb/Pbgsp/Block/Sales/Order/Invoice/Totals.php +3 -3
  9. app/code/local/Pb/Pbgsp/Block/Sales/Order/Totals.php +3 -3
  10. app/code/local/Pb/Pbgsp/Block/Tax/Checkout/Tax.php +3 -3
  11. app/code/local/Pb/Pbgsp/Helper/Data.php +3 -3
  12. app/code/local/Pb/Pbgsp/Model/Api.php +3 -3
  13. app/code/local/Pb/Pbgsp/Model/Carrier/ShippingMethod.php +3 -3
  14. app/code/local/Pb/Pbgsp/Model/Catalog/Category.php +5 -5
  15. app/code/local/Pb/Pbgsp/Model/Catalog/Cron.php +4 -4
  16. app/code/local/Pb/Pbgsp/Model/Catalog/File.php +15 -5
  17. app/code/local/Pb/Pbgsp/Model/Catalog/Product.php +34 -6
  18. app/code/local/Pb/Pbgsp/Model/Credentials.php +6 -3
  19. app/code/local/Pb/Pbgsp/Model/Creditmemo/Duty.php +3 -3
  20. app/code/local/Pb/Pbgsp/Model/Environmentconfig.php +3 -3
  21. app/code/local/Pb/Pbgsp/Model/Handlingoptions.php +3 -3
  22. app/code/local/Pb/Pbgsp/Model/Helper.php +3 -3
  23. app/code/local/Pb/Pbgsp/Model/Inboundparcel.php +3 -3
  24. app/code/local/Pb/Pbgsp/Model/Invoice/Duty.php +3 -3
  25. app/code/local/Pb/Pbgsp/Model/Messages.php +3 -3
  26. app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel.php +3 -3
  27. app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel/Collection.php +3 -3
  28. app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber.php +3 -3
  29. app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber/Collection.php +3 -3
  30. app/code/local/Pb/Pbgsp/Model/Mysql4/Variable.php +3 -3
  31. app/code/local/Pb/Pbgsp/Model/Mysql4/Variable/Collection.php +3 -3
  32. app/code/local/Pb/Pbgsp/Model/Observer.php +85 -69
  33. app/code/local/Pb/Pbgsp/Model/Ordernumber.php +3 -3
  34. app/code/local/Pb/Pbgsp/Model/Pdf/Tax.php +3 -3
  35. app/code/local/Pb/Pbgsp/Model/Productattributesource/Productconditions.php +3 -3
  36. app/code/local/Pb/Pbgsp/Model/Quote/Duty.php +3 -3
  37. app/code/local/Pb/Pbgsp/Model/Resource/Mysql4/Setup.php +3 -3
  38. app/code/local/Pb/Pbgsp/Model/Sales/Order/Shipment.php +3 -3
  39. app/code/local/Pb/Pbgsp/Model/Util.php +3 -3
  40. app/code/local/Pb/Pbgsp/Model/Variable.php +3 -3
  41. app/code/local/Pb/Pbgsp/controllers/Adminhtml/CategorysettingsController.php +3 -3
  42. app/code/local/Pb/Pbgsp/data/pb_pbgsp_setup/data-install-1.0.0.php +3 -3
  43. app/code/local/Pb/Pbgsp/etc/config.xml +1 -1
  44. app/code/local/Pb/Pbgsp/etc/system.xml +9 -0
  45. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php +3 -3
  46. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.0.0-1.0.1.php +3 -3
  47. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.1.1-1.1.2.php +3 -3
  48. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.2.0-1.2.1.php +3 -3
  49. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.3.0-1.3.1.php +3 -3
  50. app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.3.5-1.3.6.php +116 -0
  51. package.xml +8 -25
app/code/local/Pb/Pbgsp/Block/Adminhtml/Categorysettings.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  */
7
 
8
  class Pb_Pbgsp_Block_Adminhtml_Categorysettings extends Mage_Adminhtml_Block_Widget_Grid_Container {
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  */
7
 
8
  class Pb_Pbgsp_Block_Adminhtml_Categorysettings extends Mage_Adminhtml_Block_Widget_Grid_Container {
app/code/local/Pb/Pbgsp/Block/Adminhtml/Categorysettings/Grid.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  */
7
 
8
  class Pb_Pbgsp_Block_Adminhtml_Categorysettings_Grid extends Mage_Adminhtml_Block_Widget_Grid {
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  */
7
 
8
  class Pb_Pbgsp_Block_Adminhtml_Categorysettings_Grid extends Mage_Adminhtml_Block_Widget_Grid {
app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Invoice/Totals.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Invoice/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Invoice/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Totals.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Adminhtml/Sales/Order/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Block/Adminhtml/Version.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
 
7
 
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
 
7
 
8
  */
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.3.5)
5
- * Packaged: 2016-04-06T13:00:10+00:00
6
- * Last Modified: 2016-03-17T11:08:10+00:00
7
  * File: app/code/local/Pb/Pbgsp/Block/Checkout/Shipping/Method/Available.php
8
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
9
  */
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.3.6)
5
+ * Packaged: 2016-04-14T14:05:10+00:00
6
+ * Last Modified: 2016-04-06T13:00:10+00:00
7
  * File: app/code/local/Pb/Pbgsp/Block/Checkout/Shipping/Method/Available.php
8
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
9
  */
app/code/local/Pb/Pbgsp/Block/Form.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Form.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Form.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Block/Sales/Order/Invoice/Totals.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Sales/Order/Invoice/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Sales/Order/Invoice/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Block/Sales/Order/Totals.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Sales/Order/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Block/Sales/Order/Totals.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Block/Tax/Checkout/Tax.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.3.5)
5
- * Packaged: 2016-04-06T13:00:10+00:00
6
- * Last Modified: 2016-03-17T11:08:10+00:00
7
  */
8
  class Pb_Pbgsp_Block_Tax_Checkout_Tax extends Mage_Tax_Block_Checkout_Tax
9
  {
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.3.6)
5
+ * Packaged: 2016-04-14T14:05:10+00:00
6
+ * Last Modified: 2016-04-06T13:00:10+00:00
7
  */
8
  class Pb_Pbgsp_Block_Tax_Checkout_Tax extends Mage_Tax_Block_Checkout_Tax
9
  {
app/code/local/Pb/Pbgsp/Helper/Data.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
 
7
  */
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+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.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Api.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Api.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Carrier/ShippingMethod.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Carrier/ShippingMethod.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Carrier/ShippingMethod.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Catalog/Category.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/Category.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
@@ -61,11 +61,11 @@ class Pb_Pbgsp_Model_Catalog_Category {
61
  if(!$lastDiff)
62
  return true; //full catalog upload
63
 
64
- Pb_Pbgsp_Model_Util::log($this->category->getPbPbgspUploadActive());
65
  if(!$this->category->getPbPbgspUploadActive()) return false;
66
  $lastUpload = $this -> category -> getPbPbgspUpload();
67
  $updatedAt = $this->category->getUpdatedAt();
68
- Pb_Pbgsp_Model_Util::log($this->getName()." lastUpload:$lastUpload UpdatedAt:$updatedAt");
69
  if (!$lastUpload) {
70
  // First upload.
71
  return true;
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/Category.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
61
  if(!$lastDiff)
62
  return true; //full catalog upload
63
 
64
+ //Pb_Pbgsp_Model_Util::log($this->category->getPbPbgspUploadActive());
65
  if(!$this->category->getPbPbgspUploadActive()) return false;
66
  $lastUpload = $this -> category -> getPbPbgspUpload();
67
  $updatedAt = $this->category->getUpdatedAt();
68
+ //Pb_Pbgsp_Model_Util::log($this->getName()." lastUpload:$lastUpload UpdatedAt:$updatedAt");
69
  if (!$lastUpload) {
70
  // First upload.
71
  return true;
app/code/local/Pb/Pbgsp/Model/Catalog/Cron.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/Cron.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
@@ -20,7 +20,7 @@
20
 
21
  $collection = Mage::getModel("pb_pbgsp/variable")->getCollection();
22
  foreach ($collection as $variable) {
23
- Pb_Pbgsp_Model_Util::log($variable->getName()." -> ".$variable->getValue());
24
  if ($variable->getName() == "lastFull") {
25
  $this->lastFull = $variable;
26
  }
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/Cron.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
20
 
21
  $collection = Mage::getModel("pb_pbgsp/variable")->getCollection();
22
  foreach ($collection as $variable) {
23
+ //Pb_Pbgsp_Model_Util::log($variable->getName()." -> ".$variable->getValue());
24
  if ($variable->getName() == "lastFull") {
25
  $this->lastFull = $variable;
26
  }
app/code/local/Pb/Pbgsp/Model/Catalog/File.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Product: Pb_Pbgsp (1.3.5)
5
- * Packaged: 2016-04-06T13:00:10+00:00
6
- * Last Modified: 2016-03-17T11:08:10+00:00
7
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/File.php
8
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
9
  */
@@ -220,6 +220,13 @@ class Pb_Pbgsp_Model_Catalog_File {
220
  ->addAttributeToSelect('pb_pbgsp_product_condition')
221
  ->addAttributeToSelect('pb_pbgsp_upload_delete')
222
  ->addAttributeToSelect('pb_pbgsp_upload_deleted_on')
 
 
 
 
 
 
 
223
  // ->addUrlRewrite($category->getId()) //this will add the url rewrite.
224
  ->addAttributeToSelect('price')
225
  ->addAttributeToSelect('weight');
@@ -494,8 +501,9 @@ class Pb_Pbgsp_Model_Catalog_File {
494
  if(count($notificationFiles) > 0) {
495
  $mail = new Zend_Mail();
496
  $mail->setFrom('no-reply@pb.com','Pitney Bowes');
 
497
  $mail->addTo($adminEmail)
498
- ->setSubject('Catalog Export Error')
499
  ->setBodyText('Catalog Export Error. Please see attached files.');
500
  $fileCount = 0;
501
  foreach($notificationFiles as $notificationFile) {
@@ -508,7 +516,8 @@ class Pb_Pbgsp_Model_Catalog_File {
508
  else if($this->_endsWith($notificationFile,'.ok')) {
509
  if(Pb_Pbgsp_Model_Credentials::isCatalogSuccessNotificationEnabled()) {
510
  $attachFile = true;
511
- $mail->setSubject('Catalog Export Successful');
 
512
  }
513
 
514
  }
@@ -524,6 +533,7 @@ class Pb_Pbgsp_Model_Catalog_File {
524
  }
525
  }
526
  if($fileCount > 0) {
 
527
  $mail->send();
528
  Pb_Pbgsp_Model_Util::log("Email sent with error or success files.");
529
  }
1
  <?php
2
 
3
  /**
4
+ * Product: Pb_Pbgsp (1.3.6)
5
+ * Packaged: 2016-04-14T14:05:10+00:00
6
+ * Last Modified: 2016-04-06T13:00:10+00:00
7
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/File.php
8
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
9
  */
220
  ->addAttributeToSelect('pb_pbgsp_product_condition')
221
  ->addAttributeToSelect('pb_pbgsp_upload_delete')
222
  ->addAttributeToSelect('pb_pbgsp_upload_deleted_on')
223
+ ->addAttributeToSelect('pb_pbgsp_commodity_height')
224
+ ->addAttributeToSelect('pb_pbgsp_commodity_width')
225
+ ->addAttributeToSelect('pb_pbgsp_commodity_length')
226
+ ->addAttributeToSelect('pb_pbgsp_package_weight')
227
+ ->addAttributeToSelect('pb_pbgsp_package_height')
228
+ ->addAttributeToSelect('pb_pbgsp_package_width')
229
+ ->addAttributeToSelect('pb_pbgsp_package_length')
230
  // ->addUrlRewrite($category->getId()) //this will add the url rewrite.
231
  ->addAttributeToSelect('price')
232
  ->addAttributeToSelect('weight');
501
  if(count($notificationFiles) > 0) {
502
  $mail = new Zend_Mail();
503
  $mail->setFrom('no-reply@pb.com','Pitney Bowes');
504
+ $subject = 'Catalog Export Error';
505
  $mail->addTo($adminEmail)
506
+
507
  ->setBodyText('Catalog Export Error. Please see attached files.');
508
  $fileCount = 0;
509
  foreach($notificationFiles as $notificationFile) {
516
  else if($this->_endsWith($notificationFile,'.ok')) {
517
  if(Pb_Pbgsp_Model_Credentials::isCatalogSuccessNotificationEnabled()) {
518
  $attachFile = true;
519
+ $subject = 'Catalog Export Successful';
520
+ //$mail->setSubject('Catalog Export Successful');
521
  }
522
 
523
  }
533
  }
534
  }
535
  if($fileCount > 0) {
536
+ $mail->setSubject($subject);
537
  $mail->send();
538
  Pb_Pbgsp_Model_Util::log("Email sent with error or success files.");
539
  }
app/code/local/Pb/Pbgsp/Model/Catalog/Product.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/Product.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
@@ -158,11 +158,39 @@ class Pb_Pbgsp_Model_Catalog_Product {
158
  }else{
159
  $weight = $this -> getWeight();
160
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  fputcsv($file,array($this -> getSKU(),$name,$shortDescription,$description,$merchantCode,$this -> getURL(),$merchantCode,'',$categoryCode,$this->getPrice(),'lb','',$this->getCountryOfOrigin(),'','',
162
  '','','','','','','','','',
163
- '','',$this->getProductCondition(),'',
164
- '','','','','',
165
- '','','','','','',
166
  '','','','',
167
  strval($category->getData('id_path')),$category->getData('name_path'),$weight
168
  //,'','','','',$category->getData('store')->getCurrentCurrencyCode()
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Catalog/Product.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
158
  }else{
159
  $weight = $this -> getWeight();
160
  }
161
+ $commodityHeight = '';
162
+ if($this->product->getPbPbgspCommodityHeight() > 0) {
163
+ $commodityHeight = $this->product->getPbPbgspCommodityHeight();
164
+ }
165
+ $commodityWidth = '';
166
+ if($this->product->getPbPbgspCommodityWidth() > 0) {
167
+ $commodityWidth = $this->product->getPbPbgspCommodityWidth();
168
+ }
169
+ $commodityLength = '';
170
+ if($this->product->getPbPbgspCommodityLength() > 0) {
171
+ $commodityLength = $this->product->getPbPbgspCommodityLength();
172
+ }
173
+ $packageWeight = '';
174
+ if($this->product->getPbPbgspPackageWeight() > 0) {
175
+ $packageWeight = $this->product->getPbPbgspPackageWeight();
176
+ }
177
+ $packageHeight = '';
178
+ if($this->product->getPbPbgspPackageHeight() > 0) {
179
+ $packageHeight = $this->product->getPbPbgspPackageHeight();
180
+ }
181
+ $packageWidth = '';
182
+ if($this->product->getPbPbgspPackageWidth() > 0) {
183
+ $packageWidth = $this->product->getPbPbgspPackageWidth();
184
+ }
185
+ $packageLength = '';
186
+ if($this->product->getPbPbgspPackageLength() > 0) {
187
+ $packageLength = $this->product->getPbPbgspPackageLength();
188
+ }
189
  fputcsv($file,array($this -> getSKU(),$name,$shortDescription,$description,$merchantCode,$this -> getURL(),$merchantCode,'',$categoryCode,$this->getPrice(),'lb','',$this->getCountryOfOrigin(),'','',
190
  '','','','','','','','','',
191
+ '','',$this->getProductCondition(),$commodityHeight,
192
+ $commodityWidth,$commodityLength,$packageWeight,$packageHeight,$packageWidth,
193
+ $packageLength,'','','','','',
194
  '','','','',
195
  strval($category->getData('id_path')),$category->getData('name_path'),$weight
196
  //,'','','','',$category->getData('store')->getCurrentCurrencyCode()
app/code/local/Pb/Pbgsp/Model/Credentials.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Credentials.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
@@ -47,6 +47,9 @@ class Pb_Pbgsp_Model_Credentials {
47
  }
48
  public static function isASNGenerationEnabled() {
49
  return Mage::getStoreConfig('carriers/pbgsp/asn_generation_enabled');
 
 
 
50
  }
51
  public static function isOverrideShippingAddressEnabled() {
52
  return Mage::getStoreConfig('carriers/pbgsp/override_shipping_address_enabled');
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Credentials.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
47
  }
48
  public static function isASNGenerationEnabled() {
49
  return Mage::getStoreConfig('carriers/pbgsp/asn_generation_enabled');
50
+ }
51
+ public static function isGenerateAsnOnAddTrack() {
52
+ return Mage::getStoreConfig('carriers/pbgsp/generate_asn_on_add_track');
53
  }
54
  public static function isOverrideShippingAddressEnabled() {
55
  return Mage::getStoreConfig('carriers/pbgsp/override_shipping_address_enabled');
app/code/local/Pb/Pbgsp/Model/Creditmemo/Duty.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Creditmemo/Duty.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Creditmemo/Duty.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Environmentconfig.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Environmentconfig.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Environmentconfig.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Handlingoptions.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Handlingoptions.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Handlingoptions.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Helper.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Helper.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Helper.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Inboundparcel.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Inboundparcel.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Inboundparcel.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Invoice/Duty.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Invoice/Duty.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Invoice/Duty.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Messages.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Messages.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Messages.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel/Collection.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel/Collection.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Inboundparcel/Collection.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber/Collection.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber/Collection.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Ordernumber/Collection.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Mysql4/Variable.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Variable.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Variable.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Mysql4/Variable/Collection.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Variable/Collection.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Mysql4/Variable/Collection.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Observer.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Observer.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
@@ -39,79 +39,94 @@ class Pb_Pbgsp_Model_Observer {
39
 
40
  return substr($shipMethod,strlen("pbgsp_"));
41
  }
 
 
 
 
 
 
 
 
 
42
 
43
- public function generateInboundParcelPreAdvice($observer) {
44
 
45
- if(Pb_Pbgsp_Model_Credentials::isASNGenerationEnabled() == '1') {
46
- try {
47
- $shipment = $observer->getEvent()->getShipment();
48
- $order = $shipment->getOrder();
49
- $shipId = $shipment['entity_id'];
50
-
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
- $parcel->addFieldToFilter('mage_order_shipment_number',$shipId);
59
-
60
- if(count($parcel) > 0)
61
- return;
62
- Pb_Pbgsp_Model_Util::log("Generting ASN.");
63
- $clearPathOrders = Mage::getModel("pb_pbgsp/ordernumber")-> getCollection();
64
- $clearPathOrders -> addFieldToFilter('mage_order_number', $order -> getRealOrderId());
65
- foreach ($clearPathOrders as $cpOrder) {
66
- $cpOrderNumber = $cpOrder -> getCpOrderNumber();
67
- $tracks = array();
68
- $items = array();
69
- foreach($shipment->getTracksCollection() as $track) {
70
- $tracks[] = $track;
71
- }
72
- foreach($shipment->getItemsCollection() as $item) {
73
-
74
- $items[] = $item;
75
-
76
- }
77
-
78
- $parcelResponse = Pb_Pbgsp_Model_Api::generateInboundParcelNumber($shipment,$items,$order,$cpOrderNumber);
79
-
80
- if(array_key_exists('errors',$parcelResponse)) {
81
- Pb_Pbgsp_Model_Util::log("Error generating inbound parcel");
82
- Pb_Pbgsp_Model_Util::log($parcelResponse);
83
- }
84
- else {
85
-
86
- //Save entry in table
87
- $cpParcel = Mage::getModel('pb_pbgsp/inboundparcel');
88
- $cpParcel->setInboundParcel($parcelResponse['parcelIdentifier']);
89
- $cpParcel->setMageOrderNumber( $order->getRealOrderId());
90
- $cpParcel->setPbOrderNumber( $cpOrderNumber);
91
- $cpParcel->setMageOrderShipmentNumber( $shipId);
92
- $cpParcel->save();
93
-
94
- // add the tracking info magento
95
- $track = Mage::getModel('sales/order_shipment_track')
96
- ->setShipment($shipment)
97
- ->setData('title', 'PB')
98
- ->setData('number',$parcelResponse['parcelIdentifier'])
99
- ->setData('carrier_code', 'pbgsp')
100
- ->setData('description',$cpOrderNumber)
101
- ->setData('order_id', $shipment->getData('order_id'))
102
- ->save();
103
-
104
- Pb_Pbgsp_Model_Util::log('Inbound Parcel Number Saved');
105
- }
106
 
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
  }
111
- catch(Exception $e) {
112
- Pb_Pbgsp_Model_Util::log("Error creating inbound parcel. ");
113
- Pb_Pbgsp_Model_Util::logException($e);
114
- }
 
 
 
 
 
 
 
 
 
115
  }
116
 
117
  }
@@ -291,6 +306,7 @@ class Pb_Pbgsp_Model_Observer {
291
  }
292
  }
293
 
 
294
  public function addDutiesOnEstimation($observer){
295
  Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.addDutiesOnEstimation');
296
  Mage::getSingleton("customer/session")->setPbDutyAndTax(0);//Added by BigPixel to clear previous values, 10/20/2013
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Observer.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
39
 
40
  return substr($shipMethod,strlen("pbgsp_"));
41
  }
42
+ public function salesOrderShipmentTrackSaveAfter($observer) {
43
+
44
+ if(Pb_Pbgsp_Model_Credentials::isASNGenerationEnabled() == '1' && Pb_Pbgsp_Model_Credentials::isGenerateAsnOnAddTrack() == '1') {
45
+ Pb_Pbgsp_Model_Util::log('salesOrderShipmentTrackSaveAfter');
46
+ $track = $observer->getTrack();
47
+ Pb_Pbgsp_Model_Util::log($track->getNumber());
48
+ $shipment = $track->getShipment();
49
+ $this->generateASN($shipment);
50
+ }
51
 
 
52
 
53
+ }
54
+ private function generateASN($shipment) {
55
+ try {
56
+
57
+ $order = $shipment->getOrder();
58
+ $shipId = $shipment['entity_id'];
59
+
60
+ /* @var $order Mage_Sales_Model_Order */
61
+
62
+ if(!$this->isPbOrder($order))
63
+ return;
64
+ //check if ASN already generated or not
65
+ $parcel = Mage::getModel("pb_pbgsp/inboundparcel")-> getCollection();
66
+ $parcel -> addFieldToFilter('mage_order_number', $order -> getRealOrderId());
67
+ $parcel->addFieldToFilter('mage_order_shipment_number',$shipId);
68
+
69
+ if(count($parcel) > 0)
70
+ return;
71
+ Pb_Pbgsp_Model_Util::log("Generting ASN.");
72
+ $clearPathOrders = Mage::getModel("pb_pbgsp/ordernumber")-> getCollection();
73
+ $clearPathOrders -> addFieldToFilter('mage_order_number', $order -> getRealOrderId());
74
+ foreach ($clearPathOrders as $cpOrder) {
75
+ $cpOrderNumber = $cpOrder -> getCpOrderNumber();
76
+ $tracks = array();
77
+ $items = array();
78
+ foreach($shipment->getTracksCollection() as $track) {
79
+ $tracks[] = $track;
80
+ }
81
+ foreach($shipment->getItemsCollection() as $item) {
82
+
83
+ $items[] = $item;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  }
86
 
87
+ $parcelResponse = Pb_Pbgsp_Model_Api::generateInboundParcelNumber($shipment,$items,$order,$cpOrderNumber);
88
+
89
+ if(array_key_exists('errors',$parcelResponse)) {
90
+ Pb_Pbgsp_Model_Util::log("Error generating inbound parcel");
91
+ Pb_Pbgsp_Model_Util::log($parcelResponse);
92
+ }
93
+ else {
94
+
95
+ //Save entry in table
96
+ $cpParcel = Mage::getModel('pb_pbgsp/inboundparcel');
97
+ $cpParcel->setInboundParcel($parcelResponse['parcelIdentifier']);
98
+ $cpParcel->setMageOrderNumber( $order->getRealOrderId());
99
+ $cpParcel->setPbOrderNumber( $cpOrderNumber);
100
+ $cpParcel->setMageOrderShipmentNumber( $shipId);
101
+ $cpParcel->save();
102
+
103
+ // add the tracking info magento
104
+ $track = Mage::getModel('sales/order_shipment_track')
105
+ ->setShipment($shipment)
106
+ ->setData('title', 'PB')
107
+ ->setData('number',$parcelResponse['parcelIdentifier'])
108
+ ->setData('carrier_code', 'pbgsp')
109
+ ->setData('description',$cpOrderNumber)
110
+ ->setData('order_id', $shipment->getData('order_id'))
111
+ ->save();
112
+
113
+ Pb_Pbgsp_Model_Util::log('Inbound Parcel Number Saved');
114
+ }
115
 
116
  }
117
+
118
+
119
+ }
120
+ catch(Exception $e) {
121
+ Pb_Pbgsp_Model_Util::log("Error creating inbound parcel. ");
122
+ Pb_Pbgsp_Model_Util::logException($e);
123
+ }
124
+ }
125
+ public function generateInboundParcelPreAdvice($observer) {
126
+
127
+ if(Pb_Pbgsp_Model_Credentials::isASNGenerationEnabled() == '1' && Pb_Pbgsp_Model_Credentials::isGenerateAsnOnAddTrack() != '1') {
128
+ $shipment = $observer->getEvent()->getShipment();
129
+ $this->generateASN($shipment);
130
  }
131
 
132
  }
306
  }
307
  }
308
 
309
+
310
  public function addDutiesOnEstimation($observer){
311
  Pb_Pbgsp_Model_Util::log('Pb_Pbgsp_Model_Observer.addDutiesOnEstimation');
312
  Mage::getSingleton("customer/session")->setPbDutyAndTax(0);//Added by BigPixel to clear previous values, 10/20/2013
app/code/local/Pb/Pbgsp/Model/Ordernumber.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Ordernumber.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Ordernumber.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Pdf/Tax.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Pdf/Tax.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Pdf/Tax.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Productattributesource/Productconditions.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
 
7
  */
8
 
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
 
7
  */
8
 
app/code/local/Pb/Pbgsp/Model/Quote/Duty.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Quote/Duty.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Quote/Duty.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Resource/Mysql4/Setup.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Resource/Mysql4/Setup.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Resource/Mysql4/Setup.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Sales/Order/Shipment.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Sales/Order/Shipment.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Sales/Order/Shipment.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Util.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Util.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Util.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/Model/Variable.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Variable.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/Model/Variable.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/controllers/Adminhtml/CategorysettingsController.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  */
7
 
8
  class Pb_Pbgsp_Adminhtml_CategorysettingsController extends Mage_Adminhtml_Controller_Action {
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  */
7
 
8
  class Pb_Pbgsp_Adminhtml_CategorysettingsController extends Mage_Adminhtml_Controller_Action {
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.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pb_Pbgsp>
5
- <version>1.3.5</version>
6
  </Pb_Pbgsp>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Pb_Pbgsp>
5
+ <version>1.3.6</version>
6
  </Pb_Pbgsp>
7
  </modules>
8
  <global>
app/code/local/Pb/Pbgsp/etc/system.xml CHANGED
@@ -271,6 +271,15 @@
271
  <show_in_website>1</show_in_website>
272
  <show_in_store>1</show_in_store>
273
  </asn_generation_enabled>
 
 
 
 
 
 
 
 
 
274
  <override_shipping_address_enabled translate="label">
275
  <label>Override Shipping Address</label>
276
  <frontend_type>select</frontend_type>
271
  <show_in_website>1</show_in_website>
272
  <show_in_store>1</show_in_store>
273
  </asn_generation_enabled>
274
+ <generate_asn_on_add_track translate="label">
275
+ <label>Generate ASN after adding tracking number</label>
276
+ <frontend_type>select</frontend_type>
277
+ <source_model>adminhtml/system_config_source_yesno</source_model>
278
+ <sort_order>126</sort_order>
279
+ <show_in_default>1</show_in_default>
280
+ <show_in_website>1</show_in_website>
281
+ <show_in_store>1</show_in_store>
282
+ </generate_asn_on_add_track>
283
  <override_shipping_address_enabled translate="label">
284
  <label>Override Shipping Address</label>
285
  <frontend_type>select</frontend_type>
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.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
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.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.1.1-1.1.2.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.2.0-1.2.1.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.3.0-1.3.1.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Product: Pb_Pbgsp (1.3.5)
4
- * Packaged: 2016-04-06T13:00:10+00:00
5
- * Last Modified: 2016-03-17T11:08:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
1
  <?php
2
  /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
  * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
  * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
  */
app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-upgrade-1.3.5-1.3.6.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Product: Pb_Pbgsp (1.3.6)
4
+ * Packaged: 2016-04-14T14:05:10+00:00
5
+ * Last Modified: 2016-04-06T13:00:10+00:00
6
+ * File: app/code/local/Pb/Pbgsp/sql/pbgsp_setup/mysql4-install-1.0.0.php
7
+ * Copyright: Copyright (c) 2016 Pitney Bowes <info@pb.com> / All rights reserved.
8
+ */
9
+
10
+
11
+ $installer = $this;
12
+
13
+ $installer->startSetup();
14
+
15
+ $eav = Mage::getResourceModel('catalog/setup', 'catalog_setup');
16
+
17
+ // reverse version 1.3.2
18
+ $eav->removeAttribute('catalog_product','pb_pbgsp_commodity_height');
19
+ $eav->removeAttribute('catalog_product','pb_pbgsp_commodity_width');
20
+ $eav->removeAttribute('catalog_product','pb_pbgsp_commodity_length');
21
+ $eav->removeAttribute('catalog_product','pb_pbgsp_package_weight');
22
+ $eav->removeAttribute('catalog_product','pb_pbgsp_package_height');
23
+ $eav->removeAttribute('catalog_product','pb_pbgsp_package_width');
24
+ $eav->removeAttribute('catalog_product','pb_pbgsp_package_length');
25
+
26
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_commodity_height', array(
27
+ 'type' => 'decimal',
28
+ 'input' => 'text',
29
+ 'label' => 'Commodity Height',
30
+ 'global' => 2,
31
+ 'user_defined' => 0,
32
+ 'required' => 0,
33
+ 'visible' => 1,
34
+ 'default' => 0,
35
+ 'group' => 'PBGSP'
36
+
37
+ ));
38
+
39
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_commodity_width', array(
40
+ 'type' => 'decimal',
41
+ 'input' => 'text',
42
+ 'label' => 'Commodity Width',
43
+ 'global' => 2,
44
+ 'user_defined' => 0,
45
+ 'required' => 0,
46
+ 'visible' => 1,
47
+ 'default' => 0,
48
+ 'group' => 'PBGSP'
49
+
50
+ ));
51
+
52
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_commodity_length', array(
53
+ 'type' => 'decimal',
54
+ 'input' => 'text',
55
+ 'label' => 'Commodity Length',
56
+ 'global' => 2,
57
+ 'user_defined' => 0,
58
+ 'required' => 0,
59
+ 'visible' => 1,
60
+ 'default' => 0,
61
+ 'group' => 'PBGSP'
62
+
63
+ ));
64
+
65
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_package_weight', array(
66
+ 'type' => 'decimal',
67
+ 'input' => 'text',
68
+ 'label' => 'Package Weight',
69
+ 'global' => 2,
70
+ 'user_defined' => 0,
71
+ 'required' => 0,
72
+ 'visible' => 1,
73
+ 'default' => 0,
74
+ 'group' => 'PBGSP'
75
+
76
+ ));
77
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_package_height', array(
78
+ 'type' => 'decimal',
79
+ 'input' => 'text',
80
+ 'label' => 'Package Height',
81
+ 'global' => 2,
82
+ 'user_defined' => 0,
83
+ 'required' => 0,
84
+ 'visible' => 1,
85
+ 'default' => 0,
86
+ 'group' => 'PBGSP'
87
+
88
+ ));
89
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_package_width', array(
90
+ 'type' => 'decimal',
91
+ 'input' => 'text',
92
+ 'label' => 'Package Width',
93
+ 'global' => 2,
94
+ 'user_defined' => 0,
95
+ 'required' => 0,
96
+ 'visible' => 1,
97
+ 'default' => 0,
98
+ 'group' => 'PBGSP'
99
+
100
+ ));
101
+ $eav->addAttribute('catalog_product', 'pb_pbgsp_package_length', array(
102
+ 'type' => 'decimal',
103
+ 'input' => 'text',
104
+ 'label' => 'Package Length',
105
+ 'global' => 2,
106
+ 'user_defined' => 0,
107
+ 'required' => 0,
108
+ 'visible' => 1,
109
+ 'default' => 0,
110
+ 'group' => 'PBGSP'
111
+
112
+ ));
113
+
114
+
115
+ $installer->endSetup();
116
+ ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pitney_Bowes_GSP</name>
4
- <version>1.3.5</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>
@@ -22,33 +22,16 @@ Providing full international tracking linked from your admin page&#xD;
22
  &lt;/ul&gt;&#xD;
23
  To learn more, go to &lt;a href="http://www.pb.com/ecom"&gt;http://www.pb.com/ecom&lt;/a&gt;&#xD;
24
  </description>
25
- <notes>1.3.5 Release&#xD;
26
  &#xD;
27
- Fixed importation charges issue on admin where charges were not being applied when using an alternative currency for customer payment.&#xD;
28
  &#xD;
29
- 1.3.4 Release&#xD;
30
- &#xD;
31
- 1. Added compatibility for Avatax version 3.x (Avatax users must request customized file from your PB account specialist)&#xD;
32
- &#xD;
33
- 2. Fixed issue with Importation Charges discrepancy when tax is applied to shipping.&#xD;
34
- &#xD;
35
- 3. Resolved a Magento 1.14 security issue with the admin path and the Category Settings top-level nav. Magento has enhanced security levels by keeping the "admin" word in the backend URL's of the admin&#xD;
36
- &#xD;
37
- Version 1.3.3 Release&#xD;
38
- &#xD;
39
- 1. Added application logic to display the current version number for the PBGSP extension. Viewable in admin configs for the extension.&#xD;
40
- &#xD;
41
- 2. Fixed issue with Importation Charges discrepancy when tax is applied to shipping.&#xD;
42
- &#xD;
43
- 3. Applicable Importation/Tax is now visible per item ordered in the admin order detail screen.&#xD;
44
- &#xD;
45
- 4. Added the ability to view PB commodity error notices on checkout page. "Show Method if Not Applicable" must be set to yes in extension configs and "Ship to applicable countries" must be set to "Specific Countries", making sure US is not selected as one of the countries.&#xD;
46
- &#xD;
47
- 5. Fixed an issue when supress domestic leg tracking was active, it was still showing domestic tracking on customer account front-end order overview screen</notes>
48
  <authors><author><name>Shane Bogdan</name><user>pbecommerce</user><email>shane.bogdan@pb.com</email></author></authors>
49
- <date>2016-04-11</date>
50
- <time>19:04:50</time>
51
- <contents><target name="magelocal"><dir name="Pb"><dir name="Pbgsp"><dir name="Block"><dir name="Adminhtml"><dir name="Categorysettings"><file name="Grid.php" hash="004a69f2441024d393d3ed172d3c87a0"/></dir><file name="Categorysettings.php" hash="658ebb13331c55df3dd6f34f90102fdc"/><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="39b03ff908d00a1c4d58e93e108129f5"/></dir><file name="Totals.php" hash="42bfa5d6c13c9db8651a5ef19acfcdc8"/></dir></dir><file name="Version.php" hash="4c5c63db65e6fc6322e68e237371788c"/></dir><dir name="Checkout"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="f62967eda356b67d07b27f01b541a60a"/></dir></dir></dir><file name="Form.php" hash="6816294d14bfcbf6e355da1ba3c4ae3f"/><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="55ec5f0248a3cf0d36154553428ef1c4"/></dir><file name="Totals.php" hash="43e45ce37e23679b59e650718897c922"/></dir></dir><dir name="Tax"><dir name="Checkout"><file name="Tax.php" hash="3801cc0b5f11f7bb45e8e0e7dda0f841"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="986e066c6c63a548f7d398274d5dd200"/></dir><dir name="Model"><file name="Api.php" hash="36703decbd09a10e124b8bbae75c93da"/><dir name="Carrier"><file name="ShippingMethod.php" hash="d26679c25a6b85896758fae4bdfb3680"/></dir><dir name="Catalog"><file name="Category.php" hash="bcfaf0fffaaf943b5a6802abac84ef77"/><file name="Cron.php" hash="f020c8378158751ffcc2facd64e0720e"/><file name="File.php" hash="768800b422a8f94157d7c260bbceaffb"/><file name="Product.php" hash="9459bbba43cc21fabfc5ad4c5072f832"/></dir><file name="Credentials.php" hash="dca53fbce09f102e93fd31e726a02894"/><dir name="Creditmemo"><file name="Duty.php" hash="8582a379b780d9424ef8ea2309c081f2"/></dir><file name="Environmentconfig.php" hash="0b0b9510ac24bc9ff32fe8f05eee42df"/><file name="Handlingoptions.php" hash="8801990bd32f91164a5822309474d6df"/><file name="Helper.php" hash="159c92ff4868e8eb7b8644fc0ec52b89"/><file name="Inboundparcel.php" hash="d4e0877d93556f8dd26a20d0e129a5a2"/><dir name="Invoice"><file name="Duty.php" hash="f9fda8c020420a3279fafa87cce91947"/></dir><file name="Messages.php" hash="10756559da4ac72dc5710b580209ec5f"/><dir name="Mysql4"><dir name="Inboundparcel"><file name="Collection.php" hash="6621707b8a53f7c88131535e3ecf3baf"/></dir><file name="Inboundparcel.php" hash="3d88e5911a87832aa64c335777c31438"/><dir name="Ordernumber"><file name="Collection.php" hash="5d3d951c440b6affb4f6e9a287536428"/></dir><file name="Ordernumber.php" hash="53546ae80ef9c1323a2a4d07f2a8ac06"/><dir name="Variable"><file name="Collection.php" hash="9f5b7a7389f0196b19588941d3dd257e"/></dir><file name="Variable.php" hash="9df5b9feaa46b3106cfdf67b9f39f7c7"/></dir><file name="Observer.php" hash="a4d3fe04d54604df33e7f6f558c64023"/><file name="Ordernumber.php" hash="d550d5320118f4996708cc52c4c0be38"/><dir name="Pdf"><file name="Tax.php" hash="64b93822fb069be8f1a0e68d7124862e"/></dir><dir name="Productattributesource"><file name="Productconditions.php" hash="56ad0bc84df9439ebc242c51a04db6f8"/></dir><dir name="Quote"><file name="Duty.php" hash="5facdacca13060be7efc17d46ef30d90"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="5f8cfc63f72f9c7ddda957b7bc04699e"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Shipment.php" hash="12fb982c89c19de67375673e7a7e48da"/></dir></dir><file name="Util.php" hash="88aebd9578b806ed7e0d104d2a4f2463"/><file name="Variable.php" hash="ba34515954c497dc4dc89510974646e8"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategorysettingsController.php" hash="3573cdc79928be052b5776f57ab48f4f"/></dir></dir><dir name="data"><dir name="pb_pbgsp_setup"><file name="data-install-1.0.0.php" hash="029e760a3b8d8c7b8c6feceb22812427"/></dir></dir><dir name="etc"><file name="config.xml" hash="1f554cd1e056281be84e013df3398c1f"/><file name="system.xml" hash="ce3fcc56d889c8c338dc190c1967110b"/></dir><dir name="sql"><dir name="pbgsp_setup"><file name="mysql4-install-1.0.0.php" hash="354c4f956ded56b12c4496b0e8552f30"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="d97a309f436788cb2933f232276cfdcd"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="88bd4bc854dddd88632c24bfb937a6a8"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="abc675415c198039539dd9aa5562c4fc"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="6800c70c828d3cf3551fe64d6d69b245"/></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="0fb628e37654a9768babe0ed06df4960"/></dir></dir></dir></target><target name="mageweb"><dir name="."><file name="ReadMe.txt" hash=""/><file name="PBGSP_Manual_Catalog_Export.php" hash=""/></dir></target></contents>
52
  <compatible/>
53
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
54
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pitney_Bowes_GSP</name>
4
+ <version>1.3.6</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>
22
  &lt;/ul&gt;&#xD;
23
  To learn more, go to &lt;a href="http://www.pb.com/ecom"&gt;http://www.pb.com/ecom&lt;/a&gt;&#xD;
24
  </description>
25
+ <notes>v. 1.3.6&#xD;
26
  &#xD;
27
+ 1. Added a config option to allow the Merchant to set when the ASN trigger generation happens. Now ASNs can be generated during shipment creation or after adding the tracking number. This is particularly useful for merchants using API calls to create Shipment transactions.&#xD;
28
  &#xD;
29
+ 2. Added additional product attributes for more efficient catalog ratings for oversized products: Commodity Height, Commodity Width, Commodity Length, Package Weight, Package Height, Package Width, Package Length&#xD;
30
+ </notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  <authors><author><name>Shane Bogdan</name><user>pbecommerce</user><email>shane.bogdan@pb.com</email></author></authors>
32
+ <date>2016-04-14</date>
33
+ <time>17:59:33</time>
34
+ <contents><target name="magelocal"><dir name="Pb"><dir name="Pbgsp"><dir name="Block"><dir name="Adminhtml"><dir name="Categorysettings"><file name="Grid.php" hash="bf15db46428a3b529631853f95980ae0"/></dir><file name="Categorysettings.php" hash="858eb231e1942a9567ff3e1f81b923f7"/><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="7a6806ee897cccbb89f1187d900926d5"/></dir><file name="Totals.php" hash="b77a750c12511680d1d3f06269798ef9"/></dir></dir><file name="Version.php" hash="2d1c51e7542071fda9556d7f85e5aabc"/></dir><dir name="Checkout"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="8e3866926ff91a2ae7586203a602d704"/></dir></dir></dir><file name="Form.php" hash="6842403ba7514ce52feeef146de115bd"/><dir name="Sales"><dir name="Order"><dir name="Invoice"><file name="Totals.php" hash="8997bedc74b8514e9c7f05fed9b2cb0a"/></dir><file name="Totals.php" hash="c37f12e7027a3d8c5b7986b1ad598c02"/></dir></dir><dir name="Tax"><dir name="Checkout"><file name="Tax.php" hash="64cc6e4943f0aa72b892e7877da93a41"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="9e451a645b715218251a9d5f04b3b659"/></dir><dir name="Model"><file name="Api.php" hash="90517b9feed8d983aae9db4471dd1bf7"/><dir name="Carrier"><file name="ShippingMethod.php" hash="41de60fb50a4d4c12ac5ad81dcec1492"/></dir><dir name="Catalog"><file name="Category.php" hash="825ccb161bc713db5150ebb2ce3dedec"/><file name="Cron.php" hash="b671298bc17284c87142c93770a1da70"/><file name="File.php" hash="6bbd581a72c10bec652346b8cafd4484"/><file name="Product.php" hash="4f542605ec1958fa5865e985eb431024"/></dir><file name="Credentials.php" hash="7d18788b29d15335bb46509c13d420b2"/><dir name="Creditmemo"><file name="Duty.php" hash="a3227a0414fc3802c6f6b3604718aea8"/></dir><file name="Environmentconfig.php" hash="72399b3d470d56e8d36174497005aa39"/><file name="Handlingoptions.php" hash="cfe06727babd7c87e7125bac1c435d9d"/><file name="Helper.php" hash="b21303ca90a6c34f2145ef6d38eb880b"/><file name="Inboundparcel.php" hash="3ee5fa466840382dec74629bf1b0ef7e"/><dir name="Invoice"><file name="Duty.php" hash="738e389356da5b244915b9f3b4981425"/></dir><file name="Messages.php" hash="b8de5d5b8666e557475f52b414488a56"/><dir name="Mysql4"><dir name="Inboundparcel"><file name="Collection.php" hash="35720cff6449945f8a62990e5726f85c"/></dir><file name="Inboundparcel.php" hash="bfb3baf67b8ebb696be0c55223069609"/><dir name="Ordernumber"><file name="Collection.php" hash="a099e4bd92498fc3306ea66f9f82cbf5"/></dir><file name="Ordernumber.php" hash="723db839c309b24479d60b5f8e3b3250"/><dir name="Variable"><file name="Collection.php" hash="f7697b8c8d851fafca43e9acdcb9e043"/></dir><file name="Variable.php" hash="dc9f7d63122f09196f5569b0382aca10"/></dir><file name="Observer.php" hash="97abed7a2de28f7552f47d59a164990a"/><file name="Ordernumber.php" hash="7ed295bf3f3457585a89e9b57b3ff07e"/><dir name="Pdf"><file name="Tax.php" hash="52bfe506bb91e7e3a27c807e4b02021d"/></dir><dir name="Productattributesource"><file name="Productconditions.php" hash="a24a07cb58c23ef7b1b06f3415b72e0a"/></dir><dir name="Quote"><file name="Duty.php" hash="187d6e8fe15c3c9a55c4003a6c00714f"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="572b4d032ef43c8b7dba3653721a47d5"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Shipment.php" hash="67ed003fee7783137e47d82d634cb651"/></dir></dir><file name="Util.php" hash="b39db7a94020f56ffbdf6c5d930d7472"/><file name="Variable.php" hash="4da7328778c936d96fec4e46f22c9511"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategorysettingsController.php" hash="d756c265f0bf515a3df93177152140ea"/></dir></dir><dir name="data"><dir name="pb_pbgsp_setup"><file name="data-install-1.0.0.php" hash="2633a0364ab6fb46baffca331f621c5c"/></dir></dir><dir name="etc"><file name="config.xml" hash="d02849a65160ebe9da53baaae1db6c53"/><file name="system.xml" hash="5eb02356a582356024156e95ed0502bb"/></dir><dir name="sql"><dir name="pbgsp_setup"><file name="mysql4-install-1.0.0.php" hash="6a1f1cb5978a80b41df91c9e4f71b895"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="fd717536adc2caeaba3120874038608b"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="acf9d4e174dc18969abe7d43caec3f03"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="ecaad631fe74fd9e1d8006d83c13bea9"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="43bd769b42153dc4863585aea34733e6"/><file name="mysql4-upgrade-1.3.5-1.3.6.php" hash="01e218167fa78da75b96e8c019ccd5df"/></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="0fb628e37654a9768babe0ed06df4960"/></dir></dir></dir></target><target name="mageweb"><dir name="."><file name="ReadMe.txt" hash=""/><file name="PBGSP_Manual_Catalog_Export.php" hash=""/></dir></target></contents>
35
  <compatible/>
36
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
37
  </package>