osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Add new page under "Information"

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-28-2005, 03:41 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default Add new page under "Information"

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 07-28-2005, 04:10 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 07-28-2005, 10:35 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,982
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.

Last edited by michael_s; 01-23-2007 at 07:17 AM. Reason: fixed link to oscdox wiki
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 07-29-2005, 05:11 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 07-29-2005, 06:35 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default

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;
under 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 is
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 anyone can help it would be greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 07-29-2005, 07:04 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,982
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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 Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 07-29-2005, 08:11 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default

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');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 07-29-2005, 08:50 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default

sorry I forgot to mention after defining them I am still getting the same error message
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 07-29-2005, 09:16 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,982
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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');
?>
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.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.');
?>
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.


Ok, so now I have done all the work for you. Please send payment to...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 07-29-2005, 09:35 AM
New Member
 
Join Date: Feb 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kelly34
Default Thanks

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 01:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax