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
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 ...
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
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
Nope. Can't do it like regular osc. You should read the docs before attempting this. It makes things much easier.
osCDox wiki pages
Last edited by michael_s; 01-23-2007 at 07:17 AM. Reason: fixed link to oscdox wiki
Michael Sasek
osCMax Developer
osCmax installation service - Have our professionals install osCmax on your server - same day service!
osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0
Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.
osCmax Documentation
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
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 partunder the main size_chart.php I created. If I change the "PRIVACY" to "SIZE_CHART" it brings up errors instead of the Size Chart content. The error I get isCode:$content_template = TEMPLATENAME_PRIVACY;If anyone can help it would be greatly appreciated.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
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
osCmax installation service - Have our professionals install osCmax on your server - same day service!
osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0
Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.
osCmax Documentation
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');
sorry I forgot to mention after defining them I am still getting the same error message
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
5. Add a language file for your new page. Copy /includes/languages/english/privacy.php to /includes/languages/english/size_chart.php and edit the contents to look like this: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'); ?>
6. Add a link to the information box by editing /includes/boxes/information.php. Copy the second to the last link defined and paste it in directly below the original. Change the constants to your filename constant and change the box constant text to whatever your text is. Alternately, you can add a box text constant to english.php and call the constant instead of adding custom text.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
osCmax installation service - Have our professionals install osCmax on your server - same day service!
osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0
Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.
osCmax Documentation
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
Bookmarks