shipping goods Correios

Discussion for coding development or feature requests
Post Reply
UltraX
Posts: 11
Joined: Thu Dec 27, 2012 5:43 pm

shipping goods Correios

Post by UltraX » Fri Jan 18, 2013 9:07 am

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
Last edited by UltraX on Sat Jan 19, 2013 7:18 am, edited 1 time in total.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: shipping goods Correios

Post by leo » Fri Jan 18, 2013 9:12 am

English language based descriptions for developers would be the best.

UltraX
Posts: 11
Joined: Thu Dec 27, 2012 5:43 pm

Re: shipping goods Correios

Post by UltraX » Fri Jan 18, 2013 3:57 pm

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
Attachments
correios_freight.zip
Calculation of post office freight
(1.2 KiB) Downloaded 438 times

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: shipping goods Correios

Post by leo » Mon Jan 21, 2013 5:31 am

It would be useful to find as many descriptions as possible like this, as we do not speak Portuguese.
Attachments
Correiros_Postage_Rates_and_Delivery_Times_Calculation_Web_Services.pdf.zip
(130.81 KiB) Downloaded 432 times

UltraX
Posts: 11
Joined: Thu Dec 27, 2012 5:43 pm

Re: shipping goods Correios

Post by UltraX » Wed Jan 23, 2013 4:18 pm

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

Post Reply