Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Text in the middle of page


Lilibeth

Recommended Posts

Hi, all!

 

Jim is my best man here! He is helping me out a lot with online store. =*

Now I need more help. Hehe!

 

I want to put my text in the middle of page. Here:

forummw6.gif

 

Same as conditions.php, shiping.php... How can I do it?

Thanks a lot!

Link to comment
Share on other sites

Anybody??? :wacko:

 

have you tried changing the TEXT_MAIN declaration in your includes/languages/english/index.php? that is the text that would appear just above the products in the main page.

 

the text for the conditions is TEXT_INFORMATION in includes/languages/english/conditions.php

the text for shipping is TEXT_INFORMATION in includes/languages/english/shipping.php

and then there's TEXT_INFORMATION in includes/languages/english/privacy.php

 

just be careful of using single quotes in there, they need to be *escaped* (preceded with a backslash) as in:

let\'s see what we have here

 

let me know where that gets you.

Link to comment
Share on other sites

Thanks for aswer.

Yes, I did! And worked!

But I made a menu with another options, so I have to create more pages to show those different messages.

Thats my problem. How to make an php file?

Understand now?

Thanks!

Link to comment
Share on other sites

Thanks for aswer.

Yes, I did! And worked!

But I made a menu with another options, so I have to create more pages to show those different messages.

Thats my problem. How to make an php file?

Understand now?

Thanks!

 

sorry, i'm not sure i fully understand your question. do you mean that you have a menu that you wish to put into a php file and then include that on multiple pages on your site?

 

if that's it, then you can do something like this:

<?php include('mymenu.php'); ?> anywhere you want the menu to appear. then, just put the code for your menu into a file called mymenu.php and upload that to your site.

 

i hope this helps.

Link to comment
Share on other sites

Almost that!

The menu is ok. At menu there is the button Downlod.

I want to show this part useing a php file... like download.php.

At this moment is download.html (www.lilith-lod.com) so you can only see the message. You cant see the store. I want this part (downlod) showing inside the store. So you can see both at the same time.

Did you understand? I am sorry about my english. I know its really bad. Its hard to me too, cause all information here is in english and my language is portuguese, cause I am from Brazil.

Thanks a lot for everything!

Link to comment
Share on other sites

Almost that!

The menu is ok. At menu there is the button Downlod.

I want to show this part useing a php file... like download.php.

At this moment is download.html (www.lilith-lod.com) so you can only see the message. You cant see the store. I want this part (downlod) showing inside the store. So you can see both at the same time.

Did you understand? I am sorry about my english. I know its really bad. Its hard to me too, cause all information here is in english and my language is portuguese, cause I am from Brazil.

Thanks a lot for everything!

 

if i understand you right, all you would need to do is the <?php include('download.html'); ?> wherever you want the download.html inserted into the store. the 'include' command means to read in the file into the page - in effect, just inserting it in place. you can include .html or .php files, it doesn't matter. i'm thinking you would want to do this just after where the TEXT_MAIN is used.

 

i hope that helps. if that's not right then you will have to re-state your question. sorry... i wish i knew portuguese, it might make this easier.

Link to comment
Share on other sites

Thank you very much! I understand that you trying so hard to explian and understand my problem.

Let me try to explian by pictures:

 

My website. You can see the menu etc:

exezs9.gif

 

When you click on, for exemple, Parceria (partners) you will see this page:

exe1qx4.gif

 

But I dont want to see this page "Parceria" like that. I want to see like this:

exe3wk9.gif

 

That's why I have to create and php file, right?

Thanks!

Link to comment
Share on other sites

Thank you very much! I understand that you trying so hard to explian and understand my problem.

Let me try to explian by pictures:

 

i think the pictures helped. :)

 

try this: make a copy of your index.php and call it parceria.php. edit the file and remove all the contents between the

 

<!-- body_text //-->

 

... and ...

 

<!-- body_text_eof //-->

 

