Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support Tickets


Sen

Recommended Posts

  • Replies 233
  • Created
  • Last Reply

Top Posters In This Topic

Fatal error: Call to undefined function: tep_get_support_status_name() in /home/dynamic2/public_html/shop/admin/support_status.php on line 222

 

 

It displays the status of the ticket but still show's the error

Link to comment
Share on other sites

Is a great program i would like to thanks everyone to work so hard.

Well my problem here is at the user help once sign in click support / helpdesk i get this error:

 

1064 - You have an error in your SQL syntax near 'select * from support_tickets where customers_id = '2' and ticket_status='1'' at line 1

 

select count(select * from support_tickets where customers_id = '2' and ticket_status='1' order by ticket_date DESC) as total

 

[TEP STOP]

 

Then in the admin section i can't see the menu in the left hand side once you click any properties of any menu in the main index.php admin.

 

:roll:

help me..

Link to comment
Share on other sites

i get this error when a user go to helpdesk.

1064 - You have an error in your SQL syntax near 'select * from support_tickets where customers_id = '2' and ticket_status='1'' at line 1

 

select count(select * from support_tickets where customers_id = '2' and ticket_status='1' order by ticket_date DESC) as total

 

[TEP STOP]

 

can anybody help, thanks :(

Link to comment
Share on other sites

I'm running support system v2.2m1121-18h and i have update the database to add coustomer_ID. Once user log in click pd_ticket_tracking.php

i get this error:

1064 - You have an error in your SQL syntax near 'select * from pd_ticket_data where customers_id ='2') as total ' at line 1

 

select count(select * from pd_ticket_data where customers_id ='2') as total

 

[TEP STOP]

 

pd_ticket_tracking.php

Link to comment
Share on other sites

I have the same error. I've looked all over and it seems the helpdesk is not campatable with MS2/CVS. ANyone plan to update this contrib ? PLEASE !!..

 

Dave

Link to comment
Share on other sites

Hi,

 

I have problem, when I submit new ticket I get;

 

Warning: mail() [function.mail]: SMTP server response: 503 5.0.0 Need RCPT (recipient) in C:Program FilesApache GroupApache2htdocscatalogincludesclassesemail.php on line 483

 

Warning: Cannot modify header information - headers already sent by (output started at C:Program FilesApache GroupApache2htdocscatalogincludesclassesemail.php:483) in C:Program FilesApache GroupApache2htdocscatalogincludesfunctionsgeneral.php on line 18

 

Mail arrives OK but how to avoid this error message, when I disable line 483 I do not receive mail but next page it shows nicely.

Link to comment
Share on other sites

My file looks like this:

 

<?php

 

class email {

var $html;

var $text;

var $output;

var $html_text;

var $html_images;

var $image_types;

var $build_params;

var $attachments;

var $headers;

 

function email($headers = '') {

if ($headers == '') $headers = array();

 

$this->html_images = array();

$this->headers = array();

 

if (EMAIL_LINEFEED == 'CRLF') {

$this->lf = "rn";

} else {

$this->lf = "n";

}

 

/**

* If you want the auto load functionality

* to find other mime-image/file types, add the

* extension and content type here.

*/

 

$this->image_types = array('gif' => 'image/gif',

'jpg' => 'image/jpeg',

'jpeg' => 'image/jpeg',

'jpe' => 'image/jpeg',

'bmp' => 'image/bmp',

'png' => 'image/png',

'tif' => 'image/tiff',

'tiff' => 'image/tiff',

'swf' => 'application/x-shockwave-flash');

 

$this->build_params['html_encoding'] = 'quoted-printable';

$this->build_params['text_encoding'] = '7bit';

$this->build_params['html_charset'] = constant('CHARSET');

$this->build_params['text_charset'] = constant('CHARSET');

$this->build_params['text_wrap'] = 998;

 

/**

* Make sure the MIME version header is first.

*/

 

$this->headers[] = 'MIME-Version: 1.0';

 

reset($headers);

while (list(,$value) = each($headers)) {

if (tep_not_null($value)) {

$this->headers[] = $value;

}

}

}

 

/**

* This function will read a file in

* from a supplied filename and return

* it. This can then be given as the first

* argument of the the functions

* add_html_image() or add_attachment().

*/

 

function get_file($filename) {

$return = '';

 

if ($fp = fopen($filename, 'rb')) {

while (!feof($fp)) {

$return .= fread($fp, 1024);

}

fclose($fp);

 

return $return;

} else {

return false;

}

}

 

/**

* Function for extracting images from

* html source. This function will look

* through the html code supplied by add_html()

* and find any file that ends in one of the

* extensions defined in $obj->image_types.

* If the file exists it will read it in and

* embed it, (not an attachment).

*

* Function contributed by Dan Allen

*/

 

function find_html_images($images_dir) {

// Build the list of image extensions

while (list($key, ) = each($this->image_types)) {

$extensions[] = $key;

}

 

preg_match_all('/"([^"]+.(' . implode('|', $extensions).'))"/Ui', $this->html, $images);

 

for ($i=0; $i<count($images[1]); $i++) {

if (file_exists($images_dir . $images[1][$i])) {

$html_images[] = $images[1][$i];

$this->html = str_replace($images[1][$i], basename($images[1][$i]), $this->html);

}

}

 

if (tep_not_null($html_images)) {

// If duplicate images are embedded, they may show up as attachments, so remove them.

$html_images = array_unique($html_images);

sort($html_images);

 

for ($i=0; $i<count($html_images); $i++) {

if ($image = $this->get_file($images_dir . $html_images[$i])) {

$content_type = $this->image_types[substr($html_images[$i], strrpos($html_images[$i], '.') + 1)];

$this->add_html_image($image, basename($html_images[$i]), $content_type);

}

}

}

}

 

/**

* Adds plain text. Use this function

* when NOT sending html email

*/

 

function add_text($text = '') {

$this->text = $text;

}

 

/**

* Adds a html part to the mail.

* Also replaces image names with

* content-id's.

*/

 

function add_html($html, $text = NULL, $images_dir = NULL) {

$this->html = $html;

$this->html_text = $text;

 

if (isset($images_dir)) $this->find_html_images($images_dir);

}

 

/**

* Adds an image to the list of embedded

* images.

*/

 

function add_html_image($file, $name = '', $c_type='application/octet-stream') {

$this->html_images[] = array('body' => $file,

'name' => $name,

'c_type' => $c_type,

'cid' => md5(uniqid(time())));

}

 

/**

* Adds a file to the list of attachments.

*/

 

function add_attachment($file, $name = '', $c_type='application/octet-stream', $encoding = 'base64') {

$this->attachments[] = array('body' => $file,

'name' => $name,

'c_type' => $c_type,

'encoding' => $encoding);

}

 

/**

* Adds a text subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_text_part(&$obj, $text) {

function add_text_part(&$obj, $text) {

$params['content_type'] = 'text/plain';

$params['encoding'] = $this->build_params['text_encoding'];

$params['charset'] = $this->build_params['text_charset'];

 

if (is_object($obj)) {

return $obj->addSubpart($text, $params);

} else {

return new mime($text, $params);

}

}

 

/**

* Adds a html subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_html_part(&$obj) {

function add_html_part(&$obj) {

$params['content_type'] = 'text/html';

$params['encoding'] = $this->build_params['html_encoding'];

$params['charset'] = $this->build_params['html_charset'];

 

if (is_object($obj)) {

return $obj->addSubpart($this->html, $params);

} else {

return new mime($this->html, $params);

}

}

 

/**

* Starts a message with a mixed part

*/

 

/* HPDL PHP3 */

// function &add_mixed_part() {

function add_mixed_part() {

$params['content_type'] = 'multipart/mixed';

 

return new mime('', $params);

}

 

/**

* Adds an alternative part to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_alternative_part(&$obj) {

function add_alternative_part(&$obj) {

$params['content_type'] = 'multipart/alternative';

 

if (is_object($obj)) {

return $obj->addSubpart('', $params);

} else {

return new mime('', $params);

}

}

 

/**

* Adds a html subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_related_part(&$obj) {

function add_related_part(&$obj) {

$params['content_type'] = 'multipart/related';

 

if (is_object($obj)) {

return $obj->addSubpart('', $params);

} else {

return new mime('', $params);

}

}

 

/**

* Adds an html image subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_html_image_part(&$obj, $value) {

function add_html_image_part(&$obj, $value) {

$params['content_type'] = $value['c_type'];

$params['encoding'] = 'base64';

$params['disposition'] = 'inline';

$params['dfilename'] = $value['name'];

$params['cid'] = $value['cid'];

 

$obj->addSubpart($value['body'], $params);

}

 

/**

* Adds an attachment subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_attachment_part(&$obj, $value) {

function add_attachment_part(&$obj, $value) {

$params['content_type'] = $value['c_type'];

$params['encoding'] = $value['encoding'];

$params['disposition'] = 'attachment';

$params['dfilename'] = $value['name'];

 

$obj->addSubpart($value['body'], $params);

}

 

/**

* Builds the multipart message from the

* list ($this->_parts). $params is an

* array of parameters that shape the building

* of the message. Currently supported are:

*

* $params['html_encoding'] - The type of encoding to use on html. Valid options are

* "7bit", "quoted-printable" or "base64" (all without quotes).

* 7bit is EXPRESSLY NOT RECOMMENDED. Default is quoted-printable

* $params['text_encoding'] - The type of encoding to use on plain text Valid options are

* "7bit", "quoted-printable" or "base64" (all without quotes).

* Default is 7bit

* $params['text_wrap'] - The character count at which to wrap 7bit encoded data.

* Default this is 998.

* $params['html_charset'] - The character set to use for a html section.

* Default is iso-8859-1

* $params['text_charset'] - The character set to use for a text section.

* - Default is iso-8859-1

*/

 

/* HPDL PHP3 */

// function build_message($params = array()) {

function build_message($params = '') {

if ($params == '') $params = array();

 

if (count($params) > 0) {

reset($params);

while(list($key, $value) = each($params)) {

$this->build_params[$key] = $value;

}

}

 

if (tep_not_null($this->html_images)) {

reset($this->html_images);

while (list(,$value) = each($this->html_images)) {

$this->html = str_replace($value['name'], 'cid:' . $value['cid'], $this->html);

}

}

 

$null = NULL;

$attachments = ((tep_not_null($this->attachments)) ? true : false);

$html_images = ((tep_not_null($this->html_images)) ? true : false);

$html = ((tep_not_null($this->html)) ? true : false);

$text = ((tep_not_null($this->text)) ? true : false);

 

switch (true) {

case (($text == true) && ($attachments == false)):

/* HPDL PHP3 */

// $message =& $this->add_text_part($null, $this->text);

$message = $this->add_text_part($null, $this->text);

break;

case (($text == false) && ($attachments == true) && ($html == false)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

case (($text == true) && ($attachments == true)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

$this->add_text_part($message, $this->text);

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

case (($html == true) && ($attachments == false) && ($html_images == false)):

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $message =& $this->add_alternative_part($null);

$message = $this->add_alternative_part($null);

$this->add_text_part($message, $this->html_text);

$this->add_html_part($message);

} else {

/* HPDL PHP3 */

// $message =& $this->add_html_part($null);

$message = $this->add_html_part($null);

}

break;

case (($html == true) && ($attachments == false) && ($html_images == true)):

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $message =& $this->add_alternative_part($null);

$message = $this->add_alternative_part($null);

$this->add_text_part($message, $this->html_text);

/* HPDL PHP3 */

// $related =& $this->add_related_part($message);

$related = $this->add_related_part($message);

} else {

/* HPDL PHP3 */

// $message =& $this->add_related_part($null);

// $related =& $message;

$message = $this->add_related_part($null);

$related = $message;

}

$this->add_html_part($related);

 

for ($i=0; $i<count($this->html_images); $i++) {

$this->add_html_image_part($related, $this->html_images[$i]);

}

break;

case (($html == true) && ($attachments == true) && ($html_images == false)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $alt =& $this->add_alternative_part($message);

$alt = $this->add_alternative_part($message);

$this->add_text_part($alt, $this->html_text);

$this->add_html_part($alt);

} else {

$this->add_html_part($message);

}

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

case (($html == true) && ($attachments == true) && ($html_images == true)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

 

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $alt =& $this->add_alternative_part($message);

$alt = $this->add_alternative_part($message);

$this->add_text_part($alt, $this->html_text);

/* HPDL PHP3 */

// $rel =& $this->add_related_part($alt);

$rel = $this->add_related_part($alt);

} else {

/* HPDL PHP3 */

// $rel =& $this->add_related_part($message);

$rel = $this->add_related_part($message);

}

$this->add_html_part($rel);

 

for ($i=0; $i<count($this->html_images); $i++) {

$this->add_html_image_part($rel, $this->html_images[$i]);

}

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

}

 

if ( (isset($message)) && (is_object($message)) ) {

$output = $message->encode();

$this->output = $output['body'];

 

reset($output['headers']);

while (list($key, $value) = each($output['headers'])) {

$headers[] = $key . ': ' . $value;

}

 

$this->headers = array_merge($this->headers, $headers);

 

return true;

} else {

return false;

}

}

 

/**

* Sends the mail.

*/

 

function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') {

$to = (($to_name != '') ? '"' . $to_name . '" <' . $to_addr . '>' : $to_addr);

$from = (($from_name != '') ? '"' . $from_name . '" <' . $from_addr . '>' : $from_addr);

 

if (is_string($headers)) {

$headers = explode($this->lf, trim($headers));

}

 

for ($i=0; $i<count($headers); $i++) {

if (is_array($headers[$i])) {

for ($j=0; $j<count($headers[$i]); $j++) {

if ($headers[$i][$j] != '') {

$xtra_headers[] = $headers[$i][$j];

}

}

}

 

if ($headers[$i] != '') {

$xtra_headers[] = $headers[$i];

}

}

 

if (!isset($xtra_headers)) {

$xtra_headers = array();

}

 

if (EMAIL_TRANSPORT == 'smtp') {

return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));

} else {

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));

}

}

 

