Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support Tickets


Sen

Recommended Posts

  • 4 months later...
  • Replies 233
  • Created
  • Last Reply

Top Posters In This Topic

Hi

 

I've installed this great contribution (New_Support_v1d) on osc 2.2ms2 and everything works fine, but while adding either a status, priority, department or an admin, i get the following error message:

 

Fatal error: Call to undefined function: tep_array_merge() in ../admin/support_status.php on line 36

 

also it's not possible to change the value for the second language (italian), it changes only the first language (german)

 

can you please help me?

Don't walk on the grass - smoke it :-)

Link to comment
Share on other sites

  • 6 months later...
An oldie but it may help someone else looking for the answer in faq.php take out the <ul> tag at line 86 and the </ul> tag at line 91

 

That works!!!

Never underestimate the power of stupid people, especially in groups.

Link to comment
Share on other sites

Hi

 

I've installed this great contribution (New_Support_v1d) on osc 2.2ms2 and everything works fine, but while adding either a status, priority, department or an admin, i get the following error message:

 

Fatal error: Call to undefined function: tep_array_merge() in ../admin/support_status.php on line 36

 

also it's not possible to change the value for the second language (italian), it changes only the first language (german)

 

can you please help me?

 

change tep_array_merge to array_merge.

Never underestimate the power of stupid people, especially in groups.

Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

Finally, I've been looking for this post.

 

Can anyone hlep me:

 

More info:

 

When a customer enters a comment and clicks update on:

 

When I click update on a ticket I get: 500 Internal Server Error

 

If I press back I can see that he request goes through but it's obvioulsy not meant to be like this.

 

 

Info: It happens on:

 

Support_info.php

 

I then get an "Internal Server Error' on the URL: support.php?action=update

 

The request still goes through but obviously it looks bad.

 

Please help. Thanks.

Link to comment
Share on other sites

Struggling here guys.

 

I contacted my host and they said it was probably a problem with 'permissions'. So I chmodded the above two files to 755 (and later 777) but still the same.

 

Is there anyway I can get around this error? As I say, it is working, but only after you go back.

 

Here's the support.php file:

