Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newbie seeking Information Box Help


ghoid

Recommended Posts

Posted

:wink:

 

Please excuse my ignorance of the OSCommerce program. I'm new to the PHP language, and I'm struggling to learn it.

 

I have several issues I need to work through with this, but one my first issues is adding something to the Information box that appears on the left hand side of the screen. I'd like to add an About Me link there that links to an aboutme.php file. Here's what I've done so far to no avail.

 

1. Put a line of code in the store/includes/boxes/information.php file like this:

 

'<a href="' . tep_href_link(FILENAME_ABOUTME, '', 'NONSSL') . '">' . BOX_INFORMATION_ABOUTME . '</a><br>' .

 

I put this right before the 'Contact Us' line of code which looks much the same (minus the <br> reference at the end).

 

2. I created another php file in the store/includes/languages/english directory called aboutme.php. This was basically a copy of the privacy.php file with some mods to the code (I changed the ID in the code to aboutme.php and the heading title).

 

That's about the extent of what I've done for now. Maybe I'm missing something (or several things)? The Information box shows some of the fruit of my labor. There is now an item that says 'BOX_INFORMATION_ABOUTME' (it should simply say 'About Me'), and of course when you click it, you don't go to any page at all. Seems it's trying to go to a page called 'FILENAME_ABOUTME'. I thought it would go to the php aboutme page I created. Hmmmm, I'm screwing something up.

 

As I've said, I'm a newbie so please....be gentle. I've searched a little through the site so far, but I haven't found any topic matching mine (I'll keep searching though).

 

Thanks for any help anyone can offer.

Posted

You need to modify the FILENAMES.php file to include your new module.

You also need an ABOUTME.PHP file in the catalog folder that would be like a copy of the shipping.php file. Just copy it and change the file in two places where it refers to the shipping file to point to your aboutme file.

 

So you end up with two aboutme.php files, one in the English folder and one in the catalog/includes folder, I believe. The english gives the text and the includes modules calls application_top and header, footer etc to present the page like a standard osCommerce page.

 

Hope that helps.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Posted

I'm trying your suggestion now. But, since I am a HUGE newbie (best description I suppose), I'm having trouble finding your file references. Where is the FILENAMES.php file? My setup has all directories in a Store folder and then it broken down into Admin, CVS, documentation, download, images, includes, and pubs. Those folders break into yet more. It's a pretty big file structure tree after that.

 

I'm sure it's in there somewhere, but that's the first place I'm having difficulty with. Once I know where that file is, I think I can piece the rest together.

 

Thanks for the help thus far. I truly appreciate it!!

Posted

It should be in your store/includes folder.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Posted

Hmm, sorry for the confusion, but all I have in the Includes folder is:

 

application_bottom.php

application_top.php

column_left.php

column_right.php

configure.php

counter.php

footer.php

form_check.js.php

general.php

header.php

 

Is it one of those somehow? I'm searching in those files, but I'm not finding any code that sounds like it would be related to filenaming.

 

If you can think of what I'm doing wrong, please let me know.

 

THANKS!

Posted

application_top.php is where you define the file at bud

 

add this define('FILENAME_ABOUTME', 'aboutme.php');

 

put it right under the other defines with FILENAME in them so you can find it with ease later on

Posted

I feel I almost have it. I did the suggestion offered by Cyz by putting the FILENAME referrence in the application_top.php file (it of course was exactaly where you said it was).

 

Now, when I put my mouse over the link in the Information box, it appears that I get a correct link referrence appearing in the lower left hand side of the browser. However, when I click the link, I still get a 'page not found' error.

 

Also, the name in the Information box still shows BOX_INFORMATON_ABOUTME instead of 'About Me'.

 

I'm still stupidly missing something. Anyone else have some ideas?[/u]

Posted

I think you must be on a version that predates mid-March of this year?? The filenames.php file is dated 3/14/2003, which is when I think they relocated the filenames to this file. If I'm wrong, someone let me know.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Archived

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

×
×
  • Create New...