/**

* Use this method to return the email

* in message/rfc822 format. Useful for

* adding an email to another email as

* an attachment. there's a commented

* out example in example.php.

*

* string get_rfc822(string To name,

* string To email,

* string From name,

* string From email,

* [string Subject,

* string Extra headers])

*/

 

function get_rfc822($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') {

// Make up the date header as according to RFC822

$date = 'Date: ' . date('D, d M y H:i:s');

$to = (($to_name != '') ? 'To: "' . $to_name . '" <' . $to_addr . '>' : 'To: ' . $to_addr);

$from = (($from_name != '') ? 'From: "' . $from_name . '" <' . $from_addr . '>' : 'From: ' . $from_addr);

 

if (is_string($subject)) {

$subject = 'Subject: ' . $subject;

}

 

if (is_string($headers)) {

$headers = explode($this->lf, trim($headers));

}

 

for ($i=0; $i<count($headers); $i++) {

if (is_array($headers[$i])) {

for ($j=0; $j<count($headers[$i]); $j++) {

if ($headers[$i][$j] != '') {

$xtra_headers[] = $headers[$i][$j];

}

}

}

 

if ($headers[$i] != '') {

$xtra_headers[] = $headers[$i];

}

}

 

if (!isset($xtra_headers)) {

$xtra_headers = array();

}

 

$headers = array_merge($this->headers, $xtra_headers);

 

return $date . $this->lf . $from . $this->lf . $to . $this->lf . $subject . $this->lf . implode($this->lf, $headers) . $this->lf . $this->lf . $this->output;

}

}

