Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Am I about to start something I will regret?


GwilliamP

Recommended Posts

Hi all,

 

I am in the process of setting up a new site for my wife's business. She currently trades on eBay but is SICK of the way eBay/PayPal treat sellers.

 

Her eBay listings utilise a table that creates a graphic frame with the item information inside. She wants to retain this look so that customers she entices off eBay will recognise the design and feel at home.

 

Below is a gif of the complete 'frame'

 

border-v5.gif

 

My initial thought is to enclose the whole index.php in a single cell table with this as a background so that the shop is overlaid. The layout will probably not have anything on the right except for a transparent empty box to prevent the centre from flowing over the graphic.

 

The .gif is 65k but once cached in the browser should be OK for page changes (I hope).

 

So, my initial question is - Is this idea OK or not?

 

If this is a non-starter, any suggestions on how to achieve a reasonable result?

 

Paul.

Link to comment
Share on other sites

I think this could work, I would add your pic as a background, have an empty header & footer & position left & right columns to avoid clashing.

 

 

I would use DIV to set background then you no worry of clashes with the many table osC uses.

 

top of header:

 

<div style="background-images:url(images/title.jpg); padding-bottom:0px; margin-bottom:0px; padding-top:0px; background-position: center center ; background-repeat: no-repeat; layer-background-images:url(images/title.jpg); ">

 

bottom of footer:

 

</div>

 

Best to put style in css though.

 

 

;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

THANK YOU :D

 

I was afraid that this was too simple a solution. This will save me DAYS of work. I still need to play with the width/height to get it right but at least i am heading in the right direction.

 

Can I clarify where to put this? Would it be (index.php)

 

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<center>
<div style="background-images:url(images/title.jpg); padding-bottom:0px; margin-bottom:0px; padding-top:0px; background-position: center center; background-repeat: no-repeat; layer-background-images:url(images/title.jpg); ">

body of index.php

</div>
</center>
</body>
</html>

I had intended to use a fixed width 'invisible' table to encapsulate the main code to ensure everything stayed within the 'frame' no matter how wide the customers browser was rendering the page. I would also set the main table to a fixed width for the same reason. I realise that this would remove some of the width flexibility but the nature of the background image dictates a fixed width layout.

 

Paul.

Link to comment
Share on other sites

No, if you put it in index.php it will only apply to that page, & you'd have to modify every page in the catalog root the same, so as header.php appears on every page, as does footer.php, you start the code in the header, and finish in the footer, then one edit and you set for the whole site.

 

