Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

About Us


808smokey

Recommended Posts

http://www.oscommerce.com/community/contributions,1404

 

I install this one on most of my stores with no problem

 

The_Bear

I tired that with no success. All I got were errors and it change the privacy page?

 

Can you please explain how to do this:

copy file catalog/privacy.php to catalog/about_us.php

 

file: catalog/about_us.php

replace all FILENAME_PRIVACY with FILENAME_ABOUT_US

that's from the instructions "read me" in the contrib. Maybe I'm missing something but that doesn't make sense?
Link to comment
Share on other sites

I just took the Shipping page and edited it to be an About Us page. One hardly needs a contribution for this...

True but I have a shippinh page and would like to keep it. But If I can't figure it out then I'll just change it. I would really like to know how to a couple more pages to the info box.

Link to comment
Share on other sites

Sorry - meant to say took a COPY OF the shipping page... (And a copy of the includes/languages/english/shipping.php

 

There's no magic here. Once you have the page defined, it's easy to add to the infobox by imitating the existing entries.

Link to comment
Share on other sites

Just remember to add the page define to your /catalog/includes/filenames.php file like this:

 

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

 

This is, of course, assuming that you rename the copy of shipping.php to about_us.php. :)

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Also, if adding a link to the /catalog/includes/boxes/information.php file, you have to define your link name in /catalog/includes/languages/english.php like this:

 

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

 

Then, in /catalog/includes/boxes/information.php, where you want the link to display, add:

 

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

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Also, if adding a link to the /catalog/includes/boxes/information.php file, you have to define your link name in /catalog/includes/languages/english.php like this:

 

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

 

Then, in /catalog/includes/boxes/information.php, where you want the link to display, add:

 

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

 

HTH,

 

Terry

TerryK,

 

Thanks, I'll try that in a minute or 2. I was wondering about your site... On your "contact us" how did you include the information above the feedback form?

 

Thanks

Link to comment
Share on other sites

Well, technically I should have added a text link and put it in my /catalog/includes/languages/english/contact_us.php file, but instead I just added it directly to the /catalog/contact_us.php file using good ol' HTML. :)

 

You can view source to see my code.

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

I can't get this to work.

What am i missing?

 

I do this copy the privacy notice php file, rename it to "tech_support" put it in the catalog/includes/laguage/english folder I made all the changes like you suggested but I get a parse error and everything looks like this FILENAME_TECH_SUPPORT. What am I not adding??

 

Thanks

 

Made all these changes:

In catalog/includes/boxes/information.php

'<a href="' . tep_href_link(FILENAME_TECH_SUPPORT) . '">' . BOX_INFORMATION_TECH_SUPPORT . '</a><br>' .
add the page define to your /catalog/includes/filenames.php file like this:

CODE 

define('FILENAME_TECH-SUPPORT', 'TECH_SUPPORT.php');

This
Link to comment
Share on other sites

There are two files that you need to copy here.

1. Copy catalog/privacy.php to catalog/tech_support.php

2. Copy catalog/includes/laguages/english/privacy.php to catalog/includes/laguages/english/tech_support.php

 

Now make the chages that you need to both of the files that you copied. If you are seeing things like FILENAME_TECH_SUPPORT, you have not properly defined that constant. The define should look like this:

define('FILENAME_TECH_SUPPORT', 'tech_support.php');

 

Look in your new catalog/includes/laguages/english/tech_support.php and you'll see several defines like this. What you need to change is the part between the last pair of single quotes:

define ('SOME_CONSTANT', 'change this part');

This defines the PHP constant SOME_CONSTANT to have the value change this part. Everywhere in your catalog/tech_support.php that you see a constant like SOME_CONSTANT, the code will substitute the words change this part.

 

Hope this removes some of the confusion.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks I got it to work now. I just started over from the beginning and got it to work from all your ideas. Not sure what I did wrong, I guess it was

If you are seeing things like FILENAME_TECH_SUPPORT, you have not properly defined that constant.

 

Thanks

Link to comment
Share on other sites

this code makes it very easy to add a info box and pages also you will learn a lot just doing it i added a new info box (like the one says information) and two pages one is a about page the other is a link page try this code works great and is easy!!!!!!!!!

 

 

Group: Community Member

Posts: 65

Joined: 9-May 04

 

 

 

Try this. It helped me learn how to do it:

 

Exercise 4 Boxes: Adding New Boxes

 

 

Adding New Boxes, Links and Pages

We will now look into adding our own custom boxes, as well as adding/changing links, pages and graphics to boxes. In addition, we will learn how to add items to the columns, outside of the actual boxes. All of these modifications are fairly easy to perform, but they are not entirely intuitive (understatement!).

 

Making a New Box

Let?s jump right in. The files involved are: /catalog/includes :

 

column_left.php

column_right.php

/catalog/includes/boxes : ALL files in this directory

 

 

--------------------------------------------------------------------------------

 

Open /catalog/includes/boxes/information.php in a text editor and save it as /catalog/includes/boxes/test.php.

 

