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)
-   -   Help - STILL can't create a custom .php page (https://forum.x-cart.com/showthread.php?t=11908)

jkirkpatrick 02-02-2005 06:25 PM

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

balinor 02-02-2005 06:31 PM

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?

jkirkpatrick 02-02-2005 06:40 PM

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

balinor 02-02-2005 06:51 PM

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 :)

jkirkpatrick 02-02-2005 07:15 PM

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

Jon 02-02-2005 07:20 PM

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.

shan 02-03-2005 02:41 AM

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

CC 02-03-2005 05:55 AM

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.

jkirkpatrick 02-03-2005 06:32 AM

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

shan 02-03-2005 06:38 AM

skin1/pages/us

if they aint there create them yourself :wink:


All times are GMT -8. The time now is 08:39 PM.

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