Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Please help! i'm really stuck!! Pleaseee

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-19-2004, 09:46 PM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default Please help! i'm really stuck!! Pleaseee

Hi all,

My issue is .. i try to create a similar page which is same as contact us but has more questions in it.

My problem is it can not send. it just looping back..

What i found.. i think this is the key!
help/contactus.tpl
Code:
{capture name=dialog} {if $smarty.get.mode eq "update"} <table width=100% border=0 cellspacing=0 cellpadding=2> <form action="help.php?section=become_a_reseller&mode=update&action=contactus" method=post name=registerform>

well as i rename it to become_a_reseller.tpl
and it just not send... Please advice!!!!
thanks you in advance.
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #2  
Old 10-20-2004, 03:07 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

Code:
<form action="help.php?section=become_a_reseller&mode=update&action=contactus" method=post name=registerform>

did you update the php file too
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 10-20-2004, 03:38 AM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default Thanks shan

Shan,

Thanks for dropping by.

here is the php code:
Code:
# $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"]; } } if ($REQUEST_METHOD=="POST" and $action=="become") { # # become a reseller # $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=become_a_reseller"); } 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"; } if ($section=="become") { 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); ?>

i actually got this code for help/become_a_reseller.tpl:
Code:
<form action="help.php?section=become_a_reseller&mode=update&action=become" method=post name=registerform>

and i can't see why it's not working if i do exactly the same?
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #4  
Old 10-21-2004, 09:11 PM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default Hi..

Please... anyone?
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #5  
Old 10-21-2004, 09:30 PM
  Gijs's Avatar 
Gijs Gijs is offline
 

eXpert
  
Join Date: Aug 2004
Location: Belgium
Posts: 295
 

Default

hi x-online,

Code:
<form action="help.php?section=become_a_reseller&mode=update&action=contactus" method=post name=registerform>

Code:
if ($REQUEST_METHOD=="POST" and $action=="become") { # # become a reseller #

There is a contradiction in the $action.

H.I.H.
__________________
X-cart 4.1.11
PHP 5 MySQL 5
www.wheelpalace.eu
Reply With Quote
  #6  
Old 10-21-2004, 09:42 PM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default

Thanks Gijs,

My site won't be live for another month also and i am afraid of forgeting putting your content on it.

with the questions i got..
i actually got this one tho..
Code:
<form action="help.php?section=become_a_reseller&mode=update&action=become" method=post name=registerform>

but it still not working.

__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #7  
Old 10-22-2004, 04:25 AM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

Looks like you're not specifying $action to be a GET variable

Add this to the top of your php file:
Code:
$action = $_GET['action'];


Otherwise it's being treated as a POST variable
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
  #8  
Old 10-22-2004, 04:39 AM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default thanks

Thank you,

i will give this a go now ^_^

will come back and post the result.

Really appreciated for dropping by.

poy
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #9  
Old 10-22-2004, 06:06 AM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default Did the test

Hi,

I did the test but no success.
It kinda weird.. logicly.. it should work like snap! but it's not.
Thanks you for everyone who putting they effort to answer my queston tho!

thanks.
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #10  
Old 10-22-2004, 06:34 AM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default Re: Did the test

Quote:
Originally Posted by x-online
Hi,

I did the test but no success.
It kinda weird.. logicly.. it should work like snap! but it's not.
Thanks you for everyone who putting they effort to answer my queston tho!

thanks.

Try $HTTP_GET_VARS instead of $_GET ?
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:28 PM.

   

 
X-Cart forums © 2001-2020