PHPackages                             freento/module-dimensional-shipping - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. freento/module-dimensional-shipping

ActiveMagento2-module[API Development](/categories/api)

freento/module-dimensional-shipping
===================================

Dimensional Shipping module with REST API integration

1.0.0(5mo ago)031OpenPHP

Since Dec 8Pushed 5mo agoCompare

[ Source](https://github.com/Freento/magento-2-dimensional-shipping)[ Packagist](https://packagist.org/packages/freento/module-dimensional-shipping)[ RSS](/packages/freento-module-dimensional-shipping/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Freento\_DimensionalShipping
============================

[](#freento_dimensionalshipping)

A Magento 2 module for calculating shipping costs based on product dimensions using 3D bin packing via REST API.

Features
--------

[](#features)

- **3D Bin Packing**: Calculates optimal packing of items into shipping boxes via external REST API
- **Product Dimensions**: Custom product attributes for length, width, height, and shipping constraints
- **Multiple Product Types Support**:
    - Simple products
    - Configurable products
    - Bundle products
    - Grouped products
- **Shipping Carrier Integration**: Works with FedEx, UPS, and USPS carriers
- **Package Box Management**: Configure multiple box sizes with dimensions and weight limits
- **Smart Caching**: Stores packing results to avoid redundant calculations
- **Ships Separately Option**: Mark products that must ship in their own box
- **Rotation Control**: Prevent specific items from being rotated during packing
- **Admin UI**:
    - Manage package boxes
    - Import/export product dimensions via CSV
    - View packing results for orders
- **REST API Integration**: Uses external packing service for calculations

Requirements
------------

[](#requirements)

- Magento 2.4.7 or higher
- PHP 8.1 or higher
- External Dimensional Shipping REST API service (see API Requirements below)

Installation
------------

[](#installation)

### 1. Add Module Files

[](#1-add-module-files)

```
composer require freento/module-dimensional-shipping
```

Or copy the module to your Magento installation:

```
cp -r app/code/Freento/DimensionalShipping /path/to/magento/app/code/Freento/
```

### 2. Enable the Module

[](#2-enable-the-module)

```
bin/magento module:enable Freento_DimensionalShipping
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

Configuration
-------------

[](#configuration)

### 1. Module Settings

[](#1-module-settings)

Navigate to: **Stores → Configuration → General → Dimensional Shipping**

Configure the following:

- **Enable Dimensional Shipping**: Yes/No
- **API Key**: Your API key for authenticating with the dimensional shipping REST API service
- **Dimension Unit**: Select unit for dimensions (inches, cm)

**Note**: Weight unit is taken from the global Magento setting: **Stores → Configuration → General → General → Locale Options → Weight Unit**

### 2. Carrier Configuration

[](#2-carrier-configuration)

Navigate to: **Stores → Configuration → Sales → Shipping Methods**

For each carrier (FedEx, UPS, USPS):

- **Use Package Dimensions**: Enable to use dimensional shipping with this carrier

These options will only appear when Dimensional Shipping is enabled.

### 3. Configure Package Boxes

[](#3-configure-package-boxes)

Navigate to: **Dimensional Shipping → Package Boxes**

Add boxes with:

- Name
- Length, Width, Height (in your configured dimension unit)
- Maximum weight (in your configured weight unit)
- Enabled status

Example boxes (in inches):

```
Small Box:  12" × 10" × 8", max 20 lbs
Medium Box: 18" × 14" × 12", max 50 lbs
Large Box:  24" × 18" × 16", max 70 lbs

```

Product Configuration
---------------------

[](#product-configuration)

### Adding Dimensions to Products

[](#adding-dimensions-to-products)

For each product, configure the following attributes:

#### Required Attributes:

[](#required-attributes)

- **Package Length** (`dimensional_shipping_package_length`)
- **Package Width** (`dimensional_shipping_package_width`)
- **Package Height** (`dimensional_shipping_package_height`)
- **Weight** (standard Magento attribute)

#### Optional Attributes:

[](#optional-attributes)

- **No Rotation Allowed** (`dimensional_shipping_no_rotation_allowed`): Prevent item rotation during packing (useful for fragile items)
- **Ships Separately** (`dimensional_shipping_ships_separately`): Item must ship in its own box

### Product Types

[](#product-types)

#### Simple Products

[](#simple-products)

Set dimensions directly on the product.

#### Configurable Products

[](#configurable-products)

Set dimensions on the child simple products (selected variant).

#### Bundle Products

[](#bundle-products)

Set dimensions on the component simple products.

#### Grouped Products

[](#grouped-products)

Set dimensions on the child simple products. The grouped product parent does not need dimensions.

How It Works
------------

[](#how-it-works)

### 1. Customer Adds Products to Cart

[](#1-customer-adds-products-to-cart)

Products with configured dimensions are added to the shopping cart.

### 2. Shipping Calculation Triggered

[](#2-shipping-calculation-triggered)

When the customer views shipping methods, the module:

1. Collects all cart items and their dimensions
2. Loads configured package boxes
3. Sends data to REST API for optimal packing calculation (authenticated with API key)
4. Receives packed box configurations
5. Caches results to database

### 3. Packing Results Used

[](#3-packing-results-used)

The calculated box dimensions and weights are passed to shipping carriers (FedEx, UPS, USPS) for rate calculation.

### 4. Smart Caching

[](#4-smart-caching)

The module caches packing results and checks timestamps to determine if recalculation is needed:

- Quote items changed
- Products updated
- Package boxes modified

Import/Export Product Dimensions
--------------------------------

[](#importexport-product-dimensions)

### Export Dimensions to CSV

[](#export-dimensions-to-csv)

Navigate to: **Dimensional Shipping → Package Dimensions**

Click **Export** to download CSV with all product dimensions.

### Import Dimensions from CSV

[](#import-dimensions-from-csv)

Navigate to: **Dimensional Shipping → Package Dimensions**

1. Click **Import**
2. Upload CSV file with columns:
    - `sku`
    - `length`
    - `width`
    - `height`
    - `no_rotation_allowed` (0/1)
    - `ships_separately` (0/1)
3. Click **Import**

Admin Features
--------------

[](#admin-features)

### View Order Packing Details

[](#view-order-packing-details)

Navigate to: **Sales → Orders → View Order**

Under the **Packaging** tab, you can see:

- Which boxes were used
- Item placement within each box
- 3D positions of each item
- Items that couldn't be packed

Troubleshooting
---------------

[](#troubleshooting)

### No Shipping Rates Displayed

[](#no-shipping-rates-displayed)

**Check**:

1. Module is enabled in configuration
2. API Key is correctly configured
3. API service is running and accessible
4. Products have dimension attributes set
5. At least one package box is configured and enabled
6. Carrier's "Use Package Dimensions" option is enabled

**View Logs**:

```
tail -f var/log/system.log | grep -i "dimensional"
```

### API Connection Errors

[](#api-connection-errors)

**Common Issues**:

- **No API key provided**: Set API Key in admin configuration
- **Incorrect API key validation result**: Verify the API key is correct? is not expired and does not exceed usage limit

### Items Not Packing

[](#items-not-packing)

**Possible Causes**:

1. **Missing dimensions**: Products must have length, width, and height
2. **Items too large**: No box is big enough to fit the items
3. **Weight exceeded**: Items exceed maximum box weight
4. **Wrong units**: Verify dimension and weight units match your configuration

**Debug**: Enable developer mode and check `var/log/system.log` for detailed error messages.

### Grouped Products Not Working

[](#grouped-products-not-working)

**Solution**:

- Ensure child simple products (not the grouped parent) have dimension attributes
- Check logs for "No children found for grouped product"
- Verify grouped product has children in the cart
- Confirm each child product has valid dimensions

Support
-------

[](#support)

For issues, feature requests, or questions:

1. Check [TROUBLESHOOTING](#troubleshooting) section
2. Review logs: `var/log/system.log`
3. Check module configuration
4. Verify API service is running and API key is valid

License
-------

[](#license)

Proprietary

Credits
-------

[](#credits)

Developed by Freento

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance72

Regular maintenance activity

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

157d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98f431f566f9a6d2cbe0e346430548851a8aba22f9bdf8efef8429a549b84513?d=identicon)[Freento](/maintainers/Freento)

### Embed Badge

![Health badge](/badges/freento-module-dimensional-shipping/health.svg)

```
[![Health](https://phpackages.com/badges/freento-module-dimensional-shipping/health.svg)](https://phpackages.com/packages/freento-module-dimensional-shipping)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[graycore/magento2-cors

A Magento 2 module that enables CORS on the GraphQL and REST Apis

99516.1k](/packages/graycore-magento2-cors)[elgentos/module-prismicio

Magento 2 - Prismic.io integration

39112.0k3](/packages/elgentos-module-prismicio)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
