Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Code Error


bbr

Recommended Posts

Being new to PHP i am having the following problem.

 

I am trying to create a box that list certain 'Brands'

I have had it working of sorts, but the images where no 'Inside' the box'. The titel was above, then my images, then the box (but empty).

 

I have now played with the code a little and realised that i need (i think) to put my code for images within the following:

 

$info_box_contents = array();

 

This is where it all falls apart for me.

I get the following error message:

 

Parse error: parse error, unexpected T_STRING, expecting ')' in /home/bbr-trad/public_html/osCommerce/catalog/includes/boxes/information2.php on line 24

 

And this is the code i have used ( modified 'information.php' for testing):

 

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 

22:31:00 hpdl Exp $

 osCommerce, Open Source 

E-Commerce Solutions
 http://www.oscommerce.com

 

Copyright (c) 2003 osCommerce

 Released under the GNU 

General Public License
*/
?>
<!-- information //-->
     

   <tr>
           <td>
<?php
 $info_box_contents = 

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

BOX_HEADING_INFORMATION);

 new 

infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => 'echo "<a 

href=\"index.php?cPath=41\">'<img 

src=\"images/KlausKobeclogo_box03.jpg\"></a><br>"');
new infoBox($info_box_contents)?>

 

If anyone could help me out by pointing me in the right direction i would be most greatful.

Thanks

Link to comment
Share on other sites

<?php

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<a href="index.php?cPath=41"><img src="images/KlausKobclogo_box03.jpg"></a>');

 

new infoBox($info_box_contents);

?>

 

Vger

Link to comment
Share on other sites

I have got my new box looking like i want it.

However i now get a > sitting at the top of my left column.

 

I have done some back tracking and found out that it only appears when i include my new box. So i have ruled out it being the column_left.php.

 

Does anyone understand why this would happen?

 

Here is the code im currently using:

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => 'Brand Names');

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();

$info_box_contents[] = array('text' => '<center><a href="index.php?cPath=41"><img src="images/KlausKobeclogo_box03.jpg" border="0"></a><br></center>');
new infoBox($info_box_contents);?>
</td>
         </tr>>
<!-- information_eof //-->

 

Any help is always appreciated. Thank You

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...