Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

setting up my store's page 2


ncbenter

Recommended Posts

Posted

I sent the message below the other day, but I did not see it posted. I am making a second attempt. I notice the page 2 in the title may be confusing since you may think I can't setup the second page. My problem is I can't figure out how to get strated.

______________

I am trying to set up a store page so people can come to my site and purchase a book I just finished. I am "out of my element" and am hoping someone will be able to direct me. I have downloaded OSCommerce and have set my http://www.ncbenterprises.com/store/. However, I do not understand what appears:

 

What's New Here?

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

This is a default setup of the osCommerce project, products shown are for demonstrational purposes, any products purchased will not be delivered nor will the customer be billed. Any information seen on these products is to be treated as fictional.

Error Messages

If there are any error or warning messages shown above, please correct them first before proceeding.

Error messages are displayed at the very top of the page with a complete background color.

Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.

Editing Page Texts

The text shown here can be modified in the following file, on each language basis:

[path to catalog]/includes/languages/english/index.php

 

That file can be edited manually, or via the Administration Tool with the Languages->English->Define or Tools->File Manager modules.

 

The text is set in the following manner:

 

define('TEXT_MAIN', 'This is a default setup of the osCommerce project...');

 

 

etc., etc.

Posted

That's the default text for a default store. When you navigate to the URL with the store (www.mywebsite.com/store/catalog/) without a specific page (ie www.mywebsite.com/store/catalog/shipping.php), index.php is used. Each page (not including product pages) has a language file for it. So...

 

/store/catalog/index.php

uses the language file (for english anyhow)

/store/catalog/includes/languages/english/index.php

 

/store/catalog/shipping.php

uses the language file

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

 

/store/catalog/privacy.php

uses the language file

/store/catalog/includes/languages/english/privacy.php

 

And so on.

 

Index.php is a little special in that it uses "TEXT_MAIN", and the rest use "TEXT_INFORMATION".

 

If you open "/store/catalog/includes/languages/english/index.php" you will see "define('TEXT_MAIN', '...');", whatever is in that ('...') will appear on the main page "index.php". By default it looks like...

 

define('TEXT_MAIN', 'This is a default setup of the osCommerce project...');

 

So if you want to change the text on the main page, you would edit it in the language file.

 

define('TEXT_MAIN', 'I\'m sick of the default text always showing up...');

 

If you want to add another " ' ", like in the word "I'm", you have to tell it to ignore the ones in between by placing a "\" in front of it.

 

define('TEXT_MAIN', 'I think you're picking up what I'm laying down'); // this will kick out an error

 

define('TEXT_MAIN', 'I think you\'re picking up what I\'m laying down'); // this will not kick out an error

 

The other pages use "TEXT_INFORMATION" which is basically the same thing, but for pages other than the index.php file.

 

So to add a new static page (not a dynamic page like for products) you could just copy and existing page and rename it to what you want.

 

For instance, you could copy:

 

/store/catalog/privacy.php

and

/store/catalog/includes/languages/english/privacy.php

 

to

 

/store/catalog/new_page.php

and

/store/catalog/includes/languags/english/new_page.php

 

Then open "/store/catalog/includes/languags/english/new_page.php" and change "TEXT_INFORMATION" to what you want your new page to say.

 

Then when you type in your URL to the new page "http://www.mywebsite.com/store/catalog/new_page.php" it will load the language file with the same name "/store/catalog/includes/languags/english/new_page.php" and whatever is in "TEXT_INFORMATION" will be displayed.

Archived

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

×
×
  • Create New...