Back to PhocacartOrder class

Method saveOrderTotal

public
saveOrderTotal
(mixed $d)

Method saveOrderTotal - Source code

public function saveOrderTotal($d)
{
    $app = Factory::getApplication();
    $db = Factory::getDbo();
    $row = Table::getInstance('PhocacartOrderTotal', '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;
}