View Single Post
Old 01-15-2007, 04:49 AM
  Warwick's Avatar 
Warwick Warwick is offline

Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868

Default Re: Create a php page

I did the following; I created a .php file and a .tpl file as follows:

Php file (called new_page.php situated in shop directory):

<?php require "./auth.php"; require $xcart_dir."/include/categories.php"; if($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php"; if(!defined('XCART_SESSION_START')){ header("Location: ../"); die("Access denied");} $location[] = array(func_get_langvar_by_name("lbl_new_page"), "new_page.php"); $smarty->assign("_new_page_",$_new_page_); $smarty->assign("main","_new_page_"); $smarty->assign("location", $location); $smarty->assign("products",$products); func_display("customer/home.tpl",$smarty); ?>

Tpl file (called new_page.tpl situated in skin1/customer/):


In the language section of the database I've created 'lbl_new_page'

Opening new_page.php results in:
'Page not found! The requested page does not exist or you are not allowed to access it! '
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote