Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Main page text fully formatted html - how?


JonathanR

Recommended Posts

Posted

Hi all,

 

I have been battling with this one for quite a while. I want to replace the default text on the Main Page "This is a default setup of osCommerce Online Merchant. Products shown are for demonstrational purposes. Any products purchased will not be delivered nor will the customer be billed. etc etc with a fully formatted html text page, complete with logos etc etc.

 

This thread kind of pointed me in the right direction, but I am struggling to find where exactly I add the <table> part into the calalog>index.php file.

 

I have tried in various places, without any real success. This is almost the final piece in my osCommerce jigsaw, so any help will be well received!

 

Thanks in advance,

 

Jonathan

 

Edit: Thinking again, would it be possible to pull in an external html page into this centre area when the site is first entered, in the same way that a Flash banner can be called into the header or footers?

Posted

I'd say you've missed the point of the thread you pointed to.

:blush:

 

Put your HTML in the define for TEXT_MAIN in the language file(s) and don't mess with the PHP code in the catalog file(s).

;)

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Posted
I'd say you've missed the point of the thread you pointed to.

:blush:

 

Put your HTML in the define for TEXT_MAIN in the language file(s) and don't mess with the PHP code in the catalog file(s).

;)

Hi germ, thanks for replying. It is perfectly possible I have missed the point. This is all very new! Doesn't this quote from that thread contradict what you are saying though? He suggests doing the html in the catalog index.php file, not the language ones (doesn't he?)

 

I think you may be missing the point of the how the files should be used. You have all of your html formattng (by this I mean tables) in the english/index.php file. The formatting should go in the catalog/index.php file. Just the text and whatever code you want to embelish it (like an email link) usually goes in the english/ files. Not that you can't do it that way, but it can cause a number of problems. Besides the one you are seeng now, it makes it very hard for other users of OSC to see the error since it not standard coding. You should move it back to where it was, IMO, unless there is some valid reason to have it this way. Once your tables are set up and working in catalog/index.php, then include the english/index.php file and see what happens.
Posted
Hi all,

 

I have been battling with this one for quite a while. I want to replace the default text on the Main Page "This is a default setup of osCommerce Online Merchant. Products shown are for demonstrational purposes. Any products purchased will not be delivered nor will the customer be billed. etc etc with a fully formatted html text page, complete with logos etc etc.

 

This thread kind of pointed me in the right direction, but I am struggling to find where exactly I add the <table> part into the calalog>index.php file.

 

I have tried in various places, without any real success. This is almost the final piece in my osCommerce jigsaw, so any help will be well received!

 

Thanks in advance,

 

Jonathan

 

Edit: Thinking again, would it be possible to pull in an external html page into this centre area when the site is first entered, in the same way that a Flash banner can be called into the header or footers?

That's what I based my answer on.

 

Take it or leave it.

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Posted

Yes. And I want to replace that text with fully formatted html text. The thread I linked to suggests putting the html text into the catalog index.php, not the language index.php. So I am asking whereabouts would I put the example he gives in the thread.

Posted

Part of Jacks reply was this:

 

Just the text and whatever code you want to embelish it (like an email link) usually goes in the english/ files

 

You would normally put your tables and such in the index.php file, but the actual text and any formatting of that text, ie bold, color size ect. would go in the english/index file and be called into the root file from the define.

Posted

Here:

 

		  <tr>
		<td class="main"><?php echo TEXT_MAIN; ?></td>
	  </tr>

I still think you've taken comments in the thread the wrong way and you're "barking up the wrong tree"..

:blush:

 

And I'm honestly not trying to be an a$$ about the whole thing.

 

I'm just telling you what I believe is the best way to remedy your problem.

:)

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Posted

OK. Right. I am understanding it now and my terminology was probably wrong. Tables in the catalog index.php, formatting in the language index.php. I was struggling to under what tables were.

 

I don't consider that you were being an a$$ germ (but I am a sensitive Englishman remember :blush:) , but I just thought there was a contradiction in what you said and what was suggested in the thread... but that was down to my terminology.

 

hanks both. I will battle on. So, it isn't possible to just call in an eternal html page into that area then?

Posted

This works:

 

			<td class="main"><?php include('your_page.html'); ?></td>

:)

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Posted
This works:

 

			<td class="main"><?php include('your_page.html'); ?></td>

:)

Will give that a go later then, germ. My wife is badgering me to go and cook her egg and chips! :D Do I need the full path to where 'your_page.html' is?

Posted

If you put the HTML file in your "catalog" folder no path is required.

 

I haven't fiddled with the code to see what the exact syntax would be if you put it elsewhere.

:blush:

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Posted
If you put the HTML file in your "catalog" folder no path is required.

 

I haven't fiddled with the code to see what the exact syntax would be if you put it elsewhere.

:blush:

Well would you Adam and Eve it? It only worked! I originally even sussed out how to show it the indirect path as it was in a separate folder, but that didn't bring in any images, so I put it all in the base catalog folder and bingo! A fully formatted external html web page right where it should be!

 

Thanks for your help. This is a big step today! Getting snowed in at home was worth it after all!

 

Jonathan

 

btw: In case you are interested, the egg and chips were luvelly!

Archived

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

×
×
  • Create New...