Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a general text .php page


saintleo

Recommended Posts

Posted

Okay, I haven't touched this is some time and am trying to get my head in the game and my site finally complete. This is my problem:

 

I have the info box. Inside the info box, I have a linked page titled "Other Information". On that particular page, I woul/catalog/includes/languages/english/thai_hill_tribe.phpd like to have a link to yet another page called "thai_hill_tribe.php". I have created "thai_hill_tribe.php" with in this file:

 

ginastaubin.com/catalog/includes/languages/english/thai_hill_tribe.php

 

Is there another place I need to put this page? The coding on the page looks good (from what I know about any coding). I'd like the page framed with the look of the rest of the sight....any help would be so appreciated! Please feel free to go to the site and have a look too. www.ginastaubin.com.

Everything will be easier one day...right?!?

Posted
On that particular page, I would /catalog/includes/languages/english/thai_hill_tribe.php like to have a link to yet another page called "thai_hill_tribe.php". I have created "thai_hill_tribe.php" with in this file:

 

ginastaubin.com/catalog/includes/languages/english/thai_hill_tribe.php

 

I am assuming the link is to be placed on page:

catalog/misc_information.php

 

I have created "thai_hill_tribe.php" with in this file:

 

ginastaubin.com/catalog/includes/languages/english/thai_hill_tribe.php

 

Why did you place the page here?? If you want it to resemble the rest of your site then you need to place it in the root folder 'catalog' just like you did with 'misc_information.php'. That way you can add the header and columns without any path problems..

 

To create the link just add the html to the page..

 

By the way - the site looks pretty good.

Lloyd

Posted

I had the same problem and found this post by G burton which really helped me, I saw you were looking to create a new page so I thought this would help you out

 

Download the following files:

 

catalog/conditions.php

catalog/includes/languages/english/conditions.php

 

Save them (on your Hard Drive as):

 

catalog/template.php

catalog/includes/languages/english/template.php

 

When you want a new page:

 

Open catalog/template.php (on your HD) and change the following:

 

 

CODE

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

 

 

 

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

 

 

To:

 

 

CODE

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

 

 

 

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

 

 

where NEW_PAGE is the name of your new page.

 

eg if you wanted a page called "about_us.php" the code would be:

 

 

CODE

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

 

 

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL'));

 

 

rename them BOTH to whatever, in this example: about_us.php

 

Save and Upload both:

 

catalog/about_us.php

catalog/includes/languages/english/about_us.php

 

to their respective places on the live server,

 

Set CHMOD 777 on your newly created and renamed:

 

catalog/includes/languages/english/about_us.php

 

Download, and open up filenames.php and add the following:

 

 

CODE

// New page about_us.php

 

define('FILENAME_ABOUT_US', 'about_us.php');

 

 

Save and upload includes/filenames.php

 

and just create the link to you new page using the http;//www.yoursite.com/catalog/about_us.php

 

Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure.

Posted
I had the same problem and found this post by G burton which really helped me, I saw you were looking to create a new page so I thought this would help you out

 

Download the following files:

 

catalog/conditions.php

catalog/includes/languages/english/conditions.php

 

Save them (on your Hard Drive as):

 

catalog/template.php

catalog/includes/languages/english/template.php

 

When you want a new page:

 

Open catalog/template.php (on your HD) and change the following:

CODE

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

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

To:

CODE

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

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

where NEW_PAGE is the name of your new page.

 

eg if you wanted a page called "about_us.php" the code would be:

CODE

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

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL'));

rename them BOTH to whatever, in this example: about_us.php

 

Save and Upload both:

 

catalog/about_us.php

catalog/includes/languages/english/about_us.php

 

to their respective places on the live server,

 

Set CHMOD 777 on your newly created and renamed:

 

catalog/includes/languages/english/about_us.php

 

Download, and open up filenames.php and add the following:

CODE

// New page about_us.php

 

define('FILENAME_ABOUT_US', 'about_us.php');

Save and upload includes/filenames.php

 

and just create the link to you new page using the http;//www.yoursite.com/catalog/about_us.php

 

Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure.

 

 

Thank you for this coding info. I will play with this for sure...at first, it looked complicated, but makes sense now that I've looked at it again. Thanks again.

Everything will be easier one day...right?!?

Posted
I am assuming the link is to be placed on page:

catalog/misc_information.php

Why did you place the page here?? If you want it to resemble the rest of your site then you need to place it in the root folder 'catalog' just like you did with 'misc_information.php'. That way you can add the header and columns without any path problems..

 

To create the link just add the html to the page..

 

By the way - the site looks pretty good.

 

 

Thanks so much for the site and coding feedback. Honestly, I was questioning myself on the same thing of "format consistency" . Fresh eyes always does wonders.

Everything will be easier one day...right?!?

Posted

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
I had the same problem and found this post by G burton which really helped me, I saw you were looking to create a new page so I thought this would help you out

 

Download the following files:

 

catalog/conditions.php

catalog/includes/languages/english/conditions.php

 

Save them (on your Hard Drive as):

 

catalog/template.php

catalog/includes/languages/english/template.php

 

When you want a new page:

 

Open catalog/template.php (on your HD) and change the following:

CODE

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

