Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP PLEASE: Cannot get rid of a mysterious comma


lrparr

Recommended Posts

I've been trying like crazy to figure out how this comma is getting inserted and I'm stumped.

 

Here is a piece of my orignal source code from shopping_cart.php:

<!-- shopping_cart //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

 

new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART));

 

$cart_contents_string = '';

 

And this is a picture of how it displays (note the , right above the shopping cart):

image1.jpg

 

Here is modified source code from shopping_cart.php that I inserted test1 and test2 text (bolded):

<!-- shopping_cart //-->

<tr>

test1<td>test2

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

 

new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART));

 

$cart_contents_string = '';

 

Here is the result:

image2.jpg

 

Can someone PLEASE help me identify where that comma is coming from. Thanks so much in advance!!

Link to comment
Share on other sites

I tried putting a comma on my site right where yours is.

 

I had to put it just before:

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

 

On *catalog*/index.php

 

It doesn't show up on every category, but it looks like what you have.

 

Danny

If I'm giving advice, it is based on what path I would take to fix your problem. My path may be wrong.

Link to comment
Share on other sites

I tried putting a comma on my site right where yours is.

 

I had to put it just before:

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

 

On *catalog*/index.php

 

It doesn't show up on every category, but it looks like what you have.

 

Danny

 

Putting a comma right before:

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

 

on catalog/product_info.php does the same thing. But I don't have a comma there either

:(

 

Here is my code from that section:

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

 

This is driving me nuts!!!

 

BTW, thanks for the reply, and out of curiousity why did you want a comma there?

Link to comment
Share on other sites

BTW, thanks for the reply, and out of curiousity why did you want a comma there?

 

I put a comma there for you, I wanted to try and find your comma.

 

I only have one store and I've only been doing this for one year. I've had my problems, but I haven't had every problem there is to have, so to learn more about osCommerce I like to find out how to fix other's problems. This has become a hobby for me and I like to think others are benefitting.

 

I like trying to solve problems on osCommerce. The best way for me to learn anything is to be faced with something wrong, so I have to fix it.

 

BTW, have you tried looking at View - source to see if you can tell what part of this program is doing this to you?

 

There is normally an image there, too. Did you get rid of the code for the image in *catalog*/index.php?

 

If you do a search for HEADING_TITLE, which I think will show up 4 times, there is an image near by. Maybe there is a stray comma from height and width or something.

 

If you didn't get rid of your images, then maybe it is just a stray comma near HEADING_TITLE.

 

The second HEADING_TITLE has a lot of code between the title and the image, as a matter of fact the third HEADING_TITLE is where the second image is.

 

That's my next guess.

 

It's like an Easter Egg hunt.

 

I hope you find it.

 

Danny

If I'm giving advice, it is based on what path I would take to fix your problem. My path may be wrong.

Link to comment
Share on other sites

try to see if these characters are coming from the navigation boxes or the main page or the header. Use the php die command to kill the script before it reaches a certain point to see if these characters still appear. So you could kill it before it processes the column_left.php script on the main page.

 

So in your main page you have this:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<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 //-->

 

you could change the

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

 

to

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

Check if you still see the unwanted characters. If so move the command further up (always enclose it in php tags). If you dont, move it downwards.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...