now, in between these insert the code <?php include('parceria.htm'); ?> and then change the link in your menu from parceria.htm to parceria.php.

 

this effectively makes a page just like index.php and inserts the contents of parceria.htm into the middle of it.

 

that should get you close to where you want to be.

Link to comment
Share on other sites

I did something wrong: <_< Aaaaaaaaaaah!!! lol

 

Warning: include(parceria.htm) [function.include]: failed to open stream: No such file or directory in /home/lilith-lod/www/parceria.php on line 56

 

Warning: include(parceria.htm) [function.include]: failed to open stream: No such file or directory in /home/lilith-lod/www/parceria.php on line 56

 

Warning: include() [function.include]: Failed opening 'parceria.htm' for inclusion (include_path='.:/usr/local/lib/php') in /home/lilith-lod/www/parceria.php on line 56

 

parceria.php :

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
   $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
   $cateqories_products = tep_db_fetch_array($categories_products_query);
   if ($cateqories_products['total'] > 0) {
     $category_depth = 'products'; // display products
   } else {
     $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
     $category_parent = tep_db_fetch_array($category_parent_query);
     if ($category_parent['total'] > 0) {
       $category_depth = 'nested'; // navigate through the categories
     } else {
       $category_depth = 'products'; // category has no products, but display the 'no products' message
     }
   }
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //--> <?php include('parceria.htm'); ?> <!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Where is wrong?

I changed the menu file (header.php) too. The html I changed to php.

Thanks a lot!

Link to comment
Share on other sites

Warning: include() [function.include]: Failed opening 'parceria.htm' for inclusion (include_path='.:/usr/local/lib/php') in /home/lilith-lod/www/parceria.php on line

 

this tells you what is wrong: it can't find the file parceria.htm.

 

The html I changed to php.

 

did you rename parceria.htm to parceria.php?

 

this new parceria.php requires the old parceria.htm to still be there. that didn't need to be changed and the file parceria.htm still needs to be present.

 

remember, the <?php include('parceria.htm'); ?> means 'insert the contents of parceria.htm into my php right here' - so the file needs to exist in order to include it.

Link to comment
Share on other sites

Humm!

So at the same place at FTP I have to upload parceria.php and parceria.html or I have to upload to another place?

Thanks a lot!

 

they have to be in the same directory, or you have to specify the full name of the file when you do the include, like include('myfolder/parceria.htm'). look at some of the other includes in your code to get an idea for how it works.

 

also, if the file has the extension .htm - you need to include .htm, not .html. in your first post i think you mentioned that it was .htm so i assumed that was the case but now you mention parceria.html, so i just want to make sure you are giving the *exact* file name.

Link to comment
Share on other sites

Warning: include(parceria.htm) [function.include]: failed to open stream: No such file or directory in /home/lilith-lod/www/parceria.php on line 56

 

Warning: include(parceria.htm) [function.include]: failed to open stream: No such file or directory in /home/lilith-lod/www/parceria.php on line 56

 

Warning: include() [function.include]: Failed opening 'parceria.htm' for inclusion (include_path='.:/usr/local/lib/php') in /home/lilith-lod/www/parceria.php on line 56

 

Aaaaaaaaaah!

What did I do now??

Link to comment
Share on other sites

Aaaaaaaaaah!

What did I do now??

 

on your web site, your link goes to parceria.html but your include is referencing a file called parceria.htm - these are not the same, but they need to be.

 

change your include to <?php include('parceria.html'); ?> on line 56.

Link to comment
Share on other sites

Didnt work well! Huahuah!

Thanks!

 

ok, i know what's going on. but we're getting closer.

 

