How to add extra page in creloaded

Here how to add extra page in your Cre Loaded cart:

1. Create a page for example “hello.php” and save it in your root folder (public_html)

hello.php code:

<?php
/*
Originally Created by: http://www.virtuosomaster.com arni@virtuosomaster.com
Released under the GNU General Public License
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2004 osCommerce
*/

require(’includes/application_top.php’);

require(DIR_WS_LANGUAGES . $language . ‘/’ . FILENAME_HELLO);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_HELLO, ”, ‘SSL’));

$content = CONTENT_HELLO;

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . ‘/’ . TEMPLATENAME_MAIN_PAGE);

require(DIR_WS_INCLUDES . ‘application_bottom.php’);
?>

2. Create a template hello.tpl.php in your deafault template directory.

hello.tpl.php code:

<?php
/*
Originally Created by: http://www.virtuosomaster.com arni@virtuosomaster.com
Released under the GNU General Public License
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2004 osCommerce
*/

//RCI code start
echo $cre_RCI->get(’global’, ‘top’);
echo $cre_RCI->get(’hello’, ‘top’);
// RCI code eof
?>

<div class=”page”>
<h2><?php echo HEADING_TITLE; ?></h2>
<p>Hello worlds!</p>

</div>

<?php
// RCI code start
echo $cre_RCI->get(’hello’, ‘bottom’);
echo $cre_RCI->get(’global’, ‘bottom’);
// RCI code eof

?>

3. Add includes/language/english/hello.php

hello.php code:

<?php
/*
Originally Created by: http://www.virtuosomaster.com arni@virtuosomaster.com
Released under the GNU General Public License
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2004 osCommerce
*/

define(’HEADING_TITLE’, ‘HELLO WORLD’);

?>

4. Edit includes/filenames.php

add the code before the ?>:

define(’CONTENT_HELLO’, ‘hello’);
define(’FILENAME_HELLO’, CONTENT_HELLO.’.php’);

5. Access your extra field in www.yourstorename.com/hello.php

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Reddit
  • Smarking
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb
  • Simpy
  • Propeller
  • Fark
  • LinkedIn
  • Live
  • Mixx

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Programming Blogs - BlogCatalog Blog Directory