I`ll make it easy, edit includes/header.php so it is like (this is from a rc1 site):

 

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
  if (!is_dir(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  } elseif (!is_writeable(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  }
}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>
<div style="background-images:url(images/title.jpg); padding-bottom:0px; margin-bottom:0px; padding-top:0px; background-position: center center; background-repeat: no-repeat; layer-background-images:url(images/title.jpg); ">
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

 

Edit includes/footer.php so like:

 

</div>

 

If you want to size or center your shop use the same technique, simply add to the style:

width: 900; margin: auto; text-align:center;

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I am not sure what I am doing wrong but I see no image. I checked (view page source) and the code is there but nothing shows.

 

My header.php was slightly different so I pasted the code in. ($Id: header.php 1739 2007-12-20 00:52:16Z hpdl $)

 

  if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>
<div style="background-images:url(images/border-v5.gif); padding-bottom:0px; margin-bottom:0px; padding-top:0px; background-position: center center; background-repeat: no-repeat; layer-background-images:url(images/border-v5.gif); ">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>
<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
 </tr>
</table>

 

I pasted the image file name in from a server side file/rename in FileZilla to make sure I didn't put a typo in.

 

If you don't mind, could you look at the page source of My site to make sure the running code is edited as you recommended?

Link to comment
Share on other sites

You havent added the </DIV> to your footer.php, hence no layer!

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Oh yes I did <_<

 

It may not be in the right place but it is there.

 

  require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; echo base64_decode('PGJyIC8+PGEgaHJlZj0iaHR0cDovL3d3dy5hd2FyZHNwYWNlLmNvbS8iPndlYiBob3N0aW5nPC9h
PiB8IDxhIGhyZWY9Imh0dHA6Ly93d3cucmVzZWxsZXJjbHVzdGVyLmNvbS8iPnJlc2VsbGVyIGhvc3Rpb
mc8L2E+'); ?></td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
</div>
<?php
 }
?>

 

Isn't that the right place?

 

 

Paul.

Link to comment
Share on other sites

Oh yes I did <_<

 

It may not be in the right place but it is there.

 

  require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; echo base64_decode('PGJyIC8+PGEgaHJlZj0iaHR0cDovL3d3dy5hd2FyZHNwYWNlLmNvbS8iPndlYiBob3N0aW5nPC9h
PiB8IDxhIGhyZWY9Imh0dHA6Ly93d3cucmVzZWxsZXJjbHVzdGVyLmNvbS8iPnJlc2VsbGVyIGhvc3Rp
b
mc8L2E+'); ?></td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
</div>
<?php
 }
?>

 

Isn't that the right place?

 

 

Paul.

 

No, you've put within a conditional, so as you have no banner it wont appear on rendered page, change that to:

 

  require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; echo base64_decode('PGJyIC8+PGEgaHJlZj0iaHR0cDovL3d3dy5hd2FyZHNwYWNlLmNvbS8iPndlYiBob3N0aW5nPC9h
PiB8IDxhIGhyZWY9Imh0dHA6Ly93d3cucmVzZWxsZXJjbHVzdGVyLmNvbS8iPnJlc2VsbGVyIGhvc3Rp
b
mc8L2E+'); ?></td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?></DIV>

 

Make sure there is no empty spaces after the </DIV> As that will cause an error

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

In addition, why on earth would you be advertising a couple of website hosting companies via this:

 

echo base64_decode('PGJyIC8+PGEgaHJlZj0iaHR0cDovL3d3dy5hd2FyZHNwYWNlLmNvbS8iPndlYiBob3N0aW5nPC9h
PiB8IDxhIGhyZWY9Imh0dHA6Ly93d3cucmVzZWxsZXJjbHVzdGVyLmNvbS8iPnJlc2VsbGVyIGhvc3Rp
b
mc8L2E+');

Link to comment
Share on other sites

In addition, why on earth would you be advertising a couple of website hosting companies via this:

 

echo base64_decode('PGJyIC8+PGEgaHJlZj0iaHR0cDovL3d3dy5hd2FyZHNwYWNlLmNvbS8iPndlYiBob3N0aW5nPC9h
PiB8IDxhIGhyZWY9Imh0dHA6Ly93d3cucmVzZWxsZXJjbHVzdGVyLmNvbS8iPnJlc2VsbGVyIGhvc3Rp
b
mc8L2E+');

 

That is how osC was installed by Zacky Tools on my newly acquired server. I expect that the hosting company modified the source for this. It IS on my to-do list but a long way down the page.

 

As for the graphic - No change. The running code is as below.

 

<!-- footer //-->
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  Friday 27 June, 2008  </td>
<td align="right" class="footer">  142 requests since Tuesday 24 June, 2008  </td>

 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText">Copyright © 2008 <a href="http://thestoreindevon.com/oscommerce/index.php">The Store in Devon</a><br>Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a><br /><a href="http://www.awardspace.com/">web hosting</a> | <a href="http://www.resellercluster.com/">reseller hosting</a></td>

 </tr>
</table>
</div>
<!-- footer_eof //-->
<br>
</body>
</html>

 

The image is definitely in the right place as I can load http://thestoreindevon.com/oscommerce/images/border-v5.gif in a browser.

Link to comment
Share on other sites

OK I`ve done some check and there's a copuple of things that might have blocked it:

 

In stylesheet.css:

 

in the BODY tag add:

 

text-align:center;

(assuming you want page centered)

 

change:

 

TR.header {
  background: #ffffff;}

to:

 

TR.header {
 background-color: transparent;
}

and in your header change the image div to:

 

<div style="position:relative;width:800px;margin: 0 auto;text-align:center;background-color:transparent; background-image:url(http://thestoreindevon.com/oscommerce/images/border-v5.gif); padding-bottom:10px; margin-bottom:10px;margin-top:2; padding-top:0px; background-position: 0 0; background-repeat: no-repeat; layer-background-image:url(http://thestoreindevon.com/oscommerce/images/border-v5.gif);">

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

YES!!!!

 

It looks a mess but I expected that.

 

I made the .css changes first as I was expecting the "background-color: transparent;" to do the trick but I needed to add the full path to the <div> to get the image to load.

 

Your patience has been rewarded with huge gratitude this end.

 

I obviously need to make the image wider to give me more space inside it. looking at the bottom it seems that the <div> method is limiting the length. Looking at a product ( http://thestoreindevon.com/oscommerce/prod...p?products_id=3 ) is even worse so somehow I need to nail the sizing to fixed dimensions which no doubt will be a messy job. My limited abilities can possibly cope with the width but the length will be a big challenge.

 

Would my original <table> idea work in the same place as the <div>.?

 

I was thinking of creating frame.php for the table and modifying all the main files to start with

 

 require('includes/frame.php');
require('includes/application_top.php');

 

Or even add my require to the beginning of application_top.php. Would that encapsulate the entire osC system in a table?

 

Either way - THANK YOU for your patience and help.

Link to comment
Share on other sites

I have put the code below in place of the <div> in header and footer

 

<table style="text-align: center; width: 808px; height: 1616px;"
background="http://thestoreindevon.com/oscommerce/images/border-v5.gif"
border="0" cellpadding="0" cellspacing="0">
 <tbody>
<tr>
  <td>

osC

   </td>
</tr>
 </tbody>
</table>

Woot! It looks as if it is working. Now I need to sort out the width of the table and image to allow osC to sit in the middle. I might play with a 3x3 table so I can more accurately position the centre cell for osC.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...