$breadcrumb->add(NAVBAR_TITLE, tep_hre_link(FILENAME_CONDITIONS, '', ' NONSSL'));

To:

CODE

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

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

where NEW_PAGE is the name of your new page.

 

eg if you wanted a page called "about_us.php" the code would be:

CODE

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

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL'));

rename them BOTH to whatever, in this example: about_us.php

 

Save and Upload both:

 

catalog/about_us.php

catalog/includes/languages/english/about_us.php

 

to their respective places on the live server,

 

Set CHMOD 777 on your newly created and renamed:

 

catalog/includes/languages/english/about_us.php

 

Download, and open up filenames.php and add the following:

CODE

// New page about_us.php

 

define('FILENAME_ABOUT_US', 'about_us.php');

Save and upload includes/filenames.php

 

and just create the link to you new page using the http;//www.yoursite.com/catalog/about_us.php

 

Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure.

 

Hi,

 

I did everything what you above wrote and I'm getting this error.

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

There is no "NONSSL" at the end of this line on my file about_us.php. Thus, it likes this:

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING)); --> NONSSL

 

I there an other solution for this problem. I want to add just a about_us.php page on my navigation.

 

Thanks,

Posted
Hi,

 

I did everything what you above wrote and I'm getting this error.

 

 

 

There is no "NONSSL" at the end of this line on my file about_us.php. Thus, it likes this:

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING)); --> NONSSL

 

I there an other solution for this problem. I want to add just a about_us.php page on my navigation.

 

Thanks,

 

Give me 2 minutes and I will have the solution for you, I just added my own About Us page 5 minutes ago.

Posted
I there an other solution for this problem. I want to add just a about_us.php page on my navigation.

 

If all you need to do is add a link to the info box then go to this page:

catalog/includes/boxes/information.php

 

find this:

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

 

Add your html:

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

'<a href=" my_new_page.htm">Click here for info</a>');

 

The breadcrumb page should pick it up..

Note, it may be a good idea to put the new page in your root catalog folder..

 

If you want it to look like the rest of your site then it will need to be a php page and include application top - header - column right - body - column left - footer. Just like the rest of the pages..

 

Take a look at them to see what you need to include.

Lloyd

Posted

I am using about_us.php as the new page as an example.

You can change it to whatever you will call your new page.

 

 

Go to Catalog/conditions.php

 

Make a copy and call it about_us.php

 

Change this:

 

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

 

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

 

To:

 

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

 

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

 

Upload file saved file to /Catalog/

 

Go to:

 

catalog/includes/languages/english/conditions.php

 

Make a copy and call it about_us.php

 

Change this:

 

define('NAVBAR_TITLE', 'Policy and Terms');

define('HEADING_TITLE', 'Policy and Terms');

 

to:

 

define('NAVBAR_TITLE', 'About Us');

define('HEADING_TITLE', 'About Us');

 

Go to:

 

/catalog/includes/application_top.php

 

Add this: (Add this anywhere near the top of the file)

 

Define('FILENAME_FOOBAR', 'about_us.php');

 

Go to:

 

catalog/includes/boxes/information.php

 

After:

 

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

 

Add:

 

'<a href="' . tep_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a>');

 

Find:

 

/catalog/includes/languages/english.php

 

After:

 

// information box text in includes/boxes/information.php

define('BOX_HEADING_INFORMATION', 'Information');

define('BOX_INFORMATION_PRIVACY', 'Privacy');

define('BOX_INFORMATION_CONDITIONS', 'Store Policies');

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

Add:

 

define('BOX_INFORMATION_ABOUT_US', 'About Us');

 

Your Done!

 

I hope this helps. I just did it myself and my new pages pages and links in the info box work fine.

 

 

regards

 

Eoin

Posted
If all you need to do is add a link to the info box then go to this page:

catalog/includes/boxes/information.php

 

find this:

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

Add your html:

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

'<a href=" my_new_page.htm">Click here for info</a>');

 

The breadcrumb page should pick it up..

Note, it may be a good idea to put the new page in your root catalog folder..

 

If you want it to look like the rest of your site then it will need to be a php page and include application top - header - column right - body - column left - footer. Just like the rest of the pages..

 

Take a look at them to see what you need to include.

 

 

Looks like help is not short in this thread

 

Just noticed you edited your post. If you know of a way I can add a link to the top bar of my site. I need to add an outside link to my forum.

 

Any ideas.

 

Cheers

Posted
Just noticed you edited your post. If you know of a way I can add a link to the top bar of my site. I need to add an outside link to my forum.

 

By top bar do you mean the breadcrumb trail?? If so take a look at application_top.php towards the bottom:

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

To add another link:

 

$breadcrumb->add('Title-text', '<a href="wherever.htm">wherever</a>);

Lloyd

Posted
By top bar do you mean the breadcrumb trail?? If so take a look at application_top.php towards the bottom:

 

I should have added the other part - if you want it on the right end of the breadcrumb trail then edit the:

catalog/includes/header.php

 

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

 

add your html where you would like the link:

 

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> | 

<a href="wherever.htm">wherever</a>   </td>

Lloyd

Posted

Thank guys! it works now ... Thank you very much again.... :thumbsup: :thumbsup: :lol: :lol:

Archived

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

×
×
  • Create New...