Page 1 of 1

shipping goods Correios

Posted: Fri Jan 18, 2013 9:07 am
by UltraX
Hello

I wonder if there is a possibility of creating an extension using a shipping module "Correios" http://www.correios.com.br/eng/default.cfm in Brazil this is the primary means of shipping goods across the country and without it there can not use use alegrocart shop. it is a bit like the Australian Post. Can I help sending some PHP codes including other distributions made ​​to stores like OpenCart, Prestashop or for better understanding of how it works and help with testing and some information that is requested.

thanks in advance

Re: shipping goods Correios

Posted: Fri Jan 18, 2013 9:12 am
by leo
English language based descriptions for developers would be the best.

Re: shipping goods Correios

Posted: Fri Jan 18, 2013 3:57 pm
by UltraX
ok here is the library in php with coments in english from https://pagseguro.uol.com.br/v2/guia-de ... loads.html done to integrate shipping and payment module called PagSeguro and Correios freight (that is what I need) ... The attached file contains only the part used for correio freight in php.

apologize my bad english language and thanks in advance

Re: shipping goods Correios

Posted: Mon Jan 21, 2013 5:31 am
by leo
It would be useful to find as many descriptions as possible like this, as we do not speak Portuguese.

Re: shipping goods Correios

Posted: Wed Jan 23, 2013 4:18 pm
by UltraX
hi Leo

Some descriptions of how correios shipping works:

$cep_origem //example: origin Postal code (CEP) origin city: 68904-366 Macapá city (Brazil)
$cep_destino //example: Destination Postal code (CEP) destination city: 07500-000 Cidade de São Paulo (Brazil)
$peso // Total package weight in kilograms: 1,00
=====
calc link (after that we can put options):
http://ws.correios.com.br/calculador/Ca ... CepOrigem=

options:
Postal code (CEP) origin city: $cep_origem
Postal code (CEP) destination city: $cep_destino
Weight: $peso
Package shape: &ncdformato=1 // 1=box 2= Tubes/rolls 3= Envelope
length: &nvlcomprimento=25 //in centimeters
height: &nvlaltura=2 // in centimeters
width: &nvllargura=11 //in centimeters
It will be delivered only to a specific person: &scdmaopropria=n //options s (means yes) n (means no)
the client specifies the value of the good inside the package to be compensated in case of loss or damage: &nvlvalordeclarado=0
the sender receives a document confirming the delivery: &scdavisorecebimento=n //options s (means yes) n (means no)
&nCdServico=40010 // most used 40010 = SEDEX and 41106 = pac
Package diameter: &nvldiametro=0 //in centimeters
The data is returned in XML format: &StrRetorno=xml

SEDEX LINK (with no options included):

http://ws.correios.com.br/calculador/Ca ... etorno=xml

SEDEX LINK WITH OPTIONS INCLUDED (you can see xml result in browser):
http://ws.correios.com.br/calculador/Ca ... etorno=xml

PAC LINK (with no options included):
http://ws.correios.com.br/calculador/Ca ... etorno=xml

PAC WITH OPTIONS INCLUDED (you can see xml result in browser):
http://ws.correios.com.br/calculador/Ca ... etorno=xml

PS: IF PUT THE LINK ABOVE WILL BE GENERATED IN BROWSER WITH A FILE XML VALUES OF SHIPPING FOR
A PRODUCT WITH VALUES AND OPTIONS

thanks for helping