PDA

View Full Version : Incorporating column left and right together.



billybeag
02-22-2004, 11:20 AM
I have very little experience with PHP, but I'm game for a laugh..
What I have been trying to do is to incorporate some of the items in the column_left file so that they appear in the column_right box.
The site I am designing started out as just a basic html/css site with a bit of javascript. Now it needs to show 200+ products and decided the most efficient way to do this was to use dynamic data.
What I havw done so far is modify the main_page template to show my clients logo and all the css to match the site look.

I have tried to copy and paste the relevant pieces of code from one box into the other, however though I try to follow the syntax diligently I keep getting a parse error in the right box I have setup.
Could it be that there is some other file that interferes with what I am doing?
I realise I should debug "my" code but I have tried, and basically I haven't a clue. Please help, this is getting urgent.

Parse error: parse error in /homepages/38/d91389000/htdocs/catalog/includes/column_right.php on line 24
and this is the relevant code

<?php

require(DIR_WS_BOXES . 'shopping_cart.php');
if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');
if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
$check = tep_db_fetch_array($check_query);
if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_categories_box();
} else {
include(DIR_WS_BOXES . 'categories.php');
}
require(DIR_WS_BOXES . 'whats_new.php');
require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'information.php');


require(DIR_WS_BOXES . 'whats_new.php');
require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'information.php');
?>

Line 24 is the closing tag!!
I reckon the error must be earlier.

paulM
02-22-2004, 12:39 PM
trying to find the error i added some indents or tabs (or wahtever the correct English name is)

<?php

require(DIR_WS_BOXES . 'shopping_cart.php');
if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');
if (isset($HTTP_GET_VARS['products_id']))
{
if (tep_session_is_registered('customer_id'))
{
$check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
$check = tep_db_fetch_array($check_query);


if ((USE_CACHE == 'true') && empty($SID))
{
echo tep_cache_categories_box();
}
else
{
include(DIR_WS_BOXES . 'categories.php');
}
require(DIR_WS_BOXES . 'whats_new.php');
require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'information.php');


require(DIR_WS_BOXES . 'whats_new.php');
require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'information.php');
?>There are at least two closing "}" missing

the way you wrote the code, it is very difficult to see this

hth,
paul

billybeag
02-22-2004, 01:47 PM
Right, I will examine this again, and actually write the code not copy and paste.
I had the same problem with my CSS for a while, I kept forgetting the ;
veel danke
tot straaks

(sorry my dutch is 20 years out of use.)

fridgemags
05-18-2004, 07:17 PM
Cant you simply move the includes out of the leftcolumn.php file and add it to the rightcolumn.php file.?