?>

Link to comment
Share on other sites

I have succesfully installed this mod except for one problem. When you go to the faq, the bottom table with the answers is cut off on the right side. Can anyone tell me what I need to edit. I figure irs a messed up table setting, but do not know which one.

Thanks

Link to comment
Share on other sites

Was there any solution to this problem when using both SID Killer and Support Desk.

 

Muggity Wrote:

Click on 'Open a ticket' (bottom of column_left) you are taken to the login page (normal), enter login info and click on 'Sign In', you are returned to the index page. You should be sent to the ticket submission page at this point. Note that when you are returned to the index page, you are logged in, but if you click again on the 'Open a ticket', 'Track a ticket' or (curiously) 'Product Notifications' in the account info box, you are sent back to the login page.  

 

Also, if you click on a product link from the index page after being logged in, you are kicked out of being logged on when you are taken to the product_info page.  

 

If I remove the SID killer code changes mentioned above, everything works as it should but, of course, I have SIDs in search engine results.

_________________

 

I have the same problem but dont really want to do-away with SID Killer.

 

Cheers MaxiDVD :lol:

Link to comment
Share on other sites

I have succesfully installed this mod except for one problem. When you go to the faq, the bottom table with the answers is cut off on the right side. Can anyone tell me what I need to edit. I figure its a messed up table setting, but do not know which one.

