X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Contact us form - department emails (https://forum.x-cart.com/showthread.php?t=9520)

erit 10-01-2004 05:13 AM

cotc2001, can you post the includes/help.php from your 3.5.x install here? If X-Cart doesn't wanna help... we're just gonna have to do things ourselves 8)

cotc2001 10-01-2004 05:25 AM

sure no problem this is from 3.5.10

Code:

<?php
/*****************************************************************************\
+-----------------------------------------------------------------------------+
| X-Cart                                                                      |
| Copyright (c) 2001-2004 Ruslan R. Fazliev <rrf@rrf.ru>                      |
| All rights reserved.                                                        |
+-----------------------------------------------------------------------------+
| PLEASE READ  THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" |
| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE  |
| AT THE FOLLOWING URL: http://www.x-cart.com/license.php                    |
|                                                                            |
| THIS  AGREEMENT  EXPRESSES  THE  TERMS  AND CONDITIONS ON WHICH YOU MAY USE |
| THIS SOFTWARE  PROGRAM  AND  ASSOCIATED  DOCUMENTATION  THAT  RUSLAN  R. |
| FAZLIEV (hereinafter  referred to as "THE AUTHOR") IS FURNISHING  OR MAKING |
| AVAILABLE TO YOU WITH  THIS  AGREEMENT  (COLLECTIVELY,  THE  "SOFTWARE").  |
| PLEASE  REVIEW  THE  TERMS  AND  CONDITIONS  OF  THIS  LICENSE AGREEMENT |
| CAREFULLY  BEFORE  INSTALLING  OR  USING  THE  SOFTWARE.  BY INSTALLING, |
| COPYING  OR  OTHERWISE  USING  THE  SOFTWARE,  YOU  AND  YOUR  COMPANY |
| (COLLECTIVELY,  "YOU")  ARE  ACCEPTING  AND AGREEING  TO  THE TERMS OF THIS |
| LICENSE  AGREEMENT.  IF  YOU    ARE  NOT  WILLING  TO  BE  BOUND BY THIS |
| AGREEMENT, DO  NOT INSTALL OR USE THE SOFTWARE.  VARIOUS  COPYRIGHTS  AND |
| OTHER  INTELLECTUAL  PROPERTY  RIGHTS    PROTECT  THE  SOFTWARE.  THIS |
| AGREEMENT IS A LICENSE AGREEMENT THAT GIVES  YOU  LIMITED  RIGHTS  TO  USE |
| THE  SOFTWARE  AND  NOT  AN  AGREEMENT  FOR SALE OR FOR  TRANSFER OF TITLE.|
| THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT.      |
|                                                                            |
| The Initial Developer of the Original Code is Ruslan R. Fazliev            |
| Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2004          |
| Ruslan R. Fazliev. All Rights Reserved.                                    |
+-----------------------------------------------------------------------------+
\*****************************************************************************/

#
# $Id: help.php,v 1.33.2.1 2004/02/05 12:25:46 mclap Exp $
#

if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); }

if (!empty($login))
        $userinfo = func_userinfo($login,$login_type);

if (empty($section)) $section = "";

if ($REQUEST_METHOD=="POST" and $action=="contactus") {
#
# Send mail to support
#
        $HTTP_POST_VARS["body"] = stripslashes($HTTP_POST_VARS["body"]);

        while (list($key,$val) = each($HTTP_POST_VARS))
                $contact[$key]=$val;

    $fillerror = (empty($contact["firstname"]) || empty($contact["lastname"]) || empty($contact["b_address"]) || empty($contact["b_city"]) || empty($contact["b_country"]) || empty($contact["b_zipcode"]) || empty($contact["phone"]) || empty($contact["email"]) || empty($contact["subject"]) || empty($contact["body"]));

        if(!$fillerror) {
                $contact["b_statename"]= func_get_state($contact["b_state"], $contact["b_country"]);
                $contact["b_countryname"]= func_get_country($contact["b_country"]);

                $mail_smarty->assign("contact",$contact);

                func_send_mail($config["Company"]["support_department"], "mail/help_contactus_subj.tpl", "mail/help_contactus.tpl", $contact["email"], true);

                func_header_location("help.php?section=contactus");
        } else {
                $userinfo = $HTTP_POST_VARS;
                $userinfo["login"] = $userinfo["uname"];
        }
}
#
# Recover password
#
if ($REQUEST_METHOD=="POST" and $action=="recover_password") {

$accounts = func_query("select login, password, usertype from $sql_tbl[customers] where email='$email' and status='Y'");

#
# Decrypt passwords
#
if($accounts) {
        foreach($accounts as $key=>$account)
                $accounts[$key]["password"]=text_decrypt($accounts[$key]["password"]);

        $mail_smarty->assign("accounts",$accounts);

        func_send_mail($email, "mail/password_recover_subj.tpl", "mail/password_recover.tpl", $config["Company"]["support_department"], false);

        func_header_location("help.php?section=Password_Recovery_message&email=".urlencode($email));
}
else
        func_header_location("help.php?section=Password_Recovery_error&email=".urlencode($email));

}

if ($section=="contactus") {
        include $xcart_dir."/include/states.php";
        include $xcart_dir."/include/countries.php";
}

$smarty->assign("userinfo",@$userinfo);
$smarty->assign("fillerror",@$fillerror);

$smarty->assign("main","help");
$smarty->assign("help_section",$section);

?>


and for reference this is from 3.3.3 which i know for a fact worls as it should

Code:

