PHP Classes

Gnarus Frete: Calculate the package postage cost in Brazil

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 700 All time: 4,687 This week: 524Up
Version License Categories
gnarusfrete 1.0GNU General Publi...E-Commerce, Web services
Description 

Author

This package is specific mainly for applications used in Brazil Brazil .

This class is meant to calculate the postage cost of a deliverying a package in Brazil given the package weight and the postal codes of the origin and destination cities.

It can be used to calculate total shipping costs of deliverying products sold by e-commerce sites.

The postage cost is calculates automatically by the class by accessing the site of the Correios post company or by looking up on CSV files.

The code and the comments are in Portuguese.

In Portuguese:

Esta classe serve para calcular o frete para enviar uma encomenda no Brasil dado o seu peso e o CEP das cidades de origem e destino do envio.

A classe pode ser usada para calcular o custo total do envio de produtos vendidos por sites de comércio eletrônico.

O cálculo do frete pode ser feito automaticamente pela classe acessando o site dos Correios ou usando arquivos locais em formato CSV.

Innovation Award
PHP Programming Innovation award nominee
April 2004
Number 5


Prize: One book of choice by SAMS
Most e-commerce sites that sell physical goods that may be dispatched to many different places, usually have solve the problem of calculating the shipping costs, so the clients may know how much the products will cost before closing a sale.

The problem is that shipping costs may vary according to many factors like the origin and destination of the shipping, weight of the packaged products, size of the packages, etc..

This class provides a solution for calculating the cost of shipping products in Brazil either by using information obtained from locally stored files or connecting to local post office company site.

While this is a country specific solution it may serve as base of inspiration for solutions specific to other countries.

Manuel Lemos
Picture of José Carlos Medeiros
Name: José Carlos Medeiros <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 47
All time rank: 2836201 in Brazil Brazil
Week rank: 216 Up20 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (4)  
File Role Description
Accessible without login Plain text file cep.csv Data cep´s file
Plain text file class.GnarusFrete.php Class class file
Accessible without login Plain text file frete.csv Data frete price data
Accessible without login Plain text file teste.php Example example

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:700
This week:0
All time:4,687
This week:524Up