예제 #1
0
 /**
  * Method to send catalog
  *
  * @return void
  */
 public function catalog_send()
 {
     $post = JRequest::get('post');
     $Itemid = JRequest::getVar('Itemid');
     $option = JRequest::getVar('option', '', 'request', 'string');
     $model = $this->getModel('catalog');
     $post["registerDate"] = time();
     $post["email"] = $post["email_address"];
     $post["name"] = $post["name_2"];
     if ($row = $model->catalogStore($post)) {
         $redshopMail = new redshopMail();
         $redshopMail->sendCatalogRequest($row);
         $msg = JText::_('COM_REDSHOP_CATALOG_SEND_SUCCSEEFULLY');
     } else {
         $msg = JText::_('COM_REDSHOP_ERROR_CATALOG_SEND_SUCCSEEFULLY');
     }
     $this->setRedirect('index.php?option=' . $option . '&view=catalog&Itemid=' . $Itemid, $msg);
 }