<?
/*****************************************************************************\
+-----------------------------------------------------------------------------+
| X-Cart                                                                      |
| Copyright (c) 2001-2002 Ruslan R. Fazliev. All rights reserved.            |
+-----------------------------------------------------------------------------+
| The Ruslan R. Fazliev forbids, under any circumstances, the unauthorized  |
| reproduction of software or use of illegally obtained software. Making      |
| illegal copies of software is prohibited. Individuals who violate copyright |
| law and software licensing agreements may be subject to criminal or civil  |
| action by the owner of the copyright.                                      |
|                                                                            |
| 1. It is illegal to copy a software, and install that single program for    |
| simultaneous use on multiple machines.                                      |
|                                                                            |
| 2. Unauthorized copies of software may not be used in any way. This applies |
| even though you yourself may not have made the illegal copy.                |
|                                                                            |
| 3. Purchase of the appropriate number of copies of a software is necessary  |
| for maintaining legal status.                                              |
|                                                                            |
| DISCLAIMER                                                                  |
|                                                                            |
| THIS SOFTWARE IS PROVIDED BY Ruslan R. Fazliev ``AS IS'' AND ANY  |
| EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE      |
| DISCLAIMED.  IN NO EVENT SHALL Ruslan R. Fazliev OR ITS          |
| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,      |
| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,        |
| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,    |
| WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR    |
| OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF      |
| ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                                  |
|                                                                            |
| The Initial Developer of the Original Code is Ruslan R. Fazliev.          |
| Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2002          |
| Ruslan R. Fazliev. All Rights Reserved.                                    |
+-----------------------------------------------------------------------------+
\*****************************************************************************/

#
# $Id: help.php,v 1.26 2002/11/14 07:58:19 zorg Exp $
#

$userinfo = func_userinfo($login,$login_type);

if ($REQUEST_METHOD=="POST" and $action=="contactus") {
#
# Send mail to support
#
        $HTTP_POST_VARS["body"] = stripslashes($HTTP_POST_VARS["body"]);

        while (list($key,$val) = each($HTTP_POST_VARS))
                $contact[$key]=$val;

    $fillerror = (empty($contact["firstname"]) || empty($contact["lastname"]) || empty($contact["b_address"]) || empty($contact["b_city"]) || empty($contact["b_country"]) || empty($contact["b_zipcode"]) || empty($contact["phone"]) || empty($contact["email"]) || empty($contact["subject"]) || empty($contact["body"]));

        if(!$fillerror) {
                $contact["b_statename"]= array_pop(func_query_first("SELECT $sql_tbl[states].state  FROM $sql_tbl[customers], $sql_tbl[states] WHERE $sql_tbl[states].code='$contact[b_state]'"));
                $contact["b_countryname"]= array_pop(func_query_first("SELECT $sql_tbl[countries].country FROM $sql_tbl[customers], $sql_tbl[countries] WHERE $sql_tbl[countries].code='$contact[b_country]'"));

                $mail_smarty->assign("contact",$contact);

                func_send_mail($config["Company"]["support_department"], "mail/help_contactus_subj.tpl", "mail/help_contactus.tpl", $contact["email"], true);

                header("Location: help.php?section=contactus");
                exit;
        } else {
                $userinfo = $HTTP_POST_VARS;
                $userinfo["login"] = $userinfo["uname"];
        }
}
#
# Recover password
#
if ($REQUEST_METHOD=="POST" and $action=="recover_password") {

$accounts = func_query("select login, password, usertype from $sql_tbl[customers] where email='$email' and status='Y'");

#
# Decrypt passwords
#
if($accounts) {
        foreach($accounts as $key=>$account)
                $accounts[$key]["password"]=text_decrypt($accounts[$key]["password"]);

        $mail_smarty->assign("accounts",$accounts);

        func_send_mail($email, "mail/password_recover_subj.tpl", "mail/password_recover.tpl", $config["Company"]["support_department"], false);

        header("Location: help.php?section=Password_Recovery_message&email=".urlencode($email));
}
else
        header("Location: help.php?section=Password_Recovery_error&email=".urlencode($email));

}

require "../include/states.php";
require "../include/countries.php";

$smarty->assign("userinfo",$userinfo);
$smarty->assign("fillerror",$fillerror);

$smarty->assign("main","help");
$smarty->assign("help_section",$section);

?>


cotc2001 10-28-2004 12:35 AM

Ok got a final response from x-cart on this, no budging on the fact that the contact us form departments are NOT tied in with the company details, see below.

Quote:

Dear Adam,

> In that case what is the point of being able to set different email address's in
> the admin for departments if they all goto the same person as deafault? it
> didn't work that way in 3.5.x versions.
> It is a bug your quality department just don't want to admit it, I'll forward
> your reply to the x-cart forums and see if other x-cart customers agree with me.
>
> Thanks for letting me know.

Due to the consideration we decided that there should be a responsive person
(or even a group of persons) who redirects customer messages to the appropriate
departments. So this is just the standard X-Cart behavior which X-Cart architects
consider to be the most suitable. We resolved not to implement the feature you
described into standard X-Cart.

However since X-Cart is open source software it can be customized to meet your needs.
You can modify the cart by yourself (if you are familiar with php
programming and know x-cart architecture) or order our custom development service.

If you decide to order the service it will cost you from 25 USD depending on
complexity of the required modifications. Please, let us know your decision
and we'll forward your message to the Quote manager. He will discuss the details
of the project with you and issue you a quote.
--
Sincerely yours,
Sergey Kashkirov,
Technical support engineer


All times are GMT -8. The time now is 06:26 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.