<?php


class ModelShippingfretedinamico extends Model {

    function getQuote($address, $pProduct = Array()) {
        $quote_data = array();
        $quote_data['fretedinamico'] = array(
            'code'         => 'fretedinamico.fretedinamico',
        	'title'        => $this->config->get('fretedinamico_subopcao'),
        	'cost'         => round((float)$this->config->get('fretedinamico_valcalc'), 2, PHP_ROUND_HALF_UP),
		    'text'         => $this->config->get('fretedinamico_valvisu'),
        );

        $method_data = array(
            'code'       => 'fretedinamico',
        	'title'      => $this->config->get('fretedinamico_opcao'),
        	'quote'      => $quote_data,
        	'sort_order' => $this->config->get('fretedinamico_sort_order'),
            'error'      => false
        );

        return $method_data;
        
    }
}
