Back to PhocacartOrder class

Method saveOrderTaxRecapitulation

public
saveOrderTaxRecapitulation
(mixed $d)

Method saveOrderTaxRecapitulation - Source code

public function saveOrderTaxRecapitulation($d)
{
    $app = Factory::getApplication();
    $db = Factory::getDbo();
    $row = Table::getInstance('PhocacartOrderTaxRecapitulation', 'Table', array());
    //$d['published']				= 1;
    if (!$row->bind($d)) {
        //throw new Exception($row->getError());
        $msg = Text::_($row->getError());
        $app->enqueueMessage($msg, 'error');
        return false;
    }
    if (!$row->check()) {
        //throw new Exception($row->getError());
        $msg = Text::_($row->getErrorMsg());
        $app->enqueueMessage($msg, 'error');
        return false;
    }
    if (!$row->store()) {
        //throw new Exception($row->getError());
        $msg = Text::_($row->getErrorMsg());
        $app->enqueueMessage($msg, 'error');
        return false;
    }
    return true;
}