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)
-   -   How do you add a page to the template? (https://forum.x-cart.com/showthread.php?t=11753)

mikefeiman 01-27-2005 08:44 AM

How do you add a page to the template?
 
I'm trying to create a page that wraps the current template of the site around some basic html. I created a php page and a tpl page but I keep getting the following error. I placed the tpl file in \shop\skin1\customer\main and the php page is placed in \shop\customer

"Pool Dawg :: Access denied !

Page not found!
The requested page is not exists or you are not allowed to access that resource! "

Page Link

PHP code: dogsecure.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";

if($active_modules["Bestsellers"])
        include $xcart_dir."/modules/Bestsellers/bestsellers.php";


$smarty->assign("main","dogsecure");
$smarty->display("customer/home.tpl");
?>



TPL code: dogsecure.tpl
Code:

<font class=NavigationPath>{$config.Company.company_name}</font><font class=NavigationPath>::Secure Site</font>




<TABLE border=0 cellPadting=0 cellSpacing=0 width="100%" {$extra}>
<TR>
<TD height=15 class=DialogTitle background="{$ImagesDir}/dialog_bg_n.gif" valign=bottom>Secure Site</TD>
</TR>
<TR><TD class=DialogBorder><TABLE border=0 cellPadting=10 cellSpacing=1 width="100%">
<TR><TD class=DialogBox>

                <table width="100%" border="0" cellspacing="3" cellpadding="0">
                        <tr height="19">
                                <td align="left" valign="top" width="130" height="19">
                               
                                <script src="https://siteseal.thawte.com/cgi/server/thawte_seal_generator.exe"></script>
                               
                                </td>
                                <td align="left" valign="top" height="19">

txt

</p></td>
                        </tr>
    </table>
               

</TD></TR>
</TABLE></TD></TR>
</TABLE>


shan 01-27-2005 12:01 PM

also see home_main.tpl

mikefeiman 01-27-2005 12:35 PM

Thanks that worked out well.

jkirkpatrick 01-31-2005 11:17 AM

Hello,

I'm trying to do the same thing but can't get it to work.

I copyied this example exactly but I get the .tpl contents displaying above the main home.tpl template instead of within it where it should be.

Thanks in advance for any help you can give.

Jennifer

mikefeiman 01-31-2005 11:31 AM

lets see your code

jkirkpatrick 01-31-2005 12:04 PM

Hello,

I originally had two "display" commands in the .php file but I changed one as per your example above.

Here is the ourstory.php which is in my root directory because that's where I installed X-Cart:

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");
?>




And ourstory.tpl which I saved in customer/main:

Code:

<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TR>
</TR>
<TR><TD><TABLE border=0 cellPadting=10 cellSpacing=1 width="100%">
<TR><TD>

      <table width="100%" border="0" cellspacing="3" cellpadding="0">
        <tr height="19">
            <td align="left" valign="top" width="130" height="19">

                This is a test to see if it's working!!!
            </td>
        </tr>
    </table>
     
 
</TD></TR>
</TABLE></TD></TR>
</TABLE>



Thanks for your help,
Jennifer

jkirkpatrick 01-31-2005 12:17 PM

Something else I wanted to ask about is whether it's possible to embed the page information in such a way that Search Engines can see the content. The fact that this doesn't happen with .php pages is a problem.

However I can't use static pages because I want to use my site template.

Any ideas?

Jennifer

mikefeiman 01-31-2005 12:52 PM

Hi, try just putting some text in your tpl file.

Code:

This is a test

As far as your site being crawled by search engines you should run the html catalog function in the back end. This will create your site in static html pages. Then create a sitemap that links to all of those pages. This will help search engines to crawl your site.

jkirkpatrick 01-31-2005 01:06 PM

I'll try that, thanks.

As for generating an HTML catalogue, I did that, however that doesn't include HTML versions of the pages such as the Help pages and the ones I'm creating now.

That means there are at least 10 pages of good content that use my keywords yet can't be indexed properly because they're PHP.

Unless you know a way to generate them in HTML?


Jennifer

mikefeiman 01-31-2005 01:22 PM

If it's only 10 pages you could always copy the html that the php generates in internet explorer and copy that into a new file and save it as an html page. Then just do a massive find and replace to rename the extension.


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

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