ola, meu codigo esta dando erro e ja tentei de tudo e nada da certo vcs poderiam me ajudar
o codigo e esse
<?php
class SHIPPING_PAC extends ISC_SHIPPING
( da erro nessa linha
///////////////////////////////////////////////
function SHIPPING_PAC())
parent::__construct()(
$this->_name = "PAC";
$this->_image = "pac.gif";
$this->_description = "Mais econômico e com código de rastreamento.";
$this->_help = "Modulo de Envio por PAC - Mais rápido e mais econômico.";
$this->_enabled = $this->CheckEnabled();
$this->_countries = array("all");
$this->_showtestlink = false;
}
//////////////////////////////////////////////
public function SetCustomVars()
{
$this->_variables['displayname'] = array(
'name' => 'PAC',
'type' => 'textbox',
'help' => 'Modulo de Envio Por PAC. (Mais economia e código de rastreamento)',
'default' => $this->GetName(),
'savedvalue' => array(),
'required' => true);
}
/////////////////////////////////
function GetServiceQuotes()
{
$QuoteList = array();
$services = "PAC";
if(!is_array($services) && $services != "") {
$services = array($services);
}
foreach($services as $service) {
// Set the service type
$this->_deliverytype = $service;
// Next actually retrieve the quote
$result = $this->GetQuote();
// Was it a valid quote?
if(is_object($result)) {
$QuoteList[] = $result;
// Invalid quote, log the error
} else {
foreach($this->GetErrors() as $error) {
$GLOBALS['ISC_CLASS_LOG']->LogSystemError(array('shipping', $this->_name), $this->_deliverytypes[$delivery_type].": " .GetLang('ShippingQuoteError'), $error);
}
$this->ResetErrors();
}
}
return $QuoteList;
}
//////////////////////////////////////////////
function GetQuote()
{
////////////////////////////////////////////////////////
$total = $count = 0;
if (isset($_SESSION['CART']['ITEMS'])) {
foreach ($_SESSION['CART']['ITEMS'] as $item) {
$total += $item['product_price'] * $item['quantity'];
}
}
//////////////////////////////////////////////////////////////
$this->_origem = GetConfig('CompanyZip');
$sCepOrigem = eregi_replace("([^0-9])","",$this->_origem);
$this->_destino = $this->_destination_zip;
$sCepDestino = eregi_replace("([^0-9])","",$this->_destino);
$this->_peso = number_format(max(ConvertWeight($this->_weight, 'kgs'), 0.1), 1);
////////////////////////////////////////////////////////
$total = str_replace('.',',',$total);
$url ="http://shopping.correios.com.br/wbm/shopping/script/CalcPrecoPrazo.aspx?"
."nCdEmpresa=&"
."sDsSenha=&"
."sCepOrigem=".$sCepOrigem."&"
."sCepDestino=".$sCepDestino."&"
."nVlPeso=".$this->_peso."&"
."nCdFormato=1&"
."nVlComprimento=20&"
."nVlAltura=20&"
."nVlLargura=20&"
."sCdMaoPropria=N&"
."nVlValorDeclarado=".$total."&"
."sCdAvisoRecebimento=N&"
."nCdServico=41106&"
."nVlDiametro=0&"
."StrRetorno=xml";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 2);
$html1 = curl_exec ($ch);
curl_close ($ch);
$html = explode('<Valor>', $html1);
$html2 = explode('</Valor>', $html[1]);
$this->_shippingcost = str_replace(',','.',$html2[0]);;
if($this->_shippingcost > "0") {
$fr_quote = new ISC_SHIPPING_QUOTE($this->GetId(), $this->GetName(), $this->_shippingcost, 'Entrega Economica', 9);
return $fr_quote;
} else {
return false;
}
}
/////////////////////////////////////////////
}
?>
Parse error: parse error, unexpected ')', expecting '{' on line 4
Criado por ubaldino, Oct 18 2011 10:40 AM
Não há respostas para este tópico
1 usuário(s) está(ão) lendo este tópico
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)











