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

Applying Template to files on non xcart pages?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-01-2004, 06:14 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default Applying Template to files on non xcart pages?

Hi,

I was hoping somebody can help me with this problem. I have other pages on my site which I created that aren't included in the x-cart folder. These pages are basically informative pages.

This is what I am trying to accomplish. When somebody logs into x-cart, the authentication box shows up on the right hand side saying "customer
is logged in !" accompanied by the logout button.

I would also like it to say "customer is logged in !" when viewing pages that aren't in the x-cart folder, for example on my informative pages. Basically I am trying to get x-cart templates to appear on non xcart pages.

Can anybody suggest a way for me to do this. Is there some kind of guide available?

I appreciate any help I can get,

Thanks
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #2  
Old 10-01-2004, 06:24 AM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default

Create a html catalog. Then open one of those pages in frontpage etc and input your info. Change the text by the login area to say logged in. Then add links to these pages in the x-cart skin. The re-create a the html catalog so the links are always there. That only thing with this is that when a customer is or is not logged in and click on a link to one of these pages they will see that it always says logged in as you will be using hardcoded html pages. This will aloow your no x-cart added pages to still maintain the same look as your site. Let us know if this is not what you are looking for.
Reply With Quote
  #3  
Old 10-01-2004, 07:06 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

I really appreciate your reply lildawg.

I understand what you have suggested. Your right, by using hard coded html it will say logged in, even if the customer is not logged in. I was also hoping that when the customer is logged in his login name would appear (example "lildawg is logged in!")

I was thinking, isn't there a way to create external pages with a php extenstion, then use a php code within that page to call on x-carts "customer logged in!" template?

It would make sense if this would be possible. I just don't know how to implement it.

Any ideas?
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #4  
Old 10-01-2004, 08:16 AM
  shan's Avatar 
shan shan is offline
 

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

Default

if you look at home.php you should see the files you need to include and the process for making extra php pages
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 10-01-2004, 11:27 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

Shan,

Thanks for the reply. I have been looking into your suggestion. It has been helpful.

I have attempted to do what you have said. However I am still having some problems. Mainly when I try to place the php file outside the xcart folder I get a "Can not initiate application! Please check configuration" error.

When I try to get the php file working within the xcart folder, it seems to work, however I get a "Cannot modify header information - headers already sent by..." error. I believe this is because the page I have added the php code to has header tags at the top of the page. This file is basically like a html file with a php extension. I am trying to keep it that way for search engine purposes.

My main goal is to get these files working outside of the xcart folder, but I did try it within the folder just to see if it's possible.

Can anybody provide me with a little more help? I am not too experienced with php.

Thanks in advance
__________________
X-cart Gold Version 4.0.4 on Unix
Reply With Quote
  #6  
Old 10-08-2004, 08:20 AM
 
Makaveli Makaveli is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 52
 

Default

Hello,

I can see that there aren't too many answers about making templates work on non-xcart pages. I thought I would change up the question.

While playing around with this idea, and getting some very helpful outside help, I have managed to do what I was looking to do. I can now upload non-xcart php pages to my x-cart folder and these php pages would say "username is logged in!", when somebody is logged in.

The problem is that the php files will ONLY work if they are in the main xcart folder (domain.com/xcart/test.php). If the php files are placed outside the main x-cart folder (domain.com/test.php) or even inside the main folder, but in a separate folder (domain.com/xcart/newfolder/test.php), it will no longer say "username is logged in!", instead it will just ask to login again, even if I'm logged in.

Does anybody have any idea why these files will only work within the main xcart folder. It was suggested to me that the cookies and sessions ID may play a factor in this, however I still haven't managed to get it working.

Any help is greatly appreciated!
__________________
X-cart Gold Version 4.0.4 on Unix
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 10:44 PM.

   

 
X-Cart forums © 2001-2020