Shopgo_AramexShipping - Version 1.0.1

Version Notes

Aramex shipping allows to calculate Aramex shipping rates, create Aramex shipments and track them.

Download this release

Release Info

Developer Moe Ghashim
Extension Shopgo_AramexShipping
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Shopgo/AramexShipping/Model/Shipping.php CHANGED
@@ -171,7 +171,7 @@ class Shopgo_AramexShipping_Model_Shipping
171
  public function getRatesAndPackages($object, $returnRates = true, $destinationData = array())
172
  {
173
  $helper = Mage::helper('aramexshipping');
174
- $quoteItems = $object->getAllItems();
175
  $localItems = array();
176
  $packages = array('origin' => array());
177
  $suppliers = $helper->getSuppliersCollection();
@@ -180,12 +180,15 @@ class Shopgo_AramexShipping_Model_Shipping
180
  switch (get_class($object)) {
181
  case 'Mage_Sales_Model_Quote':
182
  $quoteType = 'quote';
 
183
  break;
184
  case 'Mage_Sales_Model_Order':
185
  $quoteType = 'order';
 
186
  break;
187
  case 'Mage_Sales_Model_Order_Shipment':
188
  $quoteType = 'shipment';
 
189
  break;
190
  default:
191
  return;
@@ -848,7 +851,7 @@ class Shopgo_AramexShipping_Model_Shipping
848
 
849
  try {
850
  if ($shipment = Mage::registry('aramex_shipment')) {
851
- if ($shipment->getOrder()->getCustomerEmail() && $shipment->getEmailSent()) {
852
  if ($comments = Mage::registry('aramex_shipments_comments')) {
853
  $comments = '<br/><strong>' . $helper->__('Comments') . ':</strong>'
854
  . $comments;
171
  public function getRatesAndPackages($object, $returnRates = true, $destinationData = array())
172
  {
173
  $helper = Mage::helper('aramexshipping');
174
+ $quoteItems = null;
175
  $localItems = array();
176
  $packages = array('origin' => array());
177
  $suppliers = $helper->getSuppliersCollection();
180
  switch (get_class($object)) {
181
  case 'Mage_Sales_Model_Quote':
182
  $quoteType = 'quote';
183
+ $quoteItems = $object->getAllVisibleItems();
184
  break;
185
  case 'Mage_Sales_Model_Order':
186
  $quoteType = 'order';
187
+ $quoteItems = $object->getAllItems();
188
  break;
189
  case 'Mage_Sales_Model_Order_Shipment':
190
  $quoteType = 'shipment';
191
+ $quoteItems = $object->getAllItems();
192
  break;
193
  default:
194
  return;
851
 
852
  try {
853
  if ($shipment = Mage::registry('aramex_shipment')) {
854
+ if ($shipment->getOrder()->getCustomerEmail() && !$shipment->getEmailSent()) {
855
  if ($comments = Mage::registry('aramex_shipments_comments')) {
856
  $comments = '<br/><strong>' . $helper->__('Comments') . ':</strong>'
857
  . $comments;
app/code/community/Shopgo/AramexShipping/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Shopgo_AramexShipping>
5
- <version>1.0.0</version>
6
  </Shopgo_AramexShipping>
7
  </modules>
8
  <global>
@@ -29,11 +29,11 @@
29
  </shipping>
30
  </entities>
31
  </aramexshipping_mysql4>
32
- <aramexshipping>
33
  <rewrite>
34
  <info>Shopgo_AramexShipping_Model_Shipping_Info</info>
35
  </rewrite>
36
- </aramexshipping>
37
  </models>
38
  <resources>
39
  <aramexshipping_setup>
2
  <config>
3
  <modules>
4
  <Shopgo_AramexShipping>
5
+ <version>1.0.1</version>
6
  </Shopgo_AramexShipping>
7
  </modules>
8
  <global>
29
  </shipping>
30
  </entities>
31
  </aramexshipping_mysql4>
32
+ <shipping>
33
  <rewrite>
34
  <info>Shopgo_AramexShipping_Model_Shipping_Info</info>
35
  </rewrite>
36
+ </shipping>
37
  </models>
38
  <resources>
39
  <aramexshipping_setup>
app/code/community/Shopgo/AramexShipping/sql/aramexshipping_setup/mysql4-install-0.1.0.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- $installer = $this;
4
-
5
- $installer->startSetup();
6
-
7
- $installer->run("
8
-
9
- DROP TABLE IF EXISTS {$this->getTable('aramex_shipping_suppliers')};
10
- CREATE TABLE {$this->getTable('aramex_shipping_suppliers')} (
11
- `asv_id` int(11) unsigned NOT NULL auto_increment,
12
- `identifier` varchar(255) NOT NULL,
13
- `username` varchar(255) NOT NULL,
14
- `password` varchar(255) NOT NULL,
15
- `account_country_code` varchar(2) NULL,
16
- `account_entity` varchar(3) NULL,
17
- `account_number` int(11) unsigned NULL,
18
- `account_pin` int(11) unsigned NULL,
19
- `address_line1` varchar(255) NOT NULL,
20
- `address_line2` varchar(255) NULL,
21
- `address_line3` varchar(255) NULL,
22
- `city` varchar(255) NOT NULL,
23
- `state_or_province_code` varchar(255) NULL,
24
- `post_code` varchar(255) NOT NULL,
25
- `country_code` varchar(2) NOT NULL,
26
- `department` varchar(255) NULL,
27
- `person_name` varchar(255) NOT NULL,
28
- `person_title` varchar(255) NULL,
29
- `company_name` varchar(255) NOT NULL,
30
- `phone_number1` varchar(255) NOT NULL,
31
- `phone_number1_ext` varchar(255) NOT NULL,
32
- `phone_number2` varchar(255) NULL,
33
- `phone_number2_ext` varchar(255) NULL,
34
- `fax_number` varchar(255) NULL,
35
- `cellphone` varchar(255) NOT NULL,
36
- `email` varchar(255) NOT NULL,
37
- `type` varchar(255) NULL,
38
- PRIMARY KEY (`asv_id`)
39
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
40
-
41
- ");
42
-
43
- $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
44
- if (!$setup->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'aramex_supplier')) {
45
- $setup->addAttribute('catalog_product', 'aramex_supplier', array(
46
- 'attribute_set' => 'Default',
47
- 'group' => 'General',
48
- 'input' => 'select',
49
- 'type' => 'text',
50
- 'label' => 'Aramex Supplier',
51
- 'backend' => '',
52
- 'visible' => 1,
53
- 'required' => 0,
54
- 'user_defined' => 1,
55
- 'searchable' => 1,
56
- 'filterable' => 0,
57
- 'comparable' => 1,
58
- 'visible_on_front' => 1,
59
- 'visible_in_advanced_search' => 0,
60
- 'is_html_allowed_on_front' => 0,
61
- 'source' => 'aramexshipping/product_attribute_source_suppliers',
62
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL
63
- ));
64
- }
65
-
66
- if (version_compare(Mage::getVersion(), '1.4.1.0', '>=')) {
67
- $setup = $this->_conn;
68
- $setup->addColumn($this->getTable('sales_flat_shipment'), 'aramex_shipment_data', 'text');
69
- } else {
70
- $setup = new Mage_Eav_Model_Entity_Setup('sales_setup');
71
- $setup->addAttribute('shipment', 'aramex_shipment_data', array('type' => 'text'));
72
- }
73
-
74
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Shopgo_AramexShipping</name>
4
- <version>1.0.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>
@@ -10,9 +10,9 @@
10
  <description>Aramex shipping allows to calculate Aramex shipping rates, create Aramex shipments and track them. It also provides extra features like adding multiple Aramex accounts.</description>
11
  <notes>Aramex shipping allows to calculate Aramex shipping rates, create Aramex shipments and track them.</notes>
12
  <authors><author><name>Moe Ghashim</name><user>ShopGo</user><email>moe@shopgo.me</email></author></authors>
13
- <date>2013-07-24</date>
14
- <time>13:14:37</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Shopgo_AramexShipping.xml" hash="e44330663c0b8e95367061e15a1ed182"/></dir></target><target name="magecommunity"><dir name="Shopgo"><dir name="AramexShipping"><dir name="Block"><dir name="Adminhtml"><dir name="Shipping"><dir name="Edit"><file name="Form.php" hash="0caa14bbcf147bd066e6b9f0b45c61cd"/><dir name="Tab"><file name="Aramexaccountform.php" hash="65631ff8a99b2ee7fe615b2be98a2f4d"/><file name="Generalinfoform.php" hash="e50af4d7ffe7a5b89e8bb68155b6acf7"/></dir><file name="Tabs.php" hash="3719bd1c4de7f2702ea704f71aaabf13"/></dir><file name="Edit.php" hash="8e698cac556bca85c4d83fdce6292ec9"/><file name="Grid.php" hash="855d7949a5c208f8aab7af1534652214"/></dir><file name="Shipping.php" hash="04e853d0200f6c070fba573567b53926"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="7854cd25e45b7d384944340977980f4e"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="8b98cc69cd1548d788d40bd22d4a4e5b"/></dir><dir name="Model"><dir name="Carrier"><file name="Aramex.php" hash="8fc32eacde284fe61d8ee7f16b9fca5c"/></dir><dir name="Mysql4"><dir name="Shipping"><file name="Collection.php" hash="d355d21ea31c6cb7a910cddb98254067"/></dir><file name="Shipping.php" hash="68bf7145e6f56efdcad1c66a0f1d4462"/></dir><file name="Observer.php" hash="e812356a5a0c8e77da25833d077556c2"/><dir name="Product"><dir name="Attribute"><dir name="Source"><file name="Suppliers.php" hash="08d1e039a63b3fcec7ed05915f0187ef"/></dir></dir></dir><dir name="Shipping"><file name="Info.php" hash="77df8fe0be40dc874d0aeea8676cb41f"/></dir><file name="Shipping.php" hash="1c1e808799005ca8167d6b8a5e03c44a"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Activepaymentmethods.php" hash="494e7176a1a6d7fd32c90aa663f0903a"/><file name="Producttypes.php" hash="bfc2db6d039b61ab1d1a0792ae3cdb8b"/><file name="Shippingmode.php" hash="b85451548ff68c09eda8ede7582c753b"/><file name="Unitofmeasure.php" hash="98425e146fb1273b3ac8b8ed3e572b47"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AramexController.php" hash="fe303b2092e14c85bae7100c9a4bfb6f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="35c83a882707b398f6e33ed89db66483"/><file name="config.xml" hash="7690d14bf12d14a329b9d44e0e197ff9"/><file name="system.xml" hash="1d5d5923d92396c122c5929b6b44492e"/><dir name="wsdl"><file name="aramex_rates_calculator_service.wsdl" hash="2bfdb74b712a406966f990e5700fd4a8"/><file name="aramex_shipments_tracking_service.wsdl" hash="d0a3decaa902f3f2b6d463c790071da8"/><file name="aramex_shipping_service.wsdl" hash="c3321b8924b1a9050324f7a46e18ba5d"/></dir></dir><dir name="sql"><dir name="aramexshipping_setup"><file name="mysql4-install-0.1.0.php" hash="73aee79dcddd0a6a8fcf55c74b769753"/><file name="mysql4-install-1.0.0.php" hash="73aee79dcddd0a6a8fcf55c74b769753"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="aramex_shipping.xml" hash="cd056a0014d4b9772ab33f2703fd3e6f"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="aramex_shipping"><dir name="system"><dir name="config"><file name="button.phtml" hash="9df0309c25cc5d44528b6421da796480"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="aramex_shipping.xml" hash="a631f32fe139a1f993e332971230d260"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="aramex_shipping"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="836471b0740d4baaa13ec3d9f33d4b7d"/></dir></dir><dir name="tracking"><file name="popup.phtml" hash="ed33c71cd3baaa67611d2427327842e1"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Shopgo_AramexShipping</name>
4
+ <version>1.0.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>
10
  <description>Aramex shipping allows to calculate Aramex shipping rates, create Aramex shipments and track them. It also provides extra features like adding multiple Aramex accounts.</description>
11
  <notes>Aramex shipping allows to calculate Aramex shipping rates, create Aramex shipments and track them.</notes>
12
  <authors><author><name>Moe Ghashim</name><user>ShopGo</user><email>moe@shopgo.me</email></author></authors>
13
+ <date>2013-07-31</date>
14
+ <time>13:58:55</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Shopgo_AramexShipping.xml" hash="e44330663c0b8e95367061e15a1ed182"/></dir></target><target name="magecommunity"><dir name="Shopgo"><dir name="AramexShipping"><dir name="Block"><dir name="Adminhtml"><dir name="Shipping"><dir name="Edit"><file name="Form.php" hash="0caa14bbcf147bd066e6b9f0b45c61cd"/><dir name="Tab"><file name="Aramexaccountform.php" hash="65631ff8a99b2ee7fe615b2be98a2f4d"/><file name="Generalinfoform.php" hash="e50af4d7ffe7a5b89e8bb68155b6acf7"/></dir><file name="Tabs.php" hash="3719bd1c4de7f2702ea704f71aaabf13"/></dir><file name="Edit.php" hash="8e698cac556bca85c4d83fdce6292ec9"/><file name="Grid.php" hash="855d7949a5c208f8aab7af1534652214"/></dir><file name="Shipping.php" hash="04e853d0200f6c070fba573567b53926"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="7854cd25e45b7d384944340977980f4e"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="8b98cc69cd1548d788d40bd22d4a4e5b"/></dir><dir name="Model"><dir name="Carrier"><file name="Aramex.php" hash="8fc32eacde284fe61d8ee7f16b9fca5c"/></dir><dir name="Mysql4"><dir name="Shipping"><file name="Collection.php" hash="d355d21ea31c6cb7a910cddb98254067"/></dir><file name="Shipping.php" hash="68bf7145e6f56efdcad1c66a0f1d4462"/></dir><file name="Observer.php" hash="e812356a5a0c8e77da25833d077556c2"/><dir name="Product"><dir name="Attribute"><dir name="Source"><file name="Suppliers.php" hash="08d1e039a63b3fcec7ed05915f0187ef"/></dir></dir></dir><dir name="Shipping"><file name="Info.php" hash="77df8fe0be40dc874d0aeea8676cb41f"/></dir><file name="Shipping.php" hash="64c5173a484fb6d333b7c8997a9ccd52"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Activepaymentmethods.php" hash="494e7176a1a6d7fd32c90aa663f0903a"/><file name="Producttypes.php" hash="bfc2db6d039b61ab1d1a0792ae3cdb8b"/><file name="Shippingmode.php" hash="b85451548ff68c09eda8ede7582c753b"/><file name="Unitofmeasure.php" hash="98425e146fb1273b3ac8b8ed3e572b47"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AramexController.php" hash="fe303b2092e14c85bae7100c9a4bfb6f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="35c83a882707b398f6e33ed89db66483"/><file name="config.xml" hash="1e19767e47719bed434cea9da88ec162"/><file name="system.xml" hash="1d5d5923d92396c122c5929b6b44492e"/><dir name="wsdl"><file name="aramex_rates_calculator_service.wsdl" hash="2bfdb74b712a406966f990e5700fd4a8"/><file name="aramex_shipments_tracking_service.wsdl" hash="d0a3decaa902f3f2b6d463c790071da8"/><file name="aramex_shipping_service.wsdl" hash="c3321b8924b1a9050324f7a46e18ba5d"/></dir></dir><dir name="sql"><dir name="aramexshipping_setup"><file name="mysql4-install-1.0.0.php" hash="73aee79dcddd0a6a8fcf55c74b769753"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="aramex_shipping.xml" hash="cd056a0014d4b9772ab33f2703fd3e6f"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="aramex_shipping"><dir name="system"><dir name="config"><file name="button.phtml" hash="9df0309c25cc5d44528b6421da796480"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="aramex_shipping.xml" hash="a631f32fe139a1f993e332971230d260"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="aramex_shipping"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="836471b0740d4baaa13ec3d9f33d4b7d"/></dir></dir><dir name="tracking"><file name="popup.phtml" hash="ed33c71cd3baaa67611d2427327842e1"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>