Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add New Pages to Site


Guest

Recommended Posts

Hi All

 

I've been trying to add a new page to my site but haven't been able to. I have searched on the forum for information, but everything I read involves creating a box in the left or right columns, which I don't want (to have) to do.

 

I have done what I think is necessary, and even started the process of making a new box in column_left.php just in case I was missing something, but think there must be something I have missed.

 

Here's what I did:

 

Using catalog/conditions.php as a template, I created a new file (we'll call it new_page.php), and changed the following:

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS));

to

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_PAGE);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_PAGE));

Then, in languages/english I used conditions.php as a template again, saved it as new_page.php, and changed the NAVBAR_TITLE and HEADING_TITLE, but left the TEXT_INFORMATION as it was.

 

I then added

define('FILENAME_NEW_PAGE', 'new_page.php');

to includes/filename.php

 

Have I missed something?

 

Many thanks.

Link to comment
Share on other sites

It looks like you did everything right. How is it failing? Try accessing the page directly - http://www.yoursite.com/new_page.php. What happens?

 

See my signature for PageMaker and download the earlier verision of it (I think te latest version's file can't be un-archived by some but if you can get it, it will be worth it). It will generate the pages for you. If you create pages often, it will save you a lot of time and aggravation.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

When I access the page directly I can see the site header, column left and column right, but the centre just has HEADING_TITLE and TEXT_INFORMATION with the continue button below.

Link to comment
Share on other sites

