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

replace or modify error_message.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-24-2005, 06:47 AM
 
jdedba jdedba is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 96
 

Default replace or modify error_message.php

I wrote my own page to work with x-cart. Users can only access the page after they pass the authentication. I did that by put below line in my code:

require $xcart_dir."/include/security.php";

Now if users try to access the page before login, they are always directed to error_message.php?access_denied&id=37 with message

Quote:
Access denied !
You are not allowed to access that resource!

Error ID: 37


How can I direct users to a different page (such as a login.php), instea of error_message.php? If it's not easy to do that, how can I customize the message? I like the message to be something friendly, like
Quote:
Access denied !
Please click here (with link) to login first.

Thanks a lot.

Jeff
__________________
version 4.1.1
Reply With Quote
  #2  
Old 02-24-2005, 07:51 AM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

/xcart/skin1/main/

all the error tpl's are here.

Each tpl is calling a language variable, once you know which one, you can edit the language variable in Xcart Admin.
__________________
ETInteractive.com
X-Cart 3.5.x
Reply With Quote
  #3  
Old 02-24-2005, 08:32 AM
 
jdedba jdedba is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 96
 

Default

Thank you very much for your help. Now I know how to modify the message.

My first choice, if I can choose, is to direct users to a login page (or any page, replacing error_message.php?access_denied&id=37). Can someone give me a hint?

Thanks.
Jeff
__________________
version 4.1.1
Reply With Quote
  #4  
Old 02-24-2005, 11:20 AM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

you could edit any of the error_xx.tpl's

remove the language variables and add

Code:
{include file="error_login_incorrect.tpl"}

this will take you to the login page.

i havent tried it but I think it should work.
__________________
ETInteractive.com
X-Cart 3.5.x
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 04:43 AM.

   

 
X-Cart forums © 2001-2020