Нашел где /media/zoo/applications/jbuniversal/framework/controllers/basket.php
Вот этот код в этом файле отвечает за сохранение заказа в БД, а также редирект с мессенджем:
// save item if it is valid
if ($error) {
$this->app->system->application->setUserState($sessionFormKey, serialize($post));
$this->app->jbnotify->warning(JText::_('JBZOO_CART_SUBMIT_ERRROS'));
} else {
$user = JFactory::getUser();
$nowDate = $this->app->date->create()->toSql();
$nowDateTime = new DateTime($nowDate);
$date = JHTML::_('date', 'now', JText::_('Y-m-d H:i:s')) . ' (GMT ' . ($nowDateTime->getOffset() / 3600) . ')';
$item->name = $this->type->name . ' #__ID__ / ' . $date . ($user->email ? ' / ' . $user->email : '');
$item->alias = $this->app->alias->item->getUniqueAlias($item->id, $this->app->string->sluggify($item->name));
$item->state = 1;
$item->modified = $nowDate;
$item->modified_by = $user->get('id');
$timestamp = time();
if ($timestamp < $this->app->system->session->get('ZOO_LAST_SUBMISSION_TIMESTAMP') + BasketJBUniversalController::TIME_BETWEEN_PUBLIC_SUBMISSIONS) {
$this->app->system->application->setUserState($sessionFormKey, serialize($post));
throw new AppException('You are submitting too fast, please try again in a few moments.');
}
$this->app->system->session->set('ZOO_LAST_SUBMISSION_TIMESTAMP', $timestamp);
foreach ($elementsConfig as $element) {
if (($element = $item->getElement($element['element'])) && $element instanceof iSubmissionUpload) {
$element->doUpload();
}
}
$item->getParams()->set('config.primary_category', 0);
$this->app->event->dispatcher->notify($this->app->event->create($item, 'basket:beforesave', array('item' => $item, 'appParams' => $appParams)));
$this->app->event->dispatcher->notify($this->app->event->create($submission, 'submission:beforesave', array('item' => $item, 'new' => true)));
$this->app->table->item->save($item);
$item->name = JString::str_ireplace('__ID__', $item->id, $item->name);
$this->app->table->item->save($item);
$this->app->event->dispatcher->notify($this->app->event->create($item, 'basket:saved', array('item' => $item, 'appParams' => $appParams)));
$this->app->jbcart->removeItems();
$orderDetails = JBModelOrder::model()->getDetails($item);
if ((int)$appParams->get('global.jbzoo_cart_config.payment-enabled') && $orderDetails->getTotalPrice() > 0) {
$msg = JText::_('JBZOO_CART_SUCCESS_TO_PAYMENT_MESSAGE');
$this->setRedirect(JRoute::_($this->app->jbrouter->basketPayment($Itemid, $appId, $item->id), false));
return;
} else {
$msg = JText::_('JBZOO_CART_SUCCESS_MESSAGE');
$this->setRedirect(JRoute::_($this->app->jbrouter->basketSuccess($Itemid, $appId), false), $msg);
return;
}
}