This is a discussion on Add new page under "Information" within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi, I would like to add a size chart under the "Information" section. Can anyone help me with this. I ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I would like to add a size chart under the "Information" section. Can anyone help me with this. I tried placing it in like you would with the base install of OSC but it had errors coming up. Regards |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| This is the error I get: Warning: main(includes/header.php): failed to open stream: No such file or directory in /var/www/html/size_charts.php on line 29 Fatal error: main(): Failed opening required 'includes/header.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/size_charts.php on line 29 |
|
#3
| ||||
| ||||
| Nope. Can't do it like regular osc. You should read the docs before attempting this. It makes things much easier. osCDox wiki pages
__________________ Michael Sasek osCMax Developer
Last edited by michael_s; 01-23-2007 at 07:17 AM. Reason: fixed link to oscdox wiki |
|
#4
| |||
| |||
| Unfortunately the docs do not clearly state each step and seem to be missing something. Could someone please assist me in adding a new page to my information box. Thankyou |
|
#5
| |||
| |||
| I now have Size Charts coming up under the information box. When I click on it it goes to size_chart.php however the content on the page is linking to PRIVACY. I think it has somthing to do with this part Code: $content_template = TEMPLATENAME_PRIVACY; Code: Fatal error: main(): Failed opening required '' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/templates/aabox/main_page.tpl.php on line 116 |
|
#6
| ||||
| ||||
| If you change PRIVACY to SIZE_CHART, you have to tell BTS what the value of TEMPLATENAME_SIZE_CHART is. Define this constant in includes/filenames.php Your new constant has no value until you define it. Doing a search across files in osCMax for TEMPLATENAME_PRIVACY would have told you exactly where to put your new constant. Ultra-Edit is a great text editor that allows searching across files. I suggest you get a tool for doing this (like Ultra Edit) and whenver you need to find something, just do a quick search for it across all the osCMax files. It takes seconds to do and you will learn a lot about where things go and how it is put together. See this too: http://oscdox.com/PNphpBB2-viewtopic-t-4842.html http://oscdox.com/modules.php?op=mod...sDocumentation
__________________ Michael Sasek osCMax Developer
|
|
#7
| |||
| |||
| Thanks for your help but I have already defined all the lines that need to be defined in includes/filenames.php This is what I have: (I made a copy of the privacy parts and changed them) define('CONTENT_SIZE_CHART', 'size_chart'); define('CONTENT_SIZE_CHART_CONTENT', 'size_chart'); define('FILENAME_SIZE_CHART', CONTENT_SIZE_CHART . '.php'); define('FILENAME_SIZE_CHART_CONTENT', CONTENT_SIZE_CHART_CONTENT . '.php'); |
|
#8
| |||
| |||
| sorry I forgot to mention after defining them I am still getting the same error message |
|
#9
| ||||
| ||||
| You missed a step somewhere. Retrace your steps: 1. Create the new file in the catalog dir - size_chart.php 2. Create new file in /[templatename]/content dir - size_chart.tpl.php 3. Add contstants that define the new filename and content: Code: define('CONTENT_SIZE_CHART', 'size_chart');
define('FILENAME_SIZE_CHART', 'size_chart.php');
4. Change the contents of size_chart.php to match your new contstants as per the instructions in the guide here : http://oscdox.com/phpWiki-index-page...mentation.html Code: <?php
/*
$Id: privacy.php,v 1.3.2.1 2005/06/12 00:03:43 Michael Sasek Exp $
osCMax Power E-Commerce
http://oscdox.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SIZE_CHART);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SIZE_CHART));
$content = CONTENT_SIZE_CHART;
$content_template = TEMPLATENAME_STATIC;
include (bts_select('main', $content_template)); // BTSv1.5
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
Code: <?php
/*
$Id: privacy.php,v 1.1.1.1.2.1 2005/06/12 00:04:34 Michael Sasek Exp $
osCMax Power E-Commerce
http://oscdox.com
Copyright (c) 2005 osCMax, 2002 osCommerce
Released under the GNU General Public License
*/
define('NAVBAR_TITLE', 'Size Chart');
define('HEADING_TITLE', 'Size Chart');
define('TEXT_INFORMATION', 'Put here your Size chart info here.');
?>
Ok, so now I have done all the work for you. Please send payment to...
__________________ Michael Sasek osCMax Developer
|
|
#10
| |||
| |||
| Thankyou for your help. It works now. I copied the piece of the code for the main size_chart.php you had and replaced mine with it. 10 hours later and it finally works! Thanks |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove "QTPRO" for "Option Type Feature" | adam71o | osCMax v2 Customization/Mods | 3 | 01-10-2007 10:32 AM |
| Deleting "Gift Vouchers FAQ" from information box | motovelo | osCMax v2 Customization/Mods | 5 | 10-11-2006 12:41 AM |
| Catalog Front Page "Heading_Title" How To Change(? | bgharder | osCMax v1.7 Discussion | 1 | 02-15-2005 10:00 PM |
| "Continue" button links to different page.Strange. | yellowriver | osCommerce 2.2 Modification Help | 7 | 11-03-2004 12:49 PM |
| Define main page error - "file not writeable" | mark754 | osCMax v1.7 Discussion | 4 | 01-16-2004 10:18 AM |