Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Adding extra pages to information box


  • You cannot reply to this topic
10 replies to this topic

#1 pftaylor61

  • Community Member
  • 1 posts
  • Real Name:Paul Taylor

Posted 22 March 2011, 13:07

I came across the following mod, written by val-ent.

http://addons.oscommerce.com/info/5762

This mod does not work in version 2.3.1. I have therefore amended it. The code, based on val-ent's post, is shown below.

Quote

This is a simple mod for creating extra pages in the Information box (on the left column by default)

I will be doing the instructions for creating an extra information page for external links... but it is fairly simple to change it
to create a page for anything else you want.

you can see this mod in operation on www.nixdisc.com


1) download the /shipping.php file from your website and open it

find the following code

FILENAME_SHIPPING

and replace it with

FILENAME_LINKS

(There should be 2 instances of this)

save this file as links.php and upload it to the catalog folder of your website


2) Create a new PHP file and copy/paste the following code to it, then save this file as links.php (this is the content file)

<?php

// start of extra info page

define('NAVBAR_TITLE', 'External Links');
define('HEADING_TITLE', 'External Links');

define('TEXT_INFORMATION', 'Insert page content here!');

// end of extra info page

?>

Upload this file to inclues/languages/english/, you will also want to create another one of these for each language your shop runs on

3) open includes/filenames.php and add this code at the bottom (before the ?>)

define('FILENAME_LINKS', 'links.php');

Upload this file


4) open includes/modules/boxes/bm_information.php and find the following code

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

just before it add

' <a href="' . tep_href_link(FILENAME_LINKS) . '">' . MODULE_BOXES_INFORMATION_BOX_LINKS . '</a><br />' .

upload this file


5) open includes/languages/english/modules/boxes/bm_information.php and find the following code

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

just after it add

define('MODULE_BOXES_INFORMATION_BOX_LINKS', 'External Links');

save and upload this file to your shop, you will also need to do this for each language you are using


6) Double check that you have saved and uploaded all the files, now you can open the links.php file in your catalog directory and start to
modify the content of it!

Thats it your all done!!

I hope you like this little mod
Jim

Amended by Paul March 22nd 2011


#2 brianabrando

  • Community Member
  • 2 posts
  • Real Name:Briana Brando

Posted 25 March 2011, 12:00

Thanks for sharing good code for oscommerce

#3 jbiquez

  • Community Member
  • 10 posts
  • Real Name:Jorge Biquez

Posted 28 March 2011, 00:43

View Postpftaylor61, on 22 March 2011, 13:07, said:

I came across the following mod, written by val-ent.

http://addons.oscommerce.com/info/5762

This mod does not work in version 2.3.1. I have therefore amended it. The code, based on val-ent's post, is shown below.

Hello. Works perfectly!.
Thanks for sharing it. It helps a lot to understand how to do some changes (new to this version of OSCommerce, returning to it after a 2 very bad hack and I left it).

Do you know by any chance how to do something like this BUT for putting it in an extra box in the Right Column? Modify Columns was easier in the version I sued to use.

Thanks a lot

#4 oveidemane

  • Community Member
  • 4 posts
  • Real Name:olga

Posted 26 April 2011, 12:11

It works!!!
Thank you very much. :rolleyes:

#5 Bryan G

  • Community Member
  • 18 posts
  • Real Name:Bryan G
  • Gender:Male
  • Location:Milwaukee, WI

Posted 28 April 2011, 17:29

I tried the one for version 2.3.1 and it just don't work. I'm not big on coding, but I can follow directions, at lease I think I can.

I just wonder if anyone else has had any trouble with the fix for 2.3.1.

#6 Suzanne Bradley

  • Community Member
  • 11 posts
  • Real Name:Suzanne Bradley

Posted 07 July 2011, 13:51

Thank you very much Paul, just what I was looking for.

Suzanne

#7 Sevastra000

  • Community Member
  • 1 posts
  • Real Name:Sevastra
  • Gender:Male

Posted 30 July 2011, 14:17

Hello,

I tried to add new pages to my site but nothing worked.
I tried a lot of methods but every time it failed: the page doesn't exist but i don't have an error message on my shop, it's like nothing was modifyed.
(here is some of the tutorials i followed: #1 and #2

Anyway, to day i tried val-ent's one when i realized that the file bm_information.php doesn't exist in my whole catalog so i can't go further...
Do have any clue or something new that could help me to create new pages?

Thank you for your help :)

Os version: 2.2-MS2
Php: 4.4.9

Edited by Sevastra000, 30 July 2011, 14:20.


#8 Bunny Mingo

  • Community Member
  • 3 posts
  • Real Name:Trish Blassingame

Posted 12 October 2011, 20:15

Thanks for the help. No problem creating the new page, which you can see here:

http://www.stillsonworks.com/dev/about_alan.php

On this site: http://www.stillsonworks.com/dev/index.php
(after development it will be to the root directory)

However, no matter what I do, or try, or cry: if you look in the header, below the logo, the name has an underscore in the link:
About_Alan.

I've made three different pages trying to get rid of this: About Alan Stillson, About Alan, and even About. But to add the link I get an underscore with two of those.

Suggestions? Please!! And thank you in advance!

#9 germ

  • Community Member
  • 13,586 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 12 October 2011, 20:48

Add to your language file:

  define('ABOUT_ALAN', 'About Alan');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#10 ssfcsv

  • Community Member
  • 19 posts
  • Real Name:Stacy

Posted 22 December 2011, 21:31

I did it. I double and triple checked. I've done it before still can't get it to show right in my info box.

http://www.mylifepress.com/faq.php

It's putting MODULE_BOXES_INFORMATION_BOX_FAQ instead of just FAQ
Assistance please and TY
SS

Edited by Jan Zonjee, 22 December 2011, 22:40.


#11 germ

  • Community Member
  • 13,586 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 23 December 2011, 12:50

Add to your language file:

define('MODULE_BOXES_INFORMATION_BOX_FAQ', 'FAQ');
 

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >