Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PROBLEM - An error!


jackgilbert

Recommended Posts

Hello, ive created a new box called: welcome_speech.php and the box includes just a simple flash sound movie which i have recently created. Anyway i created a new box and put the flash html code into it and my code is as follows:

<?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
*/
?>
<!-- Welcome speech //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_WELCOME_SPEECH);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' =>   body bgcolor="#6699cc"><!-- URL's used in the movie--><!-- text used in the movie-->
<object id="music2" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="100" width="100" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="music2.swf" name="movie">
<param value="false" name="loop">
<param value="best" name="quality">
<param value="#6699CC" name="bgcolor"></object>);

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

 

I then uploaded this onto my server as: welcome_speech.php and i added it to column_left.php aswell and uploaded column_left.php back to server and when i go to my store hom page it says:

 

Parse error: parse error, unexpected T_STRING, expecting ')' in /home/tignes/public_html/store/includes/boxes/welcome_speech.php on line 23

 

Please can anyone help me? please, please, please ?

Link to comment
Share on other sites

Not sure if this is right or not... but the bg color shouldn't work as you have it, and you can't have the <!-- -->stuff inside there without blocking it out and the URL's is messing it up with the apostrophe. Easier to just try this.

 

<?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
*/
?>
<!-- Welcome speech //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WELCOME_SPEECH);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('text' => 
'<object id="music2" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="100" width="100" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="music2.swf" name="movie">
<param value="false" name="loop">
<param value="best" name="quality">
<param value="#6699CC" name="bgcolor"></object>');

new infoBox($info_box_contents);
?>
</td>
</tr>

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I have copied and pasted that code into my welcome_speech.php file and uploaded it to catalog/includes/boxes in my hosting server. I then typed in my store URL and the store is working fine but i cant seem to see the new box i have created. Do i need to type something in column_left.php or something?

 

Please help me.

Link to comment
Share on other sites

My column_left.php file code is as follows, please can you tell me why this is wrong because when i go to my store URL i cant see the new box i have created called welcome speech with the flash file inside it?

<?php
/*
 $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
 // STS: ADD
 $sts_block_name = 'header2columnleft';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'categorybox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_manufacturers_box();
 } else {
include(DIR_WS_BOXES . 'manufacturers.php');
 }

 // STS: ADD
 $sts_block_name = 'manufacturerbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'whats_new.php');

 // STS: ADD
 $sts_block_name = 'whatsnewbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'search.php');

 // STS: ADD
 $sts_block_name = 'searchbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

require(DIR_WS_BOXES . 'welcome_speech.php');

 // STS: ADD
 $sts_block_name = 'welcomespeechbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'information.php');

 // STS: ADD
 $sts_block_name = 'informationbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'shopping_cart.php');

 // STS: ADD
 $sts_block_name = 'cartbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 // STS: ADD
 $sts_block_name = 'maninfobox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 // STS: ADD
 $sts_block_name = 'orderhistorybox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 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 ($check['count'] > 0) {
	include(DIR_WS_BOXES . 'best_sellers.php');
  } else {
	include(DIR_WS_BOXES . 'product_notifications.php');
  }
} else {
  include(DIR_WS_BOXES . 'product_notifications.php');
}
 } else {
include(DIR_WS_BOXES . 'best_sellers.php');
 }

 // STS: ADD
 $sts_block_name = 'bestsellersbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 if (isset($HTTP_GET_VARS['products_id'])) {
if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
include(DIR_WS_BOXES . 'specials.php');
 }

 // STS: ADD
 $sts_block_name = 'specialfriendbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
include(DIR_WS_BOXES . 'languages.php');

// STS: ADD
$sts_block_name = 'languagebox';
require(STS_RESTART_CAPTURE);
// STS: EOADD

include(DIR_WS_BOXES . 'currencies.php');

// STS: ADD
$sts_block_name = 'currenciesbox';
require(STS_RESTART_CAPTURE);
// STS: EOADD

 }

?>

 

I REALLY, REALLY, REALLY NEED HELP!

 

Please give me your kindness and could anyone possibly help me ?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...