Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Editing the 'non-catalogue' pages


Ozzzzy

Recommended Posts

Posted

Hello

I've managed to set up my site using the STS template system which has been very good. It allows you to layout the site using placeholder code to suit your own design. This is good for me as I like to use CSS rather than tables for layout, and I'm a design control freak.

 

My query is how to edit the non-shopping pages such as the shipping information etc. The placeholder $content brings in the text from the relevant php file for that page. I have managed to get the content in my page by putting it in the relevant php file - but there are so many table rows and graphics and extra bits I would rather delete altogether leaving just my web copy so the page is clean.

 

How can I get the content for these pages to be simple css and html minus the extras? I'm not a programmer.

 

Thanks

Posted

I had a fiddle (but kept a backup just incase). I have reduced the code in between the body tags to 5 lines, example for the privacy policy page: IN BETWEEN THE BODY TAGS:

 

USED TO BE THIS:

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- 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 //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

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

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- 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 //-->

<br>

</body>

 

 

NOW THIS:

<body>

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<h1><?php echo HEADING_TITLE; ?></h1>

<?php echo TEXT_INFORMATION; ?>

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

</body>

 

Now I'm not a programmer so I've kept a backup of the big ugly one, but all I did was remove any td, tr, table tags and any of the php that related to those graphic gif files. I may have deleted some other stuff too but the pages are all working well - and no tables!!

 

Please feel free to tell me if I've done something unwise. Thanks.

Archived

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

×
×
  • Create New...