Internal overhaul of Cart/Checkout and other minor fixes

This commit is contained in:
Deon George
2013-12-02 15:16:28 +11:00
parent f8a5b153cf
commit 06b87c5135
26 changed files with 256 additions and 228 deletions

View File

@@ -127,8 +127,18 @@ class Controller_Reseller_SSL extends Controller_SSL {
private function add_edit($id=NULL,$output='') {
$sco = ORM::factory('SSL_CA',$id);
if ($_POST AND $sco->values($_POST)->changed() AND ! ($this->save($sco)))
$sco->reload();
if ($this->request->post()) {
if (! $sco->account_id)
$sco->account_id = (string)Auth::instance()->get_user();
// Set our values, so that our filters have data
$sco->values($this->request->post());
// To trigger our filter to get the correct parent
$sco->parent_ssl_ca_id = -1;
if ($sco->changed() AND ! $this->save($sco))
$sco->reload();
}
return View::factory('ssl/reseller/add_edit')
->set('o',$sco);