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

Help - STILL can't create a custom .php page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-02-2005, 06:25 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default Help - STILL can't create a custom .php page

Hello,

I've been trying to create a custom .php page called "ourstory.php" that uses my existing site template. Nothing seems to work

Here is my code for "ourstory.php":

Code:
<?php # # $Id: search.php,v 1.50.2.6 2004/02/05 12:25:45 mclap Exp $ # require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "ourstory.tpl"); $smarty->display("customer/home.tpl"); ?>


Then I created "ourstory.tpl" which includes simply includes the text that I want to be displayed on the page. It's saved in skin1/customer/main.

Can anyone help? This is driving me nuts!

Thanks,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #2  
Old 02-02-2005, 06:31 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

This may be a really stupid question, but is there a reason you aren't using the static page feature built in to X-Cart?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-02-2005, 06:40 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Because static pages don't include the site template so I lose the look and feel, menus, footer, etc.

Unless I'm doing something wrong...

Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #4  
Old 02-02-2005, 06:51 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

They do if you use the Embedded Level instead of the Root Level. The Embedded ones show up just like a help page or product page would, right in the central column of your template
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 02-02-2005, 07:15 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

That would be perfect!

When I tried to create a page I got the error:

"Can not to save file: please check the write permissions."

Which files need their permissions changed? I thought I changed everything when I installed X-Cart, but I must have missed something.

Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #6  
Old 02-02-2005, 07:20 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

You have to change this:

Code:
$smarty->assign("main", "ourstory.tpl");

to:

Code:
$smarty->assign("main", "ourstory");

Then edit your skin1/customer/home_main.tpl and somewhere in the middle put:



Code:
{elseif $main eq "ourstory"} {include file="skin1/customer/main/ourstory.tpl"}

Where outstory.tpl is in the skin1/customer/main/ folder.
Reply With Quote
  #7  
Old 02-03-2005, 02:41 AM
  shan's Avatar 
shan shan is offline
 

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

Default

you should find a folder called pages/us which should be set tyo chmod 777 to allow xcart to saved the file it creates for your new page
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #8  
Old 02-03-2005, 05:55 AM
  CC's Avatar 
CC CC is offline
 

eXpert
  
Join Date: Jun 2004
Posts: 349
 

Default

Sorry to jump in, but can you use new main page templates with a file outside of the XC install?

For instance we have a support helpdesk that reside in public_html/support/ could this be linked into a template page?

Cheers.
__________________
XC 4.2 inc (unofficial) patch release.
Reply With Quote
  #9  
Old 02-03-2005, 06:32 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Quote:
Originally Posted by shan
you should find a folder called pages/us which should be set tyo chmod 777 to allow xcart to saved the file it creates for your new page

I looked everywhere and can't find a folder by that name...

Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #10  
Old 02-03-2005, 06:38 AM
  shan's Avatar 
shan shan is offline
 

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

Default

skin1/pages/us

if they aint there create them yourself
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
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 07:30 PM.

   

 
X-Cart forums © 2001-2020