View Single Post
  #2  
Old 09-27-2009, 07:47 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: new/custom php page?

Here is an example taken from
http://www.w3schools.com/PHP/DEfaULT.asP

<html>
<body>

<?php
echo "hello there";
?>

</body>
</html>

To get your content to be "surrounded" by your cart's design however you will need to create a template ("myphp.tpl")and include it by putting {include file="myphp.tpl"} in x-cart wherever you want your content to be displayed. Its not quite as simple as that but, not really much more difficult either. You may or may not need the "html" and/or "body" tags depending on where you place it in x-cart.
Example: name the following myphp.tpl and save it to the root directory of x-cart
Code:
<?php echo "hello there"; ?>
Now, in xcart-root/skin1/customer/home.tpl find where it says {include file="help.tpl"}. Copy and paste it (putting a <br /> between the old and new, and then change "help" to "myphp". Clear your templates cache (www.yoursite.com/cleanup.php) and reload the page. "hello there" should appear right after (or before, depending on which instance you modified above) the "News" section.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote