Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with index.php layout!


secondspin

Recommended Posts

Hi everyone,

 

I'm fairly new to oscommerce and have found these forums a great help and solved most of my issues through searching them. But unfortunately i've come up against a brick wall (i'm sure first of many!) and need some help. So here goes...

 

I've downloaded the OSC 2.2 milestone 2 release and only altered a few things such as deleting the currencies and language boxes from column_right.php. Other than that i've made no fundamental changes to the standard download.

 

I would like the widths of the left and right box columns on all my pages to be 165 rather than the preset 125. I've managed to make the changes in application_top.php no problem and it works great on all of the site except for the main page index.php. I've gone through all the code and just can't see a reason why this is only happening on the index.php page.

 

Please help!

 

Thanks,

Luke Ryan

Link to comment
Share on other sites

The code to handle this is the same in index.php as it is in the others unless you have changed it. If you post a link to your site or your index file, it would be easier to see the problem.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The code to handle this is the same in index.php as it is in the others unless you have changed it.  If you post a link to your site or your index file, it would be easier to see the problem.

 

Jack

 

Thanks for the reply Jack.

 

Thats the thing I can't work out because I haven't touched the coding of index.php.

 

Here's the link to the site...

 

http://www.cashfordvds.co.uk/catalog/index.php

 

As I mentioned before this page is playing up, while all the others seem ok.

 

Luke

Link to comment
Share on other sites

First off, a few words about the security on your site. I know you didn't ask about this but thought you may not be aware of it. As it stands now, anyone can get to your configure files and your admin panel. You need to fix those. Go into includes/ and change the permissions of the configure.php file to read only. Do the same for admin/includes/configure.php. Then setup some type of password protection for your admin section. This is sometimes an option a host has or you may need to add an .htaccess file or a contribution for doing this.

 

Now, as fa as the width, I looked at several pages and the width is the same on all of them - 160. You may be seeing a cached version of your index page. Try clearing cache and see if that helps.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Tired that, still no luck unfortunately. All the widths are 160 on the index and the other pages, but only on the index page it pushes the right hand column over too much so that the scroll bar appears in the browser. What screen resolution did you view it under?

 

Thanks by the way for the info on the security issue, i'll be shorting this out very shortly.

 

Luke

Link to comment
Share on other sites

I think if you remove the text from the index page you will see the issue more clearly.

I beleive this is being caused by the column widths plus padding and spacing plus the new products box total width.

 

try a simple test by changing line #313 of catalog/index.php

 

from

            <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

to be

            <td><?php // include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

 

and see if the issue remains.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi Steve, thanks for that.

 

Made the changes and it's still not aligning properly. The altered page is online so I don't know if you want to check it out for me. Any other ideas?

 

Luke

 

next eliminate the center text in catalog/includes/languages/english/index.php

 

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

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_MAIN', '');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', 'Let\'s See What We Have Here');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'What\'s New Here?');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
?>

 

Doing this will allow easier recognition of the issue, also change the file permission for catalog/includes/configure.php to CHMOD 444 read only state to remove the warning

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Did as you suggested and deleted all the text from the center of the page and it seems to have worked!!! If you could take a look again for me just to check, thanks. Don't know why the default text and table that was there caused the page not to align properly but, hey, there we go. Just hope that when it comes to adding whatever I want instead it doesn't cause the problem to re-occurr!

 

Also changed the CHMOD to 444 and the warning has gone. Great!

 

Really grateful. Thanks again Steve.

Link to comment
Share on other sites

Did as you suggested and deleted all the text from the center of the page and it seems to have worked!!! If you could take a look again for me just to check, thanks.

 

The original text is encased in a table and the formating was making things to wide.

 

You can now change back line #313 of catalog/index.php

 

to

            <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

as this was not the cause

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...