Page 1 of 1

I want an introduction to appear only on the homepage

Posted: Mon Jul 23, 2007 12:16 pm
by jeeremie
Hello,

I am using a simple online commerce system and I need to have an introduction (image+text) that will only appear on the home page (see demo).

I already created a file called intro.php.

Any ideas?

Thanks in advance.

Posted: Mon Jul 23, 2007 1:57 pm
by califdon
Try explaining what you want to do more clearly. It sounds like you have a PHP-based commerce package that you want to modify. If you're not a PHP programmer, that's going to be hard to do. But, specifically, what do you mean by "I need to have an introduction (image+text) that will only appear on the home page"? The answer that springs to mind is "just put the image and text on the page you want it to appear on", but that's going to sound sarcastic. If you have a set of scripts that you want to customize, I don't think you'll find anyone who's willing to do all the work required to analyze your existing scripts and rewrite them for you.

Posted: Mon Jul 23, 2007 2:01 pm
by superdezign
You just make it.

I'm failing to see an issue.

let's be clear!

Posted: Tue Jul 24, 2007 7:08 am
by jeeremie
Ok, i will try to explain it better.

The index page call the categories and then when one click on one of the categories, it open up the products page and so on until checkout. checkout is a different page (checkout.php). But before, everything loads on the same page (index.php).
So, if I add my intro (basically, it is an image and text contained by a DIV) into my index.php, users will see this intro everytime they check the products.

I don't want this!

I just want the intro to appear when they first load the website and everytime they go back to the homepage.

Does it make things clearer?

In case not, you can see the index.php below:

Code: Select all

<?php
require_once 'library/config.php';
require_once 'library/category-functions.php';
require_once 'library/product-functions.php';
require_once 'library/cart-functions.php';

$_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI'];

$catId  = (isset($_GET['c']) && $_GET['c'] != '1') ? $_GET['c'] : 0;
$pdId   = (isset($_GET['p']) && $_GET['p'] != '') ? $_GET['p'] : 0;

require_once 'include/header.php';
?>

  <?php require_once 'include/top.php'; ?>
  
  <?php require_once 'include/leftNav.php'; ?>
  
  		<div id="content"> 				
			<div class="text">

                                <!--******-->
                                <!--I need to add the intro here!-->
                                <h1>Handmade Dolls <span>for Key-Ring by Ann</span></h1>
			         <div class="text">
				        <img class="center" src="images/intro.jpg" />
				        <big class="center">Welcome to Hailstorm Design!</big>
			        </div>
			<!--Intro-->
                                <!--******-->


				<?php
				if ($pdId) {
					require_once 'include/productDetail.php';
				} else if ($catId) {
					require_once 'include/productList.php';
				} else {
					require_once 'include/categoryList.php';
				} 
				?>  
			</div>		
		</div>
		<!--/Content-->
	
	
  
  <?php require_once 'include/rightNav.php'; ?>
  
  <?php require_once 'include/footer.php'; ?>