Overview

Packages

  • IllApps
    • Shipsync
  • PHP

Classes

  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_Shipment_Abstract
  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_Shipment_Packages_View
  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_Shipment_Packages_View_Form
  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_Shipment_Packages_View_Items
  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_Shipment_Packages_View_Package
  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_Shipment_View
  • IllApps_Shipsync_Block_Adminhtml_Sales_Order_View
  • IllApps_Shipsync_Block_Adminhtml_Shipsync
  • IllApps_Shipsync_Block_Adminhtml_Shipsync_Option
  • IllApps_Shipsync_Helper_Data
  • IllApps_Shipsync_IndexController
  • IllApps_Shipsync_Model_Mysql4_Setup
  • IllApps_Shipsync_Model_Mysql4_Shipment_Package
  • IllApps_Shipsync_Model_Mysql4_Shipment_Package_Collection
  • IllApps_Shipsync_Model_Sales_Order_Shipment_Package
  • IllApps_Shipsync_Model_Sales_Order_Shipment_Package_Item
  • IllApps_Shipsync_Model_Sales_Quote_Address
  • IllApps_Shipsync_Model_Shipment_Abstract
  • IllApps_Shipsync_Model_Shipment_Package
  • IllApps_Shipsync_Model_Shipment_Request
  • IllApps_Shipsync_Model_Shipment_Response
  • IllApps_Shipsync_Model_Shipment_Result
  • IllApps_Shipsync_Model_Shipping_Carrier_Abstract
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Address
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Package
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Rate
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Ship
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_B13afilingoption
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Freemethod
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Label_Image
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Label_Orientation
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Label_Stock
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Method
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Packaging
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Rate
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Ratediscount
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Residencedelivery
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Signature
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Smartpost_Endorsement
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Smartpost_Indicia
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Source_Unitofmeasure
  • IllApps_Shipsync_Model_Shipping_Carrier_Fedex_Track
  • IllApps_Shipsync_Model_Shipping_Package
  • IllApps_Shipsync_Model_Shipping_Package_Item
  • IllApps_Shipsync_Model_Shipping_Package_Origins
  • IllApps_Shipsync_Model_Shipping_Package_Sort
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: 
 3: /**
 4:  * ShipSync
 5:  *
 6:  * @category   IllApps
 7:  * @package    IllApps_Shipsync
 8:  * @copyright  Copyright (c) 2014 EcoMATICS, Inc. DBA IllApps (http://www.illapps.com)
 9:  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
10:  */
11: 
12: /**
13:  * IllApps_Shipsync_Model_Shipment_Package
14:  */
15: class IllApps_Shipsync_Model_Shipment_Package extends Mage_Core_Model_Abstract
16: {
17:     /**
18:      * _construct
19:      */
20:     protected function _construct()
21:     {
22:         $this->_init('shipping/shipment_package');
23:     }
24:     
25:     
26:     /*
27:      * Returns parsed item details for ship request
28:      * 
29:      * @return array
30:      */
31:     public function getContents()
32:     {
33:         foreach ($this->getItems() as $_item) {
34:             
35:             $item = Mage::getModel('sales/order_item')->load($_item['id']);
36:             
37:             $contents[] = array(
38:                 'ItemNumber' => $item['id'],
39:                 'Description' => $item->getName(),
40:                 'ReceivedQuantity' => 1
41:             );
42:         }
43:         
44:         return $contents;
45:     }
46:     
47:     
48:     /*
49:      * Round and return
50:      *
51:      * @return float
52:      */
53:     public function getRoundedLength()
54:     {
55:         return round($this->getLength(), 1) > 0 ? $this->getLength() : 0.1;
56:     }
57:     
58:     /*
59:      * Round and return
60:      *
61:      * @return float
62:      */
63:     public function getRoundedWidth()
64:     {
65:         return round($this->getWidth(), 1) > 0 ? $this->getWidth() : 0.1;
66:     }
67:     
68:     /*
69:      * If you haven't picked it up by now, there's no hope for you
70:      *
71:      * @return float
72:      */
73:     public function getRoundedHeight()
74:     {
75:         return round($this->getHeight(), 1) > 0 ? $this->getHeight() : 0.1;
76:     }
77:     
78:     /*
79:      * Sequence number for  shipment
80:      *
81:      * @return int
82:      */
83:     public function getSequenceNumber()
84:     {
85:         return Mage::getStoreConfig('carriers/fedex/mps_shipments') ? ($this->getPackageNumber() + 1) : 1;
86:     }
87: }
88: 
shipsync-community API documentation generated by ApiGen 2.8.0