search for the function getRsCorreiosResponse( and replace it accordingly:
- Code: Select all
//stAn:
static $_mycache;
protected function getRsCorreiosResponse(VirtueMartCart $cart, $method, $cart_prices)
{
$shipment = new RsCorreios();
$hash = array($method->cepOrigem,
$this->getZipCode($cart),
$this->getOrderWidth($cart),
$this->getOrderLength($cart),
$method->formato,
$method->servico,
$this->getDeclaredValue($method, $cart_prices),
$this->getOwnHand($method),
$this->getDeliveryWarning($method));
$shash = serialize($hash);
if (!empty(self::$_mycache[$shash]))
return self::$_mycache[$shash];
$response = $shipment
->setCepOrigem($method->cepOrigem)
->setCepDestino($this->getZipCode($cart))
->setLargura($this->getOrderWidth($cart))
->setComprimento($this->getOrderLength($cart))
->setAltura($this->getOrderHeight($cart))
->setPeso($this->getOrderWeight($cart))
->setFormatoDaEncomenda($method->formato)
->setServico($method->servico)
->setValorDeclarado($this->getDeclaredValue($method, $cart_prices))
->setMaoPropria($this->getOwnHand($method))
->setAvisoDeRecebimento($this->getDeliveryWarning($method))
->dados();
self::$_mycache[$shash] = $response;
return $response;
}
Best regards,
Stan