<?php
/*
 $Id: support.php,v 1.3 2003/02/05 12:55:51 puddled Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 Puddled Computer Services
 Contributed by Puddled Computer services
 http://www.puddled.co.uk

 Author David Howarth
 Email [email protected]

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 $default_status_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_SUPPORT_TICKET_STATUS'");
 $default_status = tep_db_fetch_array($default_status_query);
 $default_admin_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_SUPPORT_ADMIN_ID'");
 $default_admin = tep_db_fetch_array($default_admin_query);
 $default_priority_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_SUPPORT_TICKET_PRIORITY'");
 $default_priority = tep_db_fetch_array($default_priority_query);
  $default_department_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_SUPPORT_TICKET_DEPARTMENT'");
 $default_department = tep_db_fetch_array($default_department_query);


 if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
  case 'insert':
  case 'update':
  //  $link_id = tep_db_prepare_input($HTTP_POST_VARS['link_id']);
	$support_dept = tep_db_prepare_input($HTTP_POST_VARS['support_dept']);
	$support_priority = tep_db_prepare_input($HTTP_POST_VARS['support_priority']);
	$support_user_name = tep_db_prepare_input($HTTP_POST_VARS['support_user_name']);
	$support_user_email = tep_db_prepare_input($HTTP_POST_VARS['support_user_email']);
//		$support_comapny = tep_db_prepare_input($HTTP_POST_VARS['support_company']);
	$support_domain = tep_db_prepare_input($HTTP_POST_VARS['support_domain']);
	//$support_domain = escape_all($support_domain);
	$support_domain = eregi_replace('\'','\\\'', $support_domain);
			$support_domain = eregi_replace('<','<', $support_domain);


	$support_text = tep_db_prepare_input($HTTP_POST_VARS['ticket_comments']);
	$support_text = eregi_replace('\'','\\\'', $support_text);
			$support_text = eregi_replace('<','<', $support_text);


//	  $support_alternate_email = tep_db_prepare_input($HTTP_POST_VARS['support_alternate_email']);
	$support_orders = tep_db_prepare_input($HTTP_POST_VARS['support_orders']);
	$support_orders = eregi_replace('\'','\\\'', $support_orders);
			$support_orders = eregi_replace('<','<', $support_orders);


	$support_error = false;
// error checking goes in here
// not present at moment
  if (!$support_error) {

	if ($HTTP_GET_VARS['action'] == 'insert') {

  tep_db_query("
INSERT   INTO `" . TABLE_SUPPORT_TICKETS . "` SET 
`customers_domain`	= '$support_domain',
`customers_id`			= '$customer_id',
`customers_orders`	= '$support_orders',
`ticket_date`				= now();
");

$ticket_id = tep_db_insert_id();   	

  tep_db_query("
INSERT   INTO `" . TABLE_SUPPORT_TICKETS_HISTORY . "` SET 
`ticket_id`					= '$ticket_id',
`ticket_status`			= '1',
`last_modified`			= NOW(),
`department_id`			='$support_dept',
`admin_id`					='". $default_admin['configuration_value'] . "',
`priority_id`				='$support_priority',
`ticket_comments`		='$support_text',
`submitted_by`			= 'customer',
`user_id`						= '0'");

	  if ($HTTP_POST_VARS['notify'] == 'on') {
		tep_db_query("INSERT INTO " . TABLE_FAQ . " VALUES ('', '0', '0', '" . $support_text . "', '', now())");
	  }

   } elseif ($HTTP_GET_VARS['action'] == 'update') {

	$support_admin = tep_db_prepare_input($HTTP_POST_VARS['support_admin']);
	$ticket_id = tep_db_prepare_input($HTTP_POST_VARS['ticket_id']);


  tep_db_query("
INSERT   INTO `" . TABLE_SUPPORT_TICKETS_HISTORY . "` SET 
`ticket_id`					= '$ticket_id',
`ticket_status`			= '1',
`last_modified`			= NOW(),
`department_id`			='$support_dept',
`admin_id`					='". $default_admin['configuration_value'] . "',
`priority_id`				='$support_priority',
`ticket_comments`		='$support_text',
`submitted_by`			= 'customer',
`user_id`						= '0'");


	// tep_db_query(TABLE_SUPPORT_TICKETS, $sql_data_array, 'updateee', 'ticket_id = \'' . $ticket_id . '\'');
   }

	  // now check to see if the customer would like this question considered for the FAQ section


	  // now send email to customer

		require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SUPPORT_EMAILS);
	   $email_text = EMAIL_TEXT_TICKET_OPEN;
	   $email_text .= EMAIL_THANKS_OPEN . EMAIL_TEXT_OPEN . EMAIL_CONTACT_OPEN . EMAIL_WARNING_OPEN;
	   tep_mail($support_user_name, $support_user_email, EMAIL_SUBJECT_OPEN . ' #' . $ticket_id, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
	  // send email to alternate address
//		  if (strlen($support_alternate_email) > 0) {
//			   $email_text = EMAIL_TEXT_TICKET_OPEN;
//				$email_text .= EMAIL_THANKS_OPEN . EMAIL_TEXT_OPEN . EMAIL_CONTACT_OPEN . EMAIL_WARNING_OPEN;
//				tep_mail($support_user_name, $support_alternate_email, EMAIL_SUBJECT_OPEN . ' #' . $ticket_id, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
//			 }

	  // now send an email to the default administrator to let them know of new ticket
//			 $default_admin_email = tep_db_query("SELECT admin_id FROM " . TABLE_SUPPORT_TICKETS . " where ticket_id = '" . $HTTP_GET_VARS['ticket_id'] . "' and customers_id = '" . $customer_id . "'");
//			 $default_email = tep_db_fetch_array($default_admin_email);
		 $admin_email_query = tep_db_query("SELECT support_assign_email, support_assign_name FROM " . TABLE_SUPPORT_ASSIGN . " where support_assign_id = '" . $default_admin['configuration_value'] . "' and language_id = '" . $languages_id . "'");
		 $admin_email = tep_db_fetch_array($admin_email_query);
		 $email_text_admin = EMAIL_TEXT_TICKET_ADMIN;
		 $email_text_admin .= EMAIL_THANKS_ADMIN . EMAIL_TEXT_ADMIN . EMAIL_CONTACT_ADMIN . EMAIL_WARNING_ADMIN;
		 tep_mail($admin_email['support_assign_name'], $admin_email['support_assign_email'], EMAIL_SUBJECT_UPDATE .' #' . $ticket_id, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

	  // redirect to confirmation
		tep_redirect(tep_href_link(FILENAME_SUPPORT,  'action=sent'));
	} 

	else {
//	  $HTTP_GET_VARS['action'] = 'new';
	}
	break;
   case 'default':
   tep_redirect(tep_href_link(FILEANME_DEFAULT));
   break;
}
 }
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SUPPORT);
 $breadcrumb->add(NAvb script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_FAQ) . '\')">[?]</a>'; ?>  </td>
		<td class="main"><?php echo tep_draw_checkbox_field('notify', '', true); ?></td>
	  </tr>
	  <tr>
		<td class="main" colspan=2> </td>
	  </tr>
	  <tr>
		<td class="main"> </td>
		<td class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
	  </tr></form>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td colspan="2" class="main" valign="top" nowrap align="center"></td>
	  </tr>
	</table></td>
  </tr>
<?php
}
?>



	</table></td>
  </tr>

</table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Cheers

Link to comment
Share on other sites

  • 1 year later...
  • 3 years later...

i donot know if some having problem same like me when customer open a ticket and sbmit ticket i receive it but when they open ticket history click on view open ticket the only thing is missing ticket comments and the '' No information submitted " visible where the admin side i can clearly see the tickets scomments update them or close them but no matter how after reading a hundred times the coding i cant find the error also i am not expert in php any one kindly help me

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...