Skip to content

SimedruF/FedexCarrierPrestashop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FedEx Carrier Module for PrestaShop

A comprehensive PrestaShop module that integrates FedEx shipping services into your online store, allowing you to calculate real-time shipping rates and manage FedEx carriers seamlessly.

Features

  • Real-time FedEx API Integration - Calculate shipping rates using the official FedEx API
  • Test Mode Support - Simulate API responses for testing without making real API calls
  • Multi-zone Support - Configure shipping for different geographical zones
  • Weight-based Calculations - Automatic shipping cost calculation based on cart weight
  • Easy Configuration - Simple back-office interface for API credentials setup
  • Multi-language Support - Carrier descriptions in multiple languages
  • Tracking Integration - Direct links to FedEx tracking system
  • Debug Tools - Built-in diagnostic tools for troubleshooting

Requirements

  • PrestaShop: Version 8.0.0 or higher
  • PHP: Version 7.4 or higher with cURL extension
  • FedEx Account: Valid FedEx developer account with API credentials
  • SSL: HTTPS recommended for production use

Installation

  1. Download the module files to your PrestaShop modules directory:

    /modules/fedexcarrier/
    
  2. Upload all files maintaining the directory structure:

    fedexcarrier/
    ├── fedexcarrier.php
    ├── config.xml
    ├── logo.png
    ├── README.md
    └── views/
        ├── css/
        │   └── back.css
        ├── img/
        │   ├── fedex.jpg
        │   └── fedex.webp
        └── js/
            └── back.js
    
  3. Install the module from the PrestaShop back office:

    • Go to Modules > Module Manager
    • Find "FedEx Carrier" and click "Install"
  4. Configure your FedEx API credentials (see Configuration section)

Configuration

After installation, configure the module with your FedEx API credentials:

  1. Access Configuration:

    • Go to Modules > Module Manager
    • Find "FedEx Carrier" and click "Configure"
  2. Required API Credentials:

    • API Key: Your FedEx API key
    • API Password: Your FedEx API password/secret
    • Account Number: Your FedEx account number
    • Meter Number: Your FedEx meter number
    • Test Mode: Enable for testing with sandbox API
  3. Getting FedEx API Credentials:

    • Register at FedEx Developer Portal
    • Create a new application to get API credentials
    • Note the difference between sandbox and production credentials

API Endpoints

The module uses the following FedEx API endpoints:

  • Production OAuth: https://apis.fedex.com/oauth/token
  • Production Rates: https://apis.fedex.com/rate/v1/rates/quotes
  • Sandbox OAuth: https://apis-sandbox.fedex.com/oauth/token
  • Sandbox Rates: https://apis-sandbox.fedex.com/rate/v1/rates/quotes

Usage

For Customers

Once configured, the FedEx carrier will automatically appear as a shipping option during checkout, displaying real-time calculated shipping costs based on:

  • Destination address
  • Package weight
  • FedEx service type

For Store Administrators

  • Monitor shipping calculations in the module configuration page
  • Use built-in diagnostic tools to troubleshoot issues
  • Test API connectivity with the integrated test functions

Test Mode

When Test Mode is enabled:

  • No real API calls are made to FedEx
  • Simulated shipping rates are returned
  • Useful for development and testing
  • Base rate: 10.00 RON + weight surcharge (1.00 RON/kg) + distance surcharge (15.00 RON for international)

Troubleshooting

Common Issues

  1. "Could not obtain access token"

    • Verify API credentials are correct
    • Check if Test Mode setting matches your credentials type
    • Ensure server has internet connectivity
  2. "No shipping rates returned"

    • Verify destination address is valid
    • Check if FedEx serves the destination area
    • Review API response in error logs
  3. Carrier not visible at checkout

    • Ensure carrier is associated with customer zones
    • Check weight ranges are properly configured
    • Verify carrier is associated with customer groups

Debug Tools

The module includes diagnostic tools accessible from the configuration page:

  • API Connection Test - Tests OAuth token retrieval
  • Rate Calculation Test - Tests shipping rate calculation
  • Carrier Diagnosis - Checks carrier configuration for specific customers

Error Logging

The module logs errors to PHP error log:

  • OAuth authentication errors
  • API communication errors
  • cURL connection issues

Check your server's error log for detailed debugging information.

Support

For technical support and bug reports:

License

This module is licensed under the Academic Free License (AFL 3.0). See the LICENSE file for details.

Changelog

Version 1.0.0

  • Initial release
  • FedEx API integration
  • Real-time rate calculation
  • Test mode support
  • Multi-zone configuration
  • Debug and diagnostic tools

Contributing

Contributions are welcome! Please ensure:

  • Code follows PrestaShop coding standards
  • All comments are in English
  • Test thoroughly before submitting
  • Update documentation as needed

© 2024 Automatic House Systems. All rights reserved.

About

FedEx Carrier Module for PrestaShop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages