Em Andamento

Opencart Modification

I have a modified shipping extension for opencart, at checkout the mod takes a start postcode that is set in the extension's admin panel(normally store postcode) within shipping modules, it then takes the delivery address postcode and makes a call to google to get the distance between both postcodes, the distance is returned by google and then used to work out shipping costs based on the distance. I need this modified so that rather than use the store postcode set in the admin it gets the billing address postcode and uses that as the start point and the delivery address as the end point. I am sure the billing postcode will be stored in a session variable. The fuction to get the distance is below.

//If this user wants to calculate by address / city

if($this->config->get ( 'use_address_calculation' ) == true)

{

$store_address = str_replace("\n", ",", $this->config->get ( 'config_address' ));

$store_address = str_replace("\r", "", $store_address);

$string = trim($store_address). '&destinations=' . trim ( str_replace ( " ", "", $address ['address_1'].','.$address ['city'] ));

$sResponse = $this->curl_request ( '[url removed, login to view]', 'origins=' . str_replace ( " ", "",$store_address) . '&destinations=' . trim ( str_replace ( " ", "", $address ['address_1'].','.$address ['city'] ) ) . '&mode=driving&units=' . $this->config->get ( 'zip_distance_units' ) . '&sensor=false' );

$oJSON = json_decode ( $sResponse );

}else

{

$sResponse = $this->curl_request ( '[url removed, login to view]', 'origins=' . str_replace ( " ", "",$this->config->get ( 'zip_distance_origin' )) . '&destinations=' . trim ( str_replace ( " ", "", $address ['postcode'] ) ) . '&mode=driving&units=' . $this->config->get ( 'zip_distance_units' ) . '&sensor=false' );

$oJSON = json_decode ( $sResponse );

}

Habilidades: PHP, Arquitetura de software

Veja mais: opencart config, r architecture, opencart google checkout extension, google checkout for opencart, shipping extension, opencart shipping, opencart extension, Opencart API, extension opencart, driving distance, distance sensor, google api panel, google distance software, json string, opencart session, calculate distance postcode, php api session, point modification, opencart extension modules, google postcode

Acerca do Empregador:
( 67 comentários ) Argyll, United Kingdom

ID do Projeto: #4521787

Concedido a:

dixitnaveen333

Opencart expert here with more than 3 dozen projects under my belt. Lets do it.

£36 GBP em 1 dia
(0 Comentários)
0.0

3 freelancers estão ofertando em média £40 para esse trabalho

gslogics123

Ready to start right away Thank you

£42 GBP in 0 dias
(184 Comentários)
7.2
opencartBOSS

Here is genuine opencart developer,plz check pmb.

£42 GBP in 3 dias
(28 Comentários)
5.1