in parceria.php, after the <!-- body_text -->, change the <?php include('parceria.html); ?> to the following:

 

<td width="100%" valign="top">
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
  <td valign="top"><?php include('parceria.html'); ?></td>
</tr>
 </table>
</td>

 

then then edit your parceria.html. you will need to remove everything from the top down until the first <div> tag. then starting from the bottom, remove everything from the last </div> tag until the end of file.

 

like this:

...top of file...<div...>...middle of file...</div>...end of file...

remove the parts in bold. i hope you get that.

 

what happened is i forgot that the included parceria.html needs to be inside the <td> tag within the table that makes up the main part of the page. so by taking the <td> and <table> tags from the index and putting them back in, we should get the formatting right.

 

if this works for you, then you can do a similar thing with your other pages. simply make a copy of the parceria.php and call it download.php. change the include to include('download.html') and then edit the download.html in the same way i am describing above for the parceria.html. do you follow me? so this should make it easy to repeat the process for the other pages that you have on your site. but let's getting it working with this first page before you try doing the others. :)

Link to comment
Share on other sites

Is not working to historia.php!

 

historia.html code:

<div style="text-align: center;"><span style="font-weight: bold;"><img style="width: 170px; height: 70px;" alt="" src="http://www.lilith-lod.com/img/site-historia.gif"></span><br style="font-weight: bold;"><span style="font-family: Berlin Sans FB;">A Lilith-LoD.com tem origem na LojaD2.com.</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Estamos no mercado desde Abril de 2006.</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Um amigo nos passou a loja virtual nessa data e estamos nesse ramo desde então.</span><br style="font-family: Berlin Sans FB;"><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;"><img style="width: 226px; height: 86px;" alt="" src="http://lilith-lod.com/img/site-equipe.gif"><br>Lilith: Lilibeth Nobre - Owner</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Sauron1966: Flavio Nobre - Administrador</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Luciana Teixeira - Designer Gráfico</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Sergio Pussep - Colaborador</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Tiago Martins - Colaborador</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Wagner Augusto - Colaborador</span><span style="font-weight: bold;"><span style="font-weight: bold;"><br><br><a href="http://www.lilith-lod.com"><img style="border: 0px solid ; width: 76px; height: 35px;" alt="" src="http://www.lilith-lod.com/img/voltar.gif"></a><br></span></span></div>

 

historia.php code:

<?php
/*
 $Id: index.php,v 2.2 2004/03/23 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'História');
define('HEADING_TITLE', 'História');

define('TEXT_INFORMATION', '<div style="text-align: center;"><span style="font-weight: bold;"><img style="width: 170px; height: 70px;" alt="" src="http://www.lilith-lod.com/img/site-historia.gif"></span><br style="font-weight: bold;"><span style="font-family: Berlin Sans FB;">A Lilith-LoD.com tem origem na LojaD2.com.</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Estamos no mercado desde Abril de 2006.</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Um amigo nos passou a loja virtual nessa data e estamos nesse ramo desde então.</span><br style="font-family: Berlin Sans FB;"><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;"><img style="width: 226px; height: 86px;" alt="" src="http://lilith-lod.com/img/site-equipe.gif"><br>Lilith: Lilibeth Nobre - Owner</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Sauron1966: Flavio Nobre - Administrador</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Luciana Teixeira - Designer Gráfico</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Sergio Pussep - Colaborador</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Tiago Martins - Colaborador</span><br style="font-family: Berlin Sans FB;"><span style="font-family: Berlin Sans FB;">Wagner Augusto - Colaborador</span><span style="font-weight: bold;"><span style="font-weight: bold;"><br><br><a href="http://www.lilith-lod.com"><img style="border: 0px solid ; width: 76px; height: 35px;" alt="" src="http://www.lilith-lod.com/img/voltar.gif"></a><br></span></span></div>');
define('TITLE_CONTINUE_CHECKOUT_PROCEDURE', 'Continue no procedimento de saída');
define('TEXT_CONTINUE_CHECKOUT_PROCEDURE', 'para confirmar os termos e condições.');
?>

 

What is wrong, plz?

Thanks!!!

Link to comment
Share on other sites

What about here? =)

 

i'm a little confused about where you got the contents for historia.php. i was suggesting to copy parceria.php to historia.php and then - in the new historia.pho, change the include('parceria.html') to include('historia.html'). that should be all you need to do.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...