<?php
/*
 $Id: new_page.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'New Page');
define('HEADING_TITLE', 'New Page');

define('TEXT_INFORMATION', '<FONT SIZE="+1"><EM><B>Terms and Conditions</B></EM></FONT>');
?>

 

 

It is quite simply the conditions page, with the navbar and heading titles changed, I removed most of the text information for ease of posting. The conditions page works perfectly.

Link to comment
Share on other sites

You don't have a define for HEADING_TITLE in that file. Take a look at one of the other files (like privacy.php) to see an example.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

english/new_page.php

 

<?php
/*
 $Id: new_page.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'New Page');
define('HEADING_TITLE', 'New Page');

define('TEXT_INFORMATION', '<FONT SIZE="+1"><EM><B>Terms and Conditions</B></EM></FONT><BR><BR>
<B>Please read our terms & conditions prior to placing your order.</B><BR><BR>
1.  <U><B><FONT SIZE="-2">Ownership</FONT></B></U><BR><BR>
is owned and operated by .    <BR><BR>
2.  <U><B><FONT SIZE="-2">Hours of Business</FONT></B></U><BR>
<CENTER><BR>
Internet shop - 24 hours, 7 days<BR>
Telephone order lines - 6 days:<BR>
Mon - Fri   9am to 7pm<BR>
Sat   9am to 5pm<BR>
</CENTER><BR>
Open bank holidays except Christmas day, Boxing day and New Years day.<BR><BR>
3.  <U><B><FONT SIZE="-2">Ordering Methods</FONT></B></U><BR><BR>
We can accept orders by:<BR><BR>
Telephone on <FONT SIZE="-1"><B>0000</B></FONT><BR>
By fax on <FONT SIZE="-1"><B>0000</B></FONT><BR><BR>
By post at the above address, or over the internet via our <B><FONT SIZE="-2">
secure server.</FONT></B><BR><BR>
4.  <U><B><FONT SIZE="-2">Overseas Orders</FONT></B></U><BR><BR>
We regret that we can only accept payment from overseas customers by way of a Bankers Draft
drawn in Sterling on a U.K. bank.  We cannot at this time accept payment by credit card from overseas.<BR><BR>
5.  <U><B><FONT SIZE="-2">Payment Methods (Domestic)</FONT></B></U><BR><BR>
Payment can be made by credit/debit card (except American Express & Electron),
cheque, postal order or by Bankers Draft.<BR><BR>
6.  <U><B><FONT SIZE="-2">Credit Card Security</FONT></B></U><BR><BR>
utilises a secure encrypted system to ensure that your credit card details
cannot be obtained by unscrupulous third parties.<BR><BR>
7.  <U><B><FONT SIZE="-2">Credit Card Fraud</FONT></B></U><BR><BR>
We security check <B><U>every</U></B> credit card transaction.
 Fraudulent transactions are reported to the police immediately and then monitored.
 We work hand-in-hand with the credit card companies, 
our carriers and the police to catch <B><U>AND</U></B> convict fraudsters.<BR><BR>
8.  <U><B><FONT SIZE="-2">Shipping</FONT></B></U><BR><BR>
It is our policy to dispactch all orders on the same day that they are received.
 We do however, request that customers allow up to 28 days for delivery.
 If on receiving an order we are unable to deliver an item within five working
days, we will contact you.  Delivery charges are calculated automatically
by the shopping basket based on weight, value and destination.
 You will be informed of the delivery charge before confirming your order.<BR><BR>
9.  <U><B><FONT SIZE="-2">Pricing</FONT></B></U><BR><BR>
We strive to offer our customers only top quality products at the best 
price possible.  We reserve the right however, to change prices
and/or specifications without notice.  E&OE.<BR><BR>
10.  <U><B><FONT SIZE="-2">Satisfaction Guarantee</FONT></B></U><BR><BR>
If you purchase a product from us and are not completely satisfied, please
return it within 7 days of purchase, in the original packaging and accompanied
by your receipt and reason for return.  Providing the goods and manufacturers packaging
are undamaged and in a resaleable condition, we will offer an exchange or refund, excluding shipping costs.<BR><BR>
Special orders of non-stocked items are excluded from this policy and will be subject to a
handling charge.  Items that are made to order cannot be returned
unless damaged or faulty.<BR><BR>
11.  <U><B><FONT SIZE="-2">Warranties</FONT></B></U><BR><BR>
All goods are covered by the manufacturers warranties and/or guarantees.
 Goods returned under warranty must be accompanied by a valid receipt.
 Where necessary, goods will be returned to the manufacturer for inspection and report.<BR><BR>
can assume no responsibility for misuse, incorrect fitment
or application by the consumer.<BR><BR>
will not accept responsibility for carriage costs incurred in returning goods
or for any fitting/removal costs involved in warranty items.<BR><BR>
12.  <U><B><FONT SIZE="-2">Customer Privacy</FONT></B></U><BR><BR>
Customer information is not sold, rented or sent to any other organisation.
 Your information is used only in conjunction with the processing of your orders.<BR><BR>
13.  <U><B><FONT SIZE="-2">Acceptance of Terms and Conditions</FONT></B></U><BR><BR>
Acceptance of these terms and conditions does not affect your statutory rights
as a consumer.  By placing an order, the customer agrees to be bound by these terms and conditions.
 All terms and conditions are subject to change without notice.');
?>

Link to comment
Share on other sites

My privacy file has the same 3 define commands as the conditions.php and the code above.  :blink:

Add this to your english/new_page.php file

define('HEADING_TITLE', 'Hello');

and give it a try. Any change?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Well, then you will either need to post the code of both pages here so someone can look at it or download the contribution I mentioned, create a page and compare the results to find where the mistake is.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

HAHA, I've sussed it!

 

It seems Dreamweaver wasn't putting the files properly. Now, it may be that it was my fault being new to Dreamweaver, but when I was changing the files in remote view I assumed when I saved it, it was saving it on the server and there would be no need to put the file. But, after going through all the files in local and remote views and putting them, the page worked!

 

Thanks to everyone for their help and suggestions.

Link to comment
Share on other sites

HAHA, I've sussed it!

 

It seems Dreamweaver wasn't putting the files properly.  Now, it may be that it was my fault being new to Dreamweaver, but when I was changing the files in remote view I assumed when I saved it, it was saving it on the server and there would be no need to put the file.  But, after going through all the files in local and remote views and putting them, the page worked!

 

Thanks to everyone for their help and suggestions.

 

What version Dreamweaver are you using? I have 2004 ..Thats funny to me cause I do the same thing only I save on my machine and server. Maybe cause I like to work things before I put online,=. but I used the ftp part instead of a outside one. I always watched the file count to make sure that all got there.

It can add extra code if you don't watch with php with html..I found that out with a real mess with double . Other than being new to it,,do you like it? :thumbsup:

"Wasn't me..I was dead at the time"~~~~ Dress To Kill

Link to comment
Share on other sites

Hi Dragongirl

 

What version Dreamweaver are you using?

I have MX, I've never really used any other versions of Dreamweaver to draw a comparison, but (of the tiny bit I know) I find it very good. I'm sure I don't even touch the surface of it's capabilities (never mind scratch it) in my usage, but realise it has incredible potential.

 

In most cases I work in my local folder and save there when the file is ready, then preview in browser, before finally 'putting' the file. For some reason I decided to work in the remote folder when implementing some changes, and just assumed that saving the remote file was the same as putting a local file >_< . We live and learn :thumbsup:.

 

So yes, Dreamweaver is an excellent tool, I just have to find time to explore it a bit more.

Link to comment
Share on other sites

Hi Mibble

 

Yes, Pagemaker was suggested by jack_mcs (correct?) who I think is the author.

 

I decided not to use it because I wanted to attempt the addition myself (first time I've done anything like it), and considered it to be a reasonably easy thing to do, therefore a good place to start.

 

Stand me in good stead for further development :P

Link to comment
Share on other sites

i dont know who the author is, as the application is gpl, works great. i figure why waste the time to figure it out if it is already completing everything you need (with the exception of the language editing)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...