Then in column_left.php, add this line:

 

require(DIR_WS_BOXES . 'test.php');

 

directly below this line:

 

require(DIR_WS_BOXES . 'information.php');

 

Save column_left.php to your server, and reload the main catalog page in your browser. You will now see two information boxes on the left. The second one we just added with one line of code. That is the easy part.

 

 

 

 

--------------------------------------------------------------------------------

 

Changing Links and Text : Customizing your new box and adding new pages

The next step is to customize that box, and to do it, we need to modify a few more files. I want to change the title bar of our new box, as well as make links to new, custom pages that I will also create. This process is a bit more clunky than it should be, but we will have to make due. Here we go!

 

For this example, I will be creating four links to pages called testpage1.php, testpage2.php testpage3.php, and testpage4.php in the new information block we created in the previous step.

 

I am using the original shipping.php files as my base template. Use this example to familiarize yourself with the procedure. The process is the same for other blocks, you just need to identify the proper files to copy and modify. Confused? Good. Read on?

 

----

 

Open the following files in WordPad or some other text editor that will not modify code without you telling it to, and will allow you to search and replace:

 

/catalog/includes/filenames.php

 

/catalog/includes/languages/english.php

 

/catalog/includes/languages/english/shipping.php

 

/catalog/shipping.php

 

/catalog/includes/boxes/test.php

 

 

--------------------------------------------------------------------------------

 

In the file /catalog/includes/filenames.php, find the section marked define filenames used in the project. In this section, copy any one of the file definitions, and paste it to a new line, just after the one you copied. Now you need to modify the newly pasted line to point to testpage1 See the example below:

 

Copy the first file definition listed:

 

define('FILENAME_ACCOUNT', 'account.php');

 

Then paste this on a new line immediately following it, four times. Create four new define statements as follows:

 

define('FILENAME_TESTPAGE1', 'testpage1.php');

define('FILENAME_TESTPAGE2', 'testpage2.php');

define('FILENAME_TESTPAGE3', 'testpage3.php');

define('FILENAME_TESTPAGE4', 'testpage4.php');

 

Now, save /catalog/includes/filenames.php. This is the step that creates the filename definitions so that osCommerce can build links.

 

 

--------------------------------------------------------------------------------

 

Next, in the file /catalog/includes/languages/english.php, find the section marked information box text. Copy the entire section and paste it below the original section.

 

Change the section to look like this:

 

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

define('BOX_HEADING_TEST', 'Test Box');

define('BOX_TEST_LINK1', 'Test Link 1');

define('BOX_TEST_LINK2', 'Test Link 2');

define('BOX_TEST_LINK3', 'Test Link 3');

define('BOX_TEST_LINK4', 'Test Link 4');

 

Save /catalog/includes/languages/english.php. This step creates the link text that will go into each new link you create.

 

 

--------------------------------------------------------------------------------

 

In the file /catalog/includes/languages/english/shipping.php edit the following:

 

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

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

define('TEXT_INFORMATION', 'Enter your shipping info here');

 

To look like this:

 

define('NAVBAR_TITLE', 'Test Page 1');

define('HEADING_TITLE', 'Test Page 1');

define('TEXT_INFORMATION', 'This is an added sample page');

 

Save as /catalog/includes/languages/english/testpage1.php

 

Repeat the above steps three more times, creating testpage2, testpage3, and testpage4. This is the step that actually creates the text that will be on each of your new pages, and in the process, creates four new files.

 

 

--------------------------------------------------------------------------------

 

In the file: /catalog/shipping.php using the replace feature of you text editor

 

Replace this FILENAME_SHIPPING

 

With this FILENAME_TESTPAGE1

 

Save As /catalog/testpage1.php

 

Repeat this three more times, changing FILENAME_TESTPAGE1 to FILENAME_TESTPAGE2, FILENAME_TESTPAGE3 and FILENAME_TESTPAGE4 and saving as testpage2.php, testpage3.php and testpage4.php. This step creates the actual pages that will be loaded by the links.

 

 

--------------------------------------------------------------------------------

 

Finally, edit the file /catalog/includes/boxes/test.php to look like this:

 

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_HEADING_TEST

);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => '<a href="' . tep_href_link

(FILENAME_TESTPAGE1, '', 'NONSSL') . '">' . BOX_TEST_LINK1 . '</a><br>' .

'<a href="' . tep_href_link

(FILENAME_TESTPAGE2, '', 'NONSSL') . '">' . BOX_TEST_LINK2 . '</a><br>' .

'<a href="' . tep_href_link

(FILENAME_TESTPAGE3, '', 'NONSSL') . '">' . BOX_TEST_LINK3 . '</a><br>' .

'<a href="' . tep_href_link

(FILENAME_TESTPAGE4, '', 'NONSSL') . '">' . BOX_TEST_LINK4 . '</a>'

 

This changes the text that is output in the browser. You are finished editing files at this point. Make sure you upload the files to the proper directories, as some of them have the same filenames. View your catalog in your browser and the new links should show up in your new block! See the example below.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...