Thanks

Sorry about reposting this but it has me stumped. I've tried changing different things but to no avail.

Here is a screenshot:

faq.GIF

Can anyone point me to where I need to go?

Thanks

Link to comment
Share on other sites

Have you tried working from the output?

 

View the source code via your browser.

Find the text from one of the cells that is being cut off.

Work backwards through the code to find where the error is.

Find that error in the php code.

 

Looks like it could be one (or more) of the table / cell settings.

 

Jon.

Link to comment
Share on other sites

 

I have it installed on a MS1 snapshot and it works fine however ive loaded it into todays snapshot and it all seems to be ok except on the helpdesk.php file in the catalog once youve logged in comes up with:

 

1064 - You have an error in your SQL syntax near ') as total ' at line 1

 

select count() as total

 

[TEP STOP]

 

just after the helpdesk menu is displayed.

 

anyone have any ideas on what could be causing this?

 

I believe its in includes/modules. support_track.php approx line 34

 

$history_query_raw = "select * from " . TABLE_SUPPORT_TICKETS . " where customers_id = '" . $customer_id . "' and ". $open_closed ." order by " . $sort . $up_down . "";

 

I doubt MS2 uses "and" anymore or "select * from" with the "*" there.

 

Been messing with it a lil and now i get errors.

Changed the first few parts to:

 $history_query_raw = ("select customers_id from " . TABLE_ORDERS . " where orders_id =

From here i try:

" where orders_id = " . && ." $open_closed ".

etc etc

but after this i dunno how to complete the code to see what works or what new osc/php language means the same.

 

Does look like a few "select * from" also "and" code changes thru the system will have to be made.

Just need a lil experienced help to see where i can make the changes for MS2.

Link to comment
Share on other sites

here's my error ...

1064 - You have an error in your SQL syntax near 'select * from support_tickets where customers_id = '2' and ticket_status='1' at line 2



select count( select * from support_tickets where customers_id = '2' and ticket_status='1' order by ticket_date DESC ) as total

 

looks like it's getting jammed up.

 

I've never used this before but wanted to compare to Harald's helpdesk.

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

ugh ... now here we go ... we just don't have tep_blahblah disappearing we have classes that get you now too.

 

My solution ... I copied my old version of "split_page_results.php" (I just grabbed whatever was laying about ... it was a loaded one just in case). and renamed it "split_page_results_old.php" of course I copied it to my classes folder. Then in helpdesk.php added "require(DIR_WS_CLASSES . 'split_page_results.php');" to the top of the file (could have slapped it in the application_top.php file but didn't want to add more weight to the cart than was needed.

 

And guess what :P it worked ... dam who would have thought "$history_numrows" was the culprit.

 

now ... I guess it's not a surprise that developers get discouraged. :?

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

i have only one problem error, when i click Tickets from the admin area i get this error:

Fatal error: Call to undefined function: tep_array_merge() in /home/XXXXX/public_html/shop/admin/ticket_view.php on line 264

 

any ideas on howto fix this error

 

BTW, i am running MS2 ans Support Ticket System VS1.0

 

thankx in advance

Link to comment
Share on other sites

Searching for *tep_array_merge* came up with this link among others.

 

Good luck,

Matt

 

thanx alot the admin part is working great, now i have the front page error when i click over Help Desk

i get this error:

1064 - You have an error in your SQL syntax near 'select * from support_tickets where customers_id = '2' and ticket_status='1'' at line 1



select count(select * from support_tickets where customers_id = '2' and ticket_status='1' order by ticket_date DESC) as total 



[TEP STOP]  

Link to comment
Share on other sites

In catalog wishlist.php i done this:

 

Changes this:

  $wishlist_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_WISHLIST_PRODUCTS, $wishlist_query_raw, $wishlist_numrows);

 $wishlist_query = tep_db_query($wishlist_query_raw);

 

To this:

  $wishlist_split = new splitPageResults($wishlist_query_raw, MAX_DISPLAY_WISHLIST_PRODUCTS);

 $wishlist_query = tep_db_query($wishlist_query_raw);

 $wishlist_numrows = tep_db_num_rows($wishlist_query);

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...