Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add a link to the information box?


Metatron

Recommended Posts

Posted

Hello Everybody!

 

How do I add a link to the information box and where would I have to make a new .php file for the link to point to?

 

Cheers

 

Dan

Posted
Hello Everybody!

 

How do I add a link to the information box and where would I have to make a new .php file for the link to point to?

 

Cheers

 

Dan

 

Dan

 

There are several ways to do this one is to take one of the info pages like privacy.php and then save it as a new name like about_us.php. Then you need to add a link in the /catalog/includes/boxes/information.php file which has all the links. The file you are linking to also needs some modifacations.

 

Another route is to install one of the contributions that add extra pages there are several of these.

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Posted
Hello Everybody!

 

How do I add a link to the information box and where would I have to make a new .php file for the link to point to?

 

Cheers

 

Dan

 

 

in information.php in boxes folder

you have 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 to this

'<a href="' . tep_href_link(FILENAME_NEW) . '">' . BOX_INFORMATION_NEW . '</a><br>' .

 

 

and just in language folde define FILENAME_NEW plus copy privacy.php and rename it as new.php

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted
in information.php in boxes folder

you have 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 to this

'<a href="' . tep_href_link(FILENAME_NEW) . '">' . BOX_INFORMATION_NEW . '</a><br>' .

 

 

and just in language folde define FILENAME_NEW plus copy privacy.php and rename it as new.php

 

 

Satish

 

Oh yeah I forgot about that step.

 

If you are interested in putting a buch of new pages up you might want to check out this. It is about putting additional files in a subfolder:

http://www.oscommerce.com/forums/index.php?showtopic=187263

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Posted
in information.php in boxes folder

you have 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 to this

'<a href="' . tep_href_link(FILENAME_NEW) . '">' . BOX_INFORMATION_NEW . '</a><br>' .

and just in language folde define FILENAME_NEW plus copy privacy.php and rename it as new.php

Satish

 

Hi satish, can you chack my site

xpindia.com/os

I copied a privacy.php as file new.php in /languages/english

and in information.php added the line you mentioned. But getting errors.

Posted
Hi satish, can you chack my site
xpindia.com/os

I copied a privacy.php as file new.php in /languages/english

and in information.php added the line you mentioned. But getting errors.

 

You have:

 

$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>');

'<a href="' . tep_href_link(FILENAME_NEW) . '">' . BOX_INFORMATION_NEW . '</a><br>' .

 

The statement ending with the semicolon needs to be the last one so you need 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><br>' .

 

'<a href="' . tep_href_link(FILENAME_NEW) . '">' . BOX_INFORMATION_NEW . '</a>');

 

You needed the new statement inside the ()

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Archived

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

×
×
  • Create New...